answer
stringlengths
15
1.25M
<?php namespace Tests\unit\Composer\Read\Register; use ModbusTcpClient\Packet\ModbusFunction\<API key>; use ModbusTcpClient\Composer\Read\Register\<API key>; use PHPUnit\Framework\TestCase; class <API key> extends TestCase { public function testGetSize() { $address = new <API key>(1, true); $this->assertEquals(1, $address->getSize()); } public function testGetName() { $address = new <API key>(1, true, 'direction'); $this->assertEquals('direction', $address->getName()); } public function testDefaultGetName() { $address = new <API key>(1, true); $this->assertEquals('byte_1_1', $address->getName()); $address = new <API key>(1, false); $this->assertEquals('byte_1_0', $address->getName()); } public function testExtract() { $responsePacket = new <API key>("\x02\x00\x05", 3, 33152); $this->assertEquals(5, (new <API key>(0, true))->extract($responsePacket)); $this->assertEquals(0, (new <API key>(0, false))->extract($responsePacket)); } public function <API key>() { $responsePacket = new <API key>("\x02\x00\x05", 3, 33152); $address = new <API key>(0, true, null, function ($data) { return 'prefix_' . $data; }); $this->assertEquals('prefix_5', $address->extract($responsePacket)); } }
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"> <title></title> <link rel="stylesheet" href="css/my-css.css" media="screen" type="text/css" /> </head> <body> <img src="http://<API key>.prvalue.cn/img/p25.png" style="height:100%;width:100%"> </body> </html>
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="pl"> <head> <!-- Generated by javadoc --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Class com.google.code.play2.spm.routes.<API key> (Play! 2.x Source Position Mappers 1.0.0-beta8 API)</title> <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 com.google.code.play2.spm.routes.<API key> (Play! 2.x Source Position Mappers 1.0.0-beta8 API)"; } } 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="../../../../../../../com/google/code/play2/spm/routes/<API key>.html" title="class in com.google.code.play2.spm.routes">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-all.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?com/google/code/play2/spm/routes/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 com.google.code.play2.spm.routes.<API key>" class="title">Uses of Class<br>com.google.code.play2.spm.routes.<API key></h2> </div> <div class="classUseContainer">No usage of com.google.code.play2.spm.routes.<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="../../../../../../../com/google/code/play2/spm/routes/<API key>.html" title="class in com.google.code.play2.spm.routes">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-all.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?com/google/code/play2/spm/routes/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> <p class="legalCopy"><small>Copyright & </body> </html>
<!doctype html> <html> <head> <meta charset="utf-8" /> </head> <body> <h3> </h3><!-- cellpadding="2" cellspacing="0" --> <table style="width:100%;" border="1"> <tbody> <tr> <td> <h3>1</h3> </td> <td> <h3>1</h3> </td> </tr> <tr> <td> 1 </td> <td> 2 </td> </tr> <tr> <td> 3 </td> <td> 4 </td> </tr> </tbody> </table> <p> </p> </body> </html>
package org.valuereporter.observation; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.ObjectMapper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.valuereporter.QueryOperations; import org.valuereporter.WriteOperations; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import java.io.IOException; import java.io.StringWriter; import java.io.Writer; import java.util.ArrayList; import java.util.List; /** * @author <a href="mailto:erik-dev@fjas.no">Erik Drolshammer</a> */ @Component @Path("/observedmethods") public class <API key> { private static final Logger log = LoggerFactory.getLogger(<API key>.class); private final QueryOperations queryOperations; private final WriteOperations writeOperations; private final ObjectMapper mapper; /** @Autowired public <API key>(QueryOperations queryOperations, WriteOperations writeOperations, ObjectMapper mapper) { this.queryOperations = queryOperations; this.writeOperations = writeOperations; this.mapper = mapper; } **/ @Autowired public <API key>(ObservationsService observationsService, ObjectMapper mapper) { this.queryOperations = observationsService; this.writeOperations = observationsService; this.mapper = mapper; } /** * A request with no filtering parameters should return a list of all observations. * * @param prefix prefix used to identify running process * @param name package.classname.method * @return List of observations */ @GET @Path("/{prefix}/{name}") @Produces(MediaType.APPLICATION_JSON) public Response <API key>(@PathParam("prefix") String prefix,@PathParam("name") String name) { final List<ObservedMethod> observedMethods; //Should also support no queryParams -> findAll if (name != null ) { log.trace("<API key> name={}", name); observedMethods = queryOperations.<API key>(prefix, name); } else { throw new <API key>("You must supply a name. <package.classname.method>"); } Writer strWriter = new StringWriter(); try { mapper.writeValue(strWriter, observedMethods); } catch (IOException e) { log.error("Could not convert {} ObservedMethod to JSON.", observedMethods.size(), e); return Response.status(Response.Status.<API key>).entity("Error converting to requested format.").build(); } return Response.ok(strWriter.toString()).build(); } @POST @Path("/{prefix}") @Produces(MediaType.APPLICATION_JSON) public Response <API key>(@PathParam("prefix") String prefix, String jsonBody){ log.trace("<API key> prefix {} , jsonBody {}.", prefix, jsonBody); List<ObservedMethod> observedMethods = null; try { observedMethods = mapper.readValue(jsonBody, new TypeReference<ArrayList<ObservedMethodJson>>(){ }); if (observedMethods != null) { for (ObservedMethod observedMethod : observedMethods) { observedMethod.setPrefix(prefix); } } } catch (IOException e) { log.warn("Unexpected error trying to produce list of ObservedMethod from \n prefix {} \n json {}, \n Reason {}",prefix, jsonBody, e.getMessage()); return Response.status(Response.Status.NOT_ACCEPTABLE).entity("Error converting to requested format.").build(); } long updatedCount = writeOperations.addObservations(prefix,observedMethods); String message = "added " + updatedCount + " observedMethods."; Writer strWriter = new StringWriter(); try { mapper.writeValue(strWriter, message); } catch (IOException e) { log.error("Could not convert {} to JSON.", updatedCount, e); return Response.status(Response.Status.<API key>).entity("Error converting to requested format.").build(); } return Response.ok(strWriter.toString()).build(); } }
package com.lee.game; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.text.TextUtils; import android.view.View; import android.widget.TextView; import com.lee.base.activity.BaseActivity; import com.lee.base.application.<API key>; import com.noobyang.log.LogUtil; import java.text.Collator; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; import butterknife.BindView; import butterknife.ButterKnife; public class MainActivity extends BaseActivity { private static final String ACTION_SAMPLE_CODE = "com.lee.main.action.SAMPLE_CODE_GAME"; private static final String EXTRA_NAME_PATH = "com.lee.main.Path"; private static final String <API key> = "."; private static final String <API key> = "\\."; @BindView(R.id.tv_path) TextView tvPath; @BindView(R.id.rv_sample_code) RecyclerView rvSampleCode; private PackageManager packageManager; private List<SampleCodeEntity> sampleCodeEntities; private SampleCodeAdapter sampleCodeAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ButterKnife.bind(this); initData(); initView(); } @Override protected void onNewIntent(Intent intent) { super.onNewIntent(intent); setIntent(intent); updateSampleCodes(); } @Override protected void onDestroy() { super.onDestroy(); } private void initData() { packageManager = getPackageManager(); sampleCodeAdapter = new SampleCodeAdapter(this, sampleCodeEntities, itemClickListener); } private void initView() { LinearLayoutManager layoutManager = new LinearLayoutManager(this); layoutManager.setOrientation(LinearLayoutManager.VERTICAL); rvSampleCode.setLayoutManager(layoutManager); rvSampleCode.setAdapter(sampleCodeAdapter); updateSampleCodes(); } private void updateSampleCodes() { String path = getIntent().getStringExtra(EXTRA_NAME_PATH); initSampleCodes(path); sampleCodeAdapter.setData(sampleCodeEntities); sampleCodeAdapter.<API key>(); setPathText(path); } private void setPathText(String path) { if (TextUtils.isEmpty(path)) { tvPath.setText(R.string.app_name); } else { tvPath.setText(path); } } protected void initSampleCodes(String path) { if (sampleCodeEntities == null) { sampleCodeEntities = new ArrayList<>(); } else { sampleCodeEntities.clear(); } List<ResolveInfo> <API key> = <API key>(); if (<API key> == null || <API key>.size() == 0) { return; } String[] prefixPaths; String currentPrefixPath; Map<String, Boolean> folderLabel = new HashMap<>(); String label; String[] labelPath; String sampleCodeLabel; for (ResolveInfo <API key> : <API key>) { if (TextUtils.isEmpty(path)) { prefixPaths = null; currentPrefixPath = null; } else { path = getRelativeName(path); prefixPaths = path.split(<API key>); currentPrefixPath = path + <API key>; } label = getRelativeName(<API key>.activityInfo.name); LogUtil.d("getData currentPrefixPath = " + currentPrefixPath + "---label = " + label); if (TextUtils.isEmpty(currentPrefixPath) || label.startsWith(currentPrefixPath)) { labelPath = label.split(<API key>); int prefixPathsLen = prefixPaths == null ? 0 : prefixPaths.length; sampleCodeLabel = labelPath[prefixPathsLen]; if (prefixPathsLen == labelPath.length - 1) { // activity addActivityItem(sampleCodeEntities, sampleCodeLabel, <API key>.activityInfo.applicationInfo.packageName, <API key>.activityInfo.name); } else { // folder if (folderLabel.get(sampleCodeLabel) == null) { addFolderItem(sampleCodeEntities, sampleCodeLabel, currentPrefixPath); folderLabel.put(sampleCodeLabel, true); } } } } Collections.sort(sampleCodeEntities, comparator); } private String getRelativeName(String className) { if (TextUtils.isEmpty(className)) { return className; } for (String packageName : <API key>.getPackageNames()) { if (className.startsWith(packageName + <API key>)) { return className.substring(packageName.length() + 1); } } return className; } private List<ResolveInfo> <API key>() { Intent sampleCodeIntent = new Intent(ACTION_SAMPLE_CODE, null); sampleCodeIntent.addCategory(Intent.<API key>); return packageManager.<API key>(sampleCodeIntent, 0); } private final static Comparator<SampleCodeEntity> comparator = new Comparator<SampleCodeEntity>() { private final Collator collator = Collator.getInstance(); public int compare(SampleCodeEntity entity1, SampleCodeEntity entity2) { return collator.compare(entity1.getTitle(), entity2.getTitle()); } }; private void addActivityItem(List<SampleCodeEntity> data, String sampleCodeLabel, String packageName, String className) { Intent activityIntent = new Intent(); activityIntent.setClassName(packageName, className); addItem(data, SampleCodeEntity.SampleCodeType.<API key>, sampleCodeLabel, activityIntent); } private void addFolderItem(List<SampleCodeEntity> data, String sampleCodeLabel, String currentPrefixPath) { Intent folderIntent = new Intent(); folderIntent.setClass(this, MainActivity.class); String path = TextUtils.isEmpty(currentPrefixPath) ? sampleCodeLabel : currentPrefixPath + sampleCodeLabel; folderIntent.putExtra(EXTRA_NAME_PATH, path); addItem(data, SampleCodeEntity.SampleCodeType.<API key>, sampleCodeLabel, folderIntent); } protected void addItem(List<SampleCodeEntity> data, int type, String title, Intent intent) { SampleCodeEntity entity = new SampleCodeEntity(type, title, intent); data.add(entity); } private SampleCodeAdapter.OnItemClickListener itemClickListener = new SampleCodeAdapter.OnItemClickListener() { @Override public void onItemClick(View view, int position) { SampleCodeEntity entity = sampleCodeEntities.get(position); if (entity != null) { Intent intent = entity.getIntent(); intent.addCategory(Intent.<API key>); startActivity(intent); } } }; }
<?php namespace Obj; class Encoder { private $key; private $cipher; private $mode; /** * * args - array( * 'hash' => hash method * 'key' => path to private key * 'encrypt' => encryption method * ) */ public function __construct($key, $cipher = MCRYPT_RIJNDAEL_128, $mode = MCRYPT_MODE_CBC) { $keyString = file_get_contents($key, true); $this->key = pack('H*', $keyString); $this->cipher = $cipher; $this->mode = $mode; } /** * hash */ public static function hash($input, $hash = 'md5') { return hash($hash, $input); } public function encrypt($plaintext) { $key_size = strlen($this->key); // create a random IV to use with CBC encoding $iv_size = mcrypt_get_iv_size($this->cipher, $this->mode); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $ciphertext = mcrypt_encrypt($this->cipher, $this->key, $plaintext, $this->mode, $iv); $ciphertext = $iv . $ciphertext; // encode the resulting cipher text so it can be represented by a string $ciphertext_base64 = base64_encode($ciphertext); return $ciphertext_base64; } public function decrypt($ciphertext_base64) { $ciphertext_dec = base64_decode($ciphertext_base64); $iv_size = mcrypt_get_iv_size($this->cipher, $this->mode); // retrieves the IV, iv_size should be created using mcrypt_get_iv_size() $iv_dec = substr($ciphertext_dec, 0, $iv_size); // retrieves the cipher text (everything except the $iv_size in the front) $ciphertext_dec = substr($ciphertext_dec, $iv_size); // may remove 00h valued characters from end of plain text $plaintext_dec = mcrypt_decrypt($this->cipher, $this->key, $ciphertext_dec, $this->mode, $iv_dec); return $plaintext_dec; } /** * Generates a random string from the given charset of input length */ public static function randomString($length = 10, $set = null) { if ($set == null) { $set = '<API key>'; } $len = strlen($set); $str = ''; while ($length $str .= $set[mt_rand(0, $len - 1)]; } return $str; } } ?>
using System; using System.Globalization; using System.Resources; using System.Diagnostics; using System.Reflection; namespace Routrek.SSHC { <summary> StringResource ‚ÌŠT—v‚Ìà–¾‚Å‚·B </summary> internal class StringResources { private string _resourceName; private ResourceManager _resMan; public StringResources(string name, Assembly asm) { _resourceName = name; LoadResourceManager(name, asm); } public string GetString(string id) { try { return _resMan.GetString(id); } catch { return "error loading string"; } } private void LoadResourceManager(string name, Assembly asm) { CultureInfo ci = System.Threading.Thread.CurrentThread.CurrentUICulture; //if(ci.Name.StartsWith("ja")) //_resMan = new ResourceManager(name+"_ja", asm); //else _resMan = new ResourceManager(name, asm); } } }
# Internet Exchange An Internet exchange point, also known as IX or IXP, is an infrastructure through which autonomous systems exchange traffic. An IX can be a single local LAN or it can be spread across multiple locations. ## In Peering Manager Inside Peering Manager, you create an Internet exchange to then create one or more peering BGP sessions. Only Internet Exchange Peering Sessions can be related to an Internet exchange. For each Internet exchange you create, the following properties can be configured (n.b. some are optional): * `Name`: human-readable name attached to the IX. * `Slug`: unique configuration and URL friendly name; usually it is automatically generated from the IXP's name. * `Local Autonomous System`: your autonomous system connected to this IX. * `Comments`: text to explain what the Internet exchange is for. Can use Markdown formatting. * `Check BGP Session States`: whether Peering Manager should poll the state of BGP sessions at this IX. * `Import Routing Policies`: a list of routing policies to apply when receiving prefixes though BGP sessions at this IX. * `Export Routing Policies`: a list of routing policies to apply when advertising prefixes though BGP sessions at this IX. * `PeeringDB ID`: an integer which is the ID of the IX LAN inside PeeringDB. This setting is required for Peering Manager to discover potential unconfigured BGP sessions.[^1] * `IPv6 Address`: an IPv6 address used to connect to the Internet exchange network. [^2] * `IPv4 Address`: an IPv4 address used to connect to the Internet exchange network. [^2] * `Router`: a router connected to the Internet exchange. This is used to then generate and install configurations.[^2] * `Tags`: a list of tags to help identifying and searching for a group. Please note that an Internet exchange is a kind of BGP group with more specific properties aimed to match the purpose of an Internet exchange network. However while a group can be configured on more than one router, an IX can only be attached to a single router. This means that if you are connected more than once to an IX, you'll have to create one IX object per connection. [^1]: This is no longer user edible [^2]: This moved to the [Connection](../../net/connection/) tab
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; namespace pool { static class Program { <summary> </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.<API key>(false); Application.Run(new Form1()); } } }
package io.react2.scalata.exporters import com.mongodb.{WriteConcern, BulkWriteOperation, BasicDBObject, MongoClient} import io.react2.scalata.Context import io.react2.scalata.plugins.Plugin import scala.util.control.NonFatal /** * @author dbalduini */ class MongoExporter(val args: Plugin.Args) extends Exporter { val verbose = args("verbose", false) val database = args("database", "test") val collection = args("collection", "scalata") val host = args("host", "localhost") val port = args("port", 27017) val mongo = new MongoClient(host, port) val db = mongo.getDB(database) val coll = db.getCollection(collection) var maybeBulk: Option[BulkWriteOperation] = None @transient var counter = 0 val total = Context.NUMBER_OF_LINES.get override def export(f: Any): Unit = { val doc = f.asInstanceOf[BasicDBObject] try { if(verbose) println(doc.toString) val bulk = maybeBulk match { case None => maybeBulk = Some(coll.<API key>) maybeBulk.get case Some(b) => b } bulk.insert(doc) counter = counter + 1 flush() } catch { case NonFatal(t) => t.printStackTrace() } } private def flush(): Unit = { val percentage = (counter.toFloat * 100) / total if (percentage != 0 && percentage % 10 == 0) { println(s"Current percentage processed: $counter / $total / $percentage%") maybeBulk match { case Some(bulk) => val wc = new WriteConcern(0) bulk.execute(wc) maybeBulk = None case None => } } } }
package org.cobbzilla.util.jdbc; import java.util.regex.Matcher; import java.util.regex.Pattern; public class DbUrlUtil { public static final Pattern JDBC_URL_REGEX = Pattern.compile("^jdbc:postgresql: public static String setDbName(String url, String dbName) { final Matcher matcher = JDBC_URL_REGEX.matcher(url); if (!matcher.find()) return url; final String renamed = matcher.replaceFirst(dbName); return renamed; } }
#ifndef GROUPCHATFORM_H #define GROUPCHATFORM_H #include <QLabel> #include <QWidget> #include <QVBoxLayout> #include <QHBoxLayout> #include <QGridLayout> #include <QTextEdit> #include <QScrollArea> #include <QTime> #include "widget/tool/chattextedit.h" #include "ui_widget.h" // Spacing in px inserted when the author of the last message changes #define <API key> 5 class Group; class GroupChatForm : public QObject { Q_OBJECT public: GroupChatForm(Group* chatGroup); ~GroupChatForm(); void show(Ui::Widget& ui); void setName(QString newName); void addGroupMessage(QString message, int peerId); void addMessage(QString author, QString message, QString date=QTime::currentTime().toString("hh:mm")); void addMessage(QLabel* author, QLabel* message, QLabel* date); void onUserListChanged(); signals: void sendMessage(int, QString); private slots: void onSendTriggered(); void <API key>(); void <API key>(QPoint pos); void onSaveLogClicked(); private: Group* group; QHBoxLayout *headLayout, *mainFootLayout; QVBoxLayout *headTextLayout, *mainLayout; QGridLayout *mainChatLayout; QLabel *avatar, *name, *nusers, *namesList; ChatTextEdit *msgEdit; QPushButton *sendButton; QScrollArea *chatArea; QWidget *main, *head, *chatAreaWidget; QString previousName; int curRow; bool lockSliderToBottom; }; #endif // GROUPCHATFORM_H
'use strict'; var fs = require('fs'); var path = require('path'); var util = require('util'); var dbg = require('debug'); // process.env.TABTAB_DEBUG = process.env.TABTAB_DEBUG || '/tmp/tabtab.log'; var out = process.env.TABTAB_DEBUG ? fs.createWriteStream(process.env.TABTAB_DEBUG, { flags: 'a' }) : null; module.exports = debug; // Internal: Facade to debug module, which provides the exact same interface. // The added benefit is with the TABTAB_DEBUG environment variable, which when // defined, will write debug output to the specified filename. // Usefull when debugging tab completion, as logs on stdout / stderr are either // shallowed or used as tab completion results. // namespace - The String namespace to use when TABTAB_DEBUG is not defined, // delegates to debug module. // Examples // // Use with following command to redirect output to file // // TABTAB_DEBUG="debug.log" tabtab ... // debug('Foo'); function debug(namespace) { var log = dbg(namespace); return function () { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } args = args.map(function (arg) { if (typeof arg === 'string') return arg; return JSON.stringify(arg); }); out && out.write(util.format.apply(util, args) + '\n'); out || log.apply(null, args); }; }
<!doctype html public "- <html> <head> <title>PHPXRef 0.7.1 : Unnamed Project : Variable Reference: $<API key></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='_variables'; filename='index.html'; cookiekey='phpxref'; handleNavFrame(relbase, subdir, filename); logVariable('<API key>'); </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>Variable Cross Reference</h3> <h2><a href="index.html#<API key>">$<API key></a></h2> <b>Defined at:</b><ul> <li><a href="../bonfire/codeigniter/core/Security.php.html">/bonfire/codeigniter/core/Security.php</A> -> <a href="../bonfire/codeigniter/core/Security.php.source.html#l91"> line 91</A></li> </ul> <br><b>Referenced 2 times:</b><ul> <li><a href="../bonfire/codeigniter/core/Security.php.html">/bonfire/codeigniter/core/Security.php</a> -> <a href="../bonfire/codeigniter/core/Security.php.source.html#l91"> line 91</a></li> <li><a href="../bonfire/codeigniter/core/Security.php.html">/bonfire/codeigniter/core/Security.php</a> -> <a href="../bonfire/codeigniter/core/Security.php.source.html#l837"> line 837</a></li> </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>
<?php /** * This is the model class for table "product_type". * * The followings are the available columns in table 'product_type': * @property string $product_type_id * @property string $<API key> * @property string $name * @property string $created * * The followings are the available model relations: * @property Product[] $products * @property ProductMultiDay[] $productMultiDays * @property ProductOneDay[] $productOneDays */ class ProductType extends CActiveRecord { /** * Returns the static model of the specified AR class. * @param string $className active record class name. * @return ProductType the static model class */ public static function model($className=__CLASS__) { return parent::model($className); } /** * @return string the associated database table name */ public function tableName() { return 'product_type'; } /** * @return array validation rules for model attributes. */ public function rules() { // NOTE: you should only define rules for those attributes that // will receive user inputs. return array( array('<API key>', 'length', 'max'=>10), ); } /** * @return array relational rules. */ public function relations() { // NOTE: you may need to adjust the relation name and the related // class name for the relations automatically generated below. return array(); } /** * @return array customized attribute labels (name=>label) */ public function attributeLabels() { return array( 'product_type_id' => 'Product Type', '<API key>' => 'Parent Product Type', 'name' => 'Name', 'created' => 'Created', ); } }
from changes.api.serializer import Crumbler, register from changes.models.node import Cluster @register(Cluster) class ClusterCrumbler(Crumbler): def crumble(self, instance, attrs): return { 'id': instance.id.hex, 'name': instance.label, 'dateCreated': instance.date_created, }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>20130925</title> <style type="text/css"> .visiNone { display: none; } .hide { visibility: hidden; } .block { display: block; } .list { display: list-item; } a:link, a:visited { background: #efb57c; border: 2px outset #efb57c; } a { display: block; width: 150px; height: 20px; margin-top: 10px; text-align: center; } a:focus, a:hover { background: #daa670; border: 2px outset #daa670; color: black; } a:active { background: #bb8e6d; border: 2px outset #bb8e6d; } .miniPhoto: hover .bigPhoto { display: none; } #popImg a, img { border: none; } #popImg a img.bigPhoto { height: 0; width: 0; border-width: 0; } #popImg a:hover img.bigPhoto { position: absolute; top: 1000px; left: 160px; height: 458px; width: 500px; } </style> </head> <body> <h1>20130925</h1> <p>Show a series of dynamic effect of link &amp; image.</p> <p class="visiNone"> <img src="../images/Prime.jpg" alt="first image" /> </p> <p class="hide"> <img src="../images/Prime.jpg" alt="second image" /> </p> <p class="block"> <img src="../images/Prime.jpg" alt="third image" /> </p> <p class="list"> <img src="../images/Prime_preview.jpg" alt="small image 1" /> <img src="../images/Prime_preview.jpg" alt="small image 2" /> <img src="../images/Prime_preview.jpg" alt="small image 3" /> </p> <a href="#">Link 1</a> <a href="#">Link 2</a> <a href="#">Link 3</a> <a href="#">Link 4</a> <div id="popImg"> <a class="checkImg" href=" <img class="smallPhoto" src="../images/Prime_preview.jpg" alt="mini image" /> <img class="bigPhoto" src="../images/Prime.jpg" alt="big image" /> </a> </div> </div> </body> </html>
require 'pad_utils' require_relative '../template/test' # Test name test_name = "ZipExtractZip" class ZipExtractZipTest < Test def prepare # Add test preparation here end def run_test PadUtils.extract_zip("fixtures/archive.zip", "results/extracted") if !PadUtils.file_exist?("results/extracted/penguin02.jpg") || !PadUtils.file_exist?("results/extracted/others/panda.jpg") @errors << "Seems files were not extracted" end end def cleanup # Add cleanup code here end end
package hu.scelight.gui.page.replist.column.impl; import hu.scelight.gui.icon.Icons; import hu.scelight.gui.page.replist.column.BaseColumn; import hu.scelight.sc2.rep.repproc.RepProcessor; import java.util.Date; /** * Replay date column. * * @author Andras Belicza */ public class DateColumn extends BaseColumn< Date > { /** * Creates a new {@link DateColumn}. */ public DateColumn() { super( "Date", Icons.F_CALENDAR_BLUE, "Replay date", Date.class, true ); } @Override public Date getData( final RepProcessor repProc ) { return repProc.replay.details.getTime(); } }
"""Tests for the CSRF helper.""" import unittest import mock import webapp2 import webtest from ctc.helpers import csrf from ctc.testing import testutil MOCKED_TIME = 123 # Tests don't need docstrings, so pylint: disable=C0111 # Tests can test protected members, so pylint: disable=W0212 class CsrfTests(testutil.CtcTestCase): # Helpers class TestHandler(csrf.CsrfHandler): """A handler for testing whether or not requests are CSRF protected.""" def get(self): self.response.write('CSRF Token:%s' % self.csrf_token) def post(self): pass def put(self): pass def delete(self): pass def setUp(self): super(CsrfTests, self).setUp() # The CSRF library uses the time, so we mock it out. self.time_mock = mock.Mock() csrf.time = self.time_mock self.time_mock.time = mock.Mock(return_value=MOCKED_TIME) # The handler tests need a WSGIApplication. app = webapp2.WSGIApplication([('/', self.TestHandler)]) self.testapp = webtest.TestApp(app) def test_get_secret_key(self): first_key = csrf._get_secret_key() self.assertEqual(len(first_key), 32) second_key = csrf._get_secret_key() self.assertEqual(first_key, second_key) def <API key>(self): # It should fail if the tokens aren't equal length. self.assertFalse(csrf._tokens_are_equal('a', 'ab')) # It should fail if the tokens are different. self.assertFalse(csrf._tokens_are_equal('abcde', 'abcdf')) # It should succeed if the tokens are the same. self.assertTrue(csrf._tokens_are_equal('abcde', 'abcde')) # Make Token def <API key>(self): self.login() # It should get the current time. token1 = csrf.make_token() self.assertEqual(token1.split()[-1], str(MOCKED_TIME)) # It should use the provided time. token2 = csrf.make_token(token_time='456') self.assertEqual(token2.split()[-1], '456') # Different time should cause the digest to be different. self.assertNotEqual(token1.split()[0], token2.split()[0]) token3 = csrf.make_token(token_time='456') self.assertEqual(token2, token3) def <API key>(self): token1 = csrf.make_token() self.assertIsNone(token1) self.login() token2 = csrf.make_token() self.assertIsNotNone(token2) def <API key>(self): self.login() # It should get the current path. self.testbed.setup_env(PATH_INFO='/action/1', overwrite=True) token1 = csrf.make_token(token_time='123') self.testbed.setup_env(PATH_INFO='/action/23', overwrite=True) token2 = csrf.make_token(token_time='123') token3 = csrf.make_token(token_time='123') self.assertNotEqual(token1, token2) self.assertEqual(token2, token3) # It should let the client pass in a path. token4 = csrf.make_token(path='/action/4', token_time='123') token5 = csrf.make_token(path='/action/56', token_time='123') token6 = csrf.make_token(path='/action/56', token_time='123') self.assertNotEqual(token4, token5) self.assertEqual(token5, token6) # Token Is Valid def test_token_is_valid(self): self.login() # Token is required. self.assertFalse(csrf.token_is_valid(None)) # Token needs to have a timestamp on it. self.assertFalse(csrf.token_is_valid('hello')) # The timestamp needs to be within the current date range. self.time_mock.time = mock.Mock(return_value=9999999999999) self.assertFalse(csrf.token_is_valid('hello 123')) # The user needs to be logged in. token = csrf.make_token() self.logout() self.assertFalse(csrf.token_is_valid(token)) self.login() # Modifying the token should break everything. modified_token = '0' + token[1:] if token == modified_token: modified_token = '1' + token[1:] self.assertFalse(csrf.token_is_valid(modified_token)) # The original token that we got should work. self.assertTrue(csrf.token_is_valid(token)) def <API key>(self): self.login() response = self.testapp.get('/', status=200).body self.assertIn('CSRF Token:', response) self.assertEqual(response.split(':')[-1], csrf.make_token()) def <API key>(self): self.login() self.testapp.put('/', status=403) self.testapp.post('/', status=403) self.testapp.delete('/', status=403) csrf_param = 'csrf_token=' + csrf.make_token(path='/') self.testapp.put('/', params=csrf_param, status=200) self.testapp.post('/', params=csrf_param, status=200) # Though the spec allows DELETE to have a body, it tends to be ignored # ignores it as well, so we have to put the params in the URL. self.testapp.delete('/?' + csrf_param, status=200) if __name__ == '__main__': unittest.main()
<!DOCTYPE HTML PUBLIC "- <HTML ><HEAD ><TITLE >dblink_cancel_query</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REV="MADE" HREF="mailto:pgsql-docs@postgresql.org"><LINK REL="HOME" TITLE="PostgreSQL 9.2.8 Documentation" HREF="index.html"><LINK REL="UP" TITLE="dblink" HREF="dblink.html"><LINK REL="PREVIOUS" TITLE="dblink_get_result" HREF="<API key>.html"><LINK REL="NEXT" TITLE="dblink_get_pkey" HREF="<API key>.html"><LINK REL="STYLESHEET" TYPE="text/css" HREF="stylesheet.css"><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"><META NAME="creation" CONTENT="2014-03-17T19:46:29"></HEAD ><BODY CLASS="REFENTRY" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="5" ALIGN="center" VALIGN="bottom" ><A HREF="index.html" >PostgreSQL 9.2.8 Documentation</A ></TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="top" ><A TITLE="dblink_get_result" HREF="<API key>.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="10%" ALIGN="left" VALIGN="top" ><A HREF="dblink.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="60%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="20%" ALIGN="right" VALIGN="top" ><A TITLE="dblink_get_pkey" HREF="<API key>.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="<API key>" ></A >dblink_cancel_query</H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN142312" ></A ><H2 >Name</H2 >dblink_cancel_query&nbsp;--&nbsp;cancels any active query on the named connection</DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN142315" ></A ><H2 >Synopsis</H2 ><PRE CLASS="SYNOPSIS" >dblink_cancel_query(text connname) returns text</PRE ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN142317" ></A ><H2 >Description</H2 ><P > <CODE CLASS="FUNCTION" >dblink_cancel_query</CODE > attempts to cancel any query that is in progress on the named connection. Note that this is not certain to succeed (since, for example, the remote query might already have finished). A cancel request simply improves the odds that the query will fail soon. You must still complete the normal query protocol, for example by calling <CODE CLASS="FUNCTION" >dblink_get_result</CODE >. </P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN142322" ></A ><H2 >Arguments</H2 ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT ><TT CLASS="PARAMETER" >conname</TT ></DT ><DD ><P > Name of the connection to use. </P ></DD ></DL ></DIV ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN142330" ></A ><H2 >Return Value</H2 ><P > Returns <TT CLASS="LITERAL" >OK</TT > if the cancel request has been sent, or the text of an error message on failure. </P ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN142334" ></A ><H2 >Examples</H2 ><PRE CLASS="PROGRAMLISTING" >SELECT dblink_cancel_query('dtest1');</PRE ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="<API key>.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="<API key>.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >dblink_get_result</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="dblink.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >dblink_get_pkey</TD ></TR ></TABLE ></DIV ></BODY ></HTML >
import AutoLaunch from 'auto-launch'; import {app} from 'electron'; function shouldQuitApp(cmd) { if (process.platform !== 'win32') { return false; } const squirrelCommands = ['--squirrel-install', '--squirrel-updated', '--squirrel-uninstall', '--squirrel-obsolete']; return squirrelCommands.includes(cmd); } async function setupAutoLaunch(cmd) { const appLauncher = new AutoLaunch({ name: app.getName(), isHidden: true, }); if (cmd === '--squirrel-uninstall') { // If we're uninstalling, make sure we also delete our auto launch registry key await appLauncher.disable(); } else if (cmd === '--squirrel-install' || cmd === '--squirrel-updated') { // If we're updating and already have an registry entry for auto launch, make sure to update the path const enabled = await appLauncher.isEnabled(); if (enabled) { await appLauncher.enable(); } } } export default function squirrelStartup(callback) { if (process.platform === 'win32') { const cmd = process.argv[1]; setupAutoLaunch(cmd).then(() => { if (require('<API key>') && callback) { // eslint-disable-line global-require callback(); } }); return shouldQuitApp(cmd); } return false; }
package modelo.formularios; import controlador.dbConnection; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import javax.swing.JOptionPane; public class Interfaz_Factura { private final dbConnection myLink = new dbConnection(); private final Connection conexion = dbConnection.getConnection(); private String querySQL = ""; ResultSet rs = null; PreparedStatement pst = null; public boolean mostrarFactura(String Buscar) { String[] registro = new String[8]; querySQL = "SELECT `factura_cabina`.`factura_id`, " + "`factura_cabina`.`cant_dia`, " + "`factura_cabina`.`fecha`, " + "`factura_cabina`.`impuesto_cabina`, " + "`factura_cabina`.`precio_total_cabina`, " + "`factura_cabina`.`cabina_cabina_id`, " + "`factura_cabina`.`<API key>`, " + "`factura_cabina`.`numero_factura`" + "FROM `pct3`.`factura_cabina`" + "WHERE " + "`factura_cabina`.`numero_factura` = '" + Buscar + "'" + "order by `factura_cabina`.`numero_factura`;"; try { Statement st = conexion.createStatement(); rs = st.executeQuery(querySQL); while (rs.next()) { registro[0] = rs.getString(1); registro[1] = rs.getString(2); registro[2] = rs.getString(3); registro[3] = rs.getString(4); registro[4] = rs.getString(5); registro[5] = rs.getString(6); registro[6] = rs.getString(7); registro[7] = rs.getString(8); } } catch (SQLException sqle) { JOptionPane.showConfirmDialog(null, sqle); } return false; } }
# Makefile for Tutorials SHELL := /bin/bash # You can set these variables from the command line. TUTORIAL_OUTPUT_DIR = build <API key> = ../allennlp-website .PHONY: help help: @echo "Please use \`make <target>' where <target> is one of" @echo " build to clean and build all the tutorials" @echo " clean to wipe out the build directory" @echo " getting-started to build the getting-started tutorials" @echo " notebooks to build the jupyter notebook tutorials" .PHONY: clean clean: @echo "Cleaning out the build directory" @rm -rf $(TUTORIAL_OUTPUT_DIR) .PHONY: getting-started getting-started: @echo "Building the getting-started tutorials" @mkdir -p $(TUTORIAL_OUTPUT_DIR)
#! /bin/bash # Runs the linters against dendrite # The linters can take a lot of resources and are slow, so they can be # configured using two environment variables: # - `<API key>` - number of concurrent linters to run, # gometalinter defaults this to 8 # - `<API key>` - if set then the the go gc will be disabled # when running the linters, speeding them up but using much more memory. set -eux cd `dirname $0`/.. export GOPATH="$(pwd):$(pwd)/vendor" # prefer the versions of gometalinter and the linters that we install # to anythign that ends up on the PATH. export PATH="$(pwd)/bin:$PATH" args="" if [ ${1:-""} = "fast" ] then args="--config=linter-fast.json" else args="--config=linter.json" fi if [ -n "${<API key>:-}" ] then args="$args --concurrency=$<API key>" fi if [ -z "${<API key>:-}" ] then args="$args --enable-gc" fi echo "Installing lint search engine..." gb build github.com/alecthomas/gometalinter/ gometalinter --config=linter.json ./... --install echo "Looking for lint..." gometalinter ./... $args echo "Double checking spelling..." misspell -error src *.md
package com.ihtsdo.snomed.model.xml; import java.sql.Date; import javax.xml.bind.annotation.XmlRootElement; import com.google.common.base.Objects; import com.google.common.primitives.Longs; import com.ihtsdo.snomed.dto.refset.RefsetDto; import com.ihtsdo.snomed.model.refset.Refset; @XmlRootElement(name="refset") public class RefsetDtoShort { private long id; private XmlRefsetConcept concept; private String publicId; private String title; private String description; private Date created; private Date lastModified; private int memberSize; private String snomedExtension; private String snomedReleaseDate; private boolean pendingChanges; public RefsetDtoShort(Refset r){ setId(r.getId()); setConcept(new XmlRefsetConcept(r.getRefsetConcept())); setPublicId(r.getPublicId()); setTitle(r.getTitle()); setDescription(r.getDescription()); setCreated(r.getCreationTime()); setLastModified(r.getModificationTime()); setPendingChanges(r.isPendingChanges()); setMemberSize(r.getMemberSize()); setSnomedExtension(r.getOntologyVersion().getFlavour().getPublicId()); <API key>(RefsetDto.dateFormat.format(r.getOntologyVersion().getTaggedOn())); } public RefsetDtoShort(){} @Override public String toString() { return Objects.toStringHelper(this) .add("id", getId()) .add("concept", getConcept()) .add("publicId", getPublicId()) .add("title", getTitle()) .add("description", getDescription()) .add("created", getCreated()) .add("lastModified", getLastModified()) .add("pendingChanges", isPendingChanges()) .add("memberSize", getMemberSize()) .add("snomedExtension", getSnomedExtension()) .add("snomedReleaseDate", <API key>()) .toString(); } @Override public int hashCode(){ return Longs.hashCode(getId()); } @Override public boolean equals(Object o){ if (o instanceof RefsetDtoShort){ RefsetDtoShort r = (RefsetDtoShort) o; if (r.getId() == this.getId()){ return true; } } return false; } public boolean isPendingChanges() { return pendingChanges; } public void setPendingChanges(boolean pendingChanges) { this.pendingChanges = pendingChanges; } public long getId() { return id; } public void setId(long id) { this.id = id; } public XmlRefsetConcept getConcept() { return concept; } public void setConcept(XmlRefsetConcept concept) { this.concept = concept; } public String getPublicId() { return publicId; } public void setPublicId(String publicId) { this.publicId = publicId; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Date getCreated() { return created; } public void setCreated(Date created) { this.created = created; } public Date getLastModified() { return lastModified; } public void setLastModified(Date lastModified) { this.lastModified = lastModified; } public int getMemberSize() { return memberSize; } public void setMemberSize(int memberSize) { this.memberSize = memberSize; } public String getSnomedExtension() { return snomedExtension; } public void setSnomedExtension(String snomedExtension) { this.snomedExtension = snomedExtension; } public String <API key>() { return snomedReleaseDate; } public void <API key>(String snomedReleaseDate) { this.snomedReleaseDate = snomedReleaseDate; } public static RefsetDtoShort parse(Refset r){ return getBuilder(new XmlRefsetConcept(r.getRefsetConcept()), r.getPublicId(), r.getTitle(), r.getDescription(), r.getCreationTime(), r.getModificationTime(), r.isPendingChanges(), r.getMemberSize(), r.getOntologyVersion().getFlavour().getPublicId(), r.getOntologyVersion().getTaggedOn()).build(); } public static Builder getBuilder(XmlRefsetConcept concept, String publicId, String title, String description, Date created, Date lastModified, boolean pendingChanges, int memberSize, String snomedExtension, Date snomedReleaseDate) { return new Builder(concept, publicId, title, description, created, lastModified, pendingChanges, memberSize, snomedExtension, snomedReleaseDate); } public static class Builder { private RefsetDtoShort built; Builder(XmlRefsetConcept concept, String publicId, String title, String description, Date created, Date lastModified, boolean pendingChanges, int memberSize, String snomedExtension, Date snomedReleaseDate){ built = new RefsetDtoShort(); built.concept = concept; built.publicId = publicId; built.title = title; built.description = description; built.created = created; built.lastModified = lastModified; built.pendingChanges = pendingChanges; built.memberSize = memberSize; built.setSnomedExtension(snomedExtension); built.<API key>(RefsetDto.dateFormat.format(snomedReleaseDate)); } public RefsetDtoShort build() { return built; } } }
package com.fuyoul.sanwenseller.bean.pickerview; import java.util.List; public class ProvinceModel implements IPickerViewData { private String name; private List<CityModel> cityList; @Override public String getPickerViewText() { return name; } public ProvinceModel() { super(); } public ProvinceModel(String name, List<CityModel> cityList) { super(); this.name = name; this.cityList = cityList; } public String getName() { return name; } public void setName(String name) { this.name = name; } public List<CityModel> getCityList() { return cityList; } public void setCityList(List<CityModel> cityList) { this.cityList = cityList; } @Override public String toString() { return "ProvinceModel [name=" + name + ", cityList=" + cityList + "]"; } }
var nodes = new vis.DataSet([ /* {id: a, label: b, ...}, */ {id: '192', label: 'VALUE\n13.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 13.0<br>Type: CONSTANT_VALUE<br>Id: 192<br>Formula Expression: Formula String: VALUE; Formula Values: 13.0; Formula Ptg: 13.0; Ptgs: VALUE Index in Ptgs: 0 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '193', label: 'VALUE\n9.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 9.0<br>Type: CONSTANT_VALUE<br>Id: 193<br>Formula Expression: Formula String: VALUE; Formula Values: 9.0; Formula Ptg: 9.0; Ptgs: VALUE Index in Ptgs: 1 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '194', label: 'VALUE\n5.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 5.0<br>Type: CONSTANT_VALUE<br>Id: 194<br>Formula Expression: Formula String: VALUE; Formula Values: 5.0; Formula Ptg: 5.0; Ptgs: VALUE Index in Ptgs: 2 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '195', label: 'VALUE\n7.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 7.0<br>Type: CONSTANT_VALUE<br>Id: 195<br>Formula Expression: Formula String: VALUE; Formula Values: 7.0; Formula Ptg: 7.0; Ptgs: VALUE Index in Ptgs: 3 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '196', label: 'VALUE\n12.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 12.0<br>Type: CONSTANT_VALUE<br>Id: 196<br>Formula Expression: Formula String: VALUE; Formula Values: 12.0; Formula Ptg: 12.0; Ptgs: VALUE Index in Ptgs: 4 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '197', label: 'VALUE\n5.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 5.0<br>Type: CONSTANT_VALUE<br>Id: 197<br>Formula Expression: Formula String: VALUE; Formula Values: 5.0; Formula Ptg: 5.0; Ptgs: VALUE Index in Ptgs: 5 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '198', label: 'VALUE\n46.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 46.0<br>Type: CONSTANT_VALUE<br>Id: 198<br>Formula Expression: Formula String: VALUE; Formula Values: 46.0; Formula Ptg: 46.0; Ptgs: VALUE Index in Ptgs: 6 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '199', label: 'VALUE\n85.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 85.0<br>Type: CONSTANT_VALUE<br>Id: 199<br>Formula Expression: Formula String: VALUE; Formula Values: 85.0; Formula Ptg: 85.0; Ptgs: VALUE Index in Ptgs: 7 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '200', label: 'VALUE\n15.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 15.0<br>Type: CONSTANT_VALUE<br>Id: 200<br>Formula Expression: Formula String: VALUE; Formula Values: 15.0; Formula Ptg: 15.0; Ptgs: VALUE Index in Ptgs: 8 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '201', label: 'VALUE\n159.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 159.0<br>Type: CONSTANT_VALUE<br>Id: 201<br>Formula Expression: Formula String: VALUE; Formula Values: 159.0; Formula Ptg: 159.0; Ptgs: VALUE Index in Ptgs: 9 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '202', label: 'VALUE\n452.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 452.0<br>Type: CONSTANT_VALUE<br>Id: 202<br>Formula Expression: Formula String: VALUE; Formula Values: 452.0; Formula Ptg: 452.0; Ptgs: VALUE Index in Ptgs: 10 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '203', label: 'VALUE\n452.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 452.0<br>Type: CONSTANT_VALUE<br>Id: 203<br>Formula Expression: Formula String: VALUE; Formula Values: 452.0; Formula Ptg: 452.0; Ptgs: VALUE Index in Ptgs: 11 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '204', label: 'VALUE\n365.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 365.0<br>Type: CONSTANT_VALUE<br>Id: 204<br>Formula Expression: Formula String: VALUE; Formula Values: 365.0; Formula Ptg: 365.0; Ptgs: VALUE Index in Ptgs: 12 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '205', label: 'VALUE\n36.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 36.0<br>Type: CONSTANT_VALUE<br>Id: 205<br>Formula Expression: Formula String: VALUE; Formula Values: 36.0; Formula Ptg: 36.0; Ptgs: VALUE Index in Ptgs: 13 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '206', label: 'VALUE\n362.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 362.0<br>Type: CONSTANT_VALUE<br>Id: 206<br>Formula Expression: Formula String: VALUE; Formula Values: 362.0; Formula Ptg: 362.0; Ptgs: VALUE Index in Ptgs: 14 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '207', label: 'VALUE\n23.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 23.0<br>Type: CONSTANT_VALUE<br>Id: 207<br>Formula Expression: Formula String: VALUE; Formula Values: 23.0; Formula Ptg: 23.0; Ptgs: VALUE Index in Ptgs: 15 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '208', label: 'VALUE\n236.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 236.0<br>Type: CONSTANT_VALUE<br>Id: 208<br>Formula Expression: Formula String: VALUE; Formula Values: 236.0; Formula Ptg: 236.0; Ptgs: VALUE Index in Ptgs: 16 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '209', label: 'VALUE\n562.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 562.0<br>Type: CONSTANT_VALUE<br>Id: 209<br>Formula Expression: Formula String: VALUE; Formula Values: 562.0; Formula Ptg: 562.0; Ptgs: VALUE Index in Ptgs: 17 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '210', label: 'VALUE\n45.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 45.0<br>Type: CONSTANT_VALUE<br>Id: 210<br>Formula Expression: Formula String: VALUE; Formula Values: 45.0; Formula Ptg: 45.0; Ptgs: VALUE Index in Ptgs: 18 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '211', label: 'VALUE\n125.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 125.0<br>Type: CONSTANT_VALUE<br>Id: 211<br>Formula Expression: Formula String: VALUE; Formula Values: 125.0; Formula Ptg: 125.0; Ptgs: VALUE Index in Ptgs: 19 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '212', label: 'VALUE\n23.0', color: '#31b0d5', title: 'Name: VALUE<br>Alias: null<br>Value: 23.0<br>Type: CONSTANT_VALUE<br>Id: 212<br>Formula Expression: Formula String: VALUE; Formula Values: 23.0; Formula Ptg: 23.0; Ptgs: VALUE Index in Ptgs: 20 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '213', label: 'CHOOSE\n36.0', color: '#f0ad4e', title: 'Name: CHOOSE<br>Alias: null<br>Value: 36.0<br>Type: FUNCTION<br>Id: 213<br>Formula Expression: Formula String: CHOOSE(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE); Formula Values: CHOOSE(23.0, 125.0, 45.0, 562.0, 236.0, 23.0, 362.0, 36.0, 365.0, 452.0, 452.0, 159.0, 15.0, 85.0, 46.0, 5.0, 12.0, 7.0, 5.0, 9.0, 13.0); Formula Ptg: ; Ptgs: Index in Ptgs: 21 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'}, {id: '191', label: 'B2\n36.0', color: '#31b0d5', title: 'Name: B2<br>Alias: null<br>Value: 36.0<br>Type: CELL_WITH_FORMULA<br>Id: 191<br>Formula Expression: Formula String: CHOOSE(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE); Formula Values: CHOOSE(23.0, 125.0, 45.0, 562.0, 236.0, 23.0, 362.0, 36.0, 365.0, 452.0, 452.0, 159.0, 15.0, 85.0, 46.0, 5.0, 12.0, 7.0, 5.0, 9.0, 13.0); Formula Ptg: ; Ptgs: Index in Ptgs: 0 <br>Source Object Id: com.dataart.<API key>.engine.PoiProxyWorkbook@301eda63'} ]); var edges = new vis.DataSet([ /* {from: id_a, to: id_b}, */ {from: '212', to: '213'}, {from: '211', to: '213'}, {from: '210', to: '213'}, {from: '209', to: '213'}, {from: '208', to: '213'}, {from: '207', to: '213'}, {from: '206', to: '213'}, {from: '205', to: '213'}, {from: '204', to: '213'}, {from: '203', to: '213'}, {from: '213', to: '191'}, {from: '202', to: '213'}, {from: '201', to: '213'}, {from: '200', to: '213'}, {from: '199', to: '213'}, {from: '198', to: '213'}, {from: '197', to: '213'}, {from: '196', to: '213'}, {from: '195', to: '213'}, {from: '194', to: '213'}, {from: '193', to: '213'}, {from: '192', to: '213'} ]);
<!DOCTYPE HTML PUBLIC "- <!--NewPage <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_03) on Mon Nov 19 21:41:27 CET 2007 --> <TITLE> Uses of Class org.springframework.core.type.filter.<API key> (Spring Framework API 2.5) </TITLE> <META NAME="date" CONTENT="2007-11-19"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.springframework.core.type.filter.<API key> (Spring Framework API 2.5)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <A NAME="navbar_top"></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/springframework/core/type/filter/<API key>.html" title="class in org.springframework.core.type.filter"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <a href="http: </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/springframework/core/type/filter/\<API key>.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="<API key>.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <! if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <HR> <CENTER> <H2> <B>Uses of Class<br>org.springframework.core.type.filter.<API key></B></H2> </CENTER> No usage of org.springframework.core.type.filter.<API key> <P> <HR> <A NAME="navbar_bottom"></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="<API key>"></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/springframework/core/type/filter/<API key>.html" title="class in org.springframework.core.type.filter"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <a href="http: </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/springframework/core/type/filter/\<API key>.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="<API key>.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <! if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <HR> <i>Copyright &copy; 2002-2007 <a href=http: </BODY> </HTML>
package persistent.prestige.modules.edu.service; import java.util.Map; /** * Organization service * @author 2016-9-10 22:28:24 * @version 1.0 */ public interface OrganizationService{ /** * * @param datas * @return */ Integer saveOrganization(Map datas); }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Carrot Cake</title> <meta name="description" content="ZutatenFür den Kuchen:200 g brauner Zucker180 g Pflanzenöl (200 ml)3 EL fetter Joghurt3 Eier1 TL Vanille-Extrakt oder das Mark einer Schote250g Mehl1 TL Back..."> <link rel="stylesheet" href="/css/main.css"> <link rel="canonical" href="http://clonker.github.io/recipe/secret/2015/09/26/carrot-cake.html"> <link rel="alternate" type="application/rss+xml" title="d'oh" href="http://clonker.github.io/feed.xml" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script> </head> <body> <header class="site-header"> <div class="wrapper"> <a class="site-title" href="/">d'oh</a> <nav class="site-nav"> <a href="#" class="menu-icon"> <svg viewBox="0 0 18 15"> <path fill="#424242" d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.031C17.335,0,18,0.665,18,1.484L18,1.484z"/> <path fill="#424242" d="M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0c0-0.82,0.665-1.484,1.484-1.484 h15.031C17.335,6.031,18,6.696,18,7.516L18,7.516z"/> <path fill="#424242" d="M18,13.516C18,14.335,17.335,15,16.516,15H1.484C0.665,15,0,14.335,0,13.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.031C17.335,12.031,18,12.696,18,13.516L18,13.516z"/> </svg> </a> <div class="trigger"> <a class="page-link" href="/about/">About</a> <a class="page-link" href="/slides/">todo</a> <a class="page-link" href="/test/test.html">Text!</a> <a class="page-link" href="/phd/todo.html">todo</a> </div> </nav> </div> </header> <div class="page-content"> <div class="wrapper"> <div class="hidden" id="hidden"></div> <script type="text/javascript"> $(document).ready(function() { var hidden = jQuery('#hidden'); var post = jQuery('#post'); post.contents().appendTo(hidden); var pwd = prompt("Please enter the password", ""); if(pwd != null && pwd == 'doh') { hidden.contents().appendTo(post); } else { var sloths = [ "https://upload.wikimedia.org/wikipedia/commons/2/25/Sloth1a.jpg", "http://free4uwallpapers.eu/wp-content/uploads/Funny/<API key>.jpg" ]; var item = sloths[Math.floor(Math.random()*sloths.length)]; post.append(jQuery('<h1>Sorry, wrong password.</h1><img src="'+item+'"/>')); } }) </script> <div class="post" id="post"> <header class="post-header"> <h1 class="post-title">Carrot Cake</h1> <p class="post-meta">Sep 26, 2015</p> </header> <article class="post-content"> <h2>Zutaten</h2> <h3>Für den Kuchen:</h3> <ul> <li>200 g brauner Zucker</li> <li>180 g Pflanzenöl (200 ml)</li> <li>3 EL fetter Joghurt</li> <li>3 Eier</li> <li>1 TL Vanille-Extrakt oder das Mark einer Schote</li> <li>250g Mehl</li> <li>1 TL Backpulver (besser: Natron)</li> <li>2 TL Zimt</li> <li>1/4 TL Muskatnuss</li> <li>1/2 TL Salz</li> <li>260 g geriebene Karotten</li> <li>150 g Walnüsse</li> </ul> <h3>Für das Frosting:</h3> <ul> <li>300 g Frischkäse</li> <li>120 g zimmerwarme Butter</li> <li>200 g Puderzucker</li> <li>das Mark einer Vanilleschote</li> <li>1/2 TL Salz</li> </ul> <h2>Zubereitung:</h2> <p>Braunen Zucker, Salz, Öl, Eier, Vanille, Zimt, Muskat und Joghurt in einer Schüssel verquirlen, bis eine homogene Masse entstanden ist. Mehl und Backpulver langsam unterheben und weiterrühren, bis sich die Zutaten verbunden haben. Karotten schällen und fein raspeln. Ebenfalls unter den Teig heben. Zum Schluss die Walnüsse grob hacken und auch zum Teig geben.</p> <p>Eine Springform mit Butter ausreiben und leicht mit Zucker bestreuen. Den Teig hineinfüllen und den Kuchen bei 180°C Umluft in einem vorgeheizten Backofen für 37 min backen.</p> <p>In der Zwischenzeit Frischkäse und Butter cremig aufschlagen und anschließend den Puderzucker unterrühren, bis eine glatte Creme entstanden ist. Mit Vanillemark und etwas Salz abschmecken. Den Kuchen nach 37 Minuten aus dem Ofen nehmen und auskühlen lassen. Das Frosting in die Mitte geben und mit einem Löffel oder einem Spatel vorsichtig kreisförmig </p> </article> </div> </div> </div> </body> </html>
package buchungstool.model.importer; import org.junit.Test; import static java.time.LocalDateTime.now; import static org.assertj.core.api.Assertions.assertThat; public class <API key> { @Test public void test() { KonfigurationEvent konfigurationEvent = new KonfigurationEvent(now(), now(), "@Konfiguration", "Max:16\nMin: 4"); assertThat(konfigurationEvent.getMax()).isEqualTo(16); assertThat(konfigurationEvent.getMin()).isEqualTo(4); } }
[ { "title": "Ventes véhicules", "url": "", "imageUrl": "http://lim.local.inetpsa.com/application/images/service/car2.jpg", "language": "fr-FR", "order": "1", "workplace": "All", "department": "All", "categoryPro": "All", "status": "published", "children": [ { "title": "http://portail.inetpsa.com/sites/gpmobile/PublishingImages/car2.jpg", "url": "http://portail.inetpsa.com/sites/gpmobile/PublishingImages/car2.jpg", "imageUrl": "http://lim.local.inetpsa.com/application/images/service/car2.jpg", "language": "fr-FR", "order": 0, "workplace": "All", "department": "All", "categoryPro": "All", "status": "published" }, { "title": "Ventes véhicules Peugeot", "url": "https://docinfogroupe.psa-peugeot-citroen.com/ead/dom/1000788899.fd", "imageUrl": "http://lim.local.inetpsa.com/application/images/service/car2.jpg", "language": "fr-FR", "order": 1, "workplace": "All", "department": "All", "categoryPro": "All", "status": "edited" }, { "title": "Ventes véhicules DS", "url": "https://docinfogroupe.psa-peugeot-citroen.com/ead/dom/1000779116.fd", "imageUrl": "http://lim.local.inetpsa.com/application/images/service/car2.jpg", "language": "fr-FR", "order": 2, "workplace": "All", "department": "All", "categoryPro": "All", "status": "published" } ] }, { "title": "Webmail", "url": "https://webmail.mpsa.com/", "imageUrl": "http://lim.local.inetpsa.com/application/images/service/webmail.jpg", "language": "en-US", "order": "0", "workplace": "All", "department": "All", "categoryPro": "All", "status": "published", "children": [] }, { "title": "Net'RH congés", "url": "https://fr-rh.mpsa.com/rib00/ribdnins.nsf/<API key>/<API key>?OpenDocument", "imageUrl": "http://lim.local.inetpsa.com/application/images/service/holiday.jpg", "language": "fr-FR", "order": "3", "workplace": "All", "department": "All", "categoryPro": "All", "status": "unpublished", "children": [] } ]
mod project; mod build; pub use self::project::{Project, Folder};
#include "firestore/src/swig/equality_compare.h" namespace { template <typename T> bool <API key>(const T* lhs, const T* rhs) { return lhs == rhs || (lhs != nullptr && rhs != nullptr && *lhs == *rhs); } } // namespace namespace firebase { namespace firestore { namespace csharp { bool QueryEquals(const Query* lhs, const Query* rhs) { return <API key>(lhs, rhs); } bool QuerySnapshotEquals(const QuerySnapshot* lhs, const QuerySnapshot* rhs) { return <API key>(lhs, rhs); } bool <API key>(const DocumentSnapshot* lhs, const DocumentSnapshot* rhs) { return <API key>(lhs, rhs); } bool <API key>(const DocumentChange* lhs, const DocumentChange* rhs) { return <API key>(lhs, rhs); } } // namespace csharp } // namespace firestore } // namespace firebase
package at.ac.tuwien.dsg.pm.resources; import at.ac.tuwien.dsg.pm.PeerManager; import at.ac.tuwien.dsg.pm.model.Collective; import at.ac.tuwien.dsg.smartcom.model.CollectiveInfo; import at.ac.tuwien.dsg.smartcom.model.Identifier; import javax.inject.Inject; import javax.ws.rs.*; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import java.util.ArrayList; import java.util.List; /** * @author Philipp Zeppezauer (philipp.zeppezauer@gmail.com) * @version 1.0 */ @Path("collectiveInfo") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) public class <API key> { @Inject private PeerManager manager; @GET @Path("/{id}") public CollectiveInfo getCollectiveInfo(@PathParam("id") String id) { Collective collective = manager.getCollective(id); if (collective == null) { throw new <API key>(Response.status(Response.Status.NOT_FOUND).build()); } CollectiveInfo info = new CollectiveInfo(); info.setId(Identifier.collective(id)); info.setDeliveryPolicy(collective.getDeliveryPolicy()); List<Identifier> peers = new ArrayList<>(collective.getPeers().size()); for (String s : collective.getPeers()) { peers.add(Identifier.peer(s)); } info.setPeers(peers); return info; } }
package tutor.utils import org.scalatest.{FunSpec, Matchers} class FileUtilSpec extends FunSpec with Matchers { describe("FileUtil"){ it("can extract file extension name"){ val path = "src/test/build.sbt" FileUtil.extractExtFileName(path) shouldBe "sbt" } it("if file has no extension name, should give EmptyFileType constant"){ val path = "src/test/build" FileUtil.extractExtFileName(path) shouldBe FileUtil.EmptyFileType } it("can extract local file path"){ val path = "src/test/build.sbt" FileUtil.extractLocalPath(path) shouldBe "build.sbt" } } }
sap.ui.define(["sap/ui/integration/Designtime"], function ( Designtime ) { "use strict"; return function () { return new Designtime({ "form": { "items": { "validationGroup": { "type": "group", "label": "Validation" }, "OrderID": { "manifestpath": "/sap.card/configuration/parameters/OrderID/value", "label": "Order Id", "type": "integer", "required": true }, "stringphone": { "manifestpath": "/sap.card/configuration/parameters/string/value", "label": "String with Pattern validation", "type": "string", "translatable": false, "required": true, "placeholder": "555-4555", "validation": { "type": "error", "maxLength": 20, "minLength": 1, "pattern": "^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$", "message": "The string does not match a telefone number" } }, "<API key>": { "manifestpath": "/sap.card/configuration/parameters/string/value", "label": "String with default validation message", "type": "string", "translatable": false, "required": true, "placeholder": "555-4555", "validation": { "type": "warning", "maxLength": 20, "minLength": 1, "pattern": "^(\\([0-9]{3}\\))?[0-9]{3}-[0-9]{4}$" } }, "stringmaxmin": { "manifestpath": "/sap.card/configuration/parameters/string/value", "label": "String with Length Constrained", "type": "string", "translatable": false, "required": true, "placeholder": "MinMaxlength", "validation": { "type": "warning", "maxLength": 20, "minLength": 3 }, "hint": "Please refer to the <a href='https: }, "integerrequired": { "manifestpath": "/sap.card/configuration/parameters/integerrequired/value", "label": "Integer with Required", "type": "integer", "translatable": false, "required": true }, "integervalidation": { "manifestpath": "/sap.card/configuration/parameters/integer/value", "label": "Integer with Min Max value", "type": "integer", "visualization": { "type": "Slider", "settings": { "value": "{currentSettings>value}", "min": 0, "max": 16, "width": "100%", "showAdvancedTooltip": true, "showHandleTooltip": false, "inputsAsTooltips": true, "enabled": "{currentSettings>editable}" } }, "validations": [ { "type": "warning", "minimum": 5, "message": "The minimum is 5." }, { "type": "error", "exclusiveMaximum": 16, "message": "The maximum is 15." }, { "type": "error", "multipleOf": 5, "message": "Has to be multiple of 5" } ] }, "numberrequired": { "manifestpath": "/sap.card/configuration/parameters/number/value", "label": "Number with validation", "type": "number", "translatable": false, "required": true, "validation": { "type": "error", "minimum": 0, "maximum": 100, "exclusiveMaximum": true, "message": "The value should be equal or greater than 0 and be less than 100." } } } }, "preview": { "modes": "AbstractLive" } }); }; });
#include "list.h" void __list_add__(list_node_t *prev, list_node_t *next, list_node_t *node) { next->prev = node; node->next = next; node->prev = prev; prev->next = node; } void __list_del__(list_node_t *prev, list_node_t *next) { next->prev = prev; prev->next = next; } void __list_erase__(list_t *list, list_node_t *node) { list_iter_t next, prev; if (list_is_singular(*list)) { list->head = list->tail = NULL; } else { next = node->next; prev = node->prev; __list_del__(node->prev, node->next); list->head = list->head == node ? next : list->head; list->tail = list->tail == node ? prev : list->tail; } node->prev = NULL; node->next = NULL; } void __list_replace__(list_node_t *o, list_node_t *n) { n->next = o->next; n->next->prev = n; n->prev = o->prev; n->prev->next = n; } void __list_push_back__(list_t *list, list_node_t *node) { if (list->head) { __list_add__(list->head->prev, list->head, node); list->tail = node; } else { list->head = list->tail = node->next = node->prev = node; } } void __list_push_front__(list_t *list, list_node_t *node) { if (list->head) { __list_add__(list->head->prev, list->head, node); list->head = node; } else { list->head = list->tail = node->next = node->prev = node; } }
package com.earlysleep.model; import org.litepal.crud.DataSupport; import java.util.ArrayList; import java.util.List; public class AllData extends DataSupport { private String music; private int musictime; private boolean musicchosse; List<TimeSeting> list=new ArrayList<>(); }
package org.spoofax.jsglr2.integrationtest.features; import java.util.Arrays; import java.util.stream.Stream; import org.junit.jupiter.api.DynamicTest; import org.junit.jupiter.api.TestFactory; import org.spoofax.jsglr2.integrationtest.<API key>; import org.spoofax.jsglr2.integrationtest.OriginDescriptor; import org.spoofax.terms.ParseError; public class OriginsTest extends <API key> { public OriginsTest() { super("tokenization.sdf3"); } @TestFactory public Stream<DynamicTest> operator() throws ParseError { return testOrigins("x+x", Arrays.asList( //@formatter:off new OriginDescriptor("AddOperator", 0, 2), new OriginDescriptor("Id", 0, 0), new OriginDescriptor("Id", 2, 2) //@formatter:on )); } }
using System; using System.Net.Http.Formatting; using System.Web; using System.Web.Hosting; using System.Web.Http; using System.Web.Mvc; using System.Web.Optimization; using System.Web.Routing; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using NLog; using NLog.Config; using NLog.Targets; using RceDoorzoeker.Configuration; using RceDoorzoeker.Services.Mappers; namespace RceDoorzoeker { // Note: For instructions on enabling IIS6 or IIS7 classic mode, public class MvcApplication : HttpApplication { private static readonly Logger s_logger = LogManager.<API key>(); public static bool ReleaseBuild { get { #if DEBUG return false; #else return true; #endif } } protected void Application_Start() { <API key>(); InitLogging(); FilterConfig.<API key>(GlobalFilters.Filters); AreaRegistration.RegisterAllAreas(); BundleTable.EnableOptimizations = ReleaseBuild; BundleConfig.RegisterBundles(BundleTable.Bundles); RouteTable.Routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); WebApiConfig.Register(GlobalConfiguration.Configuration); RouteConfig.RegisterRoutes(RouteTable.Routes); <API key>.ConfigureMapper(); var config = GlobalConfiguration.Configuration; config.Formatters.Clear(); var <API key> = new <API key> { SerializerSettings = { ContractResolver = new <API key>(), NullValueHandling = NullValueHandling.Ignore } }; config.Formatters.Add(<API key>); s_logger.Info("Application started."); } private void InitLogging() { var cfg = new <API key>(); var fileTarget = new FileTarget() { FileName = string.Format("${{basedir}}/App_Data/NLog-{0}.log", Instance.Current.Name), Layout = "${longdate} ${level} ${logger} ${message} ${exception:format=tostring}", ArchiveAboveSize = 2000000, ArchiveNumbering = <API key>.Sequence, ArchiveEvery = FileArchivePeriod.Month, MaxArchiveFiles = 10, ConcurrentWrites = false, KeepFileOpen = true, EnableFileDelete = true, ArchiveFileName = string.Format("${{basedir}}/App_Data/NLog-{0}_archive_{{###}}.log", Instance.Current.Name) }; var traceTarget = new TraceTarget() { Layout = "${level} ${logger} ${message} ${exception:format=tostring}" }; cfg.AddTarget("instancefile", fileTarget); cfg.LoggingRules.Add(new LoggingRule("*", LogLevel.Info, fileTarget)); cfg.AddTarget("trace", traceTarget); cfg.LoggingRules.Add(new LoggingRule("*", LogLevel.Info, traceTarget)); LogManager.Configuration = cfg; } private static void <API key>() { var instanceConfig = InstanceRegistry.Current.GetBySiteName(HostingEnvironment.SiteName); if (instanceConfig == null) throw new <API key>("Can't find instance configuration for site " + HostingEnvironment.SiteName); Instance.Current = instanceConfig; DoorzoekerConfig.Current = DoorzoekerConfig.Load(instanceConfig.Config); } protected void Application_End() { s_logger.Info("Application ended"); } } }
# AUTOGENERATED FILE FROM balenalib/<API key>:focal-build ENV NODE_VERSION 12.21.0 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 \
<!DOCTYPE HTML PUBLIC "- <!--NewPage <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_26) on Sun Dec 30 01:26:12 PST 2012 --> <TITLE> Uses of Class org.apache.hadoop.fs.s3.S3FileSystem (Hadoop 1.0.4-SNAPSHOT API) </TITLE> <META NAME="date" CONTENT="2012-12-30"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.apache.hadoop.fs.s3.S3FileSystem (Hadoop 1.0.4-SNAPSHOT API)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <A NAME="navbar_top"></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/apache/hadoop/fs/s3/S3FileSystem.html" title="class in org.apache.hadoop.fs.s3"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/apache/hadoop/fs/s3//<API key>.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="S3FileSystem.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <! if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <HR> <CENTER> <H2> <B>Uses of Class<br>org.apache.hadoop.fs.s3.S3FileSystem</B></H2> </CENTER> No usage of org.apache.hadoop.fs.s3.S3FileSystem <P> <HR> <A NAME="navbar_bottom"></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="<API key>"></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/apache/hadoop/fs/s3/S3FileSystem.html" title="class in org.apache.hadoop.fs.s3"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/apache/hadoop/fs/s3//<API key>.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="S3FileSystem.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <! if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <HR> Copyright &copy; 2009 The Apache Software Foundation </BODY> </HTML>
/* Generic definitions */ #define Custom #define PACKAGE it.unimi.dsi.fastutil.shorts #define VALUE_PACKAGE it.unimi.dsi.fastutil.floats /* Assertions (useful to generate conditional code) */ #unassert keyclass #assert keyclass(Short) #unassert keys #assert keys(primitive) #unassert valueclass #assert valueclass(Float) #unassert values #assert values(primitive) /* Current type and class (and size, if applicable) */ #define KEY_TYPE short #define VALUE_TYPE float #define KEY_CLASS Short #define VALUE_CLASS Float #if #keyclass(Object) || #keyclass(Reference) #define KEY_GENERIC_CLASS K #define KEY_GENERIC_TYPE K #define KEY_GENERIC <K> #define <API key> <?> #define KEY_EXTENDS_GENERIC <? extends K> #define KEY_SUPER_GENERIC <? super K> #define KEY_GENERIC_CAST (K) #define <API key> (K[]) #define <API key> (K[][]) #else #define KEY_GENERIC_CLASS KEY_CLASS #define KEY_GENERIC_TYPE KEY_TYPE #define KEY_GENERIC #define <API key> #define KEY_EXTENDS_GENERIC #define KEY_SUPER_GENERIC #define KEY_GENERIC_CAST #define <API key> #define <API key> #endif #if #valueclass(Object) || #valueclass(Reference) #define VALUE_GENERIC_CLASS V #define VALUE_GENERIC_TYPE V #define VALUE_GENERIC <V> #define <API key> <? extends V> #define VALUE_GENERIC_CAST (V) #define <API key> (V[]) #else #define VALUE_GENERIC_CLASS VALUE_CLASS #define VALUE_GENERIC_TYPE VALUE_TYPE #define VALUE_GENERIC #define <API key> #define VALUE_GENERIC_CAST #define <API key> #endif #if #keyclass(Object) || #keyclass(Reference) #if #valueclass(Object) || #valueclass(Reference) #define KEY_VALUE_GENERIC <K,V> #define <API key> <? extends K, ? extends V> #else #define KEY_VALUE_GENERIC <K> #define <API key> <? extends K> #endif #else #if #valueclass(Object) || #valueclass(Reference) #define KEY_VALUE_GENERIC <V> #define <API key> <? extends V> #else #define KEY_VALUE_GENERIC #define <API key> #endif #endif /* Value methods */ #define KEY_VALUE shortValue #define VALUE_VALUE floatValue /* Interfaces (keys) */ #define COLLECTION ShortCollection #define SET ShortSet #define HASH ShortHash #define SORTED_SET ShortSortedSet #define STD_SORTED_SET ShortSortedSet #define FUNCTION Short2FloatFunction #define MAP Short2FloatMap #define SORTED_MAP <API key> #if #keyclass(Object) || #keyclass(Reference) #define STD_SORTED_MAP SortedMap #define STRATEGY Strategy #else #define STD_SORTED_MAP <API key> #define STRATEGY PACKAGE.ShortHash.Strategy #endif #define LIST ShortList #define BIG_LIST ShortBigList #define STACK ShortStack #define PRIORITY_QUEUE ShortPriorityQueue #define <API key> <API key> #define <API key> <API key> #define KEY_ITERATOR ShortIterator #define KEY_ITERABLE ShortIterable #define KEY_BIDI_ITERATOR <API key> #define KEY_LIST_ITERATOR ShortListIterator #define <API key> <API key> #define STD_KEY_ITERATOR ShortIterator #define KEY_COMPARATOR ShortComparator /* Interfaces (values) */ #define VALUE_COLLECTION FloatCollection #define VALUE_ARRAY_SET FloatArraySet #define VALUE_ITERATOR FloatIterator #define VALUE_LIST_ITERATOR FloatListIterator /* Abstract implementations (keys) */ #define ABSTRACT_COLLECTION <API key> #define ABSTRACT_SET AbstractShortSet #define ABSTRACT_SORTED_SET <API key> #define ABSTRACT_FUNCTION <API key> #define ABSTRACT_MAP <API key> #define ABSTRACT_FUNCTION <API key> #define ABSTRACT_SORTED_MAP <API key> #define ABSTRACT_LIST AbstractShortList #define ABSTRACT_BIG_LIST <API key> #define SUBLIST ShortSubList #define <API key> <API key> #define ABSTRACT_STACK AbstractShortStack #define <API key> <API key> #define <API key> <API key> #define <API key> <API key> #define <API key> <API key> #if #keyclass(Object) #define <API key> Comparator #else #define <API key> <API key> #endif /* Abstract implementations (values) */ #define <API key> <API key> #define <API key> <API key> #define <API key> <API key> /* Static containers (keys) */ #define COLLECTIONS ShortCollections #define SETS ShortSets #define SORTED_SETS ShortSortedSets #define LISTS ShortLists #define BIG_LISTS ShortBigLists #define MAPS Short2FloatMaps #define FUNCTIONS <API key> #define SORTED_MAPS <API key> #define PRIORITY_QUEUES ShortPriorityQueues #define HEAPS ShortHeaps #define SEMI_INDIRECT_HEAPS <API key> #define INDIRECT_HEAPS ShortIndirectHeaps #define ARRAYS ShortArrays #define BIG_ARRAYS ShortBigArrays #define ITERATORS ShortIterators #define BIG_LIST_ITERATORS <API key> #define COMPARATORS ShortComparators /* Static containers (values) */ #define VALUE_COLLECTIONS FloatCollections #define VALUE_SETS FloatSets #define VALUE_ARRAYS FloatArrays /* Implementations */ #define OPEN_HASH_SET <API key> #define OPEN_HASH_BIG_SET <API key> #define <API key> <API key> #define OPEN_HASH_MAP <API key> #define <API key> <API key> #define <API key> <API key> #define ARRAY_SET ShortArraySet #define ARRAY_MAP Short2FloatArrayMap #define <API key> <API key> #define AVL_TREE_SET ShortAVLTreeSet #define RB_TREE_SET ShortRBTreeSet #define AVL_TREE_MAP <API key> #define RB_TREE_MAP <API key> #define ARRAY_LIST ShortArrayList #define BIG_ARRAY_BIG_LIST <API key> #define <API key> <API key> #define HEAP_PRIORITY_QUEUE <API key> #define <API key> <API key> #define <API key> <API key> #define <API key> <API key> #define <API key> <API key> #define ARRAY_FIFO_QUEUE ShortArrayFIFOQueue #define <API key> <API key> #define <API key> <API key> #define <API key> <API key> /* Synchronized wrappers */ #define <API key> <API key> #define SYNCHRONIZED_SET <API key> #define <API key> <API key> #define <API key> <API key> #define SYNCHRONIZED_MAP <API key> #define SYNCHRONIZED_LIST <API key> /* Unmodifiable wrappers */ #define <API key> <API key> #define UNMODIFIABLE_SET <API key> #define <API key> <API key> #define <API key> <API key> #define UNMODIFIABLE_MAP <API key> #define UNMODIFIABLE_LIST <API key> #define <API key> <API key> #define <API key> <API key> #define <API key> <API key> /* Other wrappers */ #define KEY_READER_WRAPPER ShortReaderWrapper #define <API key> <API key> /* Methods (keys) */ #define NEXT_KEY nextShort #define PREV_KEY previousShort #define FIRST_KEY firstShortKey #define LAST_KEY lastShortKey #define GET_KEY getShort #define REMOVE_KEY removeShort #define READ_KEY readShort #define WRITE_KEY writeShort #define DEQUEUE dequeueShort #define DEQUEUE_LAST dequeueLastShort #define SUBLIST_METHOD shortSubList #define SINGLETON_METHOD shortSingleton #define FIRST firstShort #define LAST lastShort #define TOP topShort #define PEEK peekShort #define POP popShort #define KEY_ITERATOR_METHOD shortIterator #define <API key> shortListIterator #define <API key> emptyShortIterator #define AS_KEY_ITERATOR asShortIterator #define TO_KEY_ARRAY toShortArray #define ENTRY_GET_KEY getShortKey #define REMOVE_FIRST_KEY removeFirstShort #define REMOVE_LAST_KEY removeLastShort #define PARSE_KEY parseShort #define LOAD_KEYS loadShorts #define LOAD_KEYS_BIG loadShortsBig #define STORE_KEYS storeShorts /* Methods (values) */ #define NEXT_VALUE nextFloat #define PREV_VALUE previousFloat #define READ_VALUE readFloat #define WRITE_VALUE writeFloat #define <API key> floatIterator #define ENTRY_GET_VALUE getFloatValue #define REMOVE_FIRST_VALUE removeFirstFloat #define REMOVE_LAST_VALUE removeLastFloat /* Methods (keys/values) */ #define ENTRYSET short2FloatEntrySet /* Methods that have special names depending on keys (but the special names depend on values) */ #if #keyclass(Object) || #keyclass(Reference) #define GET_VALUE getFloat #define REMOVE_VALUE removeFloat #else #define GET_VALUE get #define REMOVE_VALUE remove #endif /* Equality */ #ifdef Custom #define KEY_EQUALS(x,y) ( strategy.equals( (x), KEY_GENERIC_CAST (y) ) ) #else #if #keyclass(Object) #define KEY_EQUALS(x,y) ( (x) == null ? (y) == null : (x).equals(y) ) #define KEY_EQUALS_NOT_NULL(x,y) ( (x).equals(y) ) #else #define KEY_EQUALS(x,y) ( (x) == (y) ) #define KEY_EQUALS_NOT_NULL(x,y) ( (x) == (y) ) #endif #endif #if #valueclass(Object) #define VALUE_EQUALS(x,y) ( (x) == null ? (y) == null : (x).equals(y) ) #else #define VALUE_EQUALS(x,y) ( (x) == (y) ) #endif /* Object/Reference-only definitions (keys) */ #if #keyclass(Object) || #keyclass(Reference) #define REMOVE remove #define KEY_OBJ2TYPE(x) (x) #define KEY_CLASS2TYPE(x) (x) #define KEY2OBJ(x) (x) #if #keyclass(Object) #ifdef Custom #define KEY2JAVAHASH(x) ( strategy.hashCode( KEY_GENERIC_CAST (x)) ) #define KEY2INTHASH(x) ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( strategy.hashCode( KEY_GENERIC_CAST (x)) ) ) #define KEY2LONGHASH(x) ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( (long)strategy.hashCode( KEY_GENERIC_CAST (x)) ) ) #else #define KEY2JAVAHASH(x) ( (x) == null ? 0 : (x).hashCode() ) #define KEY2INTHASH(x) ( (x) == null ? 0x87fcd5c : it.unimi.dsi.fastutil.HashCommon.murmurHash3( (x).hashCode() ) ) #define KEY2LONGHASH(x) ( (x) == null ? 0x810879608e4259ccL : it.unimi.dsi.fastutil.HashCommon.murmurHash3( (long)(x).hashCode() ) ) #endif #else #define KEY2JAVAHASH(x) ( (x) == null ? 0 : System.identityHashCode(x) ) #define KEY2INTHASH(x) ( (x) == null ? 0x87fcd5c : it.unimi.dsi.fastutil.HashCommon.murmurHash3( System.identityHashCode(x) ) ) #define KEY2LONGHASH(x) ( (x) == null ? 0x810879608e4259ccL : it.unimi.dsi.fastutil.HashCommon.murmurHash3( (long)System.identityHashCode(x) ) ) #endif #define KEY_CMP(x,y) ( ((Comparable<KEY_GENERIC_CLASS>)(x)).compareTo(y) ) #define KEY_CMP_EQ(x,y) ( ((Comparable<KEY_GENERIC_CLASS>)(x)).compareTo(y) == 0 ) #define KEY_LESS(x,y) ( ((Comparable<KEY_GENERIC_CLASS>)(x)).compareTo(y) < 0 ) #define KEY_LESSEQ(x,y) ( ((Comparable<KEY_GENERIC_CLASS>)(x)).compareTo(y) <= 0 ) #define KEY_NULL (null) #else /* Primitive-type-only definitions (keys) */ #define REMOVE rem #define KEY_CLASS2TYPE(x) ((x).KEY_VALUE()) #define KEY_OBJ2TYPE(x) (KEY_CLASS2TYPE((KEY_CLASS)(x))) #define KEY2OBJ(x) (KEY_CLASS.valueOf(x)) #if #keyclass(Boolean) #define KEY_CMP_EQ(x,y) ( (x) == (y) ) #define KEY_NULL (false) #define KEY_CMP(x,y) ( !(x) && (y) ? -1 : ( (x) == (y) ? 0 : 1 ) ) #define KEY_LESS(x,y) ( !(x) && (y) ) #define KEY_LESSEQ(x,y) ( !(x) || (y) ) #else #define KEY_NULL ((KEY_TYPE)0) #if #keyclass(Float) || #keyclass(Double) #define KEY_CMP_EQ(x,y) ( KEY_CLASS.compare((x),(y)) == 0 ) #define KEY_CMP(x,y) ( KEY_CLASS.compare((x),(y)) ) #define KEY_LESS(x,y) ( KEY_CLASS.compare((x),(y)) < 0 ) #define KEY_LESSEQ(x,y) ( KEY_CLASS.compare((x),(y)) <= 0 ) #else #define KEY_CMP_EQ(x,y) ( (x) == (y) ) #define KEY_CMP(x,y) ( (x) < (y) ? -1 : ( (x) == (y) ? 0 : 1 ) ) #define KEY_LESS(x,y) ( (x) < (y) ) #define KEY_LESSEQ(x,y) ( (x) <= (y) ) #endif #if #keyclass(Float) #define KEY2LEXINT(x) fixFloat(x) #elif #keyclass(Double) #define KEY2LEXINT(x) fixDouble(x) #else #define KEY2LEXINT(x) (x) #endif #endif #ifdef Custom #define KEY2JAVAHASH(x) ( strategy.hashCode(x) ) #define KEY2INTHASH(x) ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( strategy.hashCode(x) ) ) #define KEY2LONGHASH(x) ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( (long)strategy.hashCode(x) ) ) #else #if #keyclass(Float) #define KEY2JAVAHASH(x) it.unimi.dsi.fastutil.HashCommon.float2int(x) #define KEY2INTHASH(x) it.unimi.dsi.fastutil.HashCommon.murmurHash3( it.unimi.dsi.fastutil.HashCommon.float2int(x) ) #define KEY2LONGHASH(x) it.unimi.dsi.fastutil.HashCommon.murmurHash3( (long)it.unimi.dsi.fastutil.HashCommon.float2int(x) ) #elif #keyclass(Double) #define KEY2JAVAHASH(x) it.unimi.dsi.fastutil.HashCommon.double2int(x) #define KEY2INTHASH(x) (int)it.unimi.dsi.fastutil.HashCommon.murmurHash3(Double.doubleToRawLongBits(x)) #define KEY2LONGHASH(x) it.unimi.dsi.fastutil.HashCommon.murmurHash3(Double.doubleToRawLongBits(x)) #elif #keyclass(Long) #define KEY2JAVAHASH(x) it.unimi.dsi.fastutil.HashCommon.long2int(x) #define KEY2INTHASH(x) (int)it.unimi.dsi.fastutil.HashCommon.murmurHash3(x) #define KEY2LONGHASH(x) it.unimi.dsi.fastutil.HashCommon.murmurHash3(x) #elif #keyclass(Boolean) #define KEY2JAVAHASH(x) ((x) ? 1231 : 1237) #define KEY2INTHASH(x) ((x) ? 0xfab5368 : 0xcba05e7b) #define KEY2LONGHASH(x) ((x) ? 0x74a19fc8b6428188L : 0xbaeca2031a4fd9ecL) #else #define KEY2JAVAHASH(x) (x) #define KEY2INTHASH(x) ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( (x) ) ) #define KEY2LONGHASH(x) ( it.unimi.dsi.fastutil.HashCommon.murmurHash3( (long)(x) ) ) #endif #endif #endif /* Object/Reference-only definitions (values) */ #if #valueclass(Object) || #valueclass(Reference) #define VALUE_OBJ2TYPE(x) (x) #define VALUE_CLASS2TYPE(x) (x) #define VALUE2OBJ(x) (x) #if #valueclass(Object) #define VALUE2JAVAHASH(x) ( (x) == null ? 0 : (x).hashCode() ) #else #define VALUE2JAVAHASH(x) ( (x) == null ? 0 : System.identityHashCode(x) ) #endif #define VALUE_NULL (null) #define <API key> (this.defRetValue) #else /* Primitive-type-only definitions (values) */ #define VALUE_CLASS2TYPE(x) ((x).VALUE_VALUE()) #define VALUE_OBJ2TYPE(x) (VALUE_CLASS2TYPE((VALUE_CLASS)(x))) #define VALUE2OBJ(x) (VALUE_CLASS.valueOf(x)) #if #valueclass(Float) || #valueclass(Double) || #valueclass(Long) #define VALUE_NULL (0) #define VALUE2JAVAHASH(x) it.unimi.dsi.fastutil.HashCommon.float2int(x) #elif #valueclass(Boolean) #define VALUE_NULL (false) #define VALUE2JAVAHASH(x) (x ? 1231 : 1237) #else #if #valueclass(Integer) #define VALUE_NULL (0) #else #define VALUE_NULL ((VALUE_TYPE)0) #endif #define VALUE2JAVAHASH(x) (x) #endif #define <API key> (null) #endif #include "drv/OpenCustomHashMap.drv"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http: <html xmlns="http: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> Class: Selenium::Rake::ServerTask &mdash; Documentation by YARD 0.8.3 </title> <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" /> <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" /> <script type="text/javascript" charset="utf-8"> hasFrames = window.top.frames.main ? true : false; relpath = '../../'; framesUrl = "../../frames.html#!" + escape(window.location.href); </script> <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script> <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script> </head> <body> <div id="header"> <div id="menu"> <a href="../../_index.html">Index (S)</a> &raquo; <span class='title'><span class='object_link'><a href="../../Selenium.html" title="Selenium (module)">Selenium</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Rake.html" title="Selenium::Rake (module)">Rake</a></span></span> &raquo; <span class="title">ServerTask</span> <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div> </div> <div id="search"> <a class="full_list_link" id="class_list_link" href="../../class_list.html"> Class List </a> <a class="full_list_link" id="method_list_link" href="../../method_list.html"> Method List </a> <a class="full_list_link" id="file_list_link" href="../../file_list.html"> File List </a> </div> <div class="clear"></div> </div> <iframe id="search_frame"></iframe> <div id="content"><h1>Class: Selenium::Rake::ServerTask </h1> <dl class="box"> <dt class="r1">Inherits:</dt> <dd class="r1"> <span class="inheritName">Object</span> <ul class="fullTree"> <li>Object</li> <li class="next">Selenium::Rake::ServerTask</li> </ul> <a href="#" class="inheritanceTree">show all</a> </dd> <dt class="r2">Includes:</dt> <dd class="r2">Rake::DSL</dd> <dt class="r1 last">Defined in:</dt> <dd class="r1 last">rb/lib/selenium/rake/server_task.rb</dd> </dl> <div class="clear"></div> <h2>Overview</h2><div class="docstring"> <div class="discussion"> <p>Defines rake tasks for starting, stopping and restarting the Selenium server.</p> <p>Usage:</p> <pre class="code ruby"><code><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>selenium/rake/server_task</span><span class='tstring_end'>'</span></span> <span class='const'>Selenium</span><span class='op'>::</span><span class='const'>Rake</span><span class='op'>::</span><span class='const'>ServerTask</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_t'>t</span><span class='op'>|</span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_jar'>jar</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/path/to/<API key>.jar</span><span class='tstring_end'>&quot;</span></span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span> <span class='op'>=</span> <span class='int'>4444</span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_opts'>opts</span> <span class='op'>=</span> <span class='qwords_beg'>%w[</span><span class='tstring_content'>-some</span><span class='words_sep'> </span><span class='tstring_content'>options</span><span class='words_sep'>]</span> <span class='kw'>end</span></code></pre> <p>Alternatively, you can have the task download a specific version of the server:</p> <pre class="code ruby"><code><span class='const'>Selenium</span><span class='op'>::</span><span class='const'>Rake</span><span class='op'>::</span><span class='const'>ServerTask</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:server</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_t'>t</span><span class='op'>|</span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>2.6.0</span><span class='tstring_end'>'</span></span> <span class='kw'>end</span></code></pre> <p>or the latest version</p> <pre class="code ruby"><code><span class='const'>Selenium</span><span class='op'>::</span><span class='const'>Rake</span><span class='op'>::</span><span class='const'>ServerTask</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='symbol'>:server</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_t'>t</span><span class='op'>|</span> <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_version'>version</span> <span class='op'>=</span> <span class='symbol'>:latest</span> <span class='kw'>end</span></code></pre> <p>Tasks defined:</p> <pre class="code ruby"><code>rake selenium:server:start rake selenium:server:stop rake selenium:server:restart</code></pre> </div> </div> <div class="tags"> </div> <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#<API key>" title="#background (instance method)">- (Object) <strong>background</strong> </a> (also: #background?) </span> <span class="summary_desc"><div class='inline'> <p>Whether we should detach from the server process.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#jar-instance_method" title="#jar (instance method)">- (Object) <strong>jar</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Path to the selenium server jar.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#log-instance_method" title="#log (instance method)">- (Object) <strong>log</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Configure logging.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#<API key>" title="#opts (instance method)">- (Object) <strong>opts</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Add additional options passed to the server jar.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#<API key>" title="#port (instance method)">- (Object) <strong>port</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Port to use for the server.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#<API key>" title="#timeout (instance method)">- (Object) <strong>timeout</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Timeout in seconds for the server to start/stop.</p> </div></span> </li> <li class="public "> <span class="summary_signature"> <a href="#<API key>" title="#version (instance method)">- (Object) <strong>version</strong> </a> </span> <span class="summary_desc"><div class='inline'> <p>Specify the version of the server jar to download.</p> </div></span> </li> </ul> <h2> Instance Method Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small> </h2> <ul class="summary"> <li class="public "> <span class="summary_signature"> <a href="#<API key>" title="#initialize (instance method)">- (ServerTask) <strong>initialize</strong>(prefix = &quot;selenium:server&quot;) {|_self| ... }</a> </span> <span class="note title constructor">constructor</span> <span class="summary_desc"><div class='inline'> <p>A new instance of ServerTask.</p> </div></span> </li> </ul> <div id="constructor_details" class="method_details_list"> <h2>Constructor Details</h2> <div class="method_details first"> <h3 class="signature first" id="<API key>"> - (<tt><span class='object_link'><a href="" title="Selenium::Rake::ServerTask (class)">ServerTask</a></span></tt>) <strong>initialize</strong>(prefix = &quot;selenium:server&quot;) {|_self| ... } </h3><div class="docstring"> <div class="discussion"> <p>A new instance of ServerTask</p> </div> </div> <div class="tags"> <p class="tag_title">Yields:</p> <ul class="yield"> <li> <span class='type'>(<tt>_self</tt>)</span> </li> </ul> <p class="tag_title">Yield Parameters:</p> <ul class="yieldparam"> <li> <span class='name'>_self</span> <span class='type'>(<tt><span class='object_link'><a href="" title="Selenium::Rake::ServerTask (class)">Selenium::Rake::ServerTask</a></span></tt>)</span> &mdash; <div class='inline'> <p>the object that the method was called on</p> </div> </li> </ul> </div><table class="source_code"> <tr> <td> <pre class="lines"> 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129</pre> </td> <td> <pre class="code"><span class="info file"># File 'rb/lib/selenium/rake/server_task.rb', line 99</span> <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_prefix'>prefix</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>selenium:server</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='ivar'>@jar</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='ivar'>@prefix</span> <span class='op'>=</span> <span class='id identifier rubyid_prefix'>prefix</span> <span class='ivar'>@port</span> <span class='op'>=</span> <span class='int'>4444</span> <span class='ivar'>@timeout</span> <span class='op'>=</span> <span class='int'>30</span> <span class='ivar'>@background</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='ivar'>@log</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='ivar'>@opts</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='ivar'>@version</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>yield</span> <span class='kw'>self</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span> <span class='kw'>if</span> <span class='ivar'>@version</span> <span class='ivar'>@jar</span> <span class='op'>=</span> <span class='const'>Selenium</span><span class='op'>::</span><span class='const'>Server</span><span class='period'>.</span><span class='id identifier rubyid_download'>download</span><span class='lparen'>(</span><span class='ivar'>@version</span><span class='rparen'>)</span> <span class='kw'>end</span> <span class='kw'>unless</span> <span class='ivar'>@jar</span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>MissingJarFileError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>must provide path to the selenium server jar</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>end</span> <span class='ivar'>@server</span> <span class='op'>=</span> <span class='const'>Selenium</span><span class='op'>::</span><span class='const'>Server</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@jar</span><span class='comma'>,</span> <span class='symbol'>:port</span> <span class='op'>=&gt;</span> <span class='ivar'>@port</span><span class='comma'>,</span> <span class='symbol'>:timeout</span> <span class='op'>=&gt;</span> <span class='ivar'>@timeout</span><span class='comma'>,</span> <span class='symbol'>:background</span> <span class='op'>=&gt;</span> <span class='ivar'>@background</span><span class='comma'>,</span> <span class='symbol'>:log</span> <span class='op'>=&gt;</span> <span class='ivar'>@log</span> <span class='rparen'>)</span> <span class='ivar'>@server</span> <span class='op'>&lt;&lt;</span> <span class='ivar'>@opts</span> <span class='id identifier <API key>'>define_start_task</span> <span class='id identifier <API key>'>define_stop_task</span> <span class='id identifier <API key>'>define_restart_task</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> <div id="<API key>" class="attr_details"> <h2>Instance Attribute Details</h2> <span id="background=-instance_method"></span> <div class="method_details first"> <h3 class="signature first" id="<API key>"> - (<tt>Object</tt>) <strong>background</strong> <span class="aliases">Also known as: <span class="names"><span id='background?-instance_method'>background?</span></span> </span> </h3><div class="docstring"> <div class="discussion"> <p>Whether we should detach from the server process. Default: true</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 72 73 74</pre> </td> <td> <pre class="code"><span class="info file"># File 'rb/lib/selenium/rake/server_task.rb', line 72</span> <span class='kw'>def</span> <span class='id identifier rubyid_background'>background</span> <span class='ivar'>@background</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <span id="jar=-instance_method"></span> <div class="method_details "> <h3 class="signature " id="jar-instance_method"> - (<tt>Object</tt>) <strong>jar</strong> </h3><div class="docstring"> <div class="discussion"> <p>Path to the selenium server jar</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 50 51 52</pre> </td> <td> <pre class="code"><span class="info file"># File 'rb/lib/selenium/rake/server_task.rb', line 50</span> <span class='kw'>def</span> <span class='id identifier rubyid_jar'>jar</span> <span class='ivar'>@jar</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <span id="log=-instance_method"></span> <div class="method_details "> <h3 class="signature " id="log-instance_method"> - (<tt>Object</tt>) <strong>log</strong> </h3><div class="docstring"> <div class="discussion"> <p>Configure logging. Pass a log file path or a boolean. Default: true</p> <p>true - log to stdout/stderr false - no logging String - log to the specified file</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 84 85 86</pre> </td> <td> <pre class="code"><span class="info file"># File 'rb/lib/selenium/rake/server_task.rb', line 84</span> <span class='kw'>def</span> <span class='id identifier rubyid_log'>log</span> <span class='ivar'>@log</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <span id="opts=-instance_method"></span> <div class="method_details "> <h3 class="signature " id="<API key>"> - (<tt>Object</tt>) <strong>opts</strong> </h3><div class="docstring"> <div class="discussion"> <p>Add additional options passed to the server jar.</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 90 91 92</pre> </td> <td> <pre class="code"><span class="info file"># File 'rb/lib/selenium/rake/server_task.rb', line 90</span> <span class='kw'>def</span> <span class='id identifier rubyid_opts'>opts</span> <span class='ivar'>@opts</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <span id="port=-instance_method"></span> <div class="method_details "> <h3 class="signature " id="<API key>"> - (<tt>Object</tt>) <strong>port</strong> </h3><div class="docstring"> <div class="discussion"> <p>Port to use for the server. Default: 4444</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 58 59 60</pre> </td> <td> <pre class="code"><span class="info file"># File 'rb/lib/selenium/rake/server_task.rb', line 58</span> <span class='kw'>def</span> <span class='id identifier rubyid_port'>port</span> <span class='ivar'>@port</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <span id="timeout=-instance_method"></span> <div class="method_details "> <h3 class="signature " id="<API key>"> - (<tt>Object</tt>) <strong>timeout</strong> </h3><div class="docstring"> <div class="discussion"> <p>Timeout in seconds for the server to start/stop. Default: 30</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 65 66 67</pre> </td> <td> <pre class="code"><span class="info file"># File 'rb/lib/selenium/rake/server_task.rb', line 65</span> <span class='kw'>def</span> <span class='id identifier rubyid_timeout'>timeout</span> <span class='ivar'>@timeout</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> <span id="version=-instance_method"></span> <div class="method_details "> <h3 class="signature " id="<API key>"> - (<tt>Object</tt>) <strong>version</strong> </h3><div class="docstring"> <div class="discussion"> <p>Specify the version of the server jar to download</p> </div> </div> <div class="tags"> </div><table class="source_code"> <tr> <td> <pre class="lines"> 96 97 98</pre> </td> <td> <pre class="code"><span class="info file"># File 'rb/lib/selenium/rake/server_task.rb', line 96</span> <span class='kw'>def</span> <span class='id identifier rubyid_version'>version</span> <span class='ivar'>@version</span> <span class='kw'>end</span></pre> </td> </tr> </table> </div> </div> </div> <div id="footer"> Generated on Mon Jan 21 19:22:44 2013 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> 0.8.3 (ruby-1.9.3). </div> </body> </html>
package pl.mobilization.conference2015.sponsor; import android.content.Context; import android.content.Intent; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import java.util.ArrayList; import java.util.List; import de.greenrobot.event.EventBus; import lombok.extern.slf4j.Slf4j; import pl.mobilization.conference2015.sponsor.events.OnSponsorClickEvent; import pl.mobilization.conference2015.sponsor.events.SponsorUpdatedEvent; import pl.mobilization.conference2015.sponsor.repository.SponsorRepoModel; import pl.mobilization.conference2015.sponsor.repository.SponsorRepository; import pl.mobilization.conference2015.sponsor.rest.SponsorRestService; import pl.mobilization.conference2015.sponsor.rest.<API key>; import pl.mobilization.conference2015.sponsor.view.SponsorsView; import pl.mobilization.conference2015.sponsor.view.<API key>; import rx.Observable; import static org.fest.assertions.api.Assertions.assertThat; import static org.mockito.Mockito.*; @Slf4j public class <API key> { @Mock SponsorRestService sponsorRestService; @Mock EventBus eventBus; @Mock SponsorsView view; @Mock SponsorRepository sponsorRepository; @Mock Context context; private SponsorPresenter testedSp; @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); //GIVEN a sponsor presenter.. testedSp = new SponsorPresenter(sponsorRepository, eventBus); List<SponsorRepoModel> l = new ArrayList<>(); when(sponsorRepository.getSponsors()).thenReturn(Observable.<List<SponsorRepoModel>>just(l)); } @After public void tearDown() throws Exception { } @SuppressWarnings("ResourceType") @Test public void testOnBindView() throws Exception { //GIVEN a sponsor presenter verify(eventBus).register(testedSp); //WHEN bind view testedSp.onBindView(context, view); //THEN check if background service is setup verify(context).bindService(any(Intent.class), any(), eq(Context.BIND_AUTO_CREATE)); } @Test public void <API key>() throws Exception { //GIVEN a tested sponsor presenter with binded view testedSp.onBindView(context, view); //WHEN event come OnSponsorClickEvent event = new OnSponsorClickEvent(null); testedSp.onEvent(event); //THEN verify(view).showSponsorDialog(event); } @Test public void <API key>() throws Exception { //GIVEN a tested sponsor presenter with binded view testedSp.onBindView(context, view); //WHEN sponsors list is updated SponsorUpdatedEvent event = new SponsorUpdatedEvent(); testedSp.onEvent(event); //THEN verify(view).updateSponsors(any(<API key>.class)); } }
# encoding: utf-8 u from ._base import IIngestableFolder, Ingestor, <API key> from .interfaces import IPublication from five import grok class IPublicationFolder(IIngestableFolder): u'''Folder containing publications.''' class PublicationIngestor(Ingestor): u'''RDF ingestor for publication.''' grok.context(IPublicationFolder) def <API key>(self): return IPublication class View(<API key>): u'''View for an publication folder''' grok.context(IPublicationFolder)
export interface SimpleAPIConfig { } export interface SimpleAPI { count: number; add(n?: number): void; sub(n?: number): void; }
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.exterior_equipment import <API key> log = logging.getLogger(__name__) class <API key>(unittest.TestCase): def setUp(self): self.fd, self.path = tempfile.mkstemp() def tearDown(self): os.remove(self.path) def <API key>(self): pyidf.validation_level = ValidationLevel.error obj = <API key>() # alpha var_name = "Name" obj.name = var_name # alpha var_fuel_use_type = "Electricity" obj.fuel_use_type = var_fuel_use_type # object-list var_schedule_name = "object-list|Schedule Name" obj.schedule_name = var_schedule_name # real var_design_level = 0.0 obj.design_level = var_design_level # alpha <API key> = "End-Use Subcategory" obj.enduse_subcategory = <API key> idf = IDF() idf.add(obj) idf.save(self.path, check=False) with open(self.path, mode='r') as f: for line in f: log.debug(line.strip()) idf2 = IDF(self.path) self.assertEqual(idf2.<API key>[0].name, var_name) self.assertEqual(idf2.<API key>[0].fuel_use_type, var_fuel_use_type) self.assertEqual(idf2.<API key>[0].schedule_name, var_schedule_name) self.assertAlmostEqual(idf2.<API key>[0].design_level, var_design_level) self.assertEqual(idf2.<API key>[0].enduse_subcategory, <API key>)
<ul> <li ng-repeat="item in $ctrl.items"> {{item.quantity}} of {{item.name}} </li> </ul>
using System; using System.IO; namespace Glass.Mapper.Sc { public class RenderingResult: IDisposable { private readonly TextWriter _writer; private readonly string _firstPart; private readonly string _lastPart; public RenderingResult(TextWriter writer, string firstPart, string lastPart) { _writer = writer; _firstPart = firstPart; _lastPart = lastPart; _writer.Write(_firstPart); } public void Dispose() { _writer.Write(_lastPart); } } }
import {alert} from '../MsgBox.js'; export default class <API key>{ constructor(conditions){ this.conditions=conditions; this.dialog=$(`<div class="modal fade" role="dialog" aria-hidden="true" style="z-index: 11001"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times; </button> <h4 class="modal-title"> ${window.i18n.dialog.editPropCondition.title} </h4> </div> <div class="modal-body"></div> <div class="modal-footer"></div> </div> </div> </div>`); const body=this.dialog.find('.modal-body'),footer=this.dialog.find(".modal-footer"); this.init(body,footer); } init(body,footer){ const _this=this; this.joinGroup=$(`<div class="form-group"><label>${window.i18n.dialog.editPropCondition.relation}</label></div>`); this.joinSelect=$(`<select class="form-control" style="display: inline-block;width:430px;"> <option value="and">${window.i18n.dialog.editPropCondition.and}</option> <option value="or">${window.i18n.dialog.editPropCondition.or}</option> </select>`); this.joinGroup.append(this.joinSelect); body.append(this.joinGroup); const leftGroup=$(`<div class="form-group"><label>${window.i18n.dialog.editPropCondition.leftValue}</label></div>`); this.leftTypeSelect=$(`<select class="form-control" style="display: inline-block;width: inherit"> <option value="current">${window.i18n.dialog.editPropCondition.currentValue}</option> <option value="property">${window.i18n.dialog.editPropCondition.property}</option> <option value="expression">${window.i18n.dialog.editPropCondition.expression}</option> </select>`); leftGroup.append(this.leftTypeSelect); this.propertyGroup=$(`<span style="margin-left: 10px"><label>${window.i18n.dialog.editPropCondition.propName}</label></span>`); this.propertySelect=$(`<select class="form-control" style="display: inline-block;width:320px;"></select>`); this.propertyGroup.append(this.propertySelect); leftGroup.append(this.propertyGroup); body.append(leftGroup); this.exprGroup=$(`<span style="margin-left: 10px"><label>${window.i18n.dialog.editPropCondition.expr}</label></span>`); this.exprEditor=$(`<input type="text" style="display: inline-block;width:320px;" class="form-control">`); this.exprGroup.append(this.exprEditor); leftGroup.append(this.exprGroup); this.exprEditor.change(function(){ const val=$(this).val(); const url=window._server+'/designer/<API key>'; $.ajax({ url, type:'POST', data:{content:val}, success:function(errors){ if(errors.length>0){ alert(`${val} ${window.i18n.dialog.editPropCondition.syntaxError}`); } } }); }); this.leftTypeSelect.change(function(){ const val=$(this).val(); if(val==='current'){ _this.exprGroup.hide(); _this.propertyGroup.hide(); }else if(val==='property'){ _this.exprGroup.hide(); _this.propertyGroup.show(); }else{ _this.propertyGroup.hide(); _this.exprGroup.show(); } }); const operatorGroup=$(`<div class="form-group"><label>${window.i18n.dialog.editPropCondition.operator}</label></div>`); this.operatorSelect=$(`<select class="form-control" style="display: inline-block;width:490px;"> <option value=">">${window.i18n.dialog.editPropCondition.greater}</option> <option value=">=">${window.i18n.dialog.editPropCondition.greaterEquals}</option> <option value="<">${window.i18n.dialog.editPropCondition.less}</option> <option value="<=">${window.i18n.dialog.editPropCondition.lessEquals}</option> <option value="==">${window.i18n.dialog.editPropCondition.equals}</option> <option value="!=">${window.i18n.dialog.editPropCondition.notEquals}</option> <option value="in">${window.i18n.dialog.editPropCondition.in}</option> <option value="like">${window.i18n.dialog.editPropCondition.like}</option> </select>`); operatorGroup.append(this.operatorSelect); body.append(operatorGroup); const valueGroup=$(`<div class="form-group"><label>${window.i18n.dialog.editPropCondition.valueExpr}</label></div>`); this.valueEditor=$(`<input type="text" class="form-control" style="display: inline-block;width:477px;">`); valueGroup.append(this.valueEditor); body.append(valueGroup); this.valueEditor.change(function(){ const val=$(this).val(); const url=window._server+'/designer/<API key>'; $.ajax({ url, type:'POST', data:{content:val}, success:function(errors){ if(errors.length>0){ alert(`${val} ${window.i18n.dialog.editPropCondition.syntaxError}`); } } }); }); const button=$(`<button class="btn btn-default">${window.i18n.dialog.editPropCondition.ok}</button>`); button.click(function(){ let property=_this.propertySelect.val(),op=_this.operatorSelect.val(),value=_this.valueEditor.val(),join=_this.joinSelect.val(),type=_this.leftTypeSelect.val(),expr=_this.exprEditor.val(); if (type === 'property') { if (property === '') { alert(`${window.i18n.dialog.editPropCondition.selectProp}`); return; } } else if(type==='expression') { if(expr===''){ alert(`${window.i18n.dialog.editPropCondition.leftValueExpr}`); return; } property=expr; }else{ property = null; } if(type==='current'){ type="property"; } if (op === '') { alert(`${window.i18n.dialog.editPropCondition.selectOperator}`); return; } if (value === '') { alert(`${window.i18n.dialog.editPropCondition.inputExpr}`); return; } if (_this.condition) { if (_this.condition.join) { _this.callback.call(_this,type, property, op, value, join); } else { _this.callback.call(_this,type, property, op, value); } } else if (_this.conditions.length > 0) { _this.callback.call(_this,type, property, op, value, join); } else { _this.callback.call(_this,type, property, op, value); } _this.dialog.modal('hide'); }); footer.append(button); } show(callback,fields,condition){ this.callback=callback; this.condition=condition; this.type='current'; if(condition){ this.type=condition.type; if(condition.join){ this.joinGroup.show(); }else{ this.joinGroup.hide(); } }else{ if(this.conditions.length>0){ this.joinGroup.show(); }else{ this.joinGroup.hide(); } } this.propertySelect.empty(); for(let field of fields){ this.propertySelect.append(`<option>${field.name}</option>`); } if(condition){ if(this.type==='expression'){ this.leftTypeSelect.val("expression"); this.exprEditor.val(condition.left); this.propertyGroup.hide(); this.exprGroup.show(); }else{ if(condition.left && condition.left!==''){ this.propertySelect.val(condition.left); this.leftTypeSelect.val("property"); this.propertyGroup.show(); }else{ this.leftTypeSelect.val("current"); this.propertyGroup.hide(); } this.exprGroup.hide(); } this.operatorSelect.val(condition.operation || condition.op); this.valueEditor.val(condition.right); this.joinSelect.val(condition.join); }else{ this.leftTypeSelect.val("current"); this.propertyGroup.hide(); this.exprGroup.hide(); } this.dialog.modal('show'); } }
from collections import defaultdict import codecs def count(corpus, output_file): debug = False dic = defaultdict(int) other = set() fout = codecs.open(output_file, 'w', 'utf8') for line in open(corpus, 'r'): words = line.split() for word in words: if len(word) % 3 == 0: for i in xrange(len(word) / 3): dic[word[i:i+3]] += 1 else: other.add(word) fout.write('%i %i\n' % (len(dic), len(other))) record_list = [(y, x) for x, y in dic.items()] record_list.sort() record_list.reverse() i = 0 for x, y in record_list: #print y.decode('utf8'), x try: yy = y.decode('GBK') except: print y yy = 'N/A' fout.write('%s %i\n' % (yy, x)) i += 1 if i > 10 and debug: break other_list = list(other) other_list.sort() for item in other_list: #print item.decode('utf8') item2 = item.decode('utf8') fout.write(item2) fout.write('\n') i += 1 if i > 20 and debug: break fout.close() if __name__ =='__main__': count('data/train.zh_parsed', 'output/count.zh') count('data/train.ja_parsed', 'output/count.ja')
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_102) on Wed Nov 02 19:53:02 IST 2016 --> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>org.apache.solr.update.processor Class Hierarchy (Solr 6.3.0 API)</title> <meta name="date" content="2016-11-02"> <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="org.apache.solr.update.processor Class Hierarchy (Solr 6.3.0 API)"; } } 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</li> <li>Use</li> <li class="navBarCell1Rev">Tree</li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../org/apache/solr/update/package-tree.html">Prev</a></li> <li><a href="../../../../../org/apache/solr/util/package-tree.html">Next</a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/solr/update/processor/package-tree.html" target="_top">Frames</a></li> <li><a href="package-tree.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 class="title">Hierarchy For Package org.apache.solr.update.processor</h1> <span class="<API key>">Package Hierarchies:</span> <ul class="horizontal"> <li><a href="../../../../../overview-tree.html">All Packages</a></li> </ul> </div> <div class="contentContainer"> <h2 title="Class Hierarchy">Class Hierarchy</h2> <ul> <li type="circle">java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a> <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key>.<API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.SelectorParams.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key>.SelectorParams</span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/Signature.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink">Signature</span></a> <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/Lookup3Signature.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink">Lookup3Signature</span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/MD5Signature.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink">MD5Signature</span></a> <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> </ul> </li> </ul> </li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.Resolved.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key>.Resolved</span></a></li> <li type="circle">java.lang.<a href="https: <ul> <li type="circle">java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Exception</span></a> <ul> <li type="circle">java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/RuntimeException.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">RuntimeException</span></a> <ul> <li type="circle">org.apache.solr.common.<a href="../../../../../../solr-solrj/org/apache/solr/common/SolrException.html?is-external=true" title="class or interface in org.apache.solr.common"><span class="typeNameLink">SolrException</span></a> <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key>.<API key></span></a></li> </ul> </li> </ul> </li> </ul> </li> </ul> </li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/CdcrUpdateProcessor.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink">CdcrUpdateProcessor</span></a></li> </ul> </li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> </ul> </li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> </ul> </li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> (implements org.apache.solr.util.plugin.<a href="../../../../../org/apache/solr/util/plugin/<API key>.html" title="interface in org.apache.solr.util.plugin"><API key></a>)</li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.ProcessorInfo.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key>.ProcessorInfo</span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> (implements org.apache.solr.util.plugin.<a href="../../../../../org/apache/solr/util/plugin/<API key>.html" title="interface in org.apache.solr.util.plugin"><API key></a>) <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> </ul> </li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> (implements org.apache.solr.util.plugin.<a href="../../../../../org/apache/solr/util/plugin/SolrCoreAware.html" title="interface in org.apache.solr.util.plugin">SolrCoreAware</a>)</li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> (implements org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="interface in org.apache.solr.update.processor"><API key></a>)</li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> (implements org.apache.solr.util.plugin.<a href="../../../../../org/apache/solr/util/plugin/SolrCoreAware.html" title="interface in org.apache.solr.util.plugin">SolrCoreAware</a>)</li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> (implements org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="interface in org.apache.solr.update.processor"><API key></a>)</li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> (implements org.apache.solr.util.plugin.<a href="../../../../../org/apache/solr/util/plugin/SolrCoreAware.html" title="interface in org.apache.solr.util.plugin">SolrCoreAware</a>, org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.RunAlways.html" title="interface in org.apache.solr.update.processor"><API key>.RunAlways</a>)</li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> (implements org.apache.solr.util.plugin.<a href="../../../../../org/apache/solr/util/plugin/SolrCoreAware.html" title="interface in org.apache.solr.util.plugin">SolrCoreAware</a>)</li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> (implements org.apache.solr.util.plugin.<a href="../../../../../org/apache/solr/util/plugin/SolrCoreAware.html" title="interface in org.apache.solr.util.plugin">SolrCoreAware</a>) <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> </ul> </li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> </ul> </li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> </ul> </li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> (implements org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.RunAlways.html" title="interface in org.apache.solr.update.processor"><API key>.RunAlways</a>)</li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> (implements org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="interface in org.apache.solr.update.processor"><API key></a>)</li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> (implements org.apache.solr.util.plugin.<a href="../../../../../org/apache/solr/util/plugin/SolrCoreAware.html" title="interface in org.apache.solr.util.plugin">SolrCoreAware</a>)</li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> </ul> </li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> (implements org.apache.solr.util.plugin.<a href="../../../../../org/apache/solr/util/plugin/SolrCoreAware.html" title="interface in org.apache.solr.util.plugin">SolrCoreAware</a>)</li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a> (implements org.apache.solr.util.plugin.<a href="../../../../../org/apache/solr/util/plugin/SolrCoreAware.html" title="interface in org.apache.solr.util.plugin">SolrCoreAware</a>, org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.RunAlways.html" title="interface in org.apache.solr.update.processor"><API key>.RunAlways</a>)</li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="class in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> </ul> </li> </ul> </li> </ul> <h2 title="Interface Hierarchy">Interface Hierarchy</h2> <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="interface in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.FieldNameSelector.html" title="interface in org.apache.solr.update.processor"><span class="typeNameLink"><API key>.FieldNameSelector</span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.html" title="interface in org.apache.solr.update.processor"><span class="typeNameLink"><API key></span></a></li> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.RunAlways.html" title="interface in org.apache.solr.update.processor"><span class="typeNameLink"><API key>.RunAlways</span></a></li> </ul> <h2 title="Enum Hierarchy">Enum Hierarchy</h2> <ul> <li type="circle">java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Object</span></a> <ul> <li type="circle">java.lang.<a href="https: <ul> <li type="circle">org.apache.solr.update.processor.<a href="../../../../../org/apache/solr/update/processor/<API key>.DistribPhase.html" title="enum in org.apache.solr.update.processor"><span class="typeNameLink"><API key>.DistribPhase</span></a></li> </ul> </li> </ul> </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><a href="package-summary.html">Package</a></li> <li>Class</li> <li>Use</li> <li class="navBarCell1Rev">Tree</li> <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../org/apache/solr/update/package-tree.html">Prev</a></li> <li><a href="../../../../../org/apache/solr/util/package-tree.html">Next</a></li> </ul> <ul class="navList"> <li><a href="../../../../../index.html?org/apache/solr/update/processor/package-tree.html" target="_top">Frames</a></li> <li><a href="package-tree.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> <p class="legalCopy"><small> <i>Copyright &copy; 2000-2016 Apache Software Foundation. All Rights Reserved.</i> <script src='../../../../../prettify.js' type='text/javascript'></script> <script type='text/javascript'> (function(){ var oldonload = window.onload; if (typeof oldonload != 'function') { window.onload = prettyPrint; } else { window.onload = function() { oldonload(); prettyPrint(); } } })(); </script> </small></p> </body> </html>
package wei_chih.service.handler.wei_chih; import java.io.DataInputStream; import java.io.DataOutputStream; import java.io.File; import java.io.IOException; import java.net.Socket; import java.security.KeyPair; import java.security.PublicKey; import java.security.SignatureException; import java.util.concurrent.locks.ReentrantLock; import java.util.logging.Level; import java.util.logging.Logger; import message.Operation; import message.OperationType; import service.Key; import service.KeyManager; import service.handler.ConnectionHandler; import wei_chih.service.Config; import wei_chih.service.SocketServer; import wei_chih.utility.MerkleTree; import wei_chih.utility.Utils; import wei_chih.message.wei_chih.Request; import wei_chih.message.wei_chih.Acknowledgement; /** * * @author Chienweichih */ public class WeiChihHandler extends ConnectionHandler { private static final ReentrantLock LOCK; private static final MerkleTree[] merkleTree; private static final String[] digestBeforeUpdate; private static final Operation[] lastOP; private static final Integer[] sequenceNumbers; static { merkleTree = new MerkleTree[Config.SERVICE_NUM]; digestBeforeUpdate = new String[Config.SERVICE_NUM]; lastOP = new Operation[Config.SERVICE_NUM]; sequenceNumbers = new Integer[Config.SERVICE_NUM]; for (int i = 0; i < Config.SERVICE_NUM; ++i) { merkleTree[i] = new MerkleTree(new File(SocketServer.dataDirPath)); digestBeforeUpdate[i] = ""; lastOP[i] = new Operation(OperationType.DOWNLOAD, "", merkleTree[i].getRootHash()); sequenceNumbers[i] = 0; } LOCK = new ReentrantLock(); } public WeiChihHandler(Socket socket, KeyPair keyPair) { super(socket, keyPair); } @Override protected void handle(DataOutputStream out, DataInputStream in) { PublicKey clientPubKey = KeyManager.getInstance().getPublicKey(Key.CLIENT); int portIndex = 0; if (Math.abs(socket.getPort() - Config.SERVICE_PORT[0]) < 10) { portIndex = socket.getPort() - Config.SERVICE_PORT[0]; } else if (Math.abs(socket.getLocalPort() - Config.SERVICE_PORT[0]) < 10) { portIndex = socket.getLocalPort() - Config.SERVICE_PORT[0]; } try { Request req = Request.parse(Utils.receive(in)); LOCK.lock(); if (!req.validate(clientPubKey)) { throw new SignatureException("REQ validation failure"); } Operation op = req.getOperation(); switch (op.getType()) { case UPLOAD: digestBeforeUpdate[portIndex] = merkleTree[portIndex].getDigest(op.getPath()); merkleTree[portIndex].update(op.getPath(), op.getMessage()); case DOWNLOAD: // both upload and download, so no break if (0 != op.getClientID().compareTo(String.valueOf(sequenceNumbers[portIndex]))) { throw new java.security.<API key>(); } sequenceNumbers[portIndex]++; default: } File file = new File(SocketServer.dataDirPath + op.getPath()); String rootHash = merkleTree[portIndex].getRootHash(); String fileHash = null; if (file.exists()) { fileHash = Utils.digest(file, Config.DIGEST_ALGORITHM); } Acknowledgement ack = new Acknowledgement(rootHash, fileHash, req); ack.sign(keyPair); Utils.send(out, ack.toString()); switch (op.getType()) { case DOWNLOAD: lastOP[portIndex] = op; if (portIndex + Config.SERVICE_PORT[0] == Config.SERVICE_PORT[0]) { Utils.send(out, file); } break; case UPLOAD: lastOP[portIndex] = op; if (portIndex + Config.SERVICE_PORT[0] == Config.SERVICE_PORT[0]) { file = new File(Config.DOWNLOADS_DIR_PATH + op.getPath()); Utils.receive(in, file); String digest = Utils.digest(file, Config.DIGEST_ALGORITHM); if (0 != op.getMessage().compareTo(digest)) { throw new java.io.IOException(); } } break; case AUDIT: file = new File(Config.<API key> + "/service-provider/voting"); switch (lastOP[portIndex].getType()) { case DOWNLOAD: Utils.write(file, rootHash); break; case UPLOAD: MerkleTree prevMerkleTree = new MerkleTree(merkleTree[portIndex]); prevMerkleTree.update(lastOP[portIndex].getPath(), digestBeforeUpdate[portIndex]); Utils.Serialize(file, prevMerkleTree); break; default: throw new java.lang.Error(); } Utils.send(out, file); break; default: } socket.close(); } catch (IOException | SignatureException ex) { Logger.getLogger(WeiChihHandler.class.getName()).log(Level.SEVERE, null, ex); } finally { if (LOCK != null) { LOCK.unlock(); } } } }
/ [/lib/initial-buildOutput.txt] /lib/tsc --b /src/core --verbose 12:01:00 AM - Projects in this build: * src/core/tsconfig.json 12:01:00 AM - Project 'src/core/tsconfig.json' is out of date because output file 'src/core/anotherModule.js' does not exist 12:01:00 AM - Building project '/src/core/tsconfig.json'... exitCode:: ExitStatus.Success / [/src/core/anotherModule.js] "use strict"; exports.__esModule = true; exports.World = "hello"; / [/src/core/index.js] "use strict"; exports.__esModule = true; exports.someString = "HELLO WORLD"; function leftPad(s, n) { return s + n; } exports.leftPad = leftPad; function multiply(a, b) { return a * b; } exports.multiply = multiply; / [/src/core/tsconfig.json] { "compilerOptions": { "incremental": true, "module": "commonjs" } } / [/src/core/tsconfig.tsbuildinfo] { "program": { "fileInfos": { "../../lib/lib.d.ts": { "version": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };", "signature": "3858781397-/// <reference no-default-lib=\"true\"/>\ninterface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };" }, "./anothermodule.ts": { "version": "-2676574883-export const World = \"hello\";\r\n", "signature": "-8396256275-export declare const World = \"hello\";\r\n" }, "./index.ts": { "version": "-18749805970-export const someString: string = \"HELLO WORLD\";\r\nexport function leftPad(s: string, n: number) { return s + n; }\r\nexport function multiply(a: number, b: number) { return a * b; }\r\n", "signature": "1874987148-export declare const someString: string;\r\nexport declare function leftPad(s: string, n: number): string;\r\nexport declare function multiply(a: number, b: number): number;\r\n" }, "./some_decl.d.ts": { "version": "-9253692965-declare const dts: any;\r\n", "signature": "-9253692965-declare const dts: any;\r\n" } }, "options": { "incremental": true, "module": 1, "configFilePath": "./tsconfig.json" }, "referencedMap": {}, "exportedModulesMap": {}, "<API key>": [ "../../lib/lib.d.ts", "./anothermodule.ts", "./index.ts", "./some_decl.d.ts" ] }, "version": "FakeTSVersion" }
# <API key>: true require_relative "ruby/version" module XTF module Ruby class Error < StandardError; end # placeholder end end
-- MySQL dump 10.13 Distrib 5.5.37, for debian-linux-gnu (x86_64) -- Host: localhost Database: AirAlliance -- Server version 5.5.37-0ubuntu0.12.04.1 /*!40101 SET @<API key>=@@<API key> */; /*!40101 SET @<API key>=@@<API key> */; /*!40101 SET @<API key>=@@<API key> */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @<API key>=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='<API key>' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- Table structure for table `flight` DROP TABLE IF EXISTS `flight`; /*!40101 SET @saved_cs_client = @@<API key> */; /*!40101 SET <API key> = utf8 */; CREATE TABLE `flight` ( `id` int(11) NOT NULL, `name` varchar(10) NOT NULL, `source_sector_id` int(11) NOT NULL, `dest_sector_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `<API key>` (`source_sector_id`), KEY `<API key>` (`dest_sector_id`), CONSTRAINT `<API key>` FOREIGN KEY (`dest_sector_id`) REFERENCES `sector` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `<API key>` FOREIGN KEY (`source_sector_id`) REFERENCES `sector` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB DEFAULT CHARSET=latin1; /*!40101 SET <API key> = @saved_cs_client */; -- Dumping data for table `flight` LOCK TABLES `flight` WRITE; /*!40000 ALTER TABLE `flight` DISABLE KEYS */; INSERT INTO `flight` VALUES (1,'AA056',1,3),(2,'AA032',5,6),(3,'AA087',20,4),(4,'AA003',19,17),(5,'AA004',10,13),(6,'AA045',2,5),(7,'AA033',8,11),(8,'AA089',12,9),(9,'AA099',7,16),(10,'AA098',15,14); /*!40000 ALTER TABLE `flight` ENABLE KEYS */; UNLOCK TABLES; -- Table structure for table `guest` DROP TABLE IF EXISTS `guest`; /*!40101 SET @saved_cs_client = @@<API key> */; /*!40101 SET <API key> = utf8 */; CREATE TABLE `guest` ( `id` int(10) NOT NULL AUTO_INCREMENT, `firstname` varchar(20) NOT NULL, `lastname` varchar(20) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1; /*!40101 SET <API key> = @saved_cs_client */; -- Dumping data for table `guest` LOCK TABLES `guest` WRITE; /*!40000 ALTER TABLE `guest` DISABLE KEYS */; INSERT INTO `guest` VALUES (1,'Frank','Jennings'),(2,'Florence','Justina'),(3,'Randy','Pauch'),(4,'Dorris','Lessing'),(5,'Orhan','Pamuk'),(6,'Harold','Pinter'),(7,'Toni','Morrison'),(8,'Dario','Fo'),(9,'Ivan','Bunin'),(10,'Henri','Bergson'); /*!40000 ALTER TABLE `guest` ENABLE KEYS */; UNLOCK TABLES; -- Table structure for table `itinerary` DROP TABLE IF EXISTS `itinerary`; /*!40101 SET @saved_cs_client = @@<API key> */; /*!40101 SET <API key> = utf8 */; CREATE TABLE `itinerary` ( `id` int(11) NOT NULL AUTO_INCREMENT, `guest_id` int(11) NOT NULL, `flight_id` int(11) NOT NULL, `schedule_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `fk_itinerary_guest` (`guest_id`), KEY `fk_itinerary_flight` (`flight_id`), KEY `<API key>` (`schedule_id`), CONSTRAINT `<API key>` FOREIGN KEY (`schedule_id`) REFERENCES `schedule` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_itinerary_flight` FOREIGN KEY (`flight_id`) REFERENCES `flight` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_itinerary_guest` FOREIGN KEY (`guest_id`) REFERENCES `guest` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1; /*!40101 SET <API key> = @saved_cs_client */; -- Dumping data for table `itinerary` LOCK TABLES `itinerary` WRITE; /*!40000 ALTER TABLE `itinerary` DISABLE KEYS */; INSERT INTO `itinerary` VALUES (1,4,6,5),(2,1,10,9),(3,6,1,1),(4,9,8,7),(5,3,3,3),(6,2,4,8),(7,7,7,4),(8,5,9,6),(9,10,5,2),(10,8,2,10); /*!40000 ALTER TABLE `itinerary` ENABLE KEYS */; UNLOCK TABLES; -- Table structure for table `schedule` DROP TABLE IF EXISTS `schedule`; /*!40101 SET @saved_cs_client = @@<API key> */; /*!40101 SET <API key> = utf8 */; CREATE TABLE `schedule` ( `id` int(11) NOT NULL AUTO_INCREMENT, `guest_id` int(11) NOT NULL, `flight_id` int(11) NOT NULL, `schedule_date` date NOT NULL, PRIMARY KEY (`id`), KEY `fk_schedule_guest` (`guest_id`), KEY `fk_schedule_flight` (`flight_id`), CONSTRAINT `fk_schedule_flight` FOREIGN KEY (`flight_id`) REFERENCES `flight` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION, CONSTRAINT `fk_schedule_guest` FOREIGN KEY (`guest_id`) REFERENCES `guest` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1; /*!40101 SET <API key> = @saved_cs_client */; -- Dumping data for table `schedule` LOCK TABLES `schedule` WRITE; /*!40000 ALTER TABLE `schedule` DISABLE KEYS */; INSERT INTO `schedule` VALUES (1,4,4,'2008-11-01'),(2,6,1,'2008-11-04'),(3,2,10,'2008-10-04'),(4,3,9,'2008-10-21'),(5,5,8,'2008-10-20'),(6,1,7,'2008-10-03'),(7,8,6,'2008-10-04'),(8,9,3,'2008-10-07'),(9,7,2,'2008-10-15'),(10,10,5,'2008-10-17'); /*!40000 ALTER TABLE `schedule` ENABLE KEYS */; UNLOCK TABLES; -- Table structure for table `sector` DROP TABLE IF EXISTS `sector`; /*!40101 SET @saved_cs_client = @@<API key> */; /*!40101 SET <API key> = utf8 */; CREATE TABLE `sector` ( `id` int(11) NOT NULL AUTO_INCREMENT, `sector` varchar(10) NOT NULL, PRIMARY KEY (`id`), KEY `sector` (`sector`) ) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=latin1; /*!40101 SET <API key> = @saved_cs_client */; -- Dumping data for table `sector` LOCK TABLES `sector` WRITE; /*!40000 ALTER TABLE `sector` DISABLE KEYS */; INSERT INTO `sector` VALUES (15,'ANG'),(1,'BLR'),(3,'BOM'),(9,'CAL'),(20,'CAL'),(10,'CHI'),(19,'DEL'),(4,'FRA'),(17,'JAV'),(14,'LON'),(11,'MAL'),(2,'MAS'),(5,'PEK'),(7,'SCA'),(8,'SFO'),(6,'SIN'),(12,'SPB'),(13,'SYD'),(16,'TOK'),(18,'VIS'); /*!40000 ALTER TABLE `sector` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@<API key> */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET <API key>=@<API key> */; /*!40101 SET <API key>=@<API key> */; /*!40101 SET <API key>=@<API key> */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed on 2014-05-15 1:13:28
package ru.stqa.pft.addressbook.tests; import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert; import org.testng.annotations.Test; import ru.stqa.pft.addressbook.model.ContactData; import ru.stqa.pft.addressbook.tests.TestBase; import java.util.Arrays; import java.util.stream.Collectors; import static org.hamcrest.CoreMatchers.equalTo; import static org.hamcrest.MatcherAssert.assertThat; public class ContactPhone extends TestBase { @Test public void testContactPhones(){ app.goTo().homePage(); ContactData contact = app.contactHelper().all().iterator().next(); ContactData <API key> = app.contactHelper().infoFromEditForm(contact); assertThat(contact.getAllPhones(), equalTo(mergePhones(<API key>))); } private <T> String mergePhones(ContactData contact) { return Arrays.asList(contact.getHomePhone(), contact.getMobilePhone(),contact.getWorkPhone()).stream(). filter((s) -> ! s.equals("")).map(ContactPhone::cleaned) .collect(Collectors.joining("\n")); } public static String cleaned(String phone){ return phone.replaceAll("\\s", "").replaceAll("[-()]", ""); } }
package com.oauth.services.security; import org.springframework.security.crypto.bcrypt.<API key>; import org.springframework.security.crypto.keygen.BytesKeyGenerator; import org.springframework.security.crypto.keygen.KeyGenerators; import org.springframework.security.crypto.password.<API key>; public class Test { public static void main(String args[]) { BytesKeyGenerator saltGenerator = KeyGenerators.secureRandom(); // <API key> encode = new <API key>("SHA-256", ""); // <API key> encode = new <API key>(""); <API key> encode = new <API key>(); System.out.println("abcfwef..."); //<API key> //<API key> //<API key> System.out.println(encode.encode("abcdef")); // System.out.println(encode.encode("mypass")); String salt = saltGenerator.generateKey().toString(); System.out.println(salt); System.out.println(saltGenerator.getKeyLength()); <API key> bc = new <API key>(); System.out.println(bc.encode("admin")); } }
<?php namespace BartoszBartniczak\EventSourcing\Shop\User\Event; use BartoszBartniczak\EventSourcing\Event\Id; class <API key> extends Event { /** * @var string */ protected $activationToken; /** * @inheritDoc */ public function __construct(Id $eventId, \DateTime $dateTime, string $userEmail, string $activationToken) { parent::__construct($eventId, $dateTime, $userEmail); $this->activationToken = $activationToken; } /** * @return string */ public function getActivationToken(): string { return $this->activationToken; } }
package net.distilledcode.httpclient.impl.metatype.reflection; import org.apache.http.client.config.RequestConfig; import org.junit.Test; import java.util.Map; import static org.hamcrest.CoreMatchers.allOf; import static org.hamcrest.CoreMatchers.hasItem; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; import static org.junit.Assert.assertThat; public class InvokersTest { private static class TestBean { private boolean featureEnabled = true; // getters public String getFooBar() { return null; } public void getFooBarVoid() {} // setters public void setBarFoo(String fooBar) {} public void setBarFooNoArgs() {} // boolean switch (only called for enabling, disabled by default public void enableFeature() { featureEnabled = true; } // boolean switch (only called for disabling, enabled by default void disableFeature() { featureEnabled = false; } } @Test public void invokeMethods() throws Exception { // builder.setMaxRedirects(5) Invokers.Invoker<Void> setMaxRedirects = new Invokers.Invoker<>(RequestConfig.Builder.class.getDeclaredMethod("setMaxRedirects", int.class)); RequestConfig.Builder builder = RequestConfig.custom(); setMaxRedirects.invoke(builder, 17); // requestConfig.getMaxRedirects() Invokers.Invoker<Integer> getMaxRedirects = new Invokers.Invoker<>(RequestConfig.class.getDeclaredMethod("getMaxRedirects")); RequestConfig requestConfig = builder.build(); assertThat(getMaxRedirects.invoke(requestConfig), is(17)); } @Test public void beanGetters() throws Exception { Map<String, Invokers.Invoker<?>> testBeanGetters = Invokers.beanGetters(TestBean.class); assertThat(testBeanGetters.keySet(), allOf( hasItem("foo.bar"), not(hasItem("foo.bar.void")) )); } @Test public void beanSetters() throws Exception { Map<String, Invokers.Invoker<?>> testBeanGetters = Invokers.beanSetters(TestBean.class); assertThat(testBeanGetters.keySet(), allOf( hasItem("bar.foo"), not(hasItem("bar.foo.no.args")) )); } @Test public void conditionalSetter() throws Exception { Invokers.Invoker<?> featureDisabler = Invokers.<API key>(TestBean.class.getDeclaredMethod("disableFeature"), false); TestBean testBean = new TestBean(); assertThat(testBean.featureEnabled, is(true)); featureDisabler.invoke(testBean, false); assertThat(testBean.featureEnabled, is(false)); } @Test public void <API key>() throws Exception { Invokers.Invoker<?> featureDisabler = Invokers.<API key>(TestBean.class.getDeclaredMethod("disableFeature"), true); TestBean testBean = new TestBean(); assertThat(testBean.featureEnabled, is(true)); featureDisabler.invoke(testBean, false); assertThat(testBean.featureEnabled, is(true)); } }
--TEST <API key>: (length protocol) 1 --SKIPIF <?php require __DIR__ . '/../include/skipif.inc'; ?> --FILE <?php require __DIR__ . '/../include/bootstrap.php'; use SwooleTest\LengthServer; class TestServer_5 extends LengthServer { protected $show_lost_package = true; function onWorkerStart() { global $pm; $pm->wakeup(); } function onClose() { parent::onClose(); $this->serv->shutdown(); } } TestServer_5::$random_bytes = true; TestServer_5::$pkg_num = IS_IN_TRAVIS ? 1000 : 10000; $pm = new ProcessManager; $pm->parentFunc = function ($pid) use ($pm) { $client = new swoole_client(SWOOLE_SOCK_TCP); if (!$client->connect('127.0.0.1', $pm->getFreePort())) { exit("connect failed\n"); } $bytes = 0; $pkg_bytes = 0; for ($i = 0; $i < TestServer_5::$pkg_num; $i++) { // if ($i % 1000 == 0) // echo "#{$i} send package. sid={$sid}, length=" . ($len + 10) . ", total bytes={$pkg_bytes}\n"; if (!$client->send(TestServer_5::getPacket())) { echo "send [$i] failed.\n"; break; } $bytes += 2; } $recv = $client->recv(); echo $recv; //echo "send ".TestServer::PKG_NUM." packet sucess, send $bytes bytes\n"; $client->close(); }; $pm->childFunc = function () use ($pm) { go(function () use ($pm) { $serv = new TestServer_5($pm->getFreePort(), false); $serv->start(); }); swoole_event::wait(); }; $pm->childFirst(); $pm->run(); ?> --EXPECTF end Total count=%d, bytes=%d
select ST_Length(ST_Linestring(1,1, 1,2, 2,2, 2,1)), ST_Length(ST_Linestring(1,1, 1,4, 4,4, 4,1)), ST_Length(ST_Linestring(1,1, 1,7, 7,7, 7,1)) from onerow; select ST_Area(ST_Polygon(1,1, 1,2, 2,2, 2,1)), ST_Area(ST_Polygon(1,1, 1,4, 4,4, 4,1)) from onerow; select ST_Contains(ST_Polygon(1, 1, 1, 4, 4, 4, 4, 1), ST_Point(2, 3)), ST_Contains(ST_Polygon(1, 1, 1, 4, 4, 4, 4, 1), ST_Point(8, 8)) from onerow; select ST_CoordDim(ST_Point(0., 3.)), ST_CoordDim(ST_PointZ(0., 3., 1)) from onerow; select ST_Crosses(st_linestring(2,0, 2,3), ST_Polygon(1,1, 1,4, 4,4, 4,1)), ST_Crosses(st_linestring(8,7, 7,8), ST_Polygon(1,1, 1,4, 4,4, 4,1)) from onerow; select ST_Dimension(ST_Point(0,0)), ST_Dimension(ST_LineString(1.5,2.5, 3.0,2.2)) from onerow; select ST_Disjoint(st_point(1,1), ST_Point(1,1)), ST_Disjoint(st_point(2,0), ST_Point(1,1)) from onerow; select ST_EnvIntersects(st_point(1,1), ST_Point(1,1)), ST_EnvIntersects(st_point(2,0), ST_Point(1,1)) from onerow; select ST_Equals(st_point(1,1), ST_Point(1,1)), ST_Equals(st_point(2,0), ST_Point(1,1)) from onerow; select ST_Intersects(st_point(1,1), ST_Point(1,1)), ST_Intersects(st_point(2,0), ST_Point(1,1)) from onerow; select ST_Is3D(ST_Point(0., 3.)), ST_Is3D(ST_PointZ(0., 3., 1)) from onerow; select ST_Overlaps(st_polygon(2,0, 2,3, 3,0), ST_Polygon(1,1, 1,4, 4,4, 4,1)), ST_Overlaps(st_polygon(2,0, 2,1, 3,1), ST_Polygon(1,1, 1,4, 4,4, 4,1)) from onerow; select ST_Touches(ST_Point(1, 3), ST_Polygon(1, 1, 1, 4, 4, 4, 4, 1)), ST_Touches(ST_Point(8, 8), ST_Polygon(1, 1, 1, 4, 4, 4, 4, 1)) from onerow; select ST_Within(ST_Point(2, 3), ST_Polygon(1, 1, 1, 4, 4, 4, 4, 1)), ST_Within(ST_Point(8, 8), ST_Polygon(1, 1, 1, 4, 4, 4, 4, 1)) from onerow;
package com.example.godtemper.db; import java.util.ArrayList; import java.util.List; import com.example.godtemper.model.City; import com.example.godtemper.model.County; import com.example.godtemper.model.Province; import android.R.integer; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; public class GodTemperDB { public static final String DB_NAME = "GodTemper"; public static final int VERSION = 1; private static GodTemperDB godTemperDB; private SQLiteDatabase db; private GodTemperDB(Context context){ GodTemperOpenHelper dbHelper = new GodTemperOpenHelper(context, DB_NAME, null, VERSION); db = dbHelper.getWritableDatabase(); } public synchronized static GodTemperDB getInstance(Context context){ if(godTemperDB == null){ godTemperDB = new GodTemperDB(context); } return godTemperDB; } public void saveProvince(Province province){ if(province != null){ ContentValues values = new ContentValues(); values.put("province_name", province.getProvinceName()); values.put("province_code", province.getProvinceCode()); db.insert("Province", null, values); } } public List<Province>loadProvinces(){ List<Province>list = new ArrayList<Province>(); Cursor cursor = db.query("Province", null, null, null, null, null, null); if(cursor.moveToFirst()){ do{ Province province = new Province(); province.setId(cursor.getInt(cursor.getColumnIndex("id"))); province.setProvinceName(cursor.getString(cursor.getColumnIndex("province_name"))); province.setProvinceCode(cursor.getString(cursor.getColumnIndex("province_code"))); list.add(province); }while(cursor.moveToNext()); } return list; } public void saveCity(City city) { if(city!=null){ ContentValues values = new ContentValues(); values.put("city_name", city.getCityName()); values.put("city_code", city.getCityCode()); values.put("province_id", city.getProvinceId()); db.insert("City", null, values); } } public List<City> loadCities(int provinceId) { List<City>list = new ArrayList<City>(); Cursor cursor = db.query("City", null, "province_id = ?", new String[]{String.valueOf(provinceId)}, null,null,null); if(cursor.moveToFirst()){ do{ City city = new City(); city.setId(cursor.getInt(cursor.getColumnIndex("id"))); city.setCityName(cursor.getString(cursor.getColumnIndex("city_name"))); city.setCityCode(cursor.getString(cursor.getColumnIndex("city_code"))); city.setProvinceId(provinceId); list.add(city); }while(cursor.moveToNext()); } return list; } public void saveCounty(County county){ if(county != null){ ContentValues values = new ContentValues(); values.put("county_name", county.getCountyName()); values.put("county_code", county.getCountyCode()); values.put("city_id", county.getCityId()); db.insert("County", null, values); } } public List<County>loadCounties (int cityId){ List<County>list = new ArrayList<County>(); Cursor cursor = db.query("County", null, "city_id = ?", new String[]{String.valueOf(cityId)}, null, null, null); if(cursor.moveToFirst()){ do{ County county = new County(); county.setId(cursor.getInt(cursor.getColumnIndex("id"))); county.setCountyName(cursor.getString(cursor.getColumnIndex("county_name"))); county.setCountyCode(cursor.getString(cursor.getColumnIndex("county_code"))); county.setCityId(cityId); list.add(county); }while(cursor.moveToNext()); } return list; } }
<?php return array( 'SHOW_PAGE_TRACE' =>false, // Trace // 'SHOW_RUN_TIME'=>true, // // 'SHOW_ADV_TIME'=>true, // // 'SHOW_DB_TIMES'=>true, // // 'SHOW_CACHE_TIMES'=>true, // // 'SHOW_USE_MEM'=>true, // // 'SHOW_LOAD_FILE' =>true, // // 'SHOW_FUN_TIMES'=>true , // 'DB_TYPE' => 'mysql', 'DB_HOST' => '127.0.0.1', 'DB_NAME' => 'ts', 'DB_USER' => 'root', 'DB_PWD' => '123456', 'DB_PORT' => '3306', 'DB_PREFIX' => 'treesys_', 'DB_FIELDTYPE_CHECK' => false, 'DB_FIELDS_CACHE' => true, 'DB_CHARSET' => 'utf8', // utf8 'DB_DEPLOY_TYPE' => 0, // :0 (),1 () 'DB_RW_SEPARATE' => false, 'DB_MASTER_NUM' => 1, 'DB_SQL_BUILD_CACHE' => true, // SQL 'DB_SQL_BUILD_QUEUE' => 'file', // SQL file xcacheapc 'DB_SQL_BUILD_LENGTH' => 20, // SQL 'VAR_PAGE' =>'p', ); ?>
'use strict'; module.exports = function(config) { config.set({ files: [ 'tests/main.js', {pattern: 'app/js*.js', included: false}, {pattern: 'app/bower_components*.js', included: false}, {pattern: 'tests/specs*.js', included: false}, {pattern: 'tests/fixtures*.js', included: false} ], basePath: '../', frameworks: ['jasmine', 'requirejs'], reporters: ['progress'], runnerPort: 9000, singleRun: true, browsers: ['PhantomJS', 'Chrome'], logLevel: 'ERROR' }); };
require 'spec_helper' describe Rtime::Executor do let :executor do Rtime::Executor.new end describe 'execute' do it 'needs arguments to execute' do expect { executor.execute }.to raise_error ArgumentError end it 'times the executed process' do expect(executor.timer).to receive(:time).and_call_original executor.execute 'true' end it 'returns a filled Rtime::Result' do result = executor.execute('true', name: 'the name') expect(result).to be_a Rtime::Result expect(result.start).to be_a Time expect(result.pid).to respond_to :to_int expect(result.duration).to be_a Float expect(result.exitstatus).to eq 0 expect(result.name).to eq 'the name' end end describe 'measure' do it 'needs a name argument to execute' do expect { executor.measure do end }.to raise_error ArgumentError end it 'needs a block to call' do expect { executor.measure('foo') }.to raise_error ArgumentError end it 'measures times of a block' do executed = false result = executor.measure('the name') do executed = true end expect(executed).to eq true expect(result).to be_a Rtime::Result expect(result.start).to be_a Time expect(result.pid).to eq $$ expect(result.duration).to be_a Float expect(result.exitstatus).to eq 0 expect(result.name).to eq 'the name' end end end
package org.axway.grapes.server.webapp.resources; import com.sun.jersey.api.client.ClientResponse; import com.sun.jersey.api.client.GenericType; import com.sun.jersey.api.client.WebResource; import com.yammer.dropwizard.auth.basic.BasicAuthProvider; import com.yammer.dropwizard.testing.ResourceTest; import org.axway.grapes.commons.api.ServerAPI; import org.axway.grapes.server.GrapesTestUtils; import org.axway.grapes.server.config.GrapesServerConfig; import org.axway.grapes.server.core.options.FiltersHolder; import org.axway.grapes.server.db.RepositoryHandler; import org.axway.grapes.server.db.datamodel.DbCredential; import org.axway.grapes.server.db.datamodel.DbSearch; import org.axway.grapes.server.webapp.auth.GrapesAuthenticator; import org.eclipse.jetty.http.HttpStatus; import org.junit.Test; import javax.ws.rs.core.MediaType; import java.util.ArrayList; import java.util.List; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.mockito.Matchers.anyObject; import static org.mockito.Matchers.eq; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; public class <API key> extends ResourceTest { private RepositoryHandler repositoryHandler; @Override protected void setUpResources() throws Exception { repositoryHandler = GrapesTestUtils.getRepoHandlerMock(); final GrapesServerConfig config = mock(GrapesServerConfig.class); final WebSearchResource resource = new WebSearchResource(repositoryHandler, config); addProvider(new BasicAuthProvider<DbCredential>(new GrapesAuthenticator(repositoryHandler), "test auth")); addResource(resource); } @Test public void getSearchResult() throws Exception { List<String> moduleIds = new ArrayList<>(); moduleIds.add("testSearch_id_1"); moduleIds.add("testSearch_id_2"); List<String> artifactIds = new ArrayList<>(); artifactIds.add("<API key>"); artifactIds.add("<API key>"); DbSearch search = new DbSearch(); search.setModules(moduleIds); search.setArtifacts(artifactIds); when(repositoryHandler.getSearchResult(eq("testSearch"), (FiltersHolder) anyObject())).thenReturn(search); final WebResource resource = client().resource("/" + ServerAPI.SEARCH_RESOURCE + "/testSearch"); final ClientResponse response = resource.accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); assertNotNull(response); assertEquals(HttpStatus.OK_200, response.getStatus()); final String results = response.getEntity(new GenericType<String>() { }); assertEquals("{\"modules\":[\"testSearch_id_1\",\"testSearch_id_2\"],\"artifacts\":[\"<API key>\",\"<API key>\"]}", results); } @Test public void getNullSearchResult() { DbSearch search = new DbSearch(); when(repositoryHandler.getSearchResult(eq("testSearch"), (FiltersHolder) anyObject())).thenReturn(search); final WebResource resource = client().resource("/" + ServerAPI.SEARCH_RESOURCE + "/testSearch"); final ClientResponse response = resource.accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); assertNotNull(response); assertEquals(HttpStatus.OK_200, response.getStatus()); final String results = response.getEntity(new GenericType<String>() { }); assertEquals("{\"modules\":null,\"artifacts\":null}", results); } @Test public void <API key>() { DbSearch search = new DbSearch(); List<String> moduleIds = new ArrayList<>(); moduleIds.add("testSearch_id_1"); moduleIds.add("testSearch_id_2"); search.setModules(moduleIds); when(repositoryHandler.getSearchResult(eq("testSearch"), (FiltersHolder) anyObject())).thenReturn(search); final WebResource resource = client().resource("/" + ServerAPI.SEARCH_RESOURCE + "/testSearch"); final ClientResponse response = resource.accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); assertNotNull(response); assertEquals(HttpStatus.OK_200, response.getStatus()); final String results = response.getEntity(new GenericType<String>() { }); assertEquals("{\"modules\":[\"testSearch_id_1\",\"testSearch_id_2\"],\"artifacts\":null}", results); } @Test public void <API key>() { DbSearch search = new DbSearch(); List<String> artifactIds = new ArrayList<>(); artifactIds.add("<API key>"); artifactIds.add("<API key>"); search.setArtifacts(artifactIds); when(repositoryHandler.getSearchResult(eq("testSearch"), (FiltersHolder) anyObject())).thenReturn(search); final WebResource resource = client().resource("/" + ServerAPI.SEARCH_RESOURCE + "/testSearch"); final ClientResponse response = resource.accept(MediaType.APPLICATION_JSON).get(ClientResponse.class); assertNotNull(response); assertEquals(HttpStatus.OK_200, response.getStatus()); final String results = response.getEntity(new GenericType<String>() { }); assertEquals("{\"modules\":null,\"artifacts\":[\"<API key>\",\"<API key>\"]}", results); } }
// Code generated by MockGen. DO NOT EDIT. // Source: github.com/cri-o/cri-o/internal/lib/sandbox (interfaces: NamespaceIface) // Package sandboxmock is a generated GoMock package. package sandboxmock import ( sandbox "github.com/cri-o/cri-o/internal/lib/sandbox" gomock "github.com/golang/mock/gomock" reflect "reflect" ) // MockNamespaceIface is a mock of NamespaceIface interface type MockNamespaceIface struct { ctrl *gomock.Controller recorder *<API key> } // <API key> is the mock recorder for MockNamespaceIface type <API key> struct { mock *MockNamespaceIface } // <API key> creates a new mock instance func <API key>(ctrl *gomock.Controller) *MockNamespaceIface { mock := &MockNamespaceIface{ctrl: ctrl} mock.recorder = &<API key>{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use func (m *MockNamespaceIface) EXPECT() *<API key> { return m.recorder } // Close mocks base method func (m *MockNamespaceIface) Close() error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Close") ret0, _ := ret[0].(error) return ret0 } // Close indicates an expected call of Close func (mr *<API key>) Close() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.<API key>(mr.mock, "Close", reflect.TypeOf((*MockNamespaceIface)(nil).Close)) } // Get mocks base method func (m *MockNamespaceIface) Get() *sandbox.Namespace { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Get") ret0, _ := ret[0].(*sandbox.Namespace) return ret0 } // Get indicates an expected call of Get func (mr *<API key>) Get() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.<API key>(mr.mock, "Get", reflect.TypeOf((*MockNamespaceIface)(nil).Get)) } // Initialize mocks base method func (m *MockNamespaceIface) Initialize() sandbox.NamespaceIface { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Initialize") ret0, _ := ret[0].(sandbox.NamespaceIface) return ret0 } // Initialize indicates an expected call of Initialize func (mr *<API key>) Initialize() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.<API key>(mr.mock, "Initialize", reflect.TypeOf((*MockNamespaceIface)(nil).Initialize)) } // Initialized mocks base method func (m *MockNamespaceIface) Initialized() bool { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Initialized") ret0, _ := ret[0].(bool) return ret0 } // Initialized indicates an expected call of Initialized func (mr *<API key>) Initialized() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.<API key>(mr.mock, "Initialized", reflect.TypeOf((*MockNamespaceIface)(nil).Initialized)) } // Path mocks base method func (m *MockNamespaceIface) Path() string { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Path") ret0, _ := ret[0].(string) return ret0 } // Path indicates an expected call of Path func (mr *<API key>) Path() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.<API key>(mr.mock, "Path", reflect.TypeOf((*MockNamespaceIface)(nil).Path)) } // Remove mocks base method func (m *MockNamespaceIface) Remove() error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Remove") ret0, _ := ret[0].(error) return ret0 } // Remove indicates an expected call of Remove func (mr *<API key>) Remove() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.<API key>(mr.mock, "Remove", reflect.TypeOf((*MockNamespaceIface)(nil).Remove)) } // Type mocks base method func (m *MockNamespaceIface) Type() sandbox.NSType { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Type") ret0, _ := ret[0].(sandbox.NSType) return ret0 } // Type indicates an expected call of Type func (mr *<API key>) Type() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.<API key>(mr.mock, "Type", reflect.TypeOf((*MockNamespaceIface)(nil).Type)) }
package org.tmarciniak.mtp.model; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.SequenceGenerator; import javax.persistence.Table; import org.apache.commons.lang3.builder.ToStringBuilder; /** * @author tomasz.marciniak * * Immutable class representing trade message */ @Entity @Table public final class TradeMessage implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "<API key>") @SequenceGenerator(name = "<API key>", sequenceName = "<API key>", allocationSize = 1) private long id; private String userId; private String currencyFrom; private String currencyTo; private BigDecimal amountBuy; private BigDecimal amountSell; private BigDecimal rate; private Date timePlaced; private String originatingCountry; public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getCurrencyFrom() { return currencyFrom; } public void setCurrencyFrom(String currencyFrom) { this.currencyFrom = currencyFrom; } public String getCurrencyTo() { return currencyTo; } public void setCurrencyTo(String currencyTo) { this.currencyTo = currencyTo; } public BigDecimal getAmountBuy() { return amountBuy; } public void setAmountBuy(BigDecimal amountBuy) { this.amountBuy = amountBuy; } public BigDecimal getAmountSell() { return amountSell; } public void setAmountSell(BigDecimal amountSell) { this.amountSell = amountSell; } public BigDecimal getRate() { return rate; } public void setRate(BigDecimal rate) { this.rate = rate; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((amountBuy == null) ? 0 : amountBuy.hashCode()); result = prime * result + ((amountSell == null) ? 0 : amountSell.hashCode()); result = prime * result + ((currencyFrom == null) ? 0 : currencyFrom.hashCode()); result = prime * result + ((currencyTo == null) ? 0 : currencyTo.hashCode()); result = prime * result + (int) (id ^ (id >>> 32)); result = prime * result + ((originatingCountry == null) ? 0 : originatingCountry .hashCode()); result = prime * result + ((rate == null) ? 0 : rate.hashCode()); result = prime * result + ((timePlaced == null) ? 0 : timePlaced.hashCode()); result = prime * result + ((userId == null) ? 0 : userId.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; TradeMessage other = (TradeMessage) obj; if (amountBuy == null) { if (other.amountBuy != null) return false; } else if (!amountBuy.equals(other.amountBuy)) return false; if (amountSell == null) { if (other.amountSell != null) return false; } else if (!amountSell.equals(other.amountSell)) return false; if (currencyFrom == null) { if (other.currencyFrom != null) return false; } else if (!currencyFrom.equals(other.currencyFrom)) return false; if (currencyTo == null) { if (other.currencyTo != null) return false; } else if (!currencyTo.equals(other.currencyTo)) return false; if (id != other.id) return false; if (originatingCountry == null) { if (other.originatingCountry != null) return false; } else if (!originatingCountry.equals(other.originatingCountry)) return false; if (rate == null) { if (other.rate != null) return false; } else if (!rate.equals(other.rate)) return false; if (timePlaced == null) { if (other.timePlaced != null) return false; } else if (!timePlaced.equals(other.timePlaced)) return false; if (userId == null) { if (other.userId != null) return false; } else if (!userId.equals(other.userId)) return false; return true; } public Date getTimePlaced() { return new Date(timePlaced.getTime()); } public void setTimePlaced(Date timePlaced) { this.timePlaced = timePlaced; } public String <API key>() { return originatingCountry; } public void <API key>(String originatingCountry) { this.originatingCountry = originatingCountry; } @Override public String toString() { return ToStringBuilder.reflectionToString(this); } public long getId() { return id; } public void setId(long id) { this.id = id; } }
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_21) on Sat May 11 22:08:47 BST 2013 --> <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> <title>Uses of Class com.hp.hpl.jena.sparql.lang.sparql_10.TokenMgrError (Apache Jena ARQ)</title> <meta name="date" content="2013-05-11"> <link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><! if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class com.hp.hpl.jena.sparql.lang.sparql_10.TokenMgrError (Apache Jena ARQ)"; } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar_top"> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><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="../../../../../../../../com/hp/hpl/jena/sparql/lang/sparql_10/TokenMgrError.html" title="class in com.hp.hpl.jena.sparql.lang.sparql_10">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-all.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?com/hp/hpl/jena/sparql/lang/sparql_10/class-use/TokenMgrError.html" target="_top">Frames</a></li> <li><a href="TokenMgrError.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../../../allclasses-noframe.html">All 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 com.hp.hpl.jena.sparql.lang.sparql_10.TokenMgrError" class="title">Uses of Class<br>com.hp.hpl.jena.sparql.lang.sparql_10.TokenMgrError</h2> </div> <div class="classUseContainer">No usage of com.hp.hpl.jena.sparql.lang.sparql_10.TokenMgrError</div> <div class="bottomNav"><a name="navbar_bottom"> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>"> </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="../../../../../../../../com/hp/hpl/jena/sparql/lang/sparql_10/TokenMgrError.html" title="class in com.hp.hpl.jena.sparql.lang.sparql_10">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-all.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?com/hp/hpl/jena/sparql/lang/sparql_10/class-use/TokenMgrError.html" target="_top">Frames</a></li> <li><a href="TokenMgrError.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../../../allclasses-noframe.html">All 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> <p class="legalCopy"><small>Licenced under the Apache License, Version 2.0</small></p> </body> </html>
package dk.itu.pervasive.mobile.data; import android.app.Activity; import android.content.Context; import android.database.Cursor; import android.net.Uri; import android.preference.PreferenceManager; import android.provider.MediaStore; import android.util.Log; import android.widget.Toast; import dk.itu.pervasive.mobile.R; import java.io.FileOutputStream; public class DataManager { public static final String PREF_KEY_SAVE = "save"; public static final String PREF_KEY_USERNAME = "username"; public static final String <API key> = "surfaceAddress"; public static final String PREF_KEY_STICKER_ID = "stickerID"; private static DataManager _instance = null; private Activity _context; private String _username = ""; private String _surfaceAddress = ""; private String _stickerID = ""; private DataManager() { } public static DataManager getInstance() { if (_instance == null) { _instance = new DataManager(); } return _instance; } public void saveData() { _username = PreferenceManager.<API key>(_context).getString(PREF_KEY_USERNAME, _context.getResources().getString(R.string.<API key>)); _surfaceAddress = PreferenceManager.<API key>(_context).getString(<API key>, _context.getResources().getString(R.string.<API key>)); _stickerID = PreferenceManager.<API key>(_context).getString(PREF_KEY_STICKER_ID, _context.getResources().getString(R.string.<API key>)); Log.wtf("save data", _username + ", " + _surfaceAddress + ", " + _stickerID); } public String getPathFromUri(Uri uri) { String[] projection = { MediaStore.Images.Media.DATA }; Cursor cursor = _context.getContentResolver().query(uri, projection, null, null, null); int column_index = cursor.<API key>(MediaStore.Images.Media.DATA); cursor.moveToFirst(); return cursor.getString(column_index); } public void saveImage(String imageName, byte[] bytes) { FileOutputStream fos; try { fos = _context.openFileOutput(imageName, Context.MODE_PRIVATE); fos.write(bytes); fos.close(); } catch (Exception e) { e.printStackTrace(); } } public void displayMessage(final String message) { _context.runOnUiThread(new Runnable() { public void run() { Toast.makeText(_context, message, Toast.LENGTH_SHORT).show(); } }); } public String getUsername() { return _username; } public String getSurfaceAddress() { return _surfaceAddress; } public String getStickerID() { return _stickerID; } public void setContext(Activity context) { _context = context; saveData(); } public Context getContext(){ return _context; } }
package org.apache.activemq.nob.filestore.uuiddir; import org.apache.activemq.nob.filestore.<API key>; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.File; import java.util.UUID; public class <API key> implements <API key> { public static final String <API key> = "-xbean.xml"; private static final Logger DEFAULT_LOGGER = LoggerFactory.getLogger(<API key>.class); private Logger LOG = DEFAULT_LOGGER; /** * Decode the pathname as a UUID if it is a regular file (i.e. not a directory) and return the UUID. * * @param brokerPath path to the candidate broker. * @return */ @Override public String <API key>(File brokerPath) { String result = null; if ( ! brokerPath.isDirectory() ) { try { UUID uuid = UUID.fromString(brokerPath.getName()); if (uuid != null) { result = uuid.toString(); } } catch ( <API key> illegalArgExc ) { LOG.debug("invalid UUID {}", brokerPath.getName()); } } return result; } /** * Locate the path to the xbean configuration file for the broker at the given path. This method validates the * broker path as it must to determine the broker ID. * * @param brokerPath path to the broker. * @return path to the xbean configuration file, even if it does not exist. */ @Override public File getBrokerXbeanFile(File brokerPath) { File result = null; String brokerId = this.<API key>(brokerPath); if ( brokerId != null ) { result = new File(brokerPath.getPath() + <API key>); } return result; } }
package antw.logger; import java.util.Date; import org.apache.tools.ant.BuildEvent; import antw.common.util.Constants; import antw.common.util.StringUtil; import antw.common.util.TimeUtil; import antw.logger.model.Project; import antw.logger.model.Target; public class TreeLogger extends LoggerAdapter { protected Project _lastProject = new Project(""); protected int _spaceCount = 2; protected Date _start; protected final LoggerContext _context; private boolean <API key>; public TreeLogger(LoggerContext context) { _context = context; } @Override public void targetStarted(BuildEvent event) { Target target = _context.getTarget(event); if (!target.getProject().equals(_lastProject)) { switchToSubProject(_lastProject, target.getProject()); <API key>(_lastProject, target.getProject()); printProject(target.getProject()); } _lastProject = target.getProject(); space(_spaceCount + 2); out("%-40s %-40s%n", new Object[] { "|--- " + target.getName(), "[" + target.getCounter() + " times; " + TimeUtil.formatTimeDuration(System.currentTimeMillis() - _start.getTime()) + "]" }); } private void printProject(Project project) { space(_spaceCount + 2); out("|"); space(_spaceCount + 1); out(project.getName()); } private void <API key>(Project lastProject, Project project) { if (lastProject.isSubProject()) { if (!project.isSubProject()) { space(_spaceCount + 1); _spaceCount -= 2; out("/"); } } } private void switchToSubProject(Project lastProject, Project currentProject) { if (!lastProject.isSubProject()) { if (currentProject.isSubProject()) { _spaceCount += 2; space(_spaceCount + 1); out("\\"); } } } @Override public void buildStarted(BuildEvent event) { newLine(); _start = new Date(); } @Override public void buildFinished(BuildEvent event) { if (event.getException() != null) { newLine(3); err(event.getException(), false); newLine(3); out("BUILD FAILED :("); out("Total Time: " + _context.getProjects().getDurationAsString()); } else { newLine(3); out("BUILD SUCCESSFUL :)"); out("Total Time: " + _context.getProjects().getDurationAsString()); } newLine(2); } @Override public void messageLogged(BuildEvent event) { if (event.getTask() != null) { if ("junit".equals(event.getTask().getTaskType())) { if (!<API key>) { switchToTestSuite(); } if (event.getPriority() <= org.apache.tools.ant.Project.MSG_INFO) { String message = event.getMessage(); if (message.contains(Constants.TEST_SUITE_LABEL)) { printTestSuite(message); } else if (message.contains(Constants.TEST_CASE_LABEL)) { printTestCase(message); } } <API key> = true; } else { if (<API key>) { switchFromTestSuite(); } <API key> = false; } } } private void switchFromTestSuite() { space(_spaceCount + 1); _spaceCount -= 2; out("/"); } private void printTestCase(String message) { space(_spaceCount + 2); out("|--- " + StringUtil.remove(Constants.TEST_CASE_LABEL, message)); } private void switchToTestSuite() { _spaceCount += 2; space(_spaceCount + 1); out("\\"); } private void printTestSuite(String testStuite) { space(_spaceCount + 2); out("|"); space(_spaceCount + 1); out(StringUtil.remove(Constants.TEST_SUITE_LABEL, testStuite)); } }
<<<< HEAD <?php // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] /** * ThinkPHP * * * */ defined('THINK_PATH') or exit(); return array( 'APP_USE_NAMESPACE' => true, '<API key>' => false, '<API key>' => array(), 'APP_DOMAIN_SUFFIX' => '', // com.cn net.cn 'ACTION_SUFFIX' => '', 'MULTI_MODULE' => true, // false DEFAULT_MODULE 'MODULE_DENY_LIST' => array('Common','Runtime'), 'CONTROLLER_LEVEL' => 1, 'APP_AUTOLOAD_LAYER' => 'Controller,Model', // APP_USE_NAMESPACE 'APP_AUTOLOAD_PATH' => '', // APP_USE_NAMESPACE /* Cookie */ 'COOKIE_EXPIRE' => 0, // Cookie 'COOKIE_DOMAIN' => '', // Cookie 'COOKIE_PATH' => '/', // Cookie 'COOKIE_PREFIX' => '', // Cookie 'COOKIE_SECURE' => false, // Cookie 'COOKIE_HTTPONLY' => '', // Cookie httponly 'DEFAULT_M_LAYER' => 'Model', 'DEFAULT_C_LAYER' => 'Controller', 'DEFAULT_V_LAYER' => 'View', 'DEFAULT_LANG' => 'zh-cn', 'DEFAULT_THEME' => '', 'DEFAULT_MODULE' => 'Home', 'DEFAULT_CONTROLLER' => 'Index', 'DEFAULT_ACTION' => 'index', 'DEFAULT_CHARSET' => 'utf-8', 'DEFAULT_TIMEZONE' => 'PRC', 'DEFAULT_AJAX_RETURN' => 'JSON', // AJAX ,JSON XML ... '<API key>' => 'jsonpReturn', // JSONP 'DEFAULT_FILTER' => 'htmlspecialchars', 'DB_TYPE' => '', 'DB_HOST' => '', 'DB_NAME' => '', 'DB_USER' => '', 'DB_PWD' => '', 'DB_PORT' => '', 'DB_PREFIX' => '', 'DB_PARAMS' => array(), 'DB_DEBUG' => TRUE, // SQL 'DB_FIELDS_CACHE' => true, 'DB_CHARSET' => 'utf8', // utf8 'DB_DEPLOY_TYPE' => 0, // :0 (),1 () 'DB_RW_SEPARATE' => false, 'DB_MASTER_NUM' => 1, 'DB_SLAVE_NO' => '', 'DATA_CACHE_TIME' => 0, 'DATA_CACHE_COMPRESS' => false, 'DATA_CACHE_CHECK' => false, 'DATA_CACHE_PREFIX' => '', 'DATA_CACHE_TYPE' => 'File', // ,:File|Db|Apc|Memcache|Shmop|Sqlite|Xcache|Apachenote|Eaccelerator 'DATA_CACHE_PATH' => TEMP_PATH,// (File) 'DATA_CACHE_KEY' => '', // KEY (File) 'DATA_CACHE_SUBDIR' => false, 'DATA_PATH_LEVEL' => 1, 'ERROR_MESSAGE' => '', 'ERROR_PAGE' => '', 'SHOW_ERROR_MSG' => false, 'TRACE_MAX_RECORD' => 100, 'LOG_RECORD' => false, 'LOG_TYPE' => 'File', 'LOG_LEVEL' => 'EMERG,ALERT,CRIT,ERR', 'LOG_FILE_SIZE' => 2097152, '<API key>' => false, /* SESSION */ 'SESSION_AUTO_START' => true, // Session 'SESSION_OPTIONS' => array(), // session type name id path expire domain 'SESSION_TYPE' => '', // session hander session hander 'SESSION_PREFIX' => '', // session //'VAR_SESSION_ID' => 'session_id', //sessionID 'TMPL_CONTENT_TYPE' => 'text/html', 'TMPL_ACTION_ERROR' => THINK_PATH.'Tpl/dispatch_jump.tpl', 'TMPL_ACTION_SUCCESS' => THINK_PATH.'Tpl/dispatch_jump.tpl', 'TMPL_EXCEPTION_FILE' => THINK_PATH.'Tpl/think_exception.tpl', 'TMPL_DETECT_THEME' => false, '<API key>' => '.html', 'TMPL_FILE_DEPR' => '/', //CONTROLLER_NAMEACTION_NAME 'TMPL_ENGINE_TYPE' => 'Think', // Think '<API key>' => '.php', 'TMPL_DENY_FUNC_LIST' => 'echo,exit', 'TMPL_DENY_PHP' => false, // PHP 'TMPL_L_DELIM' => '{', 'TMPL_R_DELIM' => '}', 'TMPL_VAR_IDENTIFY' => 'array', // ,'obj' 'TMPL_STRIP_SPACE' => true, // html 'TMPL_CACHE_ON' => true, // ,false 'TMPL_CACHE_PREFIX' => '', 'TMPL_CACHE_TIME' => 0, 'TMPL_LAYOUT_ITEM' => '{__CONTENT__}', 'LAYOUT_ON' => false, 'LAYOUT_NAME' => 'layout', // layout // Think 'TAGLIB_BEGIN' => '<', 'TAGLIB_END' => '>', 'TAGLIB_LOAD' => true, 'TAGLIB_BUILD_IN' => 'cx', 'TAGLIB_PRE_LOAD' => '', /* URL */ '<API key>' => true, // false URL true 'URL_MODEL' => 1, // URL,0123, // 0 (); 1 (PATHINFO ); 2 (REWRITE ); 3 () PATHINFO 'URL_PATHINFO_DEPR' => '/', // PATHINFO 'URL_PATHINFO_FETCH' => 'ORIG_PATH_INFO,REDIRECT_PATH_INFO,REDIRECT_URL', // PATH_INFO SERVER 'URL_REQUEST_URI' => 'REQUEST_URI', // REQUEST_URI 'URL_HTML_SUFFIX' => 'html', // URL 'URL_DENY_SUFFIX' => 'ico|png|gif|jpg', // URL 'URL_PARAMS_BIND' => true, // URLAction '<API key>' => 0, // URL 0 1 'URL_PARAMS_FILTER' => false, // URL '<API key>'=> '', // URL DEFAULT_FILTER 'URL_ROUTER_ON' => false, // URL 'URL_ROUTE_RULES' => array(), 'URL_MAP_RULES' => array(), // URL 'VAR_MODULE' => 'm', 'VAR_ADDON' => 'addon', 'VAR_CONTROLLER' => 'c', 'VAR_ACTION' => 'a', 'VAR_AJAX_SUBMIT' => 'ajax', // AJAX 'VAR_JSONP_HANDLER' => 'callback', 'VAR_PATHINFO' => 's', // PATHINFO ?s=/module/action/id/1 URL_PATHINFO_DEPR 'VAR_TEMPLATE' => 't', 'VAR_AUTO_STRING' => false, 'HTTP_CACHE_CONTROL' => 'private', 'CHECK_APP_DIR' => true, 'FILE_UPLOAD_TYPE' => 'Local', 'DATA_CRYPT_TYPE' => 'Think', ); ==== <?php // | ThinkPHP [ WE CAN DO IT JUST THINK IT ] /** * ThinkPHP * * * */ defined('THINK_PATH') or exit(); return array( 'APP_USE_NAMESPACE' => true, '<API key>' => false, '<API key>' => array(), 'APP_DOMAIN_SUFFIX' => '', // com.cn net.cn 'ACTION_SUFFIX' => '', 'MULTI_MODULE' => true, // false DEFAULT_MODULE 'MODULE_DENY_LIST' => array('Common','Runtime'), 'CONTROLLER_LEVEL' => 1, 'APP_AUTOLOAD_LAYER' => 'Controller,Model', // APP_USE_NAMESPACE 'APP_AUTOLOAD_PATH' => '', // APP_USE_NAMESPACE /* Cookie */ 'COOKIE_EXPIRE' => 0, // Cookie 'COOKIE_DOMAIN' => '', // Cookie 'COOKIE_PATH' => '/', // Cookie 'COOKIE_PREFIX' => '', // Cookie 'COOKIE_SECURE' => false, // Cookie 'COOKIE_HTTPONLY' => '', // Cookie httponly 'DEFAULT_M_LAYER' => 'Model', 'DEFAULT_C_LAYER' => 'Controller', 'DEFAULT_V_LAYER' => 'View', 'DEFAULT_LANG' => 'zh-cn', 'DEFAULT_THEME' => '', 'DEFAULT_MODULE' => 'Home', 'DEFAULT_CONTROLLER' => 'Index', 'DEFAULT_ACTION' => 'index', 'DEFAULT_CHARSET' => 'utf-8', 'DEFAULT_TIMEZONE' => 'PRC', 'DEFAULT_AJAX_RETURN' => 'JSON', // AJAX ,JSON XML ... '<API key>' => 'jsonpReturn', // JSONP 'DEFAULT_FILTER' => 'htmlspecialchars', 'DB_TYPE' => '', 'DB_HOST' => '', 'DB_NAME' => '', 'DB_USER' => '', 'DB_PWD' => '', 'DB_PORT' => '', 'DB_PREFIX' => '', 'DB_PARAMS' => array(), 'DB_DEBUG' => TRUE, // SQL 'DB_FIELDS_CACHE' => true, 'DB_CHARSET' => 'utf8', // utf8 'DB_DEPLOY_TYPE' => 0, // :0 (),1 () 'DB_RW_SEPARATE' => false, 'DB_MASTER_NUM' => 1, 'DB_SLAVE_NO' => '', 'DATA_CACHE_TIME' => 0, 'DATA_CACHE_COMPRESS' => false, 'DATA_CACHE_CHECK' => false, 'DATA_CACHE_PREFIX' => '', 'DATA_CACHE_TYPE' => 'File', // ,:File|Db|Apc|Memcache|Shmop|Sqlite|Xcache|Apachenote|Eaccelerator 'DATA_CACHE_PATH' => TEMP_PATH,// (File) 'DATA_CACHE_KEY' => '', // KEY (File) 'DATA_CACHE_SUBDIR' => false, 'DATA_PATH_LEVEL' => 1, 'ERROR_MESSAGE' => '', 'ERROR_PAGE' => '', 'SHOW_ERROR_MSG' => false, 'TRACE_MAX_RECORD' => 100, 'LOG_RECORD' => false, 'LOG_TYPE' => 'File', 'LOG_LEVEL' => 'EMERG,ALERT,CRIT,ERR', 'LOG_FILE_SIZE' => 2097152, '<API key>' => false, /* SESSION */ 'SESSION_AUTO_START' => true, // Session 'SESSION_OPTIONS' => array(), // session type name id path expire domain 'SESSION_TYPE' => '', // session hander session hander 'SESSION_PREFIX' => '', // session //'VAR_SESSION_ID' => 'session_id', //sessionID 'TMPL_CONTENT_TYPE' => 'text/html', 'TMPL_ACTION_ERROR' => THINK_PATH.'Tpl/dispatch_jump.tpl', 'TMPL_ACTION_SUCCESS' => THINK_PATH.'Tpl/dispatch_jump.tpl', 'TMPL_EXCEPTION_FILE' => THINK_PATH.'Tpl/think_exception.tpl', 'TMPL_DETECT_THEME' => false, '<API key>' => '.html', 'TMPL_FILE_DEPR' => '/', //CONTROLLER_NAMEACTION_NAME 'TMPL_ENGINE_TYPE' => 'Think', // Think '<API key>' => '.php', 'TMPL_DENY_FUNC_LIST' => 'echo,exit', 'TMPL_DENY_PHP' => false, // PHP 'TMPL_L_DELIM' => '{', 'TMPL_R_DELIM' => '}', 'TMPL_VAR_IDENTIFY' => 'array', // ,'obj' 'TMPL_STRIP_SPACE' => true, // html 'TMPL_CACHE_ON' => true, // ,false 'TMPL_CACHE_PREFIX' => '', 'TMPL_CACHE_TIME' => 0, 'TMPL_LAYOUT_ITEM' => '{__CONTENT__}', 'LAYOUT_ON' => false, 'LAYOUT_NAME' => 'layout', // layout // Think 'TAGLIB_BEGIN' => '<', 'TAGLIB_END' => '>', 'TAGLIB_LOAD' => true, 'TAGLIB_BUILD_IN' => 'cx', 'TAGLIB_PRE_LOAD' => '', /* URL */ '<API key>' => true, // false URL true 'URL_MODEL' => 1, // URL,0123, // 0 (); 1 (PATHINFO ); 2 (REWRITE ); 3 () PATHINFO 'URL_PATHINFO_DEPR' => '/', // PATHINFO 'URL_PATHINFO_FETCH' => 'ORIG_PATH_INFO,REDIRECT_PATH_INFO,REDIRECT_URL', // PATH_INFO SERVER 'URL_REQUEST_URI' => 'REQUEST_URI', // REQUEST_URI 'URL_HTML_SUFFIX' => 'html', // URL 'URL_DENY_SUFFIX' => 'ico|png|gif|jpg', // URL 'URL_PARAMS_BIND' => true, // URLAction '<API key>' => 0, // URL 0 1 'URL_PARAMS_FILTER' => false, // URL '<API key>'=> '', // URL DEFAULT_FILTER 'URL_ROUTER_ON' => false, // URL 'URL_ROUTE_RULES' => array(), 'URL_MAP_RULES' => array(), // URL 'VAR_MODULE' => 'm', 'VAR_ADDON' => 'addon', 'VAR_CONTROLLER' => 'c', 'VAR_ACTION' => 'a', 'VAR_AJAX_SUBMIT' => 'ajax', // AJAX 'VAR_JSONP_HANDLER' => 'callback', 'VAR_PATHINFO' => 's', // PATHINFO ?s=/module/action/id/1 URL_PATHINFO_DEPR 'VAR_TEMPLATE' => 't', 'VAR_AUTO_STRING' => false, 'HTTP_CACHE_CONTROL' => 'private', 'CHECK_APP_DIR' => true, 'FILE_UPLOAD_TYPE' => 'Local', 'DATA_CRYPT_TYPE' => 'Think', ); >>>> <SHA1-like>
"use strict"; import {Vector2, Vector3, Matrix4, Vector4} from 'vectormath'; /* NOTE: this was originally a WebGL UI library I wrote. it's gone through several transitions since then, and is now a canvas2d UI library (bleh). the code is quite horrible. */ #include "src/utils/utildefine.js" //we keep track of any canvases with non-GC managed data, //(gl objects, TriListAlloc, TA_Alloc, etc) to avoid reference leaks //g_app_state.reset calls .destroy() on all canvases inside this list. //(then resets it back to {}). window.active_canvases = {}; window._canvas_draw_id = 1; //disable use of theoretically faster typed array allocator, //for now. //#ifdef NOCACHE #define F32ALLOC(verts) new Float32Array(verts); #define F32FREE(verts) verts = undefined; /*#else -#define F32ALLOC(verts123) f32_alloc.from_array(verts123); -#define F32FREE(verts123) if (verts123 != undefined) { f32_alloc.free(verts123); verts123 = undefined;} #endif */ //stupid statics var _trilist_n0 = new Vector3(); var _trilist_n1 = new Vector3() var _trilist_n2 = new Vector3(); var _trilist_n3 = new Vector3() var _trilist_v1 = new Vector3(); var _trilist_v2 = new Vector3() var _trilist_v3 = new Vector3(); var _trilist_v4 = new Vector3() var _trilist_c1 = new Vector4(); var _trilist_c2 = new Vector4() var _trilist_c3 = new Vector4(); var _trilist_c4 = new Vector4() var _trilist_v5 = new Vector3(); var _trilist_v6 = new Vector3(); var _trilist_v7 = new Vector3(); var _trilist_v8 = new Vector3(); var _trilist_v9 = new Vector3(); #define TRILIST_CACHE_SIZE 8192 /*I hate garbage collected languages. Bleh! This class is necessary to avoid object allocations within draw frames. evil!*/ export class TriListAlloc { constructor() { this.freelist = []; this.freecount = 0; this.usedcount = 0; this.peakcount = 0; } alloc(UICanvas canvas, Matrix4 transmat, Boolean use_small_icons=false) : TriList { this.peakcount = Math.max(this.peakcount, this.usedcount+1); #ifdef NOCACHE return new TriList(canvas, transmat, use_small_icons); #endif if (this.freecount == 0) { //ensure a saturated cache if (this.usedcount == 0) { for (var i=0; i<TRILIST_CACHE_SIZE; i++) { var tl = new TriList(canvas, transmat, use_small_icons); tl.cache_destroy(); this.freelist.push(tl); this.freecount++; } } this.usedcount++; return new TriList(canvas, transmat, use_small_icons); } else { //console.log("using cached trilist", this.freecount, this.freelist.length); var ret = this.freelist.pop(); ret.cache_init(canvas, transmat, use_small_icons); this.freecount this.usedcount++; return ret; } } free(TriList trilist) { this.usedcount #ifdef NOCACHE trilist.cache_destroy(); return; #endif //abandon trilist to the GC if (this.freecount >= TRILIST_CACHE_SIZE) return; trilist.cache_destroy(); this.freelist.push(trilist); this.freecount++; } } var _talloc = new TriListAlloc(); /* TriList is being refactored to make it more usable. vertex buffers will be reused, and transformation matrices will be passed in at draw time, not applied at vertex generation time. */ export class TriListRef { constructor(gl, TriList trilist, Matrix4 mat, UICanvas canvas) { this.trilist = trilist; this.mat = mat; this.workmat = new Matrix4(); this.gl = gl; this.canvas = canvas; } destroy() { } on_draw(<API key> gl) { this.workmat.load(this.mat); this.workmat.multiply(this.canvas.global_matrix); this.trilist.global_matrix = this.workmat; this.trilist.on_draw(gl); } } export class TriListCache { constructor(limit=100) { this.cache = {}; this.length = 0; this.limit = limit; } get(String key) : TriList { return this.cache[key]; } has(String key) : Boolean { return key in this.cache; } set(String key, TriList trilist) { if (!(key in this.cache)) { this.length++; } this.cache[key] = trilist; } remove(String key) { if (key in this.cache) { this.cache[key].destroy(); this.length delete this.cache[key]; } } destroy() { for (var k in this.cache) { var tl = this.cache[k]; tl.destroy(); } this.cache = {}; this.length = 0; } on_gl_lost() { this.length = 0; this.cache = {}; } } export class TriList { cache_destroy() { this._free_typed(); this.verts.length = 0; this.texcos.length = 0; this.colors.length = 0; this.tottri = 0; //this.canvas = undefined; //this.iconsheet = undefined; //this.viewport = undefined; this._dead = true; } _free_typed() { //f32free sets vertbuf/colorbuf/texbuf to undefined F32FREE(this.vertbuf); F32FREE(this.colorbuf); F32FREE(this.texbuf); } cache_init(UICanvas canvas, Matrix4 transmat, Boolean use_small_icons=false) { this._dead = false; this.transmat = transmat; this.global_matrix = canvas.global_matrix; this.use_tex = 1; this.tex = 0 : WebGLTexture; this.iconsheet = use_small_icons ? g_app_state.raster.iconsheet16 : g_app_state.raster.iconsheet; this.small_icons = use_small_icons; this.verts.length = 0; this.colors.length = 0; this.texcos.length = 0; this.recalc = 1 this.tottri = 0; this.canvas = canvas this.spos = undefined : Array<float>; this.ssize = undefined : Array<float>; this.gl_spos = undefined : Array<float>; this.gl_ssize = undefined : Array<float>; this.viewport = canvas != undefined ? canvas.viewport : undefined; } constructor(UICanvas canvas, Matrix4 transmat, Boolean use_small_icons=false) { this._id = _canvas_draw_id++; this.transmat = transmat; this.global_matrix = canvas.global_matrix; this.verts = []; this.colors = []; this.texcos = []; this._dead = false; this.vertbuf = undefined; this.colorbuf = undefined; this.texbuf = undefined; this.use_tex = 1; this.tex = 0 : WebGLTexture; this.iconsheet = use_small_icons ? g_app_state.raster.iconsheet16 : g_app_state.raster.iconsheet; this.small_icons = use_small_icons; this.recalc = 1 this.tottri = 0; this.canvas = canvas this.spos = undefined : Array<float>; this.ssize = undefined : Array<float>; this.gl_spos = undefined : Array<float>; this.gl_ssize = undefined : Array<float>; this.viewport = canvas != undefined ? canvas.viewport : undefined; } add_tri(Array<float> v1, Array<float> v2, Array<float> v3, Array<float> c1, Array<float> c2, Array<float> c3, Array<float> t1, Array<float> t2, Array<float> t3) { var vs = this.verts; this.tottri++; static v12 = new Vector3(); static v22 = new Vector3(); static v32 = new Vector3(); v12.loadxy(v1); v22.loadxy(v2); v32.loadxy(v3); v1 = v12; v2 = v22; v3 = v32; this.transform(v1); this.transform(v2); this.transform(v3); vs.push(v1[0]); vs.push(v1[1]); vs.push(v1[2]); vs.push(v2[0]); vs.push(v2[1]); vs.push(v2[2]); vs.push(v3[0]); vs.push(v3[1]); vs.push(v3[2]); var cs = this.colors if (c2 == undefined) { c2 = c1; c3 = c1; } cs.push(c1[0]); cs.push(c1[1]); cs.push(c1[2]); cs.push(c1[3]); cs.push(c2[0]); cs.push(c2[1]); cs.push(c2[2]); cs.push(c2[3]); cs.push(c3[0]); cs.push(c3[1]); cs.push(c3[2]); cs.push(c3[3]); if (this.use_tex) { if (t1 == undefined) { static negone = [-1, -1]; t1 = t2 = t3 = negone; } var ts = this.texcos ts.push(t1[0]); ts.push(t1[1]); ts.push(t2[0]); ts.push(t2[1]); ts.push(t3[0]); ts.push(t3[1]) } } add_quad(Vector3 v1, Vector3 v2, Vector3 v3, Vector3 v4, Array<float> c1,Array<float> c2,Array<float> c3, Array<float> c4,Array<float> t1,Array<float> t2, Array<float> t3,Array<float> t4) { this.add_tri(v1, v2, v3, c1, c2, c3, t1, t2, t3); this.add_tri(v1, v3, v4, c1, c3, c4, t1, t3, t4); } icon_quad(int icon, Vector3 pos, Array<Array<float>> cs) { static tcos = new Array(0); //var clr = [1, 1, 1, 1]; //var cs = [clr, clr, clr, clr]; var cw = this.iconsheet.cellsize[0], ch = this.iconsheet.cellsize[1]; var v1 = new Vector3([pos[0], pos[1], 0.0]); var v2 = new Vector3([pos[0], pos[1]+ch, 0.0]); var v3 = new Vector3([pos[0]+cw, pos[1]+ch, 0.0]); var v4 = new Vector3([pos[0]+cw, pos[1], 0.0]); tcos.length = 0; this.iconsheet.gen_tile(icon, tcos); var t1 = new Vector3([tcos[0], tcos[1], 0]); var t2 = new Vector3([tcos[2], tcos[3], 0]); var t3 = new Vector3([tcos[4], tcos[5], 0]); var t4 = new Vector3([tcos[6], tcos[7], 0]); var t5 = new Vector3([tcos[8], tcos[9], 0]); var t6 = new Vector3([tcos[10], tcos[11], 0]); this.add_tri(v1, v2, v3, cs[0], cs[1], cs[2], t1, t2, t3); this.add_tri(v1, v3, v4, cs[0], cs[2], cs[3], t4, t5, t6); } transform(v) { static transvec = new Vector3(); transvec[0] = v[0]; transvec[1] = v[1]; transvec[2] = 0.0; transvec.multVecMatrix(this.transmat); v[0] = (transvec[0]/this.viewport[1][0])*2.0 - 1.0; v[1] = (transvec[1]/this.viewport[1][1])*2.0 - 1.0; } line(v1, v2, c1, c2=undefined, width=undefined) { //c2 and width are optional if (c2 == undefined) { c2 = c1; } if (v1.length == 2) v1.push(0); if (v2.length == 2) v2.push(0); this.line_strip(CACHEARR2(CACHEARR2(v1, v2), CACHEARR2(c1, c2)), undefined, width); //this.line_strip(objcache.getarr(objcache.getarr(v1, v2), objcache.getarr(c1, c2)), undefined, width); } line_strip(lines, colors, texcos=undefined, width=2.0, half=false) { static black = new Vector4([0.0, 0.0, 0.0, 1.0]); static v0 = new Vector3(), v1 = new Vector3(), v2 = new Vector3(); static v3 = new Vector3(), v4 = new Vector3(), n0 = new Vector3(); static n1 = new Vector3(), n2 = new Vector3(), c3 = new Vector3(); static c4 = new Vector3(); for (var i =0; i<lines.length; i++) { var lc1 = colors[i][0], lc2 = colors[i][1]; //if (lines[i][0].length == 2) lines[i][0].push(0); //if (lines[i][1].length == 2) lines[i][1].push(0); if (lc1 == undefined) lc1 = black; if (lc2 == undefined) lc2 = black; var z = 0.0; v1.loadxy(lines[i][0]) v2.loadxy(lines[i][1]) n0.zero(); n1.zero(); n2.zero(); v1.loadxy(lines[i][1]); v1.sub(lines[i][0]); v1.normalize(); n1[0] = v1[1]; n1[1] = -v1[0]; n1[2] = z; n1.normalize() if (i > 0) { v0.loadxy(lines[i-1][1]); v0.sub(lines[i-1][0]) v0.normalize(); n0[0] = v0[1]; n0[1] = -v0[0]; n0[2] = z; n0.normalize() } else { n0.load(n1); } v1.loadxy(lines[i][1]); v1.sub(lines[i][0]) if (i < lines.length-1) { v3.loadxy(lines[i+1][1]); v3.sub(lines[i+1][0]); v3.normalize(); n2[0] = v3[1]; n2[1] = -v3[0]; n2[2] = z; n2.normalize() } else { n2.load(n1); } /* n0.normalize(); n1.normalize(); n2.normalize(); n0.mulScalar(0.5); n1.mulScalar(0.5); n2.mulScalar(0.5); */ n2.add(n1).normalize(); n1.add(n0).normalize(); n1.mulScalar(width*0.5); n2.mulScalar(width*0.5); v0.loadxy(lines[i][0]); v1.loadxy(lines[i][1]); v2.loadxy(lines[i][1]); v2.add(n1); v3.loadxy(lines[i][0]); v3.add(n2); var c1 = _trilist_c1.load(lc1); var c2 = _trilist_c2.load(lc2); var c3 = _trilist_c3.load(lc2); var c4 = _trilist_c4.load(lc1); if (width >= 1.5) { c3[3] = 0.0; c4[3] = 0.0; } n1.mulScalar(2.0); n2.mulScalar(2.0); if (this.use_tex && texcos) { if (!half) this.add_quad(v0, v1, v2, v3, c1, c2, c3, c4, texcos[i][0], texcos[i][1], texcos[i][0], texcos[i][1]); this.add_quad(v1, v0, v3.sub(n1), v2.sub(n2), c2, c1, c3, c4, texcos[i][0], texcos[i][1], texcos[i][0], texcos[i][1]); } else { if (!half) this.add_quad(v0, v1, v2, v3, c1, c2, c3, c4); this.add_quad(v1, v0, v3.sub(n2), v2.sub(n1), c2, c1, c3, c4); } } } destroy(Boolean only_gl=false) { var gl = g_app_state.gl; if (this.vbuf) { gl.deleteBuffer(this.vbuf); gl.deleteBuffer(this.cbuf); } if (this.tbuf) { gl.deleteBuffer(this.tbuf); } this.vbuf = this.cbuf = this.tbuf = undefined; this.recalc = 1; this._free_typed(); if (!only_gl) { this._dead = true; _talloc.free(this); } } gen_buffers(gl) { if (this.verts.length == 0) return; this.destroy(true); this._free_typed(); this._dead = false; this.vertbuf = F32ALLOC(this.verts); //new Float32Array(this.verts) this.colorbuf = F32ALLOC(this.colors); //new Float32Array(this.colors) if (this.use_tex) this.texbuf = F32ALLOC(this.texcos); //new Float32Array(this.texcos); gl.<API key>(0); gl.<API key>(1); if (this.use_tex) gl.<API key>(2); else gl.<API key>(2); var vbuf = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, vbuf); gl.bufferData(gl.ARRAY_BUFFER, this.vertbuf, gl.STATIC_DRAW); gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0); gl.bindBuffer(gl.ARRAY_BUFFER, vbuf); var cbuf = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, cbuf); gl.bufferData(gl.ARRAY_BUFFER, this.colorbuf, gl.STATIC_DRAW); gl.vertexAttribPointer(1, 4, gl.FLOAT, false, 0, 0); gl.bindBuffer(gl.ARRAY_BUFFER, cbuf); if (this.use_tex) { var tbuf = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, tbuf); gl.bufferData(gl.ARRAY_BUFFER, this.texbuf, gl.STATIC_DRAW); gl.vertexAttribPointer(2, 2, gl.FLOAT, false, 0, 0); gl.bindBuffer(gl.ARRAY_BUFFER, tbuf); this.tbuf = tbuf } this.vbuf = vbuf; this.cbuf = cbuf; gl.<API key>(1); gl.<API key>(2); this.recalc = 0; } on_draw(gl) { if (!this.iconsheet.ready) return; //if (this._dead) // return; if (this.verts.length == 0) return; if (this.recalc || (this.tdrawbuf != undefined && this.tdrawbuf.is_dead)) { this.gen_buffers(gl); } if (this.ssize != undefined) { gl.enable(gl.SCISSOR_TEST); // g_app_state.raster.push_scissor(this.spos, this.ssize); } gl.disable(gl.DEPTH_TEST); gl.enable(gl.BLEND); gl_blend_func(gl); //gl.blendEquation(gl.BLEND_EQUATION); //gl.<API key>(gl.BLEND_EQUATION, gl.BLEND_EQUATION); gl.<API key>(0); gl.<API key>(1); gl.<API key>(3); gl.<API key>(4); gl.bindBuffer(gl.ARRAY_BUFFER, this.vbuf); gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0); gl.bindBuffer(gl.ARRAY_BUFFER, this.vbuf); gl.bindBuffer(gl.ARRAY_BUFFER, this.cbuf); gl.vertexAttribPointer(1, 4, gl.FLOAT, false, 0, 0); gl.bindBuffer(gl.ARRAY_BUFFER, this.cbuf); if (this.use_tex) { gl.<API key>(2); gl.bindBuffer(gl.ARRAY_BUFFER, this.tbuf); gl.vertexAttribPointer(2, 2, gl.FLOAT, false, 0, 0); gl.bindBuffer(gl.ARRAY_BUFFER, this.tbuf); } else { gl.<API key>(2); } gl.activeTexture(gl.TEXTURE4); gl.bindTexture(gl.TEXTURE_2D, this.iconsheet.tex); gl.useProgram(gl.basic2d.program); this.global_matrix.setUniform(gl, gl.basic2d.uniformloc(gl, "mat")); gl.uniform1i(gl.basic2d.uniformloc(gl, "iconsampler"), 4); //console.log(this.verts); //console.log(this.tottri*3, this.verts.length/3, this.colors.length/4, this.verts[0], this.verts[1], this.verts[2]) gl.drawArrays(gl.TRIANGLES, 0,this.tottri*3); gl.<API key>(1); gl.<API key>(2); gl.enable(gl.DEPTH_TEST); if (this.ssize != undefined) { //g_app_state.raster.pop_scissor(); } } } /* var MAX_TRILIST_CACHE = 512; var <API key> = 0; var _trilist_template = {obj : new TriList(undefined, undefined), cachesize : MAX_TRILIST_CACHE}; function <API key>() { <API key> = 0; } function _new_trilist(UICanvas canvas) { if (<API key> = 0 >= MAX_TRILIST_CACHE) { return new TriList(canvas); } else { var list = objcache.fetch(_trilist_template) TriList.call(list, canvas); } } function _save_trilist(TriList trilist) { if (objcache.is_cache_obj(trilist)) { objcache.cache_remove(trilist); } } */ export class TextDraw { constructor(pos, text, color, spos, ssize, viewport, size, scale, global_matrix, rot=0) { this._id = _canvas_draw_id++; this.rot = rot; this.global_matrix = global_matrix; this.text = text; this.pos = [pos[0], pos[1], pos[2]]; this.color = color; this.tdrawbuf = undefined : TextDrawBuffer; this.spos = spos; this.ssize = ssize; this.asp = viewport[1][1] / viewport[1][0]; this.viewport = viewport; this.scale = [scale[0], scale[1], 0]; this.size = size; this.raster = g_app_state.raster; var mat = new Matrix4(); mat.translate(this.pos[0], this.pos[1], 0.0); //denormalize to avoid squashed rotations mat.scale(1, 1.0/this.asp, 1); mat.rotate(0, 0, rot); mat.scale(this.scale); //norrmalize again mat.scale(1, this.asp, 1); this.mat = mat; } destroy() { /*don't destroy the gl buffers here, since I'm now caching them*/ /* if (this.tdrawbuf != undefined) this.tdrawbuf.destroy(); this.tdrawbuf = undefined; */ } toString() : String { return "TD" + this._id; } gen_buffers(gl) { this.tdrawbuf = this.raster.get_font(this.size).gen_text_buffers(gl, this.text, this.color, this.viewport); return this.tdrawbuf; } on_draw(gl) { static identitymat = new Matrix4(); gl.<API key>(4); if (this.tdrawbuf == undefined) this.gen_buffers(gl); var spos, ssize; if (this.ssize != undefined) { spos = CACHEARR3(this.spos[0], this.spos[1], 0); ssize = CACHEARR3(this.ssize[0], this.ssize[1], 0); // g_app_state.raster.push_scissor(spos, ssize); } static mat = new Matrix4(); mat.load(this.global_matrix); mat.multiply(this.mat); this.tdrawbuf.on_draw(gl, mat); if (this.ssize != undefined) { //g_app_state.raster.pop_scissor(); } } } var _ls_static_colors = {reallength: 0, length: 0}; window._box_process_clr = function _box_process_clr(default_cs, clr) { var cs = default_cs; static arr4 = [0, 0, 0, 0]; if (clr != undefined) { if (typeof clr == "number") { var cs2 = arr4; for (var i=0; i<4; i++) { cs2[i] = CACHEARR4(cs[i][0], cs[i][1], cs[i][2], cs[i][3]); for (var j=0; j<4; j++) { cs2[i] *= clr; } } cs = cs2; } else if (typeof clr[0] == "number") { var cs = arr4; cs[0] = clr; cs[1] = clr; cs[2] = clr; cs[3] = clr; } else { cs = clr; } } return cs; } //XXX XXX! export class UICanvas_ { constructor(viewport) { static _id = 1; this._id = _id++; this.global_matrix = new Matrix4(); this.iconsheet = g_app_state.raster.iconsheet; this.iconsheet16 = g_app_state.raster.iconsheet16; this.viewport = viewport; this.raster = g_app_state.raster; this.trilist = _talloc.alloc(this, this.transmat); this.textcache = {}; this.textcachelen = 0; this.max_textcache = 64; this.boxcache = new TriListCache(); this.trans_stack = [] this.transmat = new Matrix4() this.drawlists = [this.trilist] this.textlist = []; this.stack = [] this.cache = new hashtable(); this.oldcache = new hashtable(); this.uncached = new Array(); this.uncached.push(this.trilist); this.scissor_stack = new Array(); this.flag = 0; } ensure_trilist() { if (this.drawlists.length == 0 || !(this.drawlists[this.drawlists.length-1] instanceof TriList)) { this.new_trilist(); } } set_viewport(viewport) { var bad = false; for (var i=0; i<3; i++) { if (viewport[1][i] != this.viewport[1][i]) bad = true; } this.viewport = viewport; if (bad) { this.on_resize(viewport[1], viewport[1]); } } on_gl_lost(<API key> new_gl) { this.boxcache.on_gl_lost(); if (this.gl === new_gl) { console.trace(); console.log("Warning: uicanvas.on_gl_lost() called multiple times"); return; } this.gl = new_gl; this.drawlists = new Array(); this.iconsheet = g_app_state.raster.iconsheet; this.iconsheet16 = g_app_state.raster.iconsheet16; this.textcache = {}; this.textcachelen = 0; this.stack = [] this.raster = g_app_state.raster; this.cache = new hashtable(); this.oldcache = new hashtable(); this.boxcache = UICanvas.boxcache; this.new_trilist(); //now that gl data is destroyed, //call .reset to maintain data structure integrity this.reset(); } push_scissor(pos, size) { var oldpos = pos; pos = new Vector3([pos[0], pos[1], 0]); size = new Vector3([size[0], size[1], 0]); pos.multVecMatrix(this.transmat); size.multVecMatrix(this.transmat); var vx=this.viewport[0][0], vy=this.viewport[0][1] pos[0] += vx; pos[1] += vy; var dx = pos[0]-oldpos[0]-vx, dy = pos[1]-oldpos[1]-vy; size[0] -= dx; size[1] -= dy; for (var i=0; i<3; i++) { pos[i] = Math.floor(pos[i]); size[i] = Math.ceil(size[i]); } this.scissor_stack.push([pos, size]); this.new_trilist(); } pop_scissor() { this.scissor_stack.pop(); this.new_trilist(); } new_trilist(Boolean use_small_icons=false) { //flag canvas for memory leak detection, see active_canvases's definition active_canvases[this._id] = this; this.trilist = _talloc.alloc(this, this.transmat, use_small_icons); //new TriList(this, use_small_icons); if (this.scissor_stack.length > 0) { this.trilist.spos = this.scissor_stack[this.scissor_stack.length-1][0]; this.trilist.ssize = this.scissor_stack[this.scissor_stack.length-1][1]; } this.drawlists.push(this.trilist); return this.trilist; } translate(Array<float> off) { this.transmat.translate(off[0], off[1], 0.0); } push_transform(mat=undefined) { this.trans_stack.push(new Matrix4(this.transmat)); if (mat != undefined) this.transmat.multiply(mat); } pop_transform() { this.transmat.load(this.trans_stack.pop()); } frame_begin(Object item) { return;//XXX if (DEBUG.ui_canvas) { console.log("canvas start, stack length: ", this.stack.length); } this.new_trilist(); this.stack.push(this.drawlists.length-1); } frame_end(Object item) { return;//XXX var arr = new Array() var start = this.stack[this.stack.length-1]; this.stack.pop(); if (DEBUG.ui_canvas) console.log(start); for (var i=start; i<this.drawlists.length; i++) { arr.push(this.drawlists[i]); } this.cache.set(item, arr); this.new_trilist(); if (DEBUG.ui_canvas) { console.log("canvas end, stack length: ", this.stack.length); } return arr; } begin(Object item) { //okay, individual leaf element caching may not have been a good //idea. . . //-XXX return; if (DEBUG.ui_canvas) { console.log("canvas start, stack length: ", this.stack.length); } this.new_trilist(); this.stack.push(this.drawlists.length-1); } end(Object item) { //-XXX; return; var arr = new Array() var start = this.stack.pop(this.stack.length-1); if (DEBUG.ui_canvas) console.log(start); for (var i=start; i<this.drawlists.length; i++) { arr.push(this.drawlists[i]); } this.stack.pop(); this.cache.set(item, arr); this.new_trilist(); if (DEBUG.ui_canvas) { console.log("canvas end, stack length: ", this.stack.length); } return arr; } use_cache(Object item) { if (this.oldcache.has(item)) { var arr = this.oldcache.get(item); for (var i=0; i<arr.length; i++) { this.drawlists.push(arr[i]); if (arr[i] instanceof TextDraw) this.textlist.push(arr[i]); } this.oldcache.remove(item); this.cache.set(item, arr); this.new_trilist(); } } has_cache(Object item) { return this.oldcache.has(item); } remove_cache(Object item) { if (this.oldcache.has(item)) this.oldcache.remove(item); } textsize(text, size=<API key>) { var box = this.raster.get_font(size).calcsize(text); return [box[0], box[1]]; } line(v1, v2, c1, c2=c1, width=2.0) { this.ensure_trilist(); this.line_strip([[v1, v2]], [[c1, c2]], undefined, width); } line_strip(lines, colors, texcos, width, half) {//colors,texcos,width are optional this.ensure_trilist(); if (colors == undefined) { colors = uicolors["DefaultLine"]; } if (typeof(colors[0]) == "number") { var clr = colors; colors =_ls_static_colors; for (var i=0; i<lines.length; i++) { if (colors[i] == undefined) { colors[i] = [clr, clr]; } else { colors[i][0] = clr; colors[i][1] = clr; } } colors.reallength = Math.max(colors.reallength, i); colors.length = i; } this.trilist.line_strip(lines, colors, texcos, width, half); } line_loop(points, colors, texcos, width, half) { //colors,texcos,width are optional var lines = [] this.ensure_trilist(); if (colors == undefined) { colors = uicolors["DefaultLine"]; } var lcolors; if (typeof colors[0] != "number") lcolors = [] else lcolors = [] for (var i=0; i<points.length; i++) { var i2 = (i+1)%points.length; lines.push([points[i], points[i2]]); if (typeof(colors[0]) != "number") { lcolors.push([colors[i], colors[i2]]); } else { lcolors.push([colors, colors]); } } this.line_strip(lines, lcolors, undefined, width, half); } quad(v1, v2, v3, v4, c1, c2, c3, c4) { this.ensure_trilist(); if (v1.length == 2) v1.push(0); if (v2.length == 2) v2.push(0); if (v3.length == 2) v3.push(0); if (v4.length == 2) v4.push(0); this.trilist.add_quad(v1, v2, v3, v4, c1, c2, c3, c4); } quad_aa(v1, v2, v3, v4, c1, c2, c3, c4) { this.ensure_trilist(); if (v1.length == 2) v1.push(0); if (v2.length == 2) v2.push(0); if (v3.length == 2) v3.push(0); if (v4.length == 2) v4.push(0); if (c2 == undefined) { c2 = c3 = c4 = c1; } this.trilist.add_quad(v1, v2, v3, v4, c1, c2, c3, c4); var lines = [[v1, v4], [v4, v3], [v3, v2], [v2, v1]]; var colors = [[c1, c4], [c4, c3], [c3, c2], [c2, c1]]; this.trilist.line_strip(lines, colors, undefined, undefined, true) } tri(v1, v2, v3, c1, c2, c3) { this.ensure_trilist(); if (v1.length == 2) v1.push(0); if (v2.length == 2) v2.push(0); if (v3.length == 2) v3.push(0); this.trilist.add_tri(v1, v2, v3, c1, c2, c3); } on_draw(gl) { //Set the viewport and projection matrix for the scene gl.viewport(this.viewport[0][0], this.viewport[0][1], this.viewport[1][0], this.viewport[1][1]); var len = this.drawlists.length; for (var i=0; i<len; i++) { if (DEBUG.canvas_sep_text && this.drawlists[i] instanceof TextDraw) continue; this.drawlists[i].on_draw(gl); } if (DEBUG.canvas_sep_text) { var len = this.textlist.length; for (var i=0; i<len; i++) { this.textlist[i].on_draw(gl); } } } arc_points(pos, start, arc, r, steps) {//steps is optional if (steps == undefined) { steps = Math.floor(6*arc/Math.PI); } var f, df; var f = start; var df = arc / steps; var points = []; for (var i=0; i<steps+1; i++) { var x = pos[0] + Math.sin(f)*r; var y = pos[1] + Math.cos(f)*r; points.push([x, y, 0]); f += df; } return points; } arc(pos, start, arc, r, clr, half) { if (clr == undefined) { clr = [0.9, 0.8, 0.7, 0.6]; } var steps = 18/(2.0 - arc/(Math.PI*2)); var f, df; var f = start; var df = arc / steps; var points = []; for (var i=0; i<steps+1; i++) { var x = pos[0] + Math.sin(f)*r; var y = pos[1] + Math.cos(f)*r; points.push([x, y, 0]); f += df; } var lines = []; var colors = []; for (var i=0; i<points.length-1; i++) { lines.push([points[i], points[i+1]]) colors.push([clr, clr]) } colors[0][0] = [1.0, 1.0, 0.0, 1.0] colors[0][1] = [1.0, 1.0, 0.0, 1.0] this.trilist.line_strip(lines, colors, undefined, undefined, half); } destroy() { this.reset(); //get rid of any cache data, too for (var k in this.cache) { var arr = this.cache.get(k); for (var i=0; i<arr.length; i++) { arr[i].destroy(); arr[i] = undefined; } } this.boxcache.destroy(); this.cache = new hashtable(); if (this._id in active_canvases) { delete active_canvases[this._id]; } } reset() { /* for (var i=0; i<this.uncached.length; i++) { this.uncached[i].destroy(); this.uncached[i] = undefined; }*/ var dmap = {}; for (var k in this.cache) { var item = this.cache.get(k); for (var i=0; i<item.length; i++) { dmap[item[i]._id] = item[i]; } } var dl = this.drawlists; for (var i=0; i<dl.length; i++) { if (!(dl[i]._id in dmap)) { dl[i].destroy(); } } if (DEBUG.canvas_sep_text) { var tl = this.textlist; for (var i=0; i<tl.length; i++) { tl[i].destroy(); } this.textlist.length = 0; } this.uncached.length = 0; this.scissor_stack.length = 0; /*destroy old cache that was used in last draw cycle, then swap it with the new cache that was *built* last cycle.*/ for (var k in this.oldcache) { var arr = this.oldcache.get(k) for (var i=0; i<arr.length; i++) { arr[i].destroy(); arr[i] = undefined; } } this.oldcache = this.cache; this.cache = new hashtable(); this.drawlists.length = 0; if (this.trans_stack.length > 0) { this.trans_stack[0].makeIdentity(); this.trans_stack.length = 1; } else { this.trans_stack.length = 0; this.trans_stack.push(new Matrix4()); } this.transmat = this.trans_stack[0]; this.stack.length = 0; this.new_trilist(); } invbox(pos, size, clr, r) { var cs = uicolors["InvBox"] cs = _box_process_clr(cs, clr); this.box(pos, size, cs, r); } simple_box(pos, size, clr=undefined, r=2.0) { //clr is optional var cs = uicolors["SimpleBox"] cs = _box_process_clr(cs, clr); this.box(pos, size, cs, r); } hlightbox(pos, size, clr_mul, r) { //clr_mul is optional var cs = uicolors["HLightBox"] /*if (clr != undefined) { cs = [clr, clr, clr, clr] }*/ if (clr_mul != undefined) { cs = [new Vector4(cs[0]), new Vector4(cs[1]), new Vector4(cs[2]), new Vector4(cs[3])] for (var i=0; i<4; i++) { for (var j=0; j<4; j++) { cs[i][j] *= clr_mul; } } } this.box(pos, size, cs, r); } box_outline(pos, size, clr, rfac) { this.box(pos, size, clr, rfac, true); } shadow_box(pos, size, steps=6, margin=[6, 6], clr=uicolors["ShadowBox"]) { static neg1 = [-2, -2]; //arg, can't remember the correct formula to use here //x**steps = 0.1 //x = 0.1**(1.0/steps) var fac = (1.0/steps)*0.4; var clr = [clr[0], clr[1], clr[2], clr[3]*fac] pos = new Vector2(pos); size = new Vector2(size); expand_rect2d(pos, size, margin); for (var i=0; i<steps; i++) { this.box(pos, size, clr); expand_rect2d(pos, size, neg1); } } box(pos, size, clr, rfac, outline_only) { if (IsMobile || rfac == 0.0) return this.box2(pos, size, clr, rfac, outline_only); else //XXX return this.box1(pos, size, clr, rfac, outline_only); } /* I think this word is Dutch. it comes from photography, it means to dim the screen around a rectangle of interest. need to look up the english word. and no, I'm not Dutch. */ passpart(pos, size, clr=[0,0,0,0.5]) { this.ensure_trilist(); var p = this.viewport[0]; var s = this.viewport[1]; this.box2([p[0], p[1]], [pos[0], s[1]], clr); this.box2([p[0]+pos[0]+size[0], p[1]], [s[0]-pos[0]-size[0], s[1]], clr); this.box2([pos[0]+p[0], pos[1]+p[1]+size[1]], [size[0], s[1]-size[1]-p[1]], clr); this.box2([pos[0]+p[0], p[1]], [size[0], pos[1]], clr) } icon(int icon, Array<float> pos, float alpha=1.0, Boolean small=false, Array<float> clr=undefined) { static white = [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]; var cs = _box_process_clr(white, clr); for (var i=0; i<4; i++) { cs[i][3] = alpha; } this.ensure_trilist(); if (this.trilist.small_icons != small) { this.new_trilist(small); } this.trilist.icon_quad(icon, pos, cs); } box2(Array<float> pos, Array<float> size, Array<float> clr=undefined, float rfac=undefined, Boolean outline_only=false) { this.ensure_trilist(); var cs = uicolors["Box"]; cs = _box_process_clr(cs, clr); var x = pos[0], y=pos[1]; var w=size[0], h=size[1]; if (outline_only) { this.line([pos[0], pos[1]], [pos[0], pos[1]+size[1]], clr, clr, 1.0); this.line([pos[0], pos[1]+size[1]], [pos[0]+size[0], pos[1]+size[1]], clr, clr, 1.0); this.line([pos[0]+size[0], pos[1]+size[1]], [pos[0]+size[0], pos[1]], clr, clr, 1.0); this.line([pos[0]+size[0], pos[1]], [pos[0], pos[1]], clr, clr, 1.0); } else { this.trilist.add_quad(CACHEARR3(x, y, 0), CACHEARR3(x+w, y, 0), CACHEARR3(x+w, y+h, 0), CACHEARR3(x, y+h, 0), cs[0], cs[1], cs[2], cs[3]); } } gen_box_trilist(Array<float> size, Array<float> clr=undefined, float rfac=1, Boolean outline_only=false) { var w=size[0], h=size[1]; var start = 0, ang = Math.PI/2, r = 4; var cs = _box_process_clr(uicolors["Box"], clr); var trilist = new TriList(this, new Matrix4(), false); r /= rfac; var p1 = this.arc_points(CACHEARR3(0+r+2, 0+r+2, 0), Math.PI, ang, r); var p2 = this.arc_points(CACHEARR3(0+w-r-2, 0+r+2, 0), Math.PI/2, ang, r); var p3 = this.arc_points(CACHEARR3(0+w-r-2, 0+h-r-2, 0), 0, ang, r); var p4 = this.arc_points(CACHEARR3(0+r+2, 0+h-r-2, 0), -Math.PI/2, ang, r); var plen = p1.length; p4.reverse(); p3.reverse(); p2.reverse(); p1.reverse(); var points = []; for (var i=0; i<p1.length; i++) { points.push(p1[i]); } for (var i=0; i<p2.length; i++) { points.push(p2[i]); p1.push(p2[i]); } for (var i=0; i<p3.length; i++) { points.push(p3[i]); } p2 = p3; for (var i=0; i<p4.length; i++) { p2.push(p4[i]); points.push(p4[i]); } p2.reverse(); var plen = p1.length; function color(i) { if (i < plen) return cs[0]; else if (i < plen*2) return cs[1]; else if (i < plen*3) return cs[2]; else if (i <= plen*4+1) return cs[3]; } static v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3(), v4 = new Vector3(); #define LOAD_CLR(a, b) a[0] = b[0]; a[1] = b[1]; a[2] = b[2]; if (!outline_only) { for (var i=0; i<p1.length-1; i++) { var i1 = i; var i2 = i+plen*2; var i3 = i + 1+plen*2; var i4 = i+1; LOAD_CLR(v1, p1[i]); LOAD_CLR(v2, p2[i]); LOAD_CLR(v3, p2[i+1]); LOAD_CLR(v4, p1[i+1]); trilist.add_quad(v1, v2, v3, v4, color(i1), color(i2), color(i3), color(i4)); } } var lines = []; var colors = []; static pairs = []; for (var i=0; i<points.length; i++) { LOAD_CLR(v1, points[(i+1)%points.length]); LOAD_CLR(v2, points[i]); if (pairs.length <= i) { pairs.push([[0, 0], [0, 0]]); } pairs[i][0][0] = CACHEARR3(v1[0], v1[1], 0); pairs[i][0][1] = CACHEARR3(v2[0], v2[1], 0); lines.push(pairs[i][0]); pairs[i][1][0] = color((i+1)%points.length); pairs[i][1][1] = color(i); colors.push(pairs[i][1]); } #undef LOAD_CLR trilist.line_strip(lines, colors, undefined, outline_only ? 1.4 : 1.5, !outline_only); return trilist; } box1(Array<float> pos, Array<float> size, Array<float> clr=[0, 0, 0, 1], float rfac=1, Boolean outline_only=false) { var sclr = clr==undefined ? "u" : clr.toString(); var hash = size.toString()+sclr+rfac.toString()+(outline_only ? "|1" : "|0"); var cache = this.boxcache; if (!cache.has(hash)) { cache.set(hash, this.gen_box_trilist(size, clr, rfac, outline_only)); } static co = new Vector3(); co.loadxy(pos); co[2] = 0.0; co.multVecMatrix(this.transmat); var viewport = g_app_state.raster.viewport; var sx = viewport[1][0]; var sy = viewport[1][1]; co[0] = (Math.floor(co[0])/sx)*2.0; co[1] = (Math.floor(co[1])/sy)*2.0; var mat = new Matrix4(); mat.translate(co[0], co[1], 0.0); var ret = new TriListRef(this.gl, cache.get(hash), mat, this); this.drawlists.push(ret); return ret; } box1_old(Array<float> pos, Array<float> size, Array<float> clr=undefined, float rfac=undefined, Boolean outline_only=false) { var c1, c2, c3, c4; var cs = uicolors["Box"]; static cache = {}; if (outline_only == undefined) outline_only = false; cs = _box_process_clr(cs, clr); var x = Math.floor(pos[0]), y=Math.floor(pos[1]); var w=size[0], h=size[1]; var start = 0; var ang = Math.PI/2; var r = 4 //Math.sqrt(size[0]*size[1]) if (rfac == undefined) rfac = 1; var hash = size[0].toString() + " " + size[1] + " " + rfac; if (!(hash in cache)) { r /= rfac; var p1 = this.arc_points(CACHEARR3(0+r+2, 0+r+2, 0), Math.PI, ang, r); var p2 = this.arc_points(CACHEARR3(0+w-r-2, 0+r+2, 0), Math.PI/2, ang, r); var p3 = this.arc_points(CACHEARR3(0+w-r-2, 0+h-r-2, 0), 0, ang, r); var p4 = this.arc_points(CACHEARR3(0+r+2, 0+h-r-2, 0), -Math.PI/2, ang, r); var plen = p1.length; p4.reverse(); p3.reverse(); p2.reverse(); p1.reverse(); var points = [] for (var i=0; i<p1.length; i++) { points.push(p1[i]); } for (var i=0; i<p2.length; i++) { points.push(p2[i]); p1.push(p2[i]); } for (var i=0; i<p3.length; i++) { points.push(p3[i]); } p2 = p3; for (var i=0; i<p4.length; i++) { p2.push(p4[i]); points.push(p4[i]); } p2.reverse(); cache[hash] = [p1, p2, points]; } var cp = cache[hash]; var p1 = cp[0]; var p2 = cp[1]; var points = cp[2]; var plen = p1.length; function color(i) { if (i < plen) return cs[0]; else if (i < plen*2) return cs[1]; else if (i < plen*3) return cs[2]; else if (i <= plen*4+1) return cs[3]; } static v1 = new Vector3(), v2 = new Vector3(), v3 = new Vector3(), v4 = new Vector3(); #define LOAD_CLR(a, b) a[0] = b[0]+x; a[1] = b[1]+y; a[2] = b[2]; if (!outline_only) { for (var i=0; i<p1.length-1; i++) { var i1 = i; var i2 = i+plen*2; var i3 = i + 1+plen*2; var i4 = i+1; LOAD_CLR(v1, p1[i]); LOAD_CLR(v2, p2[i]); LOAD_CLR(v3, p2[i+1]); LOAD_CLR(v4, p1[i+1]); this.trilist.add_quad(v1, v2, v3, v4, color(i1), color(i2), color(i3), color(i4)); } } var lines = [] var colors = [] static pairs = []; for (var i=0; i<points.length; i++) { LOAD_CLR(v1, points[(i+1)%points.length]); LOAD_CLR(v2, points[i]); if (pairs.length <= i) { pairs.push([[0, 0], [0, 0]]); } pairs[i][0][0] = CACHEARR3(v1[0], v1[1], 0); pairs[i][0][1] = CACHEARR3(v2[0], v2[1], 0); lines.push(pairs[i][0]); pairs[i][1][0] = color((i+1)%points.length); pairs[i][1][1] = color(i); colors.push(pairs[i][1]); } #undef LOAD_CLR this.trilist.line_strip(lines, colors, undefined, 4, true); //this.box2(pos, size, clr, rfac, outline_only); return this.trilist } on_resize(newsize, oldsize) { this.boxcache.destroy(); //all cache entries with old size are now bad for (var k in this.textcache) { if (!this.textcache.hasOwnProperty(k)) continue; this.textcache[k].destroy(); } this.textcache = {}; this.textcachelen = 0; //clear entire cache this.destroy(); this.reset(); } text(Array<float> pos, String text, Array<float> color, float size, float scale, float rot, Array<float> scissor_pos, Array<float> scissor_size) { static loc = new Vector3(); if (rot == undefined) rot = 0.0; if (size == undefined) size = <API key>; if (scale == undefined) { scale = CACHEARR3(1.0, 1.0, 1.0); } else if (typeof(scale) == "number") { scale = CACHEARR3(scale, scale, scale); } if (color == undefined) { color = uicolors["DefaultText"] } if (scissor_pos == undefined) { if (this.scissor_stack.length > 0) { scissor_pos = this.scissor_stack[this.scissor_stack.length-1][0]; scissor_size = this.scissor_stack[this.scissor_stack.length-1][1]; } } else { scissor_pos = new Vector3([scissor_pos[0], scissor_pos[1], 0]); scissor_size = new Vector3([scissor_size[0], scissor_size[1], 0]); scissor_pos.multVecMatrix(this.transmat); } loc[0] = 0; loc[1] = 0; loc[2] = 0; loc.multVecMatrix(this.transmat); loc[0] += pos[0] loc[1] += pos[1] //yes, raster is supposed to be a nasty global var port = g_app_state.raster.viewport var sx = port[1][0] var sy = port[1][1] // /* if (!(hash in this.textcache)) { if (this.textcachelen > this.max_textcache) { var keys = Object.getOwnPropertyNames(this.textcache) for (i=0; i<keys.length; i++) { var k = keys[i]; this.textcache[k].destroy(); var users = this.textcache[k].users; //possible evil! for (var j=0; j<users.length; j++) { users[j].recalc = true; users[j].tdrawbuf = undefined; } delete this.textcache[k]; this.textcachelen--; //amortize cache destruction calls if (this.textcachelen < this.max_textcache/3) break; } } this.textcache[hash] = textdraw.gen_buffers(g_app_state.gl); this.textcachelen++; } else { textdraw.tdrawbuf = this.textcache[hash]; } this.textcache[hash].users.push(textdraw); //-XXX if (DEBUG.canvas_sep_text) { this.textlist.push(textdraw); this.drawlists.push(textdraw); if (this.stack.length == 0) { this.uncached.push(textdraw); } return loc; } else { if (this.drawlists[this.drawlists.length-1] == this.trilist) { this.drawlists.push(textdraw); this.new_trilist(); if (this.stack.length == 0) { this.uncached.push(textdraw); this.uncached.push(this.trilist); } } else { this.drawlists.push(textdraw); if (this.stack.length == 0) { this.uncached.push(textdraw); } } // */ return loc; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; namespace CJia.Health.Presenters.Web { public class MyPicturePresenter:CJia.Health.Tools.PresenterPage<Models.Web.MyPictureModel,Views.Web.IMyPictureView> { public MyPicturePresenter(Views.Web.IMyPictureView view) : base(view) { view.OnLoadPicture += view_OnLoadPicture; view.OnProjectChanged += <API key>; } void <API key>(object sender, Views.Web.MyPictureArgs e) { DataTable data = Model.GetMyPictureByProID(e.HealthID, e.ProjectID); View.<API key>(data); } void view_OnLoadPicture(object sender, Views.Web.MyPictureArgs e) { DataTable project = Model.GetMyPictureProject(e.HealthID); DataTable picture = Model.GetMyPicture(e.HealthID); View.ExeBindPicture(picture); View.ExeBindProject(project); } } }
<!DOCTYPE HTML PUBLIC "- <html> <head> <title>PowerShell - Rename-Index - Rivet</title> <link href="silk.css" type="text/css" rel="stylesheet" /> <link href="styles.css" type="text/css" rel="stylesheet" /> </head> <body> <ul id="SiteNav"> <li><a href="index.html">Get-Rivet</a></li> <!--<li><a href="<API key>.html">-Install</a></li>--> <li><a href="documentation.html">-Documentation</a></li> <!--<li><a href="<API key>.html">-Support</a></li>--> <li><a href="releasenotes.html">-ReleaseNotes</a></li> <li><a href="http://pshdo.com">-Blog</a></li> </ul> <h1>Rename-Index</h1> <div class="Synopsis"> <p>Renames an index.</p> </div> <h2>Syntax</h2> <pre class="Syntax"><code>Rename-Index [-TableName] &lt;String&gt; [-Name] &lt;String&gt; [-NewName] &lt;String&gt; [-SchemaName &lt;String&gt;] [&lt;CommonParameters&gt;]</code></pre> <h2>Description</h2> <div class="Description"> <p>SQL Server ships with a stored procedure which is used to rename certain objects. This operation wraps that stored procedure.</p> <p>Use <code>Rename-Column</code> to rename a column. Use <code>Rename-DataType</code> to rename a data type. Use <code>Rename-Object</code> to rename an object.</p> </div> <h2>Related Commands</h2> <ul class="RelatedCommands"> <li><a href="http: <li><a href="Rename-Column.html">Rename-Column</a></li> <li><a href="Rename-DataType.html">Rename-DataType</a></li> <li><a href="Rename-Object.html">Rename-Object</a></li> </ul> <h2> Parameters </h2> <table id="Parameters"> <tr> <th>Name</th> <th>Type</th> <th>Description</th> <th>Required?</th> <th>Pipeline Input</th> <th>Default Value</th> </tr> <tr valign='top'> <td>TableName</td> <td><a href="http://msdn.microsoft.com/en-us/library/system.string.aspx">String</a></td> <td class="ParamDescription"><p>The name of the table of the index to rename.</p></td> <td>true</td> <td>false</td> <td></td> </tr> <tr valign='top'> <td>Name</td> <td><a href="http://msdn.microsoft.com/en-us/library/system.string.aspx">String</a></td> <td class="ParamDescription"><p>The current name of the index.</p></td> <td>true</td> <td>false</td> <td></td> </tr> <tr valign='top'> <td>NewName</td> <td><a href="http://msdn.microsoft.com/en-us/library/system.string.aspx">String</a></td> <td class="ParamDescription"><p>The new name of the index.</p></td> <td>true</td> <td>false</td> <td></td> </tr> <tr valign='top'> <td>SchemaName</td> <td><a href="http://msdn.microsoft.com/en-us/library/system.string.aspx">String</a></td> <td class="ParamDescription"><p>The schema of the table. Default is <code>dbo</code>.</p></td> <td>false</td> <td>false</td> <td>dbo</td> </tr> </table> <h2>EXAMPLE 1</h2> <pre><code>Rename-Index -TableName 'FooBar' -Name 'IX_Fizz' -NewName 'Buzz'</code></pre> <p>Changes the name of the <code>Fizz</code> index on the <code>FooBar</code> table to <code>Buzz</code>.</p> <h2>EXAMPLE 2</h2> <pre><code>Rename-Index -SchemaName 'fizz' -TableName 'FooBar' -Name 'IX_Buzz' -NewName 'Fizz'</code></pre> <p>Demonstrates how to rename an index on a table that is in a schema other than <code>dbo</code>.</p> <h2>EXAMPLE 3</h2> <pre><code>Rename-Index 'FooBar' 'IX_Fizz' 'Buzz'</code></pre> <p>Demonstrates how to use the short form to rename the <code>Fizz</code> index on the <code>FooBar</code> table to <code>Buzz</code>: table name is first, then existing index name, then new index name.</p> <div class="Footer"> Copyright 2013 - 2016 <a href="http://pshdo.com">Aaron Jensen</a>. </div> </body> </html>
$.FAQ = function(){ $self = this; this.url = "/faq" this.send = function(inputs){ var params = new FormData(); // var csrf = $("#csrf").val(); // params.append("csrf_ID", csrf); $.each(inputs, function(key, val){ params.append(key,val); }); $.ajax({ url : $self.url, type: 'POST', async: true, processData: false, data: params, success: function(response){ response = JSON.parse(response); $self.fillQAs(response.qadata); $self.createPagination(response.metadata) }, }); }; this.fillQAs = function(data){ var qaBox = $("#faq-container .faq-item").clone(); $("#faq-container .faq-item").remove(); $.each(data, function(obj){ var $div = qaBox.clone(); $div.find(".faq-item-question h2").html(obj.question); $div.find(".faq-item-answer p").html(obj.answer); }); }; this.createPagination = function(metadata){ }; this.load = function(data){ var limit = (data.limit > 0) ? data.limit : 5; var offset = (data.page_num - 1)*limit; var inputs = { action : 'loadFaq', limit : limit, offset : offset }; $self.send(inputs); }; this.init = function(){ var inputs = { limit : 5, page_num : 1 }; $self.load(inputs); }; };
# Splanchnonema quinqueseptatum (M.E. Barr) Aptroot, 1998 SPECIES # Status SYNONYM # According to The Catalogue of Life, 3rd January 2011 # Published in Nova Hedwigia 66(1-2): 154 (1998) # Original name Massarina quinqueseptata M.E. Barr, 1992 Remarks null
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_79) on Sat Jan 09 21:52:40 PST 2016 --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Uses of Class com.fasterxml.jackson.core.ObjectCodec (Jackson-core 2.7.0 API)</title> <meta name="date" content="2016-01-09"> <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><! if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class com.fasterxml.jackson.core.ObjectCodec (Jackson-core 2.7.0 API)"; } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar_top"> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><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="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">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-all.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?com/fasterxml/jackson/core/class-use/ObjectCodec.html" target="_top">Frames</a></li> <li><a href="ObjectCodec.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All 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 com.fasterxml.jackson.core.ObjectCodec" class="title">Uses of Class<br>com.fasterxml.jackson.core.ObjectCodec</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#com.fasterxml.jackson.core">com.fasterxml.jackson.core</a></td> <td class="colLast"> <div class="block">Main public API classes of the core streaming JSON processor: most importantly <a href="../../../../../com/fasterxml/jackson/core/JsonFactory.html" title="class in com.fasterxml.jackson.core"><code>JsonFactory</code></a> used for constructing JSON parser (<a href="../../../../../com/fasterxml/jackson/core/JsonParser.html" title="class in com.fasterxml.jackson.core"><code>JsonParser</code></a>) and generator (<a href="../../../../../com/fasterxml/jackson/core/JsonGenerator.html" title="class in com.fasterxml.jackson.core"><code>JsonGenerator</code></a>) instances.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><a href="#com.fasterxml.jackson.core.base">com.fasterxml.jackson.core.base</a></td> <td class="colLast"> <div class="block">Base classes used by concrete Parser and Generator implementations; contain functionality that is not specific to JSON or input abstraction (byte vs char).</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><a href="#com.fasterxml.jackson.core.json">com.fasterxml.jackson.core.json</a></td> <td class="colLast"> <div class="block">JSON-specific parser and generator implementation classes that Jackson defines and uses.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><a href="#com.fasterxml.jackson.core.util">com.fasterxml.jackson.core.util</a></td> <td class="colLast"> <div class="block">Utility classes used by Jackson Core functionality.</div> </td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="com.fasterxml.jackson.core"> </a> <h3>Uses of <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a> in <a href="../../../../../com/fasterxml/jackson/core/package-summary.html">com.fasterxml.jackson.core</a></h3> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation"> <caption><span>Fields in <a href="../../../../../com/fasterxml/jackson/core/package-summary.html">com.fasterxml.jackson.core</a> declared as <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>protected <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></code></td> <td class="colLast"><span class="strong">JsonFactory.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/JsonFactory.html#_objectCodec">_objectCodec</a></strong></code> <div class="block">Object that implements conversion functionality between Java objects and JSON content.</div> </td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../com/fasterxml/jackson/core/package-summary.html">com.fasterxml.jackson.core</a> that return <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>protected <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></code></td> <td class="colLast"><span class="strong">JsonParser.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/JsonParser.html#_codec()">_codec</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>abstract <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></code></td> <td class="colLast"><span class="strong">JsonParser.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/JsonParser.html#getCodec()">getCodec</a></strong>()</code> <div class="block">Accessor for <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core"><code>ObjectCodec</code></a> associated with this parser, if any.</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>abstract <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></code></td> <td class="colLast"><span class="strong">JsonGenerator.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/JsonGenerator.html#getCodec()">getCodec</a></strong>()</code> <div class="block">Method for accessing the object used for writing Java object as JSON content (using method <a href="../../../../../com/fasterxml/jackson/core/JsonGenerator.html#writeObject(java.lang.Object)"><code>JsonGenerator.writeObject(java.lang.Object)</code></a>).</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></code></td> <td class="colLast"><span class="strong">JsonFactory.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/JsonFactory.html#getCodec()">getCodec</a></strong>()</code>&nbsp;</td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../com/fasterxml/jackson/core/package-summary.html">com.fasterxml.jackson.core</a> with parameters of type <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>abstract void</code></td> <td class="colLast"><span class="strong">JsonParser.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/JsonParser.html#setCodec(com.fasterxml.jackson.core.ObjectCodec)">setCodec</a></strong>(<a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;c)</code> <div class="block">Setter that allows defining <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core"><code>ObjectCodec</code></a> associated with this parser, if any.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>abstract <a href="../../../../../com/fasterxml/jackson/core/JsonGenerator.html" title="class in com.fasterxml.jackson.core">JsonGenerator</a></code></td> <td class="colLast"><span class="strong">JsonGenerator.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/JsonGenerator.html#setCodec(com.fasterxml.jackson.core.ObjectCodec)">setCodec</a></strong>(<a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;oc)</code> <div class="block">Method that can be called to set or reset the object to use for writing Java objects as JsonContent (using method <a href="../../../../../com/fasterxml/jackson/core/JsonGenerator.html#writeObject(java.lang.Object)"><code>JsonGenerator.writeObject(java.lang.Object)</code></a>).</div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/fasterxml/jackson/core/JsonFactory.html" title="class in com.fasterxml.jackson.core">JsonFactory</a></code></td> <td class="colLast"><span class="strong">JsonFactory.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/JsonFactory.html#setCodec(com.fasterxml.jackson.core.ObjectCodec)">setCodec</a></strong>(<a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;oc)</code> <div class="block">Method for associating a <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core"><code>ObjectCodec</code></a> (typically a <code>com.fasterxml.jackson.databind.ObjectMapper</code>) with this factory (and more importantly, parsers and generators it constructs).</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/fasterxml/jackson/core/JsonParser.html" title="class in com.fasterxml.jackson.core">JsonParser</a></code></td> <td class="colLast"><span class="strong">TreeNode.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/TreeNode.html#traverse(com.fasterxml.jackson.core.ObjectCodec)">traverse</a></strong>(<a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;codec)</code> <div class="block">Same as <a href="../../../../../com/fasterxml/jackson/core/TreeNode.html#traverse()"><code>TreeNode.traverse()</code></a>, but additionally passes <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core"><code>ObjectCodec</code></a> to use if <a href="../../../../../com/fasterxml/jackson/core/JsonParser.html#readValueAs(java.lang.Class)"><code>JsonParser.readValueAs(Class)</code></a> is used (otherwise caller must call <a href="../../../../../com/fasterxml/jackson/core/JsonParser.html#setCodec(com.fasterxml.jackson.core.ObjectCodec)"><code>JsonParser.setCodec(com.fasterxml.jackson.core.ObjectCodec)</code></a> on response explicitly).</div> </td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> <caption><span>Constructors in <a href="../../../../../com/fasterxml/jackson/core/package-summary.html">com.fasterxml.jackson.core</a> with parameters of type <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/JsonFactory.html#JsonFactory(com.fasterxml.jackson.core.JsonFactory,%20com.fasterxml.jackson.core.ObjectCodec)">JsonFactory</a></strong>(<a href="../../../../../com/fasterxml/jackson/core/JsonFactory.html" title="class in com.fasterxml.jackson.core">JsonFactory</a>&nbsp;src, <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;codec)</code> <div class="block">Constructor used when copy()ing a factory instance.</div> </td> </tr> <tr class="rowColor"> <td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/JsonFactory.html#JsonFactory(com.fasterxml.jackson.core.ObjectCodec)">JsonFactory</a></strong>(<a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;oc)</code>&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"><a name="com.fasterxml.jackson.core.base"> </a> <h3>Uses of <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a> in <a href="../../../../../com/fasterxml/jackson/core/base/package-summary.html">com.fasterxml.jackson.core.base</a></h3> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation"> <caption><span>Fields in <a href="../../../../../com/fasterxml/jackson/core/base/package-summary.html">com.fasterxml.jackson.core.base</a> declared as <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>protected <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></code></td> <td class="colLast"><span class="strong">GeneratorBase.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/base/GeneratorBase.html#_objectCodec">_objectCodec</a></strong></code>&nbsp;</td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../com/fasterxml/jackson/core/base/package-summary.html">com.fasterxml.jackson.core.base</a> that return <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></code></td> <td class="colLast"><span class="strong">GeneratorBase.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/base/GeneratorBase.html#getCodec()">getCodec</a></strong>()</code>&nbsp;</td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../com/fasterxml/jackson/core/base/package-summary.html">com.fasterxml.jackson.core.base</a> with parameters of type <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/fasterxml/jackson/core/JsonGenerator.html" title="class in com.fasterxml.jackson.core">JsonGenerator</a></code></td> <td class="colLast"><span class="strong">GeneratorBase.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/base/GeneratorBase.html#setCodec(com.fasterxml.jackson.core.ObjectCodec)">setCodec</a></strong>(<a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;oc)</code>&nbsp;</td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> <caption><span>Constructors in <a href="../../../../../com/fasterxml/jackson/core/base/package-summary.html">com.fasterxml.jackson.core.base</a> with parameters of type <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/base/GeneratorBase.html#GeneratorBase(int,%20com.fasterxml.jackson.core.ObjectCodec)">GeneratorBase</a></strong>(int&nbsp;features, <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;codec)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/base/GeneratorBase.html#GeneratorBase(int,%20com.fasterxml.jackson.core.ObjectCodec,%20com.fasterxml.jackson.core.json.JsonWriteContext)">GeneratorBase</a></strong>(int&nbsp;features, <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;codec, <a href="../../../../../com/fasterxml/jackson/core/json/JsonWriteContext.html" title="class in com.fasterxml.jackson.core.json">JsonWriteContext</a>&nbsp;ctxt)</code>&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"><a name="com.fasterxml.jackson.core.json"> </a> <h3>Uses of <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a> in <a href="../../../../../com/fasterxml/jackson/core/json/package-summary.html">com.fasterxml.jackson.core.json</a></h3> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing fields, and an explanation"> <caption><span>Fields in <a href="../../../../../com/fasterxml/jackson/core/json/package-summary.html">com.fasterxml.jackson.core.json</a> declared as <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Field and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>protected <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></code></td> <td class="colLast"><span class="strong"><API key>.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/json/<API key>.html#_objectCodec">_objectCodec</a></strong></code> <div class="block">Codec used for data binding when (if) requested; typically full <code>ObjectMapper</code>, but that abstract is not part of core package.</div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>protected <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></code></td> <td class="colLast"><span class="strong"><API key>.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/json/<API key>.html#_objectCodec">_objectCodec</a></strong></code>&nbsp;</td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../com/fasterxml/jackson/core/json/package-summary.html">com.fasterxml.jackson.core.json</a> that return <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></code></td> <td class="colLast"><span class="strong"><API key>.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/json/<API key>.html#getCodec()">getCodec</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></code></td> <td class="colLast"><span class="strong"><API key>.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/json/<API key>.html#getCodec()">getCodec</a></strong>()</code>&nbsp;</td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../com/fasterxml/jackson/core/json/package-summary.html">com.fasterxml.jackson.core.json</a> with parameters of type <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/fasterxml/jackson/core/JsonParser.html" title="class in com.fasterxml.jackson.core">JsonParser</a></code></td> <td class="colLast"><span class="strong"><API key>.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/json/<API key>.html#constructParser(int,%20com.fasterxml.jackson.core.ObjectCodec,%20com.fasterxml.jackson.core.sym.<API key>,%20com.fasterxml.jackson.core.sym.<API key>,%20int)">constructParser</a></strong>(int&nbsp;parserFeatures, <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;codec, <a href="../../../../../com/fasterxml/jackson/core/sym/<API key>.html" title="class in com.fasterxml.jackson.core.sym"><API key></a>&nbsp;rootByteSymbols, <a href="../../../../../com/fasterxml/jackson/core/sym/<API key>.html" title="class in com.fasterxml.jackson.core.sym"><API key></a>&nbsp;rootCharSymbols, int&nbsp;factoryFeatures)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="strong"><API key>.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/json/<API key>.html#setCodec(com.fasterxml.jackson.core.ObjectCodec)">setCodec</a></strong>(<a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;c)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="strong"><API key>.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/json/<API key>.html#setCodec(com.fasterxml.jackson.core.ObjectCodec)">setCodec</a></strong>(<a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;c)</code>&nbsp;</td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing constructors, and an explanation"> <caption><span>Constructors in <a href="../../../../../com/fasterxml/jackson/core/json/package-summary.html">com.fasterxml.jackson.core.json</a> with parameters of type <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/json/JsonGeneratorImpl.html#JsonGeneratorImpl(com.fasterxml.jackson.core.io.IOContext,%20int,%20com.fasterxml.jackson.core.ObjectCodec)">JsonGeneratorImpl</a></strong>(<a href="../../../../../com/fasterxml/jackson/core/io/IOContext.html" title="class in com.fasterxml.jackson.core.io">IOContext</a>&nbsp;ctxt, int&nbsp;features, <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;codec)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/json/<API key>.html#<API key>(com.fasterxml.jackson.core.io.IOContext,%20int,%20java.io.Reader,%20com.fasterxml.jackson.core.ObjectCodec,%20com.fasterxml.jackson.core.sym.<API key>)"><API key></a></strong>(<a href="../../../../../com/fasterxml/jackson/core/io/IOContext.html" title="class in com.fasterxml.jackson.core.io">IOContext</a>&nbsp;ctxt, int&nbsp;features, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;r, <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;codec, <a href="../../../../../com/fasterxml/jackson/core/sym/<API key>.html" title="class in com.fasterxml.jackson.core.sym"><API key></a>&nbsp;st)</code> <div class="block">Method called when input comes as a <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io"><code>Reader</code></a>, and buffer allocation can be done using default mechanism.</div> </td> </tr> <tr class="altColor"> <td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/json/<API key>.html#<API key>(com.fasterxml.jackson.core.io.IOContext,%20int,%20java.io.Reader,%20com.fasterxml.jackson.core.ObjectCodec,%20com.fasterxml.jackson.core.sym.<API key>,%20char[],%20int,%20int,%20boolean)"><API key></a></strong>(<a href="../../../../../com/fasterxml/jackson/core/io/IOContext.html" title="class in com.fasterxml.jackson.core.io">IOContext</a>&nbsp;ctxt, int&nbsp;features, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Reader.html?is-external=true" title="class or interface in java.io">Reader</a>&nbsp;r, <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;codec, <a href="../../../../../com/fasterxml/jackson/core/sym/<API key>.html" title="class in com.fasterxml.jackson.core.sym"><API key></a>&nbsp;st, char[]&nbsp;inputBuffer, int&nbsp;start, int&nbsp;end, boolean&nbsp;bufferRecyclable)</code> <div class="block">Method called when caller wants to provide input buffer directly, and it may or may not be recyclable use standard recycle context.</div> </td> </tr> <tr class="rowColor"> <td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/json/UTF8JsonGenerator.html#UTF8JsonGenerator(com.fasterxml.jackson.core.io.IOContext,%20int,%20com.fasterxml.jackson.core.ObjectCodec,%20java.io.OutputStream)">UTF8JsonGenerator</a></strong>(<a href="../../../../../com/fasterxml/jackson/core/io/IOContext.html" title="class in com.fasterxml.jackson.core.io">IOContext</a>&nbsp;ctxt, int&nbsp;features, <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;codec, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;out)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/json/UTF8JsonGenerator.html#UTF8JsonGenerator(com.fasterxml.jackson.core.io.IOContext,%20int,%20com.fasterxml.jackson.core.ObjectCodec,%20java.io.OutputStream,%20byte[],%20int,%20boolean)">UTF8JsonGenerator</a></strong>(<a href="../../../../../com/fasterxml/jackson/core/io/IOContext.html" title="class in com.fasterxml.jackson.core.io">IOContext</a>&nbsp;ctxt, int&nbsp;features, <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;codec, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a>&nbsp;out, byte[]&nbsp;outputBuffer, int&nbsp;outputOffset, boolean&nbsp;bufferRecyclable)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/json/<API key>.html#<API key>(com.fasterxml.jackson.core.io.IOContext,%20int,%20java.io.InputStream,%20com.fasterxml.jackson.core.ObjectCodec,%20com.fasterxml.jackson.core.sym.<API key>,%20byte[],%20int,%20int,%20boolean)"><API key></a></strong>(<a href="../../../../../com/fasterxml/jackson/core/io/IOContext.html" title="class in com.fasterxml.jackson.core.io">IOContext</a>&nbsp;ctxt, int&nbsp;features, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;in, <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;codec, <a href="../../../../../com/fasterxml/jackson/core/sym/<API key>.html" title="class in com.fasterxml.jackson.core.sym"><API key></a>&nbsp;sym, byte[]&nbsp;inputBuffer, int&nbsp;start, int&nbsp;end, boolean&nbsp;bufferRecyclable)</code>&nbsp;</td> </tr> <tr class="altColor"> <td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/json/<API key>.html#<API key>(com.fasterxml.jackson.core.io.IOContext,%20int,%20com.fasterxml.jackson.core.ObjectCodec,%20java.io.Writer)"><API key></a></strong>(<a href="../../../../../com/fasterxml/jackson/core/io/IOContext.html" title="class in com.fasterxml.jackson.core.io">IOContext</a>&nbsp;ctxt, int&nbsp;features, <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;codec, <a href="http://docs.oracle.com/javase/7/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a>&nbsp;w)</code>&nbsp;</td> </tr> </tbody> </table> </li> <li class="blockList"><a name="com.fasterxml.jackson.core.util"> </a> <h3>Uses of <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a> in <a href="../../../../../com/fasterxml/jackson/core/util/package-summary.html">com.fasterxml.jackson.core.util</a></h3> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../com/fasterxml/jackson/core/util/package-summary.html">com.fasterxml.jackson.core.util</a> that return <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code><a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></code></td> <td class="colLast"><span class="strong">JsonParserDelegate.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/util/JsonParserDelegate.html#getCodec()">getCodec</a></strong>()</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></code></td> <td class="colLast"><span class="strong"><API key>.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/util/<API key>.html#getCodec()">getCodec</a></strong>()</code>&nbsp;</td> </tr> </tbody> </table> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation"> <caption><span>Methods in <a href="../../../../../com/fasterxml/jackson/core/util/package-summary.html">com.fasterxml.jackson.core.util</a> with parameters of type <a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>void</code></td> <td class="colLast"><span class="strong">JsonParserDelegate.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/util/JsonParserDelegate.html#setCodec(com.fasterxml.jackson.core.ObjectCodec)">setCodec</a></strong>(<a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;c)</code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colFirst"><code><a href="../../../../../com/fasterxml/jackson/core/JsonGenerator.html" title="class in com.fasterxml.jackson.core">JsonGenerator</a></code></td> <td class="colLast"><span class="strong"><API key>.</span><code><strong><a href="../../../../../com/fasterxml/jackson/core/util/<API key>.html#setCodec(com.fasterxml.jackson.core.ObjectCodec)">setCodec</a></strong>(<a href="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">ObjectCodec</a>&nbsp;oc)</code>&nbsp;</td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <div class="bottomNav"><a name="navbar_bottom"> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>"> </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="../../../../../com/fasterxml/jackson/core/ObjectCodec.html" title="class in com.fasterxml.jackson.core">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-all.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?com/fasterxml/jackson/core/class-use/ObjectCodec.html" target="_top">Frames</a></li> <li><a href="ObjectCodec.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../allclasses-noframe.html">All 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> <p class="legalCopy"><small>Copyright & </body> </html>
package com.board; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import java.util.List; public class BoardDAO { private Connection conn; public BoardDAO(Connection conn){ this.conn = conn; } //1. num public int getMaxNum(){ int maxNum = 0; PreparedStatement pstmt = null; ResultSet rs = null; String sql; try { sql = "select nvl(max(num),0) from board"; pstmt = conn.prepareStatement(sql); rs = pstmt.executeQuery(); if(rs.next()){ maxNum = rs.getInt(1); } rs.close(); pstmt.close(); } catch (Exception e) { System.out.println(e.toString()); } return maxNum; } // (created.jsp -> created_ok.jsp) public int insertData(BoardForm dto){ int result = 0; /* PreparedStatement pstmt = null; StringBuffer sql = new StringBuffer(); */ PreparedStatement pstmt = null; String sql; try { /* sql.append("insert into board"); sql.append("(num, name, pwd, email, subject, content,"); */ sql = "insert into board" + "(num, name, pwd, email, subject, content," + "ipAddr, hitCount, created) " + "values(?, ?, ?, ?, ?, ?, ?, 0, sysdate)"; pstmt = conn.prepareStatement(sql); pstmt.setInt(1, dto.getNum()); pstmt.setString(2, dto.getName()); pstmt.setString(3, dto.getPwd()); pstmt.setString(4, dto.getEmail()); pstmt.setString(5, dto.getSubject()); pstmt.setString(6, dto.getContent()); pstmt.setString(7, dto.getIpAddr()); result = pstmt.executeUpdate(); pstmt.close(); } catch (Exception e) { System.out.println("# insertData"); System.out.println(e.toString()); } return result; } public List<BoardForm> getList(int start, int end){ List<BoardForm> lists = new ArrayList<BoardForm>(); PreparedStatement pstmt = null; ResultSet rs = null; String sql; try { sql = "select * from ("; sql += "select rownum rnum,data.* " + " from (select num,name,subject,hitCount," + " to_char(created, 'YYYY-MM-DD') created" + " from board order by num desc) data )" + " where rnum >= ? and rnum <= ? "; pstmt = conn.prepareStatement(sql); pstmt.setInt(1, start); pstmt.setInt(2, end); rs = pstmt.executeQuery(); while(rs.next()){ BoardForm dto = new BoardForm(); dto.setNum(rs.getInt(2)); dto.setName(rs.getString(3)); dto.setSubject(rs.getString(4)); dto.setHitCount(rs.getInt(5)); dto.setCreated(rs.getString(6)); lists.add(dto); } rs.close(); pstmt.close(); } catch (Exception e) { System.out.println(e.toString()); } return lists; } public int getDataCount(){ int result= 0; PreparedStatement pstmt = null; ResultSet rs = null; String sql; try { sql = "select nvl(count(*),0) from board"; pstmt = conn.prepareStatement(sql); rs = pstmt.executeQuery(); if(rs.next()){ result = rs.getInt(1); } rs.close(); pstmt.close(); } catch (Exception e) { System.out.println(e.toString()); } return result; } public int updateHitCount(int num){ int result = 0; PreparedStatement pstmt = null; String sql; try { sql = "update board set hitCount=hitCount+1 where num=?" ; pstmt = conn.prepareStatement(sql); pstmt.setInt(1, num); result = pstmt.executeUpdate(); pstmt.close(); } catch (Exception e) { System.out.println(e.toString()); } return result; } public BoardForm getReadData(int num){ BoardForm dto = null; PreparedStatement pstmt = null; ResultSet rs = null; String sql; try { sql = "select num, name, pwd, email, subject, content, ipaddr, created, hitCount " + "from board where num=?"; pstmt = conn.prepareStatement(sql); pstmt.setInt(1, num); rs = pstmt.executeQuery(); if(rs.next()){ dto = new BoardForm(); dto.setNum(rs.getInt("num")); dto.setName(rs.getString("name")); dto.setPwd(rs.getString("pwd")); dto.setEmail(rs.getString("email")); dto.setSubject(rs.getString("subject")); dto.setContent(rs.getString("content")); dto.setIpAddr(rs.getString("ipAddr")); dto.setHitCount(rs.getInt("hitCount")); dto.setCreated(rs.getString("created")); } rs.close(); pstmt.close(); } catch (Exception e) { System.out.println(e.toString()); } return dto; } public int deleteData(int num){ int result = 0; PreparedStatement pstmt = null; String sql; try { sql = "delete board where num=?"; pstmt = conn.prepareStatement(sql); pstmt.setInt(1, num); result = pstmt.executeUpdate(); pstmt.close(); } catch (Exception e) { System.out.println(e.toString()); } return result; } public int updateData(BoardForm dto){ int result = 0; PreparedStatement pstmt = null; String sql; try { sql = "update board set name=?, pwd=?, subject=?, content=?, email=? where num=? "; pstmt = conn.prepareStatement(sql); pstmt.setString(1, dto.getName()); pstmt.setString(2, dto.getPwd()); pstmt.setString(3, dto.getSubject()); pstmt.setString(4, dto.getContent()); pstmt.setString(5, dto.getEmail()); pstmt.setInt(6, dto.getNum()); result = pstmt.executeUpdate(); pstmt.close(); } catch (Exception e) { System.out.println(e.toString()); } return result; } public int getDataCount(String searchKey, String searchValue){ int result= 0; PreparedStatement pstmt = null; ResultSet rs = null; String sql; try { searchValue = "%" + searchValue + "%"; sql = "select nvl(count(*),0) from board where "+searchKey + " like ?"; pstmt = conn.prepareStatement(sql); pstmt.setString(1, searchValue); rs = pstmt.executeQuery(); if(rs.next()){ result = rs.getInt(1); } rs.close(); pstmt.close(); } catch (Exception e) { System.out.println(e.toString()); } return result; } public List<BoardForm> getList(int start, int end, String searchKey, String searchValue){ List<BoardForm> lists = new ArrayList<BoardForm>(); PreparedStatement pstmt = null; ResultSet rs = null; String sql; try { searchValue = "%" + searchValue + "%"; sql = "select * from ("; sql += "select rownum rnum,data.* " + " from (select num,name,subject,hitCount," + " to_char(created, 'YYYY-MM-DD') created" + " from board where "+searchKey + " like ? order by num desc) data )" + " where rnum >= ? and rnum <= ? "; pstmt = conn.prepareStatement(sql); pstmt.setString(1, searchValue); pstmt.setInt(2, start); pstmt.setInt(3, end); rs = pstmt.executeQuery(); while(rs.next()){ BoardForm dto = new BoardForm(); dto.setNum(rs.getInt(2)); dto.setName(rs.getString(3)); dto.setSubject(rs.getString(4)); dto.setHitCount(rs.getInt(5)); dto.setCreated(rs.getString(6)); lists.add(dto); } rs.close(); pstmt.close(); } catch (Exception e) { System.out.println(e.toString()); } return lists; } }
<html> <head> </head> <body> testf </body> </html>
<! $Id: package.html 35201 2011-07-22 14:58:48Z juergens $ @version $Rev: 35201 $ @ConQAT.Rating GREEN Hash: <API key> <body> Processors and nodes for analyzing ConQAT itself. </body>
package io.quarkus.it.spring.data.jpa; import java.io.Serializable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.repository.NoRepositoryBean; @NoRepositoryBean public interface <API key><T, ID extends Serializable> extends JpaRepository<T, ID> { default public void doNothing() { } default public T findMandatoryById(ID id) { return findById(id).orElseThrow(() -> new <API key>("not found: " + id)); } }
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_55) on Sun Oct 26 05:56:34 EDT 2014 --> <meta http-equiv="Content-Type" content="text/html" charset="utf-8"> <title>Uses of Class org.apache.solr.handler.component.FacetComponent.FacetBase (Solr 4.10.2 API)</title> <meta name="date" content="2014-10-26"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> </head> <body> <script type="text/javascript"><! if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.apache.solr.handler.component.FacetComponent.FacetBase (Solr 4.10.2 API)"; } </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar_top"> </a><a href="#skip-navbar_top" title="Skip navigation links"></a><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/apache/solr/handler/component/FacetComponent.FacetBase.html" title="class in org.apache.solr.handler.component">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="../../../../../../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/apache/solr/handler/component/class-use/FacetComponent.FacetBase.html" target="_top">Frames</a></li> <li><a href="FacetComponent.FacetBase.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All 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.apache.solr.handler.component.FacetComponent.FacetBase" class="title">Uses of Class<br>org.apache.solr.handler.component.FacetComponent.FacetBase</h2> </div> <div class="classUseContainer"> <ul class="blockList"> <li class="blockList"> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation"> <caption><span>Packages that use <a href="../../../../../../org/apache/solr/handler/component/FacetComponent.FacetBase.html" title="class in org.apache.solr.handler.component">FacetComponent.FacetBase</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Package</th> <th class="colLast" scope="col">Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><a href="#org.apache.solr.handler.component">org.apache.solr.handler.component</a></td> <td class="colLast"> <div class="block"> <a href="../../../../../../org/apache/solr/handler/component/SearchComponent.html" title="class in org.apache.solr.handler.component"><code>SearchComponent</code></a> implementations for use in <a href="../../../../../../org/apache/solr/handler/component/SearchHandler.html" title="class in org.apache.solr.handler.component"><code>SearchHandler</code></a></div> </td> </tr> </tbody> </table> </li> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="org.apache.solr.handler.component"> </a> <h3>Uses of <a href="../../../../../../org/apache/solr/handler/component/FacetComponent.FacetBase.html" title="class in org.apache.solr.handler.component">FacetComponent.FacetBase</a> in <a href="../../../../../../org/apache/solr/handler/component/package-summary.html">org.apache.solr.handler.component</a></h3> <table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subclasses, and an explanation"> <caption><span>Subclasses of <a href="../../../../../../org/apache/solr/handler/component/FacetComponent.FacetBase.html" title="class in org.apache.solr.handler.component">FacetComponent.FacetBase</a> in <a href="../../../../../../org/apache/solr/handler/component/package-summary.html">org.apache.solr.handler.component</a></span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Class and Description</th> </tr> <tbody> <tr class="altColor"> <td class="colFirst"><code>static class&nbsp;</code></td> <td class="colLast"><code><strong><a href="../../../../../../org/apache/solr/handler/component/FacetComponent.DistribFieldFacet.html" title="class in org.apache.solr.handler.component">FacetComponent.DistribFieldFacet</a></strong></code> <div class="block"><b>This API is experimental and subject to change</b></div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>static class&nbsp;</code></td> <td class="colLast"><code><strong><a href="../../../../../../org/apache/solr/handler/component/FacetComponent.FieldFacet.html" title="class in org.apache.solr.handler.component">FacetComponent.FieldFacet</a></strong></code> <div class="block"><b>This API is experimental and subject to change</b></div> </td> </tr> <tr class="altColor"> <td class="colFirst"><code>static class&nbsp;</code></td> <td class="colLast"><code><strong><a href="../../../../../../org/apache/solr/handler/component/FacetComponent.QueryFacet.html" title="class in org.apache.solr.handler.component">FacetComponent.QueryFacet</a></strong></code> <div class="block"><b>This API is experimental and subject to change</b></div> </td> </tr> <tr class="rowColor"> <td class="colFirst"><code>class&nbsp;</code></td> <td class="colLast"><code><strong><a href="../../../../../../org/apache/solr/handler/component/PivotFacet.html" title="class in org.apache.solr.handler.component">PivotFacet</a></strong></code> <div class="block">Models a single instance of a "pivot" specified by a <a href="../../../../../../../solr-solrj/org/apache/solr/common/params/FacetParams.html?is-external=true#FACET_PIVOT" title="class or interface in org.apache.solr.common.params"><code>FacetParams.FACET_PIVOT</code></a> param, which may contain multiple nested fields.</div> </td> </tr> </tbody> </table> </li> </ul> </li> </ul> </div> <div class="bottomNav"><a name="navbar_bottom"> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>"> </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/apache/solr/handler/component/FacetComponent.FacetBase.html" title="class in org.apache.solr.handler.component">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="../../../../../../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/apache/solr/handler/component/class-use/FacetComponent.FacetBase.html" target="_top">Frames</a></li> <li><a href="FacetComponent.FacetBase.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All 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> <p class="legalCopy"><small> <i>Copyright &copy; 2000-2014 Apache Software Foundation. All Rights Reserved.</i> <script src='../../../../../../prettify.js' type='text/javascript'></script> <script type='text/javascript'> (function(){ var oldonload = window.onload; if (typeof oldonload != 'function') { window.onload = prettyPrint; } else { window.onload = function() { oldonload(); prettyPrint(); } } })(); </script> </small></p> </body> </html>
package com.mygame; import java.util.Vector; import loon.geom.RectBox; public class StepSwitch extends Switch { StepSwitch(int x, int y, Vector<Thing> blocks) { this.x = x; this.y = y; this.blocks = blocks; orgblocks = new Vector<Thing>(); for(int i = 0; i < blocks.size(); i++) orgblocks.add((Thing)blocks.get(i)); height = 50; width = 50; active = false; col = new RectBox(x, y, width, height); } public void update(Player player, Vector<Thing> things) { boolean b = false; for(int i = 0; i < things.size(); i++) if(col.intersects((int)((Thing)things.get(i)).x, (int)((Thing)things.get(i)).y, ((Thing)things.get(i)).width, ((Thing)things.get(i)).height) && !b) { b = true; active = true; blocks.clear(); } if(col.intersects((int)player.x, (int)player.y, player.width, player.height)) { b = true; active = true; blocks.clear(); } if(!b) { active = false; if(blocks.isEmpty()) { for(int i = 0; i < orgblocks.size(); i++) blocks.add((Thing)orgblocks.get(i)); } } } }
package com.thecoderscorner.groovychart.axis; import java.beans.<API key>; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; import com.thecoderscorner.groovychart.chart.Buildable; import com.thecoderscorner.groovychart.chart.ChartBuilder; import com.thecoderscorner.groovychart.chart.BeanBuilder; import org.jfree.chart.axis.NumberAxis; /** * * @author jclarke */ public class NumberAxisBuilder extends BeanBuilder implements Buildable{ private static final Logger logger = Logger.getLogger(NumberAxisBuilder.class.getPackage().getName()); private NumberAxis axis = new NumberAxis(); private boolean domain; /** * Creates a new instance of DateAxisBuilder */ public NumberAxisBuilder() { try { setBeanClass(NumberAxis.class); } catch (<API key> ex) { logger.log(Level.WARNING, ex.getMessage(), ex); } } public void setChartBuilder(ChartBuilder chartBuilder) { } public void processNode(Object name, Map map, Object value) throws Exception { String method = name.toString(); if(value != null) { this.axis = (NumberAxis)value; }else { if(logger.isLoggable(Level.FINEST)) logger.finest("processNode: method = " + method); if(method.equalsIgnoreCase("NumberAxis")) { this.setProperties(this.axis, map); } } } private Object parent; public Object getParent() { return parent; } public void setParent(Object parent) { this.parent = parent; } public void nodeCompleted(Object parent) { if(parent != null && parent instanceof AxisSettable) { logger.finest("Setting axis on parent"); ((AxisSettable)parent).setAxis(this.axis); } } private String name; public String getName() { return this.name; } public void setName(String name) { this.name = name; } public NumberAxis getAxis() { return axis; } }
#!/bin/bash rm -rf php-5.3.29 if [ ! -f php-5.3.29.tar.gz ];then wget http://zy-res.oss-cn-hangzhou.aliyuncs.com/php/php-5.3.29.tar.gz fi tar zxvf php-5.3.29.tar.gz cd php-5.3.29 ./configure --prefix=/alidata/server/php \ --<API key>=/alidata/server/php/etc \ --with-mysql=mysqlnd \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --enable-fpm \ --enable-fastcgi \ --enable-static \ --<API key> \ --<API key> \ --<API key> \ --enable-sockets \ --enable-wddx \ --enable-zip \ --enable-calendar \ --enable-bcmath \ --enable-soap \ --with-zlib \ --with-iconv \ --with-gd \ --with-xmlrpc \ --enable-mbstring \ --without-sqlite \ --with-curl \ --enable-ftp \ --with-mcrypt \ --with-freetype-dir=/usr/local/freetype.2.1.10 \ --with-jpeg-dir=/usr/local/jpeg.6 \ --with-png-dir=/usr/local/libpng.1.2.50 \ --disable-ipv6 \ --disable-debug \ --with-openssl \ --<API key> \ --disable-safe-mode \ --disable-fileinfo CPU_NUM=$(cat /proc/cpuinfo | grep processor | wc -l) if [ $CPU_NUM -gt 1 ];then make ZEND_EXTRA_LIBS='-liconv' -j$CPU_NUM else make ZEND_EXTRA_LIBS='-liconv' fi make install cd .. cp ./php-5.3.29/php.ini-production /alidata/server/php/etc/php.ini #adjust php.ini sed -i 's#; extension_dir = \"\.\/\"#extension_dir = "/alidata/server/php/lib/php/extensions/<API key>/"#' /alidata/server/php/etc/php.ini sed -i 's/post_max_size = 8M/post_max_size = 64M/g' /alidata/server/php/etc/php.ini sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 64M/g' /alidata/server/php/etc/php.ini sed -i 's/;date.timezone =/date.timezone = PRC/g' /alidata/server/php/etc/php.ini sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=1/g' /alidata/server/php/etc/php.ini sed -i 's/max_execution_time = 30/max_execution_time = 300/g' /alidata/server/php/etc/php.ini #adjust php-fpm cp /alidata/server/php/etc/php-fpm.conf.default /alidata/server/php/etc/php-fpm.conf sed -i 's,user = nobody,user=www,g' /alidata/server/php/etc/php-fpm.conf sed -i 's,group = nobody,group=www,g' /alidata/server/php/etc/php-fpm.conf sed -i 's,^pm.min_spare_servers = 1,pm.min_spare_servers = 5,g' /alidata/server/php/etc/php-fpm.conf sed -i 's,^pm.max_spare_servers = 3,pm.max_spare_servers = 35,g' /alidata/server/php/etc/php-fpm.conf sed -i 's,^pm.max_children = 5,pm.max_children = 100,g' /alidata/server/php/etc/php-fpm.conf sed -i 's,^pm.start_servers = 2,pm.start_servers = 20,g' /alidata/server/php/etc/php-fpm.conf sed -i 's,;pid = run/php-fpm.pid,pid = run/php-fpm.pid,g' /alidata/server/php/etc/php-fpm.conf sed -i 's,;error_log = log/php-fpm.log,error_log = /alidata/log/php/php-fpm.log,g' /alidata/server/php/etc/php-fpm.conf sed -i 's,;slowlog = log/$pool.log.slow,slowlog = /alidata/log/php/\$pool.log.slow,g' /alidata/server/php/etc/php-fpm.conf #self start install -v -m755 ./php-5.3.29/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm /etc/init.d/php-fpm start sleep 5
<pre style="word-wrap: break-word; white-space: pre-wrap;"> This corpus were recorded in silence in-door environment using cellphone. It has 10 speakers. Each speaker has about 350 utterances. All utterances were carefully transcribed and checked by human. Transcription accuracy is guaranteed. If there is any problems, we agree to correct them for you. Please cite the data as “ST-AEDS-20180100_1, Free ST American English Corpus”. The data set is a subset of a much bigger data set (about 1000hours) which was recorded in the same environment as this open source data. Please visit our website <a target="_Blank" href="https: </pre>
$(document).ready(function(){ $('#datepickerDay1').hide(); $('#datepickerDay2').hide(); $('#datepickerMnd1').hide(); $('#datepickerMnd2').hide(); $('#datepickerYear1').hide(); $('#datepickerYear2').hide(); $('select').change(function(){ var index = $('select').val(); if(index == 0){ //day $('#datepickerDay1').show(); $('#datepickerDay2').show(); $('#datepickerMnd1').hide(); $('#datepickerMnd2').hide(); $('#datepickerYear1').hide(); $('#datepickerYear2').hide(); localStorage.setItem('type','0'); } else if(index == 1){ //month $('#datepickerMnd1').show(); $('#datepickerMnd2').show(); $('#datepickerDay1').hide(); $('#datepickerDay2').hide(); $('#datepickerYear1').hide(); $('#datepickerYear2').hide(); localStorage.setItem('type','1'); } else if(index == 2){ //year $('#datepickerYear1').show(); $('#datepickerYear2').show(); $('#datepickerDay1').hide(); $('#datepickerDay2').hide(); $('#datepickerMnd1').hide(); $('#datepickerMnd2').hide(); localStorage.setItem('type','2'); } }); $('#datepickerDay1').datepicker({ format: "yyyy-mm-dd", weekStart: 1, language: "no", todayHighlight: true }); $('#datepickerDay1').on('changeDate', function(ev){ $(this).datepicker('hide'); day1(); if ($('input[name=date2]').val() != "") { showChart1(); showChart2(); showChart3(); showChart4(); showChart5(); showChart6(); } }); $('#datepickerDay2').datepicker({ format: "yyyy-mm-dd", weekStart: 1, language: "no", todayHighlight: true }); $('#datepickerDay2').on('changeDate', function(ev){ $(this).datepicker('hide'); day2(); if ($('input[name=date]').val() != "") { showChart1(); showChart2(); showChart3(); showChart4(); showChart5(); showChart6(); } }); $('#datepickerYear1').datepicker({ format: "yyyy", weekStart: 1, startView: 1, minViewMode: 2, language: "no", todayHighlight: true }); $('#datepickerYear1').on('changeDate', function(ev){ $(this).datepicker('hide'); year1(); if ($('input[name=date6]').val() != "") { showChart1(); showChart2(); showChart3(); showChart4(); showChart5(); showChart6(); } }); $('#datepickerYear2').datepicker({ format: "yyyy", weekStart: 1, startView: 1, minViewMode: 2, language: "no", todayHighlight: true }); $('#datepickerYear2').on('changeDate', function(ev){ $(this).datepicker('hide'); year2(); if ($('input[name=date5]').val() != "") { showChart1(); showChart2(); showChart3(); showChart4(); showChart5(); showChart6(); } }); $('#datepickerMnd1').datepicker({ format: "yyyy-mm", weekStart: 1, startView: 0, minViewMode: 1, language: "no", todayHighlight: true }); $('#datepickerMnd1').on('changeDate', function(ev){ $(this).datepicker('hide'); mnd1(); if ($('input[name=date4]').val() != "") { showChart1(); showChart2(); showChart3(); showChart4(); showChart5(); showChart6(); } }); $('#datepickerMnd2').datepicker({ format: "yyyy-mm", weekStart: 1, startView: 0, minViewMode: 1, language: "no", todayHighlight: true }); $('#datepickerMnd2').on('changeDate', function(ev){ $(this).datepicker('hide'); mnd2(); if ($('input[name=date3]').val() != "") { showChart1(); showChart2(); showChart3(); showChart4(); showChart5(); showChart6(); } }); $('#backBtn').on('click', function(ev){ window.location.replace("../pages/stats.php"); }); function day1(){ var day = $('input[name=date]').val(); var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("firstDate").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET", "../phpBackend/OrgStat/day.php?date=" + day, true); xmlhttp.send(); } function day2(){ var day = $('input[name=date2]').val(); var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("lastDate").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET", "../phpBackend/OrgStat/day.php?date=" + day, true); xmlhttp.send(); } function mnd1(){ var day = $('input[name=date3]').val() + '-01'; var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("firstDate").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET", "../phpBackend/OrgStat/month.php?date=" + day, true); xmlhttp.send(); } function mnd2(){ var day = $('input[name=date4]').val() + '-01'; var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("lastDate").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET", "../phpBackend/OrgStat/month.php?date=" + day, true); xmlhttp.send(); } function year1(){ var day = $('input[name=date5]').val(); var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("firstDate").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET", "../phpBackend/OrgStat/year.php?date=" + day, true); xmlhttp.send(); } function year2(){ var day = $('input[name=date6]').val(); var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { document.getElementById("lastDate").innerHTML = xmlhttp.responseText; } } xmlhttp.open("GET", "../phpBackend/OrgStat/year.php?date=" + day, true); xmlhttp.send(); } function showChart1(){ var data = [ { value: 1, color:"#1AA24C", highlight: "#1AD24C", label: "Valg 2" }, { value: 1, color: "#000000", highlight: "#333333", label: "Valg 1" } ] var ctx = $('#statistikk1').get(0).getContext("2d"); var myDoughnut = new Chart(ctx).Doughnut(data,{ animation:true, showTooltips: true, <API key> : 0, segmentShowStroke : true }); var res1; var res2; var x = localStorage.getItem('type'); if(x == 0){ //day var date1 = $('input[name=date]').val(); var date2 = $('input[name=date2]').val(); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 1, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 1, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#followersFirstDate").text(res1); $("#followersLastDate").text(res2); }, }); }, }); }else if(x == 1){ //month var date1 = $('input[name=date3]').val() + '-01'; var date2 = $('input[name=date4]').val() + '-01'; $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 2, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 2, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#followersFirstDate").text(res1); $("#followersLastDate").text(res2); }, }); }, }); }else if(x == 2){ //year var date1 = $('input[name=date5]').val(); var date2 = $('input[name=date6]').val(); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 3, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 3, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#followersFirstDate").text(res1); $("#followersLastDate").text(res2); }, }); }, }); } } function showChart2(){ var data = [ { value: 1, color:"#1AA24C", highlight: "#1AD24C", label: "Valg 2" }, { value: 1, color: "#000000", highlight: "#333333", label: "Valg 1" } ] var ctx = $('#statistikk2').get(0).getContext("2d"); var myDoughnut = new Chart(ctx).Doughnut(data,{ animation:true, showTooltips: true, <API key> : 0, segmentShowStroke : true }); var res1; var res2; var x = localStorage.getItem('type'); if(x == 0){ //day var date1 = $('input[name=date]').val(); var date2 = $('input[name=date2]').val(); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 4, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 4, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#donationsFirstDate").text(res1); $("#donationsLastDate").text(res2); }, }); }, }); }else if(x == 1){ //month var date1 = $('input[name=date3]').val() + '-01'; var date2 = $('input[name=date4]').val() + '-01'; $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 5, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 5, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#donationsFirstDate").text(res1); $("#donationsLastDate").text(res2); }, }); }, }); }else if(x == 2){ //year var date1 = $('input[name=date5]').val(); var date2 = $('input[name=date6]').val(); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 6, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 6, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#donationsFirstDate").text(res1); $("#donationsLastDate").text(res2); }, }); }, }); } } function showChart3(){ var data = [ { value: 1, color:"#1AA24C", highlight: "#1AD24C", label: "Valg 2" }, { value: 1, color: "#000000", highlight: "#333333", label: "Valg 1" } ] var ctx = $('#statistikk3').get(0).getContext("2d"); var myDoughnut = new Chart(ctx).Doughnut(data,{ animation:true, showTooltips: true, <API key> : 0, segmentShowStroke : true }); var res1; var res2; var x = localStorage.getItem('type'); if(x == 0){ //day var date1 = $('input[name=date]').val(); var date2 = $('input[name=date2]').val(); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 7, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 7, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#<API key>").text(res1 + ",-"); $("#<API key>").text(res2 + ",-"); }, }); }, }); }else if(x == 1){ //month var date1 = $('input[name=date3]').val() + '-01'; var date2 = $('input[name=date4]').val() + '-01'; $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 8, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 8, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#<API key>").text(res1 + ",-"); $("#<API key>").text(res2 + ",-"); }, }); }, }); }else if(x == 2){ //year var date1 = $('input[name=date5]').val(); var date2 = $('input[name=date6]').val(); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 9, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 9, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#<API key>").text(res1 + ",-"); $("#<API key>").text(res2 + ",-"); }, }); }, }); } } function showChart4(){ var data = [ { value: 1, color:"#1AA24C", highlight: "#1AD24C", label: "Valg 2" }, { value: 1, color: "#000000", highlight: "#333333", label: "Valg 1" } ] var ctx = $('#statistikk4').get(0).getContext("2d"); var myDoughnut = new Chart(ctx).Doughnut(data,{ animation:true, showTooltips: true, <API key> : 0, segmentShowStroke : true }); var res1; var res2; var x = localStorage.getItem('type'); if(x == 0){ //day var date1 = $('input[name=date]').val(); var date2 = $('input[name=date2]').val(); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 10, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 10, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#<API key>").text(res1 + ",-"); $("#<API key>").text(res2 + ",-"); }, }); }, }); }else if(x == 1){ //month var date1 = $('input[name=date3]').val() + '-01'; var date2 = $('input[name=date4]').val() + '-01'; $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 11, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 11, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#<API key>").text(res1 + ",-"); $("#<API key>").text(res2 + ",-"); }, }); }, }); }else if(x == 2){ //year var date1 = $('input[name=date5]').val(); var date2 = $('input[name=date6]').val(); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 12, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 12, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#<API key>").text(res1 + ",-"); $("#<API key>").text(res2 + ",-"); }, }); }, }); } } function showChart5(){ var data = [ { value: 1, color:"#1AA24C", highlight: "#1AD24C", label: "Valg 2" }, { value: 1, color: "#000000", highlight: "#333333", label: "Valg 1" } ] var ctx = $('#statistikk5').get(0).getContext("2d"); var myDoughnut = new Chart(ctx).Doughnut(data,{ animation:true, showTooltips: true, <API key> : 0, segmentShowStroke : true }); var res1; var res2; var x = localStorage.getItem('type'); if(x == 0){ //day var date1 = $('input[name=date]').val(); var date2 = $('input[name=date2]').val(); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 13, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 13, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#newsFirstDate").text(res1); $("#newsLastDate").text(res2); }, }); }, }); }else if(x == 1){ //month var date1 = $('input[name=date3]').val() + '-01'; var date2 = $('input[name=date4]').val() + '-01'; $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 14, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 14, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#newsFirstDate").text(res1); $("#newsLastDate").text(res2); }, }); }, }); }else if(x == 2){ //year var date1 = $('input[name=date5]').val(); var date2 = $('input[name=date6]').val(); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 15, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 15, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#newsFirstDate").text(res1); $("#newsLastDate").text(res2); }, }); }, }); } } function showChart6(){ var data = [ { value: 1, color:"#1AA24C", highlight: "#1AD24C", label: "Valg 2" }, { value: 1, color: "#000000", highlight: "#333333", label: "Valg 1" } ] var ctx = $('#statistikk6').get(0).getContext("2d"); var myDoughnut = new Chart(ctx).Doughnut(data,{ animation:true, showTooltips: true, <API key> : 0, segmentShowStroke : true }); var res1; var res2; var x = localStorage.getItem('type'); if(x == 0){ //day var date1 = $('input[name=date]').val(); var date2 = $('input[name=date2]').val(); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 16, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 16, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#prosjectsFirstDate").text(res1); $("#prosjectsLastDate").text(res2); }, }); }, }); }else if(x == 1){ //month var date1 = $('input[name=date3]').val() + '-01'; var date2 = $('input[name=date4]').val() + '-01'; $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 17, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 17, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#prosjectsFirstDate").text(res1); $("#prosjectsLastDate").text(res2); }, }); }, }); }else if(x == 2){ //year var date1 = $('input[name=date5]').val(); var date2 = $('input[name=date6]').val(); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date1 + '&num=' + 18, success: function(data) { res1 = parseInt(data); $.ajax({ url: '../phpBackend/doughnut.php?date='+ date2 + '&num=' + 18, success: function(data) { res2 = parseInt(data); myDoughnut.segments[0].value = res2; myDoughnut.segments[1].value = res1; myDoughnut.update(); $("#prosjectsFirstDate").text(res1); $("#prosjectsLastDate").text(res2); }, }); }, }); } } });
/* The all pages that do not require authentication */ function Un<API key>() { "use strict"; this.displayAboutPage = function(req, res, next) { return res.render("about"); }; this.displayContactPage = function(req, res, next) { return res.render("contact"); }; this.displayHomePage = function(req, res, next) { return res.render("home"); }; this.displayChatPage = function(req, res, next) { return res.render("chat"); }; } module.exports = Un<API key>;
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Cats.Models { public class RationDetail { public int RationDetailID { get; set; } public int RationID { get; set; } public int CommodityID { get; set; } public decimal Amount { get; set; } public Nullable<int> UnitID { get; set; } public virtual Commodity Commodity { get; set; } public virtual Ration Ration { get; set; } public virtual Unit Unit { get; set; } } }
if [ -z "$1" ] then echo "Usage: startup_node.sh <id_for_node>" exit fi num_gpus=$2 if [ -z "$2" ] then num_gpus=1 echo "num_gpus not specified. Defaulting to 1" fi gcloud compute --project "visualdb-1046" disks create "hackinstance-$1" --size "20" --zone "us-east1-d" --source-snapshot "hacksnapshot" --type "pd-standard" gcloud beta compute --project "visualdb-1046" instances create "hackinstance-$1" --zone "us-east1-d" --machine-type "n1-standard-4" --network "default" --metadata "ssh-keys=ubuntu:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXJ3JrrWKc0TAM5KBXYmuTVAG06DyA8F1hHbqUULCNp767bDNN1dTF9zTo+<API key>/<API key>++<API key>/QRe3Jk9DMK/swIqFc4j6PWeOItj4/1flXFFruR/bT0p2/<API key>+<API key>+iQJFuD8XxppsHbc1+<API key> ubuntu,node_id=$1" --maintenance-policy "TERMINATE" --service-account "50518136478-compute@developer.gserviceaccount.com" --scopes "https:
<!--- Provide a general summary of your changes in the Title above --> ## Description <!--- Describe your changes in detail --> ## Related Issue <!--- This project only accepts pull requests related to open issues --> <!--- If suggesting a new feature or change, please discuss it in an issue first --> <!--- If fixing a bug, there should be an issue describing it with steps to reproduce --> <!--- Please link to the issue here: --> ## Motivation and Context <!--- Why is this change required? What problem does it solve? --> ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Screenshots (if appropriate): ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] I have signed the [Adobe Open Source CLA](https://opensource.adobe.com/cla.html). - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] I have read the **CONTRIBUTING** document. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed.
<!DOCTYPE html> <meta charset="utf-8"> <!--This page is adapted from Mike Bostock and Scott Murray's d3.js examples <style> .link { stroke: #ccc; } .node text { pointer-events: none; font: 10px sans-serif; } </style> <body> <script src="http://d3js.org/d3.v3.min.js"></script> <script> var width = 960; var height = 600; var colors = d3.scale.category10(); var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height); var force = d3.layout.force() .gravity(.25) .distance(50) .charge(-300) .size([width, height]); svg.append("text").attr("id", "tooltip"); d3.json("graph.json", function(error, json) { force .nodes(json.nodes) .links(json.links) .start(); var link = svg.selectAll(".link") .data(json.links) .enter().append("line") .attr("class", "link"); var node = svg.selectAll(".node") .data(json.nodes) .enter().append("g") .attr("class", "node") .call(force.drag); node.append("circle") .attr("x", -8) .attr("y", -8) .attr("r", function(d){ return 1 + Math.sqrt(Math.pow(1.6, d.degree)/Math.PI) ; } ) .style("fill", function(d, i){ return colors(i); } ) .on("mouseover", function(d){ var xPosition = d3.event.clientX; var yPosition = d3.event.clientY; d3.select("#tooltip").remove(); svg.append("text") .attr("id", "tooltip") .attr("x", xPosition) .attr("y", yPosition) .attr("text-anchor", "middle") .attr("font-family", "sans-serif") .attr("font-size", "11px") .attr("font-weight", "bold") .attr("fill", "black") .text(d.name + "(@" + d.scr_name + "), followed by " + d.degree + " users"); } ) .on("mouseout", function(){ d3.select("#tooltip") .transition() .delay(1500) .text(""); } ) ; force.on("tick", function() { link.attr("x1", function(d) { return d.source.x; }) .attr("y1", function(d) { return d.source.y; }) .attr("x2", function(d) { return d.target.x; }) .attr("y2", function(d) { return d.target.y; }); node.attr("transform", function(d) { return "translate(" + d.x + "," + d.y + ")"; }); }); }); </script> </body> </html>
<div id="print_area" style="width:200px; font-size:12px;"> <?php include('dbcon_s.php'); $date=date('Y-m-d', $time_now); if($_POST['h_status']=='off') { $query=mysql_query("select count(*) as num_order, sum(person) as total_person, sum(order_total) as total_order, sum(discount) as total_discount, sum(ser_charge) as total_s_charge, sum(vat_total) as total_vat, sum(cash) as total_cash, date from order_list where status='false' AND date='$date' AND terminal='".$_POST['terminal']."'"); } else { $query=mysql_query("select count(*) as num_order, sum(person) as total_person, sum(order_total) as total_order, sum(discount) as total_discount, sum(ser_charge) as total_s_charge, sum(vat_total) as total_vat, sum(cash) as total_cash, date from order_list where status='false' AND date='$date' AND terminal='".$_POST['terminal']."'"); } $row=mysql_fetch_array($query); ?> <h2 style="text-align:center; font-family:Forte; margin:0px; padding:0px;">La Bamba</h2> <p style="text-align:center; margin:0px; font-size:12px;"> House # 54, Road # 20,<br /> Sector # 03, Rabindra Sarani<br /> Uttara, Dhaka-1230<br /> Phone : 01759783896-7<br /> Vat Reg No: 5111110711 </p> <p style="text-align:center; margin:0px; font-size:12px;"> Day Report (<?php echo $_POST['terminal']; ?>) </p> Report Date : <?php echo $row['date']; ?><br /> Print Date : <?php echo $date; ?><br /> <table cellspacing="0" style="width:100%; font-size:12px;"> <tr> <th style="text-align:left">Number of order:</th> <th style="text-align:left;"><?php echo $row['num_order']; ?></th> </tr> <tr> <th style="text-align:left">Total Person:</th> <th style="text-align:left;"><?php echo $row['total_person']; ?></th> </tr> <tr> <th style="text-align:left">Total Order:</th> <th style="text-align:left;"><?php echo $row['total_order']; ?></th> </tr> <tr> <th style="text-align:left">Total Discount:</th> <th style="text-align:left;"><?php echo $row['total_discount']; ?></th> </tr> <tr> <th style="text-align:left">Total Service Charge:</th> <th style="text-align:left;"><?php echo $row['total_s_charge']; ?></th> </tr> <tr> <th style="text-align:left">Total Vat:</th> <th style="text-align:left;"><?php echo $row['total_vat']; ?></th> </tr> <tr> <th style="text-align:left">Total Cash:</th> <th style="text-align:left;"><?php echo $row['total_cash']; ?></th> </tr> </table> <br /> <div style="border-bottom:1px dotted #000;"></div> <br /> Day report (<?php echo $_POST['terminal']; ?>) printed by : <?php echo $_POST['user']; ?> </div>