text
stringlengths
2
99.9k
meta
dict
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.netbeans.freemarker.templates; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.nio.charset.Charset; import java.util.Collections; import java.util.HashMap; import java.util.Map; import javax.swing.text.DefaultEditorKit; import javax.swing.text.Document; import static junit.framework.Assert.assertEquals; import org.netbeans.api.editor.mimelookup.MimePath; import org.netbeans.api.queries.FileEncodingQuery; import org.netbeans.junit.MockServices; import org.netbeans.junit.NbTestCase; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.loaders.DataFolder; import org.openide.loaders.DataObject; import org.openide.loaders.DataObjectExistsException; import org.openide.loaders.FileEntry; import org.openide.loaders.MultiDataObject; import org.openide.loaders.MultiFileLoader; import org.netbeans.api.editor.mimelookup.test.MockMimeLookup; import org.openide.loaders.CreateFromTemplateHandler; import org.openide.util.SharedClassObject; import org.openide.util.Utilities; import org.openide.util.test.MockLookup; /** * * @author Marek Fukala * @author Jaroslav Tulach */ public class ScriptingCreateFromTemplateTest extends NbTestCase { public ScriptingCreateFromTemplateTest(String testName) { super(testName); } @Override protected boolean runInEQ() { return true; } @Override protected void setUp() throws Exception { MockLookup.setInstances(SharedClassObject.findObject(SimpleLoader.class, true)); } public void testCreateFromTemplateEncodingProperty() throws Exception { FileObject root = FileUtil.createMemoryFileSystem().getRoot(); FileObject fo = FileUtil.createData(root, "simpleObject.txt"); OutputStream os = fo.getOutputStream(); os.write("${encoding}".getBytes()); os.close(); assertEquals("content/unknown", fo.getMIMEType()); fo.setAttribute ("template", Boolean.TRUE); assertEquals("content/unknown", fo.getMIMEType()); fo.setAttribute("javax.script.ScriptEngine", "freemarker"); assertEquals("text/x-freemarker", fo.getMIMEType()); DataObject obj = DataObject.find(fo); DataFolder folder = DataFolder.findFolder(FileUtil.createFolder(root, "target")); Map<String,String> parameters = Collections.emptyMap(); DataObject inst = obj.createFromTemplate(folder, "complex", parameters); FileObject instFO = inst.getPrimaryFile(); Charset targetEnc = FileEncodingQuery.getEncoding(instFO); assertNotNull("Template encoding is null", targetEnc); assertEquals("Encoding in template doesn't match", targetEnc.name(), instFO.asText()); } public void testFreeFileExtension() throws Exception { FileObject root = FileUtil.createMemoryFileSystem().getRoot(); FileObject template = FileUtil.createData(root, "simple.pl"); OutputStream os = template.getOutputStream(); os.write("#!/usr/bin/perl\n# ${license}\n# ${name} in ${nameAndExt}\n".getBytes()); os.close(); template.setAttribute("template", true); template.setAttribute("javax.script.ScriptEngine", "freemarker"); Map<String,Object> parameters = new HashMap<String,Object>(); parameters.put("license", "GPL"); parameters.put(CreateFromTemplateHandler.FREE_FILE_EXTENSION, true); FileObject inst = DataObject.find(template).createFromTemplate(DataFolder.findFolder(root), "nue", parameters).getPrimaryFile(); assertEquals("#!/usr/bin/perl\n# GPL\n# nue in nue.pl\n", inst.asText()); assertEquals("nue.pl", inst.getPath()); /* XXX perhaps irrelevant since typical wizards disable Finish in this condition inst = DataObject.find(template).createFromTemplate(DataFolder.findFolder(root), "nue", parameters).getPrimaryFile(); assertEquals("#!/usr/bin/perl\n# GPL\n# nue_1 in nue_1.pl\n", inst.asText()); assertEquals("nue_1.pl", inst.getPath()); */ inst = DataObject.find(template).createFromTemplate(DataFolder.findFolder(root), "nue.cgi", parameters).getPrimaryFile(); assertEquals("#!/usr/bin/perl\n# GPL\n# nue in nue.cgi\n", inst.asText()); assertEquals("nue.cgi", inst.getPath()); /* XXX inst = DataObject.find(template).createFromTemplate(DataFolder.findFolder(root), "nue.cgi", parameters).getPrimaryFile(); assertEquals("#!/usr/bin/perl\n# GPL\n# nue_1 in nue_1.cgi\n", inst.asText()); assertEquals("nue_1.cgi", inst.getPath()); */ inst = DataObject.find(template).createFromTemplate(DataFolder.findFolder(root), "explicit.pl", parameters).getPrimaryFile(); assertEquals("#!/usr/bin/perl\n# GPL\n# explicit in explicit.pl\n", inst.asText()); assertEquals("explicit.pl", inst.getPath()); /* XXX inst = DataObject.find(template).createFromTemplate(DataFolder.findFolder(root), "explicit.pl", parameters).getPrimaryFile(); assertEquals("#!/usr/bin/perl\n# GPL\n# explicit_1 in explicit_1.pl\n", inst.asText()); assertEquals("explicit_1.pl", inst.getPath()); */ } public void testExternalLicenseFile() throws Exception { File license = new File(getDataDir(), "licenseheader.txt"); assertTrue(license.exists()); FileObject root = FileUtil.createMemoryFileSystem().getRoot(); FileObject template = FileUtil.createData(root, "simple.pl"); OutputStream os = template.getOutputStream(); os.write("#!/usr/bin/perl\n<#include \"${licensePath}\">".getBytes()); os.close(); System.out.println(template.asText()); template.setAttribute("template", true); template.setAttribute("javax.script.ScriptEngine", "freemarker"); Map<String,Object> parameters = new HashMap<String,Object>(); parameters.put("licensePath", Utilities.toURI(license).toString()); FileObject inst = DataObject.find(template).createFromTemplate(DataFolder.findFolder(root), "pl", parameters).getPrimaryFile(); System.out.println(inst.asText()); assertTrue(inst.asText().contains("TEST LICENSE")); } //fix for this test was rolled back because of issue #120865 public void XtestCreateFromTemplateDocumentCreated() throws Exception { FileObject root = FileUtil.createMemoryFileSystem().getRoot(); FileObject fo = FileUtil.createData(root, "simpleObject.txt"); OutputStream os = fo.getOutputStream(); os.write("test".getBytes()); os.close(); fo.setAttribute ("template", Boolean.TRUE); fo.setAttribute("javax.script.ScriptEngine", "freemarker"); MockServices.setServices(MockMimeLookup.class); MockMimeLookup.setInstances(MimePath.parse("content/unknown"), new TestEditorKit()); DataObject obj = DataObject.find(fo); DataFolder folder = DataFolder.findFolder(FileUtil.createFolder(root, "target")); assertFalse(TestEditorKit.createDefaultDocumentCalled); DataObject inst = obj.createFromTemplate(folder, "test"); assertTrue(TestEditorKit.createDefaultDocumentCalled); String exp = "test"; assertEquals(exp, inst.getPrimaryFile().asText()); } public static final class SimpleLoader extends MultiFileLoader { public SimpleLoader() { super(SimpleObject.class.getName()); } protected String displayName() { return "SimpleLoader"; } protected FileObject findPrimaryFile(FileObject fo) { if (fo.hasExt("prima")) { return fo; } return null; } protected MultiDataObject createMultiObject(FileObject primaryFile) throws DataObjectExistsException, IOException { return new SimpleObject(this, primaryFile); } protected MultiDataObject.Entry createPrimaryEntry(MultiDataObject obj, FileObject primaryFile) { return new FE(obj, primaryFile); } protected MultiDataObject.Entry createSecondaryEntry(MultiDataObject obj, FileObject secondaryFile) { return new FileEntry(obj, secondaryFile); } } private static final class FE extends FileEntry { public FE(MultiDataObject mo, FileObject fo) { super(mo, fo); } @Override public FileObject createFromTemplate(FileObject f, String name) throws IOException { fail("I do not want to be called"); return null; } } public static final class SimpleObject extends MultiDataObject { public SimpleObject(SimpleLoader l, FileObject fo) throws DataObjectExistsException { super(fo, l); } public String getName() { return getPrimaryFile().getNameExt(); } } private static final class TestEditorKit extends DefaultEditorKit { static boolean createDefaultDocumentCalled; @Override public Document createDefaultDocument() { createDefaultDocumentCalled = true; return super.createDefaultDocument(); } } }
{ "pile_set_name": "Github" }
<?php /** * Field handler for displaying a list of groups for a user. */ class og_views_handler_field_og_uid_groups extends views_handler_field_prerender_list { /** * Fake the field alias -- we don't want to actually join. */ function init(&$view, $options) { parent::init($view, $options); switch ($view->base_table) { case 'node': $this->additional_fields['users_uid'] = array('table' => 'users', 'field' => 'uid'); $this->field_alias = 'users_uid'; break; case 'users': $this->field_alias = 'uid'; break; } } /** * Add this term to the query */ function query() { $this->add_additional_fields(); } /** * Query in pre_render to grab what we need. */ function pre_render($values) { $uids = array(); foreach ($values as $row) { if (!empty($row->{$this->field_alias})) { $uids[] = $row->{$this->field_alias}; } } if (!empty($uids)) { $placeholders = db_placeholders($uids, 'int'); $result = db_query(db_rewrite_sql("SELECT n.nid, n.title, ogu.uid FROM {node} n JOIN {og_uid} ogu ON ogu.nid = n.nid WHERE ogu.uid IN ($placeholders) AND n.status = 1"), $uids); while ($row = db_fetch_object($result)) { $this->items[$row->uid][$row->nid] = l($row->title, "node/{$row->nid}"); } } } }
{ "pile_set_name": "Github" }
var convert = require('./convert'), func = convert('cloneDeep', require('../cloneDeep'), require('./_falseOptions')); func.placeholder = require('./placeholder'); module.exports = func;
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <DelphiIDETheme modified="2013-04-24 20:42:36" author="Delphi IDE Theme Editor" versionapp="1.1.18.1"> <AdditionalSearchMatchHighlight> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>True</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00FF4233</BackgroundColorNew> </AdditionalSearchMatchHighlight> <Assembler> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FF0000</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </Assembler> <AttributeNames> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$000000FF</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </AttributeNames> <AttributeValues> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FF0000</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </AttributeValues> <BraceHighlight> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00CCE0DB</BackgroundColorNew> </BraceHighlight> <Character> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$001515A3</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </Character> <CodeFoldingTree> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </CodeFoldingTree> <Comment> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00008000</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </Comment> <DiffAddition> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>True</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>clBlack</ForegroundColorNew> <BackgroundColorNew>$00CCFFCC</BackgroundColorNew> </DiffAddition> <DiffDeletion> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>True</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>clBlack</ForegroundColorNew> <BackgroundColorNew>$00FFC7C7</BackgroundColorNew> </DiffDeletion> <DiffMove> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>True</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>clBlack</ForegroundColorNew> <BackgroundColorNew>$00AAFFFF</BackgroundColorNew> </DiffMove> <DisabledBreak> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>clGray</ForegroundColorNew> <BackgroundColorNew>$00FFC7C7</BackgroundColorNew> </DisabledBreak> <EnabledBreak> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>clBlack</ForegroundColorNew> <BackgroundColorNew>$00FFC7C7</BackgroundColorNew> </EnabledBreak> <ErrorLine> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>clWhite</ForegroundColorNew> <BackgroundColorNew>clRed</BackgroundColorNew> </ErrorLine> <ExecutionPoint> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>clBlack</ForegroundColorNew> <BackgroundColorNew>$009999CC</BackgroundColorNew> </ExecutionPoint> <Float> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </Float> <FoldedCode> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00CC9999</ForegroundColorNew> <BackgroundColorNew>clWhite</BackgroundColorNew> </FoldedCode> <Hex> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </Hex> <HotLink> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FF0000</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </HotLink> <Identifier> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </Identifier> <IllegalChar> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$000000FF</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </IllegalChar> <InvalidBreak> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>clWhite</ForegroundColorNew> <BackgroundColorNew>clGreen</BackgroundColorNew> </InvalidBreak> <LineHighlight> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>True</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00FF4233</BackgroundColorNew> </LineHighlight> <LineNumber> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </LineNumber> <MarkedBlock> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>True</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00FF4233</BackgroundColorNew> </MarkedBlock> <ModifiedLine> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>clLime</ForegroundColorNew> <BackgroundColorNew>clYellow</BackgroundColorNew> </ModifiedLine> <Number> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </Number> <Octal> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </Octal> <PlainText> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </PlainText> <Preprocessor> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FF6E00</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </Preprocessor> <ReservedWord> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FF7900</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </ReservedWord> <RightMargin> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00F0F0F0</BackgroundColorNew> </RightMargin> <Scripts> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>True</DefaultBackground> <ForegroundColorNew>clPurple</ForegroundColorNew> <BackgroundColorNew>clWhite</BackgroundColorNew> </Scripts> <SearchMatch> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00FF4233</BackgroundColorNew> </SearchMatch> <String> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$001515A3</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </String> <Symbol> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </Symbol> <SyncEditBackground> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>True</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>clBlack</ForegroundColorNew> <BackgroundColorNew>$00FAFFE6</BackgroundColorNew> </SyncEditBackground> <SyncEditHighlight> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>clBlue</ForegroundColorNew> <BackgroundColorNew>clWhite</BackgroundColorNew> </SyncEditHighlight> <Tags> <Bold>True</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>True</DefaultBackground> <ForegroundColorNew>clNavy</ForegroundColorNew> <BackgroundColorNew>clWhite</BackgroundColorNew> </Tags> <Whitespace> <Bold>False</Bold> <Italic>False</Italic> <Underline>False</Underline> <DefaultForeground>False</DefaultForeground> <DefaultBackground>False</DefaultBackground> <ForegroundColorNew>$00FFFFFF</ForegroundColorNew> <BackgroundColorNew>$00020203</BackgroundColorNew> </Whitespace> </DelphiIDETheme>
{ "pile_set_name": "Github" }
<snippet> <content><![CDATA[removeAllJoints(${1:destroy})]]></content> <tabTrigger>removeAllJoints(destroy)</tabTrigger> <scope>source.lua</scope> <description>PhysicsWorld</description> </snippet>
{ "pile_set_name": "Github" }
import { route, baseConfig, Global } from './config'; import { builtIn } from '../vueRouter/base'; import { err, log, warn } from './warn'; /** * 当前是不是H5运行环境 */ export const isH5 = function () { return typeof window !== 'undefined' && typeof document !== 'undefined'; }; /** * 判断当前变量是否为Object * @param {Object} strObj */ export const isObject = function (strObj) { return strObj.toString() === '[object Object]' && strObj.constructor === Object; }; /** * 获取当前运行平台 * @param {Boolean} applets 默认false true时所有小程序平台统一返回 APPLETS */ export const appPlatform = function (applets = false) { let platform = ''; // #ifdef APP-PLUS-NVUE platform = 'APPNVUE'; // #endif // #ifdef APP-PLUS platform = 'APP'; // #endif // #ifdef H5 platform = 'H5'; // #endif // #ifdef MP-ALIPAY platform = 'ALIPAY'; // #endif // #ifdef MP-BAIDU platform = 'BAIDU'; // #endif // #ifdef MP-QQ platform = 'QQ'; // #endif // #ifdef MP-WEIXIN platform = 'WEIXIN'; // #endif // #ifdef MP-TOUTIAO platform = 'TOUTIAO'; // #endif if (applets) { // #ifdef MP platform = 'APPLETS'; // #endif } return platform; }; /** * 定义一个空方法 如果最后一个参数为true则打印所有参数 * @param {...any} args */ export const noop = function (...args) { if (args[args.length - 1] === true) { log(args); } }; /** * 格式化基础配置信息 通过new Router传递过来的参数 */ export const formatConfig = function (userConfig) { if (!userConfig.routes || userConfig.routes.constructor !== Array) { return err(`路由参数 'routes' 必须传递 \r\n\r\n${JSON.stringify(userConfig)}`); } if (userConfig.h5 != null && userConfig.h5.constructor !== Object) { return err(`h5参数传递错误,应该是一个 'Object' 类型 示例:\r\n\r\n${JSON.stringify(baseConfig.h5)}`); } const config = Object.create(null); const baseConfigKeys = Object.keys(baseConfig); for (let i = 0; i < baseConfigKeys.length; i += 1) { const key = baseConfigKeys[i]; if (userConfig[key] != null) { if (userConfig[key].constructor === Object) { config[key] = { ...baseConfig[key], ...userConfig[key], }; } else if (key == 'routes') { // 需要加入已知的白名单 config[key] = [...baseConfig[key], ...userConfig[key], ...builtIn]; } else { config[key] = userConfig[key]; } } else { config[key] = baseConfig[key]; } } return config; }; export const filter = function (str) { str += ''; str = str.replace(/%/g, '%25'); str = str.replace(/\+/g, '%2B'); str = str.replace(/ /g, '%20'); str = str.replace(/\//g, '%2F'); str = str.replace(/\?/g, '%3F'); str = str.replace(/&/g, '%26'); str = str.replace(/=/g, '%3D'); str = str.replace(/#/g, '%23'); return str; }; /** * 使用encodeURI:true的情况 需要进行编码后再传递,解码等等 可以传递深度对象并会在路径后面加入一个query= * * @param {String} routerName //路径名称 * @param {JSON} query //需要格式化参数 * @param {Boolean} Encode //是获取还是编码后传递 */ export const parseQueryN = function (routerName, query, Encode) { if (Encode) { return { url: routerName, query: JSON.parse(decodeURIComponent(query.replace(/^query=/, ''))), }; } return { url: routerName, query: `query=${encodeURIComponent(JSON.stringify(query))}`, }; }; /** * 使用encodeURI:false的情况 直接格式化为普通的queryURl参数形式传递即可 扁平深度对象 * * @param {String} routerName //路径名称 * @param {JSON} query //需要格式化参数 * @param {Boolean} Encode //是获取还是编码后传递 */ export const parseQueryD = function (routerName, query, Encode) { if (Encode) { const obj = {}; const reg = /([^=&\s]+)[=\s]*([^&\s]*)/g; while (reg.exec(query)) { obj[RegExp.$1] = RegExp.$2; } return { url: routerName, query: obj, }; } const encodeArr = []; const queryKeys = Object.keys(query); for (let i = 0; i < queryKeys.length; i += 1) { const attr = queryKeys[i]; let encodeStr = ''; if (query[attr].constructor == Object) { encodeStr = parseQueryD(routerName, query[attr], Encode).query; encodeArr.push(encodeStr); } else { encodeStr = filter(query[attr]); encodeArr.push(`${attr}=${encodeStr}`); } } return { url: routerName, query: encodeArr.join('&'), }; }; /** * @param {String} routerName //路径名称 * @param {JSON} query //需要格式化参数 * @param {Boolean} Encode //是获取还是编码后传递 */ export const parseQuery = function (routerName, query, Encode = false) { if (Global.Router.CONFIG.encodeURI) { return parseQueryN(routerName, query, Encode); } return parseQueryD(routerName, query, Encode); }; export const exactRule = function (cloneRule, routes, ruleKey, getRule = false) { const params = {}; let i = 0; // eslint-disable-next-line while (true) { const item = routes[i]; if (item == null) { if (!getRule) { err(`路由表中未查找到 '${ruleKey}' 为 '${cloneRule[ruleKey]}'`); } return { path: '', name: '', }; } if (item[ruleKey] != null && item[ruleKey] === cloneRule[ruleKey]) { if (!getRule) { params.url = item.path; params.rule = item; if (isH5()) { // 如果是h5 则使用优先使用自定义路径名称 params.url = item.aliasPath || item.path; } return params; } return item; } i += 1; } }; export const resolveRule = function (router, rule, query = {}, ruleKey = 'path') { const ruleInfo = route( exactRule({ ...rule, }, router.CONFIG.routes, ruleKey, router), ); return { ...ruleInfo, query, }; }; /** * 把一些不必要的参数进行格式化掉,完成url的美观 * @param {String} URLQuery URL中传递的参数 */ export const formatURLQuery = function (URLQuery) { switch (URLQuery.trim()) { case 'query=%7B%7D': case '%7B%7D': case '?query=%7B%7D': case '?': case '?[object Object]': case '?query={}': URLQuery = ''; break; default: warn('url已经很完美啦,不需要格式化!'); break; } return URLQuery; }; /** * 拷贝对象 * @param {Object} object */ export const copyObject = function (object) { return JSON.parse(JSON.stringify(object)); };
{ "pile_set_name": "Github" }
#ifndef CRUCIBLE_TESTS_H #define CRUCIBLE_TESTS_H #undef NDEBUG #include <iostream> #define RUN_A_TEST(test) do { \ std::cerr << "Testing " << #test << "..." << std::flush; \ do { test ; } while (0); \ std::cerr << "OK" << std::endl; \ } while (0) #endif // CRUCIBLE_TESTS_H
{ "pile_set_name": "Github" }
// mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. // +build amd64,dragonfly // Code generated by cmd/cgo -godefs; DO NOT EDIT. // cgo -godefs -- -m64 _const.go package unix import "syscall" const ( AF_APPLETALK = 0x10 AF_ATM = 0x1e AF_BLUETOOTH = 0x21 AF_CCITT = 0xa AF_CHAOS = 0x5 AF_CNT = 0x15 AF_COIP = 0x14 AF_DATAKIT = 0x9 AF_DECnet = 0xc AF_DLI = 0xd AF_E164 = 0x1a AF_ECMA = 0x8 AF_HYLINK = 0xf AF_IEEE80211 = 0x23 AF_IMPLINK = 0x3 AF_INET = 0x2 AF_INET6 = 0x1c AF_IPX = 0x17 AF_ISDN = 0x1a AF_ISO = 0x7 AF_LAT = 0xe AF_LINK = 0x12 AF_LOCAL = 0x1 AF_MAX = 0x24 AF_MPLS = 0x22 AF_NATM = 0x1d AF_NETBIOS = 0x6 AF_NETGRAPH = 0x20 AF_OSI = 0x7 AF_PUP = 0x4 AF_ROUTE = 0x11 AF_SIP = 0x18 AF_SNA = 0xb AF_UNIX = 0x1 AF_UNSPEC = 0x0 ALTWERASE = 0x200 B0 = 0x0 B110 = 0x6e B115200 = 0x1c200 B1200 = 0x4b0 B134 = 0x86 B14400 = 0x3840 B150 = 0x96 B1800 = 0x708 B19200 = 0x4b00 B200 = 0xc8 B230400 = 0x38400 B2400 = 0x960 B28800 = 0x7080 B300 = 0x12c B38400 = 0x9600 B4800 = 0x12c0 B50 = 0x32 B57600 = 0xe100 B600 = 0x258 B7200 = 0x1c20 B75 = 0x4b B76800 = 0x12c00 B9600 = 0x2580 BIOCFLUSH = 0x20004268 BIOCGBLEN = 0x40044266 BIOCGDLT = 0x4004426a BIOCGDLTLIST = 0xc0104279 BIOCGETIF = 0x4020426b BIOCGHDRCMPLT = 0x40044274 BIOCGRSIG = 0x40044272 BIOCGRTIMEOUT = 0x4010426e BIOCGSEESENT = 0x40044276 BIOCGSTATS = 0x4008426f BIOCIMMEDIATE = 0x80044270 BIOCLOCK = 0x2000427a BIOCPROMISC = 0x20004269 BIOCSBLEN = 0xc0044266 BIOCSDLT = 0x80044278 BIOCSETF = 0x80104267 BIOCSETIF = 0x8020426c BIOCSETWF = 0x8010427b BIOCSHDRCMPLT = 0x80044275 BIOCSRSIG = 0x80044273 BIOCSRTIMEOUT = 0x8010426d BIOCSSEESENT = 0x80044277 BIOCVERSION = 0x40044271 BPF_A = 0x10 BPF_ABS = 0x20 BPF_ADD = 0x0 BPF_ALIGNMENT = 0x8 BPF_ALU = 0x4 BPF_AND = 0x50 BPF_B = 0x10 BPF_DEFAULTBUFSIZE = 0x1000 BPF_DIV = 0x30 BPF_H = 0x8 BPF_IMM = 0x0 BPF_IND = 0x40 BPF_JA = 0x0 BPF_JEQ = 0x10 BPF_JGE = 0x30 BPF_JGT = 0x20 BPF_JMP = 0x5 BPF_JSET = 0x40 BPF_K = 0x0 BPF_LD = 0x0 BPF_LDX = 0x1 BPF_LEN = 0x80 BPF_LSH = 0x60 BPF_MAJOR_VERSION = 0x1 BPF_MAXBUFSIZE = 0x80000 BPF_MAXINSNS = 0x200 BPF_MAX_CLONES = 0x80 BPF_MEM = 0x60 BPF_MEMWORDS = 0x10 BPF_MINBUFSIZE = 0x20 BPF_MINOR_VERSION = 0x1 BPF_MISC = 0x7 BPF_MSH = 0xa0 BPF_MUL = 0x20 BPF_NEG = 0x80 BPF_OR = 0x40 BPF_RELEASE = 0x30bb6 BPF_RET = 0x6 BPF_RSH = 0x70 BPF_ST = 0x2 BPF_STX = 0x3 BPF_SUB = 0x10 BPF_TAX = 0x0 BPF_TXA = 0x80 BPF_W = 0x0 BPF_X = 0x8 BRKINT = 0x2 CFLUSH = 0xf CLOCAL = 0x8000 CLOCK_MONOTONIC = 0x4 CLOCK_MONOTONIC_FAST = 0xc CLOCK_MONOTONIC_PRECISE = 0xb CLOCK_PROCESS_CPUTIME_ID = 0xf CLOCK_PROF = 0x2 CLOCK_REALTIME = 0x0 CLOCK_REALTIME_FAST = 0xa CLOCK_REALTIME_PRECISE = 0x9 CLOCK_SECOND = 0xd CLOCK_THREAD_CPUTIME_ID = 0xe CLOCK_UPTIME = 0x5 CLOCK_UPTIME_FAST = 0x8 CLOCK_UPTIME_PRECISE = 0x7 CLOCK_VIRTUAL = 0x1 CREAD = 0x800 CRTSCTS = 0x30000 CS5 = 0x0 CS6 = 0x100 CS7 = 0x200 CS8 = 0x300 CSIZE = 0x300 CSTART = 0x11 CSTATUS = 0x14 CSTOP = 0x13 CSTOPB = 0x400 CSUSP = 0x1a CTL_HW = 0x6 CTL_KERN = 0x1 CTL_MAXNAME = 0xc CTL_NET = 0x4 DLT_A429 = 0xb8 DLT_A653_ICM = 0xb9 DLT_AIRONET_HEADER = 0x78 DLT_APPLE_IP_OVER_IEEE1394 = 0x8a DLT_ARCNET = 0x7 DLT_ARCNET_LINUX = 0x81 DLT_ATM_CLIP = 0x13 DLT_ATM_RFC1483 = 0xb DLT_AURORA = 0x7e DLT_AX25 = 0x3 DLT_AX25_KISS = 0xca DLT_BACNET_MS_TP = 0xa5 DLT_BLUETOOTH_HCI_H4 = 0xbb DLT_BLUETOOTH_HCI_H4_WITH_PHDR = 0xc9 DLT_CAN20B = 0xbe DLT_CHAOS = 0x5 DLT_CHDLC = 0x68 DLT_CISCO_IOS = 0x76 DLT_C_HDLC = 0x68 DLT_C_HDLC_WITH_DIR = 0xcd DLT_DOCSIS = 0x8f DLT_ECONET = 0x73 DLT_EN10MB = 0x1 DLT_EN3MB = 0x2 DLT_ENC = 0x6d DLT_ERF = 0xc5 DLT_ERF_ETH = 0xaf DLT_ERF_POS = 0xb0 DLT_FDDI = 0xa DLT_FLEXRAY = 0xd2 DLT_FRELAY = 0x6b DLT_FRELAY_WITH_DIR = 0xce DLT_GCOM_SERIAL = 0xad DLT_GCOM_T1E1 = 0xac DLT_GPF_F = 0xab DLT_GPF_T = 0xaa DLT_GPRS_LLC = 0xa9 DLT_HHDLC = 0x79 DLT_IBM_SN = 0x92 DLT_IBM_SP = 0x91 DLT_IEEE802 = 0x6 DLT_IEEE802_11 = 0x69 DLT_IEEE802_11_RADIO = 0x7f DLT_IEEE802_11_RADIO_AVS = 0xa3 DLT_IEEE802_15_4 = 0xc3 DLT_IEEE802_15_4_LINUX = 0xbf DLT_IEEE802_15_4_NONASK_PHY = 0xd7 DLT_IEEE802_16_MAC_CPS = 0xbc DLT_IEEE802_16_MAC_CPS_RADIO = 0xc1 DLT_IPFILTER = 0x74 DLT_IPMB = 0xc7 DLT_IPMB_LINUX = 0xd1 DLT_IP_OVER_FC = 0x7a DLT_JUNIPER_ATM1 = 0x89 DLT_JUNIPER_ATM2 = 0x87 DLT_JUNIPER_CHDLC = 0xb5 DLT_JUNIPER_ES = 0x84 DLT_JUNIPER_ETHER = 0xb2 DLT_JUNIPER_FRELAY = 0xb4 DLT_JUNIPER_GGSN = 0x85 DLT_JUNIPER_ISM = 0xc2 DLT_JUNIPER_MFR = 0x86 DLT_JUNIPER_MLFR = 0x83 DLT_JUNIPER_MLPPP = 0x82 DLT_JUNIPER_MONITOR = 0xa4 DLT_JUNIPER_PIC_PEER = 0xae DLT_JUNIPER_PPP = 0xb3 DLT_JUNIPER_PPPOE = 0xa7 DLT_JUNIPER_PPPOE_ATM = 0xa8 DLT_JUNIPER_SERVICES = 0x88 DLT_JUNIPER_ST = 0xc8 DLT_JUNIPER_VP = 0xb7 DLT_LAPB_WITH_DIR = 0xcf DLT_LAPD = 0xcb DLT_LIN = 0xd4 DLT_LINUX_IRDA = 0x90 DLT_LINUX_LAPD = 0xb1 DLT_LINUX_SLL = 0x71 DLT_LOOP = 0x6c DLT_LTALK = 0x72 DLT_MFR = 0xb6 DLT_MOST = 0xd3 DLT_MTP2 = 0x8c DLT_MTP2_WITH_PHDR = 0x8b DLT_MTP3 = 0x8d DLT_NULL = 0x0 DLT_PCI_EXP = 0x7d DLT_PFLOG = 0x75 DLT_PFSYNC = 0x12 DLT_PPI = 0xc0 DLT_PPP = 0x9 DLT_PPP_BSDOS = 0x10 DLT_PPP_ETHER = 0x33 DLT_PPP_PPPD = 0xa6 DLT_PPP_SERIAL = 0x32 DLT_PPP_WITH_DIR = 0xcc DLT_PRISM_HEADER = 0x77 DLT_PRONET = 0x4 DLT_RAIF1 = 0xc6 DLT_RAW = 0xc DLT_REDBACK_SMARTEDGE = 0x20 DLT_RIO = 0x7c DLT_SCCP = 0x8e DLT_SITA = 0xc4 DLT_SLIP = 0x8 DLT_SLIP_BSDOS = 0xf DLT_SUNATM = 0x7b DLT_SYMANTEC_FIREWALL = 0x63 DLT_TZSP = 0x80 DLT_USB = 0xba DLT_USB_LINUX = 0xbd DLT_X2E_SERIAL = 0xd5 DLT_X2E_XORAYA = 0xd6 DT_BLK = 0x6 DT_CHR = 0x2 DT_DBF = 0xf DT_DIR = 0x4 DT_FIFO = 0x1 DT_LNK = 0xa DT_REG = 0x8 DT_SOCK = 0xc DT_UNKNOWN = 0x0 DT_WHT = 0xe ECHO = 0x8 ECHOCTL = 0x40 ECHOE = 0x2 ECHOK = 0x4 ECHOKE = 0x1 ECHONL = 0x10 ECHOPRT = 0x20 EVFILT_AIO = -0x3 EVFILT_EXCEPT = -0x8 EVFILT_FS = -0xa EVFILT_MARKER = 0xf EVFILT_PROC = -0x5 EVFILT_READ = -0x1 EVFILT_SIGNAL = -0x6 EVFILT_SYSCOUNT = 0xa EVFILT_TIMER = -0x7 EVFILT_USER = -0x9 EVFILT_VNODE = -0x4 EVFILT_WRITE = -0x2 EV_ADD = 0x1 EV_CLEAR = 0x20 EV_DELETE = 0x2 EV_DISABLE = 0x8 EV_DISPATCH = 0x80 EV_ENABLE = 0x4 EV_EOF = 0x8000 EV_ERROR = 0x4000 EV_FLAG1 = 0x2000 EV_NODATA = 0x1000 EV_ONESHOT = 0x10 EV_RECEIPT = 0x40 EV_SYSFLAGS = 0xf000 EXTA = 0x4b00 EXTB = 0x9600 EXTEXIT_LWP = 0x10000 EXTEXIT_PROC = 0x0 EXTEXIT_SETINT = 0x1 EXTEXIT_SIMPLE = 0x0 EXTPROC = 0x800 FD_CLOEXEC = 0x1 FD_SETSIZE = 0x400 FLUSHO = 0x800000 F_DUP2FD = 0xa F_DUP2FD_CLOEXEC = 0x12 F_DUPFD = 0x0 F_DUPFD_CLOEXEC = 0x11 F_GETFD = 0x1 F_GETFL = 0x3 F_GETLK = 0x7 F_GETOWN = 0x5 F_OK = 0x0 F_RDLCK = 0x1 F_SETFD = 0x2 F_SETFL = 0x4 F_SETLK = 0x8 F_SETLKW = 0x9 F_SETOWN = 0x6 F_UNLCK = 0x2 F_WRLCK = 0x3 HUPCL = 0x4000 HW_MACHINE = 0x1 ICANON = 0x100 ICMP6_FILTER = 0x12 ICRNL = 0x100 IEXTEN = 0x400 IFAN_ARRIVAL = 0x0 IFAN_DEPARTURE = 0x1 IFF_ALLMULTI = 0x200 IFF_ALTPHYS = 0x4000 IFF_BROADCAST = 0x2 IFF_CANTCHANGE = 0x118e72 IFF_DEBUG = 0x4 IFF_LINK0 = 0x1000 IFF_LINK1 = 0x2000 IFF_LINK2 = 0x4000 IFF_LOOPBACK = 0x8 IFF_MONITOR = 0x40000 IFF_MULTICAST = 0x8000 IFF_NOARP = 0x80 IFF_NPOLLING = 0x100000 IFF_OACTIVE = 0x400 IFF_OACTIVE_COMPAT = 0x400 IFF_POINTOPOINT = 0x10 IFF_POLLING = 0x10000 IFF_POLLING_COMPAT = 0x10000 IFF_PPROMISC = 0x20000 IFF_PROMISC = 0x100 IFF_RUNNING = 0x40 IFF_SIMPLEX = 0x800 IFF_SMART = 0x20 IFF_STATICARP = 0x80000 IFF_UP = 0x1 IFNAMSIZ = 0x10 IFT_1822 = 0x2 IFT_A12MPPSWITCH = 0x82 IFT_AAL2 = 0xbb IFT_AAL5 = 0x31 IFT_ADSL = 0x5e IFT_AFLANE8023 = 0x3b IFT_AFLANE8025 = 0x3c IFT_ARAP = 0x58 IFT_ARCNET = 0x23 IFT_ARCNETPLUS = 0x24 IFT_ASYNC = 0x54 IFT_ATM = 0x25 IFT_ATMDXI = 0x69 IFT_ATMFUNI = 0x6a IFT_ATMIMA = 0x6b IFT_ATMLOGICAL = 0x50 IFT_ATMRADIO = 0xbd IFT_ATMSUBINTERFACE = 0x86 IFT_ATMVCIENDPT = 0xc2 IFT_ATMVIRTUAL = 0x95 IFT_BGPPOLICYACCOUNTING = 0xa2 IFT_BRIDGE = 0xd1 IFT_BSC = 0x53 IFT_CARP = 0xf8 IFT_CCTEMUL = 0x3d IFT_CEPT = 0x13 IFT_CES = 0x85 IFT_CHANNEL = 0x46 IFT_CNR = 0x55 IFT_COFFEE = 0x84 IFT_COMPOSITELINK = 0x9b IFT_DCN = 0x8d IFT_DIGITALPOWERLINE = 0x8a IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba IFT_DLSW = 0x4a IFT_DOCSCABLEDOWNSTREAM = 0x80 IFT_DOCSCABLEMACLAYER = 0x7f IFT_DOCSCABLEUPSTREAM = 0x81 IFT_DS0 = 0x51 IFT_DS0BUNDLE = 0x52 IFT_DS1FDL = 0xaa IFT_DS3 = 0x1e IFT_DTM = 0x8c IFT_DVBASILN = 0xac IFT_DVBASIOUT = 0xad IFT_DVBRCCDOWNSTREAM = 0x93 IFT_DVBRCCMACLAYER = 0x92 IFT_DVBRCCUPSTREAM = 0x94 IFT_ENC = 0xf4 IFT_EON = 0x19 IFT_EPLRS = 0x57 IFT_ESCON = 0x49 IFT_ETHER = 0x6 IFT_FAITH = 0xf2 IFT_FAST = 0x7d IFT_FASTETHER = 0x3e IFT_FASTETHERFX = 0x45 IFT_FDDI = 0xf IFT_FIBRECHANNEL = 0x38 IFT_FRAMERELAYINTERCONNECT = 0x3a IFT_FRAMERELAYMPI = 0x5c IFT_FRDLCIENDPT = 0xc1 IFT_FRELAY = 0x20 IFT_FRELAYDCE = 0x2c IFT_FRF16MFRBUNDLE = 0xa3 IFT_FRFORWARD = 0x9e IFT_G703AT2MB = 0x43 IFT_G703AT64K = 0x42 IFT_GIF = 0xf0 IFT_GIGABITETHERNET = 0x75 IFT_GR303IDT = 0xb2 IFT_GR303RDT = 0xb1 IFT_H323GATEKEEPER = 0xa4 IFT_H323PROXY = 0xa5 IFT_HDH1822 = 0x3 IFT_HDLC = 0x76 IFT_HDSL2 = 0xa8 IFT_HIPERLAN2 = 0xb7 IFT_HIPPI = 0x2f IFT_HIPPIINTERFACE = 0x39 IFT_HOSTPAD = 0x5a IFT_HSSI = 0x2e IFT_HY = 0xe IFT_IBM370PARCHAN = 0x48 IFT_IDSL = 0x9a IFT_IEEE1394 = 0x90 IFT_IEEE80211 = 0x47 IFT_IEEE80212 = 0x37 IFT_IEEE8023ADLAG = 0xa1 IFT_IFGSN = 0x91 IFT_IMT = 0xbe IFT_INTERLEAVE = 0x7c IFT_IP = 0x7e IFT_IPFORWARD = 0x8e IFT_IPOVERATM = 0x72 IFT_IPOVERCDLC = 0x6d IFT_IPOVERCLAW = 0x6e IFT_IPSWITCH = 0x4e IFT_ISDN = 0x3f IFT_ISDNBASIC = 0x14 IFT_ISDNPRIMARY = 0x15 IFT_ISDNS = 0x4b IFT_ISDNU = 0x4c IFT_ISO88022LLC = 0x29 IFT_ISO88023 = 0x7 IFT_ISO88024 = 0x8 IFT_ISO88025 = 0x9 IFT_ISO88025CRFPINT = 0x62 IFT_ISO88025DTR = 0x56 IFT_ISO88025FIBER = 0x73 IFT_ISO88026 = 0xa IFT_ISUP = 0xb3 IFT_L2VLAN = 0x87 IFT_L3IPVLAN = 0x88 IFT_L3IPXVLAN = 0x89 IFT_LAPB = 0x10 IFT_LAPD = 0x4d IFT_LAPF = 0x77 IFT_LOCALTALK = 0x2a IFT_LOOP = 0x18 IFT_MEDIAMAILOVERIP = 0x8b IFT_MFSIGLINK = 0xa7 IFT_MIOX25 = 0x26 IFT_MODEM = 0x30 IFT_MPC = 0x71 IFT_MPLS = 0xa6 IFT_MPLSTUNNEL = 0x96 IFT_MSDSL = 0x8f IFT_MVL = 0xbf IFT_MYRINET = 0x63 IFT_NFAS = 0xaf IFT_NSIP = 0x1b IFT_OPTICALCHANNEL = 0xc3 IFT_OPTICALTRANSPORT = 0xc4 IFT_OTHER = 0x1 IFT_P10 = 0xc IFT_P80 = 0xd IFT_PARA = 0x22 IFT_PFLOG = 0xf5 IFT_PFSYNC = 0xf6 IFT_PLC = 0xae IFT_POS = 0xab IFT_PPP = 0x17 IFT_PPPMULTILINKBUNDLE = 0x6c IFT_PROPBWAP2MP = 0xb8 IFT_PROPCNLS = 0x59 IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5 IFT_PROPDOCSWIRELESSMACLAYER = 0xb4 IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6 IFT_PROPMUX = 0x36 IFT_PROPVIRTUAL = 0x35 IFT_PROPWIRELESSP2P = 0x9d IFT_PTPSERIAL = 0x16 IFT_PVC = 0xf1 IFT_QLLC = 0x44 IFT_RADIOMAC = 0xbc IFT_RADSL = 0x5f IFT_REACHDSL = 0xc0 IFT_RFC1483 = 0x9f IFT_RS232 = 0x21 IFT_RSRB = 0x4f IFT_SDLC = 0x11 IFT_SDSL = 0x60 IFT_SHDSL = 0xa9 IFT_SIP = 0x1f IFT_SLIP = 0x1c IFT_SMDSDXI = 0x2b IFT_SMDSICIP = 0x34 IFT_SONET = 0x27 IFT_SONETOVERHEADCHANNEL = 0xb9 IFT_SONETPATH = 0x32 IFT_SONETVT = 0x33 IFT_SRP = 0x97 IFT_SS7SIGLINK = 0x9c IFT_STACKTOSTACK = 0x6f IFT_STARLAN = 0xb IFT_STF = 0xf3 IFT_T1 = 0x12 IFT_TDLC = 0x74 IFT_TERMPAD = 0x5b IFT_TR008 = 0xb0 IFT_TRANSPHDLC = 0x7b IFT_TUNNEL = 0x83 IFT_ULTRA = 0x1d IFT_USB = 0xa0 IFT_V11 = 0x40 IFT_V35 = 0x2d IFT_V36 = 0x41 IFT_V37 = 0x78 IFT_VDSL = 0x61 IFT_VIRTUALIPADDRESS = 0x70 IFT_VOICEEM = 0x64 IFT_VOICEENCAP = 0x67 IFT_VOICEFXO = 0x65 IFT_VOICEFXS = 0x66 IFT_VOICEOVERATM = 0x98 IFT_VOICEOVERFRAMERELAY = 0x99 IFT_VOICEOVERIP = 0x68 IFT_X213 = 0x5d IFT_X25 = 0x5 IFT_X25DDN = 0x4 IFT_X25HUNTGROUP = 0x7a IFT_X25MLP = 0x79 IFT_X25PLE = 0x28 IFT_XETHER = 0x1a IGNBRK = 0x1 IGNCR = 0x80 IGNPAR = 0x4 IMAXBEL = 0x2000 INLCR = 0x40 INPCK = 0x10 IN_CLASSA_HOST = 0xffffff IN_CLASSA_MAX = 0x80 IN_CLASSA_NET = 0xff000000 IN_CLASSA_NSHIFT = 0x18 IN_CLASSB_HOST = 0xffff IN_CLASSB_MAX = 0x10000 IN_CLASSB_NET = 0xffff0000 IN_CLASSB_NSHIFT = 0x10 IN_CLASSC_HOST = 0xff IN_CLASSC_NET = 0xffffff00 IN_CLASSC_NSHIFT = 0x8 IN_CLASSD_HOST = 0xfffffff IN_CLASSD_NET = 0xf0000000 IN_CLASSD_NSHIFT = 0x1c IN_LOOPBACKNET = 0x7f IPPROTO_3PC = 0x22 IPPROTO_ADFS = 0x44 IPPROTO_AH = 0x33 IPPROTO_AHIP = 0x3d IPPROTO_APES = 0x63 IPPROTO_ARGUS = 0xd IPPROTO_AX25 = 0x5d IPPROTO_BHA = 0x31 IPPROTO_BLT = 0x1e IPPROTO_BRSATMON = 0x4c IPPROTO_CARP = 0x70 IPPROTO_CFTP = 0x3e IPPROTO_CHAOS = 0x10 IPPROTO_CMTP = 0x26 IPPROTO_CPHB = 0x49 IPPROTO_CPNX = 0x48 IPPROTO_DDP = 0x25 IPPROTO_DGP = 0x56 IPPROTO_DIVERT = 0xfe IPPROTO_DONE = 0x101 IPPROTO_DSTOPTS = 0x3c IPPROTO_EGP = 0x8 IPPROTO_EMCON = 0xe IPPROTO_ENCAP = 0x62 IPPROTO_EON = 0x50 IPPROTO_ESP = 0x32 IPPROTO_ETHERIP = 0x61 IPPROTO_FRAGMENT = 0x2c IPPROTO_GGP = 0x3 IPPROTO_GMTP = 0x64 IPPROTO_GRE = 0x2f IPPROTO_HELLO = 0x3f IPPROTO_HMP = 0x14 IPPROTO_HOPOPTS = 0x0 IPPROTO_ICMP = 0x1 IPPROTO_ICMPV6 = 0x3a IPPROTO_IDP = 0x16 IPPROTO_IDPR = 0x23 IPPROTO_IDRP = 0x2d IPPROTO_IGMP = 0x2 IPPROTO_IGP = 0x55 IPPROTO_IGRP = 0x58 IPPROTO_IL = 0x28 IPPROTO_INLSP = 0x34 IPPROTO_INP = 0x20 IPPROTO_IP = 0x0 IPPROTO_IPCOMP = 0x6c IPPROTO_IPCV = 0x47 IPPROTO_IPEIP = 0x5e IPPROTO_IPIP = 0x4 IPPROTO_IPPC = 0x43 IPPROTO_IPV4 = 0x4 IPPROTO_IPV6 = 0x29 IPPROTO_IRTP = 0x1c IPPROTO_KRYPTOLAN = 0x41 IPPROTO_LARP = 0x5b IPPROTO_LEAF1 = 0x19 IPPROTO_LEAF2 = 0x1a IPPROTO_MAX = 0x100 IPPROTO_MAXID = 0x34 IPPROTO_MEAS = 0x13 IPPROTO_MHRP = 0x30 IPPROTO_MICP = 0x5f IPPROTO_MOBILE = 0x37 IPPROTO_MTP = 0x5c IPPROTO_MUX = 0x12 IPPROTO_ND = 0x4d IPPROTO_NHRP = 0x36 IPPROTO_NONE = 0x3b IPPROTO_NSP = 0x1f IPPROTO_NVPII = 0xb IPPROTO_OSPFIGP = 0x59 IPPROTO_PFSYNC = 0xf0 IPPROTO_PGM = 0x71 IPPROTO_PIGP = 0x9 IPPROTO_PIM = 0x67 IPPROTO_PRM = 0x15 IPPROTO_PUP = 0xc IPPROTO_PVP = 0x4b IPPROTO_RAW = 0xff IPPROTO_RCCMON = 0xa IPPROTO_RDP = 0x1b IPPROTO_ROUTING = 0x2b IPPROTO_RSVP = 0x2e IPPROTO_RVD = 0x42 IPPROTO_SATEXPAK = 0x40 IPPROTO_SATMON = 0x45 IPPROTO_SCCSP = 0x60 IPPROTO_SDRP = 0x2a IPPROTO_SEP = 0x21 IPPROTO_SKIP = 0x39 IPPROTO_SRPC = 0x5a IPPROTO_ST = 0x7 IPPROTO_SVMTP = 0x52 IPPROTO_SWIPE = 0x35 IPPROTO_TCF = 0x57 IPPROTO_TCP = 0x6 IPPROTO_TLSP = 0x38 IPPROTO_TP = 0x1d IPPROTO_TPXX = 0x27 IPPROTO_TRUNK1 = 0x17 IPPROTO_TRUNK2 = 0x18 IPPROTO_TTP = 0x54 IPPROTO_UDP = 0x11 IPPROTO_UNKNOWN = 0x102 IPPROTO_VINES = 0x53 IPPROTO_VISA = 0x46 IPPROTO_VMTP = 0x51 IPPROTO_WBEXPAK = 0x4f IPPROTO_WBMON = 0x4e IPPROTO_WSN = 0x4a IPPROTO_XNET = 0xf IPPROTO_XTP = 0x24 IPV6_AUTOFLOWLABEL = 0x3b IPV6_BINDV6ONLY = 0x1b IPV6_CHECKSUM = 0x1a IPV6_DEFAULT_MULTICAST_HOPS = 0x1 IPV6_DEFAULT_MULTICAST_LOOP = 0x1 IPV6_DEFHLIM = 0x40 IPV6_DONTFRAG = 0x3e IPV6_DSTOPTS = 0x32 IPV6_FAITH = 0x1d IPV6_FLOWINFO_MASK = 0xffffff0f IPV6_FLOWLABEL_MASK = 0xffff0f00 IPV6_FRAGTTL = 0x78 IPV6_FW_ADD = 0x1e IPV6_FW_DEL = 0x1f IPV6_FW_FLUSH = 0x20 IPV6_FW_GET = 0x22 IPV6_FW_ZERO = 0x21 IPV6_HLIMDEC = 0x1 IPV6_HOPLIMIT = 0x2f IPV6_HOPOPTS = 0x31 IPV6_IPSEC_POLICY = 0x1c IPV6_JOIN_GROUP = 0xc IPV6_LEAVE_GROUP = 0xd IPV6_MAXHLIM = 0xff IPV6_MAXPACKET = 0xffff IPV6_MINHLIM = 0x28 IPV6_MMTU = 0x500 IPV6_MSFILTER = 0x4a IPV6_MULTICAST_HOPS = 0xa IPV6_MULTICAST_IF = 0x9 IPV6_MULTICAST_LOOP = 0xb IPV6_NEXTHOP = 0x30 IPV6_PATHMTU = 0x2c IPV6_PKTINFO = 0x2e IPV6_PKTOPTIONS = 0x34 IPV6_PORTRANGE = 0xe IPV6_PORTRANGE_DEFAULT = 0x0 IPV6_PORTRANGE_HIGH = 0x1 IPV6_PORTRANGE_LOW = 0x2 IPV6_PREFER_TEMPADDR = 0x3f IPV6_RECVDSTOPTS = 0x28 IPV6_RECVHOPLIMIT = 0x25 IPV6_RECVHOPOPTS = 0x27 IPV6_RECVPATHMTU = 0x2b IPV6_RECVPKTINFO = 0x24 IPV6_RECVRTHDR = 0x26 IPV6_RECVTCLASS = 0x39 IPV6_RTHDR = 0x33 IPV6_RTHDRDSTOPTS = 0x23 IPV6_RTHDR_LOOSE = 0x0 IPV6_RTHDR_STRICT = 0x1 IPV6_RTHDR_TYPE_0 = 0x0 IPV6_SOCKOPT_RESERVED1 = 0x3 IPV6_TCLASS = 0x3d IPV6_UNICAST_HOPS = 0x4 IPV6_USE_MIN_MTU = 0x2a IPV6_V6ONLY = 0x1b IPV6_VERSION = 0x60 IPV6_VERSION_MASK = 0xf0 IP_ADD_MEMBERSHIP = 0xc IP_DEFAULT_MULTICAST_LOOP = 0x1 IP_DEFAULT_MULTICAST_TTL = 0x1 IP_DF = 0x4000 IP_DROP_MEMBERSHIP = 0xd IP_DUMMYNET_CONFIGURE = 0x3c IP_DUMMYNET_DEL = 0x3d IP_DUMMYNET_FLUSH = 0x3e IP_DUMMYNET_GET = 0x40 IP_FAITH = 0x16 IP_FW_ADD = 0x32 IP_FW_DEL = 0x33 IP_FW_FLUSH = 0x34 IP_FW_GET = 0x36 IP_FW_RESETLOG = 0x37 IP_FW_X = 0x31 IP_FW_ZERO = 0x35 IP_HDRINCL = 0x2 IP_IPSEC_POLICY = 0x15 IP_MAXPACKET = 0xffff IP_MAX_MEMBERSHIPS = 0x14 IP_MF = 0x2000 IP_MINTTL = 0x42 IP_MSS = 0x240 IP_MULTICAST_IF = 0x9 IP_MULTICAST_LOOP = 0xb IP_MULTICAST_TTL = 0xa IP_MULTICAST_VIF = 0xe IP_OFFMASK = 0x1fff IP_OPTIONS = 0x1 IP_PORTRANGE = 0x13 IP_PORTRANGE_DEFAULT = 0x0 IP_PORTRANGE_HIGH = 0x1 IP_PORTRANGE_LOW = 0x2 IP_RECVDSTADDR = 0x7 IP_RECVIF = 0x14 IP_RECVOPTS = 0x5 IP_RECVRETOPTS = 0x6 IP_RECVTTL = 0x41 IP_RETOPTS = 0x8 IP_RF = 0x8000 IP_RSVP_OFF = 0x10 IP_RSVP_ON = 0xf IP_RSVP_VIF_OFF = 0x12 IP_RSVP_VIF_ON = 0x11 IP_TOS = 0x3 IP_TTL = 0x4 ISIG = 0x80 ISTRIP = 0x20 IXANY = 0x800 IXOFF = 0x400 IXON = 0x200 KERN_HOSTNAME = 0xa KERN_OSRELEASE = 0x2 KERN_OSTYPE = 0x1 KERN_VERSION = 0x4 LOCK_EX = 0x2 LOCK_NB = 0x4 LOCK_SH = 0x1 LOCK_UN = 0x8 MADV_AUTOSYNC = 0x7 MADV_CONTROL_END = 0xb MADV_CONTROL_START = 0xa MADV_CORE = 0x9 MADV_DONTNEED = 0x4 MADV_FREE = 0x5 MADV_INVAL = 0xa MADV_NOCORE = 0x8 MADV_NORMAL = 0x0 MADV_NOSYNC = 0x6 MADV_RANDOM = 0x1 MADV_SEQUENTIAL = 0x2 MADV_SETMAP = 0xb MADV_WILLNEED = 0x3 MAP_ANON = 0x1000 MAP_ANONYMOUS = 0x1000 MAP_COPY = 0x2 MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_HASSEMAPHORE = 0x200 MAP_INHERIT = 0x80 MAP_NOCORE = 0x20000 MAP_NOEXTEND = 0x100 MAP_NORESERVE = 0x40 MAP_NOSYNC = 0x800 MAP_PRIVATE = 0x2 MAP_RENAME = 0x20 MAP_SHARED = 0x1 MAP_SIZEALIGN = 0x40000 MAP_STACK = 0x400 MAP_TRYFIXED = 0x10000 MAP_VPAGETABLE = 0x2000 MCL_CURRENT = 0x1 MCL_FUTURE = 0x2 MNT_ASYNC = 0x40 MNT_AUTOMOUNTED = 0x20 MNT_CMDFLAGS = 0xf0000 MNT_DEFEXPORTED = 0x200 MNT_DELEXPORT = 0x20000 MNT_EXKERB = 0x800 MNT_EXPORTANON = 0x400 MNT_EXPORTED = 0x100 MNT_EXPUBLIC = 0x20000000 MNT_EXRDONLY = 0x80 MNT_FORCE = 0x80000 MNT_IGNORE = 0x800000 MNT_LAZY = 0x4 MNT_LOCAL = 0x1000 MNT_NOATIME = 0x10000000 MNT_NOCLUSTERR = 0x40000000 MNT_NOCLUSTERW = 0x80000000 MNT_NODEV = 0x10 MNT_NOEXEC = 0x4 MNT_NOSUID = 0x8 MNT_NOSYMFOLLOW = 0x400000 MNT_NOWAIT = 0x2 MNT_QUOTA = 0x2000 MNT_RDONLY = 0x1 MNT_RELOAD = 0x40000 MNT_ROOTFS = 0x4000 MNT_SOFTDEP = 0x200000 MNT_SUIDDIR = 0x100000 MNT_SYNCHRONOUS = 0x2 MNT_TRIM = 0x1000000 MNT_UPDATE = 0x10000 MNT_USER = 0x8000 MNT_VISFLAGMASK = 0xf1f0ffff MNT_WAIT = 0x1 MSG_CMSG_CLOEXEC = 0x1000 MSG_CTRUNC = 0x20 MSG_DONTROUTE = 0x4 MSG_DONTWAIT = 0x80 MSG_EOF = 0x100 MSG_EOR = 0x8 MSG_FBLOCKING = 0x10000 MSG_FMASK = 0xffff0000 MSG_FNONBLOCKING = 0x20000 MSG_NOSIGNAL = 0x400 MSG_OOB = 0x1 MSG_PEEK = 0x2 MSG_SYNC = 0x800 MSG_TRUNC = 0x10 MSG_UNUSED09 = 0x200 MSG_WAITALL = 0x40 MS_ASYNC = 0x1 MS_INVALIDATE = 0x2 MS_SYNC = 0x0 NAME_MAX = 0xff NET_RT_DUMP = 0x1 NET_RT_FLAGS = 0x2 NET_RT_IFLIST = 0x3 NET_RT_MAXID = 0x4 NFDBITS = 0x40 NOFLSH = 0x80000000 NOKERNINFO = 0x2000000 NOTE_ATTRIB = 0x8 NOTE_CHILD = 0x4 NOTE_DELETE = 0x1 NOTE_EXEC = 0x20000000 NOTE_EXIT = 0x80000000 NOTE_EXTEND = 0x4 NOTE_FFAND = 0x40000000 NOTE_FFCOPY = 0xc0000000 NOTE_FFCTRLMASK = 0xc0000000 NOTE_FFLAGSMASK = 0xffffff NOTE_FFNOP = 0x0 NOTE_FFOR = 0x80000000 NOTE_FORK = 0x40000000 NOTE_LINK = 0x10 NOTE_LOWAT = 0x1 NOTE_OOB = 0x2 NOTE_PCTRLMASK = 0xf0000000 NOTE_PDATAMASK = 0xfffff NOTE_RENAME = 0x20 NOTE_REVOKE = 0x40 NOTE_TRACK = 0x1 NOTE_TRACKERR = 0x2 NOTE_TRIGGER = 0x1000000 NOTE_WRITE = 0x2 OCRNL = 0x10 ONLCR = 0x2 ONLRET = 0x40 ONOCR = 0x20 ONOEOT = 0x8 OPOST = 0x1 OXTABS = 0x4 O_ACCMODE = 0x3 O_APPEND = 0x8 O_ASYNC = 0x40 O_CLOEXEC = 0x20000 O_CREAT = 0x200 O_DIRECT = 0x10000 O_DIRECTORY = 0x8000000 O_EXCL = 0x800 O_EXLOCK = 0x20 O_FAPPEND = 0x100000 O_FASYNCWRITE = 0x800000 O_FBLOCKING = 0x40000 O_FMASK = 0xfc0000 O_FNONBLOCKING = 0x80000 O_FOFFSET = 0x200000 O_FSYNC = 0x80 O_FSYNCWRITE = 0x400000 O_NDELAY = 0x4 O_NOCTTY = 0x8000 O_NOFOLLOW = 0x100 O_NONBLOCK = 0x4 O_RDONLY = 0x0 O_RDWR = 0x2 O_SHLOCK = 0x10 O_SYNC = 0x80 O_TRUNC = 0x400 O_WRONLY = 0x1 PARENB = 0x1000 PARMRK = 0x8 PARODD = 0x2000 PENDIN = 0x20000000 PRIO_PGRP = 0x1 PRIO_PROCESS = 0x0 PRIO_USER = 0x2 PROT_EXEC = 0x4 PROT_NONE = 0x0 PROT_READ = 0x1 PROT_WRITE = 0x2 RLIMIT_AS = 0xa RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 RLIMIT_DATA = 0x2 RLIMIT_FSIZE = 0x1 RLIMIT_MEMLOCK = 0x6 RLIMIT_NOFILE = 0x8 RLIMIT_NPROC = 0x7 RLIMIT_RSS = 0x5 RLIMIT_STACK = 0x3 RLIM_INFINITY = 0x7fffffffffffffff RTAX_AUTHOR = 0x6 RTAX_BRD = 0x7 RTAX_DST = 0x0 RTAX_GATEWAY = 0x1 RTAX_GENMASK = 0x3 RTAX_IFA = 0x5 RTAX_IFP = 0x4 RTAX_MAX = 0xb RTAX_MPLS1 = 0x8 RTAX_MPLS2 = 0x9 RTAX_MPLS3 = 0xa RTAX_NETMASK = 0x2 RTA_AUTHOR = 0x40 RTA_BRD = 0x80 RTA_DST = 0x1 RTA_GATEWAY = 0x2 RTA_GENMASK = 0x8 RTA_IFA = 0x20 RTA_IFP = 0x10 RTA_MPLS1 = 0x100 RTA_MPLS2 = 0x200 RTA_MPLS3 = 0x400 RTA_NETMASK = 0x4 RTF_BLACKHOLE = 0x1000 RTF_BROADCAST = 0x400000 RTF_CLONING = 0x100 RTF_DONE = 0x40 RTF_DYNAMIC = 0x10 RTF_GATEWAY = 0x2 RTF_HOST = 0x4 RTF_LLINFO = 0x400 RTF_LOCAL = 0x200000 RTF_MODIFIED = 0x20 RTF_MPLSOPS = 0x1000000 RTF_MULTICAST = 0x800000 RTF_PINNED = 0x100000 RTF_PRCLONING = 0x10000 RTF_PROTO1 = 0x8000 RTF_PROTO2 = 0x4000 RTF_PROTO3 = 0x40000 RTF_REJECT = 0x8 RTF_STATIC = 0x800 RTF_UP = 0x1 RTF_WASCLONED = 0x20000 RTF_XRESOLVE = 0x200 RTM_ADD = 0x1 RTM_CHANGE = 0x3 RTM_DELADDR = 0xd RTM_DELETE = 0x2 RTM_DELMADDR = 0x10 RTM_GET = 0x4 RTM_IEEE80211 = 0x12 RTM_IFANNOUNCE = 0x11 RTM_IFINFO = 0xe RTM_LOCK = 0x8 RTM_LOSING = 0x5 RTM_MISS = 0x7 RTM_NEWADDR = 0xc RTM_NEWMADDR = 0xf RTM_OLDADD = 0x9 RTM_OLDDEL = 0xa RTM_REDIRECT = 0x6 RTM_RESOLVE = 0xb RTM_RTTUNIT = 0xf4240 RTM_VERSION = 0x6 RTV_EXPIRE = 0x4 RTV_HOPCOUNT = 0x2 RTV_IWCAPSEGS = 0x400 RTV_IWMAXSEGS = 0x200 RTV_MSL = 0x100 RTV_MTU = 0x1 RTV_RPIPE = 0x8 RTV_RTT = 0x40 RTV_RTTVAR = 0x80 RTV_SPIPE = 0x10 RTV_SSTHRESH = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 SCM_CREDS = 0x3 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x2 SHUT_RD = 0x0 SHUT_RDWR = 0x2 SHUT_WR = 0x1 SIOCADDMULTI = 0x80206931 SIOCADDRT = 0x8040720a SIOCAIFADDR = 0x8040691a SIOCALIFADDR = 0x8118691b SIOCATMARK = 0x40047307 SIOCDELMULTI = 0x80206932 SIOCDELRT = 0x8040720b SIOCDIFADDR = 0x80206919 SIOCDIFPHYADDR = 0x80206949 SIOCDLIFADDR = 0x8118691d SIOCGDRVSPEC = 0xc028697b SIOCGETSGCNT = 0xc0207210 SIOCGETVIFCNT = 0xc028720f SIOCGHIWAT = 0x40047301 SIOCGIFADDR = 0xc0206921 SIOCGIFBRDADDR = 0xc0206923 SIOCGIFCAP = 0xc020691f SIOCGIFCONF = 0xc0106924 SIOCGIFDATA = 0xc0206926 SIOCGIFDSTADDR = 0xc0206922 SIOCGIFFLAGS = 0xc0206911 SIOCGIFGENERIC = 0xc020693a SIOCGIFGMEMB = 0xc028698a SIOCGIFINDEX = 0xc0206920 SIOCGIFMEDIA = 0xc0306938 SIOCGIFMETRIC = 0xc0206917 SIOCGIFMTU = 0xc0206933 SIOCGIFNETMASK = 0xc0206925 SIOCGIFPDSTADDR = 0xc0206948 SIOCGIFPHYS = 0xc0206935 SIOCGIFPOLLCPU = 0xc020697e SIOCGIFPSRCADDR = 0xc0206947 SIOCGIFSTATUS = 0xc331693b SIOCGIFTSOLEN = 0xc0206980 SIOCGLIFADDR = 0xc118691c SIOCGLIFPHYADDR = 0xc118694b SIOCGLOWAT = 0x40047303 SIOCGPGRP = 0x40047309 SIOCGPRIVATE_0 = 0xc0206950 SIOCGPRIVATE_1 = 0xc0206951 SIOCIFCREATE = 0xc020697a SIOCIFCREATE2 = 0xc020697c SIOCIFDESTROY = 0x80206979 SIOCIFGCLONERS = 0xc0106978 SIOCSDRVSPEC = 0x8028697b SIOCSHIWAT = 0x80047300 SIOCSIFADDR = 0x8020690c SIOCSIFBRDADDR = 0x80206913 SIOCSIFCAP = 0x8020691e SIOCSIFDSTADDR = 0x8020690e SIOCSIFFLAGS = 0x80206910 SIOCSIFGENERIC = 0x80206939 SIOCSIFLLADDR = 0x8020693c SIOCSIFMEDIA = 0xc0206937 SIOCSIFMETRIC = 0x80206918 SIOCSIFMTU = 0x80206934 SIOCSIFNAME = 0x80206928 SIOCSIFNETMASK = 0x80206916 SIOCSIFPHYADDR = 0x80406946 SIOCSIFPHYS = 0x80206936 SIOCSIFPOLLCPU = 0x8020697d SIOCSIFTSOLEN = 0x8020697f SIOCSLIFPHYADDR = 0x8118694a SIOCSLOWAT = 0x80047302 SIOCSPGRP = 0x80047308 SOCK_CLOEXEC = 0x10000000 SOCK_DGRAM = 0x2 SOCK_MAXADDRLEN = 0xff SOCK_NONBLOCK = 0x20000000 SOCK_RAW = 0x3 SOCK_RDM = 0x4 SOCK_SEQPACKET = 0x5 SOCK_STREAM = 0x1 SOL_SOCKET = 0xffff SOMAXCONN = 0x80 SO_ACCEPTCONN = 0x2 SO_ACCEPTFILTER = 0x1000 SO_BROADCAST = 0x20 SO_CPUHINT = 0x1030 SO_DEBUG = 0x1 SO_DONTROUTE = 0x10 SO_ERROR = 0x1007 SO_KEEPALIVE = 0x8 SO_LINGER = 0x80 SO_NOSIGPIPE = 0x800 SO_OOBINLINE = 0x100 SO_RCVBUF = 0x1002 SO_RCVLOWAT = 0x1004 SO_RCVTIMEO = 0x1006 SO_REUSEADDR = 0x4 SO_REUSEPORT = 0x200 SO_SNDBUF = 0x1001 SO_SNDLOWAT = 0x1003 SO_SNDSPACE = 0x100a SO_SNDTIMEO = 0x1005 SO_TIMESTAMP = 0x400 SO_TYPE = 0x1008 SO_USELOOPBACK = 0x40 S_BLKSIZE = 0x200 S_IEXEC = 0x40 S_IFBLK = 0x6000 S_IFCHR = 0x2000 S_IFDB = 0x9000 S_IFDIR = 0x4000 S_IFIFO = 0x1000 S_IFLNK = 0xa000 S_IFMT = 0xf000 S_IFREG = 0x8000 S_IFSOCK = 0xc000 S_IFWHT = 0xe000 S_IREAD = 0x100 S_IRGRP = 0x20 S_IROTH = 0x4 S_IRUSR = 0x100 S_IRWXG = 0x38 S_IRWXO = 0x7 S_IRWXU = 0x1c0 S_ISGID = 0x400 S_ISTXT = 0x200 S_ISUID = 0x800 S_ISVTX = 0x200 S_IWGRP = 0x10 S_IWOTH = 0x2 S_IWRITE = 0x80 S_IWUSR = 0x80 S_IXGRP = 0x8 S_IXOTH = 0x1 S_IXUSR = 0x40 TCIFLUSH = 0x1 TCIOFF = 0x3 TCIOFLUSH = 0x3 TCION = 0x4 TCOFLUSH = 0x2 TCOOFF = 0x1 TCOON = 0x2 TCP_FASTKEEP = 0x80 TCP_KEEPCNT = 0x400 TCP_KEEPIDLE = 0x100 TCP_KEEPINIT = 0x20 TCP_KEEPINTVL = 0x200 TCP_MAXBURST = 0x4 TCP_MAXHLEN = 0x3c TCP_MAXOLEN = 0x28 TCP_MAXSEG = 0x2 TCP_MAXWIN = 0xffff TCP_MAX_WINSHIFT = 0xe TCP_MINMSS = 0x100 TCP_MIN_WINSHIFT = 0x5 TCP_MSS = 0x200 TCP_NODELAY = 0x1 TCP_NOOPT = 0x8 TCP_NOPUSH = 0x4 TCP_SIGNATURE_ENABLE = 0x10 TCSAFLUSH = 0x2 TIOCCBRK = 0x2000747a TIOCCDTR = 0x20007478 TIOCCONS = 0x80047462 TIOCDCDTIMESTAMP = 0x40107458 TIOCDRAIN = 0x2000745e TIOCEXCL = 0x2000740d TIOCEXT = 0x80047460 TIOCFLUSH = 0x80047410 TIOCGDRAINWAIT = 0x40047456 TIOCGETA = 0x402c7413 TIOCGETD = 0x4004741a TIOCGPGRP = 0x40047477 TIOCGSID = 0x40047463 TIOCGSIZE = 0x40087468 TIOCGWINSZ = 0x40087468 TIOCISPTMASTER = 0x20007455 TIOCMBIC = 0x8004746b TIOCMBIS = 0x8004746c TIOCMGDTRWAIT = 0x4004745a TIOCMGET = 0x4004746a TIOCMODG = 0x40047403 TIOCMODS = 0x80047404 TIOCMSDTRWAIT = 0x8004745b TIOCMSET = 0x8004746d TIOCM_CAR = 0x40 TIOCM_CD = 0x40 TIOCM_CTS = 0x20 TIOCM_DSR = 0x100 TIOCM_DTR = 0x2 TIOCM_LE = 0x1 TIOCM_RI = 0x80 TIOCM_RNG = 0x80 TIOCM_RTS = 0x4 TIOCM_SR = 0x10 TIOCM_ST = 0x8 TIOCNOTTY = 0x20007471 TIOCNXCL = 0x2000740e TIOCOUTQ = 0x40047473 TIOCPKT = 0x80047470 TIOCPKT_DATA = 0x0 TIOCPKT_DOSTOP = 0x20 TIOCPKT_FLUSHREAD = 0x1 TIOCPKT_FLUSHWRITE = 0x2 TIOCPKT_IOCTL = 0x40 TIOCPKT_NOSTOP = 0x10 TIOCPKT_START = 0x8 TIOCPKT_STOP = 0x4 TIOCREMOTE = 0x80047469 TIOCSBRK = 0x2000747b TIOCSCTTY = 0x20007461 TIOCSDRAINWAIT = 0x80047457 TIOCSDTR = 0x20007479 TIOCSETA = 0x802c7414 TIOCSETAF = 0x802c7416 TIOCSETAW = 0x802c7415 TIOCSETD = 0x8004741b TIOCSIG = 0x2000745f TIOCSPGRP = 0x80047476 TIOCSSIZE = 0x80087467 TIOCSTART = 0x2000746e TIOCSTAT = 0x20007465 TIOCSTI = 0x80017472 TIOCSTOP = 0x2000746f TIOCSWINSZ = 0x80087467 TIOCTIMESTAMP = 0x40107459 TIOCUCNTL = 0x80047466 TOSTOP = 0x400000 VCHECKPT = 0x13 VDISCARD = 0xf VDSUSP = 0xb VEOF = 0x0 VEOL = 0x1 VEOL2 = 0x2 VERASE = 0x3 VERASE2 = 0x7 VINTR = 0x8 VKILL = 0x5 VLNEXT = 0xe VMIN = 0x10 VM_BCACHE_SIZE_MAX = 0x0 VM_SWZONE_SIZE_MAX = 0x4000000000 VQUIT = 0x9 VREPRINT = 0x6 VSTART = 0xc VSTATUS = 0x12 VSTOP = 0xd VSUSP = 0xa VTIME = 0x11 VWERASE = 0x4 WCONTINUED = 0x4 WCOREFLAG = 0x80 WLINUXCLONE = 0x80000000 WNOHANG = 0x1 WSTOPPED = 0x7f WUNTRACED = 0x2 ) // Errors const ( E2BIG = syscall.Errno(0x7) EACCES = syscall.Errno(0xd) EADDRINUSE = syscall.Errno(0x30) EADDRNOTAVAIL = syscall.Errno(0x31) EAFNOSUPPORT = syscall.Errno(0x2f) EAGAIN = syscall.Errno(0x23) EALREADY = syscall.Errno(0x25) EASYNC = syscall.Errno(0x63) EAUTH = syscall.Errno(0x50) EBADF = syscall.Errno(0x9) EBADMSG = syscall.Errno(0x59) EBADRPC = syscall.Errno(0x48) EBUSY = syscall.Errno(0x10) ECANCELED = syscall.Errno(0x55) ECHILD = syscall.Errno(0xa) ECONNABORTED = syscall.Errno(0x35) ECONNREFUSED = syscall.Errno(0x3d) ECONNRESET = syscall.Errno(0x36) EDEADLK = syscall.Errno(0xb) EDESTADDRREQ = syscall.Errno(0x27) EDOM = syscall.Errno(0x21) EDOOFUS = syscall.Errno(0x58) EDQUOT = syscall.Errno(0x45) EEXIST = syscall.Errno(0x11) EFAULT = syscall.Errno(0xe) EFBIG = syscall.Errno(0x1b) EFTYPE = syscall.Errno(0x4f) EHOSTDOWN = syscall.Errno(0x40) EHOSTUNREACH = syscall.Errno(0x41) EIDRM = syscall.Errno(0x52) EILSEQ = syscall.Errno(0x56) EINPROGRESS = syscall.Errno(0x24) EINTR = syscall.Errno(0x4) EINVAL = syscall.Errno(0x16) EIO = syscall.Errno(0x5) EISCONN = syscall.Errno(0x38) EISDIR = syscall.Errno(0x15) ELAST = syscall.Errno(0x63) ELOOP = syscall.Errno(0x3e) EMFILE = syscall.Errno(0x18) EMLINK = syscall.Errno(0x1f) EMSGSIZE = syscall.Errno(0x28) EMULTIHOP = syscall.Errno(0x5a) ENAMETOOLONG = syscall.Errno(0x3f) ENEEDAUTH = syscall.Errno(0x51) ENETDOWN = syscall.Errno(0x32) ENETRESET = syscall.Errno(0x34) ENETUNREACH = syscall.Errno(0x33) ENFILE = syscall.Errno(0x17) ENOATTR = syscall.Errno(0x57) ENOBUFS = syscall.Errno(0x37) ENODEV = syscall.Errno(0x13) ENOENT = syscall.Errno(0x2) ENOEXEC = syscall.Errno(0x8) ENOLCK = syscall.Errno(0x4d) ENOLINK = syscall.Errno(0x5b) ENOMEDIUM = syscall.Errno(0x5d) ENOMEM = syscall.Errno(0xc) ENOMSG = syscall.Errno(0x53) ENOPROTOOPT = syscall.Errno(0x2a) ENOSPC = syscall.Errno(0x1c) ENOSYS = syscall.Errno(0x4e) ENOTBLK = syscall.Errno(0xf) ENOTCONN = syscall.Errno(0x39) ENOTDIR = syscall.Errno(0x14) ENOTEMPTY = syscall.Errno(0x42) ENOTSOCK = syscall.Errno(0x26) ENOTSUP = syscall.Errno(0x2d) ENOTTY = syscall.Errno(0x19) ENXIO = syscall.Errno(0x6) EOPNOTSUPP = syscall.Errno(0x2d) EOVERFLOW = syscall.Errno(0x54) EPERM = syscall.Errno(0x1) EPFNOSUPPORT = syscall.Errno(0x2e) EPIPE = syscall.Errno(0x20) EPROCLIM = syscall.Errno(0x43) EPROCUNAVAIL = syscall.Errno(0x4c) EPROGMISMATCH = syscall.Errno(0x4b) EPROGUNAVAIL = syscall.Errno(0x4a) EPROTO = syscall.Errno(0x5c) EPROTONOSUPPORT = syscall.Errno(0x2b) EPROTOTYPE = syscall.Errno(0x29) ERANGE = syscall.Errno(0x22) EREMOTE = syscall.Errno(0x47) EROFS = syscall.Errno(0x1e) ERPCMISMATCH = syscall.Errno(0x49) ESHUTDOWN = syscall.Errno(0x3a) ESOCKTNOSUPPORT = syscall.Errno(0x2c) ESPIPE = syscall.Errno(0x1d) ESRCH = syscall.Errno(0x3) ESTALE = syscall.Errno(0x46) ETIMEDOUT = syscall.Errno(0x3c) ETOOMANYREFS = syscall.Errno(0x3b) ETXTBSY = syscall.Errno(0x1a) EUNUSED94 = syscall.Errno(0x5e) EUNUSED95 = syscall.Errno(0x5f) EUNUSED96 = syscall.Errno(0x60) EUNUSED97 = syscall.Errno(0x61) EUNUSED98 = syscall.Errno(0x62) EUSERS = syscall.Errno(0x44) EWOULDBLOCK = syscall.Errno(0x23) EXDEV = syscall.Errno(0x12) ) // Signals const ( SIGABRT = syscall.Signal(0x6) SIGALRM = syscall.Signal(0xe) SIGBUS = syscall.Signal(0xa) SIGCHLD = syscall.Signal(0x14) SIGCKPT = syscall.Signal(0x21) SIGCKPTEXIT = syscall.Signal(0x22) SIGCONT = syscall.Signal(0x13) SIGEMT = syscall.Signal(0x7) SIGFPE = syscall.Signal(0x8) SIGHUP = syscall.Signal(0x1) SIGILL = syscall.Signal(0x4) SIGINFO = syscall.Signal(0x1d) SIGINT = syscall.Signal(0x2) SIGIO = syscall.Signal(0x17) SIGIOT = syscall.Signal(0x6) SIGKILL = syscall.Signal(0x9) SIGPIPE = syscall.Signal(0xd) SIGPROF = syscall.Signal(0x1b) SIGQUIT = syscall.Signal(0x3) SIGSEGV = syscall.Signal(0xb) SIGSTOP = syscall.Signal(0x11) SIGSYS = syscall.Signal(0xc) SIGTERM = syscall.Signal(0xf) SIGTHR = syscall.Signal(0x20) SIGTRAP = syscall.Signal(0x5) SIGTSTP = syscall.Signal(0x12) SIGTTIN = syscall.Signal(0x15) SIGTTOU = syscall.Signal(0x16) SIGURG = syscall.Signal(0x10) SIGUSR1 = syscall.Signal(0x1e) SIGUSR2 = syscall.Signal(0x1f) SIGVTALRM = syscall.Signal(0x1a) SIGWINCH = syscall.Signal(0x1c) SIGXCPU = syscall.Signal(0x18) SIGXFSZ = syscall.Signal(0x19) ) // Error table var errorList = [...]struct { num syscall.Errno name string desc string }{ {1, "EPERM", "operation not permitted"}, {2, "ENOENT", "no such file or directory"}, {3, "ESRCH", "no such process"}, {4, "EINTR", "interrupted system call"}, {5, "EIO", "input/output error"}, {6, "ENXIO", "device not configured"}, {7, "E2BIG", "argument list too long"}, {8, "ENOEXEC", "exec format error"}, {9, "EBADF", "bad file descriptor"}, {10, "ECHILD", "no child processes"}, {11, "EDEADLK", "resource deadlock avoided"}, {12, "ENOMEM", "cannot allocate memory"}, {13, "EACCES", "permission denied"}, {14, "EFAULT", "bad address"}, {15, "ENOTBLK", "block device required"}, {16, "EBUSY", "device busy"}, {17, "EEXIST", "file exists"}, {18, "EXDEV", "cross-device link"}, {19, "ENODEV", "operation not supported by device"}, {20, "ENOTDIR", "not a directory"}, {21, "EISDIR", "is a directory"}, {22, "EINVAL", "invalid argument"}, {23, "ENFILE", "too many open files in system"}, {24, "EMFILE", "too many open files"}, {25, "ENOTTY", "inappropriate ioctl for device"}, {26, "ETXTBSY", "text file busy"}, {27, "EFBIG", "file too large"}, {28, "ENOSPC", "no space left on device"}, {29, "ESPIPE", "illegal seek"}, {30, "EROFS", "read-only file system"}, {31, "EMLINK", "too many links"}, {32, "EPIPE", "broken pipe"}, {33, "EDOM", "numerical argument out of domain"}, {34, "ERANGE", "result too large"}, {35, "EWOULDBLOCK", "resource temporarily unavailable"}, {36, "EINPROGRESS", "operation now in progress"}, {37, "EALREADY", "operation already in progress"}, {38, "ENOTSOCK", "socket operation on non-socket"}, {39, "EDESTADDRREQ", "destination address required"}, {40, "EMSGSIZE", "message too long"}, {41, "EPROTOTYPE", "protocol wrong type for socket"}, {42, "ENOPROTOOPT", "protocol not available"}, {43, "EPROTONOSUPPORT", "protocol not supported"}, {44, "ESOCKTNOSUPPORT", "socket type not supported"}, {45, "EOPNOTSUPP", "operation not supported"}, {46, "EPFNOSUPPORT", "protocol family not supported"}, {47, "EAFNOSUPPORT", "address family not supported by protocol family"}, {48, "EADDRINUSE", "address already in use"}, {49, "EADDRNOTAVAIL", "can't assign requested address"}, {50, "ENETDOWN", "network is down"}, {51, "ENETUNREACH", "network is unreachable"}, {52, "ENETRESET", "network dropped connection on reset"}, {53, "ECONNABORTED", "software caused connection abort"}, {54, "ECONNRESET", "connection reset by peer"}, {55, "ENOBUFS", "no buffer space available"}, {56, "EISCONN", "socket is already connected"}, {57, "ENOTCONN", "socket is not connected"}, {58, "ESHUTDOWN", "can't send after socket shutdown"}, {59, "ETOOMANYREFS", "too many references: can't splice"}, {60, "ETIMEDOUT", "operation timed out"}, {61, "ECONNREFUSED", "connection refused"}, {62, "ELOOP", "too many levels of symbolic links"}, {63, "ENAMETOOLONG", "file name too long"}, {64, "EHOSTDOWN", "host is down"}, {65, "EHOSTUNREACH", "no route to host"}, {66, "ENOTEMPTY", "directory not empty"}, {67, "EPROCLIM", "too many processes"}, {68, "EUSERS", "too many users"}, {69, "EDQUOT", "disc quota exceeded"}, {70, "ESTALE", "stale NFS file handle"}, {71, "EREMOTE", "too many levels of remote in path"}, {72, "EBADRPC", "RPC struct is bad"}, {73, "ERPCMISMATCH", "RPC version wrong"}, {74, "EPROGUNAVAIL", "RPC prog. not avail"}, {75, "EPROGMISMATCH", "program version wrong"}, {76, "EPROCUNAVAIL", "bad procedure for program"}, {77, "ENOLCK", "no locks available"}, {78, "ENOSYS", "function not implemented"}, {79, "EFTYPE", "inappropriate file type or format"}, {80, "EAUTH", "authentication error"}, {81, "ENEEDAUTH", "need authenticator"}, {82, "EIDRM", "identifier removed"}, {83, "ENOMSG", "no message of desired type"}, {84, "EOVERFLOW", "value too large to be stored in data type"}, {85, "ECANCELED", "operation canceled"}, {86, "EILSEQ", "illegal byte sequence"}, {87, "ENOATTR", "attribute not found"}, {88, "EDOOFUS", "programming error"}, {89, "EBADMSG", "bad message"}, {90, "EMULTIHOP", "multihop attempted"}, {91, "ENOLINK", "link has been severed"}, {92, "EPROTO", "protocol error"}, {93, "ENOMEDIUM", "no medium found"}, {94, "EUNUSED94", "unknown error: 94"}, {95, "EUNUSED95", "unknown error: 95"}, {96, "EUNUSED96", "unknown error: 96"}, {97, "EUNUSED97", "unknown error: 97"}, {98, "EUNUSED98", "unknown error: 98"}, {99, "ELAST", "unknown error: 99"}, } // Signal table var signalList = [...]struct { num syscall.Signal name string desc string }{ {1, "SIGHUP", "hangup"}, {2, "SIGINT", "interrupt"}, {3, "SIGQUIT", "quit"}, {4, "SIGILL", "illegal instruction"}, {5, "SIGTRAP", "trace/BPT trap"}, {6, "SIGIOT", "abort trap"}, {7, "SIGEMT", "EMT trap"}, {8, "SIGFPE", "floating point exception"}, {9, "SIGKILL", "killed"}, {10, "SIGBUS", "bus error"}, {11, "SIGSEGV", "segmentation fault"}, {12, "SIGSYS", "bad system call"}, {13, "SIGPIPE", "broken pipe"}, {14, "SIGALRM", "alarm clock"}, {15, "SIGTERM", "terminated"}, {16, "SIGURG", "urgent I/O condition"}, {17, "SIGSTOP", "suspended (signal)"}, {18, "SIGTSTP", "suspended"}, {19, "SIGCONT", "continued"}, {20, "SIGCHLD", "child exited"}, {21, "SIGTTIN", "stopped (tty input)"}, {22, "SIGTTOU", "stopped (tty output)"}, {23, "SIGIO", "I/O possible"}, {24, "SIGXCPU", "cputime limit exceeded"}, {25, "SIGXFSZ", "filesize limit exceeded"}, {26, "SIGVTALRM", "virtual timer expired"}, {27, "SIGPROF", "profiling timer expired"}, {28, "SIGWINCH", "window size changes"}, {29, "SIGINFO", "information request"}, {30, "SIGUSR1", "user defined signal 1"}, {31, "SIGUSR2", "user defined signal 2"}, {32, "SIGTHR", "thread Scheduler"}, {33, "SIGCKPT", "checkPoint"}, {34, "SIGCKPTEXIT", "checkPointExit"}, }
{ "pile_set_name": "Github" }
# # Copyright 2010-2011 Freescale Semiconductor, Inc. # # SPDX-License-Identifier: GPL-2.0+ # obj-y += p1023rds.o obj-y += law.o obj-y += tlb.o
{ "pile_set_name": "Github" }
/** * Copyright 2016 Bryan Kelly * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. * * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.btkelly.gnag.tasks; import static com.btkelly.gnag.models.GitHubStatusType.FAILURE; import static com.btkelly.gnag.utils.ReportWriter.REPORT_FILE_NAME; import com.btkelly.gnag.GnagPlugin; import com.btkelly.gnag.extensions.GnagPluginExtension; import com.btkelly.gnag.models.CheckStatus; import com.btkelly.gnag.models.Violation; import com.btkelly.gnag.reporters.AndroidLintViolationDetector; import com.btkelly.gnag.reporters.BaseExecutedViolationDetector; import com.btkelly.gnag.reporters.CheckstyleViolationDetector; import com.btkelly.gnag.reporters.DetektViolationDetector; import com.btkelly.gnag.reporters.FindbugsViolationDetector; import com.btkelly.gnag.reporters.KtlintViolationDetector; import com.btkelly.gnag.reporters.PMDViolationDetector; import com.btkelly.gnag.reporters.ViolationDetector; import com.btkelly.gnag.utils.ProjectHelper; import com.btkelly.gnag.utils.ReportWriter; import java.io.File; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.gradle.api.DefaultTask; import org.gradle.api.GradleException; import org.gradle.api.Project; import org.gradle.api.Task; import org.gradle.api.logging.Logger; import org.gradle.api.logging.Logging; import org.gradle.api.tasks.StopExecutionException; import org.gradle.api.tasks.TaskAction; /** * Created by bobbake4 on 4/1/16. */ public class GnagCheckTask extends DefaultTask { static final String TASK_NAME = "gnagCheck"; private final List<ViolationDetector> violationDetectors = new ArrayList<>(); private final ProjectHelper projectHelper = new ProjectHelper(getProject()); private GnagPluginExtension gnagPluginExtension; public static void addTask(ProjectHelper projectHelper, GnagPluginExtension gnagPluginExtension) { Map<String, Object> taskOptions = new HashMap<>(); taskOptions.put(Task.TASK_NAME, TASK_NAME); taskOptions.put(Task.TASK_TYPE, GnagCheckTask.class); taskOptions.put(Task.TASK_GROUP, "Verification"); taskOptions.put(Task.TASK_DEPENDS_ON, "check"); taskOptions.put(Task.TASK_DESCRIPTION, "Runs Gnag checks and generates an HTML report"); Project project = projectHelper.getProject(); GnagCheckTask gnagCheckTask = (GnagCheckTask) project.task(taskOptions, TASK_NAME); gnagCheckTask.setGnagPluginExtension(gnagPluginExtension); if (gnagPluginExtension.checkstyle.isEnabled() && projectHelper.hasJavaSourceFiles()) { gnagCheckTask.violationDetectors .add(new CheckstyleViolationDetector(project, gnagPluginExtension.checkstyle)); } if (gnagPluginExtension.pmd.isEnabled() && projectHelper.hasJavaSourceFiles()) { gnagCheckTask.violationDetectors .add(new PMDViolationDetector(project, gnagPluginExtension.pmd)); } if (gnagPluginExtension.findbugs.isEnabled() && projectHelper.hasJavaSourceFiles()) { gnagCheckTask.violationDetectors .add(new FindbugsViolationDetector(project, gnagPluginExtension.findbugs)); } if (gnagPluginExtension.ktlint.isEnabled() && projectHelper.hasKotlinSourceFiles()) { String overrideToolVersion = gnagPluginExtension.ktlint.getToolVersion(); String toolVersion = overrideToolVersion != null ? overrideToolVersion : "0.39.0"; project.getConfigurations().create("gnagKtlint"); project.getDependencies().add("gnagKtlint", "com.pinterest:ktlint:" + toolVersion); Task ktlintTask = KtlintTask.addTask(projectHelper); gnagCheckTask.dependsOn(ktlintTask); gnagCheckTask.violationDetectors .add(new KtlintViolationDetector(project, gnagPluginExtension.ktlint)); } if (gnagPluginExtension.detekt.isEnabled() && projectHelper.hasKotlinSourceFiles()) { String overrideToolVersion = gnagPluginExtension.detekt.getToolVersion(); String toolVersion = overrideToolVersion != null ? overrideToolVersion : "1.13.1"; project.getConfigurations().create("gnagDetekt"); project.getDependencies().add("gnagDetekt", "io.gitlab.arturbosch.detekt:detekt-cli:" + toolVersion); Task detektTask = DetektTask .addTask(projectHelper, gnagPluginExtension.detekt.getReporterConfig()); gnagCheckTask.dependsOn(detektTask); gnagCheckTask.violationDetectors .add(new DetektViolationDetector(project, gnagPluginExtension.detekt)); } if (projectHelper.isAndroidProject() && gnagPluginExtension.androidLint.isEnabled()) { gnagCheckTask.violationDetectors .add(new AndroidLintViolationDetector(project, gnagPluginExtension.androidLint)); } } @SuppressWarnings("unused") @TaskAction public void taskAction() { if (gnagPluginExtension.isEnabled()) { executeGnagCheck(); } } @Override public Logger getLogger() { return Logging.getLogger(GnagPlugin.class); } private void executeGnagCheck() { final Set<Violation> allDetectedViolations = new HashSet<>(); violationDetectors.forEach(violationDetector -> { if (violationDetector instanceof BaseExecutedViolationDetector) { ((BaseExecutedViolationDetector) violationDetector).executeReporter(); } final List<Violation> detectedViolations = violationDetector.getDetectedViolations(); allDetectedViolations.addAll(detectedViolations); getLogger().lifecycle( violationDetector.name() + " detected " + detectedViolations.size() + " violations."); }); final File reportsDir = projectHelper.getReportsDir(); if (allDetectedViolations.isEmpty()) { ReportWriter.deleteLocalReportFiles(reportsDir, getLogger()); getProject().setStatus(CheckStatus.getSuccessfulCheckStatus()); getLogger().lifecycle("Congrats, no poop code found!"); } else { ReportWriter.writeLocalReportFiles(allDetectedViolations, reportsDir, getLogger()); getProject().setStatus(new CheckStatus(FAILURE, allDetectedViolations)); File reportFile = new File(reportsDir, REPORT_FILE_NAME); final String failedMessage= "One or more violation detectors has found violations. Check the report at " + "file://" + reportFile.getAbsolutePath(); if (gnagPluginExtension.shouldFailOnError() && !taskExecutionGraphIncludesGnagReport()) { throw new GradleException(failedMessage); } else { getLogger().lifecycle(failedMessage); throw new StopExecutionException(failedMessage); } } } private void setGnagPluginExtension(GnagPluginExtension gnagPluginExtension) { this.gnagPluginExtension = gnagPluginExtension; } private boolean taskExecutionGraphIncludesGnagReport() { for (final Task task : getProject().getGradle().getTaskGraph().getAllTasks()) { if (task.getName().equals(GnagReportTask.TASK_NAME)) { return true; } } return false; } }
{ "pile_set_name": "Github" }
from __future__ import division, print_function import os import genapi from genapi import \ TypeApi, GlobalVarApi, FunctionApi, BoolValuesApi import numpy_api # use annotated api when running under cpychecker h_template = r""" #if defined(_MULTIARRAYMODULE) || defined(WITH_CPYCHECKER_STEALS_REFERENCE_TO_ARG_ATTRIBUTE) typedef struct { PyObject_HEAD npy_bool obval; } PyBoolScalarObject; extern NPY_NO_EXPORT PyTypeObject PyArrayMapIter_Type; extern NPY_NO_EXPORT PyTypeObject PyArrayNeighborhoodIter_Type; extern NPY_NO_EXPORT PyBoolScalarObject _PyArrayScalar_BoolValues[2]; %s #else #if defined(PY_ARRAY_UNIQUE_SYMBOL) #define PyArray_API PY_ARRAY_UNIQUE_SYMBOL #endif #if defined(NO_IMPORT) || defined(NO_IMPORT_ARRAY) extern void **PyArray_API; #else #if defined(PY_ARRAY_UNIQUE_SYMBOL) void **PyArray_API; #else static void **PyArray_API=NULL; #endif #endif %s #if !defined(NO_IMPORT_ARRAY) && !defined(NO_IMPORT) static int _import_array(void) { int st; PyObject *numpy = PyImport_ImportModule("numpy.core._multiarray_umath"); PyObject *c_api = NULL; if (numpy == NULL) { return -1; } c_api = PyObject_GetAttrString(numpy, "_ARRAY_API"); Py_DECREF(numpy); if (c_api == NULL) { PyErr_SetString(PyExc_AttributeError, "_ARRAY_API not found"); return -1; } #if PY_VERSION_HEX >= 0x03000000 if (!PyCapsule_CheckExact(c_api)) { PyErr_SetString(PyExc_RuntimeError, "_ARRAY_API is not PyCapsule object"); Py_DECREF(c_api); return -1; } PyArray_API = (void **)PyCapsule_GetPointer(c_api, NULL); #else if (!PyCObject_Check(c_api)) { PyErr_SetString(PyExc_RuntimeError, "_ARRAY_API is not PyCObject object"); Py_DECREF(c_api); return -1; } PyArray_API = (void **)PyCObject_AsVoidPtr(c_api); #endif Py_DECREF(c_api); if (PyArray_API == NULL) { PyErr_SetString(PyExc_RuntimeError, "_ARRAY_API is NULL pointer"); return -1; } /* Perform runtime check of C API version */ if (NPY_VERSION != PyArray_GetNDArrayCVersion()) { PyErr_Format(PyExc_RuntimeError, "module compiled against "\ "ABI version 0x%%x but this version of numpy is 0x%%x", \ (int) NPY_VERSION, (int) PyArray_GetNDArrayCVersion()); return -1; } if (NPY_FEATURE_VERSION > PyArray_GetNDArrayCFeatureVersion()) { PyErr_Format(PyExc_RuntimeError, "module compiled against "\ "API version 0x%%x but this version of numpy is 0x%%x", \ (int) NPY_FEATURE_VERSION, (int) PyArray_GetNDArrayCFeatureVersion()); return -1; } /* * Perform runtime check of endianness and check it matches the one set by * the headers (npy_endian.h) as a safeguard */ st = PyArray_GetEndianness(); if (st == NPY_CPU_UNKNOWN_ENDIAN) { PyErr_Format(PyExc_RuntimeError, "FATAL: module compiled as unknown endian"); return -1; } #if NPY_BYTE_ORDER == NPY_BIG_ENDIAN if (st != NPY_CPU_BIG) { PyErr_Format(PyExc_RuntimeError, "FATAL: module compiled as "\ "big endian, but detected different endianness at runtime"); return -1; } #elif NPY_BYTE_ORDER == NPY_LITTLE_ENDIAN if (st != NPY_CPU_LITTLE) { PyErr_Format(PyExc_RuntimeError, "FATAL: module compiled as "\ "little endian, but detected different endianness at runtime"); return -1; } #endif return 0; } #if PY_VERSION_HEX >= 0x03000000 #define NUMPY_IMPORT_ARRAY_RETVAL NULL #else #define NUMPY_IMPORT_ARRAY_RETVAL #endif #define import_array() {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return NUMPY_IMPORT_ARRAY_RETVAL; } } #define import_array1(ret) {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import"); return ret; } } #define import_array2(msg, ret) {if (_import_array() < 0) {PyErr_Print(); PyErr_SetString(PyExc_ImportError, msg); return ret; } } #endif #endif """ c_template = r""" /* These pointers will be stored in the C-object for use in other extension modules */ void *PyArray_API[] = { %s }; """ c_api_header = """ =========== NumPy C-API =========== """ def generate_api(output_dir, force=False): basename = 'multiarray_api' h_file = os.path.join(output_dir, '__%s.h' % basename) c_file = os.path.join(output_dir, '__%s.c' % basename) d_file = os.path.join(output_dir, '%s.txt' % basename) targets = (h_file, c_file, d_file) sources = numpy_api.multiarray_api if (not force and not genapi.should_rebuild(targets, [numpy_api.__file__, __file__])): return targets else: do_generate_api(targets, sources) return targets def do_generate_api(targets, sources): header_file = targets[0] c_file = targets[1] doc_file = targets[2] global_vars = sources[0] scalar_bool_values = sources[1] types_api = sources[2] multiarray_funcs = sources[3] multiarray_api = sources[:] module_list = [] extension_list = [] init_list = [] # Check multiarray api indexes multiarray_api_index = genapi.merge_api_dicts(multiarray_api) genapi.check_api_dict(multiarray_api_index) numpyapi_list = genapi.get_api_functions('NUMPY_API', multiarray_funcs) # FIXME: ordered_funcs_api is unused ordered_funcs_api = genapi.order_dict(multiarray_funcs) # Create dict name -> *Api instance api_name = 'PyArray_API' multiarray_api_dict = {} for f in numpyapi_list: name = f.name index = multiarray_funcs[name][0] annotations = multiarray_funcs[name][1:] multiarray_api_dict[f.name] = FunctionApi(f.name, index, annotations, f.return_type, f.args, api_name) for name, val in global_vars.items(): index, type = val multiarray_api_dict[name] = GlobalVarApi(name, index, type, api_name) for name, val in scalar_bool_values.items(): index = val[0] multiarray_api_dict[name] = BoolValuesApi(name, index, api_name) for name, val in types_api.items(): index = val[0] multiarray_api_dict[name] = TypeApi(name, index, 'PyTypeObject', api_name) if len(multiarray_api_dict) != len(multiarray_api_index): keys_dict = set(multiarray_api_dict.keys()) keys_index = set(multiarray_api_index.keys()) raise AssertionError( "Multiarray API size mismatch - " "index has extra keys {}, dict has extra keys {}" .format(keys_index - keys_dict, keys_dict - keys_index) ) extension_list = [] for name, index in genapi.order_dict(multiarray_api_index): api_item = multiarray_api_dict[name] extension_list.append(api_item.define_from_array_api_string()) init_list.append(api_item.array_api_define()) module_list.append(api_item.internal_define()) # Write to header s = h_template % ('\n'.join(module_list), '\n'.join(extension_list)) genapi.write_file(header_file, s) # Write to c-code s = c_template % ',\n'.join(init_list) genapi.write_file(c_file, s) # write to documentation s = c_api_header for func in numpyapi_list: s += func.to_ReST() s += '\n\n' genapi.write_file(doc_file, s) return targets
{ "pile_set_name": "Github" }
;;; emacspeak-replace.el --- Speech enable interactive search and replace -*- lexical-binding: t; -*- ;;; $Id$ ;;; $Author: tv.raman.tv $ ;;; Description: Emacspeak extension for replace.el ;;; Keywords: Emacspeak, Speech feedback, query replace (replace.el) ;;{{{ LCD Archive entry: ;;; LCD Archive Entry: ;;; emacspeak| T. V. Raman |[email protected] ;;; A speech interface to Emacs | ;;; $Date: 2007-08-25 18:28:19 -0700 (Sat, 25 Aug 2007) $ | ;;; $Revision: 4532 $ | ;;; Location undetermined ;;; ;;}}} ;;{{{ Copyright: ;;;Copyright (C) 1995 -- 2017, T. V. Raman ;;; Copyright (c) 1994, 1995 by Digital Equipment Corporation. ;;; All Rights Reserved. ;;; ;;; This file is not part of GNU Emacs, but the same permissions apply. ;;; ;;; GNU Emacs is free software; you can redistribute it and/or modify ;;; it under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 2, or (at your option) ;;; any later version. ;;; ;;; GNU Emacs is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Emacs; see the file COPYING. If not, write to ;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. ;;}}} ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;{{{ requires (cl-declaim (optimize (safety 0) (speed 3))) (require 'emacspeak-preamble) (load-library "replace") ;;}}} ;;{{{ Introduction: ;;; Commentary: ;;; This module causes emacs' replacement functions to use voice locking ;;; Code: ;;}}} ;;{{{ define personalities (defcustom emacspeak-replace-personality voice-animate "Personality used in search and replace to indicate word that is being replaced." :group 'isearch :group 'emacspeak :type 'symbol) ;;}}} ;;{{{ Advice (defvar emacspeak-replace-highlight-on nil "Flag that says if replace highlight is on.") (defvar emacspeak-replace-saved-personality nil "Value saved before replace-highlight changed the personality. ") (defvar emacspeak-replace-start nil) (defvar emacspeak-replace-end nil) (cl-loop for f in '(query-replace query-replace-regexp) do (eval `(defadvice ,f (after emacspeak pre act comp) "Provide auditory feedback." (when (ems-interactive-p) (emacspeak-auditory-icon 'task-done))))) (defadvice perform-replace (around emacspeak pre act comp) "Silence help message." (ems-with-messages-silenced ad-do-it)) (defadvice replace-highlight (before emacspeak pre act) "Voicify and speak the line containing the replacement. " (save-match-data (let ((from (ad-get-arg 0)) (to (ad-get-arg 1))) (condition-case nil (progn (and emacspeak-replace-highlight-on emacspeak-replace-start emacspeak-replace-end (put-text-property (max emacspeak-replace-start (point-min)) (min emacspeak-replace-end (point-max)) 'personality emacspeak-replace-saved-personality)) (setq emacspeak-replace-highlight-on t emacspeak-replace-start from emacspeak-replace-end to emacspeak-replace-saved-personality (dtk-get-style from)) (and from to (put-text-property from to 'personality emacspeak-replace-personality)) (dtk-stop) (emacspeak-speak-line)) (error nil))))) (defadvice replace-dehighlight (after emacspeak pre act) "Turn off the replacement highlight. " (cl-declare (special emacspeak-replace-highlight-on emacspeak-replace-saved-personality emacspeak-replace-start emacspeak-replace-end)) (save-match-data (condition-case nil (progn (and emacspeak-replace-highlight-on emacspeak-replace-start emacspeak-replace-end (put-text-property (max emacspeak-replace-start (point-min)) (min emacspeak-replace-end (point-max)) 'personality emacspeak-replace-saved-personality) (setq emacspeak-replace-start nil emacspeak-replace-end nil emacspeak-replace-highlight-on nil))) (error nil)))) ;;}}} (provide 'emacspeak-replace) ;;{{{ emacs local variables ;;; local variables: ;;; folded-file: t ;;; byte-compile-dynamic: t ;;; end: ;;}}}
{ "pile_set_name": "Github" }
// // Button groups // -------------------------------------------------- // Make the div behave like a button .btn-group { position: relative; display: inline-block; .ie7-inline-block(); font-size: 0; // remove as part 1 of font-size inline-block hack vertical-align: middle; // match .btn alignment given font-size hack above white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page) .ie7-restore-left-whitespace(); } // Space out series of button groups .btn-group + .btn-group { margin-left: 5px; } // Optional: Group multiple button groups together for a toolbar .btn-toolbar { font-size: 0; // Hack to remove whitespace that results from using inline-block margin-top: @baseLineHeight / 2; margin-bottom: @baseLineHeight / 2; > .btn + .btn, > .btn-group + .btn, > .btn + .btn-group { margin-left: 5px; } } // Float them, remove border radius, then re-add to first and last elements .btn-group > .btn { position: relative; .border-radius(0); } .btn-group > .btn + .btn { margin-left: -1px; } .btn-group > .btn, .btn-group > .dropdown-menu, .btn-group > .popover { font-size: @baseFontSize; // redeclare as part 2 of font-size inline-block hack } // Reset fonts for other sizes .btn-group > .btn-mini { font-size: @fontSizeMini; } .btn-group > .btn-small { font-size: @fontSizeSmall; } .btn-group > .btn-large { font-size: @fontSizeLarge; } // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match .btn-group > .btn:first-child { margin-left: 0; .border-top-left-radius(@baseBorderRadius); .border-bottom-left-radius(@baseBorderRadius); } // Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it .btn-group > .btn:last-child, .btn-group > .dropdown-toggle { .border-top-right-radius(@baseBorderRadius); .border-bottom-right-radius(@baseBorderRadius); } // Reset corners for large buttons .btn-group > .btn.large:first-child { margin-left: 0; .border-top-left-radius(@borderRadiusLarge); .border-bottom-left-radius(@borderRadiusLarge); } .btn-group > .btn.large:last-child, .btn-group > .large.dropdown-toggle { .border-top-right-radius(@borderRadiusLarge); .border-bottom-right-radius(@borderRadiusLarge); } // On hover/focus/active, bring the proper btn to front .btn-group > .btn:hover, .btn-group > .btn:focus, .btn-group > .btn:active, .btn-group > .btn.active { z-index: 2; } // On active and open, don't show outline .btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle { outline: 0; } // Split button dropdowns // ---------------------- // Give the line between buttons some depth .btn-group > .btn + .dropdown-toggle { padding-left: 8px; padding-right: 8px; .box-shadow(~"inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)"); *padding-top: 5px; *padding-bottom: 5px; } .btn-group > .btn-mini + .dropdown-toggle { padding-left: 5px; padding-right: 5px; *padding-top: 2px; *padding-bottom: 2px; } .btn-group > .btn-small + .dropdown-toggle { *padding-top: 5px; *padding-bottom: 4px; } .btn-group > .btn-large + .dropdown-toggle { padding-left: 12px; padding-right: 12px; *padding-top: 7px; *padding-bottom: 7px; } .btn-group.open { // The clickable button for toggling the menu // Remove the gradient and set the same inset shadow as the :active state .dropdown-toggle { background-image: none; .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)"); } // Keep the hover's background when dropdown is open .btn.dropdown-toggle { background-color: @btnBackgroundHighlight; } .btn-primary.dropdown-toggle { background-color: @btnPrimaryBackgroundHighlight; } .btn-warning.dropdown-toggle { background-color: @btnWarningBackgroundHighlight; } .btn-danger.dropdown-toggle { background-color: @btnDangerBackgroundHighlight; } .btn-success.dropdown-toggle { background-color: @btnSuccessBackgroundHighlight; } .btn-info.dropdown-toggle { background-color: @btnInfoBackgroundHighlight; } .btn-inverse.dropdown-toggle { background-color: @btnInverseBackgroundHighlight; } } // Reposition the caret .btn .caret { margin-top: 8px; margin-left: 0; } // Carets in other button sizes .btn-large .caret { margin-top: 6px; } .btn-large .caret { border-left-width: 5px; border-right-width: 5px; border-top-width: 5px; } .btn-mini .caret, .btn-small .caret { margin-top: 8px; } // Upside down carets for .dropup .dropup .btn-large .caret { border-bottom-width: 5px; } // Account for other colors .btn-primary, .btn-warning, .btn-danger, .btn-info, .btn-success, .btn-inverse { .caret { border-top-color: @white; border-bottom-color: @white; } } // Vertical button groups // ---------------------- .btn-group-vertical { display: inline-block; // makes buttons only take up the width they need .ie7-inline-block(); } .btn-group-vertical > .btn { display: block; float: none; max-width: 100%; .border-radius(0); } .btn-group-vertical > .btn + .btn { margin-left: 0; margin-top: -1px; } .btn-group-vertical > .btn:first-child { .border-radius(@baseBorderRadius @baseBorderRadius 0 0); } .btn-group-vertical > .btn:last-child { .border-radius(0 0 @baseBorderRadius @baseBorderRadius); } .btn-group-vertical > .btn-large:first-child { .border-radius(@borderRadiusLarge @borderRadiusLarge 0 0); } .btn-group-vertical > .btn-large:last-child { .border-radius(0 0 @borderRadiusLarge @borderRadiusLarge); }
{ "pile_set_name": "Github" }
/** internal * class ActionContainer * * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]] **/ 'use strict'; var _ = require('underscore'); _.str = require('underscore.string'); // Constants var $$ = require('./const'); //Actions var ActionHelp = require('./action/help'); var ActionAppend = require('./action/append'); var ActionAppendConstant = require('./action/append/constant'); var ActionCount = require('./action/count'); var ActionStore = require('./action/store'); var ActionStoreConstant = require('./action/store/constant'); var ActionStoreTrue = require('./action/store/true'); var ActionStoreFalse = require('./action/store/false'); var ActionVersion = require('./action/version'); var ActionSubparsers = require('./action/subparsers'); // Errors var argumentErrorHelper = require('./argument/error'); /** * new ActionContainer(options) * * Action container. Parent for [[ArgumentParser]] and [[ArgumentGroup]] * * ##### Options: * * - `description` -- A description of what the program does * - `prefixChars` -- Characters that prefix optional arguments * - `argumentDefault` -- The default value for all arguments * - `conflictHandler` -- The conflict handler to use for duplicate arguments **/ var ActionContainer = module.exports = function ActionContainer(options) { options = options || {}; this.description = options.description; this.argumentDefault = options.argumentDefault; this.prefixChars = options.prefixChars || ''; this.conflictHandler = options.conflictHandler; // set up registries this._registries = {}; // register actions this.register('action', null, ActionStore); this.register('action', 'store', ActionStore); this.register('action', 'storeConst', ActionStoreConstant); this.register('action', 'storeTrue', ActionStoreTrue); this.register('action', 'storeFalse', ActionStoreFalse); this.register('action', 'append', ActionAppend); this.register('action', 'appendConst', ActionAppendConstant); this.register('action', 'count', ActionCount); this.register('action', 'help', ActionHelp); this.register('action', 'version', ActionVersion); this.register('action', 'parsers', ActionSubparsers); // action storage this._actions = []; this._optionStringActions = {}; // groups this._actionGroups = []; this._mutuallyExclusiveGroups = []; // defaults storage this._defaults = {}; // determines whether an "option" looks like a negative number this._regexpNegativeNumber = new RegExp('^-\\d+$|^-\\d*\\.\\d+$'); // whether or not there are any optionals that look like negative // numbers -- uses a list so it can be shared and edited this._hasNegativeNumberOptionals = []; }; // Groups must be required, then ActionContainer already defined var ArgumentGroup = require('./argument/group'); var MutuallyExclusiveGroup = require('./argument/exclusive'); // // Registration methods // /** * ActionContainer#register(registryName, value, object) -> Void * - registryName (String) : object type action|type * - value (string) : keyword * - object (Object|Function) : handler * * Register handlers **/ ActionContainer.prototype.register = function (registryName, value, object) { this._registries[registryName] = this._registries[registryName] || {}; this._registries[registryName][value] = object; }; ActionContainer.prototype._registryGet = function (registryName, value, defaultValue) { if (3 > arguments.length) { defaultValue = null; } return this._registries[registryName][value] || defaultValue; }; // // Namespace default accessor methods // /** * ActionContainer#setDefaults(options) -> Void * - options (object):hash of options see [[Action.new]] * * Set defaults **/ ActionContainer.prototype.setDefaults = function (options) { options = options || {}; for (var property in options) { this._defaults[property] = options[property]; } // if these defaults match any existing arguments, replace the previous // default on the object with the new one this._actions.forEach(function (action) { if (action.dest in options) { action.defaultValue = options[action.dest]; } }); }; /** * ActionContainer#getDefault(dest) -> Mixed * - dest (string): action destination * * Return action default value **/ ActionContainer.prototype.getDefault = function (dest) { var result = (_.has(this._defaults, dest)) ? this._defaults[dest] : null; this._actions.forEach(function (action) { if (action.dest === dest && _.has(action, 'defaultValue')) { result = action.defaultValue; } }); return result; }; // // Adding argument actions // /** * ActionContainer#addArgument(args, options) -> Object * - args (Array): array of argument keys * - options (Object): action objects see [[Action.new]] * * #### Examples * - addArgument([-f, --foo], {action:'store', defaultValue=1, ...}) * - addArgument(['bar'], action: 'store', nargs:1, ...}) **/ ActionContainer.prototype.addArgument = function (args, options) { args = args; options = options || {}; if (!_.isArray(args)) { throw new TypeError('addArgument first argument should be an array'); } if (!_.isObject(options) || _.isArray(options)) { throw new TypeError('addArgument second argument should be a hash'); } // if no positional args are supplied or only one is supplied and // it doesn't look like an option string, parse a positional argument if (!args || args.length === 1 && this.prefixChars.indexOf(args[0][0]) < 0) { if (args && !!options.dest) { throw new Error('dest supplied twice for positional argument'); } options = this._getPositional(args, options); // otherwise, we're adding an optional argument } else { options = this._getOptional(args, options); } // if no default was supplied, use the parser-level default if (_.isUndefined(options.defaultValue)) { var dest = options.dest; if (_.has(this._defaults, dest)) { options.defaultValue = this._defaults[dest]; } else if (!_.isUndefined(this.argumentDefault)) { options.defaultValue = this.argumentDefault; } } // create the action object, and add it to the parser var ActionClass = this._popActionClass(options); if (! _.isFunction(ActionClass)) { throw new Error(_.str.sprintf( 'Unknown action "%(action)s".', {action: ActionClass} )); } var action = new ActionClass(options); // throw an error if the action type is not callable var typeFunction = this._registryGet('type', action.type, action.type); if (!_.isFunction(typeFunction)) { throw new Error(_.str.sprintf( '"%(function)s" is not callable', {'function': typeFunction} )); } return this._addAction(action); }; /** * ActionContainer#addArgumentGroup(options) -> ArgumentGroup * - options (Object): hash of options see [[ArgumentGroup.new]] * * Create new arguments groups **/ ActionContainer.prototype.addArgumentGroup = function (options) { var group = new ArgumentGroup(this, options); this._actionGroups.push(group); return group; }; /** * ActionContainer#addMutuallyExclusiveGroup(options) -> ArgumentGroup * - options (Object): {required: false} * * Create new mutual exclusive groups **/ ActionContainer.prototype.addMutuallyExclusiveGroup = function (options) { var group = new MutuallyExclusiveGroup(this, options); this._mutuallyExclusiveGroups.push(group); return group; }; ActionContainer.prototype._addAction = function (action) { var self = this; // resolve any conflicts this._checkConflict(action); // add to actions list this._actions.push(action); action.container = this; // index the action by any option strings it has action.optionStrings.forEach(function (optionString) { self._optionStringActions[optionString] = action; }); // set the flag if any option strings look like negative numbers action.optionStrings.forEach(function (optionString) { if (optionString.match(self._regexpNegativeNumber)) { if (!_.any(self._hasNegativeNumberOptionals)) { self._hasNegativeNumberOptionals.push(true); } } }); // return the created action return action; }; ActionContainer.prototype._removeAction = function (action) { var actionIndex = this._actions.indexOf(action); if (actionIndex >= 0) { this._actions.splice(actionIndex); } }; ActionContainer.prototype._addContainerActions = function (container) { // collect groups by titles var titleGroupMap = {}; this._actionGroups.forEach(function (group) { if (titleGroupMap[group.title]) { throw new Error(_.str.sprintf('Cannot merge actions - two groups are named "%(group.title)s".', group)); } titleGroupMap[group.title] = group; }); // map each action to its group var groupMap = {}; function actionHash(action) { // unique (hopefully?) string suitable as dictionary key return action.getName(); } container._actionGroups.forEach(function (group) { // if a group with the title exists, use that, otherwise // create a new group matching the container's group if (!titleGroupMap[group.title]) { titleGroupMap[group.title] = this.addArgumentGroup({ title: group.title, description: group.description }); } // map the actions to their new group group._groupActions.forEach(function (action) { groupMap[actionHash(action)] = titleGroupMap[group.title]; }); }, this); // add container's mutually exclusive groups // NOTE: if add_mutually_exclusive_group ever gains title= and // description= then this code will need to be expanded as above var mutexGroup; container._mutuallyExclusiveGroups.forEach(function (group) { mutexGroup = this.addMutuallyExclusiveGroup({ required: group.required }); // map the actions to their new mutex group group._groupActions.forEach(function (action) { groupMap[actionHash(action)] = mutexGroup; }); }, this); // forEach takes a 'this' argument // add all actions to this container or their group container._actions.forEach(function (action) { var key = actionHash(action); if (!!groupMap[key]) { groupMap[key]._addAction(action); } else { this._addAction(action); } }); }; ActionContainer.prototype._getPositional = function (dest, options) { if (_.isArray(dest)) { dest = _.first(dest); } // make sure required is not specified if (options.required) { throw new Error('"required" is an invalid argument for positionals.'); } // mark positional arguments as required if at least one is // always required if (options.nargs !== $$.OPTIONAL && options.nargs !== $$.ZERO_OR_MORE) { options.required = true; } if (options.nargs === $$.ZERO_OR_MORE && options.defaultValue === undefined) { options.required = true; } // return the keyword arguments with no option strings options.dest = dest; options.optionStrings = []; return options; }; ActionContainer.prototype._getOptional = function (args, options) { var prefixChars = this.prefixChars; var optionStrings = []; var optionStringsLong = []; // determine short and long option strings args.forEach(function (optionString) { // error on strings that don't start with an appropriate prefix if (prefixChars.indexOf(optionString[0]) < 0) { throw new Error(_.str.sprintf('Invalid option string "%(option)s": must start with a "%(prefix)s".', { option: optionString, prefix: prefixChars })); } // strings starting with two prefix characters are long options optionStrings.push(optionString); if (optionString.length > 1 && prefixChars.indexOf(optionString[1]) >= 0) { optionStringsLong.push(optionString); } }); // infer dest, '--foo-bar' -> 'foo_bar' and '-x' -> 'x' var dest = options.dest || null; delete options.dest; if (!dest) { var optionStringDest = optionStringsLong.length ? optionStringsLong[0] :optionStrings[0]; dest = _.str.strip(optionStringDest, this.prefixChars); if (dest.length === 0) { throw new Error(_.str.sprintf( 'dest= is required for options like "%(option)s"', {option: optionStrings.join(', ')} )); } dest = dest.replace('-', '_'); } // return the updated keyword arguments options.dest = dest; options.optionStrings = optionStrings; return options; }; ActionContainer.prototype._popActionClass = function (options, defaultValue) { defaultValue = defaultValue || null; var action = (options.action || defaultValue); delete options.action; var actionClass = this._registryGet('action', action, action); return actionClass; }; ActionContainer.prototype._checkConflict = function (action) { var conflictHandler = this._container.conflictHandler; var optionStringActions = this._optionStringActions; var conflictOptionals = []; // find all options that conflict with this option action.optionStrings.forEach(function (optionString) { if (!!optionStringActions[optionString]) { conflictOptionals.push(optionString); } }); if (conflictOptionals.length > 0) { if (conflictHandler === 'resolve') { this._removeAction(optionStringActions['--glop']); return; } throw argumentErrorHelper( action, _.str.sprintf('Conflicting option string(s): %(conflict)s', { conflict: conflictOptionals.join(', ') }) ); } };
{ "pile_set_name": "Github" }
package com.tencent.mm.protocal.b; public final class asc extends com.tencent.mm.ax.a { public int kjA; public int kjB; public int kjy; public int kjz; protected final int a(int paramInt, Object... paramVarArgs) { if (paramInt == 0) { paramVarArgs = (a.a.a.c.a)paramVarArgs[0]; paramVarArgs.cw(1, kjy); paramVarArgs.cw(2, kjz); paramVarArgs.cw(3, kjA); paramVarArgs.cw(4, kjB); return 0; } if (paramInt == 1) { return a.a.a.a.cu(1, kjy) + 0 + a.a.a.a.cu(2, kjz) + a.a.a.a.cu(3, kjA) + a.a.a.a.cu(4, kjB); } if (paramInt == 2) { paramVarArgs = new a.a.a.a.a((byte[])paramVarArgs[0], jrk); for (paramInt = com.tencent.mm.ax.a.a(paramVarArgs); paramInt > 0; paramInt = com.tencent.mm.ax.a.a(paramVarArgs)) { if (!super.a(paramVarArgs, this, paramInt)) { paramVarArgs.bve(); } } return 0; } if (paramInt == 3) { a.a.a.a.a locala = (a.a.a.a.a)paramVarArgs[0]; asc localasc = (asc)paramVarArgs[1]; switch (((Integer)paramVarArgs[2]).intValue()) { default: return -1; case 1: kjy = mMY.id(); return 0; case 2: kjz = mMY.id(); return 0; case 3: kjA = mMY.id(); return 0; } kjB = mMY.id(); return 0; } return -1; } } /* Location: * Qualified Name: com.tencent.mm.protocal.b.asc * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
{ "pile_set_name": "Github" }
global.td = require('../../..') global.expect = require('expect') require('testdouble-jest')(td, jest) afterEach(function () { td.reset() })
{ "pile_set_name": "Github" }
<Project> <Import Project="..\Directory.Build.props" Condition="Exists('..\Directory.Build.props')" /> <Import Project="$(RepositoryRoot)build\loc\Localization.props" Condition="'$(Localize)' == 'true'" /> <PropertyGroup> <Servicable>true</Servicable> <EnableApiCheck>false</EnableApiCheck> <GenerateDocumentationFile>true</GenerateDocumentationFile> <!-- Suppress missing documentation warnings --> <NoWarn>$(NoWarn);CS1591</NoWarn> <!-- Embed PDBs in NuGet Packages --> <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder> </PropertyGroup> <ItemGroup> <PackageReference Include="Internal.AspNetCore.Sdk" PrivateAssets="All" Version="$(InternalAspNetCoreSdkPackageVersion)" /> </ItemGroup> </Project>
{ "pile_set_name": "Github" }
#include "stdafx.h" #include "dlg_scheduler.h" #include "dlg_scheduler_entry.h" Cdlg_scheduler::Cdlg_scheduler(CWnd* pParent): ETSLayoutDialog(Cdlg_scheduler::IDD, pParent, "Cdlg_scheduler") { //{{AFX_DATA_INIT(Cdlg_scheduler) //}}AFX_DATA_INIT } void Cdlg_scheduler::DoDataExchange(CDataExchange* pDX) { ETSLayoutDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(Cdlg_scheduler) DDX_Control(pDX, IDC_DELETE, m_delete); DDX_Control(pDX, IDC_EDIT, m_edit); DDX_Control(pDX, IDC_LIST, m_list); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(Cdlg_scheduler, ETSLayoutDialog) //{{AFX_MSG_MAP(Cdlg_scheduler) ON_BN_CLICKED(IDC_INSERT, OnInsert) ON_BN_CLICKED(IDC_EDIT, OnEdit) ON_BN_CLICKED(IDC_DELETE, OnDelete) ON_NOTIFY(LVN_GETDISPINFO, IDC_LIST, OnGetdispinfoList) ON_NOTIFY(NM_DBLCLK, IDC_LIST, OnDblclkList) ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST, OnItemchangedList) //}}AFX_MSG_MAP END_MESSAGE_MAP() BOOL Cdlg_scheduler::OnInitDialog() { ETSLayoutDialog::OnInitDialog(); update_controls(); CreateRoot(VERTICAL) << item(IDC_LIST, GREEDY) << (pane(HORIZONTAL, ABSOLUTE_VERT) << itemGrowing(HORIZONTAL) << item(IDC_INSERT, NORESIZE) << item(IDC_EDIT, NORESIZE) << item(IDC_DELETE, NORESIZE) << item(IDOK, NORESIZE) << item(IDCANCEL, NORESIZE) ) ; UpdateLayout(); m_list.InsertColumn(0, "Time"); m_list.InsertColumn(1, "Profile"); for (t_entries::const_iterator i = m_entries.begin(); i != m_entries.end(); i++) m_list.InsertItemData(i->first); m_list.auto_size(); return true; } void Cdlg_scheduler::OnInsert() { Cdlg_scheduler_entry dlg(this); dlg.profiles(m_profiles); if (IDOK != dlg.DoModal()) return; t_entry e; e.time = 60 * (60 * dlg.m_hours + dlg.m_minutes) + dlg.m_seconds; e.profile = dlg.m_profile_id; insert(e); m_list.auto_size(); } void Cdlg_scheduler::OnEdit() { int index = m_list.GetNextItem(-1, LVNI_SELECTED); if (index == -1) return; int id = m_list.GetItemData(index); t_entry& e = m_entries.find(id)->second; Cdlg_scheduler_entry dlg(this); dlg.profiles(m_profiles); dlg.m_hours = e.time / 3600; dlg.m_minutes = e.time % 3600 / 60; dlg.m_seconds = e.time % 60; dlg.m_profile_id = e.profile; if (IDOK != dlg.DoModal()) return; e.time = 60 * (60 * dlg.m_hours + dlg.m_minutes) + dlg.m_seconds; e.profile = dlg.m_profile_id; m_list.Update(index); } void Cdlg_scheduler::OnDelete() { int index; while ((index = m_list.GetNextItem(-1, LVNI_SELECTED)) != -1) { m_entries.erase(m_list.GetItemData(index)); m_list.DeleteItem(index); } } void Cdlg_scheduler::insert(const t_entry& e) { int id = m_entries.empty() ? 0 : m_entries.rbegin()->first + 1; m_entries[id] = e; if (m_list.GetSafeHwnd()) m_list.InsertItemData(id); } void Cdlg_scheduler::OnGetdispinfoList(NMHDR* pNMHDR, LRESULT* pResult) { LV_DISPINFO* pDispInfo = reinterpret_cast<LV_DISPINFO*>(pNMHDR); std::string& buffer = m_list.get_buffer(); const t_entry& e = m_entries.find(pDispInfo->item.lParam)->second; switch (pDispInfo->item.iSubItem) { case 0: { char b[9]; sprintf(b, "%02d:%02d:%02d", e.time / 3600, e.time / 60 % 60, e.time % 60); buffer = b; } break; case 1: buffer = m_profiles.find(e.profile)->second.name; break; } pDispInfo->item.pszText = const_cast<char*>(buffer.c_str()); *pResult = 0; } void Cdlg_scheduler::OnDblclkList(NMHDR* pNMHDR, LRESULT* pResult) { OnEdit(); *pResult = 0; } void Cdlg_scheduler::update_controls() { m_edit.EnableWindow(m_list.GetSelectedCount() == 1); m_delete.EnableWindow(m_list.GetSelectedCount()); } void Cdlg_scheduler::OnItemchangedList(NMHDR* pNMHDR, LRESULT* pResult) { update_controls(); *pResult = 0; }
{ "pile_set_name": "Github" }
--- title: 'Gestire e utilizzare una mailing list' slug: gestire_e_utilizzare_una_mailing_list excerpt: 'Come gestire e utilizzare una mailing list' section: 'Funzionalità degli indirizzi email' --- **Ultimo aggiornamento: 02/07/2020** ## Obiettivo Una mailing list ti consente di trasmettere informazioni a una lista di più destinatari, tramite l’invio di messaggi di posta collettivi agli iscritti al servizio. Questa soluzione può essere utile, ad esempio, per informare i tuoi clienti dell’uscita di un nuovo prodotto (sito e-commerce) o di un incontro (ad esempio, nel caso del sito di una Community). **Questa guida ti mostra come gestire la tua mailing list** ### Principio della moderazione Una mailing list può essere moderata per evitare che chiunque possa inviare email alla tua lista di contatti. Le mailing list moderate vengono utilizzate principalmente per inviare newsletter, mentre quelle non moderate possono servire, ad esempio, per creare una conversazione via email fra più iscritti. **Mailing list senza moderazione** ![Email](images/manage_mailing-lists_no-modarate.png){.thumbnail} Il mittente (sender) trasmette l’email alla mailing list, gli iscritti (subscribers) ricevono direttamente l’email. **Mailing list con moderazione** ![Email](images/manage_mailing-lists_modarate.png){.thumbnail} Il mittente (sender) trasmette l’email alla mailing list. Il moderatore (moderator) riceve una email con una richiesta di conferma o rifiuto. Se il moderatore conferma, gli iscritti (subscribers) ricevono l’email trasmessa alla mailing list. Se il moderatore rifiuta, l’email del mittente viene eliminata e gli iscritti non ricevono nulla. > [!warning] > > - una mailing list non è una soluzione per l’invio in massa di messaggi di Spam (massaggi pubblicitari) Questo tipo di utilizzo è tollerato in certa misura, finché non si rivela abusiva. > - un utente può decidere di cancellare il proprio contatto dalla mailing list in qualsiasi momento e può segnalare un abuso ogni volta che lo ritiene opportuno > ## Prerequisiti - Disponi di una soluzione MX Plan 100 o di un [hosting Web](https://www.ovh.com/fr/hebergement-web/){.external} adatto per le mailing list - Avere accesso allo [Spazio Cliente OVHcloud](https://www.ovh.com/manager/web/login/){.external} ## Procedura ### Crea la tua mailing list Per creare la tua mailing list, accedi al tuo [Spazio Cliente OVHcloud](http://www.ovh.com/manager/web){.external} e seleziona la scheda`Web`{.action} in alto. Una volta connesso, clicca su `Email`{.action} nella colonna a sinistra e poi sul dominio interessato. Vai alla scheda `Mailing list`{.action}del tuo servizio di posta elettronica. ![Email](images/manage_mailing-lists_01.png){.thumbnail} Le mailing list create vengono visualizzate nella tabella riepilogativa. Nel nostro esempio, è già stata creata una mailing list. Per creare una nuova mailing list, clicca su `Aggiungi una mailing list`{.action}. ![Email](images/manage_mailing-lists_02.png){.thumbnail} Completa la tabella inserendo le seguenti informazioni: | Campo | Descrizione | |---------------------------------- |------------------------------------------------------------------------------------------------------------------------ | | Nome | Il nome della tua mailing list | | Proprietario | Inserisci l’indirizzo email del proprietario della mailing list (sarà anche il moderatore) | | Rispondi a | definisci il/i destinatario/i quando un iscritto risponde alla mailing list | | Lingua | Seleziona la lingua della tua mailing list (traduzione delle email automatiche di iscrizione o cancellazione) | | Moderazione dei messaggi | il proprietario (o il moderatore) deve approvare le risposte | | Solo gli iscritti possono postare | Limita l’invio delle email sulla mailing list ai soli iscritti | | Chiunque può inviare messaggi (nessuna moderazione) | L’invio di un’email alla mailing list avviene direttamente senza conferma | | Moderazione degli iscritti | Il proprietario (o un moderatore) deve approvare le iscrizioni alla mailing list | ![Email](images/manage_mailing-lists_03.png){.thumbnail} > [!primary] > > Numero massimo di iscritti alla mailing list: > > - 5000 iscritti per le mailing list moderate > - 250 iscritti per le mailing list non moderate > ### Gestire le opzioni della mailing list Per modificare le opzioni della mailing list, clicca sui tre puntini `...`{.action}a destra della tua mailing list. È possibile aggiornare le opzioni, eliminare la mailing list oppure condividere la lista degli iscritti via email. ![Email](images/manage_mailing-lists_04.png){.thumbnail} ### Gestisci i tuoi iscritti Per gestire gli iscritti alla tua mailing list, clicca sull’icona a forma di silhouette umana nella sezione “Iscritti”. ![Email](images/manage_mailing-lists_05.png){.thumbnail} Si apre una nuova finestra: ![Email](images/manage_mailing-lists_06.png){.thumbnail} #### Aggiungi/Elimina contatti |Aggiungi contatti|Elimina contatti| |---|---| |Clicca su `Aggiungi contatti`{.action} a destra|Clicca su `Elimina da un file`{.action} a destra| |![Email](images/manage_mailing-lists_07.png){.thumbnail}|![Email](images/manage_mailing-lists_07b.png){.thumbnail}| Per aggiungere/eliminare iscritti alla mailing list, puoi: - inserire manualmente l’indirizzo cliccando su `Aggiungi un indirizzo email`{.action} - importare i contatti da un file di testo che contiene un indirizzo email per riga cliccando sull’icona del download posta sopra il campo di inserimento. #### Esporta la tua lista di contatti verso un file CSV Per generare un file CSV con tutti i tuoi contatti, clicca su `Esporta i contatti in CSV`{.action}. Nel nostro esempio questa opzione non è disponibile perché non sono stati aggiunti contatti. ### Gestisci i moderatori Per gestire i moderatori della tua mailing list, clicca sull’icona a forma di silhouette umana nella sezione “Moderatori”. ![Email](images/manage_mailing-lists_08.png){.thumbnail} Si apre una nuova finestra: ![Email](images/manage_mailing-lists_09.png){.thumbnail} #### Aggiungi/Elimina moderatori |Aggiungi moderatori|Elimina moderatori| |---|---| |Clicca su`Aggiungi moderatori`{.action}a destra.|Clicca su `Elimina da un file`{.action} a destra| |![Email](images/manage_mailing-lists_10.png){.thumbnail}|![Email](images/manage_mailing-lists_10b.png){.thumbnail}| Per aggiungere/eliminare moderatori, puoi: - inserire manualmente l’indirizzo cliccando su `Aggiungi un indirizzo email`{.action} - importare i contatti da un file di testo che contiene un indirizzo email per riga cliccando sull’icona del download posta sopra il campo di inserimento. > [!primary] > \- Quando su una mailing list vengono definiti più moderatori, la convalida di un solo moderatore è sufficiente perché l’email sia diffusa agli iscritti. > \- Quando un moderatore invia una email alla mailing list, soltanto lui riceve l’email di moderazione. > L’operazione può richiedere più o meno tempo, in base al numero di contatti da aggiungere. ### Iscriversi a una mailing list Per iscriversi alla tua mailing list, è sufficiente inviare una email a: ```bash [email protected] ``` ### Disiscriversi dalla tua mailing list Per disiscriversi dalla tua mailing list, è sufficiente inviare un email all’indirizzo: ```bash [email protected] ``` ### Elimina automaticamente gli indirizzi non validi Il sistema di mailing list non cancella un contatto dopo un solo messaggio di errore (messaggio non consegnato, indirizzo inesistente, ecc…). Dopo il primo errore, attende circa 12 giorni e poi invia una notifica all’iscritto, con i dettagli del messaggio non ricevuto. Se anche questo invio fallisce, il nostro sistema di mailing list attende altri 12 giorni e poi invia un messaggio di test. Se anche questo invio restituisce un messaggio di errore, il contatto viene cancellato dalla lista degli iscritti. ### Errori ricorrenti #### Invio di un messaggio senza Oggetto Un messaggio inviato a una mailing list deve contenere necessariamente un oggetto. In caso contrario, viene generato automaticamente un errore e il mittente riceverà questo messaggio: ```bash Hi. This is the qmail-send program at mx1.ovh.net. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. <[email protected]>: ezmlm-reject: fatal: Sorry, I don't accept message with empty Subject (#5.7.0) ``` #### Invio di un messaggio con l’indirizzo della mailing list in copia nascosta Per inviare un messaggio a una mailing list, l’indirizzo deve necessariamente essere inserito nel campo “A” o “Cc”. Se l’utente inserisce l’indirizzo in “Ccn”, riceverà questo messaggio di errore: ```bash Hi. This is the qmail-send program at mx1.ovh.net. I'm afraid I wasn't able to deliver your message to the following addresses. This is a permanent error; I've given up. Sorry it didn't work out. <[email protected]>: ezmlm-reject: fatal: List address must be in To: or Cc: (#5.7.0) ``` ### Personalizzazione avanzata In quanto moderatore, puoi personalizzare la maggior parte dei testi della tua mailing list inviando un messaggio vuoto a nome_tua_ML-[[email protected]](mailto:[email protected]){.external}. - Esempio: se la tua mailing list è [[email protected]](mailto:[email protected]){.external}, invia un messaggio a [[email protected]](mailto:[email protected]){.external}dal tuo indirizzo email moderatore. Riceverai una email con le informazioni necessarie per effettuare le tue modifiche. Qui di seguito trovi una lista dei file che contengono i testi delle risposte e una breve descrizione dell’utilizzo del loro contenuto. Per modificare un file, invia semplicemente un messaggio a invio-edit.file (inserisci il nome del file al posto di ‘file’). Riceverai un file di testo con le informazioni relative alla modifica. |File|Utilizzo| |---|---| |bottom|firma di tutte le risposte: informazioni generali| |digest|sezione “amministrativa” delle newsletter| |faq|risposta alle domande frequenti sull’argomento della lista| |get_bad|in caso di messaggi non presenti negli archivi| |help|aiuto generale (tra “top” e “bottom”)| |info|Informazioni relative alla lista La prima riga ne contiene una sintesi| |mod_help|aiuto specifico ai moderatori della lista|| |mod_reject|risposta inviata al mittente dei messaggi rifiutati| |mod_request|messaggio inviato ai moderatori| |mod_sub|messaggio inviato al contatto dopo la conferma di iscrizione da parte del moderatore| |mod_sub_confirm|messaggio inviato ai moderatori per confermare una richiesta di iscrizione| |mod_timeout|risposta inviata al mittente di un messaggio non valido dopo un tempo di attesa troppo lungo| |mod_unsub_confirm|messaggio inviato a un amministratore per richiedere la disiscrizione| |sub_bad|messaggio inviato all’iscritto in caso di richiesta non accettata| |sub_confirm|messaggio inviato all’iscritto per confermare la sua richiesta| |sub_nop|messaggio inviato all’iscritto dopo una nuova iscrizione| |sub_ok|messaggio inviato all’iscritto dopo la conferma della sua iscrizione| |top|intestazione di tutte le risposte| |trailer|aggiunto alla fine di ogni contributo alla lista| |unsub_bad|messaggio inviato all’iscritto se la conferma di disiscrizione non è valida| |unsub_confirm|messaggio inviato all’iscritto per richiedere la conferma di disiscrizione| |unsub_nop|messaggio inviato a un contatto non iscritto dopo una richiesta di disiscrizione| |unsub_ok|messaggio inviato a un ex-iscritto dopo una disiscrizione riuscita| > [!primary] > > Esempio: per modificare la firma predefinita delle email inviate alla tua mailing list, invia un messaggio all’indirizzo “[email protected]”. Riceverai una nuova email con le informazioni necessarie per la personalizzazione della tua firma. > ## Per saperne di più Contatta la nostra Community di utenti all’indirizzo https://community.ovh.com
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html> <head> <title>The page you were looking for doesn't exist (404)</title> <meta name="viewport" content="width=device-width,initial-scale=1"> <style> .rails-default-error-page { background-color: #EFEFEF; color: #2E2F30; text-align: center; font-family: arial, sans-serif; margin: 0; } .rails-default-error-page div.dialog { width: 95%; max-width: 33em; margin: 4em auto 0; } .rails-default-error-page div.dialog > div { border: 1px solid #CCC; border-right-color: #999; border-left-color: #999; border-bottom-color: #BBB; border-top: #B00100 solid 4px; border-top-left-radius: 9px; border-top-right-radius: 9px; background-color: white; padding: 7px 12% 0; box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); } .rails-default-error-page h1 { font-size: 100%; color: #730E15; line-height: 1.5em; } .rails-default-error-page div.dialog > p { margin: 0 0 1em; padding: 1em; background-color: #F7F7F7; border: 1px solid #CCC; border-right-color: #999; border-left-color: #999; border-bottom-color: #999; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-color: #DADADA; color: #666; box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17); } </style> </head> <body class="rails-default-error-page"> <!-- This file lives in public/404.html --> <div class="dialog"> <div> <h1>The page you were looking for doesn't exist.</h1> <p>You may have mistyped the address or the page may have moved.</p> </div> <p>If you are the application owner check the logs for more information.</p> </div> </body> </html>
{ "pile_set_name": "Github" }
--TEST-- Test tempnam() function: usage variations - various absolute and relative paths --SKIPIF-- <?php if(substr(PHP_OS, 0, 3) == "WIN") die("skip Do not run on Windows"); ?> --FILE-- <?php /* Prototype: string tempnam ( string $dir, string $prefix ); Description: Create file with unique file name. */ /* Creating unique files in various dirs by passing relative paths to $dir arg */ echo "*** Testing tempnam() with absolute and relative paths ***\n"; $dir_name = dirname(__FILE__)."/tempnam_variation2"; mkdir($dir_name); $dir_path = $dir_name."/tempnam_variation2_sub"; mkdir($dir_path); $old_dir_path = getcwd(); chdir(dirname(__FILE__)); $dir_paths = array( // absolute paths "$dir_path", "$dir_path/", "$dir_path/..", "$dir_path//../", "$dir_path/../.././tempnam_variation2", "$dir_path/..///tempnam_variation2_sub//..//../tempnam_variation2", "$dir_path/BADDIR", // relative paths ".", "tempname_variation2", "tempname_variation2/", "tempnam_variation2/tempnam_variation2_sub", "tempnam_variation2//tempnam_variation2_sub", "./tempnam_variation2/../tempnam_variation2/tempnam_variation2_sub", "BADDIR", ); for($i = 0; $i<count($dir_paths); $i++) { $j = $i+1; echo "\n-- Iteration $j --\n"; $file_name = tempnam($dir_paths[$i], "tempnam_variation2.tmp"); if( file_exists($file_name) ){ echo "File name is => "; print(realpath($file_name)); echo "\n"; echo "File permissions are => "; printf("%o", fileperms($file_name) ); echo "\n"; echo "File created in => "; $file_dir = dirname($file_name); $dir_req = $dir_paths[$i]; if (realpath($file_dir) == realpath(sys_get_temp_dir())) { echo "temp dir\n"; } else if ($file_dir == realpath($dir_req)) { echo "directory specified\n"; } else { echo "unknown location\n"; } } else { echo "-- File is not created --"; } unlink($file_name); } chdir($old_dir_path); rmdir($dir_path); rmdir($dir_name); echo "\n*** Done ***\n"; ?> --EXPECTF-- *** Testing tempnam() with absolute and relative paths *** -- Iteration 1 -- File name is => %s/tempnam_variation2/tempnam_variation2_sub/tempnam_variation2.tmp%s File permissions are => 100600 File created in => directory specified -- Iteration 2 -- File name is => %s/tempnam_variation2/tempnam_variation2_sub/tempnam_variation2.tmp%s File permissions are => 100600 File created in => directory specified -- Iteration 3 -- File name is => %s/tempnam_variation2/tempnam_variation2.tmp%s File permissions are => 100600 File created in => directory specified -- Iteration 4 -- File name is => %s/tempnam_variation2/tempnam_variation2.tmp%s File permissions are => 100600 File created in => directory specified -- Iteration 5 -- File name is => %s/tempnam_variation2/tempnam_variation2.tmp%s File permissions are => 100600 File created in => directory specified -- Iteration 6 -- File name is => %s/tempnam_variation2/tempnam_variation2.tmp%s File permissions are => 100600 File created in => directory specified -- Iteration 7 -- File name is => %s/tempnam_variation2.tmp%s File permissions are => 100600 File created in => temp dir -- Iteration 8 -- File name is => %s/tempnam_variation2.tmp%s File permissions are => 100600 File created in => directory specified -- Iteration 9 -- File name is => %s/tempnam_variation2.tmp%s File permissions are => 100600 File created in => temp dir -- Iteration 10 -- File name is => %s/tempnam_variation2.tmp%s File permissions are => 100600 File created in => temp dir -- Iteration 11 -- File name is => %s/tempnam_variation2/tempnam_variation2_sub/tempnam_variation2.tmp%s File permissions are => 100600 File created in => directory specified -- Iteration 12 -- File name is => %s/tempnam_variation2/tempnam_variation2_sub/tempnam_variation2.tmp%s File permissions are => 100600 File created in => directory specified -- Iteration 13 -- File name is => %s/tempnam_variation2/tempnam_variation2_sub/tempnam_variation2.tmp%s File permissions are => 100600 File created in => directory specified -- Iteration 14 -- File name is => %s/tempnam_variation2.tmp%s File permissions are => 100600 File created in => temp dir *** Done ***
{ "pile_set_name": "Github" }
#ifndef BOOST_MPL_VECTOR_VECTOR30_C_HPP_INCLUDED #define BOOST_MPL_VECTOR_VECTOR30_C_HPP_INCLUDED // Copyright Aleksey Gurtovoy 2000-2004 // // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // See http://www.boost.org/libs/mpl for documentation. // $Id$ // $Date$ // $Revision$ #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include <boost/mpl/vector/vector20_c.hpp> # include <boost/mpl/vector/vector30.hpp> #endif #include <boost/mpl/aux_/config/use_preprocessed.hpp> #if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER vector30_c.hpp # include <boost/mpl/vector/aux_/include_preprocessed.hpp> #else # include <boost/mpl/aux_/config/typeof.hpp> # include <boost/mpl/aux_/config/ctps.hpp> # include <boost/preprocessor/iterate.hpp> # include <boost/config.hpp> namespace boost { namespace mpl { # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(21, 30, <boost/mpl/vector/aux_/numbered_c.hpp>)) # include BOOST_PP_ITERATE() }} #endif // BOOST_MPL_CFG_USE_PREPROCESSED_HEADERS #endif // BOOST_MPL_VECTOR_VECTOR30_C_HPP_INCLUDED
{ "pile_set_name": "Github" }
// (C) Copyright Edward Diener 2011-2015 // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). #if !defined(BOOST_VMD_DETAIL_PARENS_COMMON_HPP) #define BOOST_VMD_DETAIL_PARENS_COMMON_HPP #include <boost/preprocessor/facilities/expand.hpp> #include <boost/preprocessor/punctuation/paren.hpp> #include <boost/vmd/empty.hpp> #define BOOST_VMD_DETAIL_BEGIN_PARENS_EXP2(...) ( __VA_ARGS__ ) BOOST_VMD_EMPTY BOOST_PP_LPAREN() #define BOOST_VMD_DETAIL_BEGIN_PARENS_EXP1(vseq) BOOST_VMD_DETAIL_BEGIN_PARENS_EXP2 vseq BOOST_PP_RPAREN() #define BOOST_VMD_DETAIL_BEGIN_PARENS(vseq) BOOST_PP_EXPAND(BOOST_VMD_DETAIL_BEGIN_PARENS_EXP1(vseq)) #define BOOST_VMD_DETAIL_AFTER_PARENS_DATA(vseq) BOOST_VMD_EMPTY vseq #define BOOST_VMD_DETAIL_SPLIT_PARENS(vseq) (BOOST_VMD_DETAIL_BEGIN_PARENS(vseq),BOOST_VMD_DETAIL_AFTER_PARENS_DATA(vseq)) #endif /* BOOST_VMD_DETAIL_PARENS_COMMON_HPP */
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>Eroare interna server</title> <style type="text/css"> /*<![CDATA[*/ body {font-family:"Verdana";font-weight:normal;color:black;background-color:white;} h1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red } h2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon } h3 {font-family:"Verdana";font-weight:bold;font-size:11pt} p {font-family:"Verdana";font-weight:normal;color:black;font-size:9pt;margin-top: -5px} .version {color: gray;font-size:8pt;border-top:1px solid #aaaaaa;} /*]]>*/ </style> </head> <body> <h1>Eroare interna server</h1> <h2><?php echo nl2br(CHtml::encode($data['message'])); ?></h2> <p> A aparut o eroare interna in timp ce serverul Web procesa cererea dvs. Va rugam contactati <?php echo $data['admin']; ?> pentru a raporta aceasta problema. </p> <p> Va multumim. </p> <div class="version"> <?php echo date('Y-m-d H:i:s',$data['time']) .' '. $data['version']; ?> </div> </body> </html>
{ "pile_set_name": "Github" }
<Type Name="NSFileCoordinatorWorker" FullName="MonoMac.Foundation.NSFileCoordinatorWorker"> <TypeSignature Language="C#" Value="public delegate void NSFileCoordinatorWorker(NSUrl newUrl);" /> <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed NSFileCoordinatorWorker extends System.MulticastDelegate" /> <AssemblyInfo> <AssemblyName>MonoMac</AssemblyName> <AssemblyVersion>0.0.0.0</AssemblyVersion> </AssemblyInfo> <Base> <BaseTypeName>System.Delegate</BaseTypeName> </Base> <Parameters> <Parameter Name="newUrl" Type="MonoMac.Foundation.NSUrl" /> </Parameters> <ReturnValue> <ReturnType>System.Void</ReturnType> </ReturnValue> <Docs> <param name="newUrl">To be added.</param> <summary>To be added.</summary> <remarks>To be added.</remarks> </Docs> </Type>
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <tablemodel id="SCaseNodeInfoSmsTbl" desc="手机短消息" tblName="S_MOBILESMS" pageSize="10" uniteTableModelId="" listURL="" sqlMapNamespace=""> <Fields> <TableField id="RID" colName="RID" desc="主键" dataType="VARCHAR" length="40" listGroupName="" webType="text" webTypeExt="" create="LVUA" hidden="LVUA" groupEnd="F" isSearch="F" fuzzy="F" orderInList="F" required="F" isPK="T" inputInList="F" forceNewRow="F" isRangeSearch="F"/> <TableField id="SMSSENDGROUP" colName="SMSSENDGROUP" desc="短信发送群体" dataType="VARCHAR" length="8" listGroupName="" webType="checkbox" webTypeExt="7" create="LVUA" hidden="LVU" groupEnd="F" isSearch="T" fuzzy="F" orderInList="F" required="F" isPK="F" inputInList="F" forceNewRow="F" isRangeSearch="F" dicType="S_DXFSQT_NODE"/> <TableField id="SMSCONTENT" colName="SMSCONTENT" desc="短消息内容" dataType="VARCHAR" length="200" listGroupName="" webType="textarea" webTypeExt="" create="LVUA" groupEnd="F" isSearch="F" fuzzy="F" orderInList="F" required="F" isPK="F" inputInList="F" forceNewRow="F" isRangeSearch="F"/> <TableField id="SENDSTATE" colName="SENDSTATE" desc="发送状态" dataType="CHAR" length="1" listGroupName="" dicType="S_FSZT" webType="select" webTypeExt="" create="LVUA" hidden="LAVU" groupEnd="F" isSearch="T" fuzzy="F" orderInList="F" required="T" isPK="F" inputInList="F" forceNewRow="F" isRangeSearch="F"/> <TableField id="SENDTIME" colName="SENDTIME" desc="发送时间" dataType="CHAR" length="20" listGroupName="" webType="text" webTypeExt="date" create="LVUA" hidden="LAVU" groupEnd="F" isSearch="F" fuzzy="F" orderInList="F" required="F" isPK="F" inputInList="F" forceNewRow="F" isRangeSearch="F"/> <TableField id="CREATTIME" colName="CREATTIME" desc="创建时间" dataType="CHAR" length="20" listGroupName="" webType="text" webTypeExt="date" create="LVUA" hidden="LVAU" groupEnd="F" isSearch="F" fuzzy="F" orderInList="F" required="F" isPK="F" inputInList="F" forceNewRow="F" isRangeSearch="F"/> </Fields> <SubTableModels> </SubTableModels> </tablemodel>
{ "pile_set_name": "Github" }
// ==LICENSE-BEGIN== // Copyright 2017 European Digital Reading Lab. All rights reserved. // Licensed to the Readium Foundation under one or more contributor license agreements. // Use of this source code is governed by a BSD-style license // that can be found in the LICENSE file exposed on Github (readium) in the project repository. // ==LICENSE-END== import { Contributor } from "@r2-shared-js/models/metadata-contributor"; import { IStringMap } from "@r2-shared-js/models/metadata-multilang"; import { diMainGet } from "readium-desktop/main/di"; // https://github.com/IDPF/epub3-samples/blob/master/30/regime-anticancer-arabic/EPUB/package.opf // // "author": [ // { // "name": { // "ar": "دافيد خيّاط لبروفيسورا", // "fr": "Pr David Khayat" // } // }, // { // "name": { // "ar": "اردو هاتر ناتالي", // "fr": "Nathalie Hutter-Lardeau" // } // } // ], // "translator": { // "name": { // "ar": "فيّاض خليل مارينا", // "fr": "Marina Khalil Fayad" // } // }, // "contributor": { // "name": "Vincent Gros", // "sortAs": "Gros, Vincent", // "role": "mrk" // }, // "publisher": "Hachette Antoine", // // tslint:disable-next-line: max-line-length // https://github.com/readium/webpub-manifest/blob/ff5c1e9e76ccc184d4d670179cfb70ced691fcec/schema/contributor-object.schema.json#L7-L24 // tslint:disable-next-line: max-line-length // https://github.com/readium/webpub-manifest/blob/ff5c1e9e76ccc184d4d670179cfb70ced691fcec/schema/metadata.schema.json#L15-L32 export function convertMultiLangStringToString(items: string | IStringMap | undefined): string { if (typeof items === "object") { // FIXME: main DI inside common utils!! const translator = diMainGet("translator"); const langs = Object.keys(items); const lang = langs.filter((l) => l.toLowerCase().includes(translator.getLocale().toLowerCase())); const localeLang = lang[0]; return items[localeLang] || items._ || items[langs[0]]; } return items; } // Note that the contributor JSON Schema applies to the serialized format: // https://github.com/readium/webpub-manifest/blob/master/schema/contributor.schema.json // https://github.com/readium/webpub-manifest/blob/master/schema/contributor-object.schema.json // // By contrast, // the in-memory data model (TypeScript) normalizes single items to one-length arrays, // as well as single-string names to expanded object. // See: // https://github.com/readium/r2-shared-js/blob/develop/test/test-JSON-Contributor.ts // https://github.com/readium/r2-shared-js/blob/develop/src/models/metadata-contributor-json-converter.ts // https://github.com/readium/r2-shared-js/blob/develop/src/models/metadata-contributor.ts export function convertContributorArrayToStringArray(items: Contributor[] | undefined): string[] { if (!items) { return []; } return items.map((item) => { if (typeof item.Name === "object") { return convertMultiLangStringToString(item.Name); } return item.Name; }); }
{ "pile_set_name": "Github" }
// // RequestWorkerDelegate.h // Splunk-iOS // // Created by G.Tas on 11/23/13. // Copyright (c) 2013 Splunk. All rights reserved. // #import <Foundation/Foundation.h> #import "MintResponseResult.h" #import "LoggedRequestEventArgs.h" #import "NetworkDataFixture.h" @protocol RequestWorkerDelegate <NSObject> @required - (void) loggedRequestHandledWithEventArgs: (LoggedRequestEventArgs*)args; - (void) pingEventCompletedWithResponse: (MintResponseResult*)splunkResponseResult; - (void) networkDataLogged: (NetworkDataFixture*)networkData; @end
{ "pile_set_name": "Github" }
/** * Merge object b with object a. * * var a = { foo: 'bar' } * , b = { bar: 'baz' }; * * merge(a, b); * // => { foo: 'bar', bar: 'baz' } * * @param {Object} a * @param {Object} b * @return {Object} * @api public */ exports = module.exports = function(a, b){ if (a && b) { for (var key in b) { a[key] = b[key]; } } return a; };
{ "pile_set_name": "Github" }
#include <itkPasteImageFilter.h> #include <itksys/SystemTools.hxx> #include "rtkTest.h" #include "rtkRayEllipsoidIntersectionImageFilter.h" #include "rtkDrawEllipsoidImageFilter.h" #include "rtkConstantImageSource.h" #include "rtkCyclicDeformationImageFilter.h" #include "rtkForwardWarpImageFilter.h" #include <itkWarpImageFilter.h> /** * \file rtkwarptest.cxx * * \brief Test for the itkWarpImageFilter and the rtkForwardWarpImageFilter * * This test generates a phantom, which consists of two * ellipsoids, and a Displacement Vector Field (DVF). It warps the phantom * backward (using the itkWarpImageFilter and trilinear interpolation) and then * forward (using the rtkForwardWarpImageFilter and trilinear splat), and * compares the result to the original phantom * * \author Cyril Mory */ int main(int, char **) { constexpr unsigned int Dimension = 3; using OutputPixelType = float; using OutputImageType = itk::Image<OutputPixelType, Dimension>; // Constant image sources using ConstantImageSourceType = rtk::ConstantImageSource<OutputImageType>; ConstantImageSourceType::PointType origin; ConstantImageSourceType::SizeType size; ConstantImageSourceType::SpacingType spacing; ConstantImageSourceType::Pointer tomographySource = ConstantImageSourceType::New(); origin[0] = -63.; origin[1] = -31.; origin[2] = -63.; #if FAST_TESTS_NO_CHECKS size[0] = 32; size[1] = 32; size[2] = 32; spacing[0] = 8.; spacing[1] = 8.; spacing[2] = 8.; #else size[0] = 64; size[1] = 32; size[2] = 64; spacing[0] = 2.; spacing[1] = 2.; spacing[2] = 2.; #endif tomographySource->SetOrigin(origin); tomographySource->SetSpacing(spacing); tomographySource->SetSize(size); tomographySource->SetConstant(0.); // Create vector field using DVFPixelType = itk::Vector<float, 3>; using DVFImageType = itk::Image<DVFPixelType, 3>; using IteratorType = itk::ImageRegionIteratorWithIndex<DVFImageType>; DVFImageType::Pointer deformationField = DVFImageType::New(); DVFImageType::IndexType startMotion; startMotion[0] = 0; // first index on X startMotion[1] = 0; // first index on Y startMotion[2] = 0; // first index on Z DVFImageType::SizeType sizeMotion; sizeMotion[0] = 64; // size along X sizeMotion[1] = 64; // size along Y sizeMotion[2] = 64; // size along Z DVFImageType::PointType originMotion; originMotion[0] = (sizeMotion[0] - 1) * (-0.5); // size along X originMotion[1] = (sizeMotion[1] - 1) * (-0.5); // size along Y originMotion[2] = (sizeMotion[2] - 1) * (-0.5); // size along Z DVFImageType::RegionType regionMotion; regionMotion.SetSize(sizeMotion); regionMotion.SetIndex(startMotion); deformationField->SetRegions(regionMotion); deformationField->SetOrigin(originMotion); deformationField->Allocate(); // Vector Field initilization DVFPixelType vec; vec.Fill(0.); IteratorType defIt(deformationField, deformationField->GetLargestPossibleRegion()); for (defIt.GoToBegin(); !defIt.IsAtEnd(); ++defIt) { vec.Fill(0.); vec[0] = 8.; defIt.Set(vec); } // Create a reference object (in this case a 3D phantom reference). // Ellipse 1 using DEType = rtk::DrawEllipsoidImageFilter<OutputImageType, OutputImageType>; DEType::Pointer e1 = DEType::New(); e1->SetInput(tomographySource->GetOutput()); e1->SetDensity(2.); DEType::VectorType axis; axis.Fill(60.); e1->SetAxis(axis); DEType::VectorType center; center.Fill(0.); e1->SetCenter(center); e1->SetAngle(0.); e1->InPlaceOff(); TRY_AND_EXIT_ON_ITK_EXCEPTION(e1->Update()) // Ellipse 2 DEType::Pointer e2 = DEType::New(); e2->SetInput(e1->GetOutput()); e2->SetDensity(-1.); DEType::VectorType axis2; axis2.Fill(8.); e2->SetAxis(axis2); DEType::VectorType center2; center2.Fill(0.); e2->SetCenter(center2); e2->SetAngle(0.); e2->InPlaceOff(); TRY_AND_EXIT_ON_ITK_EXCEPTION(e2->Update()) using WarpFilterType = itk::WarpImageFilter<OutputImageType, OutputImageType, DVFImageType>; WarpFilterType::Pointer warp = WarpFilterType::New(); warp->SetInput(e2->GetOutput()); warp->SetDisplacementField(deformationField); warp->SetOutputParametersFromImage(e2->GetOutput()); TRY_AND_EXIT_ON_ITK_EXCEPTION(warp->Update()); using ForwardWarpFilterType = rtk::ForwardWarpImageFilter<OutputImageType, OutputImageType, DVFImageType>; ForwardWarpFilterType::Pointer forwardWarp = ForwardWarpFilterType::New(); forwardWarp->SetInput(warp->GetOutput()); forwardWarp->SetDisplacementField(deformationField); forwardWarp->SetOutputParametersFromImage(warp->GetOutput()); TRY_AND_EXIT_ON_ITK_EXCEPTION(forwardWarp->Update()); CheckImageQuality<OutputImageType>(forwardWarp->GetOutput(), e2->GetOutput(), 0.1, 12, 2.0); std::cout << "Test PASSED! " << std::endl; return EXIT_SUCCESS; }
{ "pile_set_name": "Github" }
/* * YAFFS: Yet another Flash File System . A NAND-flash specific file system. * * Copyright (C) 2002-2011 Aleph One Ltd. * for Toby Churchill Ltd and Brightstar Engineering * * Created by Charles Manning <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 2.1 as * published by the Free Software Foundation. * * Note: Only YAFFS headers are LGPL, YAFFS C code is covered by GPL. */ #ifndef __YTRACE_H__ #define __YTRACE_H__ extern unsigned int yaffs_trace_mask; extern unsigned int yaffs_wr_attempts; /* * Tracing flags. * The flags masked in YAFFS_TRACE_ALWAYS are always traced. */ #define YAFFS_TRACE_OS 0x00000002 #define YAFFS_TRACE_ALLOCATE 0x00000004 #define YAFFS_TRACE_SCAN 0x00000008 #define YAFFS_TRACE_BAD_BLOCKS 0x00000010 #define YAFFS_TRACE_ERASE 0x00000020 #define YAFFS_TRACE_GC 0x00000040 #define YAFFS_TRACE_WRITE 0x00000080 #define YAFFS_TRACE_TRACING 0x00000100 #define YAFFS_TRACE_DELETION 0x00000200 #define YAFFS_TRACE_BUFFERS 0x00000400 #define YAFFS_TRACE_NANDACCESS 0x00000800 #define YAFFS_TRACE_GC_DETAIL 0x00001000 #define YAFFS_TRACE_SCAN_DEBUG 0x00002000 #define YAFFS_TRACE_MTD 0x00004000 #define YAFFS_TRACE_CHECKPOINT 0x00008000 #define YAFFS_TRACE_VERIFY 0x00010000 #define YAFFS_TRACE_VERIFY_NAND 0x00020000 #define YAFFS_TRACE_VERIFY_FULL 0x00040000 #define YAFFS_TRACE_VERIFY_ALL 0x000f0000 #define YAFFS_TRACE_SYNC 0x00100000 #define YAFFS_TRACE_BACKGROUND 0x00200000 #define YAFFS_TRACE_LOCK 0x00400000 #define YAFFS_TRACE_MOUNT 0x00800000 #define YAFFS_TRACE_ERROR 0x40000000 #define YAFFS_TRACE_BUG 0x80000000 #define YAFFS_TRACE_ALWAYS 0xf0000000 #endif
{ "pile_set_name": "Github" }
fails:Float#arg returns NaN if NaN fails:Float#arg returns self if NaN fails:Float#arg returns 0 if positive fails:Float#arg returns 0 if +0.0 fails:Float#arg returns 0 if +Infinity fails:Float#arg returns Pi if negative fails:Float#arg returns Pi if -0.0 fails:Float#arg returns Pi if -Infinity
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <Harvest xmlns="http://www.opengis.net/cat/csw/2.0.2" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:ows="http://www.opengis.net/ows" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-publication.xsd" service="CSW" version="2.0.2"> <Source>http://demo.pycsw.org/cite/csw</Source> <ResourceType>http://www.opengis.net/cat/csw/2.0.2</ResourceType> <ResourceFormat>application/xml</ResourceFormat> </Harvest>
{ "pile_set_name": "Github" }
<Project> <PropertyGroup> <AssemblyName>InterpFParsec</AssemblyName> <RootNamespace>InterpFParsec</RootNamespace> <OutputType>Exe</OutputType> <IsPackable>false</IsPackable> <StartArguments>$(MSBuildProjectDirectory)/../LexYaccVersion/test.lang</StartArguments> </PropertyGroup> <ItemGroup> <None Include="InterpFParsec.targets" /> <Compile Include="..\LexYaccVersion\ast.fs" /> <Compile Include="..\LexYaccVersion\interp.fs" /> <Compile Include="parser.fs" /> <Compile Include="main.fs" /> <None Include="..\LexYaccVersion\test.lang" /> </ItemGroup> <ItemGroup> <PackageReference Update="FSharp.Core" Version="4.3.4" /> </ItemGroup> </Project>
{ "pile_set_name": "Github" }
/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #include <aws/identity-management/auth/STSAssumeRoleCredentialsProvider.h> #include <aws/sts/model/AssumeRoleRequest.h> #include <aws/sts/STSClient.h> #include <aws/core/utils/Outcome.h> #include <aws/core/utils/DateTime.h> #include <aws/external/gtest.h> using namespace Aws::Auth; using namespace Aws::STS; using namespace Aws::Utils; namespace { class MockSTSClient : public STSClient { public: MockSTSClient() : STSClient(AWSCredentials()), m_calledCount(0) {} Model::AssumeRoleOutcome AssumeRole(const Model::AssumeRoleRequest& request) const { m_calledCount++; m_capturedRequest = request; return m_mockedOutcome; } void MockAssumeRole(const Model::AssumeRoleOutcome& outcome) { m_mockedOutcome = outcome; } Model::AssumeRoleRequest CapturedRequest() const { return m_capturedRequest; } int CalledCount() const { return m_calledCount; } private: mutable int m_calledCount; mutable Model::AssumeRoleRequest m_capturedRequest; Model::AssumeRoleOutcome m_mockedOutcome; }; static const char* CLASS_TAG = "STSAssumeRoleCredentialsProviderTest"; static const char* ROLE_ARN = "arn:blah:blah:blah"; static const char* EXTERNAL_ID = "externalId"; static const char* SESSION_NAME = "sessionName"; static const char* ACCESS_KEY_ID_1 = "accessKeyId1"; static const char* SECRET_ACCESS_KEY_ID_1 = "secretAccessKeyId1"; static const char* SESSION_TOKEN_1 = "sessionToken1"; static const char* ACCESS_KEY_ID_2 = "accessKeyId2"; static const char* SECRET_ACCESS_KEY_ID_2 = "secretAccessKeyId2"; static const char* SESSION_TOKEN_2 = "sessionToken2"; TEST(STSAssumeRoleCredentialsProviderTest, TestCredentialsLoadAndCache) { auto stsClient = Aws::MakeShared<MockSTSClient>(CLASS_TAG); DateTime expiryTime(DateTime::CurrentTimeMillis() + 70000); Model::Credentials stsCredentials; stsCredentials.WithAccessKeyId(ACCESS_KEY_ID_1) .WithSecretAccessKey(SECRET_ACCESS_KEY_ID_1) .WithSessionToken(SESSION_TOKEN_1) .WithExpiration(expiryTime); Model::AssumeRoleResult assumeRoleResult; assumeRoleResult.SetCredentials(stsCredentials); stsClient->MockAssumeRole(assumeRoleResult); STSAssumeRoleCredentialsProvider credsProvider(ROLE_ARN, SESSION_NAME, EXTERNAL_ID, DEFAULT_CREDS_LOAD_FREQ_SECONDS, stsClient); auto credentials = credsProvider.GetAWSCredentials(); ASSERT_STREQ(ACCESS_KEY_ID_1, credentials.GetAWSAccessKeyId().c_str()); ASSERT_STREQ(SECRET_ACCESS_KEY_ID_1, credentials.GetAWSSecretKey().c_str()); ASSERT_STREQ(SESSION_TOKEN_1, credentials.GetSessionToken().c_str()); auto request = stsClient->CapturedRequest(); ASSERT_EQ(1, stsClient->CalledCount()); ASSERT_STREQ(SESSION_NAME, request.GetRoleSessionName().c_str()); ASSERT_STREQ(ROLE_ARN, request.GetRoleArn().c_str()); ASSERT_EQ(DEFAULT_CREDS_LOAD_FREQ_SECONDS, request.GetDurationSeconds()); ASSERT_STREQ(EXTERNAL_ID, request.GetExternalId().c_str()); credentials = credsProvider.GetAWSCredentials(); ASSERT_STREQ(ACCESS_KEY_ID_1, credentials.GetAWSAccessKeyId().c_str()); ASSERT_STREQ(SECRET_ACCESS_KEY_ID_1, credentials.GetAWSSecretKey().c_str()); ASSERT_STREQ(SESSION_TOKEN_1, credentials.GetSessionToken().c_str()); ASSERT_EQ(DEFAULT_CREDS_LOAD_FREQ_SECONDS, request.GetDurationSeconds()); //we should not have called multiple times. ASSERT_EQ(1, stsClient->CalledCount()); } TEST(STSAssumeRoleCredentialsProviderTest, TestCredentialsCacheExpiry) { auto stsClient = Aws::MakeShared<MockSTSClient>(CLASS_TAG); DateTime expiryTime(DateTime::CurrentTimeMillis() + 61000); Model::Credentials stsCredentials; stsCredentials.WithAccessKeyId(ACCESS_KEY_ID_1) .WithSecretAccessKey(SECRET_ACCESS_KEY_ID_1) .WithSessionToken(SESSION_TOKEN_1) .WithExpiration(expiryTime); Model::AssumeRoleResult assumeRoleResult; assumeRoleResult.SetCredentials(stsCredentials); stsClient->MockAssumeRole(assumeRoleResult); STSAssumeRoleCredentialsProvider credsProvider(ROLE_ARN, SESSION_NAME, EXTERNAL_ID, DEFAULT_CREDS_LOAD_FREQ_SECONDS, stsClient); auto credentials = credsProvider.GetAWSCredentials(); ASSERT_STREQ(ACCESS_KEY_ID_1, credentials.GetAWSAccessKeyId().c_str()); ASSERT_STREQ(SECRET_ACCESS_KEY_ID_1, credentials.GetAWSSecretKey().c_str()); ASSERT_STREQ(SESSION_TOKEN_1, credentials.GetSessionToken().c_str()); auto request = stsClient->CapturedRequest(); ASSERT_EQ(1, stsClient->CalledCount()); ASSERT_STREQ(SESSION_NAME, request.GetRoleSessionName().c_str()); ASSERT_STREQ(ROLE_ARN, request.GetRoleArn().c_str()); ASSERT_EQ(DEFAULT_CREDS_LOAD_FREQ_SECONDS, request.GetDurationSeconds()); ASSERT_STREQ(EXTERNAL_ID, request.GetExternalId().c_str()); stsCredentials.WithAccessKeyId(ACCESS_KEY_ID_2) .WithSecretAccessKey(SECRET_ACCESS_KEY_ID_2) .WithSessionToken(SESSION_TOKEN_2) .WithExpiration(expiryTime); assumeRoleResult.SetCredentials(stsCredentials); stsClient->MockAssumeRole(assumeRoleResult); std::this_thread::sleep_for(std::chrono::seconds(1)); credentials = credsProvider.GetAWSCredentials(); request = stsClient->CapturedRequest(); ASSERT_STREQ(ACCESS_KEY_ID_2, credentials.GetAWSAccessKeyId().c_str()); ASSERT_STREQ(SECRET_ACCESS_KEY_ID_2, credentials.GetAWSSecretKey().c_str()); ASSERT_STREQ(SESSION_TOKEN_2, credentials.GetSessionToken().c_str()); ASSERT_EQ(DEFAULT_CREDS_LOAD_FREQ_SECONDS, request.GetDurationSeconds()); ASSERT_STREQ(EXTERNAL_ID, request.GetExternalId().c_str()); //should have been called twice. ASSERT_EQ(2, stsClient->CalledCount()); } //Fail once then make sure next call recovers. TEST(STSAssumeRoleCredentialsProviderTest, TestCredentialsErrorThenRecovery) { auto stsClient = Aws::MakeShared<MockSTSClient>(CLASS_TAG); STSAssumeRoleCredentialsProvider credsProvider(ROLE_ARN, SESSION_NAME, EXTERNAL_ID, DEFAULT_CREDS_LOAD_FREQ_SECONDS, stsClient); Aws::Client::AWSError<STSErrors> error(STSErrors::INVALID_ACTION, "blah", "blah", false); stsClient->MockAssumeRole(error); auto credentials = credsProvider.GetAWSCredentials(); ASSERT_TRUE(credentials.GetAWSAccessKeyId().empty()); ASSERT_TRUE(credentials.GetAWSSecretKey().empty()); ASSERT_TRUE(credentials.GetSessionToken().empty()); auto request = stsClient->CapturedRequest(); ASSERT_EQ(1, stsClient->CalledCount()); ASSERT_STREQ(SESSION_NAME, request.GetRoleSessionName().c_str()); ASSERT_STREQ(ROLE_ARN, request.GetRoleArn().c_str()); ASSERT_EQ(DEFAULT_CREDS_LOAD_FREQ_SECONDS, request.GetDurationSeconds()); ASSERT_STREQ(EXTERNAL_ID, request.GetExternalId().c_str()); DateTime expiryTime(DateTime::CurrentTimeMillis() + 61000); Model::Credentials stsCredentials; stsCredentials.WithAccessKeyId(ACCESS_KEY_ID_1) .WithSecretAccessKey(SECRET_ACCESS_KEY_ID_1) .WithSessionToken(SESSION_TOKEN_1) .WithExpiration(expiryTime); Model::AssumeRoleResult assumeRoleResult; assumeRoleResult.SetCredentials(stsCredentials); stsClient->MockAssumeRole(assumeRoleResult); credentials = credsProvider.GetAWSCredentials(); request = stsClient->CapturedRequest(); ASSERT_STREQ(ACCESS_KEY_ID_1, credentials.GetAWSAccessKeyId().c_str()); ASSERT_STREQ(SECRET_ACCESS_KEY_ID_1, credentials.GetAWSSecretKey().c_str()); ASSERT_STREQ(SESSION_TOKEN_1, credentials.GetSessionToken().c_str()); ASSERT_EQ(DEFAULT_CREDS_LOAD_FREQ_SECONDS, request.GetDurationSeconds()); ASSERT_STREQ(EXTERNAL_ID, request.GetExternalId().c_str()); //should have been called twice. ASSERT_EQ(2, stsClient->CalledCount()); } }
{ "pile_set_name": "Github" }
/* Generated by RuntimeBrowser. */ @protocol SBFBlockStatusProvider <NSObject> @required - (bool)isBlocked; - (bool)isPermanentlyBlocked; - (bool)isTemporarilyBlocked; - (bool)isThermallyBlocked; - (double)timeIntervalUntilUnblockedSinceReferenceDate; @end
{ "pile_set_name": "Github" }
# Add project specific ProGuard rules here. # By default, the flags in this file are appended to flags specified # in /Users/Carry/Documents/sdk/tools/proguard/proguard-android.txt # You can edit the include path and order by changing the proguardFiles # directive in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # Add any project specific keep options here: # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #}
{ "pile_set_name": "Github" }
{ "kind": "Template", "apiVersion": "v1", "metadata": { "annotations": { "description": "Application template for Red Hat JBoss BPM Suite 6.4 intelligent process server AMQ and PostgreSQL applications built using S2I.", "iconClass": "icon-processserver", "tags": "processserver,jboss,hidden", "version": "1.4.8", "openshift.io/display-name": "JBoss BPM Suite 6.4 intelligent process server + A-MQ + PostgreSQL (Ephemeral with https)", "openshift.io/provider-display-name": "Red Hat, Inc.", "description": "An example BPM Suite application with A-MQ and a PostgreSQL database. For more information about using this template, see https://github.com/jboss-openshift/application-templates.", "template.openshift.io/long-description": "This template defines resources needed to develop Red Hat Business Process Suite intelligent process server 6.4 based application, including a build configuration, application deployment configuration, Red Hat A-MQ for messaging broker, database deployment configuration for PostgreSQL using ephemeral (temporary) storage and secure communication using https.", "template.openshift.io/documentation-url": "https://access.redhat.com/documentation/en/red-hat-jboss-bpm-suite/", "template.openshift.io/support-url": "https://access.redhat.com" }, "name": "processserver64-amq-postgresql-s2i" }, "labels": { "template": "processserver64-amq-postgresql-s2i", "xpaas": "1.4.8" }, "message": "A new BPMS application (using PostgreSQL and A-MQ) has been created in your project. The username/password for accessing the KIE Server REST or JMS interface is ${KIE_SERVER_USER}/${KIE_SERVER_PASSWORD}. For accessing the MySQL database \"${DB_DATABASE}\" use the credentials ${DB_USERNAME}/${DB_PASSWORD}. And for the A-MQ service use the credentials ${MQ_USERNAME}/${MQ_PASSWORD}. Please be sure to create the secret named \"${HTTPS_SECRET}\" containing the ${HTTPS_KEYSTORE} file used for serving secure content.", "parameters": [ { "displayName": "KIE Container Deployment", "description": "The KIE Container deployment configuration in format: containerId=groupId:artifactId:version|c2=g2:a2:v2", "name": "KIE_CONTAINER_DEPLOYMENT", "value": "processserver-library=org.openshift.quickstarts:processserver-library:1.3.0.Final", "required": false }, { "displayName": "KIE Server Protocol", "description": "The protocol to access the KIE Server REST interface.", "name": "KIE_SERVER_PROTOCOL", "value": "https", "required": false }, { "displayName": "KIE Server Port", "description": "The port to access the KIE Server REST interface.", "name": "KIE_SERVER_PORT", "value": "8443", "required": false }, { "displayName": "KIE Server Username", "description": "The user name to access the KIE Server REST or JMS interface.", "name": "KIE_SERVER_USER", "value": "kieserver", "required": false }, { "displayName": "KIE Server Password", "description": "The password to access the KIE Server REST or JMS interface. Must be different than username; must not be root, admin, or administrator; must contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), and 1 non-alphanumeric symbol(s).", "name": "KIE_SERVER_PASSWORD", "from": "[a-zA-Z]{6}[0-9]{1}!", "generate": "expression", "required": false }, { "displayName": "KIE Server Domain", "description": "JAAS LoginContext domain that shall be used to authenticate users when using JMS.", "name": "KIE_SERVER_DOMAIN", "value": "other", "required": false }, { "displayName": "KIE Server JMS Queues Request", "description": "JNDI name of request queue for JMS.", "name": "KIE_SERVER_JMS_QUEUES_REQUEST", "value": "queue/KIE.SERVER.REQUEST", "required": false }, { "displayName": "KIE Server JMS Queues Response", "description": "JNDI name of response queue for JMS.", "name": "KIE_SERVER_JMS_QUEUES_RESPONSE", "value": "queue/KIE.SERVER.RESPONSE", "required": false }, { "displayName": "KIE Server Executor JMS Queue", "description": "JNDI name of executor queue for JMS.", "name": "KIE_SERVER_EXECUTOR_JMS_QUEUE", "value": "queue/KIE.SERVER.EXECUTOR", "required": false }, { "displayName": "KIE Server Persistence Dialect", "description": "Hibernate persistence dialect.", "name": "KIE_SERVER_PERSISTENCE_DIALECT", "value": "org.hibernate.dialect.PostgreSQL82Dialect", "required": false }, { "displayName": "Application Name", "description": "The name for the application.", "name": "APPLICATION_NAME", "value": "kie-app", "required": true }, { "displayName": "Custom http Route Hostname", "description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>-<project>.<default-domain-suffix>", "name": "HOSTNAME_HTTP", "value": "", "required": false }, { "displayName": "Custom https Route Hostname", "description": "Custom hostname for https service route. Leave blank for default hostname, e.g.: secure-<application-name>-<project>.<default-domain-suffix>", "name": "HOSTNAME_HTTPS", "value": "", "required": false }, { "displayName": "Git Repository URL", "description": "Git source URI for application", "name": "SOURCE_REPOSITORY_URL", "value": "https://github.com/jboss-openshift/openshift-quickstarts", "required": true }, { "displayName": "Git Reference", "description": "Git branch/tag reference", "name": "SOURCE_REPOSITORY_REF", "value": "1.3", "required": false }, { "displayName": "Context Directory", "description": "Path within Git project to build; empty for root project directory.", "name": "CONTEXT_DIR", "value": "processserver/library", "required": false }, { "displayName": "Database JNDI Name", "description": "Database JNDI name used by application to resolve the datasource, e.g. java:/jboss/datasources/ExampleDS", "name": "DB_JNDI", "value": "java:jboss/datasources/ExampleDS", "required": false }, { "displayName": "Database Name", "description": "Database name", "name": "DB_DATABASE", "value": "root", "required": true }, { "displayName": "JMS Connection Factory JNDI Name", "description": "JNDI name for connection factory used by applications to connect to the broker, e.g. java:/JmsXA", "name": "MQ_JNDI", "value": "java:/JmsXA", "required": false }, { "displayName": "A-MQ Protocols", "description": "Broker protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp` and `mqtt`. Only `openwire` is supported by EAP.", "name": "MQ_PROTOCOL", "value": "openwire", "required": false }, { "displayName": "Queues", "description": "Queue names, separated by commas. These queues will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP.", "name": "MQ_QUEUES", "value": "KIE.SERVER.REQUEST,KIE.SERVER.RESPONSE,KIE.SERVER.EXECUTOR", "required": false }, { "displayName": "Topics", "description": "Topic names, separated by commas. These topics will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP.", "name": "MQ_TOPICS", "value": "", "required": false }, { "displayName": "Server Keystore Secret Name", "description": "The name of the secret containing the keystore file", "name": "HTTPS_SECRET", "value": "processserver-app-secret", "required": false }, { "displayName": "Server Keystore Filename", "description": "The name of the keystore file within the secret", "name": "HTTPS_KEYSTORE", "value": "keystore.jks", "required": false }, { "displayName": "Server Certificate Name", "description": "The name associated with the server certificate", "name": "HTTPS_NAME", "value": "jboss", "required": false }, { "displayName": "Server Keystore Password", "description": "The password for the keystore and certificate", "name": "HTTPS_PASSWORD", "value": "mykeystorepass", "required": false }, { "displayName": "Database Username", "description": "Database user name", "name": "DB_USERNAME", "from": "user[a-zA-Z0-9]{3}", "generate": "expression", "required": true }, { "displayName": "Database Password", "description": "Database user password", "name": "DB_PASSWORD", "from": "[a-zA-Z0-9]{8}", "generate": "expression", "required": true }, { "displayName": "Datasource Minimum Pool Size", "description": "Sets xa-pool/min-pool-size for the configured datasource.", "name": "DB_MIN_POOL_SIZE", "required": false }, { "displayName": "Datasource Maximum Pool Size", "description": "Sets xa-pool/max-pool-size for the configured datasource.", "name": "DB_MAX_POOL_SIZE", "required": false }, { "displayName": "Datasource Transaction Isolation", "description": "Sets transaction-isolation for the configured datasource.", "name": "DB_TX_ISOLATION", "required": false }, { "displayName": "PostgreSQL Maximum number of connections", "description": "The maximum number of client connections allowed. This also sets the maximum number of prepared transactions.", "name": "POSTGRESQL_MAX_CONNECTIONS", "required": false }, { "displayName": "PostgreSQL Shared Buffers", "description": "Configures how much memory is dedicated to PostgreSQL for caching data.", "name": "POSTGRESQL_SHARED_BUFFERS", "required": false }, { "displayName": "A-MQ Username", "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.", "name": "MQ_USERNAME", "from": "user[a-zA-Z0-9]{3}", "generate": "expression", "required": false }, { "displayName": "A-MQ Password", "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.", "name": "MQ_PASSWORD", "from": "[a-zA-Z0-9]{8}", "generate": "expression", "required": false }, { "displayName": "A-MQ Mesh Discovery Type", "description": "The discovery agent type to use for discovering mesh endpoints. 'dns' will use OpenShift's DNS service to resolve endpoints. 'kube' will use Kubernetes REST API to resolve service endpoints. If using 'kube' the service account for the pod must have the 'view' role, which can be added via 'oc policy add-role-to-user view system:serviceaccount:<namespace>:default' where <namespace> is the project namespace.", "name": "AMQ_MESH_DISCOVERY_TYPE", "value": "dns", "required": false }, { "displayName": "A-MQ Storage Limit", "description": "The A-MQ storage usage limit", "name": "AMQ_STORAGE_USAGE_LIMIT", "value": "100 gb", "required": false }, { "displayName": "Github Webhook Secret", "description": "GitHub trigger secret", "name": "GITHUB_WEBHOOK_SECRET", "from": "[a-zA-Z0-9]{8}", "generate": "expression", "required": true }, { "displayName": "Generic Webhook Secret", "description": "Generic build trigger secret", "name": "GENERIC_WEBHOOK_SECRET", "from": "[a-zA-Z0-9]{8}", "generate": "expression", "required": true }, { "displayName": "ImageStream Namespace", "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.", "name": "IMAGE_STREAM_NAMESPACE", "value": "openshift", "required": true }, { "displayName": "Maven mirror URL", "description": "Maven mirror to use for S2I builds", "name": "MAVEN_MIRROR_URL", "value": "", "required": false }, { "description": "List of directories from which archives will be copied into the deployment folder. If unspecified, all archives in /target will be copied.", "name": "ARTIFACT_DIR", "value": "", "required": false }, { "displayName": "PostgreSQL Image Stream Tag", "description": "The tag to use for the \"postgresql\" image stream. Typically, this aligns with the major.minor version of PostgreSQL.", "name": "POSTGRESQL_IMAGE_STREAM_TAG", "value": "9.5", "required": true }, { "description": "Container memory limit", "name": "MEMORY_LIMIT", "value": "1Gi", "required": false } ], "objects": [ { "kind": "Service", "apiVersion": "v1", "spec": { "ports": [ { "port": 8080, "targetPort": 8080 } ], "selector": { "deploymentConfig": "${APPLICATION_NAME}" } }, "metadata": { "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, "annotations": { "description": "The web server's http port.", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${APPLICATION_NAME}-postgresql\", \"kind\": \"Service\"},{\"name\": \"${APPLICATION_NAME}-amq-tcp\", \"kind\": \"Service\"}]" } } }, { "kind": "Service", "apiVersion": "v1", "spec": { "ports": [ { "port": 8443, "targetPort": 8443 } ], "selector": { "deploymentConfig": "${APPLICATION_NAME}" } }, "metadata": { "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, "annotations": { "description": "The web server's https port.", "service.alpha.openshift.io/dependencies": "[{\"name\": \"${APPLICATION_NAME}-postgresql\", \"kind\": \"Service\"},{\"name\": \"${APPLICATION_NAME}-amq-tcp\", \"kind\": \"Service\"}]" } } }, { "kind": "Service", "apiVersion": "v1", "spec": { "ports": [ { "port": 5432, "targetPort": 5432 } ], "selector": { "deploymentConfig": "${APPLICATION_NAME}-postgresql" } }, "metadata": { "name": "${APPLICATION_NAME}-postgresql", "labels": { "application": "${APPLICATION_NAME}" }, "annotations": { "description": "The database server's port." } } }, { "kind": "Service", "apiVersion": "v1", "spec": { "ports": [ { "port": 61616, "targetPort": 61616 } ], "selector": { "deploymentConfig": "${APPLICATION_NAME}-amq" } }, "metadata": { "name": "${APPLICATION_NAME}-amq-tcp", "labels": { "application": "${APPLICATION_NAME}" }, "annotations": { "description": "The broker's OpenWire port." } } }, { "kind": "Service", "apiVersion": "v1", "spec": { "clusterIP": "None", "ports": [ { "name": "mesh", "port": 61616 } ], "selector": { "deploymentConfig": "${APPLICATION_NAME}-amq" } }, "metadata": { "name": "${APPLICATION_NAME}-amq-mesh", "labels": { "application": "${APPLICATION_NAME}" }, "annotations": { "service.alpha.kubernetes.io/tolerate-unready-endpoints": "true", "description": "Supports node discovery for mesh formation." } } }, { "kind": "Route", "apiVersion": "v1", "id": "${APPLICATION_NAME}-http", "metadata": { "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, "annotations": { "description": "Route for application's http service." } }, "spec": { "host": "${HOSTNAME_HTTP}", "to": { "name": "${APPLICATION_NAME}" } } }, { "kind": "Route", "apiVersion": "v1", "id": "${APPLICATION_NAME}-https", "metadata": { "name": "secure-${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" }, "annotations": { "description": "Route for application's https service." } }, "spec": { "host": "${HOSTNAME_HTTPS}", "to": { "name": "secure-${APPLICATION_NAME}" }, "tls": { "termination": "passthrough" } } }, { "kind": "ImageStream", "apiVersion": "v1", "metadata": { "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" } } }, { "kind": "BuildConfig", "apiVersion": "v1", "metadata": { "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" } }, "spec": { "source": { "type": "Git", "git": { "uri": "${SOURCE_REPOSITORY_URL}", "ref": "${SOURCE_REPOSITORY_REF}" }, "contextDir": "${CONTEXT_DIR}" }, "strategy": { "type": "Source", "sourceStrategy": { "env": [ { "name": "KIE_CONTAINER_DEPLOYMENT", "value": "${KIE_CONTAINER_DEPLOYMENT}" }, { "name": "MAVEN_MIRROR_URL", "value": "${MAVEN_MIRROR_URL}" }, { "name": "ARTIFACT_DIR", "value": "${ARTIFACT_DIR}" } ], "forcePull": true, "from": { "kind": "ImageStreamTag", "namespace": "${IMAGE_STREAM_NAMESPACE}", "name": "jboss-processserver64-openshift:1.2" } } }, "output": { "to": { "kind": "ImageStreamTag", "name": "${APPLICATION_NAME}:latest" } }, "triggers": [ { "type": "GitHub", "github": { "secret": "${GITHUB_WEBHOOK_SECRET}" } }, { "type": "Generic", "generic": { "secret": "${GENERIC_WEBHOOK_SECRET}" } }, { "type": "ImageChange", "imageChange": {} }, { "type": "ConfigChange" } ] } }, { "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { "name": "${APPLICATION_NAME}", "labels": { "application": "${APPLICATION_NAME}" } }, "spec": { "strategy": { "type": "Recreate" }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "${APPLICATION_NAME}" ], "from": { "kind": "ImageStream", "name": "${APPLICATION_NAME}" } } }, { "type": "ConfigChange" } ], "replicas": 1, "selector": { "deploymentConfig": "${APPLICATION_NAME}" }, "template": { "metadata": { "name": "${APPLICATION_NAME}", "labels": { "deploymentConfig": "${APPLICATION_NAME}", "application": "${APPLICATION_NAME}" } }, "spec": { "terminationGracePeriodSeconds": 60, "containers": [ { "name": "${APPLICATION_NAME}", "image": "${APPLICATION_NAME}", "imagePullPolicy": "Always", "resources": { "limits": { "memory": "${MEMORY_LIMIT}" } }, "volumeMounts": [ { "name": "processserver-keystore-volume", "mountPath": "/etc/processserver-secret-volume", "readOnly": true } ], "livenessProbe": { "exec": { "command": [ "/bin/bash", "-c", "/opt/eap/bin/livenessProbe.sh" ] }, "initialDelaySeconds": 60 }, "readinessProbe": { "exec": { "command": [ "/bin/bash", "-c", "/opt/eap/bin/readinessProbe.sh" ] } }, "ports": [ { "name": "jolokia", "containerPort": 8778, "protocol": "TCP" }, { "name": "http", "containerPort": 8080, "protocol": "TCP" }, { "name": "https", "containerPort": 8443, "protocol": "TCP" } ], "env": [ { "name": "KIE_CONTAINER_DEPLOYMENT", "value": "${KIE_CONTAINER_DEPLOYMENT}" }, { "name": "KIE_SERVER_PROTOCOL", "value": "${KIE_SERVER_PROTOCOL}" }, { "name": "KIE_SERVER_PORT", "value": "${KIE_SERVER_PORT}" }, { "name": "KIE_SERVER_USER", "value": "${KIE_SERVER_USER}" }, { "name": "KIE_SERVER_PASSWORD", "value": "${KIE_SERVER_PASSWORD}" }, { "name": "KIE_SERVER_DOMAIN", "value": "${KIE_SERVER_DOMAIN}" }, { "name": "KIE_SERVER_JMS_QUEUES_REQUEST", "value": "${KIE_SERVER_JMS_QUEUES_REQUEST}" }, { "name": "KIE_SERVER_JMS_QUEUES_RESPONSE", "value": "${KIE_SERVER_JMS_QUEUES_RESPONSE}" }, { "name": "KIE_SERVER_EXECUTOR_JMS_QUEUE", "value": "${KIE_SERVER_EXECUTOR_JMS_QUEUE}" }, { "name": "MQ_SERVICE_PREFIX_MAPPING", "value": "${APPLICATION_NAME}-amq=MQ" }, { "name": "MQ_JNDI", "value": "${MQ_JNDI}" }, { "name": "MQ_USERNAME", "value": "${MQ_USERNAME}" }, { "name": "MQ_PASSWORD", "value": "${MQ_PASSWORD}" }, { "name": "MQ_PROTOCOL", "value": "tcp" }, { "name": "MQ_QUEUES", "value": "${MQ_QUEUES}" }, { "name": "MQ_TOPICS", "value": "${MQ_TOPICS}" }, { "name": "KIE_SERVER_PERSISTENCE_DIALECT", "value": "${KIE_SERVER_PERSISTENCE_DIALECT}" }, { "name": "DB_SERVICE_PREFIX_MAPPING", "value": "${APPLICATION_NAME}-postgresql=DB" }, { "name": "DB_JNDI", "value": "${DB_JNDI}" }, { "name": "DB_USERNAME", "value": "${DB_USERNAME}" }, { "name": "DB_PASSWORD", "value": "${DB_PASSWORD}" }, { "name": "DB_DATABASE", "value": "${DB_DATABASE}" }, { "name": "TX_DATABASE_PREFIX_MAPPING", "value": "${APPLICATION_NAME}-postgresql=DB" }, { "name": "DB_MIN_POOL_SIZE", "value": "${DB_MIN_POOL_SIZE}" }, { "name": "DB_MAX_POOL_SIZE", "value": "${DB_MAX_POOL_SIZE}" }, { "name": "DB_TX_ISOLATION", "value": "${DB_TX_ISOLATION}" }, { "name": "HTTPS_KEYSTORE_DIR", "value": "/etc/processserver-secret-volume" }, { "name": "HTTPS_KEYSTORE", "value": "${HTTPS_KEYSTORE}" }, { "name": "HTTPS_NAME", "value": "${HTTPS_NAME}" }, { "name": "HTTPS_PASSWORD", "value": "${HTTPS_PASSWORD}" } ] } ], "volumes": [ { "name": "processserver-keystore-volume", "secret": { "secretName": "${HTTPS_SECRET}" } } ] } } } }, { "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { "name": "${APPLICATION_NAME}-postgresql", "labels": { "application": "${APPLICATION_NAME}" } }, "spec": { "strategy": { "type": "Recreate" }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "${APPLICATION_NAME}-postgresql" ], "from": { "kind": "ImageStreamTag", "namespace": "${IMAGE_STREAM_NAMESPACE}", "name": "postgresql:${POSTGRESQL_IMAGE_STREAM_TAG}" } } }, { "type": "ConfigChange" } ], "replicas": 1, "selector": { "deploymentConfig": "${APPLICATION_NAME}-postgresql" }, "template": { "metadata": { "name": "${APPLICATION_NAME}-postgresql", "labels": { "deploymentConfig": "${APPLICATION_NAME}-postgresql", "application": "${APPLICATION_NAME}" } }, "spec": { "terminationGracePeriodSeconds": 60, "containers": [ { "name": "${APPLICATION_NAME}-postgresql", "image": "postgresql", "imagePullPolicy": "Always", "ports": [ { "containerPort": 5432, "protocol": "TCP" } ], "env": [ { "name": "POSTGRESQL_USER", "value": "${DB_USERNAME}" }, { "name": "POSTGRESQL_PASSWORD", "value": "${DB_PASSWORD}" }, { "name": "POSTGRESQL_DATABASE", "value": "${DB_DATABASE}" }, { "name": "POSTGRESQL_MAX_CONNECTIONS", "value": "${POSTGRESQL_MAX_CONNECTIONS}" }, { "name": "POSTGRESQL_SHARED_BUFFERS", "value": "${POSTGRESQL_SHARED_BUFFERS}" } ], "volumeMounts": [ { "mountPath": "/var/lib/pgsql/data", "name": "${APPLICATION_NAME}-data" } ] } ], "volumes": [ { "emptyDir": { "medium": "" }, "name": "${APPLICATION_NAME}-data" } ] } } } }, { "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { "name": "${APPLICATION_NAME}-amq", "labels": { "application": "${APPLICATION_NAME}" } }, "spec": { "strategy": { "type": "Recreate" }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "${APPLICATION_NAME}-amq" ], "from": { "kind": "ImageStreamTag", "namespace": "${IMAGE_STREAM_NAMESPACE}", "name": "jboss-amq-63:1.3" } } }, { "type": "ConfigChange" } ], "replicas": 1, "selector": { "deploymentConfig": "${APPLICATION_NAME}-amq" }, "template": { "metadata": { "name": "${APPLICATION_NAME}-amq", "labels": { "deploymentConfig": "${APPLICATION_NAME}-amq", "application": "${APPLICATION_NAME}" } }, "spec": { "terminationGracePeriodSeconds": 60, "containers": [ { "name": "${APPLICATION_NAME}-amq", "image": "jboss-amq-63", "imagePullPolicy": "Always", "readinessProbe": { "exec": { "command": [ "/bin/bash", "-c", "/opt/amq/bin/readinessProbe.sh" ] } }, "ports": [ { "name": "jolokia", "containerPort": 8778, "protocol": "TCP" }, { "name": "amqp", "containerPort": 5672, "protocol": "TCP" }, { "name": "amqp-ssl", "containerPort": 5671, "protocol": "TCP" }, { "name": "mqtt", "containerPort": 1883, "protocol": "TCP" }, { "name": "stomp", "containerPort": 61613, "protocol": "TCP" }, { "name": "stomp-ssl", "containerPort": 61612, "protocol": "TCP" }, { "name": "tcp", "containerPort": 61616, "protocol": "TCP" }, { "name": "tcp-ssl", "containerPort": 61617, "protocol": "TCP" } ], "env": [ { "name": "AMQ_USER", "value": "${MQ_USERNAME}" }, { "name": "AMQ_PASSWORD", "value": "${MQ_PASSWORD}" }, { "name": "AMQ_TRANSPORTS", "value": "${MQ_PROTOCOL}" }, { "name": "AMQ_MESH_DISCOVERY_TYPE", "value": "${AMQ_MESH_DISCOVERY_TYPE}" }, { "name": "AMQ_MESH_SERVICE_NAME", "value": "${APPLICATION_NAME}-amq-mesh" }, { "name": "AMQ_MESH_SERVICE_NAMESPACE", "valueFrom": { "fieldRef": { "fieldPath": "metadata.namespace" } } }, { "name": "AMQ_STORAGE_USAGE_LIMIT", "value": "${AMQ_STORAGE_USAGE_LIMIT}" } ] } ] } } } } ] }
{ "pile_set_name": "Github" }
// Copyright 2012 Fan Shi // // This file is part of the VBF project. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. namespace VBF.Compilers.Intermediate { public class ReceiveInstruction : Instruction { } }
{ "pile_set_name": "Github" }
var exec = require('child_process').exec; var qryVersion = 'reg query "HKEY_CURRENT_USER\\Software\\Mozilla\\Mozilla Firefox" /v CurrentVersion'; var qryVersion2 = 'reg query "HKEY_LOCAL_MACHINE\\Software\\Mozilla\\Mozilla Firefox" /v CurrentVersion'; var qryPath = 'reg query "HKEY_CURRENT_USER\\Software\\Mozilla\\Mozilla Firefox\\" /s /v PathToExe'; var qryPath2 = 'reg query "HKEY_LOCAL_MACHINE\\Software\\Mozilla\\Mozilla Firefox\\%VERSION%\\Main\\" /s /v PathToExe'; var currentVersion; exports.version = function(callback) { if (currentVersion) { return callback(null, currentVersion); } exec(qryVersion, function (err, stdout) { var data = stdout.split(' '), version = data[data.length - 1].replace(/\r\n/g, '').trim(); if (!version) { exec(qryVersion2, function (err, stdout) { var data = stdout.split(' '), version = data[data.length - 1].replace('CurrentVersion', '').replace('REG_SZ', '').replace(/\r\n/g, '').trim(); if (version) { currentVersion = version; callback(null, version); } else { callback('unable to determine firefox version'); } }); } else { if (version) { currentVersion = version; callback(null, version); } else { callback('unable to determine firefox version'); } } }); }; exports.path = function(callback) { exec(qryPath, function (err, stdout) { var data = stdout.split('\r\n'), ffPath; data.forEach(function(line) { if (/PathToExe/.test(line)) { var cmd = line.replace('PathToExe', '').replace('REG_SZ', '').replace(/"/g, '').trim(); if (cmd) { ffPath = cmd; } } }); if (!ffPath) { exports.version(function(err, version) { if (version) { exec(qryPath2.replace('%VERSION%', version), function (err, stdout) { var data = stdout.split('\r\n'), ffPath; data.forEach(function(line) { if (/PathToExe/.test(line)) { var cmd = line.replace('PathToExe', '').replace('REG_SZ', '').replace(/"/g, '').trim(); if (cmd) { ffPath = cmd; } } }); if (ffPath) { callback(null, ffPath); } else { callback('unable to find ff path'); } }); } else { callback('unable to find ff path'); } }); } else { callback(null, ffPath); } }); };
{ "pile_set_name": "Github" }
// // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. // // Microsoft Bot Framework: http://botframework.com // // Bot Framework Emulator Github: // https://github.com/Microsoft/BotFramwork-Emulator // // Copyright (c) Microsoft Corporation // All rights reserved. // // MIT License: // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // import * as HttpStatus from 'http-status-codes'; import { Next, Response } from 'restify'; import { sendErrorResponse } from '../../../utils/sendErrorResponse'; import { ConversationAwareRequest } from './getConversation'; export async function ping(req: ConversationAwareRequest, res: Response, next: Next): Promise<any> { try { await req.conversation.sendPing(); res.send(HttpStatus.OK); res.end(); } catch (err) { sendErrorResponse(req, res, next, err); } next(); }
{ "pile_set_name": "Github" }
menu_link_content: class: \Drupal\menu_link_content\Plugin\Menu\MenuLinkContent form_class: \Drupal\menu_link_content\Form\MenuLinkContentForm deriver: \Drupal\menu_link_content\Plugin\Deriver\MenuLinkContentDeriver
{ "pile_set_name": "Github" }
// Code generated by protoc-gen-gogo. DO NOT EDIT. // source: combos/marshaler/map.proto /* Package mapdefaults is a generated protocol buffer package. It is generated from these files: combos/marshaler/map.proto It has these top-level messages: MapTest FakeMap FakeMapEntry */ package mapdefaults import testing "testing" import math_rand "math/rand" import time "time" import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" import github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" import fmt "fmt" import go_parser "go/parser" import proto "github.com/gogo/protobuf/proto" import math "math" import _ "github.com/gogo/protobuf/gogoproto" // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf func TestMapTestProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMapTest(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &MapTest{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } littlefuzz := make([]byte, len(dAtA)) copy(littlefuzz, dAtA) for i := range dAtA { dAtA[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } if len(littlefuzz) > 0 { fuzzamount := 100 for i := 0; i < fuzzamount; i++ { littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestMapTestMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMapTest(popr, false) size := p.Size() dAtA := make([]byte, size) for i := range dAtA { dAtA[i] = byte(popr.Intn(256)) } _, err := p.MarshalTo(dAtA) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &MapTest{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { dAtA[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } func TestFakeMapProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFakeMap(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &FakeMap{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } littlefuzz := make([]byte, len(dAtA)) copy(littlefuzz, dAtA) for i := range dAtA { dAtA[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } if len(littlefuzz) > 0 { fuzzamount := 100 for i := 0; i < fuzzamount; i++ { littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestFakeMapMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFakeMap(popr, false) size := p.Size() dAtA := make([]byte, size) for i := range dAtA { dAtA[i] = byte(popr.Intn(256)) } _, err := p.MarshalTo(dAtA) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &FakeMap{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { dAtA[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } func TestFakeMapEntryProto(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFakeMapEntry(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &FakeMapEntry{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } littlefuzz := make([]byte, len(dAtA)) copy(littlefuzz, dAtA) for i := range dAtA { dAtA[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } if len(littlefuzz) > 0 { fuzzamount := 100 for i := 0; i < fuzzamount; i++ { littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) littlefuzz = append(littlefuzz, byte(popr.Intn(256))) } // shouldn't panic _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) } } func TestFakeMapEntryMarshalTo(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFakeMapEntry(popr, false) size := p.Size() dAtA := make([]byte, size) for i := range dAtA { dAtA[i] = byte(popr.Intn(256)) } _, err := p.MarshalTo(dAtA) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &FakeMapEntry{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } for i := range dAtA { dAtA[i] = byte(popr.Intn(256)) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } func TestMapTestJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMapTest(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &MapTest{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } func TestFakeMapJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFakeMap(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &FakeMap{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } func TestFakeMapEntryJSON(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFakeMapEntry(popr, true) marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} jsondata, err := marshaler.MarshalToString(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } msg := &FakeMapEntry{} err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) } } func TestMapTestProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMapTest(popr, true) dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &MapTest{} if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } func TestMapTestProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMapTest(popr, true) dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &MapTest{} if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } func TestFakeMapProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFakeMap(popr, true) dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &FakeMap{} if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } func TestFakeMapProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFakeMap(popr, true) dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &FakeMap{} if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } func TestFakeMapEntryProtoText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFakeMapEntry(popr, true) dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) msg := &FakeMapEntry{} if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } func TestFakeMapEntryProtoCompactText(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFakeMapEntry(popr, true) dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) msg := &FakeMapEntry{} if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) } if !p.Equal(msg) { t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) } } func TestMapDescription(t *testing.T) { MapDescription() } func TestMapTestVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedMapTest(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } msg := &MapTest{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } func TestFakeMapVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFakeMap(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } msg := &FakeMap{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } func TestFakeMapEntryVerboseEqual(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFakeMapEntry(popr, false) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { panic(err) } msg := &FakeMapEntry{} if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { panic(err) } if err := p.VerboseEqual(msg); err != nil { t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) } } func TestMapTestGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedMapTest(popr, false) s1 := p.GoString() s2 := fmt.Sprintf("%#v", p) if s1 != s2 { t.Fatalf("GoString want %v got %v", s1, s2) } _, err := go_parser.ParseExpr(s1) if err != nil { t.Fatal(err) } } func TestFakeMapGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFakeMap(popr, false) s1 := p.GoString() s2 := fmt.Sprintf("%#v", p) if s1 != s2 { t.Fatalf("GoString want %v got %v", s1, s2) } _, err := go_parser.ParseExpr(s1) if err != nil { t.Fatal(err) } } func TestFakeMapEntryGoString(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFakeMapEntry(popr, false) s1 := p.GoString() s2 := fmt.Sprintf("%#v", p) if s1 != s2 { t.Fatalf("GoString want %v got %v", s1, s2) } _, err := go_parser.ParseExpr(s1) if err != nil { t.Fatal(err) } } func TestMapTestSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedMapTest(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(dAtA) != size { t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) } if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } func TestFakeMapSize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFakeMap(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(dAtA) != size { t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) } if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } func TestFakeMapEntrySize(t *testing.T) { seed := time.Now().UnixNano() popr := math_rand.New(math_rand.NewSource(seed)) p := NewPopulatedFakeMapEntry(popr, true) size2 := github_com_gogo_protobuf_proto.Size(p) dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) if err != nil { t.Fatalf("seed = %d, err = %v", seed, err) } size := p.Size() if len(dAtA) != size { t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) } if size2 != size { t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) } size3 := github_com_gogo_protobuf_proto.Size(p) if size3 != size { t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) } } func TestMapTestStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedMapTest(popr, false) s1 := p.String() s2 := fmt.Sprintf("%v", p) if s1 != s2 { t.Fatalf("String want %v got %v", s1, s2) } } func TestFakeMapStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFakeMap(popr, false) s1 := p.String() s2 := fmt.Sprintf("%v", p) if s1 != s2 { t.Fatalf("String want %v got %v", s1, s2) } } func TestFakeMapEntryStringer(t *testing.T) { popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) p := NewPopulatedFakeMapEntry(popr, false) s1 := p.String() s2 := fmt.Sprintf("%v", p) if s1 != s2 { t.Fatalf("String want %v got %v", s1, s2) } } //These tests are generated by github.com/gogo/protobuf/plugin/testgen
{ "pile_set_name": "Github" }
# frozen_string_literal: true class AddEventFavoriteWorksAddedToEmailNotifications < ActiveRecord::Migration[5.0] def change add_column :email_notifications, :event_favorite_works_added, :boolean, null: false, default: true end end
{ "pile_set_name": "Github" }
{ "name": "wunderline", "version": "4.10.3", "description": "Wunderlist for your command line!", "main": "wunderline.js", "homepage": "http://wayneashleyberry.github.io/wunderline/", "engines": { "node": ">=4.0.0" }, "bin": { "wunderline": "./wunderline.js" }, "repository": { "type": "git", "url": "git+https://github.com/wayneashleyberry/wunderline.git" }, "scripts": { "format": "prettier --write '**/*.js'", "pretest": "prettier -l --write '**/*.js'", "test": "nyc ava test.js" }, "keywords": [ "wunderlist", "wunderline", "task", "todo", "productivity" ], "author": { "name": "Wayne Ashley Berry", "url": "https://twitter.com/waynethebrain" }, "license": "MIT", "bugs": { "url": "https://github.com/wayneashleyberry/wunderline/issues" }, "dependencies": { "async": "^2.4.1", "chalk": "^1.0.0", "columnify": "^1.5.1", "commander": "^2.8.1", "configstore": "^3.1.0", "fuzzysearch": "^1.0.3", "get-stdin": "^5.0.0", "inquirer": "^3.0.6", "lodash.find": "^4.4.0", "lodash.trunc": "^3.0.3", "moment": "^2.22.1", "opn": "^5.0.0", "request": "^2.88.0", "vorpal": "^1.11.2", "wordwrap": "^1.0.0" }, "devDependencies": { "ava": "^0.25.0", "bin-check": "^4.0.1", "nyc": "^13.2.0", "prettier": "^2.0.5" } }
{ "pile_set_name": "Github" }
/* * Copyright (c) 2011-2018, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.org). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package boofcv.alg.filter.binary; import boofcv.abst.filter.binary.InputToBinary; import boofcv.alg.filter.binary.impl.GenericThresholdCommon; import boofcv.struct.ConfigLength; import boofcv.struct.image.GrayF32; /** * @author Peter Abeles */ public class TestThresholdNick extends GenericThresholdCommon<GrayF32> { public TestThresholdNick() { super(GrayF32.class); } @Override public InputToBinary<GrayF32> createAlg(int requestedBlockWidth, double scale, boolean down) { return new ThresholdNick(ConfigLength.fixed(requestedBlockWidth), -0.2f,down); } public void widthLargerThanImage(){ // perfectly acceptable } }
{ "pile_set_name": "Github" }
// // JotStrokeDelegate.h // PalmRejectionExampleApp // // Created on 9/14/12. // Copyright (c) 2012 Adonit. All rights reserved. // #import <Foundation/Foundation.h> #import <UIKit/UIKit.h> #import "JotStroke.h" /** The JotStrokeDelegate receives important events related to stylus events */ @protocol JotStrokeDelegate <NSObject> #pragma mark - Stylus Events /** Called when the stylus begins a stroke event * @param jotStroke where the stylus began its stroke */ - (void)jotStylusStrokeBegan:(nonnull JotStroke *)stylusStroke; /** Called when the jot stylus moves across the screen * @param jotStroke where stylus is moving */ - (void)jotStylusStrokeMoved:(nonnull JotStroke *)stylusStroke; /** Called when the jot stylus is lifted from the screen * @param jotStrokes where stylus ends */ - (void)jotStylusStrokeEnded:(nonnull JotStroke *)stylusStroke; /** Called when strokes by the jot stylus are cancelled * @param jotStroke where stylus cancels */ - (void)jotStylusStrokeCancelled:(nonnull JotStroke *)stylusStroke; #pragma mark - Gesture Suggestions /** Suggest to disable gestures when the pen is down to prevent conflict */ - (void)jotSuggestsToDisableGestures; /** Suggest to enable gestures when the pen is not down as there are no potential conflicts */ - (void)jotSuggestsToEnableGestures; @end
{ "pile_set_name": "Github" }
/* * Copyright (C) 2006, 2007, 2008, 2015 Apple Inc. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public License * along with this library; see the file COPYING.LIB. If not, write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301, USA. */ [ CustomToJSObject, JSGenerateToNativeObject, DOMJIT, ] interface DocumentFragment : Node { [CallWith=Document] constructor(); }; DocumentFragment includes ParentNode; DocumentFragment includes NonElementParentNode;
{ "pile_set_name": "Github" }
export const APPROVE_NOTE = 'APPROVE_NOTE'; export const CLOSE_PANEL = 'CLOSE_PANEL'; export const LIKE_NOTE = 'LIKE_NOTE'; export const NOTES_ADD = 'NOTES_ADD'; export const NOTES_REMOVE = 'NOTES_REMOVE'; export const NOTES_LOADING = 'NOTES_LOADING'; export const NOTES_LOADED = 'NOTES_LOADED'; export const SELECT_NOTE = 'SELECT_NOTE'; export const READ_NOTE = 'READ_NOTE'; export const RESET_LOCAL_APPROVAL = 'RESET_LOCAL_APPROVAL'; export const RESET_LOCAL_LIKE = 'RESET_LOCAL_LIKE'; export const SET_IS_SHOWING = 'SET_IS_SHOWING'; // special! do not use export const SET_LAYOUT = 'SET_LAYOUT'; export const SPAM_NOTE = 'SPAM_NOTE'; export const SUGGESTIONS_FETCH = 'SUGGESTIONS_FETCH'; export const SUGGESTIONS_STORE = 'SUGGESTIONS_STORE'; export const TRASH_NOTE = 'TRASH_NOTE'; export const UNDO_ACTION = 'UNDO_ACTION'; export const VIEW_SETTINGS = 'VIEW_SETTINGS'; export const SET_FILTER = 'SET_FILTER'; export const EDIT_COMMENT = 'EDIT_COMMENT';
{ "pile_set_name": "Github" }
<?xml version="1.0"?> <!-- Licensed to Jasig under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Jasig licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <configuration> <system.web> <authorization> <deny users="?" /> </authorization> </system.web> </configuration>
{ "pile_set_name": "Github" }
## 2.9.12 * Add MonadFix instance ## 2.9.11 * Add GHC-8.6 support * row-fluid and container-fluid instead of camelCase ## 2.9.10 * Drop GHC-7.8 and older (pre-AMP) support * Generalise type-signatures to require only `Applicative` or `Functor`, when that's enough ## 2.9.9 * Add `commuteHtmlT` to commute `HtmlT m a` into `m (HtmlT n a)`. * Add `MonadError e m => MonadError e (HtmlT m)` and `MonadWriter w m => MonadWriter w (HtmlT m)` instances ## 2.9.8.1 * Improve performance by adding `INLINE` pragmas to `Monad` etc. combinators. ## 2.9.8 * Add `integrity_`, `crossorigin_` attributes * Add `classes_` smart attribute constructor * Add `ToHtml (HtmlT m a)` instance ## 2.9.7 * Add `Semigroup (HtmlT m a)` instance * Add `MonadState` and `MonadReader` instances ## 2.9.6 * Fix compilation of benchmarks * Add @athanclark's version of `relaxHtmlT` * Add a utility to generalize the underlying monad from Identity: `relaxHtmlT` ## 2.9.5 * Add ToHtml instance for ByteString (both) * Add `MFunctor HtmlT` instance, i.e. `hoist` from @mmorph@. ## 2.9.1 * Small performance tweaks. * Make svg_ an element. ## 2.6 * Restrict monoid instance's a to ~ () (means you can use mempty without inference errors) ## 2.2 * Export renderToFile from top-level Lucid module. ## 2.1 * Add some extra HTML tags. ## 2.0 * Use variadic HTML terms. * Add lazy Text instance for ToHtml. ## 1.0 * Initial version.
{ "pile_set_name": "Github" }
package object.registry.record.owner_only test_allow_read_if_owner_and_permission_are_correct_regardless_orgunit { read with input as { "user": { "id": "personA", "permissions": [ { "operations": [ { "uri": "object/registry/record/read" } ] } ], "managingOrgUnitIds": [] }, "object": { "registry": { "record": { "dataset-access-control": { "ownerId": "personA", "orgUnitOwnerId": "3" } } } } } } test_deny_read_if_owner_and_permission_are_incorrect { not read with input as { "user": { "id": "personA", "permissions": [ { "operations": [ { "uri": "object/registry/record/read" } ] } ], "managingOrgUnitIds": ["3"] }, "object": { "registry": { "record": { "dataset-access-control": { "ownerId": "personB", "orgUnitOwnerId": "3" } } } } } }
{ "pile_set_name": "Github" }
entity repro is end; architecture behav of repro is type id_arr is array(bit) of bit; constant idc : id_arr := ('0' => '0', '1' => '1'); function f(a : bit_vector) return bit_vector is variable v : bit_vector(1 to a'length) := a; variable r : bit_vector(1 to a'length); begin for i in v'range loop r(i) := idc(v (i)); end loop; return r; end f; begin assert f("01") = "01"; end behav;
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Laravel</title> <!-- Fonts --> <link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css"> <!-- Styles --> <style> html, body { background-color: #fff; color: #636b6f; font-family: 'Raleway', sans-serif; font-weight: 100; height: 100vh; margin: 0; } .full-height { height: 100vh; } .flex-center { align-items: center; display: flex; justify-content: center; } .position-ref { position: relative; } .top-right { position: absolute; right: 10px; top: 18px; } .content { text-align: center; } .title { font-size: 84px; } .links > a { color: #636b6f; padding: 0 25px; font-size: 12px; font-weight: 600; letter-spacing: .1rem; text-decoration: none; text-transform: uppercase; } .m-b-md { margin-bottom: 30px; } </style> </head> <body> <div class="flex-center position-ref full-height"> @if (Route::has('login')) <div class="top-right links"> @if (Auth::check()) <a href="{{ url('/home') }}">Home</a> @else <a href="{{ url('/login') }}">Login</a> <a href="{{ url('/register') }}">Register</a> @endif </div> @endif <div class="content"> <div class="title m-b-md"> Laravel </div> <div class="links"> <a href="https://laravel.com/docs">Documentation</a> <a href="https://laracasts.com">Laracasts</a> <a href="https://laravel-news.com">News</a> <a href="https://forge.laravel.com">Forge</a> <a href="https://github.com/laravel/laravel">GitHub</a> </div> </div> </div> </body> </html>
{ "pile_set_name": "Github" }
/* Copyright (c) 2002-2008 Jean-Marc Valin Copyright (c) 2007-2008 CSIRO Copyright (c) 2007-2009 Xiph.Org Foundation Written by Jean-Marc Valin */ /** @file mathops.h @brief Various math functions */ /* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef MATHOPS_H #define MATHOPS_H #include "arch.h" #include "entcode.h" #include "os_support.h" /* Multiplies two 16-bit fractional values. Bit-exactness of this macro is important */ #define FRAC_MUL16(a,b) ((16384+((opus_int32)(opus_int16)(a)*(opus_int16)(b)))>>15) unsigned isqrt32(opus_uint32 _val); #ifndef OVERRIDE_CELT_MAXABS16 static OPUS_INLINE opus_val32 celt_maxabs16(const opus_val16 *x, int len) { int i; opus_val16 maxval = 0; opus_val16 minval = 0; for (i=0;i<len;i++) { maxval = MAX16(maxval, x[i]); minval = MIN16(minval, x[i]); } return MAX32(EXTEND32(maxval),-EXTEND32(minval)); } #endif #ifndef OVERRIDE_CELT_MAXABS32 #ifdef FIXED_POINT static OPUS_INLINE opus_val32 celt_maxabs32(const opus_val32 *x, int len) { int i; opus_val32 maxval = 0; opus_val32 minval = 0; for (i=0;i<len;i++) { maxval = MAX32(maxval, x[i]); minval = MIN32(minval, x[i]); } return MAX32(maxval, -minval); } #else #define celt_maxabs32(x,len) celt_maxabs16(x,len) #endif #endif #ifndef FIXED_POINT #define PI 3.141592653f #define celt_sqrt(x) ((float)sqrt(x)) #define celt_rsqrt(x) (1.f/celt_sqrt(x)) #define celt_rsqrt_norm(x) (celt_rsqrt(x)) #define celt_cos_norm(x) ((float)cos((.5f*PI)*(x))) #define celt_rcp(x) (1.f/(x)) #define celt_div(a,b) ((a)/(b)) #define frac_div32(a,b) ((float)(a)/(b)) #ifdef FLOAT_APPROX /* Note: This assumes radix-2 floating point with the exponent at bits 23..30 and an offset of 127 denorm, +/- inf and NaN are *not* handled */ /** Base-2 log approximation (log2(x)). */ static OPUS_INLINE float celt_log2(float x) { int integer; float frac; union { float f; opus_uint32 i; } in; in.f = x; integer = (in.i>>23)-127; in.i -= integer<<23; frac = in.f - 1.5f; frac = -0.41445418f + frac*(0.95909232f + frac*(-0.33951290f + frac*0.16541097f)); return 1+integer+frac; } /** Base-2 exponential approximation (2^x). */ static OPUS_INLINE float celt_exp2(float x) { int integer; float frac; union { float f; opus_uint32 i; } res; integer = floor(x); if (integer < -50) return 0; frac = x-integer; /* K0 = 1, K1 = log(2), K2 = 3-4*log(2), K3 = 3*log(2) - 2 */ res.f = 0.99992522f + frac * (0.69583354f + frac * (0.22606716f + 0.078024523f*frac)); res.i = (res.i + (integer<<23)) & 0x7fffffff; return res.f; } #else #define celt_log2(x) ((float)(1.442695040888963387*log(x))) #define celt_exp2(x) ((float)exp(0.6931471805599453094*(x))) #endif #endif #ifdef FIXED_POINT #include "os_support.h" #ifndef OVERRIDE_CELT_ILOG2 /** Integer log in base2. Undefined for zero and negative numbers */ static OPUS_INLINE opus_int16 celt_ilog2(opus_int32 x) { celt_assert2(x>0, "celt_ilog2() only defined for strictly positive numbers"); return EC_ILOG(x)-1; } #endif /** Integer log in base2. Defined for zero, but not for negative numbers */ static OPUS_INLINE opus_int16 celt_zlog2(opus_val32 x) { return x <= 0 ? 0 : celt_ilog2(x); } opus_val16 celt_rsqrt_norm(opus_val32 x); opus_val32 celt_sqrt(opus_val32 x); opus_val16 celt_cos_norm(opus_val32 x); /** Base-2 logarithm approximation (log2(x)). (Q14 input, Q10 output) */ static OPUS_INLINE opus_val16 celt_log2(opus_val32 x) { int i; opus_val16 n, frac; /* -0.41509302963303146, 0.9609890551383969, -0.31836011537636605, 0.15530808010959576, -0.08556153059057618 */ static const opus_val16 C[5] = {-6801+(1<<(13-DB_SHIFT)), 15746, -5217, 2545, -1401}; if (x==0) return -32767; i = celt_ilog2(x); n = VSHR32(x,i-15)-32768-16384; frac = ADD16(C[0], MULT16_16_Q15(n, ADD16(C[1], MULT16_16_Q15(n, ADD16(C[2], MULT16_16_Q15(n, ADD16(C[3], MULT16_16_Q15(n, C[4])))))))); return SHL16(i-13,DB_SHIFT)+SHR16(frac,14-DB_SHIFT); } /* K0 = 1 K1 = log(2) K2 = 3-4*log(2) K3 = 3*log(2) - 2 */ #define D0 16383 #define D1 22804 #define D2 14819 #define D3 10204 static OPUS_INLINE opus_val32 celt_exp2_frac(opus_val16 x) { opus_val16 frac; frac = SHL16(x, 4); return ADD16(D0, MULT16_16_Q15(frac, ADD16(D1, MULT16_16_Q15(frac, ADD16(D2 , MULT16_16_Q15(D3,frac)))))); } /** Base-2 exponential approximation (2^x). (Q10 input, Q16 output) */ static OPUS_INLINE opus_val32 celt_exp2(opus_val16 x) { int integer; opus_val16 frac; integer = SHR16(x,10); if (integer>14) return 0x7f000000; else if (integer < -15) return 0; frac = celt_exp2_frac(x-SHL16(integer,10)); return VSHR32(EXTEND32(frac), -integer-2); } opus_val32 celt_rcp(opus_val32 x); #define celt_div(a,b) MULT32_32_Q31((opus_val32)(a),celt_rcp(b)) opus_val32 frac_div32(opus_val32 a, opus_val32 b); #define M1 32767 #define M2 -21 #define M3 -11943 #define M4 4936 /* Atan approximation using a 4th order polynomial. Input is in Q15 format and normalized by pi/4. Output is in Q15 format */ static OPUS_INLINE opus_val16 celt_atan01(opus_val16 x) { return MULT16_16_P15(x, ADD32(M1, MULT16_16_P15(x, ADD32(M2, MULT16_16_P15(x, ADD32(M3, MULT16_16_P15(M4, x))))))); } #undef M1 #undef M2 #undef M3 #undef M4 /* atan2() approximation valid for positive input values */ static OPUS_INLINE opus_val16 celt_atan2p(opus_val16 y, opus_val16 x) { if (y < x) { opus_val32 arg; arg = celt_div(SHL32(EXTEND32(y),15),x); if (arg >= 32767) arg = 32767; return SHR16(celt_atan01(EXTRACT16(arg)),1); } else { opus_val32 arg; arg = celt_div(SHL32(EXTEND32(x),15),y); if (arg >= 32767) arg = 32767; return 25736-SHR16(celt_atan01(EXTRACT16(arg)),1); } } #endif /* FIXED_POINT */ #endif /* MATHOPS_H */
{ "pile_set_name": "Github" }
/* PICCANTE The hottest HDR imaging library! http://vcg.isti.cnr.it/piccante Copyright (C) 2014 Visual Computing Laboratory - ISTI CNR http://vcg.isti.cnr.it First author: Francesco Banterle This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef PIC_FEATURES_MATCHING_GENERAL_CORNER_DETECTOR_HPP #define PIC_FEATURES_MATCHING_GENERAL_CORNER_DETECTOR_HPP #include "../image.hpp" #include "../util/string.hpp" #include "../util/string.hpp" #ifndef PIC_DISABLE_EIGEN #ifndef PIC_EIGEN_NOT_BUNDLED #include "../externals/Eigen/Dense" #else #include <Eigen/Dense> #endif #endif namespace pic { #ifndef PIC_DISABLE_EIGEN /** * @brief The GeneralCornerDetector class */ class GeneralCornerDetector { protected: Image *lum; bool bLum; static bool scD (Eigen::Vector3f i, Eigen::Vector3f j) { return (i[2] > j [2]); } static bool scA (Eigen::Vector3f i, Eigen::Vector3f j) { return (i[2] < j [2]); } public: /** * @brief GeneralCornerDetector */ GeneralCornerDetector() { lum = NULL; bLum = false; } ~GeneralCornerDetector() { } /** * @brief execute * @param img * @param corners */ virtual void execute(Image *img, std::vector< Eigen::Vector2f > *corners) { } /** * @brief getCornersImage * @param corners * @param imgOut * @param bColor * @return */ Image *getCornersImage(std::vector< Eigen::Vector2f > *corners, Image *imgOut, unsigned int width, unsigned int height, bool bColor) { if(corners == NULL) { return imgOut; } if(imgOut == NULL) { if((width < 1) || (height < 1)){ return NULL; } imgOut = new Image(width, height, 1); } imgOut->setZero(); for(unsigned int i = 0; i < corners->size(); i++) { int x = int((*corners)[i][0]); int y = int((*corners)[i][1]); if(bColor) { (*imgOut)(x, y)[0] = 1.0f; } else { (*imgOut)(x, y)[0] = (*corners)[i][2]; } } return imgOut; } /** * @brief sortCornersAndTransfer * @param corners * @param cornersOut * @param nBestPoints * @param bDescend */ static void sortCornersAndTransfer(std::vector< Eigen::Vector3f > *corners, std::vector< Eigen::Vector2f > *cornersOut, int nBestPoints = -1, bool bDescend = true) { sortCorners(corners, bDescend); int a, b; int n = int(corners->size()); if(nBestPoints < 0) { a = 0; b = n; } else { if(bDescend) { a = 0; b = MIN(nBestPoints, n); } else { b = MIN(int(corners->size()), n); a = MAX(b - nBestPoints, 0); } } for(int i = a; i < b; i++) { Eigen::Vector3f tmp = corners->at(i); Eigen::Vector2f p; p[0] = tmp[0]; p[1] = tmp[1]; cornersOut->push_back(p); } } /** * @brief sortCorners * @param corners */ static void sortCorners(std::vector< Eigen::Vector3f > *corners, bool bDescend = true) { if(bDescend) { std::sort(corners->begin(), corners->end(), scD); } else { std::sort(corners->begin(), corners->end(), scA); } } /** * @brief exportToString * @param corners * @return */ static std::string exportToString(std::vector< Eigen::Vector2f > *corners) { std::string out = "["; auto n = corners->size(); for(auto i = 0; i < (n - 1); i++) { out += fromNumberToString(corners->at(i)[0]) + " "; out += fromNumberToString(corners->at(i)[1]) + "; "; } out += fromNumberToString(corners->at(n - 1)[0]) + " "; out += fromNumberToString(corners->at(n - 1)[1]) + "]"; return out; } /** * @brief removeClosestCorners */ static void removeClosestCorners(std::vector< Eigen::Vector2f > *corners, std::vector< Eigen::Vector2f > *out, float threshold, int max_limit) { int n = MIN(int(corners->size()), max_limit); bool *processed = new bool [n]; memset(processed, 0, sizeof(bool) * n); for(int i = 0; i < n; i++) { //find the closest if(!processed[i]) { processed[i] = true; std::vector< int > indices; for(int j = 0; j < n; j++) { if(j != i) { continue; } if(!processed[j]) { float dx = (*corners)[j][0] - (*corners)[i][0]; float dy = (*corners)[j][1] - (*corners)[i][1]; float dist = sqrtf(dx * dx + dy * dy); if(dist < threshold) { //processed[j] = true; indices.push_back(j); } } } auto n_i = indices.size(); Eigen::Vector2f point; if(n_i > 0) { point[0] = (*corners)[i][0]; point[1] = (*corners)[i][1]; int point_c = 1; for(auto j = 0; j < indices.size(); j++) { auto k = indices[j]; if(!processed[k]) { processed[k] = true; point[0] += (*corners)[k][0]; point[1] += (*corners)[k][1]; point_c++; } } point[0] /= float(point_c); point[1] /= float(point_c); } else { point[0] = (*corners)[i][0]; point[1] = (*corners)[i][1]; } out->push_back(point); } } delete[] processed; } /** * @brief test * @param gcd */ static void test(GeneralCornerDetector *gcd) { if(gcd == NULL){ return; } Image full_image(1, 512, 512, 3); full_image.setZero(); Image quad(1, 128, 128, 3); quad = 1.0f; full_image.copySubImage(&quad, 192, 192); std::vector< Eigen::Vector2f > corners; gcd->execute(&full_image, &corners); printf("\n Corner Detector Test:\n"); for(unsigned int i = 0; i < corners.size(); i++) { printf("X: %f Y: %f\n", corners[i][0], corners[i][1]); } printf("\n"); Image *img_corners = gcd->getCornersImage(&corners, NULL, 512, 512, true); img_corners->Write("general_corner_test_image.hdr"); } }; #endif } // end namespace pic #endif /* PIC_FEATURES_MATCHING_GENERAL_CORNER_DETECTOR_HPP */
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.7"/> <title>VST 3 Examples: mdaDeEsserProcessor.cpp File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> <link href="doxysmtg.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">VST 3 Examples &#160;<span id="projectnumber">VST 3.6.7</span> </div> <div id="projectbrief">SDK for developing VST Plug-in</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.7 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="pages.html"><span>Related&#160;Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File&#160;List</span></a></li> <li><a href="globals.html"><span>Globals</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Properties</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(12)"><span class="SelectionMark">&#160;</span>Pages</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="dir_06b2911d428eab5a2cf7ddc3164ebf47.html">public.sdk</a></li><li class="navelem"><a class="el" href="dir_14ae8cef5b4cd5ebc5413814d7bbe8ce.html">samples</a></li><li class="navelem"><a class="el" href="dir_5898a34b900eeb5b54fd3cf30212c70a.html">vst</a></li><li class="navelem"><a class="el" href="dir_49976055b6bc2e03b4acc62441be6b92.html">mda-vst3</a></li><li class="navelem"><a class="el" href="dir_9b11b281bf06f006f7004a60519e42ce.html">source</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#namespaces">Namespaces</a> </div> <div class="headertitle"> <div class="title">mdaDeEsserProcessor.cpp File Reference</div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><code>#include &quot;<a class="el" href="mdaDeEsserProcessor_8h.html">mdaDeEsserProcessor.h</a>&quot;</code><br /> <code>#include &quot;<a class="el" href="mdaDeEsserController_8h.html">mdaDeEsserController.h</a>&quot;</code><br /> <code>#include &lt;math.h&gt;</code><br /> </div><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a> Namespaces</h2></td></tr> <tr class="memitem:namespaceSteinberg"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="/Volumes/SSD/Builddata/re/147463379/b/VST_SDK/VST3_SDK/doc/base/base.tag:../base/" href="../base/namespaceSteinberg.html">Steinberg</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:namespaceSteinberg_1_1Vst"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="elRef" doxygen="/Volumes/SSD/Builddata/re/147463379/b/VST_SDK/VST3_SDK/doc/vstinterfaces/vstinterfaces.tag:../vstinterfaces/" href="../vstinterfaces/namespaceSteinberg_1_1Vst.html">Steinberg::Vst</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> <tr class="memitem:namespaceSteinberg_1_1Vst_1_1mda"><td class="memItemLeft" align="right" valign="top"> &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceSteinberg_1_1Vst_1_1mda.html">Steinberg::Vst::mda</a></td></tr> <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> </div><!-- contents --> <html> <head> <title>Empty</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Author" content="Steinberg"> </head> <body> <br/> <hr width="100%" size="2" align="left" /> <div align=left> Copyright &copy;2017 <a href="http://www.steinberg.net" target="_blank"><u>Steinberg Media Technologies GmbH</u></a>. All Rights Reserved. This documentation is under this <a href="http://www.steinberg.net/sdklicenses" target="_blank"><u>license</u></a>. </div> </body> </html>
{ "pile_set_name": "Github" }
""" 双色球随机选号程序 Version: 0.1 Author: 骆昊 Date: 2018-03-06 """ from random import randrange, randint, sample def display(balls): """ 输出列表中的双色球号码 """ for index, ball in enumerate(balls): if index == len(balls) - 1: print('|', end=' ') print('%02d' % ball, end=' ') print() def random_select(): """ 随机选择一组号码 """ red_balls = [x for x in range(1, 34)] selected_balls = [] for _ in range(6): index = randrange(len(red_balls)) selected_balls.append(red_balls[index]) del red_balls[index] # 上面的for循环也可以写成下面这行代码 # sample函数是random模块下的函数 # selected_balls = sample(red_balls, 6) selected_balls.sort() selected_balls.append(randint(1, 16)) return selected_balls def main(): n = int(input('机选几注: ')) for _ in range(n): display(random_select()) if __name__ == '__main__': main()
{ "pile_set_name": "Github" }
CKEditor SCAYT Plugin ===================== This plugin brings Spell Check As You Type (SCAYT) into up to CKEditor 4+. SCAYT is a "installation-less", using the web-services of [WebSpellChecker.net](http://www.webspellchecker.net/). It's an out of the box solution. Installation ------------ 1. Clone/copy this repository contents in a new "plugins/scayt" folder in your CKEditor installation. 2. Enable the "scayt" plugin in the CKEditor configuration file (config.js): config.extraPlugins = 'scayt'; That's all. SCAYT will appear on the editor toolbar and will be ready to use. License ------- Licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). See LICENSE.md for more information. Developed in cooperation with [WebSpellChecker.net](http://www.webspellchecker.net/).
{ "pile_set_name": "Github" }
{ "frameworks": { "net46":{ "dependencies": { } } } }
{ "pile_set_name": "Github" }
#include <stdarg.h> /* confdata.c */ P(conf_parse,void,(const char *name)); P(conf_read,int,(const char *name)); P(conf_read_simple,int,(const char *name, int)); P(conf_write_defconfig,int,(const char *name)); P(conf_write,int,(const char *name)); P(conf_write_autoconf,int,(void)); P(conf_get_changed,bool,(void)); P(conf_set_changed_callback, void,(void (*fn)(void))); P(conf_set_message_callback, void,(void (*fn)(const char *fmt, va_list ap))); /* menu.c */ P(rootmenu,struct menu,); P(menu_is_empty, bool, (struct menu *menu)); P(menu_is_visible, bool, (struct menu *menu)); P(menu_has_prompt, bool, (struct menu *menu)); P(menu_get_prompt,const char *,(struct menu *menu)); P(menu_get_root_menu,struct menu *,(struct menu *menu)); P(menu_get_parent_menu,struct menu *,(struct menu *menu)); P(menu_has_help,bool,(struct menu *menu)); P(menu_get_help,const char *,(struct menu *menu)); P(get_symbol_str, void, (struct gstr *r, struct symbol *sym, struct list_head *head)); P(get_relations_str, struct gstr, (struct symbol **sym_arr, struct list_head *head)); P(menu_get_ext_help,void,(struct menu *menu, struct gstr *help)); /* symbol.c */ P(symbol_hash,struct symbol *,[SYMBOL_HASHSIZE]); P(sym_lookup,struct symbol *,(const char *name, int flags)); P(sym_find,struct symbol *,(const char *name)); P(sym_expand_string_value,const char *,(const char *in)); P(sym_escape_string_value, const char *,(const char *in)); P(sym_re_search,struct symbol **,(const char *pattern)); P(sym_type_name,const char *,(enum symbol_type type)); P(sym_calc_value,void,(struct symbol *sym)); P(sym_get_type,enum symbol_type,(struct symbol *sym)); P(sym_tristate_within_range,bool,(struct symbol *sym,tristate tri)); P(sym_set_tristate_value,bool,(struct symbol *sym,tristate tri)); P(sym_toggle_tristate_value,tristate,(struct symbol *sym)); P(sym_string_valid,bool,(struct symbol *sym, const char *newval)); P(sym_string_within_range,bool,(struct symbol *sym, const char *str)); P(sym_set_string_value,bool,(struct symbol *sym, const char *newval)); P(sym_is_changable,bool,(struct symbol *sym)); P(sym_get_choice_prop,struct property *,(struct symbol *sym)); P(sym_get_default_prop,struct property *,(struct symbol *sym)); P(sym_get_string_value,const char *,(struct symbol *sym)); P(prop_get_type_name,const char *,(enum prop_type type)); /* expr.c */ P(expr_compare_type,int,(enum expr_type t1, enum expr_type t2)); P(expr_print,void,(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken));
{ "pile_set_name": "Github" }
pub use atelier_core as core; pub use atelier_daemon as daemon; pub use atelier_importer as importer; pub use atelier_loader as loader;
{ "pile_set_name": "Github" }
/* * Hibernate, Relational Persistence for Idiomatic Java * * License: GNU Lesser General Public License (LGPL), version 2.1 or later. * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>. */ package org.hibernate.boot.model.naming; import org.hibernate.boot.model.source.spi.AttributePath; import org.hibernate.boot.spi.MetadataBuildingContext; /** * @author Steve Ebersole * @author Dmytro Bondar */ public interface ImplicitIndexColumnNameSource extends ImplicitNameSource { AttributePath getPluralAttributePath(); }
{ "pile_set_name": "Github" }
/* * Copyright 2016 higherfrequencytrading.com * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package net.openhft.lang.model; import net.openhft.compiler.CachedCompiler; import net.openhft.lang.io.ByteBufferBytes; import net.openhft.lang.io.Bytes; import net.openhft.lang.model.constraints.MaxSize; import org.junit.Test; import java.nio.ByteBuffer; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; /** * Created by daniel on 11/06/2014. */ public class VolatileTest { @Test public void testGenerateJavaCode() throws ClassNotFoundException, IllegalAccessException, InstantiationException { DataValueGenerator dvg = new DataValueGenerator(); // dvg.setDumpCode(true); /* try{ BadInterface1 jbi = dvg.heapInstance(BadInterface1.class); assertFalse("Should have thrown an IllegalArgumentException", true); }catch(AssertionError e){ assertTrue("Throws an IllegalArgumentException", true); } try{ BadInterface2 jbi = dvg.heapInstance(BadInterface2.class); assertFalse("Should have thrown an IllegalArgumentException", true); }catch(AssertionError e){ assertTrue("Throws an IllegalArgumentException", true); } */ //Test the heap interface try { GoodInterface jbi = dvg.heapInstance(GoodInterface.class); jbi.setOrderedY(5); assertEquals(5, jbi.getVolatileY()); jbi.setOrderedIntAt(0, 0); jbi.setOrderedIntAt(1, 1); jbi.setOrderedIntAt(2, 2); jbi.setOrderedIntAt(3, 3); assertEquals(0, jbi.getVolatileIntAt(0)); assertEquals(1, jbi.getVolatileIntAt(1)); assertEquals(2, jbi.getVolatileIntAt(2)); assertEquals(3, jbi.getVolatileIntAt(3)); } catch (AssertionError e) { e.printStackTrace(); assertFalse("Throws an IllegalArgumentException", true); } //Test the native interface try { String actual = new DataValueGenerator().generateNativeObject(GoodInterface.class); System.out.println(actual); CachedCompiler cc = new CachedCompiler(null, null); Class aClass = cc.loadFromJava(GoodInterface.class.getName() + "$$Native", actual); GoodInterface jbi = (GoodInterface) aClass.asSubclass(GoodInterface.class).newInstance(); Bytes bytes = ByteBufferBytes.wrap(ByteBuffer.allocate(64)); ((Byteable) jbi).bytes(bytes, 0L); jbi.setOrderedY(5); assertEquals(5, jbi.getVolatileY()); jbi.setOrderedIntAt(0, 0); jbi.setOrderedIntAt(1, 1); jbi.setOrderedIntAt(2, 2); jbi.setOrderedIntAt(3, 3); assertEquals(0, jbi.getVolatileIntAt(0)); assertEquals(1, jbi.getVolatileIntAt(1)); assertEquals(2, jbi.getVolatileIntAt(2)); assertEquals(3, jbi.getVolatileIntAt(3)); } catch (AssertionError e) { e.printStackTrace(); assertFalse("Throws an IllegalArgumentException", true); } } public interface BadInterface1 { int getX(); void setOrderedX(int x); } public interface BadInterface2 { int getVolatileX(); void setX(int x); } public interface GoodInterface { int getX(); void setX(int x); int getVolatileY(); void setOrderedY(int y); int getY(); void setY(int y); void setOrderedIntAt(@MaxSize(4) int idx, int i); int getVolatileIntAt(int idx); } }
{ "pile_set_name": "Github" }
{ "action": { "error": { "variety": [ "Misdelivery" ], "vector": [ "Unknown" ] } }, "actor": { "internal": { "motive": [ "NA" ], "variety": [ "Unknown" ] } }, "asset": { "assets": [ { "variety": "M - Documents" } ], "cloud": [ "Unknown" ] }, "attribute": { "confidentiality": { "data": [ { "amount": 1124, "variety": "Personal" } ], "data_disclosure": "Yes", "data_total": 1124, "data_victim": [ "Patient" ], "state": [ "Unknown" ] } }, "discovery_method": { "external": { "variety": [ "Customer" ] } }, "impact": { "overall_rating": "Unknown" }, "incident_id": "B88F561F-5448-49C7-92FC-3D182B6B7AFD", "plus": { "analysis_status": "Finalized", "analyst": "Spitler", "attribute": { "confidentiality": { "credit_monitoring": "Unknown" } }, "created": "2016-08-02T14:59:00Z", "dbir_year": 2017, "github": "7438", "master_id": "33AB089E-97B0-4BEC-96EB-BADD0650C61D", "modified": "2016-08-02T15:05:00Z", "sub_source": "phidbr", "timeline": { "notification": { "day": 12, "month": 3, "year": 2016 } } }, "reference": "http://www.belgrade-news.com/news/briefs/article_9d62ad6c-efa0-11e5-a58b-37dc64003dc5.html", "schema_version": "1.3.4", "security_incident": "Confirmed", "source_id": "vcdb", "summary": "Misdelivery led to retiring doctors patients' receiving letters addressed to other patients. Only names were disclosed.", "timeline": { "compromise": { "unit": "NA" }, "discovery": { "unit": "Days" }, "exfiltration": { "unit": "NA" }, "incident": { "day": 19, "month": 2, "year": 2016 } }, "victim": { "country": [ "US" ], "employee_count": "Large", "industry": "622110", "region": [ "019021" ], "state": "MT", "victim_id": "Bozeman Health" } }
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.12"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>Nabu-asr: Evaluators</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">Nabu-asr </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.12 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); </script> <div id="main-nav"></div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">Evaluators </div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><p>An evaluator is used to evaluate the performance of the model during training or at test time. To create a new evaluator you should inherit from the general Evaluator class defined in <a class="el" href="evaluator_8py.html" title="contains the Evaluator class ">evaluator.py</a> and overwrite all the abstract methods. Afterwards you should add it to the factory method in <a class="el" href="evaluator__factory_8py.html" title="contains the Evaluator factory ">evaluator_factory.py</a>. It is also very helpful to create a default configuration in the defaults directory. The name of the file should be the name of the class in lower case with the .cfg extension.</p> <p>The decoder_evaluator will use a decoder to decode the validation set and compare the results with the ground truth. You can find more information about decoders ../decoders/README.md "here". </p> </div></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.12 </small></address> </body> </html>
{ "pile_set_name": "Github" }
#include <cmath> #include <vector> #include "caffe/layers/sigmoid_layer.hpp" namespace caffe { template <typename Dtype> inline Dtype sigmoid(Dtype x) { return 1. / (1. + exp(-x)); } template <typename Dtype> void SigmoidLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { const Dtype* bottom_data = bottom[0]->cpu_data(); Dtype* top_data = top[0]->mutable_cpu_data(); const int count = bottom[0]->count(); for (int i = 0; i < count; ++i) { top_data[i] = sigmoid(bottom_data[i]); } } template <typename Dtype> void SigmoidLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top, const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom) { if (propagate_down[0]) { const Dtype* top_data = top[0]->cpu_data(); const Dtype* top_diff = top[0]->cpu_diff(); Dtype* bottom_diff = bottom[0]->mutable_cpu_diff(); const int count = bottom[0]->count(); for (int i = 0; i < count; ++i) { const Dtype sigmoid_x = top_data[i]; bottom_diff[i] = top_diff[i] * sigmoid_x * (1. - sigmoid_x); } } } #ifdef CPU_ONLY STUB_GPU(SigmoidLayer); #endif INSTANTIATE_CLASS(SigmoidLayer); } // namespace caffe
{ "pile_set_name": "Github" }
package edu.stanford.bmir.protege.web.shared.auth; import com.google.common.base.Objects; import edu.stanford.bmir.protege.web.shared.annotations.GwtSerializationConstructor; import edu.stanford.bmir.protege.web.shared.app.UserInSession; import edu.stanford.bmir.protege.web.shared.user.UserDetails; import javax.annotation.Nonnull; import javax.annotation.Nullable; import static com.google.common.base.MoreObjects.toStringHelper; import static com.google.common.base.Preconditions.checkNotNull; /** * Matthew Horridge * Stanford Center for Biomedical Informatics Research * 14/02/15 */ public class PerformLoginResult extends AbstractAuthenticationResult { private UserInSession userInSession; public PerformLoginResult(@Nonnull AuthenticationResponse result, @Nonnull UserInSession userInSession) { super(result); this.userInSession = checkNotNull(userInSession); } @GwtSerializationConstructor private PerformLoginResult() { } /** * Gets the user details of the user after the attempted login. If authentication failed then the guest * details will be returned. */ @Nonnull public UserDetails getUserDetails() { return userInSession.getUserDetails(); } @Nonnull public UserInSession getUserInSession() { return userInSession; } @Override public int hashCode() { return Objects.hashCode(getResponse(), userInSession); } @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof PerformLoginResult)) { return false; } PerformLoginResult other = (PerformLoginResult) obj; return this.getResponse() == other.getResponse() && this.userInSession.equals(other.userInSession); } @Override public String toString() { return toStringHelper("PerformLoginResult") .addValue(getResponse()) .addValue(userInSession) .toString(); } }
{ "pile_set_name": "Github" }
package org.ovirt.engine.core.common.queries; import org.ovirt.engine.core.compat.Guid; public class UnmanagedNetworkParameters extends QueryParametersBase { private static final long serialVersionUID = 3874444912691547792L; private Guid hostId; private String networkName; public UnmanagedNetworkParameters() { } public UnmanagedNetworkParameters(Guid hostId, String networkName) { this.hostId = hostId; this.networkName = networkName; } public Guid getHostId() { return hostId; } public String getNetworkName() { return networkName; } }
{ "pile_set_name": "Github" }
#pragma warning disable 108 // new keyword hiding #pragma warning disable 114 // new keyword hiding namespace Windows.Media.Audio { #if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ [global::Uno.NotImplemented] #endif public partial class CreateAudioGraphResult { #if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ [global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")] public global::Windows.Media.Audio.AudioGraph Graph { get { throw new global::System.NotImplementedException("The member AudioGraph CreateAudioGraphResult.Graph is not implemented in Uno."); } } #endif #if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ [global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")] public global::Windows.Media.Audio.AudioGraphCreationStatus Status { get { throw new global::System.NotImplementedException("The member AudioGraphCreationStatus CreateAudioGraphResult.Status is not implemented in Uno."); } } #endif #if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__ [global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")] public global::System.Exception ExtendedError { get { throw new global::System.NotImplementedException("The member Exception CreateAudioGraphResult.ExtendedError is not implemented in Uno."); } } #endif // Forced skipping of method Windows.Media.Audio.CreateAudioGraphResult.Status.get // Forced skipping of method Windows.Media.Audio.CreateAudioGraphResult.Graph.get // Forced skipping of method Windows.Media.Audio.CreateAudioGraphResult.ExtendedError.get } }
{ "pile_set_name": "Github" }
// GetCurrentProcess.hpp --------------------------------------------------------------// // Copyright 2010 Vicente J. Botet Escriba // Copyright 2015 Andrey Semashev // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt #ifndef BOOST_DETAIL_WINAPI_GETCURRENTPROCESS_HPP #define BOOST_DETAIL_WINAPI_GETCURRENTPROCESS_HPP #include <boost/detail/winapi/get_current_process.hpp> #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once #endif #if defined(__GNUC__) && (((__GNUC__*100)+__GNUC_MINOR__) > 403) #pragma message "This header is deprecated, use boost/detail/winapi/get_current_process.hpp instead." #elif defined(_MSC_VER) #pragma message("This header is deprecated, use boost/detail/winapi/get_current_process.hpp instead.") #endif #endif // BOOST_DETAIL_WINAPI_GETCURRENTPROCESS_HPP
{ "pile_set_name": "Github" }
TIMESTAMP = 1599337977 SHA256 (rebar3-cache-3.14.1.tar.gz) = fd49f3d57db0fce6ed91cfdf92386beaa2763dabb02759656145a88c09263f86 SIZE (rebar3-cache-3.14.1.tar.gz) = 131570 SHA256 (bbmustache-1.10.0.tar) = 43effa3fd4bb9523157af5a9e2276c493495b8459fc8737144aa186cb13ce2ee SIZE (bbmustache-1.10.0.tar) = 17408 SHA256 (certifi-2.5.2.tar) = 3b3b5f36493004ac3455966991eaf6e768ce9884693d9968055aeeeb1e575040 SIZE (certifi-2.5.2.tar) = 161280 SHA256 (cf-0.3.1.tar) = 315e8d447d3a4b02bcdbfa397ad03bbb988a6e0aa6f44d3add0f4e3c3bf97672 SIZE (cf-0.3.1.tar) = 10240 SHA256 (cth_readable-1.4.8.tar) = 46c3bb14df581dc7a9dc0cb9e8c755bff596665fb9a23148dd76e3a200804e90 SIZE (cth_readable-1.4.8.tar) = 18944 SHA256 (erlware_commons-1.3.1.tar) = 7aada93f368d0a0430122e39931b7fb4ac9e94dbf043cdc980ad4330fd9cd166 SIZE (erlware_commons-1.3.1.tar) = 53248 SHA256 (eunit_formatters-0.5.0.tar) = d6c8ba213424944e6e05bbc097c32001cdd0abe3925d02454f229b20d68763c9 SIZE (eunit_formatters-0.5.0.tar) = 14848 SHA256 (getopt-1.0.1.tar) = 53e1ab83b9ceb65c9672d3e7a35b8092e9bdc9b3ee80721471a161c10c59959c SIZE (getopt-1.0.1.tar) = 19456 SHA256 (parse_trans-3.3.0.tar) = 17ef63abde837ad30680ea7f857dd9e7ced9476cdd7b0394432af4bfc241b960 SIZE (parse_trans-3.3.0.tar) = 35840 SHA256 (providers-1.8.1.tar) = e45745ade9c476a9a469ea0840e418ab19360dc44f01a233304e118a44486ba0 SIZE (providers-1.8.1.tar) = 14336 SHA256 (relx-4.0.2.tar) = 21b5d01c78d832b2ed62f9796c77718270ba35432c2845059919fad990c09e17 SIZE (relx-4.0.2.tar) = 72192 SHA256 (ssl_verify_fun-1.1.6.tar) = bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680 SIZE (ssl_verify_fun-1.1.6.tar) = 14848 SHA256 (erlang-rebar3-3.14.1_GH0.tar.gz) = b01275b6cbdb354dcf9ed686fce2b5f9dfdd58972ded9e970e31b9215a8521f2 SIZE (erlang-rebar3-3.14.1_GH0.tar.gz) = 412574
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: b0cf8e1a33d57d44a84dc5ca203e6ab1 timeCreated: 18446744011573954816 AudioImporter: serializedVersion: 6 defaultSettings: loadType: 1 sampleRateSetting: 0 sampleRateOverride: 0 compressionFormat: 0 quality: 0.5 conversionMode: 0 platformSettingOverrides: {} forceToMono: 0 normalize: 1 preloadAudioData: 1 loadInBackground: 0 ambisonic: 0 3D: 0 userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
<template> <view class="notice-box" wx:if="{{display}}"> <view class="bg-box"></view> <view class="column notice-content"> <view class="notice-top-box"> <text class="xxl white">{{title}}</text> </view> <view class="column notice-content-box"> <text class="lg content-box">{{content}}</text> <view class="row-around" wx:if="{{isDouble}}"> <button @tap="close" class="btn-box btn-cancel">取消</button> <button @tap="tap" class="btn-box" open-type="openSetting">{{btnText}}</button> </view> <button @tap="close" wx:else>{{btnText}}</button> </view> </view> </view> <CoverPanel :display.sync="display"/> </template> <script> import wepy from 'wepy'; import CoverPanel from '../common/cover_panel'; export default class Notice extends wepy.component { data = { content: '', display: false, title: '公告', btnText: '我知道了', isDouble: false }; methods = { open({title, btnText, content, isDouble}) { this.display = true; this.title = title; this.btnText = btnText; this.content = content; if (isDouble) { this.isDouble = isDouble; } }, close() { this.display = false; this.$emit('close') }, tap() { this.display = false; this.$emit('tap') } }; components = { CoverPanel: CoverPanel }; } </script> <style lang="scss"> @import "../../styles/variable"; .notice-box{ position: absolute; top:0; right: 0; height: 100%; width: 750rpx; z-index: 10001; .notice-content{ position: fixed; left: 75rpx; right: 75rpx; top: 30%; width: 600rpx; background-color: white; border-radius: 10rpx; } .notice-top-box{ background-color: $color-primary; text-align: center; border-top-left-radius: 10rpx; border-top-right-radius: 10rpx; padding: 20rpx 0; position: relative; } .notice-content-box{ padding: 40rpx; button{ background-color: $color-primary; color: white; } .content-box{ text-align: center; margin-bottom: 40rpx; } .btn-box{ width: 40%; line-height: 2; } .btn-cancel{ color: white; background-color: $color-muted; } } } </style>
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?><!-- Copyright (c) Microsoft. All rights reserved. --><!-- Licensed under the MIT license. See LICENSE file in the project root for full license information. --><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.microsoft.azure.gateway</groupId> <artifactId>gateway-java-binding</artifactId> <version>1.1.0</version> <name>Azure IoT Gateway SDK Java Module Binding</name> <description>Azure IoT Gateway SDK Java Module Binding</description> <url>https://github.com/Azure/azure-iot-gateway-sdk</url> <developers> <developer> <id>microsoft</id> <name>Microsoft</name> </developer> </developers> <licenses> <license> <name>MIT License</name> <url>https://opensource.org/licenses/MIT</url> <distribution>repo</distribution> </license> </licenses> <scm> <url>https://github.com/Azure/azure-iot-gateway-sdk</url> </scm> <dependencies> <!--test dependencies--> <dependency> <groupId>org.jmockit</groupId> <artifactId>jmockit</artifactId> <version>1.22</version> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-all</artifactId> <version>1.3</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.19.1</version> <configuration> <argLine> -Dfile.encoding=UTF-8 -javaagent:${settings.localRepository}/org/jmockit/jmockit/1.22/jmockit-1.22.jar </argLine> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>
{ "pile_set_name": "Github" }
Bitrate="Bitrate" CustomBufsize="Sử dụng tùy chỉnh bộ đệm kích thước" BufferSize="Bộ nhớ đệm lớn nhất" RateControl="Cách kiểm soát bitrate" CRF="CRF" KeyframeIntervalSec="Keyframe Interval (giây, 0 = auto)" CPUPreset="CPU sử dụng (cao hơn = ít sử dụng CPU)" Profile="Hồ sơ" Tune="Điều chỉnh" None="(Trống)" EncoderOptions="x264 tùy chọn (phân cách bởi khoảng trống)" VFR="Framerate thay đổi được (VFR)"
{ "pile_set_name": "Github" }
#pragma once #include "../../Shared.h" #include "ui_InspectorAtemAutoWidget.h" #include "AtemDevice.h" #include "Commands/Atem/AtemAutoCommand.h" #include "Events/Atem/AtemDeviceChangedEvent.h" #include "Events/Rundown/RundownItemSelectedEvent.h" #include "Models/LibraryModel.h" #include <QtCore/QEvent> #include <QtCore/QObject> #include <QtWidgets/QWidget> class WIDGETS_EXPORT InspectorAtemAutoWidget : public QWidget, Ui::InspectorAtemAutoWidget { Q_OBJECT public: explicit InspectorAtemAutoWidget(QWidget* parent = 0); private: quint8 mixerEffects; LibraryModel* model; AtemAutoCommand* command; void checkEmptyStep(); void checkEmptyMixerStep(); void loadAtemMixerStep(); void loadAtemStep(); void loadAtemAutoTransition(); void blockAllSignals(bool block); Q_SLOT void stepChanged(int); Q_SLOT void speedChanged(int); Q_SLOT void transitionChanged(int); Q_SLOT void triggerOnNextChanged(int); Q_SLOT void rundownItemSelected(const RundownItemSelectedEvent&); Q_SLOT void atemDeviceChanged(const AtemDeviceChangedEvent&); Q_SLOT void mixerStepChanged(int); };
{ "pile_set_name": "Github" }
using System.Linq; using LinqToDB; using LinqToDB.Mapping; using NUnit.Framework; namespace Tests.UserTests { [TestFixture] public class Issue1287Tests : TestBase { [Table] [Table("ALLTYPES", Configuration = ProviderName.DB2)] private class AllTypes { [Column] [Column("CHARDATATYPE", Configuration = ProviderName.DB2)] public char charDataType { get; set; } } [Table("AllTypes")] [Table("ALLTYPES", Configuration = ProviderName.DB2)] private class AllTypesNullable { [Column] [Column("CHARDATATYPE", Configuration = ProviderName.DB2)] public char? charDataType { get; set; } } [Test] public void TestNullableChar([DataSources(ProviderName.SqlCe)] string context) { using (var db = GetDataContext(context)) { var list = db.GetTable<AllTypesNullable>().Where(_ => _.charDataType == '1').ToList(); Assert.AreEqual(1, list.Count); Assert.AreEqual('1', list[0].charDataType); } } [Test] public void TestChar([DataSources(ProviderName.SqlCe)] string context) { using (var db = GetDataContext(context)) { var list = db.GetTable<AllTypes>().Where(_ => _.charDataType == '1').ToList(); Assert.AreEqual(1, list.Count); Assert.AreEqual('1', list[0].charDataType); } } } }
{ "pile_set_name": "Github" }
<?php /** * @package AlecadddPlugin */ namespace Inc; final class Init { /** * Store all the classes inside an array * @return array Full list of classes */ public static function get_services() { return [ Pages\Admin::class, Base\Enqueue::class, Base\SettingsLinks::class ]; } /** * Loop through the classes, initialize them, * and call the register() method if it exists * @return */ public static function register_services() { foreach ( self::get_services() as $class ) { $service = self::instantiate( $class ); if ( method_exists( $service, 'register' ) ) { $service->register(); } } } /** * Initialize the class * @param class $class class from the services array * @return class instance new instance of the class */ private static function instantiate( $class ) { $service = new $class(); return $service; } }
{ "pile_set_name": "Github" }
// Server.cpp : Defines the class behaviors for the application. // #include "stdafx.h" #include "Server.h" #include "ServerDlg.h" // CServerApp BEGIN_MESSAGE_MAP(CServerApp, CWinApp) ON_COMMAND(ID_HELP, &CWinApp::OnHelp) END_MESSAGE_MAP() // CServerApp construction CServerApp::CServerApp() { // TODO: add construction code here, // Place all significant initialization in InitInstance } // The one and only CServerApp object CServerApp theApp; // CServerApp initialization BOOL CServerApp::InitInstance() { // InitCommonControlsEx() is required on Windows XP if an application // manifest specifies use of ComCtl32.dll version 6 or later to enable // visual styles. Otherwise, any window creation will fail. INITCOMMONCONTROLSEX InitCtrls; InitCtrls.dwSize = sizeof(InitCtrls); // Set this to include all the common control classes you want to use // in your application. InitCtrls.dwICC = ICC_WIN95_CLASSES; InitCommonControlsEx(&InitCtrls); CWinApp::InitInstance(); AfxEnableControlContainer(); // Create the shell manager, in case the dialog contains // any shell tree view or shell list view controls. CShellManager *pShellManager = new CShellManager; // Standard initialization // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need // Change the registry key under which our settings are stored // TODO: You should modify this string to be something appropriate // such as the name of your company or organization SetRegistryKey(_T("Local AppWizard-Generated Applications")); CServerDlg dlg; m_pMainWnd = &dlg; INT_PTR nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is // dismissed with OK } else if (nResponse == IDCANCEL) { // TODO: Place code here to handle when the dialog is // dismissed with Cancel } // Delete the shell manager created above. if (pShellManager != nullptr) { delete pShellManager; } // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; }
{ "pile_set_name": "Github" }
/* * otg-wakelock.c * * Copyright (C) 2011 Google, Inc. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #include <linux/kernel.h> #include <linux/device.h> #include <linux/err.h> #include <linux/module.h> #include <linux/notifier.h> #include <linux/wakelock.h> #include <linux/spinlock.h> #include <linux/usb/otg.h> #define TEMPORARY_HOLD_TIME 2000 static bool enabled = true; static struct usb_phy *otgwl_xceiv; static struct notifier_block otgwl_nb; /* * otgwl_spinlock is held while the VBUS lock is grabbed or dropped and the * held field is updated to match. */ static DEFINE_SPINLOCK(otgwl_spinlock); /* * Only one lock, but since these 3 fields are associated with each other... */ struct otgwl_lock { char name[40]; struct wake_lock wakelock; bool held; }; /* * VBUS present lock. Also used as a timed lock on charger * connect/disconnect and USB host disconnect, to allow the system * to react to the change in power. */ static struct otgwl_lock vbus_lock; static void otgwl_hold(struct otgwl_lock *lock) { if (!lock->held) { wake_lock(&lock->wakelock); lock->held = true; } } static void otgwl_temporary_hold(struct otgwl_lock *lock) { wake_lock_timeout(&lock->wakelock, msecs_to_jiffies(TEMPORARY_HOLD_TIME)); lock->held = false; } static void otgwl_drop(struct otgwl_lock *lock) { if (lock->held) { wake_unlock(&lock->wakelock); lock->held = false; } } static void otgwl_handle_event(unsigned long event) { unsigned long irqflags; spin_lock_irqsave(&otgwl_spinlock, irqflags); if (!enabled) { otgwl_drop(&vbus_lock); spin_unlock_irqrestore(&otgwl_spinlock, irqflags); return; } switch (event) { case USB_EVENT_VBUS: case USB_EVENT_ENUMERATED: otgwl_hold(&vbus_lock); break; case USB_EVENT_NONE: case USB_EVENT_ID: case USB_EVENT_CHARGER: otgwl_temporary_hold(&vbus_lock); break; default: break; } spin_unlock_irqrestore(&otgwl_spinlock, irqflags); } static int otgwl_otg_notifications(struct notifier_block *nb, unsigned long event, void *unused) { otgwl_handle_event(event); return NOTIFY_OK; } static int set_enabled(const char *val, const struct kernel_param *kp) { int rv = param_set_bool(val, kp); if (rv) return rv; if (otgwl_xceiv) otgwl_handle_event(otgwl_xceiv->last_event); return 0; } static struct kernel_param_ops enabled_param_ops = { .set = set_enabled, .get = param_get_bool, }; module_param_cb(enabled, &enabled_param_ops, &enabled, 0644); MODULE_PARM_DESC(enabled, "enable wakelock when VBUS present"); static int __init otg_wakelock_init(void) { int ret; struct usb_phy *phy; phy = usb_get_phy(USB_PHY_TYPE_USB2); if (IS_ERR(phy)) { pr_err("%s: No USB transceiver found\n", __func__); return PTR_ERR(phy); } otgwl_xceiv = phy; snprintf(vbus_lock.name, sizeof(vbus_lock.name), "vbus-%s", dev_name(otgwl_xceiv->dev)); wake_lock_init(&vbus_lock.wakelock, WAKE_LOCK_SUSPEND, vbus_lock.name); otgwl_nb.notifier_call = otgwl_otg_notifications; ret = usb_register_notifier(otgwl_xceiv, &otgwl_nb); if (ret) { pr_err("%s: usb_register_notifier on transceiver %s" " failed\n", __func__, dev_name(otgwl_xceiv->dev)); otgwl_xceiv = NULL; wake_lock_destroy(&vbus_lock.wakelock); return ret; } otgwl_handle_event(otgwl_xceiv->last_event); return ret; } late_initcall(otg_wakelock_init);
{ "pile_set_name": "Github" }
name: "game" scale_along_z: 0 embedded_instances { id: "loader" data: "components {\n" " id: \"script\"\n" " component: \"/game/core/loader.script\"\n" " position {\n" " x: 0.0\n" " y: 0.0\n" " z: 0.0\n" " }\n" " rotation {\n" " x: 0.0\n" " y: 0.0\n" " z: 0.0\n" " w: 1.0\n" " }\n" "}\n" "embedded_components {\n" " id: \"level1\"\n" " type: \"collectionproxy\"\n" " data: \"collection: \\\"/game/levels/level1.collection\\\"\\n" "exclude: false\\n" "\"\n" " position {\n" " x: 0.0\n" " y: 0.0\n" " z: 0.0\n" " }\n" " rotation {\n" " x: 0.0\n" " y: 0.0\n" " z: 0.0\n" " w: 1.0\n" " }\n" "}\n" "embedded_components {\n" " id: \"level2\"\n" " type: \"collectionproxy\"\n" " data: \"collection: \\\"/game/levels/level2.collection\\\"\\n" "exclude: false\\n" "\"\n" " position {\n" " x: 0.0\n" " y: 0.0\n" " z: 0.0\n" " }\n" " rotation {\n" " x: 0.0\n" " y: 0.0\n" " z: 0.0\n" " w: 1.0\n" " }\n" "}\n" "embedded_components {\n" " id: \"level3\"\n" " type: \"collectionproxy\"\n" " data: \"collection: \\\"/game/levels/level3.collection\\\"\\n" "exclude: false\\n" "\"\n" " position {\n" " x: 0.0\n" " y: 0.0\n" " z: 0.0\n" " }\n" " rotation {\n" " x: 0.0\n" " y: 0.0\n" " z: 0.0\n" " w: 1.0\n" " }\n" "}\n" "embedded_components {\n" " id: \"level4\"\n" " type: \"collectionproxy\"\n" " data: \"collection: \\\"/game/levels/level4.collection\\\"\\n" "exclude: false\\n" "\"\n" " position {\n" " x: 0.0\n" " y: 0.0\n" " z: 0.0\n" " }\n" " rotation {\n" " x: 0.0\n" " y: 0.0\n" " z: 0.0\n" " w: 1.0\n" " }\n" "}\n" "" position { x: 0.0 y: 0.0 z: 1.0 } rotation { x: 0.0 y: 0.0 z: 0.0 w: 1.0 } scale3 { x: 1.0 y: 1.0 z: 1.0 } }
{ "pile_set_name": "Github" }
package dsfs import ( "context" "fmt" "github.com/qri-io/dataset" "github.com/qri-io/qfs/cafs" ) // loadViz assumes the provided path is valid func loadViz(ctx context.Context, store cafs.Filestore, path string) (st *dataset.Viz, err error) { data, err := fileBytes(store.Get(ctx, path)) if err != nil { log.Debug(err.Error()) return nil, fmt.Errorf("error loading viz file: %s", err.Error()) } return dataset.UnmarshalViz(data) } // ErrNoViz is the error for asking a dataset without a viz component for viz info var ErrNoViz = fmt.Errorf("this dataset has no viz component")
{ "pile_set_name": "Github" }
/* * This software is Copyright (c) 2012-2015 Sayantan Datta <std2048 at gmail dot com> * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without * modification, are permitted. * Based on Solar Designer implementation of DES_bs_b.c in jtr-v1.7.9 */ #include "opencl_DES_kernel_params.h" #if USE_LOCAL_MEM #define KEY_MAP s_key_map #else #define KEY_MAP key_map #endif #if WORK_GROUP_SIZE > 0 #define y(p, q) vxorf(B[p], s_des_bs_key[KEY_MAP[q + k] + s_key_offset]) #else #define y(p, q) vxorf(B[p], des_bs_key[section + KEY_MAP[q + k] * gws]) #endif #define H1()\ s1(y(processed_salt[0], 0), y(processed_salt[1], 1), y(processed_salt[2], 2), y(processed_salt[3], 3), y(processed_salt[4], 4), y(processed_salt[5], 5),\ B,40, 48, 54, 62);\ s2(y(processed_salt[6], 6), y(processed_salt[7], 7), y(processed_salt[8], 8), y(processed_salt[9], 9), y(processed_salt[10], 10), y(processed_salt[11], 11),\ B,44, 59, 33, 49);\ s3(y(7, 12), y(8, 13), y(9, 14),\ y(10, 15), y(11, 16), y(12, 17),\ B,55, 47, 61, 37);\ s4(y(11, 18), y(12, 19), y(13, 20),\ y(14, 21), y(15, 22), y(16, 23),\ B,57, 51, 41, 32);\ s5(y(processed_salt[12], 24), y(processed_salt[13], 25), y(processed_salt[14], 26), y(processed_salt[15], 27), y(processed_salt[16], 28), y(processed_salt[17], 29),\ B,39, 45, 56, 34);\ s6(y(processed_salt[18], 30), y(processed_salt[19], 31), y(processed_salt[20], 32), y(processed_salt[21], 33), y(processed_salt[22], 34), y(processed_salt[23], 35),\ B,35, 60, 42, 50);\ s7(y(23, 36), y(24, 37), y(25, 38),\ y(26, 39), y(27, 40), y(28, 41),\ B,63, 43, 53, 38);\ s8(y(27, 42), y(28, 43), y(29, 44),\ y(30, 45), y(31, 46), y(0, 47),\ B,36, 58, 46, 52); #define H2()\ s1(y(processed_salt[24], 48), y(processed_salt[25], 49), y(processed_salt[26], 50), y(processed_salt[27], 51), y(processed_salt[28], 52), y(processed_salt[29], 53),\ B,8, 16, 22, 30);\ s2(y(processed_salt[30], 54), y(processed_salt[31], 55), y(processed_salt[32], 56), y(processed_salt[33], 57), y(processed_salt[34], 58), y(processed_salt[35], 59),\ B,12, 27, 1, 17);\ s3(y(39, 60), y(40, 61), y(41, 62),\ y(42, 63), y(43, 64), y(44, 65),\ B,23, 15, 29, 5);\ s4(y(43, 66), y(44, 67), y(45, 68),\ y(46, 69), y(47, 70), y(48, 71),\ B,25, 19, 9, 0);\ s5(y(processed_salt[36], 72), y(processed_salt[37], 73), y(processed_salt[38], 74), y(processed_salt[39], 75), y(processed_salt[40], 76), y(processed_salt[41], 77),\ B,7, 13, 24, 2);\ s6(y(processed_salt[42], 78), y(processed_salt[43], 79), y(processed_salt[44], 80), y(processed_salt[45], 81), y(processed_salt[46], 82), y(processed_salt[47], 83),\ B,3, 28, 10, 18);\ s7(y(55, 84), y(56, 85), y(57, 86),\ y(58, 87), y(59, 88), y(60, 89),\ B,31, 11, 21, 6);\ s8(y(59, 90), y(60, 91), y(61, 92),\ y(62, 93), y(63, 94), y(32, 95),\ B,4, 26, 14, 20); #ifdef _CPU #define loop_body()\ H1();\ if (rounds_and_swapped == 0x100) goto next;\ H2();\ k += 96;\ rounds_and_swapped--;\ H1();\ if (rounds_and_swapped == 0x100) goto next;\ H2();\ k += 96;\ rounds_and_swapped--; #else #define loop_body()\ H1();\ if (rounds_and_swapped == 0x100) goto next;\ H2();\ k += 96;\ rounds_and_swapped--; #endif #define SWAP(a, b) { \ tmp = B[a]; \ B[a] = B[b]; \ B[b] = tmp; \ } #define BIG_SWAP() { \ SWAP(0, 32); \ SWAP(1, 33); \ SWAP(2, 34); \ SWAP(3, 35); \ SWAP(4, 36); \ SWAP(5, 37); \ SWAP(6, 38); \ SWAP(7, 39); \ SWAP(8, 40); \ SWAP(9, 41); \ SWAP(10, 42); \ SWAP(11, 43); \ SWAP(12, 44); \ SWAP(13, 45); \ SWAP(14, 46); \ SWAP(15, 47); \ SWAP(16, 48); \ SWAP(17, 49); \ SWAP(18, 50); \ SWAP(19, 51); \ SWAP(20, 52); \ SWAP(21, 53); \ SWAP(22, 54); \ SWAP(23, 55); \ SWAP(24, 56); \ SWAP(25, 57); \ SWAP(26, 58); \ SWAP(27, 59); \ SWAP(28, 60); \ SWAP(29, 61); \ SWAP(30, 62); \ SWAP(31, 63); \ } __kernel void DES_bs_25_b(constant uint *key_map #if !defined(__OS_X__) && gpu_amd(DEVICE_INFO) __attribute__((max_constant_size(3072))) #endif , constant int *processed_salt #if !defined(__OS_X__) && gpu_amd(DEVICE_INFO) __attribute__((max_constant_size(192))) #endif , __global DES_bs_vector *des_bs_key, __global vtype *unchecked_hashes) { int section = get_global_id(0); #if WORK_GROUP_SIZE || USE_LOCAL_MEM int lid = get_local_id(0); #endif int gws = get_global_size(0); vtype B[64]; int iterations; int k, i; #if WORK_GROUP_SIZE > 0 __local DES_bs_vector s_des_bs_key[56 * WORK_GROUP_SIZE]; int s_key_offset = lid * 56; for (i = 0; i < 56; i++) s_des_bs_key[lid * 56 + i] = des_bs_key[section + i * gws]; #endif #if USE_LOCAL_MEM __local ushort s_key_map[768]; int lws = get_local_size(0); for (i = 0; i < 768; i += lws) s_key_map[(lid + i) % 768] = key_map[(lid + i) % 768]; #endif #if USE_LOCAL_MEM || WORK_GROUP_SIZE > 0 barrier(CLK_LOCAL_MEM_FENCE); #endif { vtype zero = 0; DES_bs_clear_block } #ifdef SAFE_GOTO vtype tmp; for (iterations = 24; iterations >= 0; iterations--) { for (k = 0; k < 768; k += 96) { H1(); H2(); } BIG_SWAP(); } BIG_SWAP(); for (i = 0; i < 64; i++) unchecked_hashes[i * gws + section] = B[i]; #else int rounds_and_swapped; k = 0; rounds_and_swapped = 8; iterations = 25; start: loop_body(); if (rounds_and_swapped > 0) goto start; k -= (0x300 + 48); rounds_and_swapped = 0x108; if (--iterations) goto swap; for (i = 0; i < 64; i++) unchecked_hashes[i * gws + section] = B[i]; return; swap: H2(); k += 96; if (--rounds_and_swapped) goto start; next: k -= (0x300 - 48); rounds_and_swapped = 8; iterations--; goto start; #endif }
{ "pile_set_name": "Github" }
accessing valueNode: aNode valueNode := aNode
{ "pile_set_name": "Github" }
<?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE_AFL.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magento.com for more information. * * @category design * @package default_default * @copyright Copyright (c) 2006-2020 Magento, Inc. (http://www.magento.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> <script type="text/javascript"> //<![CDATA[ var isReturnKeyPressed = false; var idGlobal = 0; /** * Return innerHTML for TD label * * @return string */ function getTdLabelInnerHtml(id) { return '<span class="field-row"><input id="'+id+'" type="text" class="label onclick_text input-text" value="" name="conf[new_pages][labels][]"></span>'; } /** * Return innerHTML for TD Value * * @return string */ function getTdValueInnerHtml() { var html = '<span class="field-row"><select class=" select" name="conf[new_pages][ids][]">' <?php foreach($this->getOptions() as $page): ?> + '<option value="<?php echo $this->jsQuoteEscape($this->htmlEscape($page['value'])); ?>"><?php echo $this->jsQuoteEscape($this->htmlEscape($page['label']));?></option>' <?php endforeach; ?> + '</select></span>'; return html; } /** * Return innerHTML for TD Button * * @return string */ function getTdButtonInnerHtml(id) { return '<button id="'+id+'" class=" scalable save onclick_button" value="&minus;">' +'<span><?php echo Mage::helper('core')->jsQuoteEscape($this->__('Delete')); ?></span></button>'; } /** * Delete row from table * @param object DomElement * @return bool; */ function removeTableRow(node) { if (!isReturnKeyPressed) { node.parentNode.parentNode.parentNode.removeChild(node.parentNode.parentNode); } return false; } /** * Insert new row into table * * @return bool; */ function insertNewTableRow(node) { var tableNode = node.parentNode.parentNode.parentNode.parentNode; var tbodyNode = node.parentNode.parentNode.parentNode; /** * "-1" skiping <script> child inside tbody element */ var rowCount = tbodyNode.children.length - 1; var newRow = tableNode.insertRow(rowCount); var cellLabel = newRow.insertCell(0); cellLabel.className = 'label'; cellLabel.innerHTML = getTdLabelInnerHtml('add_row_text_label'+idGlobal); var cellValue = newRow.insertCell(1); cellValue.className = 'value'; cellValue.innerHTML = getTdValueInnerHtml(); var cellButton = newRow.insertCell(2); cellButton.innerHTML = getTdButtonInnerHtml('add_row_button_delete_'+idGlobal); cellButton.className = 'label'; Element.setStyle(cellButton, { width: '5em'}); observeTextField($('add_row_text_label'+idGlobal)); observeButtonField($('add_row_button_delete_'+idGlobal)); idGlobal++; return false; } document.observe("dom:loaded", function() { $$('.onclick_text').each(function(element) { observeTextField(element); }); $$('.onclick_button').each(function(element) { observeButtonField(element); }); }); /** * Adds observer on to text field * @param element */ function observeTextField(element) { if (element) { Event.observe(element, 'keypress', function(event) { var key = event.which || event.keyCode; if (key == Event.KEY_RETURN) { isReturnKeyPressed = true; } return false; }); Event.observe(element, 'blur', function(event) { isReturnKeyPressed = false; }); } } /** * Adds observer for button delete field * @param element */ function observeButtonField(element) { if (element) { Event.observe(element, 'click', function(event) { removeTableRow(element); Event.stop(event); return false; }); } } // ]]> </script>
{ "pile_set_name": "Github" }
Sat === Sage supports solving clauses in Conjunctive Normal Form (see :wikipedia:`Conjunctive_normal_form`), i.e., SAT solving, via an interface inspired by the usual DIMACS format used in SAT solving [SG09]_. For example, to express that:: x1 OR x2 OR (NOT x3) should be true, we write:: (1, 2, -3) .. WARNING:: Variable indices **must** start at one. Solvers ------- By default, Sage solves SAT instances as an Integer Linear Program (see :mod:`sage.numerical.mip`), but any SAT solver supporting the DIMACS input format is easily interfaced using the :class:`sage.sat.solvers.dimacs.DIMACS` blueprint. Sage ships with pre-written interfaces for *RSat* [RS]_ and *Glucose* [GL]_. Furthermore, Sage provides an interface to the *CryptoMiniSat* [CMS]_ SAT solver which can be used interchangably with DIMACS-based solvers. For this last solver, the optional CryptoMiniSat package must be installed, this can be accomplished by typing the following in the shell:: sage -i cryptominisat sagelib We now show how to solve a simple SAT problem. :: (x1 OR x2 OR x3) AND (x1 OR x2 OR (NOT x3)) In Sage's notation:: sage: solver = SAT() sage: solver.add_clause( ( 1, 2, 3) ) sage: solver.add_clause( ( 1, 2, -3) ) sage: solver() # random (None, True, True, False) .. NOTE:: :meth:`~sage.sat.solvers.dimacs.DIMACS.add_clause` creates new variables when necessary. When using CryptoMiniSat, it creates *all* variables up to the given index. Hence, adding a literal involving the variable 1000 creates up to 1000 internal variables. DIMACS-base solvers can also be used to write DIMACS files:: sage: from sage.sat.solvers.dimacs import DIMACS sage: fn = tmp_filename() sage: solver = DIMACS(filename=fn) sage: solver.add_clause( ( 1, 2, 3) ) sage: solver.add_clause( ( 1, 2, -3) ) sage: _ = solver.write() sage: for line in open(fn).readlines(): ....: print(line) p cnf 3 2 1 2 3 0 1 2 -3 0 Alternatively, there is :meth:`sage.sat.solvers.dimacs.DIMACS.clauses`:: sage: from sage.sat.solvers.dimacs import DIMACS sage: fn = tmp_filename() sage: solver = DIMACS() sage: solver.add_clause( ( 1, 2, 3) ) sage: solver.add_clause( ( 1, 2, -3) ) sage: solver.clauses(fn) sage: for line in open(fn).readlines(): ....: print(line) p cnf 3 2 1 2 3 0 1 2 -3 0 These files can then be passed external SAT solvers. Details on Specific Solvers ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 sage/sat/solvers/satsolver sage/sat/solvers/dimacs sage/sat/solvers/picosat sage/sat/solvers/sat_lp sage/sat/solvers/cryptominisat Converters ---------- Sage supports conversion from Boolean polynomials (also known as Algebraic Normal Form) to Conjunctive Normal Form:: sage: B.<a,b,c> = BooleanPolynomialRing() sage: from sage.sat.converters.polybori import CNFEncoder sage: from sage.sat.solvers.dimacs import DIMACS sage: fn = tmp_filename() sage: solver = DIMACS(filename=fn) sage: e = CNFEncoder(solver, B) sage: e.clauses_sparse(a*b + a + 1) sage: _ = solver.write() sage: print(open(fn).read()) p cnf 3 2 -2 0 1 0 <BLANKLINE> Details on Specific Converterts ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 sage/sat/converters/polybori Highlevel Interfaces -------------------- Sage provides various highlevel functions which make working with Boolean polynomials easier. We construct a very small-scale AES system of equations and pass it to a SAT solver:: sage: sr = mq.SR(1,1,1,4,gf2=True,polybori=True) sage: F,s = sr.polynomial_system() sage: from sage.sat.boolean_polynomials import solve as solve_sat # optional - cryptominisat sage: s = solve_sat(F) # optional - cryptominisat sage: F.subs(s[0]) # optional - cryptominisat Polynomial Sequence with 36 Polynomials in 0 Variables Details on Specific Highlevel Interfaces ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. toctree:: :maxdepth: 1 sage/sat/boolean_polynomials REFERENCES: .. [RS] http://reasoning.cs.ucla.edu/rsat/ .. [GL] http://www.lri.fr/~simon/?page=glucose .. [CMS] http://www.msoos.org .. [SG09] http://www.satcompetition.org/2009/format-benchmarks2009.html .. include:: ../footer.txt
{ "pile_set_name": "Github" }
use crate::error::{ConnectorError, ErrorKind}; use chrono::Utc; use prisma_models::{ModelProjection, ModelRef, PrismaValue, RecordProjection, ScalarFieldRef}; use std::{ borrow::Borrow, collections::{hash_map::Keys, HashMap}, convert::TryInto, ops::Deref, }; /// WriteArgs represent data to be written to an underlying data source. #[derive(Debug, PartialEq, Clone, Default)] pub struct WriteArgs { pub args: HashMap<DatasourceFieldName, WriteExpression>, } #[derive(Debug, PartialEq, Clone, Hash, Eq)] /// Wrapper struct to force a bit of a reflection whether or not the string passed /// to the write arguments is the data source field name, not the model field name. /// Also helps to avoid errors with convenient from-field conversions. pub struct DatasourceFieldName(pub String); impl Deref for DatasourceFieldName { type Target = str; fn deref(&self) -> &Self::Target { &self.0 } } impl Borrow<str> for DatasourceFieldName { fn borrow(&self) -> &str { &self.0 } } impl From<&ScalarFieldRef> for DatasourceFieldName { fn from(sf: &ScalarFieldRef) -> Self { DatasourceFieldName(sf.db_name().to_owned()) } } /// A WriteExpression allows to express more complex operations on how the data is written, /// like field or inter-field arithmetic. #[derive(Debug, PartialEq, Clone)] pub enum WriteExpression { /// Reference to another field on the same model. Field(DatasourceFieldName), /// Write plain value to field. Value(PrismaValue), /// Add value to field. Add(PrismaValue), /// Substract value from field Substract(PrismaValue), /// Multiply field by value. Multiply(PrismaValue), /// Divide field by value. Divide(PrismaValue), } impl From<PrismaValue> for WriteExpression { fn from(pv: PrismaValue) -> Self { WriteExpression::Value(pv) } } impl TryInto<PrismaValue> for WriteExpression { type Error = ConnectorError; fn try_into(self) -> Result<PrismaValue, Self::Error> { match self { WriteExpression::Value(pv) => Ok(pv), x => Err(ConnectorError::from_kind(ErrorKind::InternalConversionError(format!( "Unable to convert write expression {:?} into prisma value.", x )))), } } } impl From<HashMap<DatasourceFieldName, PrismaValue>> for WriteArgs { fn from(args: HashMap<DatasourceFieldName, PrismaValue>) -> Self { Self { args: args.into_iter().map(|(k, v)| (k, WriteExpression::Value(v))).collect(), } } } impl From<HashMap<DatasourceFieldName, WriteExpression>> for WriteArgs { fn from(args: HashMap<DatasourceFieldName, WriteExpression>) -> Self { Self { args } } } impl From<Vec<(DatasourceFieldName, PrismaValue)>> for WriteArgs { fn from(pairs: Vec<(DatasourceFieldName, PrismaValue)>) -> Self { Self { args: pairs.into_iter().map(|(k, v)| (k, WriteExpression::Value(v))).collect(), } } } impl From<Vec<(DatasourceFieldName, WriteExpression)>> for WriteArgs { fn from(pairs: Vec<(DatasourceFieldName, WriteExpression)>) -> Self { Self { args: pairs.into_iter().collect(), } } } impl WriteArgs { pub fn new() -> Self { Self { args: HashMap::new() } } pub fn insert<T, V>(&mut self, key: T, arg: V) where T: Into<DatasourceFieldName>, V: Into<WriteExpression>, { self.args.insert(key.into(), arg.into()); } pub fn has_arg_for(&self, field: &str) -> bool { self.args.contains_key(field) } pub fn get_field_value(&self, field: &str) -> Option<&WriteExpression> { self.args.get(field) } pub fn take_field_value(&mut self, field: &str) -> Option<WriteExpression> { self.args.remove(field) } pub fn keys(&self) -> Keys<DatasourceFieldName, WriteExpression> { self.args.keys() } pub fn is_empty(&self) -> bool { self.args.is_empty() } pub fn len(&self) -> usize { self.args.len() } pub fn add_datetimes(&mut self, model: ModelRef) { let now = PrismaValue::DateTime(Utc::now()); let created_at_field = model.fields().created_at(); let updated_at_field = model.fields().updated_at(); if let Some(f) = created_at_field { if let None = self.args.get(f.db_name()) { self.args.insert(f.into(), now.clone().into()); } } if let Some(f) = updated_at_field { if let None = self.args.get(f.db_name()) { self.args.insert(f.into(), now.clone().into()); } } } pub fn update_datetimes(&mut self, model: ModelRef) { if !self.args.is_empty() { if let Some(field) = model.fields().updated_at() { if let None = self.args.get(field.db_name()) { self.args.insert(field.into(), PrismaValue::DateTime(Utc::now()).into()); } } } } pub fn as_record_projection(&self, model_projection: ModelProjection) -> Option<RecordProjection> { let pairs: Vec<_> = model_projection .scalar_fields() .map(|field| { let val: PrismaValue = match self.get_field_value(field.db_name()) { Some(val) => { // Important: This causes write expressions that are not plain values to produce // null values. At the moment, this function is used to extract an ID for // create record calls, which only operate on plain values _for now_. As soon // as that changes we need to revisit the whole ID extraction on create / update topic. let p: Option<PrismaValue> = val.clone().try_into().ok(); match p { Some(p) => p, None => PrismaValue::Null, } } None => PrismaValue::Null, }; (field.clone(), val.clone()) }) .collect(); Some(pairs.into()) } }
{ "pile_set_name": "Github" }
package cc.bitky.clustermanage.netty; import cc.bitky.clustermanage.netty.message.MsgType; import cc.bitky.clustermanage.netty.message.base.WebMsgBaseEmployee; /** * 服务器部署员工部门 */ public class WebMsgDeployEmployeeDepartment2 extends WebMsgBaseEmployee { public WebMsgDeployEmployeeDepartment2(int groupId, int boxId, String value) { super(groupId, boxId, value); setMsgId(MsgType.SERVER_SET_EMPLOYEE_DEPARTMENT_2); } }
{ "pile_set_name": "Github" }
/** * Copyright (c) 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. */ #pragma once #include <wdt/ErrorCodes.h> #include <wdt/WdtThread.h> #include <condition_variable> #include <memory> #include <mutex> #include <unordered_map> #include <vector> namespace facebook { namespace wdt { class WdtThread; /** * Thread states that represent what kind of functionality * are they executing on a higher level. * INIT - State before running at the time of construction * RUNNING - Thread is running without any errors * WAITING - Thread is not doing anything meaninful but * rather waiting on other threads for something * FINISHED - Threads have finished with/without error */ enum ThreadStatus { INIT, RUNNING, WAITING, FINISHED }; /** * Primitive that takes a function and executes * it only once either on the first thread * or the last thread entrance */ class ExecuteOnceFunc { public: /// Constructor for the once only executor ExecuteOnceFunc(int numThreads, bool execFirst) { execFirst_ = execFirst; numThreads_ = numThreads; } /// Deleted copy constructor ExecuteOnceFunc(const ExecuteOnceFunc &that) = delete; /// Deleted assignment operator ExecuteOnceFunc &operator=(const ExecuteOnceFunc &that) = delete; /// Implements the main functionality of the executor template <typename Func> void execute(Func &&execFunc) { std::unique_lock<std::mutex> lock(mutex_); ++numHits_; WDT_CHECK(numHits_ <= numThreads_); int64_t numExpected = (execFirst_) ? 1 : numThreads_; if (numHits_ == numExpected) { execFunc(); } } /// Reset the number of hits void reset() { numHits_ = 0; } private: /// Mutex for thread synchronization std::mutex mutex_; /// Number of times execute has been called int numHits_{0}; /// Function can be executed on the first /// thread or the last thread bool execFirst_{true}; /// Number of total threads int numThreads_; }; /** * A scoped locking primitive. When you get this object * it means that you already have the lock. You can also * wait, notify etc using this primitive */ class ConditionGuardImpl { public: /// Release the lock and wait for the timeout /// After the wait is over, lock is reacquired void wait(int timeoutMillis, const ThreadCtx &threadCtx); /// Notify all the threads waiting on the lock void notifyAll(); /// Notify one thread waiting on the lock void notifyOne(); /// Delete the copy constructor ConditionGuardImpl(const ConditionGuardImpl &that) = delete; /// Delete the copy assignment operator ConditionGuardImpl &operator=(const ConditionGuardImpl &that) = delete; /// Move constructor for the guard ConditionGuardImpl(ConditionGuardImpl &&that) noexcept; /// Move assignment operator deleted ConditionGuardImpl &operator=(ConditionGuardImpl &&that) = delete; /// Destructor that releases the lock, you would explicitly /// need to notify any other threads waiting in the wait() ~ConditionGuardImpl(); protected: friend class ConditionGuard; friend class Funnel; /// Constructor that takes the shared mutex and condition /// variable ConditionGuardImpl(std::mutex &mutex, std::condition_variable &cv); /// Instance of lock is made on construction with the specified mutex std::unique_lock<std::mutex> *lock_{nullptr}; /// Shared condition variable std::condition_variable &cv_; }; /** * Class for simplifying the primitive to take a lock * in conjunction with the ability to do things * on a condition variable based on the lock. * Use the condition guard like this * ConditionGuard condition; * auto guard = condition.acquire(); * guard.wait(); */ class ConditionGuard { public: /// Caller has to call acquire before doing anything ConditionGuardImpl acquire(); /// Default constructor ConditionGuard() { } /// Deleted copy constructor ConditionGuard(const ConditionGuard &that) = delete; /// Deleted assignment operator ConditionGuard &operator=(const ConditionGuard &that) = delete; private: /// Mutex for the condition variable std::mutex mutex_; /// std condition variable to support the functionality std::condition_variable cv_; }; /** * A barrier primitive. When called for executing * will block the threads till all the threads registered * call execute() */ class Barrier { public: /// Deleted copy constructor Barrier(const Barrier &that) = delete; /// Deleted assignment operator Barrier &operator=(const Barrier &that) = delete; /// Constructor which takes total number of threads /// to be hit in order for the barrier to clear explicit Barrier(int numThreads) { numThreads_ = numThreads; WVLOG(1) << "making barrier with " << numThreads; } /// Executes the main functionality of the barrier void execute(); /** * Thread controller should call this method when one thread * has been finished, since that thread will no longer be * participating in the barrier */ void deRegister(); private: /// Checks for finish, need to hold a lock to call this method bool checkForFinish(); /// Condition variable that threads wait on std::condition_variable cv_; /// Number of threads entered the execute int64_t numHits_{0}; /// Total number of threads that are supposed /// to hit the barrier int numThreads_{0}; /// Thread synchronization mutex std::mutex mutex_; /// Represents the completion of barrier bool isComplete_{false}; }; /** * Different stages of the simple funnel * FUNNEL_START the state of funnel at the beginning * FUNNEL_PROGRESS is set by the first thread to enter the funnel * and it means that funnel functionality is in progress * FUNNEL_END means that funnel functionality has been executed */ enum FunnelStatus { FUNNEL_START, FUNNEL_PROGRESS, FUNNEL_END }; /** * Primitive that makes the threads execute in a funnel * manner. Only one thread gets to execute the main functionality * while other entering threads wait (while executing a function) */ class Funnel { public: /// Deleted copy constructor Funnel(const Funnel &that) = delete; /// Default constructor for funnel Funnel() { status_ = FUNNEL_START; } /// Deleted assignment operator Funnel &operator=(const Funnel &that) = delete; /** * Get the current status of funnel. * If the status is FUNNEL_START it gets set * to FUNNEL_PROGRESS else it is just a get */ FunnelStatus getStatus(); /// Threads in progress can wait indefinitely void wait(); /// Threads that get status as progress execute this function void wait(int32_t waitingTime, const ThreadCtx &threadCtx); /** * The first thread that was able to start the funnel * calls this method on successful execution */ void notifySuccess(); /// The first thread that was able to start the funnel /// calls this method on failure in execution void notifyFail(); private: /// Status of the funnel FunnelStatus status_; /// Mutex for the simple funnel executor std::mutex mutex_; /// Condition variable on which progressing threads wait std::condition_variable cv_; }; /** * Controller class responsible for the receiver * and sender threads. Manages the states of threads and * session information */ class ThreadsController { public: /// Constructor that takes in the total number of threads /// to be run explicit ThreadsController(int totalThreads); /// Make threads of a type Sender/Receiver template <typename WdtBaseType, typename WdtThreadType> std::vector<std::unique_ptr<WdtThread>> makeThreads( WdtBaseType *wdtParent, int numThreads, const std::vector<int32_t> &ports) { std::vector<std::unique_ptr<WdtThread>> threads; for (int threadIndex = 0; threadIndex < numThreads; ++threadIndex) { threads.emplace_back(std::make_unique<WdtThreadType>( wdtParent, threadIndex, ports[threadIndex], this)); } return threads; } /// Mark the state of a thread void markState(int threadIndex, ThreadStatus state); /// Get the status of the thread by index ThreadStatus getState(int threadIndex); /// Execute a function func once, by the first thread template <typename FunctionType> void executeAtStart(FunctionType &&fn) const { execAtStart_->execute(fn); } /// Execute a function once by the last thread template <typename FunctionType> void executeAtEnd(FunctionType &&fn) const { execAtEnd_->execute(fn); } /// Returns a funnel executor shared between the threads /// If the executor does not exist then it creates one std::shared_ptr<Funnel> getFunnel(uint64_t funnelIndex); /// Returns a barrier shared between the threads /// If the executor does not exist then it creates one std::shared_ptr<Barrier> getBarrier(uint64_t barrierIndex); /// Get the condition variable wrapper std::shared_ptr<ConditionGuard> getCondition(uint64_t conditionIndex); /* * Returns back states of all the threads */ std::unordered_map<int, ThreadStatus> getThreadStates() const; /// Register a thread, a thread registers with the state RUNNING void registerThread(int threadIndex); /// De-register a thread, marks it ended void deRegisterThread(int threadIndex); /// Returns true if any thread apart from the calling is in the state bool hasThreads(int threadIndex, ThreadStatus threadState); /// @return true if any registered thread is in the state bool hasThreads(ThreadStatus threadState); /// Get the nunber of registered threads int getTotalThreads(); /// Get the number of threads with status RUNNING int numRunningThreads(); /// Reset the thread controller so that same instance can be used again void reset(); /// Set the total number of barriers void setNumBarriers(int numBarriers); /// Set the number of condition wrappers void setNumConditions(int numConditions); /// Set total number of funnel executors void setNumFunnels(int numFunnels); /// Destructor for the threads controller ~ThreadsController() { } private: /// Total number of threads managed by the thread controller int totalThreads_; typedef std::unique_lock<std::mutex> GuardLock; /// Mutex used in all of the thread controller methods mutable std::mutex controllerMutex_; /// States of the threads std::unordered_map<int, ThreadStatus> threadStateMap_; /// Executor to execute things at the start of transfer std::unique_ptr<ExecuteOnceFunc> execAtStart_; /// Executor to execute things at the end of transfer std::unique_ptr<ExecuteOnceFunc> execAtEnd_; /// Vector of funnel executors, read/modified by get/set funnel methods std::vector<std::shared_ptr<Funnel>> funnelExecutors_; /// Vector of condition wrappers, read/modified by get/set condition methods std::vector<std::shared_ptr<ConditionGuard>> conditionGuards_; /// Vector of barriers, can be read/modified by get/set barrier methods std::vector<std::shared_ptr<Barrier>> barriers_; }; } }
{ "pile_set_name": "Github" }
{{- if .Values.rbac.enabled }} apiVersion: v1 kind: ServiceAccount metadata: name: {{ include "enmasse.fullname" . }}-address-space-controller labels: {{ include "enmasse.labels" . | indent 4 }} {{- end }}
{ "pile_set_name": "Github" }
// (C) Copyright John Maddock 2000. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.tt.org/LICENSE_1_0.txt) #include "test.hpp" #include "check_type.hpp" #ifdef TEST_STD # include <type_traits> #else # include <boost/type_traits/remove_bounds.hpp> #endif BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_1, ::tt::remove_bounds, const, const) BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_2, ::tt::remove_bounds, volatile, volatile) BOOST_DECL_TRANSFORM_TEST3(remove_bounds_test_3, ::tt::remove_bounds, [2]) BOOST_DECL_TRANSFORM_TEST0(remove_bounds_test_4, ::tt::remove_bounds) BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_5, ::tt::remove_bounds, const &, const&) BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_6, ::tt::remove_bounds, *, *) BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_7, ::tt::remove_bounds, *volatile, *volatile) BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_8, ::tt::remove_bounds, const [2], const) BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_9, ::tt::remove_bounds, const &, const&) BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_10, ::tt::remove_bounds, const*, const*) BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_11, ::tt::remove_bounds, volatile*, volatile*) BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_12, ::tt::remove_bounds, const[2][3], const[3]) BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_13, ::tt::remove_bounds, (&)[2], (&)[2]) BOOST_DECL_TRANSFORM_TEST3(remove_bounds_test_14, ::tt::remove_bounds, []) BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_15, ::tt::remove_bounds, const [], const) BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_16, ::tt::remove_bounds, const[][3], const[3]) #ifndef BOOST_NO_RVALUE_REFERENCES BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_5a, ::tt::remove_bounds, const &&, const&&) BOOST_DECL_TRANSFORM_TEST(remove_bounds_test_13a, ::tt::remove_bounds, (&&)[2], (&&)[2]) #endif TT_TEST_BEGIN(remove_bounds) remove_bounds_test_1(); remove_bounds_test_2(); remove_bounds_test_3(); remove_bounds_test_4(); remove_bounds_test_5(); remove_bounds_test_6(); remove_bounds_test_7(); remove_bounds_test_8(); remove_bounds_test_9(); remove_bounds_test_10(); remove_bounds_test_11(); remove_bounds_test_12(); remove_bounds_test_13(); remove_bounds_test_14(); remove_bounds_test_15(); remove_bounds_test_16(); #ifndef BOOST_NO_RVALUE_REFERENCES remove_bounds_test_5a(); remove_bounds_test_13a(); #endif TT_TEST_END
{ "pile_set_name": "Github" }
UNKNOWN ======= * help * list help ---- * Description: Displays help for a command * Usage: * `help [--xml] [--format FORMAT] [--raw] [--] [<command_name>]` The <info>help</info> command displays help for a given command: <info>php app/console help list</info> You can also output the help in other formats by using the <comment>--format</comment> option: <info>php app/console help --format=xml list</info> To display the list of available commands, please use the <info>list</info> command. ### Arguments: **command_name:** * Name: command_name * Is required: no * Is array: no * Description: The command name * Default: `'help'` ### Options: **xml:** * Name: `--xml` * Shortcut: <none> * Accept value: no * Is value required: no * Is multiple: no * Description: To output help as XML * Default: `false` **format:** * Name: `--format` * Shortcut: <none> * Accept value: yes * Is value required: yes * Is multiple: no * Description: The output format (txt, xml, json, or md) * Default: `'txt'` **raw:** * Name: `--raw` * Shortcut: <none> * Accept value: no * Is value required: no * Is multiple: no * Description: To output raw command help * Default: `false` **help:** * Name: `--help` * Shortcut: `-h` * Accept value: no * Is value required: no * Is multiple: no * Description: Display this help message * Default: `false` **quiet:** * Name: `--quiet` * Shortcut: `-q` * Accept value: no * Is value required: no * Is multiple: no * Description: Do not output any message * Default: `false` **verbose:** * Name: `--verbose` * Shortcut: `-v|-vv|-vvv` * Accept value: no * Is value required: no * Is multiple: no * Description: Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug * Default: `false` **version:** * Name: `--version` * Shortcut: `-V` * Accept value: no * Is value required: no * Is multiple: no * Description: Display this application version * Default: `false` **ansi:** * Name: `--ansi` * Shortcut: <none> * Accept value: no * Is value required: no * Is multiple: no * Description: Force ANSI output * Default: `false` **no-ansi:** * Name: `--no-ansi` * Shortcut: <none> * Accept value: no * Is value required: no * Is multiple: no * Description: Disable ANSI output * Default: `false` **no-interaction:** * Name: `--no-interaction` * Shortcut: `-n` * Accept value: no * Is value required: no * Is multiple: no * Description: Do not ask any interactive question * Default: `false` list ---- * Description: Lists commands * Usage: * `list [--xml] [--raw] [--format FORMAT] [--] [<namespace>]` The <info>list</info> command lists all commands: <info>php app/console list</info> You can also display the commands for a specific namespace: <info>php app/console list test</info> You can also output the information in other formats by using the <comment>--format</comment> option: <info>php app/console list --format=xml</info> It's also possible to get raw list of commands (useful for embedding command runner): <info>php app/console list --raw</info> ### Arguments: **namespace:** * Name: namespace * Is required: no * Is array: no * Description: The namespace name * Default: `NULL` ### Options: **xml:** * Name: `--xml` * Shortcut: <none> * Accept value: no * Is value required: no * Is multiple: no * Description: To output list as XML * Default: `false` **raw:** * Name: `--raw` * Shortcut: <none> * Accept value: no * Is value required: no * Is multiple: no * Description: To output raw command list * Default: `false` **format:** * Name: `--format` * Shortcut: <none> * Accept value: yes * Is value required: yes * Is multiple: no * Description: The output format (txt, xml, json, or md) * Default: `'txt'`
{ "pile_set_name": "Github" }
{ "browsers": { "chrome": ["Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.1 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2227.0 Safari/537.36", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2226.0 Safari/537.36", "Mozilla/5.0 (Windows NT 6.4; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2225.0 Safari/537.36", "Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2225.0 Safari/537.36", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2224.3 Safari/537.36", "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.124 Safari/537.36", "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36", "Mozilla/5.0 (Windows NT 4.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2049.0 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.67 Safari/537.36", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.67 Safari/537.36", "Mozilla/5.0 (X11; OpenBSD i386) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1944.0 Safari/537.36", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.3319.102 Safari/537.36", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.2309.372 Safari/537.36", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.2117.157 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.47 Safari/537.36", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1866.237 Safari/537.36", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/4E423F", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10", "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.517 Safari/537.36", "Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1667.0 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1664.3 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1664.3 Safari/537.36", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.16 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1623.0 Safari/537.36", "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.17 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36", "Mozilla/5.0 (X11; CrOS i686 4319.74.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36", "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36", "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1467.0 Safari/537.36", "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1464.0 Safari/537.36", "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1500.55 Safari/537.36", "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36", "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.90 Safari/537.36", "Mozilla/5.0 (X11; NetBSD) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36", "Mozilla/5.0 (X11; CrOS i686 3912.101.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.60 Safari/537.17", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1309.0 Safari/537.17", "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.15 (KHTML, like Gecko) Chrome/24.0.1295.0 Safari/537.15", "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.14 (KHTML, like Gecko) Chrome/24.0.1292.0 Safari/537.14"], "opera": ["Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16", "Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14", "Mozilla/5.0 (Windows NT 6.0; rv:2.0) Gecko/20100101 Firefox/4.0 Opera 12.14", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0) Opera 12.14", "Opera/12.80 (Windows NT 5.1; U; en) Presto/2.10.289 Version/12.02", "Opera/9.80 (Windows NT 6.1; U; es-ES) Presto/2.9.181 Version/12.00", "Opera/9.80 (Windows NT 5.1; U; zh-sg) Presto/2.9.181 Version/12.00", "Opera/12.0(Windows NT 5.2;U;en)Presto/22.9.168 Version/12.00", "Opera/12.0(Windows NT 5.1;U;en)Presto/22.9.168 Version/12.00", "Mozilla/5.0 (Windows NT 5.1) Gecko/20100101 Firefox/14.0 Opera/12.0", "Opera/9.80 (Windows NT 6.1; WOW64; U; pt) Presto/2.10.229 Version/11.62", "Opera/9.80 (Windows NT 6.0; U; pl) Presto/2.10.229 Version/11.62", "Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; fr) Presto/2.9.168 Version/11.52", "Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; de) Presto/2.9.168 Version/11.52", "Opera/9.80 (Windows NT 5.1; U; en) Presto/2.9.168 Version/11.51", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; de) Opera 11.51", "Opera/9.80 (X11; Linux x86_64; U; fr) Presto/2.9.168 Version/11.50", "Opera/9.80 (X11; Linux i686; U; hu) Presto/2.9.168 Version/11.50", "Opera/9.80 (X11; Linux i686; U; ru) Presto/2.8.131 Version/11.11", "Opera/9.80 (X11; Linux i686; U; es-ES) Presto/2.8.131 Version/11.11", "Mozilla/5.0 (Windows NT 5.1; U; en; rv:1.8.1) Gecko/20061208 Firefox/5.0 Opera 11.11", "Opera/9.80 (X11; Linux x86_64; U; bg) Presto/2.8.131 Version/11.10", "Opera/9.80 (Windows NT 6.0; U; en) Presto/2.8.99 Version/11.10", "Opera/9.80 (Windows NT 5.1; U; zh-tw) Presto/2.8.131 Version/11.10", "Opera/9.80 (Windows NT 6.1; Opera Tablet/15165; U; en) Presto/2.8.149 Version/11.1", "Opera/9.80 (X11; Linux x86_64; U; Ubuntu/10.10 (maverick); pl) Presto/2.7.62 Version/11.01", "Opera/9.80 (X11; Linux i686; U; ja) Presto/2.7.62 Version/11.01", "Opera/9.80 (X11; Linux i686; U; fr) Presto/2.7.62 Version/11.01", "Opera/9.80 (Windows NT 6.1; U; zh-tw) Presto/2.7.62 Version/11.01", "Opera/9.80 (Windows NT 6.1; U; zh-cn) Presto/2.7.62 Version/11.01", "Opera/9.80 (Windows NT 6.1; U; sv) Presto/2.7.62 Version/11.01", "Opera/9.80 (Windows NT 6.1; U; en-US) Presto/2.7.62 Version/11.01", "Opera/9.80 (Windows NT 6.1; U; cs) Presto/2.7.62 Version/11.01", "Opera/9.80 (Windows NT 6.0; U; pl) Presto/2.7.62 Version/11.01", "Opera/9.80 (Windows NT 5.2; U; ru) Presto/2.7.62 Version/11.01", "Opera/9.80 (Windows NT 5.1; U;) Presto/2.7.62 Version/11.01", "Opera/9.80 (Windows NT 5.1; U; cs) Presto/2.7.62 Version/11.01", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101213 Opera/9.80 (Windows NT 6.1; U; zh-tw) Presto/2.7.62 Version/11.01", "Mozilla/5.0 (Windows NT 6.1; U; nl; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Opera 11.01", "Mozilla/5.0 (Windows NT 6.1; U; de; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 Opera 11.01", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; de) Opera 11.01", "Opera/9.80 (X11; Linux x86_64; U; pl) Presto/2.7.62 Version/11.00", "Opera/9.80 (X11; Linux i686; U; it) Presto/2.7.62 Version/11.00", "Opera/9.80 (Windows NT 6.1; U; zh-cn) Presto/2.6.37 Version/11.00", "Opera/9.80 (Windows NT 6.1; U; pl) Presto/2.7.62 Version/11.00", "Opera/9.80 (Windows NT 6.1; U; ko) Presto/2.7.62 Version/11.00", "Opera/9.80 (Windows NT 6.1; U; fi) Presto/2.7.62 Version/11.00", "Opera/9.80 (Windows NT 6.1; U; en-GB) Presto/2.7.62 Version/11.00", "Opera/9.80 (Windows NT 6.1 x64; U; en) Presto/2.7.62 Version/11.00", "Opera/9.80 (Windows NT 6.0; U; en) Presto/2.7.39 Version/11.00"], "firefox": ["Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.1", "Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10; rv:33.0) Gecko/20100101 Firefox/33.0", "Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/31.0", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20130401 Firefox/31.0", "Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 Firefox/31.0", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20120101 Firefox/29.0", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/29.0", "Mozilla/5.0 (X11; OpenBSD amd64; rv:28.0) Gecko/20100101 Firefox/28.0", "Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0", "Mozilla/5.0 (Windows NT 6.1; rv:27.3) Gecko/20130101 Firefox/27.3", "Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:27.0) Gecko/20121011 Firefox/27.0", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:25.0) Gecko/20100101 Firefox/25.0", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0", "Mozilla/5.0 (Windows NT 6.0; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0", "Mozilla/5.0 (Windows NT 6.2; rv:22.0) Gecko/20130405 Firefox/23.0", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:23.0) Gecko/20130406 Firefox/23.0", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:23.0) Gecko/20131011 Firefox/23.0", "Mozilla/5.0 (Windows NT 6.2; rv:22.0) Gecko/20130405 Firefox/22.0", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:22.0) Gecko/20130328 Firefox/22.0", "Mozilla/5.0 (Windows NT 6.1; rv:22.0) Gecko/20130405 Firefox/22.0", "Mozilla/5.0 (Microsoft Windows NT 6.2.9200.0); rv:22.0) Gecko/20130405 Firefox/22.0", "Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:16.0.1) Gecko/20121011 Firefox/21.0.1", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:16.0.1) Gecko/20121011 Firefox/21.0.1", "Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:21.0.0) Gecko/20121011 Firefox/21.0.0", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20130331 Firefox/21.0", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20100101 Firefox/21.0", "Mozilla/5.0 (X11; Linux i686; rv:21.0) Gecko/20100101 Firefox/21.0", "Mozilla/5.0 (Windows NT 6.2; WOW64; rv:21.0) Gecko/20130514 Firefox/21.0", "Mozilla/5.0 (Windows NT 6.2; rv:21.0) Gecko/20130326 Firefox/21.0", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20130401 Firefox/21.0", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20130331 Firefox/21.0", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20130330 Firefox/21.0", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:21.0) Gecko/20100101 Firefox/21.0", "Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20130401 Firefox/21.0", "Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20130328 Firefox/21.0", "Mozilla/5.0 (Windows NT 6.1; rv:21.0) Gecko/20100101 Firefox/21.0", "Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20130401 Firefox/21.0", "Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20130331 Firefox/21.0", "Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20100101 Firefox/21.0", "Mozilla/5.0 (Windows NT 5.0; rv:21.0) Gecko/20100101 Firefox/21.0", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0", "Mozilla/5.0 (Windows NT 6.2; Win64; x64;) Gecko/20100101 Firefox/20.0", "Mozilla/5.0 (Windows x86; rv:19.0) Gecko/20100101 Firefox/19.0", "Mozilla/5.0 (Windows NT 6.1; rv:6.0) Gecko/20100101 Firefox/19.0", "Mozilla/5.0 (Windows NT 6.1; rv:14.0) Gecko/20100101 Firefox/18.0.1", "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0", "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:17.0) Gecko/20100101 Firefox/17.0.6"], "internetexplorer": ["Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; AS; rv:11.0) like Gecko", "Mozilla/5.0 (compatible, MSIE 11, Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko", "Mozilla/5.0 (compatible; MSIE 10.6; Windows NT 6.1; Trident/5.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727) 3gpp-gba UNTRUSTED/1.0", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 7.0; InfoPath.3; .NET CLR 3.1.40767; Trident/6.0; en-IN)", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/5.0)", "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/4.0; InfoPath.2; SV1; .NET CLR 2.0.50727; WOW64)", "Mozilla/5.0 (compatible; MSIE 10.0; Macintosh; Intel Mac OS X 10_7_3; Trident/6.0)", "Mozilla/4.0 (Compatible; MSIE 8.0; Windows NT 5.2; Trident/6.0)", "Mozilla/4.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/5.0)", "Mozilla/1.22 (compatible; MSIE 10.0; Windows 3.1)", "Mozilla/5.0 (Windows; U; MSIE 9.0; WIndows NT 9.0; en-US))", "Mozilla/5.0 (Windows; U; MSIE 9.0; Windows NT 9.0; en-US)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 7.1; Trident/5.0)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; Zune 4.7)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; Media Center PC 6.0; InfoPath.3; MS-RTC LM 8; Zune 4.7", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Zune 4.0; InfoPath.3; MS-RTC LM 8; .NET4.0C; .NET4.0E)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; chromeframe/12.0.742.112)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 2.0.50727; Media Center PC 6.0)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 2.0.50727; Media Center PC 6.0)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Zune 4.0; Tablet PC 2.0; InfoPath.3; .NET4.0C; .NET4.0E)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; yie8)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET CLR 1.1.4322; .NET4.0C; Tablet PC 2.0)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; FunWebProducts)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; chromeframe/13.0.782.215)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; chromeframe/11.0.696.57)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0) chromeframe/10.0.648.205", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.1; SV1; .NET CLR 2.8.52393; WOW64; en-US)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/5.0; chromeframe/11.0.696.57)", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.0; Trident/4.0; GTB7.4; InfoPath.3; SV1; .NET CLR 3.1.76908; WOW64; en-US)", "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB7.4; InfoPath.2; SV1; .NET CLR 3.3.69573; WOW64; en-US)", "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET CLR 1.0.3705; .NET CLR 1.1.4322)", "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; InfoPath.1; SV1; .NET CLR 3.8.36217; WOW64; en-US)", "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; .NET CLR 2.7.58687; SLCC2; Media Center PC 5.0; Zune 3.4; Tablet PC 3.6; InfoPath.3)", "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; Media Center PC 4.0; SLCC1; .NET CLR 3.0.04320)", "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322)", "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727)", "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)", "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.1; SLCC1; .NET CLR 1.1.4322)", "Mozilla/5.0 (compatible; MSIE 8.0; Windows NT 5.0; Trident/4.0; InfoPath.1; SV1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 3.0.04506.30)", "Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.0; Trident/4.0; FBSMTWB; .NET CLR 2.0.34861; .NET CLR 3.0.3746.3218; .NET CLR 3.5.33652; msn OptimizedIE8;ENUS)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.2; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; Media Center PC 6.0; InfoPath.2; MS-RTC LM 8)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; Media Center PC 6.0; InfoPath.2; MS-RTC LM 8", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; Media Center PC 6.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; InfoPath.3; .NET4.0C; .NET4.0E; .NET CLR 3.5.30729; .NET CLR 3.0.30729; MS-RTC LM 8)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; InfoPath.2)", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Zune 3.0)"], "safari": ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/7046A194A", "Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5355d Safari/8536.25", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/534.55.3 (KHTML, like Gecko) Version/5.1.3 Safari/534.53.10", "Mozilla/5.0 (iPad; CPU OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko ) Version/5.1 Mobile/9B176 Safari/7534.48.3", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; de-at) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; da-dk) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1", "Mozilla/5.0 (Windows; U; Windows NT 6.1; tr-TR) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Windows; U; Windows NT 6.1; ko-KR) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Windows; U; Windows NT 6.1; fr-FR) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Windows; U; Windows NT 6.1; cs-CZ) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Windows; U; Windows NT 6.0; ja-JP) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_8; zh-cn) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_8; ja-jp) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; ja-jp) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; zh-cn) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; sv-se) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; ko-kr) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; ja-jp) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; it-it) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; fr-fr) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; es-es) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-gb) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; de-de) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.4 Safari/533.20.27", "Mozilla/5.0 (Windows; U; Windows NT 6.1; sv-SE) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Windows; U; Windows NT 6.1; ja-JP) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Windows; U; Windows NT 6.1; de-DE) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Windows; U; Windows NT 6.0; hu-HU) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Windows; U; Windows NT 6.0; de-DE) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.20.25 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/534.16+ (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; fr-ch) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; de-de) AppleWebKit/534.15+ (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; ar) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Android 2.2; Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4", "Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-HK) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5", "Mozilla/5.0 (Windows; U; Windows NT 6.0; tr-TR) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5", "Mozilla/5.0 (Windows; U; Windows NT 6.0; nb-NO) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5", "Mozilla/5.0 (Windows; U; Windows NT 6.0; fr-FR) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5", "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW) AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5", "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5", "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; zh-cn) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5"] }, "randomize": { "344": "chrome", "819": "firefox", "346": "chrome", "347": "chrome", "340": "chrome", "341": "chrome", "342": "chrome", "343": "chrome", "810": "internetexplorer", "811": "internetexplorer", "812": "internetexplorer", "813": "firefox", "348": "chrome", "349": "chrome", "816": "firefox", "817": "firefox", "737": "chrome", "719": "chrome", "718": "chrome", "717": "chrome", "716": "chrome", "715": "chrome", "714": "chrome", "713": "chrome", "712": "chrome", "711": "chrome", "710": "chrome", "421": "chrome", "129": "chrome", "420": "chrome", "423": "chrome", "422": "chrome", "425": "chrome", "619": "chrome", "424": "chrome", "427": "chrome", "298": "chrome", "299": "chrome", "296": "chrome", "297": "chrome", "294": "chrome", "295": "chrome", "292": "chrome", "293": "chrome", "290": "chrome", "291": "chrome", "591": "chrome", "590": "chrome", "593": "chrome", "592": "chrome", "595": "chrome", "594": "chrome", "597": "chrome", "596": "chrome", "195": "chrome", "194": "chrome", "197": "chrome", "196": "chrome", "191": "chrome", "190": "chrome", "193": "chrome", "192": "chrome", "270": "chrome", "271": "chrome", "272": "chrome", "273": "chrome", "274": "chrome", "275": "chrome", "276": "chrome", "277": "chrome", "278": "chrome", "279": "chrome", "569": "chrome", "497": "chrome", "524": "chrome", "525": "chrome", "526": "chrome", "527": "chrome", "520": "chrome", "521": "chrome", "522": "chrome", "523": "chrome", "528": "chrome", "529": "chrome", "449": "chrome", "448": "chrome", "345": "chrome", "443": "chrome", "442": "chrome", "441": "chrome", "440": "chrome", "447": "chrome", "446": "chrome", "445": "chrome", "444": "chrome", "47": "chrome", "108": "chrome", "109": "chrome", "102": "chrome", "103": "chrome", "100": "chrome", "101": "chrome", "106": "chrome", "107": "chrome", "104": "chrome", "105": "chrome", "902": "firefox", "903": "firefox", "39": "chrome", "38": "chrome", "906": "firefox", "907": "firefox", "904": "firefox", "905": "firefox", "33": "chrome", "32": "chrome", "31": "chrome", "30": "chrome", "37": "chrome", "36": "chrome", "35": "chrome", "34": "chrome", "641": "chrome", "640": "chrome", "643": "chrome", "642": "chrome", "645": "chrome", "644": "chrome", "438": "chrome", "439": "chrome", "436": "chrome", "437": "chrome", "434": "chrome", "435": "chrome", "432": "chrome", "433": "chrome", "430": "chrome", "431": "chrome", "826": "firefox", "339": "chrome", "338": "chrome", "335": "chrome", "334": "chrome", "337": "chrome", "336": "chrome", "331": "chrome", "330": "chrome", "333": "chrome", "332": "chrome", "559": "chrome", "745": "chrome", "854": "firefox", "818": "firefox", "856": "firefox", "857": "firefox", "850": "firefox", "851": "firefox", "852": "firefox", "0": "chrome", "858": "firefox", "859": "firefox", "748": "chrome", "6": "chrome", "43": "chrome", "99": "chrome", "98": "chrome", "91": "chrome", "90": "chrome", "93": "chrome", "92": "chrome", "95": "chrome", "94": "chrome", "97": "chrome", "96": "chrome", "814": "firefox", "815": "firefox", "153": "chrome", "740": "chrome", "741": "chrome", "742": "chrome", "743": "chrome", "744": "chrome", "558": "chrome", "746": "chrome", "747": "chrome", "555": "chrome", "554": "chrome", "557": "chrome", "556": "chrome", "551": "chrome", "550": "chrome", "553": "chrome", "552": "chrome", "238": "chrome", "239": "chrome", "234": "chrome", "235": "chrome", "236": "chrome", "237": "chrome", "230": "chrome", "231": "chrome", "232": "chrome", "233": "chrome", "1": "chrome", "155": "chrome", "146": "chrome", "147": "chrome", "618": "chrome", "145": "chrome", "142": "chrome", "143": "chrome", "140": "chrome", "141": "chrome", "612": "chrome", "613": "chrome", "610": "chrome", "611": "chrome", "616": "chrome", "617": "chrome", "148": "chrome", "149": "chrome", "46": "chrome", "154": "chrome", "948": "safari", "949": "safari", "946": "safari", "947": "safari", "944": "safari", "945": "safari", "942": "safari", "943": "safari", "940": "safari", "941": "safari", "689": "chrome", "688": "chrome", "685": "chrome", "684": "chrome", "687": "chrome", "686": "chrome", "681": "chrome", "680": "chrome", "683": "chrome", "682": "chrome", "458": "chrome", "459": "chrome", "133": "chrome", "132": "chrome", "131": "chrome", "130": "chrome", "137": "chrome", "136": "chrome", "135": "chrome", "134": "chrome", "494": "chrome", "495": "chrome", "139": "chrome", "138": "chrome", "490": "chrome", "491": "chrome", "492": "chrome", "493": "chrome", "24": "chrome", "25": "chrome", "26": "chrome", "27": "chrome", "20": "chrome", "21": "chrome", "22": "chrome", "23": "chrome", "28": "chrome", "29": "chrome", "820": "firefox", "407": "chrome", "406": "chrome", "405": "chrome", "404": "chrome", "403": "chrome", "402": "chrome", "401": "chrome", "400": "chrome", "933": "firefox", "932": "firefox", "931": "firefox", "930": "firefox", "937": "safari", "452": "chrome", "409": "chrome", "408": "chrome", "453": "chrome", "414": "chrome", "183": "chrome", "415": "chrome", "379": "chrome", "378": "chrome", "228": "chrome", "829": "firefox", "828": "firefox", "371": "chrome", "370": "chrome", "373": "chrome", "372": "chrome", "375": "chrome", "374": "chrome", "377": "chrome", "376": "chrome", "708": "chrome", "709": "chrome", "704": "chrome", "705": "chrome", "706": "chrome", "707": "chrome", "700": "chrome", "144": "chrome", "702": "chrome", "703": "chrome", "393": "chrome", "392": "chrome", "88": "chrome", "89": "chrome", "397": "chrome", "396": "chrome", "395": "chrome", "394": "chrome", "82": "chrome", "83": "chrome", "80": "chrome", "81": "chrome", "86": "chrome", "87": "chrome", "84": "chrome", "85": "chrome", "797": "internetexplorer", "796": "internetexplorer", "795": "internetexplorer", "794": "internetexplorer", "793": "internetexplorer", "792": "internetexplorer", "791": "internetexplorer", "790": "internetexplorer", "749": "chrome", "799": "internetexplorer", "798": "internetexplorer", "7": "chrome", "170": "chrome", "586": "chrome", "587": "chrome", "584": "chrome", "585": "chrome", "582": "chrome", "583": "chrome", "580": "chrome", "581": "chrome", "588": "chrome", "589": "chrome", "245": "chrome", "244": "chrome", "247": "chrome", "246": "chrome", "241": "chrome", "614": "chrome", "243": "chrome", "242": "chrome", "615": "chrome", "249": "chrome", "248": "chrome", "418": "chrome", "419": "chrome", "519": "chrome", "518": "chrome", "511": "chrome", "510": "chrome", "513": "chrome", "512": "chrome", "515": "chrome", "514": "chrome", "517": "chrome", "516": "chrome", "623": "chrome", "622": "chrome", "621": "chrome", "620": "chrome", "627": "chrome", "626": "chrome", "625": "chrome", "624": "chrome", "450": "chrome", "451": "chrome", "629": "chrome", "628": "chrome", "454": "chrome", "455": "chrome", "456": "chrome", "457": "chrome", "179": "chrome", "178": "chrome", "177": "chrome", "199": "chrome", "175": "chrome", "174": "chrome", "173": "chrome", "172": "chrome", "171": "chrome", "198": "chrome", "977": "opera", "182": "chrome", "975": "opera", "974": "opera", "973": "opera", "972": "opera", "971": "opera", "970": "opera", "180": "chrome", "979": "opera", "978": "opera", "656": "chrome", "599": "chrome", "654": "chrome", "181": "chrome", "186": "chrome", "187": "chrome", "184": "chrome", "185": "chrome", "652": "chrome", "188": "chrome", "189": "chrome", "658": "chrome", "653": "chrome", "650": "chrome", "651": "chrome", "11": "chrome", "10": "chrome", "13": "chrome", "12": "chrome", "15": "chrome", "14": "chrome", "17": "chrome", "16": "chrome", "19": "chrome", "18": "chrome", "863": "firefox", "862": "firefox", "865": "firefox", "864": "firefox", "867": "firefox", "866": "firefox", "354": "chrome", "659": "chrome", "44": "chrome", "883": "firefox", "882": "firefox", "881": "firefox", "880": "firefox", "887": "firefox", "886": "firefox", "885": "firefox", "884": "firefox", "889": "firefox", "888": "firefox", "116": "chrome", "45": "chrome", "657": "chrome", "355": "chrome", "322": "chrome", "323": "chrome", "320": "chrome", "321": "chrome", "326": "chrome", "327": "chrome", "324": "chrome", "325": "chrome", "328": "chrome", "329": "chrome", "562": "chrome", "201": "chrome", "200": "chrome", "203": "chrome", "202": "chrome", "205": "chrome", "204": "chrome", "207": "chrome", "206": "chrome", "209": "chrome", "208": "chrome", "779": "internetexplorer", "778": "internetexplorer", "77": "chrome", "76": "chrome", "75": "chrome", "74": "chrome", "73": "chrome", "72": "chrome", "71": "chrome", "70": "chrome", "655": "chrome", "567": "chrome", "79": "chrome", "78": "chrome", "359": "chrome", "358": "chrome", "669": "chrome", "668": "chrome", "667": "chrome", "666": "chrome", "665": "chrome", "664": "chrome", "663": "chrome", "662": "chrome", "661": "chrome", "660": "chrome", "215": "chrome", "692": "chrome", "693": "chrome", "690": "chrome", "691": "chrome", "696": "chrome", "697": "chrome", "694": "chrome", "695": "chrome", "698": "chrome", "699": "chrome", "542": "chrome", "543": "chrome", "540": "chrome", "541": "chrome", "546": "chrome", "547": "chrome", "544": "chrome", "545": "chrome", "8": "chrome", "548": "chrome", "549": "chrome", "598": "chrome", "869": "firefox", "868": "firefox", "120": "chrome", "121": "chrome", "122": "chrome", "123": "chrome", "124": "chrome", "125": "chrome", "126": "chrome", "127": "chrome", "128": "chrome", "2": "chrome", "219": "chrome", "176": "chrome", "214": "chrome", "563": "chrome", "928": "firefox", "929": "firefox", "416": "chrome", "417": "chrome", "410": "chrome", "411": "chrome", "412": "chrome", "413": "chrome", "920": "firefox", "498": "chrome", "922": "firefox", "923": "firefox", "924": "firefox", "925": "firefox", "926": "firefox", "927": "firefox", "319": "chrome", "318": "chrome", "313": "chrome", "312": "chrome", "311": "chrome", "310": "chrome", "317": "chrome", "316": "chrome", "315": "chrome", "314": "chrome", "921": "firefox", "496": "chrome", "832": "firefox", "833": "firefox", "830": "firefox", "831": "firefox", "836": "firefox", "837": "firefox", "834": "firefox", "835": "firefox", "838": "firefox", "839": "firefox", "3": "chrome", "368": "chrome", "369": "chrome", "366": "chrome", "367": "chrome", "364": "chrome", "365": "chrome", "362": "chrome", "363": "chrome", "360": "chrome", "361": "chrome", "218": "chrome", "380": "chrome", "861": "firefox", "382": "chrome", "383": "chrome", "384": "chrome", "385": "chrome", "386": "chrome", "387": "chrome", "388": "chrome", "389": "chrome", "784": "internetexplorer", "785": "internetexplorer", "786": "internetexplorer", "787": "internetexplorer", "780": "internetexplorer", "781": "internetexplorer", "782": "internetexplorer", "381": "chrome", "788": "internetexplorer", "789": "internetexplorer", "860": "firefox", "151": "chrome", "579": "chrome", "578": "chrome", "150": "chrome", "573": "chrome", "572": "chrome", "571": "chrome", "570": "chrome", "577": "chrome", "576": "chrome", "575": "chrome", "574": "chrome", "60": "chrome", "61": "chrome", "62": "chrome", "259": "chrome", "64": "chrome", "65": "chrome", "66": "chrome", "67": "chrome", "68": "chrome", "253": "chrome", "250": "chrome", "251": "chrome", "256": "chrome", "257": "chrome", "254": "chrome", "255": "chrome", "499": "chrome", "157": "chrome", "156": "chrome", "939": "safari", "731": "chrome", "730": "chrome", "733": "chrome", "938": "safari", "735": "chrome", "734": "chrome", "508": "chrome", "736": "chrome", "506": "chrome", "738": "chrome", "504": "chrome", "505": "chrome", "502": "chrome", "503": "chrome", "500": "chrome", "501": "chrome", "630": "chrome", "631": "chrome", "632": "chrome", "633": "chrome", "469": "chrome", "468": "chrome", "636": "chrome", "637": "chrome", "465": "chrome", "464": "chrome", "467": "chrome", "466": "chrome", "461": "chrome", "900": "firefox", "463": "chrome", "462": "chrome", "901": "firefox", "168": "chrome", "169": "chrome", "164": "chrome", "165": "chrome", "166": "chrome", "167": "chrome", "160": "chrome", "161": "chrome", "162": "chrome", "163": "chrome", "964": "safari", "965": "safari", "966": "safari", "967": "safari", "960": "safari", "961": "safari", "962": "safari", "963": "safari", "783": "internetexplorer", "968": "safari", "969": "opera", "936": "firefox", "935": "firefox", "934": "firefox", "908": "firefox", "909": "firefox", "722": "chrome", "426": "chrome", "878": "firefox", "879": "firefox", "876": "firefox", "877": "firefox", "874": "firefox", "875": "firefox", "872": "firefox", "873": "firefox", "870": "firefox", "871": "firefox", "9": "chrome", "890": "firefox", "891": "firefox", "892": "firefox", "893": "firefox", "894": "firefox", "647": "chrome", "896": "firefox", "897": "firefox", "898": "firefox", "899": "firefox", "646": "chrome", "649": "chrome", "648": "chrome", "357": "chrome", "356": "chrome", "809": "internetexplorer", "808": "internetexplorer", "353": "chrome", "352": "chrome", "351": "chrome", "350": "chrome", "803": "internetexplorer", "802": "internetexplorer", "801": "internetexplorer", "800": "internetexplorer", "807": "internetexplorer", "806": "internetexplorer", "805": "internetexplorer", "804": "internetexplorer", "216": "chrome", "217": "chrome", "768": "chrome", "769": "chrome", "212": "chrome", "213": "chrome", "210": "chrome", "211": "chrome", "762": "chrome", "763": "chrome", "760": "chrome", "761": "chrome", "766": "chrome", "767": "chrome", "764": "chrome", "765": "chrome", "40": "chrome", "41": "chrome", "289": "chrome", "288": "chrome", "4": "chrome", "281": "chrome", "280": "chrome", "283": "chrome", "282": "chrome", "285": "chrome", "284": "chrome", "287": "chrome", "286": "chrome", "678": "chrome", "679": "chrome", "674": "chrome", "675": "chrome", "676": "chrome", "677": "chrome", "670": "chrome", "671": "chrome", "672": "chrome", "673": "chrome", "263": "chrome", "262": "chrome", "261": "chrome", "260": "chrome", "267": "chrome", "266": "chrome", "265": "chrome", "264": "chrome", "269": "chrome", "268": "chrome", "59": "chrome", "58": "chrome", "55": "chrome", "54": "chrome", "57": "chrome", "56": "chrome", "51": "chrome", "258": "chrome", "53": "chrome", "52": "chrome", "537": "chrome", "536": "chrome", "535": "chrome", "63": "chrome", "533": "chrome", "532": "chrome", "531": "chrome", "530": "chrome", "152": "chrome", "539": "chrome", "538": "chrome", "775": "internetexplorer", "774": "internetexplorer", "982": "opera", "983": "opera", "980": "opera", "981": "opera", "777": "internetexplorer", "984": "opera", "50": "chrome", "115": "chrome", "252": "chrome", "117": "chrome", "776": "internetexplorer", "111": "chrome", "110": "chrome", "113": "chrome", "69": "chrome", "771": "chrome", "119": "chrome", "118": "chrome", "770": "chrome", "773": "internetexplorer", "772": "internetexplorer", "429": "chrome", "428": "chrome", "534": "chrome", "919": "firefox", "918": "firefox", "915": "firefox", "914": "firefox", "917": "firefox", "916": "firefox", "911": "firefox", "910": "firefox", "913": "firefox", "912": "firefox", "308": "chrome", "309": "chrome", "855": "firefox", "300": "chrome", "301": "chrome", "302": "chrome", "303": "chrome", "304": "chrome", "305": "chrome", "306": "chrome", "307": "chrome", "895": "firefox", "825": "firefox", "824": "firefox", "827": "firefox", "847": "firefox", "846": "firefox", "845": "firefox", "844": "firefox", "843": "firefox", "842": "firefox", "841": "firefox", "840": "firefox", "821": "firefox", "853": "firefox", "849": "firefox", "848": "firefox", "823": "firefox", "822": "firefox", "240": "chrome", "390": "chrome", "732": "chrome", "753": "chrome", "752": "chrome", "751": "chrome", "750": "chrome", "757": "chrome", "756": "chrome", "755": "chrome", "754": "chrome", "560": "chrome", "561": "chrome", "759": "chrome", "758": "chrome", "564": "chrome", "565": "chrome", "566": "chrome", "701": "chrome", "739": "chrome", "229": "chrome", "507": "chrome", "227": "chrome", "226": "chrome", "225": "chrome", "224": "chrome", "223": "chrome", "222": "chrome", "221": "chrome", "220": "chrome", "114": "chrome", "391": "chrome", "726": "chrome", "727": "chrome", "724": "chrome", "725": "chrome", "568": "chrome", "723": "chrome", "720": "chrome", "721": "chrome", "728": "chrome", "729": "chrome", "605": "chrome", "604": "chrome", "607": "chrome", "606": "chrome", "601": "chrome", "600": "chrome", "603": "chrome", "602": "chrome", "159": "chrome", "158": "chrome", "112": "chrome", "609": "chrome", "608": "chrome", "976": "opera", "634": "chrome", "399": "chrome", "635": "chrome", "959": "safari", "958": "safari", "398": "chrome", "48": "chrome", "49": "chrome", "951": "safari", "950": "safari", "953": "safari", "952": "safari", "42": "chrome", "954": "safari", "957": "safari", "956": "safari", "638": "chrome", "5": "chrome", "639": "chrome", "460": "chrome", "489": "chrome", "488": "chrome", "487": "chrome", "486": "chrome", "485": "chrome", "484": "chrome", "483": "chrome", "482": "chrome", "481": "chrome", "480": "chrome", "509": "chrome", "955": "safari", "472": "chrome", "473": "chrome", "470": "chrome", "471": "chrome", "476": "chrome", "477": "chrome", "474": "chrome", "475": "chrome", "478": "chrome", "479": "chrome" } }
{ "pile_set_name": "Github" }
/* * Copyright 2012 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #import "ZXTelParsedResult.h" #import "ZXTelResultParser.h" @implementation ZXTelResultParser - (ZXParsedResult *)parse:(ZXResult *)result { NSString *rawText = [ZXResultParser massagedText:result]; if (![rawText hasPrefix:@"tel:"] && ![rawText hasPrefix:@"TEL:"]) { return nil; } // Normalize "TEL:" to "tel:" NSString *telURI = [rawText hasPrefix:@"TEL:"] ? [@"tel:" stringByAppendingString:[rawText substringFromIndex:4]] : rawText; // Drop tel, query portion NSUInteger queryStart = [rawText rangeOfString:@"?" options:NSLiteralSearch range:NSMakeRange(4, [rawText length] - 4)].location; NSString *number = queryStart == NSNotFound ? [rawText substringFromIndex:4] : [rawText substringWithRange:NSMakeRange(4, [rawText length] - queryStart)]; return [ZXTelParsedResult telParsedResultWithNumber:number telURI:telURI title:nil]; } @end
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: b9c0716b337164542ad31041cbc6631e MonoImporter: externalObjects: {} serializedVersion: 2 defaultReferences: - LT: {fileID: 21300006, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - LR: {fileID: 21300008, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - LB: {fileID: 21300002, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - TR: {fileID: 21300000, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - TB: {fileID: 21300018, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - RB: {fileID: 21300004, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - LTR: {fileID: 21300012, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - TRB: {fileID: 21300020, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - LRB: {fileID: 21300022, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - LTB: {fileID: 21300014, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - LTRB: {fileID: 21300010, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - L: {fileID: 21300022, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - T: {fileID: 21300024, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - R: {fileID: 21300028, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - B: {fileID: 21300030, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} - alone: {fileID: 21300016, guid: a53d2c44340a6d14ea260ceefba9a1e8, type: 3} executionOrder: 0 icon: {instanceID: 0} userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
// Copyright 2014 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This file has been auto-generated by code_generator_v8.py. DO NOT MODIFY! #include "config.h" #include "DOMPointInit.h" namespace blink { DOMPointInit::DOMPointInit() { setW(1); setX(0); setY(0); setZ(0); } DEFINE_TRACE(DOMPointInit) { } } // namespace blink
{ "pile_set_name": "Github" }
[global_tags] {% if enable_telegraf_global_tags %} {% for item in telegraf_global_tags %} {{ item.key }} = "{{ item.value }}" {% endfor %} {% endif %} [agent] interval = "{{ telegraf_agent_info.interval }}" round_interval = {{ telegraf_agent_info.round_interval|lower }} metric_batch_size = {{ telegraf_agent_info.metric_batch_size }} metric_buffer_limit = {{ telegraf_agent_info.metric_buffer_limit }} collection_jitter = "{{ telegraf_agent_info.collection_jitter }}" flush_interval = "{{ telegraf_agent_info.flush_interval }}" flush_jitter = "{{ telegraf_agent_info.flush_jitter }}" precision = "{{ telegraf_agent_info.precision }}" debug = {{ telegraf_agent_info.debug|lower }} quiet = {{ telegraf_agent_info.quiet|lower }} hostname = "{{ telegraf_agent_info.hostname }}" omit_hostname = {{ telegraf_agent_info.omit_hostname|lower }} ############################################################################### # OUTPUT PLUGINS # ############################################################################### {% if telegraf_outputs.influxdb.enabled %} [[outputs.influxdb]] urls = ["{{ telegraf_outputs.influxdb.urls|join ('", "')}}"] database = "{{ telegraf_outputs.influxdb.database }}" retention_policy = "{{ telegraf_outputs.influxdb.retention_policy }}" write_consistency = "{{ telegraf_outputs.influxdb.write_consistency }}" timeout = "{{ telegraf_outputs.influxdb.timeout }}" {% if telegraf_outputs.influxdb.login_required %} username = "{{ telegraf_outputs.influxdb.username }}" password = "{{ telegraf_outputs.influxdb.password }}" {% endif %} {% endif %} {% if telegraf_outputs['elasticsearch']['enabled'] %} [[outputs.elasticsearch]] urls = ["{{ telegraf_outputs['elasticsearch']['urls']|join('", "') }}"] timeout = "{{ telegraf_outputs['elasticsearch']['timeout'] }}" enable_sniffer = {{ telegraf_outputs['elasticsearch']['enable_sniffer']|lower }} health_check_interval = "{{ telegraf_outputs['elasticsearch']['health_check_interval'] }}" {% if telegraf_outputs['elasticsearch']['auth']['enabled'] %} username = "{{ telegraf_outputs['elasticsearch']['auth']['username'] }}" password = "{{ telegraf_outputs['elasticsearch']['auth']['password'] }}" {% endif %} index_name = "{{ telegraf_outputs['elasticsearch']['index_name'] }}" manage_template = {{ telegraf_outputs['elasticsearch']['manage_template']|lower }} template_name = "{{ telegraf_outputs['elasticsearch']['template_name'] }}" overwrite_template = {{ telegraf_outputs['elasticsearch']['overwrite_template']|lower }} {% endif %} {% if telegraf_outputs.graphite.enabled %} [[outputs.graphite]] servers = ["{{ telegraf_outputs.graphite.servers|join ('", "')}}"] prefix = "{{ telegraf_outputs.graphite.prefix }}" template = "{{ telegraf_outputs.graphite.template }}" timeout = {{ telegraf_outputs.graphite.timeout }} {% endif %} {% if telegraf_outputs.graylog.enabled %} [[outputs.graylog]] servers = ["{{ telegraf_outputs.graylog.servers|join ('", "')}}"] {% endif %} {% if telegraf_outputs.prometheus_client.enabled %} [[outputs.prometheus_client]] # ## Address to listen on listen = "{{ telegraf_outputs.prometheus_client.listen }}" {% endif %} ############################################################################### # INPUT PLUGINS # ############################################################################### {% if telegraf_inputs.cpu.enabled %} [[inputs.cpu]] percpu = {{ telegraf_inputs.cpu.percpu|lower }} totalcpu = {{ telegraf_inputs.cpu.totalcpu|lower }} fielddrop = ["{{ telegraf_inputs.cpu.fielddrop }}"] {% if telegraf_inputs['cpu']['tags'] is defined %} [inputs.cpu.tags] {% for item in telegraf_inputs['cpu']['tags'] %} {% set _key = item.split(': ')[0] %} {% set _val = telegraf_inputs['cpu']['tags'][_key] %} {{ _key }} = "{{ _val }}" {% endfor %} {% endif %} {% endif %} {% if telegraf_inputs.disk.enabled %} [[inputs.disk]] mount_points = ["{{ telegraf_inputs.disk.mount_points|join ('", "')}}"] ignore_fs = ["{{ telegraf_inputs.disk.ignore_fs|join ('", "')}}"] {% if telegraf_inputs['disk']['tags'] is defined %} [inputs.disk.tags] {% for item in telegraf_inputs['disk']['tags'] %} {% set _key = item.split(': ')[0] %} {% set _val = telegraf_inputs['disk']['tags'][_key] %} {{ _key }} = "{{ _val }}" {% endfor %} {% endif %} {% endif %} {% for item in telegraf_basic_inputs %} [[inputs.{{ item }}]] {% endfor %} {% if telegraf_inputs.docker.enabled %} [[inputs.docker]] endpoint = "{{ telegraf_inputs.docker.endpoint }}" container_names = ["{{ telegraf_inputs.docker.container_names|join ('", "')}}"] timeout = "{{ telegraf_inputs.docker.timeout }}" perdevice = {{ telegraf_inputs.docker.perdevice|lower }} total = {{ telegraf_inputs.docker.total|lower }} {% endif %} {% if telegraf_inputs.elasticsearch.enabled %} [[inputs.elasticsearch]] servers = ["{{ telegraf_inputs.elasticsearch.servers|join ('", "')}}"] local = {{ telegraf_inputs.elasticsearch.local|lower }} cluster_health = {{ telegraf_inputs.elasticsearch.cluster_health|lower }} {% endif %} {% if telegraf_inputs['exec']['enabled'] %} [[inputs.exec]] commands = ['{{ telegraf_inputs['exec']['commands']|join(', ') }}'] data_format = "{{ telegraf_inputs['exec']['data_format'] }}" timeout = "{{ telegraf_inputs['exec']['timeout'] }}" {% endif %} {% if telegraf_inputs.haproxy.enabled %} [[inputs.haproxy]] servers = ["{{ telegraf_inputs.haproxy.servers|join ('", "')}}"] {% endif %} {% if telegraf_inputs.influxdb.enabled %} [[inputs.influxdb]] urls = ["{{ telegraf_inputs.influxdb.urls|join ('", "')}}"] {% endif %} {% if telegraf_inputs.memcached.enabled %} [[inputs.memcached]] servers = ["{{ telegraf_inputs.memcached.servers|join ('", "')}}"] unix_sockets = ["{{ telegraf_inputs.memcached.unix_sockets|join ('", "')}}"] {% endif %} {% if telegraf_inputs.mongodb.enabled %} servers = ["{{ telegraf_inputs.mongodb.servers|join ('", "')}}"] gather_perdb_stats = {{ telegraf_inputs.mongodb.gather_perdb_stats|lower }} {% endif %} {% if telegraf_inputs.net.enabled %} [[inputs.net]] {% if telegraf_inputs.net.interfaces is defined %} interfaces = ["{{ telegraf_inputs.net.interfaces|join ('", "')}}"] {% endif %} {% endif %} {% if telegraf_inputs['ping']['enabled'] %} [[inputs.ping]] urls = ["{{ telegraf_inputs['ping']['urls']|join('", "') }}"] count = {{ telegraf_inputs['ping']['count']|default('1') }} ping_interval = {{ telegraf_inputs['ping']['interval']|default('1.0') }} timeout = {{ telegraf_inputs['ping']['timeout']|default('1.0') }} {% if telegraf_inputs['ping']['interface'] is defined and telegraf_inputs['ping']['interface'] != [] %} interface = {{ telegraf_inputs['ping']['interface'] }} {% endif %} {% endif %} {% if telegraf_inputs.powerdns.enabled %} [[inputs.powerdns]] unix_sockets = ["{{ telegraf_inputs.powerdns.unix_sockets|join ('", "')}}"] {% endif %} {% if telegraf_inputs.prometheus.enabled %} [[inputs.prometheus]] urls = ["{{ telegraf_inputs.prometheus.urls|join ('", "')}}"] {% if telegraf_inputs.prometheus.bearer_token is defined %} bearer_token = {{ telegraf_inputs.prometheus.bearer_token }} {% endif %} {% endif %} {% if telegraf_inputs.rabbitmq.enabled %} [[inputs.rabbitmq]] url = "{{ telegraf_inputs.rabbitmq.url }}" {% if telegraf_inputs.rabbitmq.name is defined %} name = "rmq-server-1" # optional tag {% endif %} username = "{{ telegraf_inputs.rabbitmq.username }}" password = "{{ telegraf_inputs.rabbitmq.password }}" nodes = ["{{ telegraf_inputs.rabbitmq.nodes|join ('", "')}}"] {% endif %} {% if telegraf_inputs.redis.enabled %} [[inputs.redis]] servers = ["{{ telegraf_inputs.redis.servers|join ('", "')}}"] {% endif %} {% if telegraf_inputs.zfs.enabled %} [[inputs.zfs]] kstatPath = "{{ telegraf_inputs.zfs.kstatPath }}" kstatMetrics = ["{{ telegraf_inputs.zfs/kstatMetrics|join ('", "')}}"] poolMetrics = {{ telegraf_inputs.zfs.poolMetrics|lower }} {% endif %} {% if telegraf_inputs.zookeeper.enabled %} [[inputs.zookeeper]] servers = ["{{ telegraf_inputs.zookeeper.servers|join ('", "')}}"] {% endif %}
{ "pile_set_name": "Github" }
/** * Action types and action creator related to BackedServicesStatus. */ import { ActionType, createStandardAction } from "typesafe-actions"; import { BackendStatus } from "../../api/backendPublic"; export const backendStatusLoadSuccess = createStandardAction( "BACKEND_STATUS_LOAD_SUCCESS" )<BackendStatus>(); export type BackendStatusActions = ActionType<typeof backendStatusLoadSuccess>;
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <Catalyst/CATOperation.h> @class NSError, NSURL; @interface CRKUnzipOperation : CATOperation { NSURL *_zipFileURL; NSURL *_destinationDirectoryURL; struct _BOMCopier *_copier; NSError *_stashedError; } + (id)errorFromBOMCopierStatus:(int)arg1 message:(id)arg2; - (void).cxx_destruct; @property(retain, nonatomic) NSError *stashedError; // @synthesize stashedError=_stashedError; @property struct _BOMCopier *copier; // @synthesize copier=_copier; @property(readonly, nonatomic) NSURL *destinationDirectoryURL; // @synthesize destinationDirectoryURL=_destinationDirectoryURL; @property(readonly, nonatomic) NSURL *zipFileURL; // @synthesize zipFileURL=_zipFileURL; - (void)main; - (void)operationWillFinish; - (void)cancel; - (id)initWithZipFileURL:(id)arg1 destinationDirectoryURL:(id)arg2; - (id)initWithZipFileURL:(id)arg1; @end
{ "pile_set_name": "Github" }