answer
stringlengths
15
1.25M
CREATE TABLE IF NOT EXISTS `SUBSCRIPTION` ( `ID` bigint(20) NOT NULL, `SUBSCRIBER_ID` bigint(20) NOT NULL, `OBJECT_ID` bigint(20) NOT NULL, `OBJECT_TYPE` ENUM('FORUM', 'THREAD', '<API key>', '<API key>') NOT NULL, `CREATED_ON` bigint(20) NOT NULL, PRIMARY KEY (`SUBSCRIBER_ID`, `OBJECT_ID`, `OBJECT_TYPE`), UNIQUE (`ID`), CONSTRAINT `<API key>` FOREIGN KEY (`SUBSCRIBER_ID`) REFERENCES `JDOUSERGROUP` (`ID`) ON DELETE CASCADE, INDEX `<API key>` (`OBJECT_ID`, `OBJECT_TYPE`) )
// Generated from /POI/java/org/apache/poi/ss/usermodel/PrintSetup.java #pragma once #include <fwd-POI.hpp> #include <org/apache/poi/ss/usermodel/fwd-POI.hpp> #include <java/lang/Object.hpp> struct poi::ss::usermodel::PrintSetup : public virtual ::java::lang::Object { static constexpr int16_t <API key> { int16_t(0) }; static constexpr int16_t LETTER_PAPERSIZE { int16_t(1) }; static constexpr int16_t <API key> { int16_t(2) }; static constexpr int16_t TABLOID_PAPERSIZE { int16_t(3) }; static constexpr int16_t LEDGER_PAPERSIZE { int16_t(4) }; static constexpr int16_t LEGAL_PAPERSIZE { int16_t(5) }; static constexpr int16_t STATEMENT_PAPERSIZE { int16_t(6) }; static constexpr int16_t EXECUTIVE_PAPERSIZE { int16_t(7) }; static constexpr int16_t A3_PAPERSIZE { int16_t(8) }; static constexpr int16_t A4_PAPERSIZE { int16_t(9) }; static constexpr int16_t A4_SMALL_PAPERSIZE { int16_t(10) }; static constexpr int16_t A5_PAPERSIZE { int16_t(11) }; static constexpr int16_t B4_PAPERSIZE { int16_t(12) }; static constexpr int16_t B5_PAPERSIZE { int16_t(13) }; static constexpr int16_t FOLIO8_PAPERSIZE { int16_t(14) }; static constexpr int16_t QUARTO_PAPERSIZE { int16_t(15) }; static constexpr int16_t <API key> { int16_t(16) }; static constexpr int16_t <API key> { int16_t(17) }; static constexpr int16_t NOTE8_PAPERSIZE { int16_t(18) }; static constexpr int16_t <API key> { int16_t(19) }; static constexpr int16_t <API key> { int16_t(20) }; static constexpr int16_t <API key> { int16_t(27) }; static constexpr int16_t <API key> { int16_t(28) }; static constexpr int16_t <API key> { int16_t(28) }; static constexpr int16_t <API key> { int16_t(29) }; static constexpr int16_t <API key> { int16_t(30) }; static constexpr int16_t <API key> { int16_t(31) }; static constexpr int16_t <API key> { int16_t(37) }; static constexpr int16_t A4_EXTRA_PAPERSIZE { int16_t(53) }; static constexpr int16_t <API key> { int16_t(55) }; static constexpr int16_t A4_PLUS_PAPERSIZE { int16_t(60) }; static constexpr int16_t <API key> { int16_t(75) }; static constexpr int16_t <API key> { int16_t(77) }; virtual void setPaperSize(int16_t size) = 0; virtual void setScale(int16_t scale) = 0; virtual void setPageStart(int16_t start) = 0; virtual void setFitWidth(int16_t width) = 0; virtual void setFitHeight(int16_t height) = 0; virtual void setLeftToRight(bool ltor) = 0; virtual void setLandscape(bool ls) = 0; virtual void setValidSettings(bool valid) = 0; virtual void setNoColor(bool mono) = 0; virtual void setDraft(bool d) = 0; virtual void setNotes(bool printnotes) = 0; virtual void setNoOrientation(bool orientation) = 0; virtual void setUsePage(bool page) = 0; virtual void setHResolution(int16_t resolution) = 0; virtual void setVResolution(int16_t resolution) = 0; virtual void setHeaderMargin(double headermargin) = 0; virtual void setFooterMargin(double footermargin) = 0; virtual void setCopies(int16_t copies) = 0; virtual int16_t getPaperSize() = 0; virtual int16_t getScale() = 0; virtual int16_t getPageStart() = 0; virtual int16_t getFitWidth() = 0; virtual int16_t getFitHeight() = 0; virtual bool getLeftToRight() = 0; virtual bool getLandscape() = 0; virtual bool getValidSettings() = 0; virtual bool getNoColor() = 0; virtual bool getDraft() = 0; virtual bool getNotes() = 0; virtual bool getNoOrientation() = 0; virtual bool getUsePage() = 0; virtual int16_t getHResolution() = 0; virtual int16_t getVResolution() = 0; virtual double getHeaderMargin() = 0; virtual double getFooterMargin() = 0; virtual int16_t getCopies() = 0; // Generated static ::java::lang::Class *class_(); };
package br.usp.each.saeg.code.forest.domain; import org.apache.commons.lang3.builder.*; import org.eclipse.core.resources.*; public class ScriptData implements Comparable<ScriptData> { private String packageName; private String className; private String methodName; private int scriptPosition; private IMarker marker; private float score; public String getPackageName() { return packageName; } public void setPackageName(String packageName) { this.packageName = packageName; } public String getClassName() { return className; } public void setClassName(String className) { this.className = className; } public String getMethodName() { return methodName; } public void setMethodName(String methodName) { this.methodName = methodName; } public int getScriptPosition() { return scriptPosition; } public void setScriptPosition(int scriptPosition) { this.scriptPosition = scriptPosition; } public IMarker getMarker() { return marker; } public void setMarker(IMarker marker) { this.marker = marker; } public float getScore() { return score; } public void setScore(float score) { this.score = score; } @Override public String toString() { return className + ", " + methodName + ", " + scriptPosition; } @Override public int compareTo(ScriptData o) { return new CompareToBuilder() .append(scriptPosition, o.getScriptPosition()) .append(o.getScore(), score) .toComparison(); } }
command line introductions - [-d/-dir] the target svg directory - [-f/-file] the target svg file - [-o/output] the output vector file or directory - [-w/width] the width size of target vector image - [-h/height] the height size of target vector image command line samples java -jar svg2vector-cli.jar -d D:\svg or java -jar svg2vector-cli.jar -f D:\svg\icon_facebook.svg or java -jar svg2vector-cli.jar -d D:\svg -o D:\vector or java -jar svg2vector-cli.jar -f D:\svg\icon_facebook.svg -o D:\vector\icon_facebook.xml or java -jar svg2vector-cli.jar -d D:\svg -o D:\vector -w 24 -h 24 or java -jar svg2vector-cli.jar -f D:\svg\icon_facebook.svg -o D:\vector\icon_facebook.xml -w 24 -h 24
# UMKC Hackathon 2016 - IBM IoT Team CodeTroopers **Team Members:** * Ben Chrysler * Luke McDuff * Shweta Parihar * Sri Chaitanya Patluri **Project Name: RESTful Pajamas** * *Internet of Pajamas* - Smart pajamas for parents who want a better way to monitor when their newborns are sleeping or awake. * Instead of waiting for your child to cry to let you know they are awake, a sensor imbedded in the pajamas tracks motion. Too much activity over a certain period will trigger an alert for the parents, letting you know your baby is now awake. If your baby is asleep the application will confirm. * Client applications available on Android, iOS and Web. Home server application runs on Raspberry Pi. **Technologies Used** * TI Sensor Tag * Raspberry Pi 2 * IBM IoT Gateway Kit * Node-Red * Apache Tomcat * Ionic * AWS - EC2 * mLab - MongoDB as a Service **Links** * *YouTube Demo* https://youtu.be/MTL54EZBxuM * *Powerpoint* https: * *Web Application* http://ec2-52-91-251-221.compute-1.amazonaws.com/CodeTroopers **Awards** * Most Innovative Application * 3rd Place Overall
Apple Store (iTunes) Podcasts Crawler =================== Simple scalable crawler for Podcasts data from the iTunes Apple Store. All the data you can see about a certain podcast once you open its page on the browser, is the data available from this project. You don't have to input any of your Apple Account credentials since this Crawler acts like a "Logged Out" user. # Setting up your environment If you want to host your own database, SQS queues and virtual machines, you can. All you have to do is change the config files and the "Consts" class on the SharedLibrary to the values of your own preference (QueueNames, MongoDB Credentials/Address) and Amazon Web Services Keys (that you will need in order to access your queues from code). For more detailed information, please, refer to this project's Wiki # Exporting the Database As people kept requesting me, i decided to export the database on it's current state. I you want the exported file, get in touch with me at : marcello.grechi@gmail.com, and I will send you the file. (I decided not to keep the file public, because there were people downloading the same file over and over again, and not paying for it, which led to a huge AWS bill that I had to pay). Have in mind that downloading the database costs me money, since i pay for the outbound traffic provided by AWS when you query the database So, consider making a donation (via paypal) to marcello.grechi@gmail.com (Pay what you want, Humble Bundle style). If you need any specific extraction, let me know so we can figure out whats the best way to do it. # About me My name is Marcello Lins, i am a 25 y/o developer from Brazil who works with BigData and DataMining techniques at the moment. http://about.me/marcellolins Visit https://techflow.me/ for more awesomeness ! # What is this project about ? The main idea of this project is to gather/mine data about Podcasts of the Apple Store and build a rich database so that developers, podcasts fans and anyone else can use to generate statistics about the current apple store situation There are many questions we have no answer at the moment and we should be able to answer them with this database. # What do i need before i start? * I highly recommend you read all the pages of this wiki, which won`t take long. * Know C # How about the database? * I have made my MongoDB database public, including a user with read/write permissions so we can all use and populate the same database. * If you feel like, you can make your own MongoDB Database and change the code Consts to point the output to your own MongoDB Database. No Biggie
{% extends "success.html" %} {% block success_icon %} <i class="fa fa-star text-primary"></i> {% endblock %} {% block success_code %} <h1>{{ _('') }}</h1> {% endblock %} {% block success_text %} <p></p> <p><span id="<API key>">3</span></p> {% endblock %} {% block success_script %} <script type="text/javascript"> var t=2; setInterval("refer()",1000); function refer(){ if(t==0){ location.href="/"; } document.getElementById('<API key>').innerHTML= t; t } </script> {% endblock %}
var a01400 = [ [ "<API key>", "a01400.html#<API key>", null ], [ "EXTERN", "a01400.html#<API key>", null ], [ "<API key>", "a01400.html#<API key>", null ], [ "make_real_word", "a01400.html#<API key>", null ], [ "make_real_words", "a01400.html#<API key>", null ], [ "make_rep_words", "a01400.html#<API key>", null ], [ "make_single_word", "a01400.html#<API key>", null ], [ "make_words", "a01400.html#<API key>", null ], [ "row_words", "a01400.html#<API key>", null ], [ "row_words2", "a01400.html#<API key>", null ], [ "set_row_spaces", "a01400.html#<API key>", null ], [ "<API key>", "a01400.html#<API key>", null ], [ "<API key>", "a01400.html#<API key>", null ], [ "textord_fp_chopping", "a01400.html#<API key>", null ] ];
package com.github.emalock3.camel.issues.model; import java.util.ArrayList; import java.util.List; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import lombok.Value; @Value public class <API key> { String assignee; int issuesNum; double percentage; public static List<<API key>> from(Document doc) { List<<API key>> result = new ArrayList<>(); for (Element elem : doc.select( "#<API key> table.aui > tbody > tr")) { String assignee = elem.select("> td.name > a").text(); int issuesNum = Integer.parseInt(elem.select(">td.count").text()); String ps = elem.select("> td.graph tr > td:nth-of-type(2)") .text().replace("\u00a0", "").replace("%", "").trim(); double percentage = ps.isEmpty() ? 0.0 : Double.parseDouble(ps); result.add(new <API key>(assignee, issuesNum, percentage)); } return result; } }
import os import warnings import numpy as np from pyrates.utility.genetic_algorithm import CGSGeneticAlgorithm from pandas import DataFrame, read_hdf from copy import deepcopy class CustomGOA(CGSGeneticAlgorithm): def eval_fitness(self, target: list, **kwargs): # define simulation conditions worker_file = self.cgs_config['worker_file'] if 'worker_file' in self.cgs_config else None param_grid = self.pop.drop(['fitness', 'sigma', 'results'], axis=1) result_vars = ['r_e', 'r_p', 'r_a', 'r_m', 'r_f'] freq_targets = [0.0, np.nan, np.nan, np.nan, np.nan] #param_grid, invalid_params = eval_params(param_grid) conditions = [{}, # healthy control {'k_pe': 0.2, 'k_ae': 0.2}, # AMPA blockade in GPe {'k_pe': 0.2, 'k_ae': 0.2, 'k_pp': 0.2, 'k_pa': 0.2, 'k_pm': 0.2, 'k_aa': 0.2, 'k_ap': 0.2, 'k_am': 0.2}, # AMPA blockade and GABAA blockade in GPe {'k_pp': 0.2, 'k_pa': 0.2, 'k_pm': 0.2, 'k_aa': 0.2, 'k_ap': 0.2, 'k_am': 0.2}, # GABAA blockade in GPe {'k_pe': 0.0, 'k_ae': 0.0}, # STN blockade {'k_ep': 0.2}, # GABAA blocker in STN ] param_scalings = [ ('delta_e', 'tau_e', 2.0), ('delta_p', 'tau_p', 2.0), ('delta_a', 'tau_a', 2.0), ('delta_m', 'tau_m', 2.0), ('delta_f', 'tau_f', 2.0), ('k_ee', 'delta_e', 0.5), ('k_ep', 'delta_e', 0.5), ('k_pe', 'delta_p', 0.5), ('k_pp', 'delta_p', 0.5), ('k_pa', 'tau_p', 0.5), ('k_pm', 'tau_p', 0.5), ('k_ae', 'tau_a', 0.5), ('k_ap', 'tau_a', 0.5), ('k_aa', 'tau_a', 0.5), ('k_am', 'tau_a', 0.5), ('k_mf', 'delta_m', 0.5), ('k_mm', 'delta_m', 0.5), ('k_fa', 'delta_f', 0.5), ('k_ff', 'delta_f', 0.5), ('eta_e', 'delta_e', 1.0), ('eta_p', 'delta_p', 1.0), ('eta_a', 'delta_a', 1.0), ('eta_m', 'delta_m', 1.0), ('eta_f', 'delta_f', 1.0), ] chunk_size = [ 60, # carpenters 100, # osttimor 60, # spanien 100, # animals 60, # kongo 60, # tschad #100, # uganda # 50, # tiber #50, # giraffe 40, # lech 20, # rilke 12, # dinkel #10, # rosmarin #10, # mosambik # 50, # compute servers ] # perform simulations if len(param_grid) > 0: self.gs_config['init_kwargs'].update(kwargs) res_file = self.cgs.run( circuit_template=self.gs_config['circuit_template'], param_grid=deepcopy(param_grid), param_map=self.gs_config['param_map'], simulation_time=self.gs_config['simulation_time'], dt=self.gs_config['step_size'], inputs=self.gs_config['inputs'], outputs=self.gs_config['outputs'], sampling_step_size=self.gs_config['sampling_step_size'], permute=False, chunk_size=chunk_size, worker_file=worker_file, worker_env=self.cgs_config['worker_env'], gs_kwargs={'init_kwargs': self.gs_config['init_kwargs'], 'conditions': conditions, 'param_scalings': param_scalings}, worker_kwargs={'y': target, 'time_lim': 7200.0, 'freq_targets': freq_targets}, result_concat_axis=0) results_tmp = read_hdf(res_file, key=f'Results/results') # calculate fitness for gene_id in param_grid.index: self.pop.at[gene_id, 'fitness'] = 1.0 / results_tmp.at[gene_id, 'fitness'] self.pop.at[gene_id, 'results'] = [results_tmp.at[gene_id, v] for v in result_vars] # set fitness of invalid parametrizations #for gene_id in invalid_params.index: # self.pop.at[gene_id, 'fitness'] = 0.0 # self.pop.at[gene_id, 'results'] = [0. for _ in result_vars] def fitness(y, t): y = np.asarray(y).flatten() t = np.asarray(t).flatten() diff = np.asarray([0.0 if np.isnan(t_tmp) else y_tmp - t_tmp for y_tmp, t_tmp in zip(y, t)]).flatten() t[np.isnan(t)] = 1.0 t[t == 0] = 1.0 weights = 1 / np.abs(t) return weights @ np.abs(diff) if __name__ == "__main__": warnings.filterwarnings("ignore") pop_size = 1024 pop_genes = { 'k_ee': {'min': 0, 'max': 15, 'size': pop_size, 'sigma': 0.1, 'loc': 1.0, 'scale': 0.5}, 'k_ae': {'min': 0, 'max': 150, 'size': pop_size, 'sigma': 0.5, 'loc': 20.0, 'scale': 2.0}, 'k_pe': {'min': 0, 'max': 150, 'size': pop_size, 'sigma': 0.5, 'loc': 20.0, 'scale': 2.0}, 'k_pp': {'min': 0, 'max': 100, 'size': pop_size, 'sigma': 0.5, 'loc': 10.0, 'scale': 1.0}, 'k_ep': {'min': 0, 'max': 150, 'size': pop_size, 'sigma': 0.5, 'loc': 20.0, 'scale': 2.0}, 'k_ap': {'min': 0, 'max': 100, 'size': pop_size, 'sigma': 0.5, 'loc': 10.0, 'scale': 1.0}, 'k_aa': {'min': 0, 'max': 50, 'size': pop_size, 'sigma': 0.5, 'loc': 10.0, 'scale': 1.0}, 'k_pa': {'min': 0, 'max': 50, 'size': pop_size, 'sigma': 0.5, 'loc': 10.0, 'scale': 1.0}, 'k_fa': {'min': 0, 'max': 100, 'size': pop_size, 'sigma': 0.5, 'loc': 20.0, 'scale': 2.0}, 'k_mm': {'min': 0, 'max': 50, 'size': pop_size, 'sigma': 0.5, 'loc': 10.0, 'scale': 1.0}, 'k_am': {'min': 0, 'max': 200, 'size': pop_size, 'sigma': 0.8, 'loc': 40.0, 'scale': 4.0}, 'k_pm': {'min': 0, 'max': 200, 'size': pop_size, 'sigma': 0.5, 'loc': 5.0, 'scale': 1.0}, 'k_mf': {'min': 0, 'max': 150, 'size': pop_size, 'sigma': 0.5, 'loc': 20.0, 'scale': 2.0}, 'k_ff': {'min': 0, 'max': 100, 'size': pop_size, 'sigma': 0.5, 'loc': 10.0, 'scale': 1.0}, 'eta_e': {'min': -5, 'max': 5, 'size': pop_size, 'sigma': 0.2, 'loc': 0.0, 'scale': 0.5}, 'eta_p': {'min': -5, 'max': 5, 'size': pop_size, 'sigma': 0.2, 'loc': 0.0, 'scale': 0.5}, 'eta_a': {'min': -5, 'max': 5, 'size': pop_size, 'sigma': 0.2, 'loc': 0.0, 'scale': 0.5}, 'eta_m': {'min': -10, 'max': 0, 'size': pop_size, 'sigma': 0.2, 'loc': -3.0, 'scale': 0.5}, 'eta_f': {'min': -5, 'max': 5, 'size': pop_size, 'sigma': 0.2, 'loc': 0.0, 'scale': 0.5}, 'delta_e': {'min': 0.01, 'max': 1.0, 'size': pop_size, 'sigma': 0.05, 'loc': 0.1, 'scale': 0.1}, 'delta_p': {'min': 0.01, 'max': 1.0, 'size': pop_size, 'sigma': 0.05, 'loc': 0.2, 'scale': 0.1}, 'delta_a': {'min': 0.01, 'max': 1.5, 'size': pop_size, 'sigma': 0.05, 'loc': 0.4, 'scale': 0.1}, 'delta_m': {'min': 0.01, 'max': 1.5, 'size': pop_size, 'sigma': 0.05, 'loc': 0.2, 'scale': 0.1}, 'delta_f': {'min': 0.01, 'max': 1.5, 'size': pop_size, 'sigma': 0.05, 'loc': 0.2, 'scale': 0.1}, 'tau_e': {'min': 12, 'max': 12, 'size': pop_size, 'sigma': 0.0, 'loc': 12.0, 'scale': 0.0}, 'tau_p': {'min': 24, 'max': 24, 'size': pop_size, 'sigma': 0.0, 'loc': 24.0, 'scale': 0.0}, 'tau_a': {'min': 20, 'max': 20, 'size': pop_size, 'sigma': 0.0, 'loc': 20.0, 'scale': 0.0}, 'tau_m': {'min': 20, 'max': 20, 'size': pop_size, 'sigma': 0.0, 'loc': 20.0, 'scale': 0.0}, 'tau_f': {'min': 20, 'max': 20, 'size': pop_size, 'sigma': 0.0, 'loc': 20.0, 'scale': 0.0}, #'tau_ee_v': {'min': 0.5, 'max': 1.0, 'size': 2, 'sigma': 0.1, 'loc': 0.5, 'scale': 0.1}, # 'tau_ei': {'min': 3.0, 'max': 5.0, 'size': 1, 'sigma': 0.1, 'loc': 4.0, 'scale': 0.1}, #'tau_ei_v': {'min': 0.5, 'max': 1.0, 'size': 2, 'sigma': 0.1, 'loc': 1.0, 'scale': 0.2}, # 'tau_ie': {'min': 2.0, 'max': 4.0, 'size': 1, 'sigma': 0.1, 'loc': 3.0, 'scale': 0.1}, #'tau_ie_v': {'min': 0.8, 'max': 1.6, 'size': 2, 'sigma': 0.1, 'loc': 0.7, 'scale': 0.1}, #'tau_ii_v': {'min': 0.5, 'max': 1.0, 'size': 2, 'sigma': 0.1, 'loc': 0.5, 'scale': 0.1}, } param_map = { 'k_ee': {'vars': ['weight'], 'edges': [('stn', 'stn')]}, 'k_ae': {'vars': ['weight'], 'edges': [('stn', 'gpe_a')]}, 'k_pe': {'vars': ['weight'], 'edges': [('stn', 'gpe_p')]}, 'k_pp': {'vars': ['weight'], 'edges': [('gpe_p', 'gpe_p')]}, 'k_ep': {'vars': ['weight'], 'edges': [('gpe_p', 'stn')]}, 'k_ap': {'vars': ['weight'], 'edges': [('gpe_p', 'gpe_a')]}, 'k_aa': {'vars': ['weight'], 'edges': [('gpe_a', 'gpe_a')]}, 'k_pa': {'vars': ['weight'], 'edges': [('gpe_a', 'gpe_p')]}, 'k_fa': {'vars': ['weight'], 'edges': [('gpe_a', 'fsi')]}, 'k_mm': {'vars': ['weight'], 'edges': [('msn', 'msn')]}, 'k_am': {'vars': ['weight'], 'edges': [('msn', 'gpe_a')]}, 'k_pm': {'vars': ['weight'], 'edges': [('msn', 'gpe_p')]}, 'k_ff': {'vars': ['weight'], 'edges': [('fsi', 'fsi')]}, 'k_mf': {'vars': ['weight'], 'edges': [('fsi', 'msn')]}, 'eta_e': {'vars': ['stn_op/eta_e'], 'nodes': ['stn']}, 'eta_p': {'vars': ['gpe_proto_op/eta_i'], 'nodes': ['gpe_p']}, 'eta_a': {'vars': ['gpe_arky_op/eta_a'], 'nodes': ['gpe_a']}, 'eta_m': {'vars': ['str_msn_op/eta_s'], 'nodes': ['msn']}, 'eta_f': {'vars': ['str_fsi_op/eta_f'], 'nodes': ['fsi']}, 'delta_e': {'vars': ['stn_op/delta_e'], 'nodes': ['stn']}, 'delta_p': {'vars': ['gpe_proto_op/delta_i'], 'nodes': ['gpe_p']}, 'delta_a': {'vars': ['gpe_arky_op/delta_a'], 'nodes': ['gpe_a']}, 'delta_m': {'vars': ['str_msn_op/delta_s'], 'nodes': ['msn']}, 'delta_f': {'vars': ['str_fsi_op/delta_f'], 'nodes': ['fsi']}, 'tau_e': {'vars': ['stn_op/tau_e'], 'nodes': ['stn']}, 'tau_p': {'vars': ['gpe_proto_op/tau_i'], 'nodes': ['gpe_p']}, 'tau_a': {'vars': ['gpe_arky_op/tau_a'], 'nodes': ['gpe_a']}, 'tau_m': {'vars': ['str_msn_op/tau_s'], 'nodes': ['msn']}, 'tau_f': {'vars': ['str_fsi_op/tau_f'], 'nodes': ['fsi']}, } T = 2000. dt = 1e-2 dts = 1e-1 compute_dir = f"{os.getcwd()}/stn_gpe_str_opt" # perform genetic optimization ga = CustomGOA(fitness_measure=fitness, gs_config={ 'circuit_template': f"{os.getcwd()}/config/stn_gpe/stn_gpe_str", 'permute_grid': True, 'param_map': param_map, 'simulation_time': T, 'step_size': dt, 'sampling_step_size': dts, 'inputs': {}, 'outputs': {'r_e': "stn/stn_op/R_e", 'r_p': 'gpe_p/gpe_proto_op/R_i', 'r_a': 'gpe_a/gpe_arky_op/R_a', 'r_m': 'msn/str_msn_op/R_s', 'r_f': 'fsi/str_fsi_op/R_f'}, 'init_kwargs': {'backend': 'numpy', 'solver': 'scipy', 'step_size': dt}, }, cgs_config={'nodes': [ 'carpenters', 'osttimor', 'spanien', 'animals', 'kongo', 'tschad', #'uganda', # 'tiber', #'giraffe', 'lech', 'rilke', 'dinkel', #'rosmarin', #'mosambik', # 'comps06h01', # 'comps06h02', # 'comps06h03', # 'comps06h04', # 'comps06h05', # 'comps06h06', # 'comps06h07', # 'comps06h08', # 'comps06h09', # 'comps06h10', # 'comps06h11', # 'comps06h12', # 'comps06h13', # 'comps06h14', # 'scorpions', # 'spliff', # 'supertramp', # 'ufo' ], 'compute_dir': compute_dir, 'worker_file': f'{os.getcwd()}/stn_gpe_str_worker.py', 'worker_env': "/data/u_rgast_software/anaconda3/envs/pyrates/bin/python3", }) drop_save_dir = f'{compute_dir}/PopulationDrops/' os.makedirs(drop_save_dir, exist_ok=True) winner = ga.run( initial_gene_pool=pop_genes, gene_sampling_func=np.random.normal, <API key>=np.random.normal, target=[[20, 60, 20, 2, 20], # healthy control [np.nan, 2/3, np.nan, np.nan, np.nan], # ampa blockade in GPe [np.nan, 1, np.nan, np.nan, np.nan], # ampa and gabaa blockade in GPe [np.nan, 2, np.nan, np.nan, np.nan], # GABAA blockade in GPe [np.nan, 1/2, np.nan, np.nan, np.nan], # STN blockade [2, 2, np.nan, np.nan, np.nan], # GABAA blockade in STN ], max_iter=100, enforce_max_iter=True, min_fit=1.0, n_winners=10, n_parent_pairs=40, n_new=62, sigma_adapt=0.05, candidate_save=f'{compute_dir}/<API key>.h5', drop_save=drop_save_dir, new_pop_on_drop=True, pop_save=f'{drop_save_dir}/pop_summary', permute=False ) # winner.to_hdf(f'{drop_save_dir}/winner.h5', key='data')
(function() { 'use strict'; function <API key>(Messagebus) { this.options = [ 'belief', 'certainty', 'possibility', 'sentiment', 'past_future' ]; this.selectedOption = 'sentiment'; this.changeOption = function(value) { this.selectedOption = value; Messagebus.publish('<API key>', value); }; } angular.module('uncertApp.<API key>').controller('<API key>', <API key>); })();
/** * Value.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.dfp.axis.v201511; /** * {@code Value} represents a value. */ public abstract class Value implements java.io.Serializable { public Value() { } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof Value)) return false; Value other = (Value) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true; __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(Value.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https: } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
package com.sohu.tv.cachecloud.client.redisson; import com.alibaba.fastjson.JSONObject; import com.sohu.tv.cc.client.spectator.util.Constants; import com.sohu.tv.cc.client.spectator.util.StringUtil; import org.redisson.config.Config; import org.redisson.config.ReadMode; import org.redisson.config.<API key>; import org.redisson.config.SubscriptionMode; public class <API key> extends <API key> { private <API key> <API key>; public <API key> <API key>() { if (<API key> == null) { config = getConfig(); <API key> = config.useSentinelServers(); } return <API key>; } public <API key>(long appId, String password) { super(appId, password); } @Override void config(Config config, JSONObject jsonObject, String password) { String masterName = jsonObject.getString("masterName"); String sentinels = jsonObject.getString("sentinels"); <API key> sentinelConfig = config.useSentinelServers(); sentinelConfig.setMasterName(masterName) .setReadMode(ReadMode.MASTER) .setSubscriptionMode(SubscriptionMode.MASTER); for (String sentinelStr : sentinels.split(" ")) { String[] sentinelArr = sentinelStr.split(":"); if (sentinelArr.length == 2) { String ip = sentinelArr[0]; int port = Integer.parseInt(sentinelArr[1]); String nodeAddress = "redis://" + ip + ":" + port; sentinelConfig.addSentinelAddress(nodeAddress); } } if (!StringUtil.isBlank(password)) { sentinelConfig.setPassword(password); } } @Override String clientUrl(long appId) { return String.format(Constants.REDIS_SENTINEL_URL, String.valueOf(appId)); } }
package br.ufsc.inf.lapesd.ldservice.model; import br.ufsc.inf.lapesd.ldservice.model.impl.SequenceTransformer; import org.apache.jena.rdf.model.Model; import javax.annotation.Nonnull; /** * Performs arbitrary transformation on a rendered {@link Model} */ public interface RenderTransformer { /** * Performs a transformation on the model and returns the result as a new model. * * This method is responsible for closing the input model, if it should be closed. * * @param model input render Model * @param isSingleResource true if the render is of a single resource, false if it is of a list * @return The result of transformation */ @Nonnull Model transform(@Nonnull Model model, boolean isSingleResource); default @Nonnull RenderTransformer andThen(@Nonnull RenderTransformer next) { return new SequenceTransformer(this, next); } }
# AUTOGENERATED FILE FROM balenalib/<API key>:focal-run ENV NODE_VERSION 14.16.0 ENV YARN_VERSION 1.22.4 RUN buildDeps='curl libatomic1' \ && set -x \ && 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 \ && apt-get update && apt-get install -y $buildDeps --<API key> \
namespace Ahmedowsky.Core.Helpers { using System.IO; using System.IO.Compression; public sealed class Compressor { public static byte[] Decompress(byte[] zippedData) { byte[] decompressedData; using (var outputStream = new MemoryStream()) { using (var inputStream = new MemoryStream(zippedData)) using (var zip = new GZipStream(inputStream, CompressionMode.Decompress)) zip.CopyTo(outputStream); decompressedData = outputStream.ToArray(); } return decompressedData; } public static byte[] Compress(byte[] plainData) { byte[] compressesData; using (var outputStream = new MemoryStream()) { using (var zip = new GZipStream(outputStream, CompressionMode.Compress)) zip.Write(plainData, 0, plainData.Length); //Dont get the MemoryStream data before the GZipStream is closed //GZipStream writes additional data including footer information when its been disposed compressesData = outputStream.ToArray(); } return compressesData; } } }
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ZM.Media.Info { static class Constants { public const string INFO_VERSION_VALUE = "0.7.0.0;MediaInfoWrapper;0.1.0.0"; } }
<?php /** * DO NOT EDIT THIS FILE! * * This file was automatically generated from external sources. * * Any manual change here will be lost the next time the SDK * is updated. You've been warned! */ namespace DTS\eBaySDK\Account\Types; /** * * @property \DTS\eBaySDK\Account\Types\CategoryType[] $categoryTypes * @property \DTS\eBaySDK\Account\Types\Deposit $deposit * @property string $description * @property \DTS\eBaySDK\Account\Types\TimeDuration $fullPaymentDueIn * @property boolean $immediatePay * @property \DTS\eBaySDK\Account\Enums\MarketplaceIdEnum $marketplaceId * @property string $name * @property string $paymentInstructions * @property \DTS\eBaySDK\Account\Types\PaymentMethod[] $paymentMethods * @property string $paymentPolicyId */ class PaymentPolicy extends \DTS\eBaySDK\Types\BaseType { /** * @var array Properties belonging to objects of this class. */ private static $propertyTypes = [ 'categoryTypes' => [ 'type' => 'DTS\eBaySDK\Account\Types\CategoryType', 'repeatable' => true, 'attribute' => false, 'elementName' => 'categoryTypes' ], 'deposit' => [ 'type' => 'DTS\eBaySDK\Account\Types\Deposit', 'repeatable' => false, 'attribute' => false, 'elementName' => 'deposit' ], 'description' => [ 'type' => 'string', 'repeatable' => false, 'attribute' => false, 'elementName' => 'description' ], 'fullPaymentDueIn' => [ 'type' => 'DTS\eBaySDK\Account\Types\TimeDuration', 'repeatable' => false, 'attribute' => false, 'elementName' => 'fullPaymentDueIn' ], 'immediatePay' => [ 'type' => 'boolean', 'repeatable' => false, 'attribute' => false, 'elementName' => 'immediatePay' ], 'marketplaceId' => [ 'type' => 'string', 'repeatable' => false, 'attribute' => false, 'elementName' => 'marketplaceId' ], 'name' => [ 'type' => 'string', 'repeatable' => false, 'attribute' => false, 'elementName' => 'name' ], 'paymentInstructions' => [ 'type' => 'string', 'repeatable' => false, 'attribute' => false, 'elementName' => 'paymentInstructions' ], 'paymentMethods' => [ 'type' => 'DTS\eBaySDK\Account\Types\PaymentMethod', 'repeatable' => true, 'attribute' => false, 'elementName' => 'paymentMethods' ], 'paymentPolicyId' => [ 'type' => 'string', 'repeatable' => false, 'attribute' => false, 'elementName' => 'paymentPolicyId' ] ]; /** * @param array $values Optional properties and values to assign to the object. */ public function __construct(array $values = []) { list($parentValues, $childValues) = self::getParentValues(self::$propertyTypes, $values); parent::__construct($parentValues); if (!array_key_exists(__CLASS__, self::$properties)) { self::$properties[__CLASS__] = array_merge(self::$properties[get_parent_class()], self::$propertyTypes); } $this->setValues(__CLASS__, $childValues); } }
using System; using System.Linq; using Bytes2you.Validation.<API key>.StringPredicates; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace Bytes2you.Validation.UnitTests.<API key>.StringPredicates.<API key> { [TestClass] public class <API key> { [TestMethod] public void <API key>() { // Arrange. <API key> validationPredicate = <API key>.Instance; // Assert. Assert.AreEqual(ValidationType.Default, validationPredicate.ValidationType); } } }
# GENERATED FROM XML -- DO NOT EDIT URI: mod_allowhandlers.html.en Content-Language: en Content-type: text/html; charset=ISO-8859-1 URI: mod_allowhandlers.html.es Content-Language: es Content-type: text/html; charset=ISO-8859-1
define("dojo/selector/acme", [ "../dom", "../sniff", "../_base/array", "../_base/lang", "../_base/window" ], function(dom, has, array, lang, win){ // module: // dojo/selector/acme /* acme architectural overview: acme is a relatively full-featured CSS3 query library. It is designed to take any valid CSS3 selector and return the nodes matching the selector. To do this quickly, it processes queries in several steps, applying caching where profitable. The steps (roughly in reverse order of the way they appear in the code): 1.) check to see if we already have a "query dispatcher" - if so, use that with the given parameterization. Skip to step 4. 2.) attempt to determine which branch to dispatch the query to: - JS (optimized DOM iteration) - native (FF3.1+, Safari 3.1+, IE 8+) 3.) tokenize and convert to executable "query dispatcher" - this is where the lion's share of the complexity in the system lies. In the DOM version, the query dispatcher is assembled as a chain of "yes/no" test functions pertaining to a section of a simple query statement (".blah:nth-child(odd)" but not "div div", which is 2 simple statements). Individual statement dispatchers are cached (to prevent re-definition) as are entire dispatch chains (to make re-execution of the same query fast) 4.) the resulting query dispatcher is called in the passed scope (by default the top-level document) - for DOM queries, this results in a recursive, top-down evaluation of nodes based on each simple query section - for native implementations, this may mean working around spec bugs. So be it. 5.) matched nodes are pruned to ensure they are unique (if necessary) */ // Toolkit aliases // if you are extracting acme for use in your own system, you will // need to provide these methods and properties. No other porting should be // necessary, save for configuring the system to use a class other than // dojo/NodeList as the return instance instantiator var trim = lang.trim; var each = array.forEach; var getDoc = function(){ return win.doc; }; // NOTE(alex): the spec is idiotic. CSS queries should ALWAYS be case-sensitive, but nooooooo var cssCaseBug = (getDoc().compatMode) == "BackCompat"; // Global utilities var specials = ">~+"; // global thunk to determine whether we should treat the current query as // case sensitive or not. This switch is flipped by the query evaluator // based on the document passed as the context to search. var caseSensitive = false; // how high? var yesman = function(){ return true; }; // Tokenizer var getQueryParts = function(query){ // summary: // state machine for query tokenization // description: // instead of using a brittle and slow regex-based CSS parser, // acme implements an AST-style query representation. This // representation is only generated once per query. For example, // the same query run multiple times or under different root nodes // does not re-parse the selector expression but instead uses the // cached data structure. The state machine implemented here // terminates on the last " " (space) character and returns an // ordered array of query component structures (or "parts"). Each // part represents an operator or a simple CSS filtering // expression. The structure for parts is documented in the code // below. // NOTE: // this code is designed to run fast and compress well. Sacrifices // to readability and maintainability have been made. Your best // bet when hacking the tokenizer is to put The Donnas on *really* // loud (may we recommend their "Spend The Night" release?) and // just assume you're gonna make mistakes. Keep the unit tests // open and run them frequently. Knowing is half the battle ;-) if(specials.indexOf(query.slice(-1)) >= 0){ // if we end with a ">", "+", or "~", that means we're implicitly // searching all children, so make it explicit query += " * "; }else{ // if you have not provided a terminator, one will be provided for // you... query += " "; } var ts = function(/*Integer*/ s, /*Integer*/ e){ // trim and slice. // take an index to start a string slice from and an end position // and return a trimmed copy of that sub-string return trim(query.slice(s, e)); }; // the overall data graph of the full query, as represented by queryPart objects var queryParts = []; // state keeping vars var inBrackets = -1, inParens = -1, inMatchFor = -1, inPseudo = -1, inClass = -1, inId = -1, inTag = -1, currentQuoteChar, lc = "", cc = "", pStart; // iteration vars var x = 0, // index in the query ql = query.length, currentPart = null, // data structure representing the entire clause _cp = null; // the current pseudo or attr matcher // several temporary variables are assigned to this structure during a // potential sub-expression match: // attr: // a string representing the current full attribute match in a // bracket expression // type: // if there's an operator in a bracket expression, this is // used to keep track of it // value: // the internals of parenthetical expression for a pseudo. for // :nth-child(2n+1), value might be "2n+1" var endTag = function(){ // called when the tokenizer hits the end of a particular tag name. // Re-sets state variables for tag matching and sets up the matcher // to handle the next type of token (tag or operator). if(inTag >= 0){ var tv = (inTag == x) ? null : ts(inTag, x); // .toLowerCase(); currentPart[ (specials.indexOf(tv) < 0) ? "tag" : "oper" ] = tv; inTag = -1; } }; var endId = function(){ // called when the tokenizer might be at the end of an ID portion of a match if(inId >= 0){ currentPart.id = ts(inId, x).replace(/\\/g, ""); inId = -1; } }; var endClass = function(){ // called when the tokenizer might be at the end of a class name // match. CSS allows for multiple classes, so we augment the // current item with another class in its list if(inClass >= 0){ currentPart.classes.push(ts(inClass + 1, x).replace(/\\/g, "")); inClass = -1; } }; var endAll = function(){ // at the end of a simple fragment, so wall off the matches endId(); endTag(); endClass(); }; var endPart = function(){ endAll(); if(inPseudo >= 0){ currentPart.pseudos.push({ name: ts(inPseudo + 1, x) }); } // hint to the selector engine to tell it whether or not it // needs to do any iteration. Many simple selectors don't, and // we can avoid significant construction-time work by advising // the system to skip them currentPart.loops = ( currentPart.pseudos.length || currentPart.attrs.length || currentPart.classes.length ); currentPart.oquery = currentPart.query = ts(pStart, x); // save the full expression as a string // otag/tag are hints to suggest to the system whether or not // it's an operator or a tag. We save a copy of otag since the // tag name is cast to upper-case in regular HTML matches. The // system has a global switch to figure out if the current // expression needs to be case sensitive or not and it will use // otag or tag accordingly currentPart.otag = currentPart.tag = (currentPart["oper"]) ? null : (currentPart.tag || "*"); if(currentPart.tag){ // if we're in a case-insensitive HTML doc, we likely want // the toUpperCase when matching on element.tagName. If we // do it here, we can skip the string op per node // comparison currentPart.tag = currentPart.tag.toUpperCase(); } // add the part to the list if(queryParts.length && (queryParts[queryParts.length-1].oper)){ // operators are always infix, so we remove them from the // list and attach them to the next match. The evaluator is // responsible for sorting out how to handle them. currentPart.infixOper = queryParts.pop(); currentPart.query = currentPart.infixOper.query + " " + currentPart.query; /* 0 && console.debug( "swapping out the infix", currentPart.infixOper, "and attaching it to", currentPart); */ } queryParts.push(currentPart); currentPart = null; }; // iterate over the query, character by character, building up a // list of query part objects for(; lc=cc, cc=query.charAt(x), x < ql; x++){ // cc: the current character in the match // lc: the last character (if any) // someone is trying to escape something, so don't try to match any // fragments. We assume we're inside a literal. if(lc == "\\"){ continue; } if(!currentPart){ // a part was just ended or none has yet been created // NOTE: I hate all this alloc, but it's shorter than writing tons of if's pStart = x; // rules describe full CSS sub-expressions, like: // #someId // .className:first-child // but not: // thinger > div.howdy[type=thinger] // the indidual components of the previous query would be // split into 3 parts that would be represented a structure like: // query: "thinger", // tag: "thinger", // query: "div.howdy[type=thinger]", // classes: ["howdy"], // infixOper: { // query: ">", // oper: ">", currentPart = { query: null, // the full text of the part's rule pseudos: [], // CSS supports multiple pseud-class matches in a single rule attrs: [], // CSS supports multi-attribute match, so we need an array classes: [], // class matches may be additive, e.g.: .thinger.blah.howdy tag: null, // only one tag... oper: null, // ...or operator per component. Note that these wind up being exclusive. id: null, // the id component of a rule getTag: function(){ return caseSensitive ? this.otag : this.tag; } }; // if we don't have a part, we assume we're going to start at // the beginning of a match, which should be a tag name. This // might fault a little later on, but we detect that and this // iteration will still be fine. inTag = x; } // Skip processing all quoted characters. // If we are inside quoted text then currentQuoteChar stores the character that began the quote, // thus that character that will end it. if(currentQuoteChar){ if(cc == currentQuoteChar){ currentQuoteChar = null; } continue; }else if (cc == "'" || cc == '"'){ currentQuoteChar = cc; continue; } if(inBrackets >= 0){ // look for a the close first if(cc == "]"){ // if we're in a [...] clause and we end, do assignment if(!_cp.attr){ // no attribute match was previously begun, so we // assume this is an attribute existence match in the // form of [someAttributeName] _cp.attr = ts(inBrackets+1, x); }else{ // we had an attribute already, so we know that we're // matching some sort of value, as in [attrName=howdy] _cp.matchFor = ts((inMatchFor||inBrackets+1), x); } var cmf = _cp.matchFor; if(cmf){ // try to strip quotes from the matchFor value. We want // [attrName=howdy] to match the same // as [attrName = 'howdy' ] if( (cmf.charAt(0) == '"') || (cmf.charAt(0) == "'") ){ _cp.matchFor = cmf.slice(1, -1); } } // remove backslash escapes from an attribute match, since DOM // querying will get attribute values without backslashes if(_cp.matchFor){ _cp.matchFor = _cp.matchFor.replace(/\\/g, ""); } // end the attribute by adding it to the list of attributes. currentPart.attrs.push(_cp); _cp = null; // necessary? inBrackets = inMatchFor = -1; }else if(cc == "="){ // if the last char was an operator prefix, make sure we // record it along with the "=" operator. var addToCc = ("|~^$*".indexOf(lc) >=0 ) ? lc : ""; _cp.type = addToCc+cc; _cp.attr = ts(inBrackets+1, x-addToCc.length); inMatchFor = x+1; } // now look for other clause parts }else if(inParens >= 0){ // if we're in a parenthetical expression, we need to figure // out if it's attached to a pseudo-selector rule like // :nth-child(1) if(cc == ")"){ if(inPseudo >= 0){ _cp.value = ts(inParens+1, x); } inPseudo = inParens = -1; } }else if(cc == " // start of an ID match endAll(); inId = x+1; }else if(cc == "."){ // start of a class match endAll(); inClass = x; }else if(cc == ":"){ // start of a pseudo-selector match endAll(); inPseudo = x; }else if(cc == "["){ // start of an attribute match. endAll(); inBrackets = x; // provide a new structure for the attribute match to fill-in _cp = { }; }else if(cc == "("){ // we really only care if we've entered a parenthetical // expression if we're already inside a pseudo-selector match if(inPseudo >= 0){ // provide a new structure for the pseudo match to fill-in _cp = { name: ts(inPseudo+1, x), value: null }; currentPart.pseudos.push(_cp); } inParens = x; }else if( (cc == " ") && // if it's a space char and the last char is too, consume the // current one without doing more work (lc != cc) ){ endPart(); } } return queryParts; }; // DOM query infrastructure var agree = function(first, second){ // the basic building block of the yes/no chaining system. agree(f1, // f2) generates a new function which returns the boolean results of // both of the passed functions to a single logical-anded result. If // either are not passed, the other is used exclusively. if(!first){ return second; } if(!second){ return first; } return function(){ return first.apply(window, arguments) && second.apply(window, arguments); }; }; var getArr = function(i, arr){ // helps us avoid array alloc when we don't need it var r = arr||[]; // FIXME: should this be 'new d._NodeListCtor()' ? if(i){ r.push(i); } return r; }; var _isElement = function(n){ return (1 == n.nodeType); }; // FIXME: need to coalesce _getAttr with defaultGetter var blank = ""; var _getAttr = function(elem, attr){ if(!elem){ return blank; } if(attr == "class"){ return elem.className || blank; } if(attr == "for"){ return elem.htmlFor || blank; } if(attr == "style"){ return elem.style.cssText || blank; } return (caseSensitive ? elem.getAttribute(attr) : elem.getAttribute(attr, 2)) || blank; }; var attrs = { "*=": function(attr, value){ return function(elem){ // E[foo*="bar"] // an E element whose "foo" attribute value contains // the substring "bar" return (_getAttr(elem, attr).indexOf(value)>=0); }; }, "^=": function(attr, value){ // E[foo^="bar"] // an E element whose "foo" attribute value begins exactly // with the string "bar" return function(elem){ return (_getAttr(elem, attr).indexOf(value)==0); }; }, "$=": function(attr, value){ // E[foo$="bar"] // an E element whose "foo" attribute value ends exactly // with the string "bar" return function(elem){ var ea = " "+_getAttr(elem, attr); var lastIndex = ea.lastIndexOf(value); return lastIndex > -1 && (lastIndex==(ea.length-value.length)); }; }, "~=": function(attr, value){ // E[foo~="bar"] // an E element whose "foo" attribute value is a list of // space-separated values, one of which is exactly equal // to "bar" // return "[contains(concat(' ',@"+attr+",' '), ' "+ value +" ')]"; var tval = " "+value+" "; return function(elem){ var ea = " "+_getAttr(elem, attr)+" "; return (ea.indexOf(tval)>=0); }; }, "|=": function(attr, value){ // E[hreflang|="en"] // an E element whose "hreflang" attribute has a // hyphen-separated list of values beginning (from the // left) with "en" var valueDash = value+"-"; return function(elem){ var ea = _getAttr(elem, attr); return ( (ea == value) || (ea.indexOf(valueDash)==0) ); }; }, "=": function(attr, value){ return function(elem){ return (_getAttr(elem, attr) == value); }; } }; // avoid testing for node type if we can. Defining this in the negative // here to avoid negation in the fast path. // NOTE: Firefox versions 25-27 implemented an incompatible change // where nextElementSibling was implemented on the DocumentType var htmlElement = getDoc().documentElement; var _noNES = !(htmlElement.nextElementSibling || "nextElementSibling" in htmlElement); var _ns = !_noNES ? "nextElementSibling" : "nextSibling"; var _ps = !_noNES ? "<API key>" : "previousSibling"; var _simpleNodeTest = (_noNES ? _isElement : yesman); var _lookLeft = function(node){ // look left while(node = node[_ps]){ if(_simpleNodeTest(node)){ return false; } } return true; }; var _lookRight = function(node){ // look right while(node = node[_ns]){ if(_simpleNodeTest(node)){ return false; } } return true; }; var getNodeIndex = function(node){ var root = node.parentNode; root = root.nodeType != 7 ? root : root.nextSibling; // <API key> var i = 0, tret = root.children || root.childNodes, ci = (node["_i"]||node.getAttribute("_i")||-1), cl = (root["_l"]|| (typeof root.getAttribute !== "undefined" ? root.getAttribute("_l") : -1)); if(!tret){ return -1; } var l = tret.length; // we calculate the parent length as a cheap way to invalidate the // cache. It's not 100% accurate, but it's much more honest than what // other libraries do if( cl == l && ci >= 0 && cl >= 0 ){ // if it's legit, tag and release return ci; } // else re-key things if(has("ie") && typeof root.setAttribute !== "undefined"){ root.setAttribute("_l", l); }else{ root["_l"] = l; } ci = -1; for(var te = root["firstElementChild"]||root["firstChild"]; te; te = te[_ns]){ if(_simpleNodeTest(te)){ if(has("ie")){ te.setAttribute("_i", ++i); }else{ te["_i"] = ++i; } if(node === te){ // NOTE: // shortcutting the return at this step in indexing works // very well for benchmarking but we avoid it here since // it leads to potential O(n^2) behavior in sequential // getNodexIndex operations on a previously un-indexed // parent. We may revisit this at a later time, but for // now we just want to get the right answer more often // than not. ci = i; } } } return ci; }; var isEven = function(elem){ return !((getNodeIndex(elem)) % 2); }; var isOdd = function(elem){ return ((getNodeIndex(elem)) % 2); }; var pseudos = { "checked": function(name, condition){ return function(elem){ return !!("checked" in elem ? elem.checked : elem.selected); }; }, "disabled": function(name, condition){ return function(elem){ return elem.disabled; }; }, "enabled": function(name, condition){ return function(elem){ return !elem.disabled; }; }, "first-child": function(){ return _lookLeft; }, "last-child": function(){ return _lookRight; }, "only-child": function(name, condition){ return function(node){ return _lookLeft(node) && _lookRight(node); }; }, "empty": function(name, condition){ return function(elem){ // DomQuery and jQuery get this wrong, oddly enough. // The CSS 3 selectors spec is pretty explicit about it, too. var cn = elem.childNodes; var cnl = elem.childNodes.length; // if(!cnl){ return true; } for(var x=cnl-1; x >= 0; x var nt = cn[x].nodeType; if((nt === 1)||(nt == 3)){ return false; } } return true; }; }, "contains": function(name, condition){ var cz = condition.charAt(0); if( cz == '"' || cz == "'" ){ //remove quote condition = condition.slice(1, -1); } return function(elem){ return (elem.innerHTML.indexOf(condition) >= 0); }; }, "not": function(name, condition){ var p = getQueryParts(condition)[0]; var ignores = { el: 1 }; if(p.tag != "*"){ ignores.tag = 1; } if(!p.classes.length){ ignores.classes = 1; } var ntf = getSimpleFilterFunc(p, ignores); return function(elem){ return (!ntf(elem)); }; }, "nth-child": function(name, condition){ var pi = parseInt; // avoid re-defining function objects if we can if(condition == "odd"){ return isOdd; }else if(condition == "even"){ return isEven; } // FIXME: can we shorten this? if(condition.indexOf("n") != -1){ var tparts = condition.split("n", 2); var pred = tparts[0] ? ((tparts[0] == '-') ? -1 : pi(tparts[0])) : 1; var idx = tparts[1] ? pi(tparts[1]) : 0; var lb = 0, ub = -1; if(pred > 0){ if(idx < 0){ idx = (idx % pred) && (pred + (idx % pred)); }else if(idx>0){ if(idx >= pred){ lb = idx - idx % pred; } idx = idx % pred; } }else if(pred<0){ pred *= -1; // idx has to be greater than 0 when pred is negative; // shall we throw an error here? if(idx > 0){ ub = idx; idx = idx % pred; } } if(pred > 0){ return function(elem){ var i = getNodeIndex(elem); return (i>=lb) && (ub<0 || i<=ub) && ((i % pred) == idx); }; }else{ condition = idx; } } var ncount = pi(condition); return function(elem){ return (getNodeIndex(elem) == ncount); }; } }; var defaultGetter = (has("ie") < 9 || has("ie") == 9 && has("quirks")) ? function(cond){ var clc = cond.toLowerCase(); if(clc == "class"){ cond = "className"; } return function(elem){ return (caseSensitive ? elem.getAttribute(cond) : elem[cond]||elem[clc]); }; } : function(cond){ return function(elem){ return (elem && elem.getAttribute && elem.hasAttribute(cond)); }; }; var getSimpleFilterFunc = function(query, ignores){ // generates a node tester function based on the passed query part. The // query part is one of the structures generated by the query parser // when it creates the query AST. The "ignores" object specifies which // (if any) tests to skip, allowing the system to avoid duplicating // work where it may have already been taken into account by other // factors such as how the nodes to test were fetched in the first // place if(!query){ return yesman; } ignores = ignores||{}; var ff = null; if(!("el" in ignores)){ ff = agree(ff, _isElement); } if(!("tag" in ignores)){ if(query.tag != "*"){ ff = agree(ff, function(elem){ return (elem && ((caseSensitive ? elem.tagName : elem.tagName.toUpperCase()) == query.getTag())); }); } } if(!("classes" in ignores)){ each(query.classes, function(cname, idx, arr){ // get the class name /* var isWildcard = cname.charAt(cname.length-1) == "*"; if(isWildcard){ cname = cname.substr(0, cname.length-1); } // I dislike the regex thing, even if memoized in a cache, but it's VERY short var re = new RegExp("(?:^|\\s)" + cname + (isWildcard ? ".*" : "") + "(?:\\s|$)"); */ var re = new RegExp("(?:^|\\s)" + cname + "(?:\\s|$)"); ff = agree(ff, function(elem){ return re.test(elem.className); }); ff.count = idx; }); } if(!("pseudos" in ignores)){ each(query.pseudos, function(pseudo){ var pn = pseudo.name; if(pseudos[pn]){ ff = agree(ff, pseudos[pn](pn, pseudo.value)); } }); } if(!("attrs" in ignores)){ each(query.attrs, function(attr){ var matcher; var a = attr.attr; // type, attr, matchFor if(attr.type && attrs[attr.type]){ matcher = attrs[attr.type](a, attr.matchFor); }else if(a.length){ matcher = defaultGetter(a); } if(matcher){ ff = agree(ff, matcher); } }); } if(!("id" in ignores)){ if(query.id){ ff = agree(ff, function(elem){ return (!!elem && (elem.id == query.id)); }); } } if(!ff){ if(!("default" in ignores)){ ff = yesman; } } return ff; }; var _nextSibling = function(filterFunc){ return function(node, ret, bag){ while(node = node[_ns]){ if(_noNES && (!_isElement(node))){ continue; } if( (!bag || _isUnique(node, bag)) && filterFunc(node) ){ ret.push(node); } break; } return ret; }; }; var _nextSiblings = function(filterFunc){ return function(root, ret, bag){ var te = root[_ns]; while(te){ if(_simpleNodeTest(te)){ if(bag && !_isUnique(te, bag)){ break; } if(filterFunc(te)){ ret.push(te); } } te = te[_ns]; } return ret; }; }; // get an array of child *elements*, skipping text and comment nodes var _childElements = function(filterFunc, recursive){ var _toArray = function (iterable) { var result = []; try { result = Array.prototype.slice.call(iterable); } catch(e) { // IE8- throws an error when we try convert HTMLCollection // to array using Array.prototype.slice.call for(var i = 0, len = iterable.length; i < len; i++) { result.push(iterable[i]); } } return result; }; filterFunc = filterFunc||yesman; return function(root, ret, bag){ // get an array of child elements, skipping text and comment nodes var te, x = 0, tret = []; tret = _toArray(root.children || root.childNodes); if(recursive) { array.forEach(tret, function (node) { if(node.nodeType === 1) { tret = tret.concat(_toArray(node.<API key>("*"))); } }); } while(te = tret[x++]){ if( _simpleNodeTest(te) && (!bag || _isUnique(te, bag)) && (filterFunc(te, x)) ){ ret.push(te); } } return ret; }; }; // test to see if node is below root var _isDescendant = function(node, root){ var pn = node.parentNode; while(pn){ if(pn == root){ break; } pn = pn.parentNode; } return !!pn; }; var <API key> = {}; var getElementsFunc = function(query){ var retFunc = <API key>[query.query]; // if we've got a cached dispatcher, just use that if(retFunc){ return retFunc; } // else, generate a new on // NOTE: // this function returns a function that searches for nodes and // filters them. The search may be specialized by infix operators // (">", "~", or "+") else it will default to searching all // descendants (the " " selector). Once a group of children is // found, a test function is applied to weed out the ones we // don't want. Many common cases can be fast-pathed. We spend a // lot of cycles to create a dispatcher that doesn't do more work // than necessary at any point since, unlike this function, the // dispatchers will be called every time. The logic of generating // efficient dispatchers looks like this in pseudo code: // # if it's a purely descendant query (no ">", "+", or "~" modifiers) // if infixOperator == " ": // if only(id): // return def(root): // return d.byId(id, root); // elif id: // return def(root): // return filter(d.byId(id, root)); // elif cssClass && <API key>: // return def(root): // return filter(root.<API key>(cssClass)); // elif only(tag): // return def(root): // return root.<API key>(tagName); // else: // # search by tag name, then filter // return def(root): // return filter(root.<API key>(tagName||"*")); // elif infixOperator == ">": // # search direct children // return def(root): // return filter(root.children); // elif infixOperator == "+": // # search next sibling // return def(root): // return filter(root.nextElementSibling); // elif infixOperator == "~": // # search rightward siblings // return def(root): // return filter(nextSiblings(root)); var io = query.infixOper; var oper = (io ? io.oper : ""); // the default filter func which tests for all conditions in the query // part. This is potentially inefficient, so some optimized paths may // re-define it to test fewer things. var filterFunc = getSimpleFilterFunc(query, { el: 1 }); var qt = query.tag; var wildcardTag = ("*" == qt); var ecs = getDoc()["<API key>"]; if(!oper){ // if there's no infix operator, then it's a descendant query. ID // and "elements by class name" variants can be accelerated so we // call them out explicitly: if(query.id){ // testing shows that the overhead of yesman() is acceptable // and can save us some bytes vs. re-defining the function // everywhere. filterFunc = (!query.loops && wildcardTag) ? yesman : getSimpleFilterFunc(query, { el: 1, id: 1 }); retFunc = function(root, arr){ var te = dom.byId(query.id, (root.ownerDocument||root)); // We can't look for ID inside a detached dom. // loop over all elements searching for specified id. if(root.ownerDocument && !_isDescendant(root, root.ownerDocument)) { // document-fragment or regular HTMLElement var roots = root.nodeType === 11? root.childNodes: [root]; array.some(roots, function (currentRoot) { var elems = _childElements(function (node) { return node.id === query.id; }, true)(currentRoot, []); if(elems.length) { te = elems[0]; return false; } }); } if(!te || !filterFunc(te)){ return; } if(9 == root.nodeType){ // if root's a doc, we just return directly return getArr(te, arr); }else{ // otherwise check ancestry if(_isDescendant(te, root)){ return getArr(te, arr); } } }; }else if( ecs && // isAlien check. Workaround for Prototype.js being totally evil/dumb. /\{\s*\[native code\]\s*\}/.test(String(ecs)) && query.classes.length && !cssCaseBug ){ // it's a class-based query and we've got a fast way to run it. // ignore class and ID filters since we will have handled both filterFunc = getSimpleFilterFunc(query, { el: 1, classes: 1, id: 1 }); var classesString = query.classes.join(" "); retFunc = function(root, arr, bag){ var ret = getArr(0, arr), te, x=0; var tret = root.<API key>(classesString); while((te = tret[x++])){ if(filterFunc(te, root) && _isUnique(te, bag)){ ret.push(te); } } return ret; }; }else if(!wildcardTag && !query.loops){ // it's tag only. Fast-path it. retFunc = function(root, arr, bag){ var ret = getArr(0, arr), te, x=0; var tag = query.getTag(), tret = tag ? root.<API key>(tag) : []; while((te = tret[x++])){ if(_isUnique(te, bag)){ ret.push(te); } } return ret; }; }else{ // the common case: // a descendant selector without a fast path. By now it's got // to have a tag selector, even if it's just "*" so we query // by that and filter filterFunc = getSimpleFilterFunc(query, { el: 1, tag: 1, id: 1 }); retFunc = function(root, arr, bag){ var ret = getArr(0, arr), te, x=0; // we use getTag() to avoid case sensitivity issues var tag = query.getTag(), tret = tag ? root.<API key>(tag) : []; while((te = tret[x++])){ if(filterFunc(te, root) && _isUnique(te, bag)){ ret.push(te); } } return ret; }; } }else{ // the query is scoped in some way. Instead of querying by tag we // use some other collection to find candidate nodes var skipFilters = { el: 1 }; if(wildcardTag){ skipFilters.tag = 1; } filterFunc = getSimpleFilterFunc(query, skipFilters); if("+" == oper){ retFunc = _nextSibling(filterFunc); }else if("~" == oper){ retFunc = _nextSiblings(filterFunc); }else if(">" == oper){ retFunc = _childElements(filterFunc); } } // cache it and return return <API key>[query.query] = retFunc; }; var filterDown = function(root, queryParts){ // NOTE: // this is the guts of the DOM query system. It takes a list of // parsed query parts and a root and finds children which match // the selector represented by the parts var candidates = getArr(root), qp, x, te, qpl = queryParts.length, bag, ret; for(var i = 0; i < qpl; i++){ ret = []; qp = queryParts[i]; x = candidates.length - 1; if(x > 0){ // if we have more than one root at this level, provide a new // hash to use for checking group membership but tell the // system not to post-filter us since we will already have been // guaranteed to be unique bag = {}; ret.nozip = true; } var gef = getElementsFunc(qp); for(var j = 0; (te = candidates[j]); j++){ // for every root, get the elements that match the descendant // selector, adding them to the "ret" array and filtering them // via membership in this level's bag. If there are more query // parts, then this level's return will be used as the next // level's candidates gef(te, ret, bag); } if(!ret.length){ break; } candidates = ret; } return ret; }; // the query runner // these are the primary caches for full-query results. The query // dispatcher functions are generated then stored here for hash lookup in // the future var _queryFuncCacheDOM = {}, _queryFuncCacheQSA = {}; // this is the second level of splitting, from full-length queries (e.g., // "div.foo .bar") into simple query expressions (e.g., ["div.foo", // ".bar"]) var getStepQueryFunc = function(query){ var qparts = getQueryParts(trim(query)); // if it's trivial, avoid iteration and zipping costs if(qparts.length == 1){ // we optimize this case here to prevent dispatch further down the // chain, potentially slowing things down. We could more elegantly // handle this in filterDown(), but it's slower for simple things // that need to be fast (e.g., "#someId"). var tef = getElementsFunc(qparts[0]); return function(root){ var r = tef(root, []); if(r){ r.nozip = true; } return r; }; } // otherwise, break it up and return a runner that iterates over the parts recursively return function(root){ return filterDown(root, qparts); }; }; // NOTES: // * we can't trust QSA for anything but document-rooted queries, so // caching is split into DOM query evaluators and QSA query evaluators // * caching query results is dirty and leak-prone (or, at a minimum, // prone to unbounded growth). Other toolkits may go this route, but // they totally destroy their own ability to manage their memory // footprint. If we implement it, it should only ever be with a fixed // total element reference # limit and an LRU-style algorithm since JS // has no weakref support. Caching compiled query evaluators is also // potentially problematic, but even on large documents the size of the // query evaluators is often < 100 function objects per evaluator (and // LRU can be applied if it's ever shown to be an issue). // * since IE's QSA support is currently only for HTML documents and even // then only in IE 8's "standards mode", we have to detect our dispatch // route at query time and keep 2 separate caches. Ugg. // we need to determine if we think we can run a given query via // querySelectorAll or if we'll need to fall back on DOM queries to get // there. We need a lot of information about the environment and the query // to make the determination (e.g. does it support QSA, does the query in // question work in the native QSA impl, etc.). // IE QSA queries may incorrectly include comment nodes, so we throw the // zipping function into "remove" comments mode instead of the normal "skip // it" which every other QSA-clued browser enjoys var noZip = has("ie") ? "commentStrip" : "nozip"; var qsa = "querySelectorAll"; var qsaAvail = !!getDoc()[qsa]; //Don't bother with n+3 type of matches, IE complains if we modify those. var infixSpaceRe = /\\[>~+]|n\+\d|([^ \\])?([>~+])([^ =])?/g; var infixSpaceFunc = function(match, pre, ch, post){ return ch ? (pre ? pre + " " : "") + ch + (post ? " " + post : "") : match; }; //Don't apply the infixSpaceRe to attribute value selectors var attRe = /([^[]*)([^\]]*])?/g; var attFunc = function(match, nonAtt, att){ return nonAtt.replace(infixSpaceRe, infixSpaceFunc) + (att||""); }; var getQueryFunc = function(query, forceDOM){ //Normalize query. The CSS3 selectors spec allows for omitting spaces around //infix operators, >, ~ and + //Do the work here since detection for spaces is used as a simple "not use QSA" //test below. query = query.replace(attRe, attFunc); if(qsaAvail){ // if we've got a cached variant and we think we can do it, run it! var qsaCached = _queryFuncCacheQSA[query]; if(qsaCached && !forceDOM){ return qsaCached; } } // else if we've got a DOM cached variant, assume that we already know // all we need to and use it var domCached = _queryFuncCacheDOM[query]; if(domCached){ return domCached; } // TODO: // today we're caching DOM and QSA branches separately so we // recalc useQSA every time. If we had a way to tag root+query // efficiently, we'd be in good shape to do a global cache. var qcz = query.charAt(0); var nospace = (-1 == query.indexOf(" ")); // byId searches are wicked fast compared to QSA, even when filtering // is required if( (query.indexOf("#") >= 0) && (nospace) ){ forceDOM = true; } var useQSA = ( qsaAvail && (!forceDOM) && // as per CSS 3, we can't currently start w/ combinator: // http://www.w3.org/TR/css3-selectors/#w3cselgrammar (specials.indexOf(qcz) == -1) && // IE's QSA impl sucks on pseudos (!has("ie") || (query.indexOf(":") == -1)) && (!(cssCaseBug && (query.indexOf(".") >= 0))) && // FIXME: // need to tighten up browser rules on ":contains" and "|=" to // figure out which aren't good // Latest webkit (around 531.21.8) does not seem to do well with :checked on option // elements, even though according to spec, selected options should // match :checked. So go nonQSA for it: (query.indexOf(":contains") == -1) && (query.indexOf(":checked") == -1) && (query.indexOf("|=") == -1) // some browsers don't grok it ); // TODO: // if we've got a descendant query (e.g., "> .thinger" instead of // just ".thinger") in a QSA-able doc, but are passed a child as a // root, it should be possible to give the item a synthetic ID and // trivially rewrite the query to the form "#synid > .thinger" to // use the QSA branch if(useQSA){ var tq = (specials.indexOf(query.charAt(query.length-1)) >= 0) ? (query + " *") : query; return _queryFuncCacheQSA[query] = function(root){ // the QSA system contains an egregious spec bug which // limits us, effectively, to only running QSA queries over // entire documents. See: // despite this, we can also handle QSA runs on simple // selectors, but we don't want detection to be expensive // so we're just checking for the presence of a space char // right now. Not elegant, but it's cheaper than running // the query parser when we might not need to if(9 == root.nodeType || nospace){ try{ var r = root[qsa](tq); // skip expensive duplication checks and just wrap in a NodeList r[noZip] = true; return r; }catch(e){ // if root[qsa](tq), fall through to getQueryFunc() branch below } } // else run the DOM branch on this query, ensuring that we // default that way in the future return getQueryFunc(query, true)(root); }; }else{ // DOM branch var parts = query.match(/([^\s,](?:"(?:\\.|[^"])+"|'(?:\\.|[^'])+'|[^,])*)/g); return _queryFuncCacheDOM[query] = ((parts.length < 2) ? // if not a compound query (e.g., ".foo, .bar"), cache and return a dispatcher getStepQueryFunc(query) : // if it *is* a complex query, break it up into its // constituent parts and return a dispatcher that will // merge the parts when run function(root){ var pindex = 0, // avoid array alloc for every invocation ret = [], tp; while((tp = parts[pindex++])){ ret = ret.concat(getStepQueryFunc(tp)(root)); } return ret; } ); } }; var _zipIdx = 0; // NOTE: // this function is Moo inspired, but our own impl to deal correctly // with XML in IE var _nodeUID = has("ie") ? function(node){ if(caseSensitive){ // XML docs don't have uniqueID on their nodes return (node.getAttribute("_uid") || node.setAttribute("_uid", ++_zipIdx) || _zipIdx); }else{ return node.uniqueID; } } : function(node){ return (node._uid || (node._uid = ++_zipIdx)); }; // determine if a node in is unique in a "bag". In this case we don't want // to flatten a list of unique items, but rather just tell if the item in // question is already in the bag. Normally we'd just use hash lookup to do // this for us but IE's DOM is busted so we can't really count on that. On // the upside, it gives us a built in unique ID function. var _isUnique = function(node, bag){ if(!bag){ return 1; } var id = _nodeUID(node); if(!bag[id]){ return bag[id] = 1; } return 0; }; // attempt to efficiently determine if an item in a list is a dupe, // returning a list of "uniques", hopefully in document order var _zipIdxName = "_zipIdx"; var _zip = function(arr){ if(arr && arr.nozip){ return arr; } if(!arr || !arr.length){ return []; } if(arr.length < 2){ return [arr[0]]; } var ret = []; _zipIdx++; // we have to fork here for IE and XML docs because we can't set // expandos on their nodes (apparently). *sigh* var x, te; if(has("ie") && caseSensitive){ var szidx = _zipIdx+""; for(x = 0; x < arr.length; x++){ if((te = arr[x]) && te.getAttribute(_zipIdxName) != szidx){ ret.push(te); te.setAttribute(_zipIdxName, szidx); } } }else if(has("ie") && arr.commentStrip){ try{ for(x = 0; x < arr.length; x++){ if((te = arr[x]) && _isElement(te)){ ret.push(te); } } }catch(e){ /* squelch */ } }else{ for(x = 0; x < arr.length; x++){ if((te = arr[x]) && te[_zipIdxName] != _zipIdx){ ret.push(te); te[_zipIdxName] = _zipIdx; } } } return ret; }; // the main executor var query = function(/*String*/ query, /*String|DOMNode?*/ root){ // summary: // Returns nodes which match the given CSS3 selector, searching the // entire document by default but optionally taking a node to scope // the search by. Returns an array. // description: // dojo.query() is the swiss army knife of DOM node manipulation in // Dojo. Much like Prototype's "$$" (bling-bling) function or JQuery's // "$" function, dojo.query provides robust, high-performance // CSS-based node selector support with the option of scoping searches // to a particular sub-tree of a document. // Supported Selectors: // acme supports a rich set of CSS3 selectors, including: // - class selectors (e.g., `.foo`) // - node type selectors like `span` // - ` ` descendant selectors // - `>` child element selectors // - `#foo` style ID selectors // - `*` universal selector // - `~`, the preceded-by sibling selector // - `+`, the immediately preceded-by sibling selector // - attribute queries: // - `[foo]` attribute presence selector // - `[foo='bar']` attribute value exact match // - `[foo~='bar']` attribute value list item match // - `[foo^='bar']` attribute start match // - `[foo$='bar']` attribute end match // - `[foo*='bar']` attribute substring match // - `:first-child`, `:last-child`, and `:only-child` positional selectors // - `:empty` content emtpy selector // - `:checked` pseudo selector // - `:nth-child(n)`, `:nth-child(2n+1)` style positional calculations // - `:nth-child(even)`, `:nth-child(odd)` positional selectors // - `:not(...)` negation pseudo selectors // `dojo.query()`, including compound selectors ("," delimited). // Very complex and useful searches can be constructed with this // palette of selectors and when combined with functions for // manipulation presented by dojo/NodeList, many types of DOM // manipulation operations become very straightforward. // Unsupported Selectors: // While dojo.query handles many CSS3 selectors, some fall outside of // what's reasonable for a programmatic node querying engine to // handle. Currently unsupported selectors include: // - <API key> selectors of any form // - all `::` pseduo-element selectors // - certain pseudo-selectors which don't get a lot of day-to-day use: // - `:root`, `:lang()`, `:target`, `:focus` // - all visual and state selectors: // - `:root`, `:active`, `:hover`, `:visited`, `:link`, // `:enabled`, `:disabled` // - `:*-of-type` pseudo selectors // dojo.query and XML Documents: // `dojo.query` (as of dojo 1.2) supports searching XML documents // in a case-sensitive manner. If an HTML document is served with // a doctype that forces case-sensitivity (e.g., XHTML 1.1 // Strict), dojo.query() will detect this and "do the right // thing". Case sensitivity is dependent upon the document being // searched and not the query used. It is therefore possible to // use case-sensitive queries on strict sub-documents (iframes, // etc.) or XML documents while still assuming case-insensitivity // for a host/root document. // Non-selector Queries: // If something other than a String is passed for the query, // `dojo.query` will return a new `dojo/NodeList` instance // constructed from that parameter alone and all further // processing will stop. This means that if you have a reference // to a node or NodeList, you can quickly construct a new NodeList // from the original by calling `dojo.query(node)` or // `dojo.query(list)`. // query: // The CSS3 expression to match against. For details on the syntax of // CSS3 selectors, see <http://www.w3.org/TR/css3-selectors/#selectors> // root: // A DOMNode (or node id) to scope the search from. Optional. // returns: Array // example: // search the entire document for elements with the class "foo": // | require(["dojo/query"], function(query) { // | query(".foo").forEach(function(q) { 0 && console.log(q); }); // these elements will match: // | <span class="foo"></span> // | <span class="foo bar"></span> // | <p class="thud foo"></p> // example: // search the entire document for elements with the classes "foo" *and* "bar": // | require(["dojo/query"], function(query) { // | query(".foo.bar").forEach(function(q) { 0 && console.log(q); }); // these elements will match: // | <span class="foo bar"></span> // while these will not: // | <span class="foo"></span> // | <p class="thud foo"></p> // example: // find `<span>` elements which are descendants of paragraphs and // which have a "highlighted" class: // | require(["dojo/query"], function(query) { // | query("p span.highlighted").forEach(function(q) { 0 && console.log(q); }); // the innermost span in this fragment matches: // | <p class="foo"> // | <span>... // | <span class="highlighted foo bar">...</span> // | </span> // example: // set an "odd" class on all odd table rows inside of the table // `#tabular_data`, using the `>` (direct child) selector to avoid // affecting any nested tables: // | require(["dojo/query"], function(query) { // | query("#tabular_data > tbody > tr:nth-child(odd)").addClass("odd"); // example: // remove all elements with the class "error" from the document: // | require(["dojo/query"], function(query) { // | query(".error").orphan(); // example: // add an onclick handler to every submit button in the document // which causes the form to be sent via Ajax instead: // | require(["dojo/query", "dojo/request", "dojo/dom-construct", "dojo/dom-style" // | ], function (query, request, domConstruct, domStyle) { // | query("input[type='submit']").on("click", function (e) { // | e.stopPropagation(); // | e.preventDefault(); // | var btn = e.target; // | request.post("", { data: btn.form, timeout: 2000 }) // | .then(function (data) { // | // replace the form with the response // | domConstruct.create("div", { innerHTML: data }, btn.form, "after"); // | domStyle.set(btn.form, "display", "none"); root = root || getDoc(); // throw the big case sensitivity switch var od = root.ownerDocument || root; // root is either Document or a node inside the document caseSensitive = (od.createElement("div").tagName === "div"); // NOTE: // adding "true" as the 2nd argument to getQueryFunc is useful for // testing the DOM branch without worrying about the // behavior/performance of the QSA branch. var r = getQueryFunc(query)(root); // FIXME: // need to investigate this branch WRT #8074 and #8075 if(r && r.nozip){ return r; } return _zip(r); // dojo/NodeList }; query.filter = function(/*Node[]*/ nodeList, /*String*/ filter, /*String|DOMNode?*/ root){ // summary: // function for filtering a NodeList based on a selector, optimized for simple selectors var tmpNodeList = [], parts = getQueryParts(filter), filterFunc = (parts.length == 1 && !/[^\w#\.]/.test(filter)) ? getSimpleFilterFunc(parts[0]) : function(node){ return array.indexOf(query(filter, dom.byId(root)), node) != -1; }; for(var x = 0, te; te = nodeList[x]; x++){ if(filterFunc(te)){ tmpNodeList.push(te); } } return tmpNodeList; }; return query; });
import os from collections import defaultdict from dataclasses import asdict from pathlib import Path from unittest import mock import numpy as np import pydicom import pytest from panimg.image_builders.dicom import ( <API key>, <API key>, format_error, image_builder_dicom, ) from panimg.image_builders.metaio_utils import parse_mh_header from panimg.panimg import _build_files from grandchallenge.cases.models import Image from tests.cases_tests import RESOURCE_PATH DICOM_DIR = RESOURCE_PATH / "dicom" def <API key>(): files = [Path(d[0]).joinpath(f) for d in os.walk(DICOM_DIR) for f in d[2]] studies = <API key>(files, defaultdict(list)) assert len(studies) == 1 for key in studies: assert [str(x["file"]) for x in studies[key]["headers"]] == [ f"{DICOM_DIR}/{x}.dcm" for x in range(1, 77) ] for root, _, files in os.walk(RESOURCE_PATH): files = [Path(root).joinpath(f) for f in files] break studies = <API key>(files, defaultdict(list)) assert len(studies) == 0 def <API key>(): files = [Path(d[0]).joinpath(f) for d in os.walk(DICOM_DIR) for f in d[2]] studies = <API key>(files, defaultdict(list)) assert len(studies) == 1 for study in studies: headers = study.headers assert study.n_time == 19 assert study.n_slices == 4 with mock.patch( "panimg.image_builders.dicom.<API key>", return_value={ "foo": {"headers": headers[1:], "file": "bar", "index": 1}, }, ): errors = defaultdict(list) studies = <API key>(files, errors) assert len(studies) == 0 for header in headers[1:]: assert errors[header["file"]] == [ format_error("Number of slices per time point differs") ] def <API key>(tmpdir): files = {Path(d[0]).joinpath(f) for d in os.walk(DICOM_DIR) for f in d[2]} result = _build_files( builder=image_builder_dicom, files=files, output_directory=tmpdir ) assert result.consumed_files == { Path(DICOM_DIR).joinpath(f"{x}.dcm") for x in range(1, 77) } assert len(result.new_images) == 1 image = Image(**asdict(result.new_images.pop())) assert image.shape == [19, 4, 2, 3] assert len(result.new_image_files) == 1 mha_file_obj = [ x for x in result.new_image_files if x.file.suffix == ".mha" ][0] headers = parse_mh_header(mha_file_obj.file) direction = headers["TransformMatrix"].split() origin = headers["Offset"].split() spacing = headers["ElementSpacing"].split() exposures = headers["Exposures"].split() content_times = headers["ContentTimes"].split() assert len(exposures) == 19 assert exposures == [str(x) for x in range(100, 2000, 100)] assert len(content_times) == 19 assert content_times == [str(x) for x in range(214501, 214520)] dcm_ref = pydicom.dcmread(str(DICOM_DIR / "1.dcm")) assert np.array_equal( np.array(list(map(float, direction))).reshape((4, 4)), np.eye(4) ) assert np.allclose( list(map(float, spacing))[:2], list(map(float, list(dcm_ref.PixelSpacing),)), ) assert np.allclose( list(map(float, origin)), list(map(float, dcm_ref.<API key>)) + [0.0], ) @pytest.mark.parametrize( "folder,element_type", [ ("dicom", "MET_SHORT"), ("dicom_intercept", "MET_FLOAT"), ("dicom_slope", "MET_FLOAT"), ], ) def <API key>(folder, element_type, tmpdir): """ 2.dcm in dicom_intercept and dicom_slope has been modified to add a small intercept (0.01) or slope (1.001) respectively. """ files = [ Path(d[0]).joinpath(f) for d in os.walk(RESOURCE_PATH / folder) for f in d[2] ] result = _build_files( builder=image_builder_dicom, files=files, output_directory=tmpdir ) assert len(result.new_image_files) == 1 mha_file_obj = [ x for x in result.new_image_files if x.file.suffix == ".mha" ][0] headers = parse_mh_header(mha_file_obj.file) assert headers["ElementType"] == element_type def <API key>(tmpdir): files = { Path(d[0]).joinpath(f) for d in os.walk(RESOURCE_PATH / "dicom") for f in d[2] } result = _build_files( builder=image_builder_dicom, files=files, output_directory=tmpdir ) assert len(result.new_image_files) == 1 mha_file_obj = [ x for x in result.new_image_files if x.file.suffix == ".mha" ][0] headers = parse_mh_header(mha_file_obj.file) assert headers["WindowCenter"] == "30" assert headers["WindowWidth"] == "200" assert len(result.new_images) == 1 image_obj = result.new_images.pop() assert image_obj.window_center == 30.0 assert image_obj.window_width == 200.0
<h1 md-dialog-title>{{ 'create tag' | translate }}</h1> <md-dialog-content> <md-input-container class="grow-width"> <input mdInput placeholder="{{ 'title' | translate }}" [(ngModel)]="tag.title" required> </md-input-container> <md-input-container class="grow-width"> <textarea mdInput mdTextareaAutosize #autosize="mdTextareaAutosize" placeholder="{{ 'description' | translate }}" [(ngModel)]="tag.description" name="desc"></textarea> </md-input-container> </md-dialog-content> <md-dialog-actions align="end"> <button md-dialog-close md-raised-button> {{ 'cancel' | translate }} <md-icon>cancel</md-icon> </button> <button md-raised-button color="primary" [disabled]="!tag.isValid()" (click)="dialogRef.close(tag)"> {{ 'create' | translate }} <md-icon>add_circle</md-icon> </button> </md-dialog-actions>
$(document).ready(function() { AdminUI.startup(); }); var AdminUI = { tabs: [], startup: function() { AdminUI.loading = false; var deferred = $.ajax({ url: Constants.URL__SETTINGS, dataType: "json", type: "GET" }); deferred.done(function(response, status) { AdminUI.settings = response; AdminUI.initialize(); }); deferred.fail(function(xhr, status, error) { window.location.href = Constants.URL__LOGIN; }); }, initialize: function() { $(window).resize(AdminUI.resize); $(".cloudControllerText").text(AdminUI.settings.<API key>); if (AdminUI.settings.name) { $(".name").text(AdminUI.settings.name); $(".name").show(); } else { $(".name").hide(); } if (AdminUI.settings.build) { $(".build").text("Build " + AdminUI.settings.build); $(".build").show(); } else { $(".build").hide(); } if (AdminUI.settings.api_version) { $(".apiVersion").text("API Version " + AdminUI.settings.api_version); $(".apiVersion").show(); } else { $(".apiVersion").hide(); } if (AdminUI.settings.uaa_version) { $(".uaaVersion").text("UAA Version " + AdminUI.settings.uaa_version); $(".uaaVersion").show(); } else { $(".uaaVersion").hide(); } if (AdminUI.settings.osbapi_version) { $(".osbapiVersion").text("OSB API Version " + AdminUI.settings.osbapi_version); $(".osbapiVersion").show(); } else { $(".osbapiVersion").hide(); } if (AdminUI.settings.user) { $(".user").text(Format.<API key>(AdminUI.settings.user)); } this.<API key>(0); this.setContentHeight(); $('[class*="user"]').mouseover(AdminUI.showUserMenu); $('[class*="user"]').mouseout(function() { $(".userMenu").hide(); }); $(".userMenu").click(function() { AdminUI.logout(); }); $("#MenuButtonLeft").click(AdminUI.<API key>); $("#MenuButtonRight").click(AdminUI.<API key>); $("#MenuButtonRefresh").click(AdminUI.<API key>); $(".menuItem").mouseover(function() { $(this).toggleClass("menuItemHighlighted"); }); $(".menuItem").mouseout(function() { $(this).toggleClass("menuItemHighlighted"); }); $(".menuItem").click(function() { AdminUI.handleTabClicked($(this).attr("id")); }); var tabIDs = this.getTabIDs(); this.showLoadingPage(); this.errorTable = Table.createTable("ModalDialogContents", this.<API key>(), [], null, null, Constants.FILENAME__ERRORS, null, null); $("#<API key>").hide(); try { $(tabIDs).each(function(index, tabID) { if (window[tabID + "Tab"]) { AdminUI.tabs[tabID] = new window[tabID + "Tab"](tabID); AdminUI.tabs[tabID].initialize(); } }); } finally { AdminUI.hideLoadingPage(); } this.handleTabClicked(Constants.ID__DEAS); }, createStats: function(stats) { AdminUI.<API key>("Creating statistics"); var deferred = $.ajax({ url: Constants.URL__STATS, dataType: "json", type: "POST", data: stats }); deferred.done(function(response, status) { AdminUI.<API key>(); AdminUI.refresh(); }); deferred.fail(function(xhr, status, error) { AdminUI.<API key>("Error saving statistics:<br/><br/>" + error); }); }, <API key>: function() { var deferred = $.ajax({ url: Constants.URL__CURRENT_STATS, dataType: "json", type: "GET" }); deferred.done(function(stats, status) { var statsView = AdminUI.tabs[Constants.ID__STATS].<API key>(stats); AdminUI.<API key>("Confirmation", statsView, "Create", null, function() { AdminUI.createStats(stats); }); }); deferred.fail(function(xhr, status, error) { AdminUI.<API key>("Error generating statistics:<br/><br/>" + error); }); }, getCurrentPageID: function() { return $($.find(".menuItemSelected")).attr("id"); }, <API key>: function() { return [ { title: "Label", width: "100px", render: Format.formatString }, { title: "HTTP Status", width: "70px", className: "cellRightAlign", render: Format.formatNumber }, { title: "Status Code", width: "70px", className: "cellRightAlign", render: Format.formatNumber }, { title: "Status Text", width: "100px", render: Format.formatString }, { title: "Message", width: "100px", render: Format.formatString } ]; }, <API key>: function(pageID) { var menuItem = $("#" + pageID); var menuItemLeft = menuItem.position().left; var menuItemWidth = menuItem.outerWidth(); var menuItemContainer = $("#MenuItemContainer"); var <API key> = menuItemContainer.scrollLeft(); var <API key> = menuItemContainer.width(); var scrollLeft = <API key>; if (menuItemLeft < 0) { scrollLeft = <API key> + menuItemLeft; } else if ((menuItemLeft + menuItemWidth) > <API key>) { scrollLeft = <API key> + menuItemLeft + menuItemWidth - <API key>; } return scrollLeft; }, getTabIDs: function() { var ids = []; $('[class="menuItem"]').each(function(index, value) { ids.push(this.id); }); return ids; }, <API key>: function() { if (!$("#MenuButtonLeft").hasClass("menuButtonDisabled")) { var menuItemContainer = $("#MenuItemContainer"); var delta = Math.min(menuItemContainer.width() / 2, 500); var oldScrollLeft = menuItemContainer.scrollLeft(); var scrollLeft = Math.max(0, oldScrollLeft - delta); AdminUI.<API key>(scrollLeft); } }, <API key>: function() { AdminUI.refresh(); }, <API key>: function() { if (!$("#MenuButtonRight").hasClass("menuButtonDisabled")) { var menuItemContainer = $("#MenuItemContainer"); var delta = Math.min(menuItemContainer.width() / 2, 500); var oldScrollLeft = menuItemContainer.scrollLeft(); var scrollLeft = oldScrollLeft + delta; AdminUI.<API key>(scrollLeft); } }, handleTabClicked: function(pageID) { Table.<API key>(); this.setTabSelected(pageID); this.tabs[pageID].refresh(); }, hideErrorPage: function() { $(".errorPage").hide(); }, hideLoadingPage: function() { AdminUI.loading = false; $(".loadingPage").hide(); }, hideModalDialog: function() { $("#<API key>").addClass("hiddenPage"); $("#<API key>").hide(); $("#ModalDialog").addClass("hiddenPage"); $("#<API key>").addClass("hiddenPage"); AdminUI.restoreCursor(); }, logout: function() { var deferred = $.ajax({ url: Constants.URL__LOGOUT, dataType: "json", type: "GET" }); deferred.done(function(result, status) { if (result.redirect) { window.location.href = result.redirect; } }); deferred.fail(function(xhr, status, error) { AdminUI.<API key>("Error logging out:<br/><br/>" + error); }); }, <API key>: function(scrollLeft) { var menuBar = $("#MenuBar"); var menuButtonLeft = $("#MenuButtonLeft"); var menuButtonRight = $("#MenuButtonRight"); var menuButtonRefresh = $("#MenuButtonRefresh"); var menuItemContainer = $("#MenuItemContainer"); var lastChild = menuItemContainer.children().last(); var <API key> = menuItemContainer.position(); var <API key> = Math.min(menuBar.width() - (menuButtonLeft.outerWidth() + menuButtonRight.outerWidth() + menuButtonRefresh.outerWidth()), lastChild.position().left + lastChild.outerWidth() + scrollLeft); $(".menuItemContainer").css({ width: <API key> + "px" }); $(".menuButtonRight").css({ left: <API key>.left + <API key> + "px" }); $(".menuButtonRefresh").css({ left: <API key>.left + <API key> + menuButtonRight.width() + "px" }); }, refresh: function() { Table.<API key>(); var pageID = AdminUI.getCurrentPageID(); AdminUI.showWaitCursor(); try { AdminUI.tabs[pageID].refresh(); } finally { AdminUI.restoreCursor(); } }, <API key>: function() { AdminUI.<API key>("Are you sure you want to remove all OFFLINE doppler components?", "Remove", function() { AdminUI.removeItem(true, null); }); }, <API key>: function() { AdminUI.<API key>("Are you sure you want to remove all OFFLINE varz components?", "Remove", function() { AdminUI.removeItem(false, null); }); }, removeItem: function(doppler, uri) { AdminUI.<API key>("Removing Offline Components"); var removeURI = doppler ? Constants.<API key> : Constants.URL__COMPONENTS; if (uri != null) { removeURI += "?uri=" + encodeURIComponent(uri); } var deferred = $.ajax({ url: removeURI, dataType: "json", type: "DELETE" }); deferred.done(function(response, status) { AdminUI.<API key>(); var type = AdminUI.getCurrentPageID(); $("#" + type + "Table").DataTable().rows().deselect(); AdminUI.refresh(); }); deferred.fail(function(xhr, status, error) { var errorMessage = "Error removing "; if (uri != null) { errorMessage += uri; } else { errorMessage += "all components"; } AdminUI.<API key>(errorMessage + ":<br/><br/>" + error); }); }, <API key>: function(doppler, uri) { AdminUI.<API key>("Are you sure you want to remove " + uri + "?", "Remove", function() { AdminUI.removeItem(doppler, uri); }); }, resize: function() { AdminUI.setContentHeight(); var pageID = AdminUI.getCurrentPageID(); var scrollLeft = AdminUI.<API key>(pageID); AdminUI.<API key>(scrollLeft); AdminUI.<API key>(scrollLeft); if (AdminUI.tabs[pageID].resize) { AdminUI.tabs[pageID].resize(); } }, restoreCursor: function() { $("html").removeClass("waiting"); // The cursor does not change on the Application's page. // Interestingly, simply calling this fixes the issue. $("#MenuButtonRefresh").css("left"); }, <API key>: function(scrollLeft) { var menuButtonLeft = $("#MenuButtonLeft"); var menuButtonRight = $("#MenuButtonRight"); var menuItemContainer = $("#MenuItemContainer"); if (scrollLeft == 0) { menuButtonLeft.addClass("menuButtonDisabled"); menuButtonLeft.attr("src", "images/back_disabled.png"); } else { menuButtonLeft.removeClass("menuButtonDisabled"); menuButtonLeft.attr("src", "images/back.png"); } if (scrollLeft + menuItemContainer.outerWidth() >= menuItemContainer.prop('scrollWidth')) { menuButtonRight.addClass("menuButtonDisabled"); menuButtonRight.attr("src", "images/forward_disabled.png"); } else { menuButtonRight.removeClass("menuButtonDisabled"); menuButtonRight.attr("src", "images/forward.png"); } menuItemContainer.scrollLeft(scrollLeft); }, setContentHeight: function() { var contentHeight = $(window).height() - $("#Content").position().top; $(".content").css({ height: contentHeight + "px" }); }, /** * This function shows the specified tab as selected but does not show the * tab contents. The selected tab will show its contents when it has * finished updating. */ setTabSelected: function(pageID) { // Hide all of the tab pages. $("*[id*=Page]").each(function() { $(this).addClass("hiddenPage"); }); // Select the tab. $(".menuItem").removeClass("menuItemSelected"); $("#" + pageID).addClass("menuItemSelected"); AdminUI.<API key>(AdminUI.<API key>(pageID)); }, <API key>: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, showApplications: function(filter) { AdminUI.showTabFiltered(Constants.ID__APPLICATIONS, filter); }, showApprovals: function(filter) { AdminUI.showTabFiltered(Constants.ID__APPROVALS, filter); }, showBuildpacks: function(filter) { AdminUI.showTabFiltered(Constants.ID__BUILDPACKS, filter); }, showCells: function(filter) { AdminUI.showTabFiltered(Constants.ID__CELLS, filter); }, showClients: function(filter) { AdminUI.showTabFiltered(Constants.ID__CLIENTS, filter); }, showDEAs: function(filter) { AdminUI.showTabFiltered(Constants.ID__DEAS, filter); }, showDomains: function(filter) { AdminUI.showTabFiltered(Constants.ID__DOMAINS, filter); }, showErrorPage: function(error) { if (!AdminUI.loading) { $(".errorText").text(error); $(".errorPage").show(); } }, showEvents: function(filter) { AdminUI.showTabFiltered(Constants.ID__EVENTS, filter); }, showGroupMembers: function(filter) { AdminUI.showTabFiltered(Constants.ID__GROUP_MEMBERS, filter); }, showGroups: function(filter) { AdminUI.showTabFiltered(Constants.ID__GROUPS, filter); }, <API key>: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, showIdentityZones: function(filter) { AdminUI.showTabFiltered(Constants.ID__IDENTITY_ZONES, filter); }, <API key>: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, showLoadingPage: function() { AdminUI.loading = true; $(".loadingPage").show(); }, showMFAProviders: function(filter) { AdminUI.showTabFiltered(Constants.ID__MFA_PROVIDERS, filter); }, showModalDialog: function(title, content, tableData, buttons) { $("#ModalDialogTitle").text(title); $("#<API key>").empty(); if (content != null) { $("#<API key>").append(content); $("#<API key>").removeClass("hiddenPage"); } else { $("#<API key>").addClass("hiddenPage"); } $("#<API key>").empty(); if ((buttons != null) && (buttons.length > 0)) { for (var buttonIndex = 0; buttonIndex < buttons.length; buttonIndex++) { var button = buttons[buttonIndex]; var buttonID = "modalDialogButton" + buttonIndex; var modalDialogButton = $("<button " + 'id="' + buttonID + '" class="modalDialogButton">' + button.name + "</button>"); modalDialogButton.click(button.callback); if (button.keyupField != null) { // Need closure so the value of buttonID is not the last value from the buttons loop (function(keyUpButtonID) { $("#" + button.keyupField).keyup(function(event) { if(event.keyCode == 13) { $("#" + keyUpButtonID).click(); } }); })(buttonID); } modalDialogButton.appendTo($("#<API key>")); } $("#<API key>").removeClass("hiddenPage"); } else { $("#<API key>").addClass("hiddenPage"); } var windowHeight = $(window).height(); var windowWidth = $(window).width(); $("#ModalDialog").css("top", windowHeight / 8); $("#ModalDialog").css("left", windowWidth / 8); if (tableData != null) { // Have to show the table prior to populating for its sizing to work correctly. $("#<API key>").show(); var api = this.errorTable.api(); api.clear().rows.add(tableData).draw(); api.buttons.resize(); } else { $("#<API key>").hide(); } $("#<API key>").removeClass("hiddenPage"); $("#ModalDialog").removeClass("hiddenPage"); }, <API key>: function(title, content, okButtonText, okButtonKeyupField, okButtonCallback) { AdminUI.showModalDialog(title, content, null, [ { name: okButtonText, keyupField: okButtonKeyupField, callback: okButtonCallback, }, { name: "Cancel", keyupField: null, callback: function() { AdminUI.hideModalDialog(); } } ]); }, <API key>: function(text, okButtonText, okButtonCallback) { AdminUI.<API key>("Confirmation", $("<label>" + text + "</label>"), okButtonText, null, okButtonCallback); }, <API key>: function(text) { AdminUI.restoreCursor(); AdminUI.showModalDialog("Error", $("<label>" + text + "</label>"), null, [ { name: "Close", keyupField: null, callback: function() { AdminUI.hideModalDialog(); } } ]); }, <API key>: function(inputs) { var tableData = []; for (var inputIndex = 0; inputIndex < inputs.length; inputIndex++) { var input = inputs[inputIndex]; var label = input.label; var xhr = input.xhr; var row = []; row.push(label); row.push(xhr.status); if (xhr.responseText != null) { try { var parsed = jQuery.parseJSON(xhr.responseText); if (parsed.cf_code != null) { row.push(parsed.cf_code); } else { Utilities.<API key>(row, 1); } if (parsed.cf_error_code != null) { row.push(parsed.cf_error_code); } else { Utilities.<API key>(row, 1); } if (parsed.message != null) { row.push(parsed.message); } else { Utilities.<API key>(row, 1); } } catch (error) { Utilities.<API key>(row, 3); } } tableData.push(row); } AdminUI.restoreCursor(); AdminUI.showModalDialog("Error", null, tableData, [ { name: "Close", keyupField: null, callback: function() { AdminUI.hideModalDialog(); } } ]); }, <API key>: function(title) { AdminUI.showWaitCursor(); AdminUI.showModalDialog(title, $("<label>Performing operation, please wait...</label>"), null, null); }, <API key>: function() { AdminUI.restoreCursor(); AdminUI.showModalDialog("Success", $("<label>The operation finished without error. Please refresh the page later for the updated result.</label>"), null, [ { name: "Close", keyupField: null, callback: function() { AdminUI.hideModalDialog(); } } ]); }, <API key>: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, showOrganizations: function(filter) { AdminUI.showTabFiltered(Constants.ID__ORGANIZATIONS, filter); }, <API key>: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, showQuotas: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, showRevocableTokens: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, showRouteBindings: function(filter) { AdminUI.showTabFiltered(Constants.ID__ROUTE_BINDINGS, filter); }, showRouteMappings: function(filter) { AdminUI.showTabFiltered(Constants.ID__ROUTE_MAPPINGS, filter); }, showRoutes: function(filter) { AdminUI.showTabFiltered(Constants.ID__ROUTES, filter); }, showSecurityGroups: function(filter) { AdminUI.showTabFiltered(Constants.ID__SECURITY_GROUPS, filter); }, <API key>: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, showServiceBindings: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, showServiceBrokers: function(filter) { AdminUI.showTabFiltered(Constants.ID__SERVICE_BROKERS, filter); }, <API key>: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, showServiceKeys: function(filter) { AdminUI.showTabFiltered(Constants.ID__SERVICE_KEYS, filter); }, showServicePlans: function(filter) { AdminUI.showTabFiltered(Constants.ID__SERVICE_PLANS, filter); }, <API key>: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, <API key>: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, showServices: function(filter) { AdminUI.showTabFiltered(Constants.ID__SERVICES, filter); }, <API key>: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, showSpaceQuotas: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, showSpaceRoles: function(filter) { AdminUI.showTabFiltered(Constants.ID__SPACE_ROLES, filter); }, showSpaces: function(filter) { AdminUI.showTabFiltered(Constants.ID__SPACES, filter); }, showStacks: function(filter) { AdminUI.showTabFiltered(Constants.ID__STACKS, filter); }, <API key>: function(filter) { AdminUI.showTabFiltered(Constants.<API key>, filter); }, showTabFiltered: function(pageID, filter) { Table.<API key>(); AdminUI.setTabSelected(pageID); AdminUI.tabs[pageID].showFiltered(filter); }, showTasks: function(filter) { AdminUI.showTabFiltered(Constants.ID__TASKS, filter); }, showUserMenu: function() { var position = $(".userContainer").position(); var height = $(".userContainer").outerHeight(); var width = $(".userContainer").outerWidth(); var menuWidth = $(".userMenu").outerWidth(); $(".userMenu").css({ position: "absolute", top: (position.top + height + 2) + "px", left: (position.left + width - menuWidth) + "px" }).show(); }, showUsers: function(filter) { AdminUI.showTabFiltered(Constants.ID__USERS, filter); }, showWaitCursor: function() { $("html").addClass("waiting"); } };
/* * : XmlReader.java * : gomyck * : <> * : * : 2016-8-16 * : <> * : <> * : <> */ package com.cevr.component.core.xml; import org.w3c.dom.Document; /** * xml * * @author * @version [, 2016-8-16] * @see [/] * @since [/] */ public interface XmlReader { public Document loadXml(); }
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_232) on Tue Sep 15 08:53:07 UTC 2020 --> <title>Uses of Class org.springframework.jdbc.datasource.init.ScriptUtils (Spring Framework 5.1.18.RELEASE API)</title> <meta name="date" content="2020-09-15"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../../script.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.springframework.jdbc.datasource.init.ScriptUtils (Spring Framework 5.1.18.RELEASE 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="../../../../../../org/springframework/jdbc/datasource/init/ScriptUtils.html" title="class in org.springframework.jdbc.datasource.init">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../../overview-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">Spring Framework</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/springframework/jdbc/datasource/init/class-use/ScriptUtils.html" target="_top">Frames</a></li> <li><a href="ScriptUtils.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <h2 title="Uses of Class org.springframework.jdbc.datasource.init.ScriptUtils" class="title">Uses of Class<br>org.springframework.jdbc.datasource.init.ScriptUtils</h2> </div> <div class="classUseContainer">No usage of org.springframework.jdbc.datasource.init.ScriptUtils</div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../org/springframework/jdbc/datasource/init/ScriptUtils.html" title="class in org.springframework.jdbc.datasource.init">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../../../../../../overview-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage">Spring Framework</div> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?org/springframework/jdbc/datasource/init/class-use/ScriptUtils.html" target="_top">Frames</a></li> <li><a href="ScriptUtils.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <a name="skip.navbar.bottom"> </a></div> </body> </html>
# This code was automatically generated using xdrgen # DO NOT EDIT or your changes may be overwritten require 'xdr' # union switch (OperationType type) # case CREATE_ACCOUNT: # CreateAccountOp createAccountOp; # case PAYMENT: # PaymentOp paymentOp; # case PATH_PAYMENT: # PathPaymentOp pathPaymentOp; # case MANAGE_OFFER: # ManageOfferOp manageOfferOp; # case <API key>: # <API key> <API key>; # case SET_OPTIONS: # SetOptionsOp setOptionsOp; # case CHANGE_TRUST: # ChangeTrustOp changeTrustOp; # case ALLOW_TRUST: # AllowTrustOp allowTrustOp; # case ACCOUNT_MERGE: # AccountID destination; # case INFLATION: # void; module Stellar class Operation class Body < XDR::Union switch_on OperationType, :type switch :create_account, :create_account_op switch :payment, :payment_op switch :path_payment, :path_payment_op switch :manage_offer, :manage_offer_op switch :<API key>, :<API key> switch :set_options, :set_options_op switch :change_trust, :change_trust_op switch :allow_trust, :allow_trust_op switch :account_merge, :destination switch :inflation attribute :create_account_op, CreateAccountOp attribute :payment_op, PaymentOp attribute :path_payment_op, PathPaymentOp attribute :manage_offer_op, ManageOfferOp attribute :<API key>, <API key> attribute :set_options_op, SetOptionsOp attribute :change_trust_op, ChangeTrustOp attribute :allow_trust_op, AllowTrustOp attribute :destination, AccountID end end end
#ifndef _MYMAP #define _MYMAP class DirtyPageTable; typedef struct { uint32_t page_id; uint64_t rec_LSN; uint64_t rec_offset; uint32_t log_file_id; } DP_Entry; class <API key> : public std::iterator<std::<API key>, DP_Entry>{ friend class DirtyPageTable; private: DirtyPageTable* m_dp_table; int m_index; <API key>(DirtyPageTable* dp_table, int index); public: <API key>(); <API key>(const <API key>& iterator); <API key>& operator++(); <API key> operator++(int); bool operator!=(const <API key>& iterator); bool operator==(const <API key>& iterator); DP_Entry& operator*(); DP_Entry* operator->(); }; class DirtyPageTable{ friend class <API key>; private: DP_Entry*table; int bucket_size; int item_size; std::mutex *locks; public: DirtyPageTable(int capacity); void add(uint32_t page_id, uint64_t rec_LSN, uint64_t rec_offset, int log_file_id); void remove(uint32_t page_id); bool contains(uint32_t page_id); DP_Entry& operator[](int n); typedef <API key> iterator; DirtyPageTable::iterator begin(); DirtyPageTable::iterator end(); }; #endif
package org.stofkat.chat.server.actionhandlers; import javax.servlet.http.HttpSession; import org.apache.http.protocol.ExecutionContext; import org.stofkat.chat.common.actions.ChatAction; import org.stofkat.chat.common.exceptions.DispatchException; import org.stofkat.chat.common.results.ChatResult; import org.stofkat.chat.server.ActionHandler; import org.stofkat.chat.server.<API key>; public class ChatActionHandler implements ActionHandler<ChatAction, ChatResult> { @Override public Class<ChatAction> getActionType() { return ChatAction.class; } @Override public ChatResult execute(ChatAction action, ExecutionContext context, HttpSession session) throws DispatchException { <API key> db = <API key>.getInstance(); db.postNewMessage(action.getAuthor(), session.getId(), action.getMessage()); return db.getLatestMessages(action.<API key>()); } @Override public void rollback(ChatAction action, ChatResult result, ExecutionContext context) throws DispatchException { // Eventually you could make something happen if an action fails. } }
#pragma once #include "luv.h" int luaopen_native(lua_State* L);
<html > <head > <title > <?php if ( isset( $title ) ) { echo $title; } else { echo 'BP \ Comercial'; } ?> </title > <script type = "text/javascript" src = "https://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" ></script > <script type = "text/javascript" src = "<?=APP?>/includes/js/paginator.js" ></script > <script type = "text/javascript" src = "<?=APP?>/includes/js/functions.js" ></script > <script type = "text/javascript" src = "<?=APP?>/includes/js/func-jquery.js" ></script > <link href = "<?=APP?>/includes/css/main.css" rel = "stylesheet" /> <link href = "<?=APP?>/includes/css/pure.css" rel = "stylesheet" /> <link rel = "shortcut icon" href = "<?=APP?>/favicon.ico" type = "image/x-icon" > </head > <body > <div id = "preloader" ></div > <?php echo @$home; if ( isset( $criterias ) ) { echo @$criterias; echo '<br>'; echo @$list; echo @$paginator; } else if ( isset( $insert_admin ) ) { echo @$insert_admin; } if ( isset( $exibir_contrato ) ) { echo @$exibir_contrato; echo '<br>'; echo '<br>'; echo @$exibir_documentos; echo '<br>'; echo @$<API key>; } if ( isset( $liquidar_contratos ) ) { echo @$liquidar_contratos; } if ( isset( $<API key> ) ) { echo $<API key>; echo '<br>'; echo @$show_representantes; echo '<br>'; echo @$<API key>; } if ( isset( $show_docimport ) ) { echo @$show_docimport; } if ( isset( $show_docexport ) ) { echo @$show_docexport; } echo @$show_usuario_admin; ?> </body > </html >
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> <script data-cfasync="false"> // executes this when the DOM is ready jQuery(document).ready(function() { // handles the click event of the submit button jQuery('#submit').click(function(){ // defines the options and their default values // again, this is not the most elegant way to do this // but well, this gets the job done nonetheless var VideoUrl = jQuery('#VideoUrl').val(); var width = jQuery('#width').val(); var height = jQuery('#height').val(); var videotitle = jQuery('#videotitle').val(); var videodesc = jQuery('#videodesc').val(); var formatcheck = jQuery('#formatcheck'); var shortcode = '[wpsm_video'; if(width) { shortcode += ' width="'+width+'"'; } if(height) { shortcode += ' height="'+height+'"'; } if(formatcheck.is(":checked")) { shortcode += ' schema="yes" title ="'+videotitle+'" description ="'+videodesc+'"'; } shortcode += ']'+ VideoUrl + '[/wpsm_video]'; window.send_to_editor(shortcode); // closes Thickbox tb_remove(); }); }); jQuery(document).ready(function() { jQuery(".schecklive").css("display","none"); jQuery("#formatcheck").click(function(){ // If checked if (jQuery("#formatcheck").is(":checked")) { //show the hidden div jQuery(".schecklive").show("slow"); } else { //otherwise, hide it jQuery(".schecklive").hide("slow"); } }); }); </script> <form action="/" method="get" id="form" name="form" accept-charset="utf-8"> <p> <label for="VideoUrl"><?php _e('Video Url :', 'rehub_framework') ;?></label> <input id="VideoUrl" name="VideoUrl" type="text" value="http: </p> <p id="scheck"> <label for="formatcheck"><?php _e('With schema?', 'rehub_framework') ;?> </label> <input id="formatcheck" name="formatcheck" type="checkbox" class="checks" value="false"/> </p> <p class="schecklive"> <label for="videotitle"><?php _e('Title of video :', 'rehub_framework') ;?></label> <input id="videotitle" name="videotitle" type="text" value="" /> </p> <p class="schecklive"> <label for="videodesc"><?php _e('Description of video :', 'rehub_framework') ;?></label> <input id="videodesc" name="videodesc" type="text" value="" /> </p> <p> <label for="width"><?php _e('Width (with px):', 'rehub_framework') ;?></label> <input style="width:70px;" id="width" name="width" type="text" value="" /> </p> <p> <label for="height"><?php _e('Height (with px):', 'rehub_framework') ;?></label> <input style="width:70px;" id="height" name="height" type="text" value="" /> </p> <p><small><?php _e('You can leave blank width and height for using default value', 'rehub_framework') ;?></small></p> <p> <label>&nbsp;</label> <input type="button" id="submit" class="button" value="<?php _e('Insert', 'rehub_framework') ;?>" name="submit" /> </p> </form>
package com.davidsoergel.trees; import com.davidsoergel.dsutils.AtomicContractTest; import com.davidsoergel.dsutils.TestInstanceFactory; import org.testng.annotations.Test; import java.util.Collections; import java.util.List; /** * @author <a href="mailto:dev@davidsoergel.com">David Soergel</a> * @version $Id: <API key>.java 257 2008-09-09 21:23:00Z soergel $ */ public class <API key><T extends <API key>> extends AtomicContractTest { private TestInstanceFactory<? extends T> tif; public <API key>() { } public <API key>(TestInstanceFactory<? extends T> tif) { this.tif = tif; } // oops, there is no addChild() @Test public void <API key>() throws Exception { <API key><String, ?> n = tif.createInstance(); <API key><String, ?> c = n.newChild("bogus"); assert n.getChildren().contains(c); } @Test public void <API key>() throws Exception { <API key><String, ?> n = tif.createInstance(); <API key><String, ?> c = n.newChild("bogus"); assert c.getParent() == n; } @Test public void <API key>() throws Exception { HierarchyNode n = tif.createInstance(); assert n.getAncestorPath().contains(n); } @Test public void <API key>() throws Exception { HierarchyNode n = tif.createInstance(); List path = n.getAncestorPath(); Collections.reverse(path); HierarchyNode p = n; while (p != null) { HierarchyNode p2 = p.getParent(); assert p == path.get(0); path.remove(p); p = p2; } assert path.isEmpty(); } @Test public void <API key>() throws Exception { HierarchyNode n = tif.createInstance(); assert n.depthFirstIterator() != null; } }
// <API key>: Apache-2.0 #include "sw/device/lib/arch/device.h" #include "sw/device/lib/base/mmio.h" #include "sw/device/lib/dif/dif_kmac.h" #include "sw/device/lib/runtime/log.h" #include "sw/device/lib/testing/check.h" #include "sw/device/lib/testing/test_framework/ottf.h" #include "hw/top_earlgrey/sw/autogen/top_earlgrey.h" const test_config_t kTestConfig; /** * Digest lengths in 32-bit words. */ #define DIGEST_LEN_SHA3_224 (224 / 32) #define DIGEST_LEN_SHA3_256 (256 / 32) #define DIGEST_LEN_SHA3_384 (384 / 32) #define DIGEST_LEN_SHA3_512 (512 / 32) #define DIGEST_LEN_SHA3_MAX DIGEST_LEN_SHA3_512 /** * SHA-3 test description. */ typedef struct sha3_test { <API key> mode; const char *message; size_t message_len; const uint32_t digest[DIGEST_LEN_SHA3_MAX]; size_t digest_len; } sha3_test_t; /** * SHA-3 tests. */ const sha3_test_t sha3_tests[] = { // Examples taken from NIST FIPS-202 Algorithm Test Vectors: { .mode = <API key>, .message = NULL, .message_len = 0, .digest = {0x42034e6b, 0xb7db6736, 0x45156e3b, 0xabb10e4f, 0x9a7f59d4, 0x3f8e071b, 0xc76b5a5b}, .digest_len = DIGEST_LEN_SHA3_224, }, { .mode = <API key>, .message = "\xe7\x37\x21\x05", .message_len = 32 / 8, .digest = {0x8ab6423a, 0x8cf279b0, 0x52c7a34c, 0x90276f29, 0x78fec406, 0xd979ebb1, 0x057f7789, 0xae46401e}, .digest_len = DIGEST_LEN_SHA3_256, }, { .mode = <API key>, .message = "\xa7\x48\x47\x93\x0a\x03\xab\xee\xa4\x73\xe1\xf3\xdc\x30" "\xb8\x88\x15", .message_len = 136 / 8, .digest = {0x29f9a6db, 0xd6f955fe, 0xc0675f6c, 0xf1823baf, 0xb358cf7b, 0x16f35267, 0x3f08165c, 0x78d48fea, 0xf20369ee, 0xd20a827f, 0xaf5099dd, 0x00678cb4}, .digest_len = DIGEST_LEN_SHA3_384, }, { .mode = <API key>, .message = "\x66\x4e\xf2\xe3\xa7\x05\x9d\xaf\x1c\x58\xca\xf5\x20\x08\xc5\x22" "\x7e\x85\xcd\xcb\x83\xb4\xc5\x94\x57\xf0\x2c\x50\x8d\x4f\x4f\x69" "\xf8\x26\xbd\x82\xc0\xcf\xfc\x5c\xb6\xa9\x7a\xf6\xe5\x61\xc6\xf9" "\x69\x70\x00\x52\x85\xe5\x8f\x21\xef\x65\x11\xd2\x6e\x70\x98\x89" "\xa7\xe5\x13\xc4\x34\xc9\x0a\x3c\xf7\x44\x8f\x0c\xae\xec\x71\x14" "\xc7\x47\xb2\xa0\x75\x8a\x3b\x45\x03\xa7\xcf\x0c\x69\x87\x3e\xd3" "\x1d\x94\xdb\xef\x2b\x7b\x2f\x16\x88\x30\xef\x7d\xa3\x32\x2c\x3d" "\x3e\x10\xca\xfb\x7c\x2c\x33\xc8\x3b\xbf\x4c\x46\xa3\x1d\xa9\x0c" "\xff\x3b\xfd\x4c\xcc\x6e\xd4\xb3\x10\x75\x84\x91\xee\xba\x60\x3a" "\x76", .message_len = 1160 / 8, .digest = {0xf15f82e5, 0xd570c0a3, 0xe7bb2fa5, 0x444a8511, 0x5f295405, 0x69797afb, 0xd10879a1, 0xbebf6301, 0xa6521d8f, 0x13a0e876, 0x1ca1567b, 0xb4fb0fdf, 0x9f89bc56, 0x4bd127c7, 0x322288d8, 0x4e919d54}, .digest_len = DIGEST_LEN_SHA3_512, }, }; #define <API key> 102 /** * SHAKE test description. */ typedef struct shake_test { <API key> mode; const char *message; size_t message_len; const uint32_t digest[<API key>]; size_t digest_len; } shake_test_t; /** * SHAKE tests. */ // Examples generated using a custom Go program importing package // `golang.org/x/crypto/sha3` const shake_test_t shake_tests[] = { { .mode = <API key>, .message = "OpenTitan", .message_len = 9, .digest = {0x235a6522, 0x3bd735ac, 0x77832247, 0xc6b12919, 0xfb80eff0, 0xb8308a5a, 0xcb25db1f, 0xc5ce4cf2, 0x349730fc, 0xcedf024c, 0xff0eefec, 0x6985fe35, 0x3c46a736, 0x0084044b, 0x6d9f9920, 0x7c0ab055, 0x19d1d3ce, 0xb4353949, 0xfe8ffbcd, 0x5a7f2ec6, 0xc3cf795f, 0xa56d0d7b, 0x520c3358, 0x11237ec9, 0x4ca5ed53, 0x2999edc0, 0x6c59c68f, 0x54d9890c, 0x89a33092, 0xf406c674, 0xe2b4ebf1, 0x14e68bb2, 0x898ceb72, 0x1878875f, 0x9d7bb8d2, 0x268e4a5a, 0xe5da510f, 0x97e5d3bc, 0xaae1b7bc, 0xa337f70b, 0xeae3cc65, 0xb8429058, 0xe4319c08, 0xd35e2786, 0xbc99af6e, 0x19a04aa8, 0xccbf18bf, 0xf681ebd4, 0x3d6da575, 0x2f0b9406}, .digest_len = 1600 / 8 / 4, // Rate (r) is 42 words. }, { .mode = <API key>, .message = "OpenTitan", .message_len = 9, .digest = {0x6a0faccd, 0xbf29cb1a, 0xb631f604, 0xdbcab36, 0xa15d167b, 0x18dc668b, 0x272e411b, 0x865e651a, 0x8abedb2a, 0x8db38e78, 0xe503c9a2, 0xe64faca9, 0xcbd867d0, 0xdba6f20f, 0xbe129db9, 0x842dc15c, 0x1406410b, 0x014ce621, 0x5d24eaf2, 0x63bdf816, 0xfb236f50, 0xbdba910c, 0xf4ba0e9a, 0x74b5a51f, 0xd644dffd, 0xcd650165, 0xe4ec5e7d, 0x64df5448, 0xdcf7b5e7, 0x68709c07, 0x47eed1db, 0xc1e55b24, 0x3c02fad9, 0xd72db62e, 0xc5a48eaf, 0xd14bb0c4, 0x0f7143ba, 0x4071b63e, 0x21f0ec4b, 0x41065039, 0x1b3e41c0, 0xd0d3b1d0, 0xca16acb9, 0xa06f55aa, 0x7bc7ce75, 0x08da25ce, 0x596a654b, 0x0b57ae54, 0x4b88c863, 0x199202d7, 0x88c112b6, 0xf6dc4a95, 0xe1cfeffa, 0xa7809e6f, 0x3a796dcd, 0xb5962e44, 0x179d6ff0, 0xc898c5a9, 0xd3f02195, 0x43623028, 0x4c3a4fe7, 0x2fab7bda, 0x04e5b4d4, 0xe0420692, 0x32fcaa2a, 0x05e92f07, 0xba0564ea, 0x7b169778, 0x61d4ca3e, 0x4a5d92ec, 0x079cb3ba, 0x9a784e40, 0x6381498c, 0xed6d8b6a, 0x2be74d42, 0xa234a3db, 0x60d10de8, 0xf0c77dda, 0xc8f94b72, 0x239a2bdf, 0xbfeba4a6, 0xc91042e9, 0xa5a11310, 0x8b44d66a, 0xea9bff2f, 0x441a445f, 0xe88ee35d, 0x89386c12, 0x1a8de11e, 0x46aff650, 0x423323c9, 0xba7b8db4, 0x06c36eb0, 0x4fd75b36, 0xf0c70001, 0x0aefb1df, 0x6ae399e6, 0xf71930a6, 0xdef2206, 0x5ce2a640, 0x6a82fcf4, 0xa91b0815}, .digest_len = 3264 / 8 / 4, // Rate (r) is 34 words. }, }; /** * Run SHA-3 test cases using single blocking absorb/squeeze operations. */ void run_sha3_test(dif_kmac_t *kmac) { <API key> operation_state; for (int i = 0; i < ARRAYSIZE(sha3_tests); ++i) { sha3_test_t test = sha3_tests[i]; CHECK_DIF_OK(<API key>(kmac, &operation_state, test.mode)); if (test.message_len > 0) { CHECK_DIF_OK(dif_kmac_absorb(kmac, &operation_state, test.message, test.message_len, NULL)); } uint32_t out[DIGEST_LEN_SHA3_MAX]; CHECK(DIGEST_LEN_SHA3_MAX >= test.digest_len); CHECK_DIF_OK( dif_kmac_squeeze(kmac, &operation_state, out, test.digest_len, NULL)); CHECK_DIF_OK(dif_kmac_end(kmac, &operation_state)); for (int j = 0; j < test.digest_len; ++j) { CHECK(out[j] == test.digest[j], "test %d: mismatch at %d got=0x%x want=0x%x", i, j, out[j], test.digest[j]); } } } /** * Run a SHA-3 test case with varying alignments. */ void <API key>(dif_kmac_t *kmac) { // Examples taken from NIST FIPS-202 Algorithm Test Vectors: const char kMsg[] = "\xa7\x48\x47\x93\x0a\x03\xab\xee\xa4\x73\xe1\xf3\xdc\x30" "\xb8\x88\x15"; const size_t kSize = ARRAYSIZE(kMsg); const uint32_t kExpect = 0x29f9a6db; const <API key> kMode = <API key>; <API key> operation_state; for (size_t i = 0; i < sizeof(uint32_t); ++i) { char buffer[ARRAYSIZE(kMsg) + sizeof(uint32_t)] = {0}; memcpy(&buffer[i], kMsg, kSize); CHECK_DIF_OK(<API key>(kmac, &operation_state, kMode)); CHECK_DIF_OK( dif_kmac_absorb(kmac, &operation_state, &buffer[i], kSize, NULL)); // Checking the first 32-bits of the digest is sufficient. uint32_t out; CHECK_DIF_OK( dif_kmac_squeeze(kmac, &operation_state, &out, sizeof(uint32_t), NULL)); CHECK_DIF_OK(dif_kmac_end(kmac, &operation_state)); CHECK_DIF_OK((out == kExpect), "mismatch at alignment %u got 0x%u want 0x%x", i, out, kExpect); } // Run a SHA-3 test case using multiple absorb calls. { CHECK_DIF_OK(<API key>(kmac, &operation_state, kMode)); CHECK_DIF_OK(dif_kmac_absorb(kmac, &operation_state, &kMsg[0], 1, NULL)); CHECK_DIF_OK(dif_kmac_absorb(kmac, &operation_state, &kMsg[1], 2, NULL)); CHECK_DIF_OK(dif_kmac_absorb(kmac, &operation_state, &kMsg[3], 5, NULL)); CHECK_DIF_OK(dif_kmac_absorb(kmac, &operation_state, &kMsg[8], 4, NULL)); CHECK_DIF_OK( dif_kmac_absorb(kmac, &operation_state, &kMsg[12], kSize - 12, NULL)); // Checking the first 32-bits of the digest is sufficient. uint32_t out; CHECK_DIF_OK( dif_kmac_squeeze(kmac, &operation_state, &out, sizeof(uint32_t), NULL)); CHECK_DIF_OK(dif_kmac_end(kmac, &operation_state)); CHECK_DIF_OK((out == kExpect), "mismatch got 0x%u want 0x%x", out, kExpect); } } /** * Run SHAKE test cases using single blocking absorb/squeeze operations. */ void run_shake_test(dif_kmac_t *kmac) { <API key> operation_state; for (int i = 0; i < ARRAYSIZE(shake_tests); ++i) { shake_test_t test = shake_tests[i]; CHECK_DIF_OK(<API key>(kmac, &operation_state, test.mode)); if (test.message_len > 0) { CHECK_DIF_OK(dif_kmac_absorb(kmac, &operation_state, test.message, test.message_len, NULL)); } uint32_t out[<API key>]; CHECK(<API key> >= test.digest_len); CHECK_DIF_OK( dif_kmac_squeeze(kmac, &operation_state, out, test.digest_len, NULL)); CHECK_DIF_OK(dif_kmac_end(kmac, &operation_state)); for (int j = 0; j < test.digest_len; ++j) { CHECK(out[j] == test.digest[j], "test %d: mismatch at %d got=0x%x want=0x%x", i, j, out[j], test.digest[j]); } } } bool test_main() { LOG_INFO("Running KMAC DIF test..."); // Intialize KMAC hardware. dif_kmac_t kmac; CHECK_DIF_OK( dif_kmac_init(<API key>(<API key>), &kmac)); // Configure KMAC hardware using software entropy. dif_kmac_config_t config = (dif_kmac_config_t){ .entropy_mode = <API key>, .entropy_seed = 0xffff, .<API key> = kDifToggleEnabled, }; CHECK_DIF_OK(dif_kmac_configure(&kmac, config)); run_sha3_test(&kmac); <API key>(&kmac); run_shake_test(&kmac); return true; }
#include <stdio.h> #include <time.h> #include "ipc_module.h" #include "common_func.h" #include "thread_manager.h" /* IPCObject */ IPCModule::IPCObject::IPCObject() : m_port(0), m_ipcName("") { } IPCModule::IPCObject::IPCObject(const IPCObject& object) : m_ipcName("") { operator = (object); } IPCModule::IPCObject::IPCObject(const IPCObjectName& ipcName, const char* ip, int port, const char* accessId) : m_ipcName(ipcName), m_port(port), m_ip(ip), m_accessId(accessId) { } IPCModule::IPCObject::~IPCObject() { } void IPCModule::IPCObject::operator=(const IPCObject& object) { m_ipcName = object.m_ipcName; m_port = object.m_port; m_ip = object.m_ip; m_accessId = object.m_accessId; } bool IPCModule::IPCObject::operator != (const IPCObject& object) { return !(operator == (object)); } bool IPCModule::IPCObject::operator < (const IPCObject& object) const { return m_ipcName < object.m_ipcName; } bool IPCModule::IPCObject::operator==(const IPCObject& object) { return m_ipcName == object.m_ipcName; } /* IPCModule */ IPCModule::IPCModule(const IPCObjectName& moduleName, ConnectorFactory* factory) : m_moduleName(moduleName), m_factory(factory) , m_ipcSignalHandler(this), m_isExit(false) { m_manager.addSubscriber(&m_ipcSignalHandler, SIGNAL_FUNC(&m_ipcSignalHandler, IPCSignalHandler, DisconnectedMessage, onDisconnected)); } IPCModule::~IPCModule() { m_isExit = true; } void IPCModule::DisconnectModule(const IPCObjectName& moduleName) { IPCObjectName module(moduleName); m_manager.StopConnection(module.GetModuleNameString()); } void IPCModule::OnNewConnector(Connector* connector) { } void IPCModule::OnConnected(const String& moduleName) { } void IPCModule::OnFireConnector(const String& moduleName) { } void IPCModule::OnConnectFailed(const String& moduleName) { } void IPCModule::OnMessage(const String& messageName, const twnstd::vector<String>& path, const char* data, unsigned int lenData) { } bool IPCModule::CheckFireConnector(const String& moduleName) { return false; } void IPCModule::OnIPCObjectsChanged() { } void IPCModule::ipcSubscribe(IPCConnector* connector, SignalReceiver* receiver, IReceiverFunc* func) { connector->addSubscriber(receiver, func); } void IPCModule::AddConnector(Connector* conn) { IPCConnector* connector = static_cast<IPCConnector*>(conn); if(connector && !m_isExit) { connector->SetModuleName(m_moduleName); connector->SetConnectorId(CreateGUID()); OnNewConnector(conn); connector->addSubscriber(&m_ipcSignalHandler, SIGNAL_FUNC(&m_ipcSignalHandler, IPCSignalHandler, AddIPCObjectMessage, onAddIPCObject)); connector->addSubscriber(&m_ipcSignalHandler, SIGNAL_FUNC(&m_ipcSignalHandler, IPCSignalHandler, ModuleNameMessage, onModuleName)); connector->addSubscriber(&m_ipcSignalHandler, SIGNAL_FUNC(&m_ipcSignalHandler, IPCSignalHandler, <API key>, onRemoveIPCObject)); connector->addSubscriber(&m_ipcSignalHandler, SIGNAL_FUNC(&m_ipcSignalHandler, IPCSignalHandler, ConnectedMessage, onConnected)); connector->addSubscriber(&m_ipcSignalHandler, SIGNAL_FUNC(&m_ipcSignalHandler, IPCSignalHandler, IPCProtoMessage, onIPCMessage)); connector->SubscribeModule(dynamic_cast<SignalOwner*>(this)); m_manager.AddConnection(conn); } else { delete conn; } } void IPCModule::SendMsg(const IPCSignalMessage& msg) { onSignal(msg); } const IPCObjectName& IPCModule::GetModuleName() { return m_moduleName; } bool IPCModule::IsExit() { return m_isExit; } void IPCModule::Exit() { m_isExit = true; } twnstd::vector<IPCObjectName> IPCModule::GetIPCObjects() { twnstd::vector<IPCObjectName> retVal; for(twnstd::list<IPCObject>::iterator it = m_ipcObject.begin(); it != m_ipcObject.end(); ++it) { retVal.push_back(it->m_ipcName); } return retVal; }
package com.tinkerpop.blueprints.util.wrappers.event; import com.tinkerpop.blueprints.Edge; import com.tinkerpop.blueprints.Features; import com.tinkerpop.blueprints.Graph; import com.tinkerpop.blueprints.GraphQuery; import com.tinkerpop.blueprints.Vertex; import com.tinkerpop.blueprints.util.ElementHelper; import com.tinkerpop.blueprints.util.StringFactory; import com.tinkerpop.blueprints.util.wrappers.WrappedGraphQuery; import com.tinkerpop.blueprints.util.wrappers.WrapperGraph; import com.tinkerpop.blueprints.util.wrappers.event.listener.EdgeAddedEvent; import com.tinkerpop.blueprints.util.wrappers.event.listener.EdgeRemovedEvent; import com.tinkerpop.blueprints.util.wrappers.event.listener.<API key>; import com.tinkerpop.blueprints.util.wrappers.event.listener.VertexAddedEvent; import com.tinkerpop.blueprints.util.wrappers.event.listener.VertexRemovedEvent; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Map; /** * An EventGraph is a wrapper to existing Graph implementations and provides for graph events to be raised * to one or more listeners on changes to the Graph. Notifications to the listeners occur for the * following events: new vertex/edge, vertex/edge property changed, vertex/edge property removed, * vertex/edge removed. * * The limiting factor to events being raised is related to out-of-process functions changing graph elements. * * To gather events from EventGraph, simply provide an implementation of the {@link <API key>} to * the EventGraph by utilizing the addListener method. EventGraph allows the addition of multiple <API key> * implementations. Each listener will be notified in the order that it was added. * * @author Stephen Mallette */ @SuppressWarnings({ "rawtypes" }) public class EventGraph<T extends Graph> implements Graph, WrapperGraph<T> { protected EventTrigger trigger; protected final T baseGraph; protected final List<<API key>> <API key> = new ArrayList<<API key>>(); private final Features features; public EventGraph(final T baseGraph) { this.baseGraph = baseGraph; this.features = this.baseGraph.getFeatures().copyFeatures(); this.features.isWrapper = true; this.trigger = new EventTrigger(this, false); } public void removeAllListeners() { this.<API key>.clear(); } public void addListener(final <API key> listener) { this.<API key>.add(listener); } public Iterator<<API key>> getListenerIterator() { return this.<API key>.iterator(); } public EventTrigger getTrigger() { return this.trigger; } public void removeListener(final <API key> listener) { this.<API key>.remove(listener); } protected void onVertexAdded(Vertex vertex) { this.trigger.addEvent(new VertexAddedEvent(vertex)); } protected void onVertexRemoved(final Vertex vertex, Map<String, Object> props) { this.trigger.addEvent(new VertexRemovedEvent(vertex, props)); } protected void onEdgeAdded(Edge edge) { this.trigger.addEvent(new EdgeAddedEvent(edge)); } protected void onEdgeRemoved(final Edge edge, Map<String, Object> props) { this.trigger.addEvent(new EdgeRemovedEvent(edge, props)); } /** * Raises a vertexAdded event. */ public Vertex addVertex(final Object id) { final Vertex vertex = this.baseGraph.addVertex(id); if (vertex == null) { return null; } else { this.onVertexAdded(vertex); return new EventVertex(vertex, this); } } public Vertex getVertex(final Object id) { final Vertex vertex = this.baseGraph.getVertex(id); if (vertex == null) { return null; } else { return new EventVertex(vertex, this); } } /** * Raises a vertexRemoved event. */ public void removeVertex(final Vertex vertex) { Vertex vertexToRemove = vertex; if (vertex instanceof EventVertex) { vertexToRemove = ((EventVertex) vertex).getBaseVertex(); } Map<String, Object> props = ElementHelper.getProperties(vertex); this.baseGraph.removeVertex(vertexToRemove); this.onVertexRemoved(vertex, props); } public Iterable<Vertex> getVertices() { return new EventVertexIterable(this.baseGraph.getVertices(), this); } public Iterable<Vertex> getVertices(final String key, final Object value) { return new EventVertexIterable(this.baseGraph.getVertices(key, value), this); } /** * Raises an edgeAdded event. */ public Edge addEdge(final Object id, final Vertex outVertex, final Vertex inVertex, final String label) { Vertex outVertexToSet = outVertex; if (outVertex instanceof EventVertex) { outVertexToSet = ((EventVertex) outVertex).getBaseVertex(); } Vertex inVertexToSet = inVertex; if (inVertex instanceof EventVertex) { inVertexToSet = ((EventVertex) inVertex).getBaseVertex(); } final Edge edge = this.baseGraph.addEdge(id, outVertexToSet, inVertexToSet, label); if (edge == null) { return null; } else { this.onEdgeAdded(edge); return new EventEdge(edge, this); } } public Edge getEdge(final Object id) { final Edge edge = this.baseGraph.getEdge(id); if (edge == null) { return null; } else { return new EventEdge(edge, this); } } /** * Raises an edgeRemoved event. */ public void removeEdge(final Edge edge) { Edge edgeToRemove = edge; if (edge instanceof EventEdge) { edgeToRemove = ((EventEdge) edge).getBaseEdge(); } Map<String, Object> props = ElementHelper.getProperties(edge); this.baseGraph.removeEdge(edgeToRemove); this.onEdgeRemoved(edge, props); } public Iterable<Edge> getEdges() { return new EventEdgeIterable(this.baseGraph.getEdges(), this); } public Iterable<Edge> getEdges(final String key, final Object value) { return new EventEdgeIterable(this.baseGraph.getEdges(key, value), this); } public GraphQuery query() { final EventGraph eventGraph = this; return new WrappedGraphQuery(this.baseGraph.query()) { @Override public Iterable<Edge> edges() { return new EventEdgeIterable(this.query.edges(), eventGraph); } @Override public Iterable<Vertex> vertices() { return new EventVertexIterable(this.query.vertices(), eventGraph); } }; } public void shutdown() { try { this.baseGraph.shutdown(); // TODO: hmmmmmm?? this.trigger.fireEventQueue(); this.trigger.resetEventQueue(); } catch (Exception re) { } } public String toString() { return StringFactory.graphString(this, this.baseGraph.toString()); } @Override public T getBaseGraph() { return this.baseGraph; } public Features getFeatures() { return this.features; } }
package main import ( "os" "github.com/n0rad/go-erlog" "github.com/n0rad/go-erlog/logs" _ "github.com/n0rad/go-erlog/register" ) func main() { logs.GetDefaultLog().(*erlog.ErlogLogger).Appenders[0].(*erlog.ErlogWriterAppender).Out = os.Stdout uuid := <API key>() dir, err := os.Getwd() if err != nil { logs.WithE(err).Fatal("Failed to get current working directory") } b, err := NewBuilder(dir, uuid) if err != nil { logs.WithE(err).Fatal("Failed to load Builder") } if err = b.Build(); err != nil { logs.WithE(err).Fatal("Build failed") } os.Exit(0) }
import Vue from 'vue' import VueRouter from 'vue-router' import routes from './router/router' import store from './store/' import {routerMode} from './config/env' import './config/rem' import FastClick from 'fastclick' if ('addEventListener' in document) { document.addEventListener('DOMContentLoaded', function() { FastClick.attach(document.body); }, false); } Vue.use(VueRouter) const router = new VueRouter({ routes, mode: routerMode, strict: process.env.NODE_ENV !== 'production' }) new Vue({ router, store, }).$mount('#app')
package org.xava.jfx2swing.webview; import java.net.URL; import java.util.ResourceBundle; import javafx.fxml.FXML; import javafx.fxml.Initializable; import javafx.scene.web.WebView; /** * FXML Controller class * * @author Alaa */ public class <API key> implements Initializable { @FXML private WebView webView; /** * Initializes the controller class. */ @Override public void initialize(URL url, ResourceBundle rb) { } public WebView getWebView() { return webView; } }
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="it"> <head> <!-- Generated by javadoc (version 1.7.0_03) on Fri Mar 28 15:35:33 CET 2014 --> <title>Uses of Class jade.util.AccessControlList (JADE v4.3.2 API)</title> <meta name="date" content="2014-03-28"> <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 jade.util.AccessControlList (JADE v4.3.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="../../../jade/util/AccessControlList.html" title="class in jade.util">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?jade/util/\<API key>.html" target="_top">Frames</a></li> <li><a href="AccessControlList.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 jade.util.AccessControlList" class="title">Uses of Class<br>jade.util.AccessControlList</h2> </div> <div class="classUseContainer">No usage of jade.util.AccessControlList</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="../../../jade/util/AccessControlList.html" title="class in jade.util">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?jade/util/\<API key>.html" target="_top">Frames</a></li> <li><a href="AccessControlList.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><center>These are the official <i><a href=http://jade.tilab.com target=top>JADE</a></i> API. For these API backward compatibility is guaranteed accross JADE versions</center></small></p> </body> </html>
//! This crate stores data types which used by other tidb query related crates. #![feature(proc_macro_hygiene)] #![feature(min_specialization)] #![feature(test)] #![feature(decl_macro)] #![feature(str_internals)] #[macro_use] extern crate failure; #[macro_use] extern crate num_derive; #[macro_use] extern crate static_assertions; #[macro_use(box_err, box_try, try_opt, error, warn)] extern crate tikv_util; #[macro_use] extern crate bitflags; #[allow(<API key>)] extern crate tikv_alloc; pub mod builder; pub mod def; pub mod error; pub mod prelude { pub use super::def::FieldTypeAccessor; } pub use self::def::*; pub use self::error::*; #[cfg(test)] extern crate test; pub mod codec; pub mod expr;
import contextlib import envi import viv_utils class ApiMonitor(viv_utils.emulator_drivers.Monitor): """ The ApiMonitor observes emulation and cleans up API function returns. """ def __init__(self, vw, function_index): viv_utils.emulator_drivers.Monitor.__init__(self, vw) self.function_index = function_index def apicall(self, emu, op, pc, api, argv): # overridden from Monitor self.d("apicall: %s %s %s %s %s", emu, op, pc, api, argv) def prehook(self, emu, op, startpc): # overridden from Monitor pass def posthook(self, emu, op, endpc): # overridden from Monitor if op.mnem == "ret": try: self._check_return(emu, op) except Exception as e: self.d(str(e)) def _check_return(self, emu, op): """ Ensure that the target of the return is within the allowed set of functions. Do nothing, if return address is valid. If return address is invalid: _fix_return modifies program counter and stack pointer if a valid return address is found on the stack or raises an Exception if no valid return address is found. """ function_start = self.function_index[op.va] return_addresses = self._get_return_vas(emu, function_start) if op.opers: # adjust stack in case of `ret imm16` instruction emu.setStackCounter(emu.getStackCounter() - op.opers[0].imm) return_address = self.getStackValue(emu, -4) if return_address not in return_addresses: self._logger.debug( "Return address 0x%08X is invalid, expected one of: %s", return_address, ", ".join(map(hex, return_addresses)), ) self._fix_return(emu, return_address, return_addresses) # TODO return, handle Exception else: self._logger.debug("Return address 0x%08X is valid, returning", return_address) # TODO return? def _get_return_vas(self, emu, function_start): """ Get the list of valid addresses to which a function should return. """ return_vas = [] callers = self._vw.getCallers(function_start) for caller in callers: call_op = emu.parseOpcode(caller) return_va = call_op.va + call_op.size return_vas.append(return_va) return return_vas def _fix_return(self, emu, return_address, return_addresses): """ Find a valid return address from return_addresses on the stack. Adjust the stack accordingly or raise an Exception if no valid address is found within the search boundaries. Modify program counter and stack pointer, so the emulator does not return to a garbage address. """ self.dumpStack(emu) NUM_ADDRESSES = 4 pointer_size = emu.getPointerSize() STACK_SEARCH_WINDOW = pointer_size * NUM_ADDRESSES esp = emu.getStackCounter() for offset in range(0, STACK_SEARCH_WINDOW, pointer_size): ret_va_candidate = self.getStackValue(emu, offset) if ret_va_candidate in return_addresses: emu.setProgramCounter(ret_va_candidate) emu.setStackCounter(esp + offset + pointer_size) self._logger.debug("Returning to 0x%08X, adjusted stack:", ret_va_candidate) self.dumpStack(emu) return self.dumpStack(emu) raise Exception("No valid return address found...") def dumpStack(self, emu): """ Convenience debugging routine for showing state current state of the stack. """ esp = emu.getStackCounter() stack_str = "" for i in range(16, -16, -4): if i == 0: sp = "<= SP" else: sp = "%02x" % (-i) stack_str = "%s\n0x%08x - 0x%08x %s" % (stack_str, (esp - i), self.getStackValue(emu, -i), sp) self.d(stack_str) def dumpState(self, emu): self.i("eip: 0x%x", emu.getRegisterByName("eip")) self.i("esp: 0x%x", emu.getRegisterByName("esp")) self.i("eax: 0x%x", emu.getRegisterByName("eax")) self.i("ebx: 0x%x", emu.getRegisterByName("ebx")) self.i("ecx: 0x%x", emu.getRegisterByName("ecx")) self.i("edx: 0x%x", emu.getRegisterByName("edx")) self.dumpStack(emu) def pointerSize(emu): """ Convenience method whose name might be more readable than fetching emu.imem_psize. Returns the size of a pointer in bytes for the given emulator. :rtype: int """ return emu.imem_psize def popStack(emu): """ Remove the element at the top of the stack. :rtype: int """ v = emu.readMemoryFormat(emu.getStackCounter(), "<P")[0] emu.setStackCounter(emu.getStackCounter() + pointerSize(emu)) return v class GetProcessHeapHook(viv_utils.emulator_drivers.Hook): """ Hook and handle calls to GetProcessHeap, returning 0. """ def hook(self, callname, emu, callconv, api, argv): if callname == "kernel32.GetProcessHeap": # nop callconv.execCallReturn(emu, 42, len(argv)) return True raise viv_utils.emulator_drivers.UnsupportedFunction() def round(i, size): """ Round `i` to the nearest greater-or-equal-to multiple of `size`. :type i: int :type size: int :rtype: int """ if i % size == 0: return i return i + (size - (i % size)) class RtlAllocateHeapHook(viv_utils.emulator_drivers.Hook): """ Hook calls to RtlAllocateHeap, allocate memory in a "heap" section, and return pointers to this memory. The base heap address is 0x96960000. The max allocation size is 10 MB. """ def __init__(self, *args, **kwargs): super(RtlAllocateHeapHook, self).__init__(*args, **kwargs) self._heap_addr = 0x96960000 MAX_ALLOCATION_SIZE = 10 * 1024 * 1024 def _allocate_mem(self, emu, size): size = round(size, 0x1000) if size > self.MAX_ALLOCATION_SIZE: size = self.MAX_ALLOCATION_SIZE va = self._heap_addr self.d("RtlAllocateHeap: mapping %s bytes at %s", hex(size), hex(va)) emu.addMemoryMap(va, envi.memory.MM_RWX, "[heap allocation]", b"\x00" * (size + 4)) emu.writeMemory(va, b"\x00" * size) self._heap_addr += size return va def hook(self, callname, driver, callconv, api, argv): # works for kernel32.HeapAlloc if callname == "ntdll.RtlAllocateHeap": emu = driver hheap, flags, size = argv va = self._allocate_mem(emu, size) callconv.execCallReturn(emu, va, len(argv)) return True raise viv_utils.emulator_drivers.UnsupportedFunction() class AllocateHeap(RtlAllocateHeapHook): """ Hook calls to AllocateHeap and handle them like calls to RtlAllocateHeapHook. """ def __init__(self, *args, **kwargs): super(AllocateHeap, self).__init__(*args, **kwargs) def hook(self, callname, driver, callconv, api, argv): if ( callname == "kernel32.LocalAlloc" or callname == "kernel32.GlobalAlloc" or callname == "kernel32.VirtualAlloc" ): size = argv[1] elif callname == "kernel32.VirtualAllocEx": size = argv[2] else: raise viv_utils.emulator_drivers.UnsupportedFunction() va = self._allocate_mem(driver, size) callconv.execCallReturn(driver, va, len(argv)) return True class MallocHeap(RtlAllocateHeapHook): """ Hook calls to malloc and handle them like calls to RtlAllocateHeapHook. """ def __init__(self, *args, **kwargs): super(MallocHeap, self).__init__(*args, **kwargs) def hook(self, callname, driver, callconv, api, argv): if callname == "msvcrt.malloc" or callname == "msvcrt.calloc": size = argv[0] va = self._allocate_mem(driver, size) callconv.execCallReturn(driver, va, len(argv)) return True raise viv_utils.emulator_drivers.UnsupportedFunction() class MemcpyHook(viv_utils.emulator_drivers.Hook): """ Hook and handle calls to memcpy and memmove. """ MAX_COPY_SIZE = 1024 * 1024 * 32 # don't attempt to copy more than 32MB, or something is wrong def __init__(self, *args, **kwargs): super(MemcpyHook, self).__init__(*args, **kwargs) def hook(self, callname, driver, callconv, api, argv): if callname == "msvcrt.memcpy" or callname == "msvcrt.memmove": emu = driver dst, src, count = argv if count > self.MAX_COPY_SIZE: self.d("unusually large memcpy, truncating to 32MB: 0x%x", count) count = self.MAX_COPY_SIZE data = emu.readMemory(src, count) emu.writeMemory(dst, data) callconv.execCallReturn(emu, 0x0, len(argv)) return True raise viv_utils.emulator_drivers.UnsupportedFunction() def readStringAtRva(emu, rva, maxsize=None): """ Borrowed from vivisect/PE/__init__.py :param emu: emulator :param rva: virtual address of string :param maxsize: maxsize of string :return: the read string """ ret = bytearray() while True: if maxsize and maxsize <= len(ret): break x = emu.readMemory(rva, 1) if x == b"\x00" or x is None: break ret += x rva += 1 return bytes(ret) class StrlenHook(viv_utils.emulator_drivers.Hook): """ Hook and handle calls to strlen """ def __init__(self, *args, **kwargs): super(StrlenHook, self).__init__(*args, **kwargs) def hook(self, callname, driver, callconv, api, argv): if callname and callname.lower() in ["msvcrt.strlen", "kernel32.lstrlena"]: emu = driver string_va = argv[0] s = readStringAtRva(emu, string_va, 256) callconv.execCallReturn(emu, len(s), len(argv)) return True raise viv_utils.emulator_drivers.UnsupportedFunction() class StrnlenHook(viv_utils.emulator_drivers.Hook): """ Hook and handle calls to strnlen. """ MAX_COPY_SIZE = 1024 * 1024 * 32 def __init__(self, *args, **kwargs): super(StrnlenHook, self).__init__(*args, **kwargs) def hook(self, callname, driver, callconv, api, argv): if callname == "msvcrt.strnlen": emu = driver string_va, maxlen = argv if maxlen > self.MAX_COPY_SIZE: self.d("unusually large strnlen, truncating to 32MB: 0x%x", maxlen) maxlen = self.MAX_COPY_SIZE s = readStringAtRva(emu, string_va, maxsize=maxlen) slen = s.index(b"\x00") callconv.execCallReturn(emu, slen, len(argv)) return True raise viv_utils.emulator_drivers.UnsupportedFunction() class StrncmpHook(viv_utils.emulator_drivers.Hook): """ Hook and handle calls to strncmp. """ MAX_COPY_SIZE = 1024 * 1024 * 32 def __init__(self, *args, **kwargs): super(StrncmpHook, self).__init__(*args, **kwargs) def hook(self, callname, driver, callconv, api, argv): if callname == "msvcrt.strncmp": emu = driver s1va, s2va, num = argv if num > self.MAX_COPY_SIZE: self.d("unusually large strnlen, truncating to 32MB: 0x%x", num) num = self.MAX_COPY_SIZE s1 = readStringAtRva(emu, s1va, maxsize=num) s2 = readStringAtRva(emu, s2va, maxsize=num) s1 = s1.partition(b"\x00")[0] s2 = s2.partition(b"\x00")[0] def cmp(a, b): return (a > b) - (a < b) result = cmp(s1, s2) callconv.execCallReturn(emu, result, len(argv)) return True raise viv_utils.emulator_drivers.UnsupportedFunction() class MemchrHook(viv_utils.emulator_drivers.Hook): """ Hook and handle calls to memchr """ def __init__(self, *args, **kwargs): super(MemchrHook, self).__init__(*args, **kwargs) def hook(self, callname, driver, callconv, api, argv): if callname == "msvcrt.memchr": emu = driver ptr, value, num = argv value = bytes([value]) memory = emu.readMemory(ptr, num) try: idx = memory.index(value) callconv.execCallReturn(emu, ptr + idx, len(argv)) except ValueError: # substring not found callconv.execCallReturn(emu, 0, len(argv)) return True raise viv_utils.emulator_drivers.UnsupportedFunction() class ExitProcessHook(viv_utils.emulator_drivers.Hook): """ Hook calls to ExitProcess and stop emulation when these are hit. """ def __init__(self, *args, **kwargs): super(ExitProcessHook, self).__init__(*args, **kwargs) def hook(self, callname, driver, callconv, api, argv): if callname == "kernel32.ExitProcess": raise viv_utils.emulator_drivers.StopEmulation() class <API key>(viv_utils.emulator_drivers.Hook): """ Hook calls to: - <API key> """ def hook(self, callname, emu, callconv, api, argv): if callname == "kernel32.<API key>": (hsection,) = argv emu.writeMemory(hsection, "csec") callconv.execCallReturn(emu, 0, len(argv)) return True DEFAULT_HOOKS = [ GetProcessHeapHook(), RtlAllocateHeapHook(), AllocateHeap(), MallocHeap(), ExitProcessHook(), MemcpyHook(), StrlenHook(), MemchrHook(), StrnlenHook(), StrncmpHook(), <API key>(), ] @contextlib.contextmanager def defaultHooks(driver): """ Install and remove the default set of hooks to handle common functions. intended usage: with defaultHooks(driver): driver.runFunction() """ try: for hook in DEFAULT_HOOKS: driver.add_hook(hook) yield finally: for hook in DEFAULT_HOOKS: driver.remove_hook(hook)
using System.IO; using System.Linq; namespace Datalust.Piggy.Cli { static class Printing { const int ConsoleWidth = 80; public static void Define(string term, string definition, int termColumnWidth, TextWriter output) { var header = term.PadRight(termColumnWidth); var right = ConsoleWidth - header.Length; var rest = definition.ToCharArray(); while (rest.Any()) { var content = new string(rest.Take(right).ToArray()); if (!string.IsNullOrWhiteSpace(content)) { output.Write(header); header = new string(' ', header.Length); output.WriteLine(content); } rest = rest.Skip(right).ToArray(); } } } }
#!/bin/sh scriptversion=2014-04-28; # this script is used to run pngcrush # 1. you can specify where the png locates and where reverted png locates # 2. default "reverted" dir is created under the png source dir # 3. {PWD} is used as the source dir if none parameter is provided program=`xcrun -sdk iphoneos -find pngcrush` parCount=$ case $parCount in 2) source=$1 dirname=$2;; 1) source=$1 dirname="reverted";; *) source=$PWD dirname="reverted";; esac echo "*.png in " echo $source if [[ $dirname == "reverted" ]]; then dirname=$source/$dirname fi echo "will be reverted to " echo $dirname echo "start:"
package com.huawei.esdk.tp.professional.local.impl.autogen; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "resultCode" }) @XmlRootElement(name = "<API key>") public class <API key> { @XmlElement(required = true, type = String.class) @XmlJavaTypeAdapter(Adapter3 .class) @XmlSchemaType(name = "int") protected Integer resultCode; /** * Gets the value of the resultCode property. * * @return * possible object is * {@link String } * */ public Integer getResultCode() { return resultCode; } /** * Sets the value of the resultCode property. * * @param value * allowed object is * {@link String } * */ public void setResultCode(Integer value) { this.resultCode = value; } }
package com.techjoynt.android.nxt.fragment.dialog; import java.util.Set; import android.app.Activity; import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothClass; import android.bluetooth.BluetoothDevice; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.support.v4.app.DialogFragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.ListView; import android.widget.TextView; import com.techjoynt.android.nxt.R; public class <API key> extends DialogFragment { <API key> mListener; private ArrayAdapter<String> <API key>; private ArrayAdapter<String> <API key>; private BluetoothAdapter mBtAdapter; private View mView; public static String <API key> = "device_address"; public interface <API key> { public void onNXTSelected(String address); } @Override public void onAttach(Activity activity) { super.onAttach(activity); try { mListener = (<API key>) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement <API key>"); } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle icicle) { mView = inflater.inflate(R.layout.device_list, container, false); getDialog().setTitle("Select Device"); getActivity().setResult(Activity.RESULT_CANCELED); Button mScan = (Button) mView.findViewById(R.id.button_scan); mScan.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { doDiscovery(); v.setVisibility(View.GONE); } }); return mView; } @Override public void onActivityCreated(Bundle icicle) { super.onActivityCreated(icicle); <API key> = new ArrayAdapter<String>(getActivity(), R.layout.device_name); <API key> = new ArrayAdapter<String>(getActivity(), R.layout.device_name); ListView pairedListView = (ListView) mView.findViewById(R.id.paired_devices); pairedListView.setAdapter(<API key>); pairedListView.<API key>(<API key>); ListView newDevicesListView = (ListView) mView.findViewById(R.id.new_devices); newDevicesListView.setAdapter(<API key>); newDevicesListView.<API key>(<API key>); IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND); getActivity().registerReceiver(mReceiver, filter); filter = new IntentFilter(BluetoothAdapter.<API key>); getActivity().registerReceiver(mReceiver, filter); mBtAdapter = BluetoothAdapter.getDefaultAdapter(); Set<BluetoothDevice> pairedDevices = mBtAdapter.getBondedDevices(); boolean empty = true; if (pairedDevices.size() > 0) { for (BluetoothDevice device : pairedDevices) { if ((device.getBluetoothClass() != null) && (device.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.TOY_ROBOT)) { <API key>.add(device.getName() + "\n" + device.getAddress()); empty = false; } } } if (!empty) { mView.findViewById(R.id.<API key>).setVisibility(View.VISIBLE); mView.findViewById(R.id.no_devices).setVisibility(View.GONE); } } @Override public void onDestroy() { super.onDestroy(); if (mBtAdapter != null) { mBtAdapter.cancelDiscovery(); } getActivity().unregisterReceiver(mReceiver); } private void doDiscovery() { getActivity().<API key>(true); getDialog().setTitle("Scanning..."); /** * TODO: WTF? */ //findViewById(R.id.title_new_devices).setVisibility(View.VISIBLE); if (mBtAdapter.isDiscovering()) { mBtAdapter.cancelDiscovery(); } mBtAdapter.startDiscovery(); <API key>.clear(); mView.findViewById(R.id.title_new_devices).setVisibility(View.GONE); if (<API key>.getCount() == 0) { mView.findViewById(R.id.no_devices).setVisibility(View.VISIBLE); } } private OnItemClickListener <API key> = new OnItemClickListener() { public void onItemClick(AdapterView<?> av, View v, int arg2, long arg3) { mBtAdapter.cancelDiscovery(); String info = ((TextView) v).getText().toString(); String address = info.substring(info.length() - 17); mListener.onNXTSelected(address); dismiss(); } }; private final BroadcastReceiver mReceiver = new BroadcastReceiver() { @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); if (BluetoothDevice.ACTION_FOUND.equals(action)) { BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE); if ((device.getBondState() != BluetoothDevice.BOND_BONDED) && (device.getBluetoothClass().getDeviceClass() == BluetoothClass.Device.TOY_ROBOT)) { <API key>.add(device.getName() + "\n" + device.getAddress()); mView.findViewById(R.id.title_new_devices).setVisibility(View.VISIBLE); mView.findViewById(R.id.no_devices).setVisibility(View.GONE); } } else if (BluetoothAdapter.<API key>.equals(action)) { getActivity().<API key>(false); mView.findViewById(R.id.button_scan).setVisibility(View.VISIBLE); } } }; }
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc --> <title>FileSendStreamer (HappyBrackets 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="FileSendStreamer (HappyBrackets API)"; } } catch(err) { } var methods = {"i0":10,"i1":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../net/happybrackets/controller/network/FileSender.<API key>.html" title="interface in net.happybrackets.controller.network"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../net/happybrackets/controller/network/<API key>.html" title="class in net.happybrackets.controller.network"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?net/happybrackets/controller/network/FileSendStreamer.html" target="_top">Frames</a></li> <li><a href="FileSendStreamer.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <div class="subTitle">net.happybrackets.controller.network</div> <h2 title="Class FileSendStreamer" class="title">Class FileSendStreamer</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>net.happybrackets.controller.network.FileSendStreamer</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd>java.lang.Comparable</dd> </dl> <hr> <br> <pre>public class <span class="typeNameLabel">FileSendStreamer</span> extends java.lang.Object implements java.lang.Comparable</pre> <div class="block">Class to sequentially read bytes for a file so we can send them out</div> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="method.summary"> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/happybrackets/controller/network/FileSendStreamer.html#compareTo-java.lang.Object-">compareTo</a></span>(java.lang.Object&nbsp;o)</code>&nbsp;</td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../../net/happybrackets/controller/network/FileSendStreamer.html#equals-java.lang.Object-">equals</a></span>(java.lang.Object&nbsp;o)</code>&nbsp;</td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="method.detail"> </a> <h3>Method Detail</h3> <a name="equals-java.lang.Object-"> </a> <ul class="blockList"> <li class="blockList"> <h4>equals</h4> <pre>public&nbsp;boolean&nbsp;equals(java.lang.Object&nbsp;o)</pre> <dl> <dt><span class="<API key>">Overrides:</span></dt> <dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd> </dl> </li> </ul> <a name="compareTo-java.lang.Object-"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>compareTo</h4> <pre>public&nbsp;int&nbsp;compareTo(java.lang.Object&nbsp;o)</pre> <dl> <dt><span class="<API key>">Specified by:</span></dt> <dd><code>compareTo</code>&nbsp;in interface&nbsp;<code>java.lang.Comparable</code></dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../index-all.html">Index</a></li> <li><a href="../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../net/happybrackets/controller/network/FileSender.<API key>.html" title="interface in net.happybrackets.controller.network"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../../net/happybrackets/controller/network/<API key>.html" title="class in net.happybrackets.controller.network"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../../index.html?net/happybrackets/controller/network/FileSendStreamer.html" target="_top">Frames</a></li> <li><a href="FileSendStreamer.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><! allClassesLink = document.getElementById("<API key>"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li>Constr&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> </a></div> </body> </html>
package com.thimbleware.jmemcached.protocol.binary; import java.nio.ByteOrder; import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelHandler; import org.jboss.netty.channel.<API key>; import org.jboss.netty.channel.ExceptionEvent; import org.jboss.netty.channel.MessageEvent; import org.jboss.netty.channel.<API key>; import com.thimbleware.jmemcached.CacheElement; import com.thimbleware.jmemcached.protocol.Op; import com.thimbleware.jmemcached.protocol.ResponseMessage; import com.thimbleware.jmemcached.protocol.exceptions.<API key>; // TODO refactor so this can be unit tested separate from netty? scalacheck? @ChannelHandler.Sharable public class <API key><CACHE_ELEMENT extends CacheElement> extends <API key> { private ConcurrentHashMap<Integer, ChannelBuffer> corkedBuffers = new ConcurrentHashMap<Integer, ChannelBuffer>(); final Logger logger = LogManager.getLogger(<API key>.class); public static enum ResponseCode { OK(0x0000), KEYNF(0x0001), KEYEXISTS(0x0002), TOOLARGE(0x0003), INVARG(0x0004), NOT_STORED(0x0005), UNKNOWN(0x0081), OOM(0x00082); public short code; ResponseCode(int code) { this.code = (short)code; } } public ResponseCode getStatusCode(ResponseMessage command) { Op cmd = command.cmd.op; if (cmd == Op.GET || cmd == Op.GETS) { return ResponseCode.OK; } else if (cmd == Op.SET || cmd == Op.CAS || cmd == Op.ADD || cmd == Op.REPLACE || cmd == Op.APPEND || cmd == Op.PREPEND) { switch (command.response) { case EXISTS: return ResponseCode.KEYEXISTS; case NOT_FOUND: return ResponseCode.KEYNF; case NOT_STORED: return ResponseCode.NOT_STORED; case STORED: return ResponseCode.OK; } } else if (cmd == Op.INCR || cmd == Op.DECR) { return command.incrDecrResponse == null ? ResponseCode.KEYNF : ResponseCode.OK; } else if (cmd == Op.DELETE) { switch (command.deleteResponse) { case DELETED: return ResponseCode.OK; case NOT_FOUND: return ResponseCode.KEYNF; } } else if (cmd == Op.STATS) { return ResponseCode.OK; } else if (cmd == Op.VERSION) { return ResponseCode.OK; } else if (cmd == Op.FLUSH_ALL) { return ResponseCode.OK; } return ResponseCode.UNKNOWN; } public ChannelBuffer constructHeader(<API key>.BinaryOp bcmd, ChannelBuffer extrasBuffer, ChannelBuffer keyBuffer, ChannelBuffer valueBuffer, short responseCode, int opaqueValue, long casUnique) { // take the ResponseMessage and turn it into a binary payload. ChannelBuffer header = ChannelBuffers.buffer(ByteOrder.BIG_ENDIAN, 24); header.writeByte((byte)0x81); // magic header.writeByte(bcmd.code); // opcode short keyLength = (short) (keyBuffer != null ? keyBuffer.capacity() :0); header.writeShort(keyLength); int extrasLength = extrasBuffer != null ? extrasBuffer.capacity() : 0; header.writeByte((byte) extrasLength); // extra length = flags + expiry header.writeByte((byte)0); // data type unused header.writeShort(responseCode); // status code int dataLength = valueBuffer != null ? valueBuffer.capacity() : 0; header.writeInt(dataLength + keyLength + extrasLength); // data length header.writeInt(opaqueValue); // opaque header.writeLong(casUnique); return header; } /** * Handle exceptions in protocol processing. Exceptions are either client or internal errors. Report accordingly. * * @param ctx * @param e * @throws Exception */ @Override public void exceptionCaught(<API key> ctx, ExceptionEvent e) throws Exception { try { throw e.getCause(); } catch (<API key> unknownCommand) { if (ctx.getChannel().isOpen()) ctx.getChannel().write(constructHeader(<API key>.BinaryOp.Noop, null, null, null, (short)0x0081, 0, 0)); } catch (Throwable err) { logger.error("error", err); if (ctx.getChannel().isOpen()) ctx.getChannel().close(); } } @Override @SuppressWarnings("unchecked") public void messageReceived(<API key> <API key>, MessageEvent messageEvent) throws Exception { ResponseMessage<CACHE_ELEMENT> command = (ResponseMessage<CACHE_ELEMENT>) messageEvent.getMessage(); Object additional = messageEvent.getMessage(); <API key>.BinaryOp bcmd = <API key>.BinaryOp.forCommandMessage(command.cmd); // write extras == flags & expiry ChannelBuffer extrasBuffer = null; // write key if there is one ChannelBuffer keyBuffer = null; if (bcmd.addKeyToResponse && command.cmd.keys != null && command.cmd.keys.size() != 0) { keyBuffer = ChannelBuffers.wrappedBuffer(command.cmd.keys.get(0).bytes); } // write value if there is one ChannelBuffer valueBuffer = null; if (command.elements != null) { extrasBuffer = ChannelBuffers.buffer(ByteOrder.BIG_ENDIAN, 4); CacheElement element = command.elements[0]; extrasBuffer.writeShort((short) (element != null ? element.getExpire() : 0)); extrasBuffer.writeShort((short) (element != null ? element.getFlags() : 0)); if ((command.cmd.op == Op.GET || command.cmd.op == Op.GETS)) { if (element != null) { valueBuffer = ChannelBuffers.wrappedBuffer(element.getData()); } else { valueBuffer = ChannelBuffers.buffer(0); } } else if (command.cmd.op == Op.INCR || command.cmd.op == Op.DECR) { valueBuffer = ChannelBuffers.buffer(ByteOrder.BIG_ENDIAN, 8); valueBuffer.writeLong(command.incrDecrResponse); } } else if (command.cmd.op == Op.INCR || command.cmd.op == Op.DECR) { valueBuffer = ChannelBuffers.buffer(ByteOrder.BIG_ENDIAN, 8); valueBuffer.writeLong(command.incrDecrResponse); } long casUnique = 0; if (command.elements != null && command.elements.length != 0 && command.elements[0] != null) { casUnique = command.elements[0].getCasUnique(); } // stats is special -- with it, we write N times, one for each stat, then an empty payload if (command.cmd.op == Op.STATS) { // first uncork any corked buffers if (corkedBuffers.containsKey(command.cmd.opaque)) uncork(command.cmd.opaque, messageEvent.getChannel()); for (Map.Entry<String, Set<String>> statsEntries : command.stats.entrySet()) { for (String stat : statsEntries.getValue()) { keyBuffer = ChannelBuffers.wrappedBuffer(ByteOrder.BIG_ENDIAN, statsEntries.getKey().getBytes(<API key>.USASCII)); valueBuffer = ChannelBuffers.wrappedBuffer(ByteOrder.BIG_ENDIAN, stat.getBytes(<API key>.USASCII)); ChannelBuffer headerBuffer = constructHeader(bcmd, extrasBuffer, keyBuffer, valueBuffer, getStatusCode(command).code, command.cmd.opaque, casUnique); writePayload(messageEvent, extrasBuffer, keyBuffer, valueBuffer, headerBuffer); } } keyBuffer = null; valueBuffer = null; ChannelBuffer headerBuffer = constructHeader(bcmd, extrasBuffer, keyBuffer, valueBuffer, getStatusCode(command).code, command.cmd.opaque, casUnique); writePayload(messageEvent, extrasBuffer, keyBuffer, valueBuffer, headerBuffer); } else { ChannelBuffer headerBuffer = constructHeader(bcmd, extrasBuffer, keyBuffer, valueBuffer, getStatusCode(command).code, command.cmd.opaque, casUnique); // write everything // is the command 'quiet?' if so, then we append to our 'corked' buffer until a non-corked command comes along if (bcmd.noreply) { int totalCapacity = headerBuffer.capacity() + (extrasBuffer != null ? extrasBuffer.capacity() : 0) + (keyBuffer != null ? keyBuffer.capacity() : 0) + (valueBuffer != null ? valueBuffer.capacity() : 0); ChannelBuffer corkedResponse = cork(command.cmd.opaque, totalCapacity); corkedResponse.writeBytes(headerBuffer); if (extrasBuffer != null) corkedResponse.writeBytes(extrasBuffer); if (keyBuffer != null) corkedResponse.writeBytes(keyBuffer); if (valueBuffer != null) corkedResponse.writeBytes(valueBuffer); } else { // first write out any corked responses if (corkedBuffers.containsKey(command.cmd.opaque)) uncork(command.cmd.opaque, messageEvent.getChannel()); writePayload(messageEvent, extrasBuffer, keyBuffer, valueBuffer, headerBuffer); } } } private ChannelBuffer cork(int opaque, int totalCapacity) { if (corkedBuffers.containsKey(opaque)) { ChannelBuffer corkedResponse = corkedBuffers.get(opaque); ChannelBuffer oldBuffer = corkedResponse; corkedResponse = ChannelBuffers.buffer(ByteOrder.BIG_ENDIAN, totalCapacity + corkedResponse.capacity()); corkedResponse.writeBytes(oldBuffer); oldBuffer.clear(); corkedBuffers.remove(opaque); corkedBuffers.put(opaque, corkedResponse); return corkedResponse; } else { ChannelBuffer buffer = ChannelBuffers.buffer(ByteOrder.BIG_ENDIAN, totalCapacity); corkedBuffers.put(opaque, buffer); return buffer; } } private void uncork(int opaque, Channel channel) { ChannelBuffer corkedBuffer = corkedBuffers.get(opaque); assert corkedBuffer != null; channel.write(corkedBuffer); corkedBuffers.remove(opaque); } private void writePayload(MessageEvent messageEvent, ChannelBuffer extrasBuffer, ChannelBuffer keyBuffer, ChannelBuffer valueBuffer, ChannelBuffer headerBuffer) { if (messageEvent.getChannel().isOpen()) { messageEvent.getChannel().write(headerBuffer); if (extrasBuffer != null) messageEvent.getChannel().write(extrasBuffer); if (keyBuffer != null) messageEvent.getChannel().write(keyBuffer); if (valueBuffer != null) messageEvent.getChannel().write(valueBuffer); } } }
using System; using System.Text; static class <API key> { public static Guid ToGuid(string src) { byte[] stringbytes = Encoding.UTF8.GetBytes(src); byte[] hashedBytes = new System.Security.Cryptography .<API key>() .ComputeHash(stringbytes); Array.Resize(ref hashedBytes, 16); return new Guid(hashedBytes); } }
#include <stdarg.h> #define COBJMACROS #include "windef.h" #include "winbase.h" #include "winuser.h" #include "ole2.h" #include "wine/debug.h" #include "mshtml_private.h" #include "binding.h" <API key>(mshtml); /********************************************************** * IHlinkTarget implementation */ static inline HTMLDocument *<API key>(IHlinkTarget *iface) { return CONTAINING_RECORD(iface, HTMLDocument, IHlinkTarget_iface); } static HRESULT WINAPI <API key>(IHlinkTarget *iface, REFIID riid, void **ppv) { HTMLDocument *This = <API key>(iface); return <API key>(This, riid, ppv); } static ULONG WINAPI HlinkTarget_AddRef(IHlinkTarget *iface) { HTMLDocument *This = <API key>(iface); return htmldoc_addref(This); } static ULONG WINAPI HlinkTarget_Release(IHlinkTarget *iface) { HTMLDocument *This = <API key>(iface); return htmldoc_release(This); } static HRESULT WINAPI <API key>(IHlinkTarget *iface, IHlinkBrowseContext *pihlbc) { HTMLDocument *This = <API key>(iface); FIXME("(%p)->(%p)\n", This, pihlbc); return E_NOTIMPL; } static HRESULT WINAPI <API key>(IHlinkTarget *iface, IHlinkBrowseContext **ppihlbc) { HTMLDocument *This = <API key>(iface); FIXME("(%p)->(%p)\n", This, ppihlbc); return E_NOTIMPL; } static HRESULT WINAPI <API key>(IHlinkTarget *iface, DWORD grfHLNF, LPCWSTR pwzJumpLocation) { HTMLDocument *This = <API key>(iface); TRACE("(%p)->(%08x %s)\n", This, grfHLNF, debugstr_w(pwzJumpLocation)); if(grfHLNF) FIXME("Unsupported grfHLNF=%08x\n", grfHLNF); if(pwzJumpLocation) FIXME("JumpLocation not supported\n"); if(!This->doc_obj->client) return navigate_new_window(This->window, This->window->uri, NULL, NULL); return IOleObject_DoVerb(&This->IOleObject_iface, OLEIVERB_SHOW, NULL, NULL, -1, NULL, NULL); } static HRESULT WINAPI <API key>(IHlinkTarget *iface, LPCWSTR pwzLocation, DWORD dwAssign, IMoniker **ppimkLocation) { HTMLDocument *This = <API key>(iface); FIXME("(%p)->(%s %08x %p)\n", This, debugstr_w(pwzLocation), dwAssign, ppimkLocation); return E_NOTIMPL; } static HRESULT WINAPI <API key>(IHlinkTarget *iface, LPCWSTR pwzLocation, LPWSTR *ppwzFriendlyName) { HTMLDocument *This = <API key>(iface); FIXME("(%p)->(%s %p)\n", This, debugstr_w(pwzLocation), ppwzFriendlyName); return E_NOTIMPL; } static const IHlinkTargetVtbl HlinkTargetVtbl = { <API key>, HlinkTarget_AddRef, HlinkTarget_Release, <API key>, <API key>, <API key>, <API key>, <API key> }; void <API key>(HTMLDocument *This) { This->IHlinkTarget_iface.lpVtbl = &HlinkTargetVtbl; }
<div class="sharebuttons"> <button id="share-flapout" class="mdl-button mdl-button--colored mdl-js-button <API key> icon-button"> <i class="material-icons_2x icon <API key>"></i> </button> <ul class="mdl-menu <API key> mdl-js-menu <API key>" for="share-flapout"> <li class="mdl-menu__item "> <a class="mdl-button mdl-js-button mdl-button--raised <API key> social-share-button twitter-share" href="https://twitter.com/intent/tweet?text={{ .Params.tweetshare}}&url={{ .Permalink }}"> <i class="material-icons icon ion-social-twitter "></i> <small> tweet</small> </a> </li> <li class="mdl-menu__item "> <a class="mdl-button mdl-js-button mdl-button--raised <API key> social-share-button facebook-share" href="https: <i class="material-icons icon ion-social-facebook "></i> <small> like</small> </a> </li> </ul> </div>
package com.bsu.sed.dao; import com.bsu.sed.dao.generic.GenericDao; import com.bsu.sed.dao.generic.browsable.BrowsableDao; import com.bsu.sed.model.persistent.Content; /** * @author gbondarchuk */ public interface ContentDao extends BrowsableDao<Content> { }
<?php class <API key> extends BiddingScheme { const WSDL_NAMESPACE = "https://adwords.google.com/api/adwords/cm/v201605"; const XSI_TYPE = "<API key>"; /** * @access public * @var <API key> */ public $pricingMode; /** * @access public * @var <API key> */ public $bidType; /** * Gets the namesapce of this class * @return string the namespace of this class */ public function getNamespace() { return self::WSDL_NAMESPACE; } /** * Gets the xsi:type name of this class * @return string the xsi:type name of this class */ public function getXsiTypeName() { return self::XSI_TYPE; } public function __construct($pricingMode = null, $bidType = null, $BiddingSchemeType = null) { parent::__construct(); $this->pricingMode = $pricingMode; $this->bidType = $bidType; $this->BiddingSchemeType = $BiddingSchemeType; } }
package com.acciones; import DAO.Candidato.CandidatoDAO; import DAO.DAOFactory; import DAO.<API key>.<API key>; import Modelo.Negocio.Candidato; import Modelo.Negocio.<API key>; import com.google.gson.Gson; import com.modelo.Total; import static com.opensymphony.xwork2.Action.ERROR; import com.opensymphony.xwork2.ActionSupport; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; import org.apache.struts2.<API key>; import org.apache.struts2.convention.annotation.Action; import org.apache.struts2.convention.annotation.Result; import org.apache.struts2.convention.annotation.Results; /** * * @author Angelo */ @Results({ @Result(name = "error", location = "/error.jsp") }) public class Grafico_Dos extends ActionSupport { private static final Logger logger = Logger.getLogger(Grafico_Dos.class); DAO.DAOFactory d = DAOFactory.getDAOFactory(DAOFactory.MYSQL); <API key> dm = d.<API key>(); CandidatoDAO daoCandidato = d.getCandidato(); <API key> daoVMC = d.<API key>(); @Override @Action(value = "Grafico_Dos") public String execute() { HttpServletResponse response = <API key>.getResponse(); List<Total> listaTotales = getTotales(); Gson gson = new Gson(); String jsonString = gson.toJson(listaTotales); try { response.getWriter().write(jsonString); } catch (Exception e) { logger.error("Error al crear gráfico 2.", e); return ERROR; } return null; } private List<Total> getTotales() { List<Total> totales = new ArrayList<Total>(); List<Candidato> candidatos = daoCandidato.getCandidatos(); for (Candidato cadaCandidato : candidatos) { List<<API key>> votosPorCandidato = daoVMC.<API key>(cadaCandidato.getIdCandidato()); int total = 0; for (<API key> <API key> : votosPorCandidato) { total += <API key>.getCantidad(); } Total t = new Total(); t.setTotal(total); t.setLabel(cadaCandidato.getNombre()); totales.add(t); } totales.sort(null); return totales; } }
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace ChinaUnion_Agent { public partial class frmLogMemo : Form { public frmLogMemo() { InitializeComponent(); } private void frmLogMemo_Load(object sender, EventArgs e) { this.WindowState = FormWindowState.Maximized; } private void btnClose_Click(object sender, EventArgs e) { this.Close(); } } }
package com.example.android.multiproject.library.base.test; import com.sample.android.multiproject.library.PersonView; import android.test.<API key>; public class TestActivityTest extends <API key><TestActivity> { public TestActivityTest() { super(TestActivity.class); } public void testPreconditions() { TestActivity activity = getActivity(); PersonView view = (PersonView) activity.findViewById(R.id.view); assertNotNull(view); assertEquals(20.0f, view.getTextSize()); } }
package cn.asens.process; /** * @author Asens * create 2017-07-29 17:38 **/ public interface Worker extends Runnable{ void registerTask(WorkerTask workerTask); }
package com.elminster.easydao.db.analyze.expression.operator; import com.elminster.easydao.db.analyze.expression.DataType; import com.elminster.easydao.db.analyze.expression.IVariable; import com.elminster.easydao.db.analyze.expression.Variable; public class DivOperator extends ArithmeticOperator { public static final IOperator INSTANCE = new DivOperator(); @Override public String getOperatorName() { return " / "; } @Override protected IVariable process(IVariable left, IVariable right) { Object rst = null; if (DataType.DOUBLE.equals(returnType)) { rst = (Double) ((Double) left.getVariableValue() / (Double) right.getVariableValue()); } else if (DataType.LONG.equals(returnType)) { rst = (Long) ((Long) left.getVariableValue() / (Long) right.getVariableValue()); } else if (DataType.INTEGER.equals(returnType)) { rst = (Integer) ((Integer) left.getVariableValue() / (Integer) right.getVariableValue()); } IVariable v = new Variable(returnType, rst); return v; } @Override protected boolean processable(DataType ldt, DataType rdt) { if (DataType.DOUBLE.equals(ldt)) { if (DataType.DOUBLE.equals(rdt) || DataType.LONG.equals(rdt) || DataType.INTEGER.equals(rdt)) { this.returnType = DataType.DOUBLE; } } else if (DataType.LONG.equals(ldt)) { if (DataType.DOUBLE.equals(rdt)) { this.returnType = DataType.DOUBLE; } else if (DataType.LONG.equals(rdt) || DataType.INTEGER.equals(rdt)) { this.returnType = DataType.LONG; } } else if (DataType.INTEGER.equals(ldt)) { if (DataType.DOUBLE.equals(rdt)) { this.returnType = DataType.DOUBLE; } else if (DataType.LONG.equals(rdt)) { this.returnType = DataType.LONG; } else if (DataType.INTEGER.equals(rdt)) { this.returnType = DataType.INTEGER; } } return null != this.returnType; } }
from django import forms from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.utils.safestring import mark_safe from dcim.models import DeviceRole, Platform, Region, Site from tenancy.models import Tenant, TenantGroup from utilities.forms import ( add_blank_choice, APISelectMultiple, BootstrapMixin, BulkEditForm, <API key>, ColorSelect, ContentTypeSelect, CSVModelForm, DateTimePicker, <API key>, JSONField, SlugField, StaticSelect2, <API key>, ) from virtualization.models import Cluster, ClusterGroup from .choices import * from .models import ConfigContext, CustomField, ImageAttachment, ObjectChange, Tag # Custom fields class <API key>(forms.ModelForm): def __init__(self, *args, **kwargs): self.obj_type = ContentType.objects.get_for_model(self._meta.model) self.custom_fields = [] super().__init__(*args, **kwargs) self.<API key>() def <API key>(self): """ Append form fields for all CustomFields assigned to this model. """ # Append form fields; assign initial values if modifying and existing object for cf in CustomField.objects.filter(content_types=self.obj_type): field_name = 'cf_{}'.format(cf.name) if self.instance.pk: self.fields[field_name] = cf.to_form_field(set_initial=False) self.fields[field_name].initial = self.instance.custom_field_data.get(cf.name) else: self.fields[field_name] = cf.to_form_field() # Annotate the field in the list of CustomField form fields self.custom_fields.append(field_name) def clean(self): # Save custom field data on instance for cf_name in self.custom_fields: self.instance.custom_field_data[cf_name[3:]] = self.cleaned_data.get(cf_name) return super().clean() class <API key>(CSVModelForm, <API key>): def <API key>(self): # Append form fields for cf in CustomField.objects.filter(content_types=self.obj_type): field_name = 'cf_{}'.format(cf.name) self.fields[field_name] = cf.to_form_field(for_csv_import=True) # Annotate the field in the list of CustomField form fields self.custom_fields.append(field_name) class <API key>(BulkEditForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.custom_fields = [] self.obj_type = ContentType.objects.get_for_model(self.model) # Add all applicable CustomFields to the form custom_fields = CustomField.objects.filter(content_types=self.obj_type) for cf in custom_fields: # Annotate non-required custom fields as nullable if not cf.required: self.nullable_fields.append(cf.name) self.fields[cf.name] = cf.to_form_field(set_initial=False, enforce_required=False) # Annotate this as a custom field self.custom_fields.append(cf.name) class <API key>(forms.Form): def __init__(self, *args, **kwargs): self.obj_type = ContentType.objects.get_for_model(self.model) super().__init__(*args, **kwargs) # Add all applicable CustomFields to the form custom_fields = CustomField.objects.filter(content_types=self.obj_type).exclude( filter_logic=<API key>.FILTER_DISABLED ) for cf in custom_fields: field_name = 'cf_{}'.format(cf.name) self.fields[field_name] = cf.to_form_field(set_initial=True, enforce_required=False) # Tags class TagForm(BootstrapMixin, forms.ModelForm): slug = SlugField() class Meta: model = Tag fields = [ 'name', 'slug', 'color', 'description' ] class TagCSVForm(CSVModelForm): slug = SlugField() class Meta: model = Tag fields = Tag.csv_headers help_texts = { 'color': mark_safe('RGB color in hexadecimal (e.g. <code>00ff00</code>)'), } class AddRemoveTagsForm(forms.Form): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Add add/remove tags fields self.fields['add_tags'] = <API key>( queryset=Tag.objects.all(), required=False ) self.fields['remove_tags'] = <API key>( queryset=Tag.objects.all(), required=False ) class TagFilterForm(BootstrapMixin, forms.Form): model = Tag q = forms.CharField( required=False, label='Search' ) class TagBulkEditForm(BootstrapMixin, BulkEditForm): pk = forms.<API key>( queryset=Tag.objects.all(), widget=forms.MultipleHiddenInput ) color = forms.CharField( max_length=6, required=False, widget=ColorSelect() ) description = forms.CharField( max_length=200, required=False ) class Meta: nullable_fields = ['description'] # Config contexts class ConfigContextForm(BootstrapMixin, forms.ModelForm): regions = <API key>( queryset=Region.objects.all(), required=False ) sites = <API key>( queryset=Site.objects.all(), required=False ) roles = <API key>( queryset=DeviceRole.objects.all(), required=False ) platforms = <API key>( queryset=Platform.objects.all(), required=False ) cluster_groups = <API key>( queryset=ClusterGroup.objects.all(), required=False ) clusters = <API key>( queryset=Cluster.objects.all(), required=False ) tenant_groups = <API key>( queryset=TenantGroup.objects.all(), required=False ) tenants = <API key>( queryset=Tenant.objects.all(), required=False ) tags = <API key>( queryset=Tag.objects.all(), required=False ) data = JSONField( label='' ) class Meta: model = ConfigContext fields = ( 'name', 'weight', 'description', 'is_active', 'regions', 'sites', 'roles', 'platforms', 'cluster_groups', 'clusters', 'tenant_groups', 'tenants', 'tags', 'data', ) class <API key>(BootstrapMixin, BulkEditForm): pk = forms.<API key>( queryset=ConfigContext.objects.all(), widget=forms.MultipleHiddenInput ) weight = forms.IntegerField( required=False, min_value=0 ) is_active = forms.NullBooleanField( required=False, widget=<API key>() ) description = forms.CharField( required=False, max_length=100 ) class Meta: nullable_fields = [ 'description', ] class <API key>(BootstrapMixin, forms.Form): q = forms.CharField( required=False, label='Search' ) region = <API key>( queryset=Region.objects.all(), to_field_name='slug', required=False ) site = <API key>( queryset=Site.objects.all(), to_field_name='slug', required=False ) role = <API key>( queryset=DeviceRole.objects.all(), to_field_name='slug', required=False ) platform = <API key>( queryset=Platform.objects.all(), to_field_name='slug', required=False ) cluster_group = <API key>( queryset=ClusterGroup.objects.all(), to_field_name='slug', required=False ) cluster_id = <API key>( queryset=Cluster.objects.all(), required=False, label='Cluster' ) tenant_group = <API key>( queryset=TenantGroup.objects.all(), to_field_name='slug', required=False ) tenant = <API key>( queryset=Tenant.objects.all(), to_field_name='slug', required=False ) tag = <API key>( queryset=Tag.objects.all(), to_field_name='slug', required=False ) # Filter form for local config context data class <API key>(forms.Form): local_context_data = forms.NullBooleanField( required=False, label='Has local config context data', widget=StaticSelect2( choices=<API key> ) ) # Image attachments class ImageAttachmentForm(BootstrapMixin, forms.ModelForm): class Meta: model = ImageAttachment fields = [ 'name', 'image', ] # Change logging class <API key>(BootstrapMixin, forms.Form): model = ObjectChange q = forms.CharField( required=False, label='Search' ) time_after = forms.DateTimeField( label='After', required=False, widget=DateTimePicker() ) time_before = forms.DateTimeField( label='Before', required=False, widget=DateTimePicker() ) action = forms.ChoiceField( choices=add_blank_choice(<API key>), required=False, widget=StaticSelect2() ) user_id = <API key>( queryset=User.objects.all(), required=False, display_field='username', label='User', widget=APISelectMultiple( api_url='/api/users/users/', ) ) <API key> = <API key>( queryset=ContentType.objects.all(), required=False, display_field='display_name', label='Object Type', widget=APISelectMultiple( api_url='/api/extras/content-types/', ) ) # Scripts class ScriptForm(BootstrapMixin, forms.Form): _commit = forms.BooleanField( required=False, initial=True, label="Commit changes", help_text="Commit changes to the database (uncheck for a dry-run)" ) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Move _commit to the end of the form commit = self.fields.pop('_commit') self.fields['_commit'] = commit @property def requires_input(self): """ A boolean indicating whether the form requires user input (ignore the _commit field). """ return bool(len(self.fields) > 1)
<!DOCTYPE html> <html xmlns="http: <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="SHORTCUT ICON" href="../../../../../img/clover.ico" /> <link rel="stylesheet" href="../../../../../aui/css/aui.min.css" media="all"/> <link rel="stylesheet" href="../../../../../aui/css/aui-experimental.min.css" media="all"/> <!--[if IE 9]><link rel="stylesheet" href="../../../../../aui/css/aui-ie9.min.css" media="all"/><![endif]--> <style type="text/css" media="all"> @import url('../../../../../style.css'); @import url('../../../../../tree.css'); </style> <script src="../../../../../jquery-1.8.3.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui-experimental.min.js" type="text/javascript"></script> <script src="../../../../../aui/js/aui-soy.min.js" type="text/javascript"></script> <script src="../../../../../package-nodes-tree.js" type="text/javascript"></script> <script src="../../../../../clover-tree.js" type="text/javascript"></script> <script src="../../../../../clover.js" type="text/javascript"></script> <script src="../../../../../clover-descriptions.js" type="text/javascript"></script> <script src="../../../../../cloud.js" type="text/javascript"></script> <title>ABA Route Transit Number Validator 1.0.1-SNAPSHOT</title> </head> <body> <div id="page"> <header id="header" role="banner"> <nav class="aui-header <API key>" role="navigation"> <div class="aui-header-inner"> <div class="aui-header-primary"> <h1 id="logo" class="aui-header-logo <API key>"> <a href="http://openclover.org" title="Visit OpenClover home page"><span class="<API key>">OpenClover</span></a> </h1> </div> <div class="<API key>"> <ul class="aui-nav"> <li id="system-help-menu"> <a class="aui-nav-link" title="Open online documentation" target="_blank" href="http://openclover.org/documentation"> <span class="aui-icon aui-icon-small aui-iconfont-help">&#160;Help</span> </a> </li> </ul> </div> </div> </nav> </header> <div class="aui-page-panel"> <div class="<API key>"> <div class="aui-page-panel-nav <API key>"> <div class="<API key>" style="margin-bottom: 20px;"> <div class="<API key>"> <a href="http://cardatechnologies.com" target="_top"> <div class="aui-avatar aui-avatar-large aui-avatar-project"> <div class="aui-avatar-inner"> <img src="../../../../../img/clover_logo_large.png" alt="Clover icon"/> </div> </div> </a> </div> <div class="<API key>" > <h1> <a href="http://cardatechnologies.com" target="_top"> ABA Route Transit Number Validator 1.0.1-SNAPSHOT </a> </h1> </div> </div> <nav class="aui-navgroup <API key>"> <div class="aui-navgroup-inner"> <ul class="aui-nav"> <li class=""> <a href="../../../../../dashboard.html">Project overview</a> </li> </ul> <div class="aui-nav-heading <API key>"> <strong>Packages</strong> </div> <div class="aui-nav project-packages"> <form method="get" action="#" class="aui <API key>"> <input type="text" autocomplete="off" class="package-filter text" placeholder="Type to filter packages..." name="package-filter" id="package-filter" title="Start typing package name (or part of the name) to search through the tree. Use arrow keys and the Enter key to navigate."/> </form> <p class="<API key> hidden"> <small>No results found.</small> </p> <div class="<API key>" data-root-relative="../../../../../" data-package-name="com.cardatechnologies.utils.validators.abaroutevalidator"> <div class="<API key>"></div> <div class="<API key>"></div> </div> </div> </div> </nav> </div> <section class="<API key>"> <div class="<API key>"> <div class="<API key>"><ol class="aui-nav aui-nav-breadcrumbs"> <li><a href="../../../../../dashboard.html"> Project Clover database Sat Aug 7 2021 12:29:33 MDT</a></li> <li><a href="test-pkg-summary.html">Package com.cardatechnologies.utils.validators.abaroutevalidator</a></li> <li><a href="<API key>.html">Class <API key></a></li> </ol></div> <h1 class="aui-h2-clover"> Test <API key> </h1> <table class="aui"> <thead> <tr> <th>Test</th> <th><label title="The test result. Either a Pass, Fail or Error.">Status</label></th> <th><label title="When the test execution was started">Start time</label></th> <th><label title="The total time in seconds taken to run this test.">Time (seconds)</label></th> <th><label title="A failure or error message if the test is not successful.">Message</label></th> </tr> </thead> <tbody> <tr> <td> <a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/<API key>.html?line=40576#src-40576" ><API key></a> </td> <td> <span class="sortValue">1</span><span class="aui-lozenge aui-lozenge-success">PASS</span> </td> <td> 7 Aug 12:35:44 </td> <td> 0.0 </td> <td> <div></div> <div class="errorMessage"></div> </td> </tr> </tbody> </table> <div>&#160;</div> <table class="aui aui-table-sortable"> <thead> <tr> <th style="white-space:nowrap;"><label title="A class that was directly hit by this test.">Target Class</label></th> <th colspan="4"><label title="The percentage of coverage contributed by each single test.">Coverage contributed by</label> <API key></th> </tr> </thead> <tbody> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.<API key></span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/exceptions/<API key>.html?id=6300#<API key>" title="<API key>" name="sl-43">com.cardatechnologies.utils.validators.abaroutevalidator.exceptions.<API key></a> </td> <td> <span class="sortValue">0.5714286</span>57.1% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="57.1% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:57.1%"></div></div></div> </td> </tr> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.ErrorCodes</span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/ErrorCodes.html?id=6300#ErrorCodes" title="ErrorCodes" name="sl-42">com.cardatechnologies.utils.validators.abaroutevalidator.ErrorCodes</a> </td> <td> <span class="sortValue">0.5714286</span>57.1% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="57.1% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:57.1%"></div></div></div> </td> </tr> <tr> <td> <span class="sortValue">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</span> &#160;&#160;<a href="../../../../../com/cardatechnologies/utils/validators/abaroutevalidator/AbaRouteValidator.html?id=6300#AbaRouteValidator" title="AbaRouteValidator" name="sl-47">com.cardatechnologies.utils.validators.abaroutevalidator.AbaRouteValidator</a> </td> <td> <span class="sortValue">0.29411766</span>29.4% </td> <td class="align-middle" style="width: 100%" colspan="3"> <div> <div title="29.4% Covered" style="min-width:40px;" class="barNegative contribBarNegative contribBarNegative"><div class="barPositive contribBarPositive contribBarPositive" style="width:29.4%"></div></div></div> </td> </tr> </tbody> </table> </div> <!-- class="<API key>" --> <footer id="footer" role="contentinfo"> <section class="footer-body"> <ul> <li> Report generated by <a target="_new" href="http://openclover.org">OpenClover</a> v 4.4.1 on Sat Aug 7 2021 12:49:26 MDT using coverage data from Sat Aug 7 2021 12:47:23 MDT. </li> </ul> <ul> <li>OpenClover is free and open-source software. </li> </ul> </section> </footer> </section> <!-- class="<API key>" --> </div> <!-- class="<API key>" --> </div> <!-- class="aui-page-panel" --> </div> <!-- id="page" --> </body> </html>
/ [tests/cases/compiler/privacyVarDeclFile.ts] / [<API key>.ts] class privateClass { } export class publicClass { } export interface <API key> { myProperty: privateClass; // Error } export interface <API key> { myProperty: publicClass; } interface <API key> { myProperty: privateClass; } interface <API key> { myProperty: publicClass; } export class <API key> { static <API key>: privateClass; // Error private static <API key>: privateClass; myPublicProperty: privateClass; // Error private myPrivateProperty: privateClass; } export class <API key> { static <API key>: publicClass; private static <API key>: publicClass; myPublicProperty: publicClass; private myPrivateProperty: publicClass; } class <API key> { static <API key>: privateClass; private static <API key>: privateClass; myPublicProperty: privateClass; private myPrivateProperty: privateClass; } class <API key> { static <API key>: publicClass; private static <API key>: publicClass; myPublicProperty: publicClass; private myPrivateProperty: publicClass; } export var <API key>: privateClass; // Error export var <API key>: publicClass; var <API key>: privateClass; var <API key>: publicClass; export declare var <API key>: privateClass; // Error export declare var <API key>: publicClass; declare var <API key>: privateClass; declare var <API key>: publicClass; export interface <API key> { myProperty: privateModule.publicClass; // Error } export class <API key> { static <API key>: privateModule.publicClass; // Error myPublicProperty: privateModule.publicClass; // Error } export var <API key>: privateModule.publicClass; // Error export declare var <API key>: privateModule.publicClass; // Error interface <API key> { myProperty: privateModule.publicClass; } class <API key> { static <API key>: privateModule.publicClass; myPublicProperty: privateModule.publicClass; } var <API key>: privateModule.publicClass; declare var <API key>: privateModule.publicClass; export module publicModule { class privateClass { } export class publicClass { } export interface <API key> { myProperty: privateClass; // Error } export interface <API key> { myProperty: publicClass; } interface <API key> { myProperty: privateClass; } interface <API key> { myProperty: publicClass; } export class <API key> { static <API key>: privateClass; // Error private static <API key>: privateClass; myPublicProperty: privateClass; // Error private myPrivateProperty: privateClass; } export class <API key> { static <API key>: publicClass; private static <API key>: publicClass; myPublicProperty: publicClass; private myPrivateProperty: publicClass; } class <API key> { static <API key>: privateClass; private static <API key>: privateClass; myPublicProperty: privateClass; private myPrivateProperty: privateClass; } class <API key> { static <API key>: publicClass; private static <API key>: publicClass; myPublicProperty: publicClass; private myPrivateProperty: publicClass; } export var <API key>: privateClass; // Error export var <API key>: publicClass; var <API key>: privateClass; var <API key>: publicClass; export declare var <API key>: privateClass; // Error export declare var <API key>: publicClass; declare var <API key>: privateClass; declare var <API key>: publicClass; export interface <API key> { myProperty: privateModule.publicClass; // Error } export class <API key> { static <API key>: privateModule.publicClass; // Error myPublicProperty: privateModule.publicClass; // Error } export var <API key>: privateModule.publicClass; // Error export declare var <API key>: privateModule.publicClass; // Error interface <API key> { myProperty: privateModule.publicClass; } class <API key> { static <API key>: privateModule.publicClass; myPublicProperty: privateModule.publicClass; } var <API key>: privateModule.publicClass; declare var <API key>: privateModule.publicClass; } module privateModule { class privateClass { } export class publicClass { } export interface <API key> { myProperty: privateClass; } export interface <API key> { myProperty: publicClass; } interface <API key> { myProperty: privateClass; } interface <API key> { myProperty: publicClass; } export class <API key> { static <API key>: privateClass; private static <API key>: privateClass; myPublicProperty: privateClass; private myPrivateProperty: privateClass; } export class <API key> { static <API key>: publicClass; private static <API key>: publicClass; myPublicProperty: publicClass; private myPrivateProperty: publicClass; } class <API key> { static <API key>: privateClass; private static <API key>: privateClass; myPublicProperty: privateClass; private myPrivateProperty: privateClass; } class <API key> { static <API key>: publicClass; private static <API key>: publicClass; myPublicProperty: publicClass; private myPrivateProperty: publicClass; } export var <API key>: privateClass; export var <API key>: publicClass; var <API key>: privateClass; var <API key>: publicClass; export declare var <API key>: privateClass; export declare var <API key>: publicClass; declare var <API key>: privateClass; declare var <API key>: publicClass; export interface <API key> { myProperty: privateModule.publicClass; } export class <API key> { static <API key>: privateModule.publicClass; myPublicProperty: privateModule.publicClass; } export var <API key>: privateModule.publicClass; export declare var <API key>: privateModule.publicClass; interface <API key> { myProperty: privateModule.publicClass; } class <API key> { static <API key>: privateModule.publicClass; myPublicProperty: privateModule.publicClass; } var <API key>: privateModule.publicClass; declare var <API key>: privateModule.publicClass; } / [<API key>.ts] class publicClassInGlobal { } interface <API key> { myProperty: publicClassInGlobal; } class <API key> { static <API key>: publicClassInGlobal; private static <API key>: publicClassInGlobal; myPublicProperty: publicClassInGlobal; private myPrivateProperty: publicClassInGlobal; } var <API key>: publicClassInGlobal; declare var <API key>: publicClassInGlobal; module <API key> { class privateClass { } export class publicClass { } module privateModule { class privateClass { } export class publicClass { } export interface <API key> { myProperty: privateClass; } export interface <API key> { myProperty: publicClass; } interface <API key> { myProperty: privateClass; } interface <API key> { myProperty: publicClass; } export class <API key> { static <API key>: privateClass; private static <API key>: privateClass; myPublicProperty: privateClass; private myPrivateProperty: privateClass; } export class <API key> { static <API key>: publicClass; private static <API key>: publicClass; myPublicProperty: publicClass; private myPrivateProperty: publicClass; } class <API key> { static <API key>: privateClass; private static <API key>: privateClass; myPublicProperty: privateClass; private myPrivateProperty: privateClass; } class <API key> { static <API key>: publicClass; private static <API key>: publicClass; myPublicProperty: publicClass; private myPrivateProperty: publicClass; } export var <API key>: privateClass; export var <API key>: publicClass; var <API key>: privateClass; var <API key>: publicClass; export declare var <API key>: privateClass; export declare var <API key>: publicClass; declare var <API key>: privateClass; declare var <API key>: publicClass; export interface <API key> { myProperty: privateModule.publicClass; } export class <API key> { static <API key>: privateModule.publicClass; myPublicProperty: privateModule.publicClass; } export var <API key>: privateModule.publicClass; export declare var <API key>: privateModule.publicClass; interface <API key> { myProperty: privateModule.publicClass; } class <API key> { static <API key>: privateModule.publicClass; myPublicProperty: privateModule.publicClass; } var <API key>: privateModule.publicClass; declare var <API key>: privateModule.publicClass; } export interface <API key> { myProperty: privateClass; // Error } export interface <API key> { myProperty: publicClass; } interface <API key> { myProperty: privateClass; } interface <API key> { myProperty: publicClass; } export class <API key> { static <API key>: privateClass; // Error private static <API key>: privateClass; myPublicProperty: privateClass; // Error private myPrivateProperty: privateClass; } export class <API key> { static <API key>: publicClass; private static <API key>: publicClass; myPublicProperty: publicClass; private myPrivateProperty: publicClass; } class <API key> { static <API key>: privateClass; private static <API key>: privateClass; myPublicProperty: privateClass; private myPrivateProperty: privateClass; } class <API key> { static <API key>: publicClass; private static <API key>: publicClass; myPublicProperty: publicClass; private myPrivateProperty: publicClass; } export var <API key>: privateClass; // Error export var <API key>: publicClass; var <API key>: privateClass; var <API key>: publicClass; export declare var <API key>: privateClass; // Error export declare var <API key>: publicClass; declare var <API key>: privateClass; declare var <API key>: publicClass; export interface <API key> { myProperty: privateModule.publicClass; // Error } export class <API key> { static <API key>: privateModule.publicClass; // Error myPublicProperty: privateModule.publicClass; // Error } export var <API key>: privateModule.publicClass; // Error export declare var <API key>: privateModule.publicClass; // Error interface <API key> { myProperty: privateModule.publicClass; } class <API key> { static <API key>: privateModule.publicClass; myPublicProperty: privateModule.publicClass; } var <API key>: privateModule.publicClass; declare var <API key>: privateModule.publicClass; } / [<API key>.js] var privateClass = (function () { function privateClass() { } return privateClass; })(); var publicClass = (function () { function publicClass() { } return publicClass; })(); exports.publicClass = publicClass; var <API key> = (function () { function <API key>() { } return <API key>; })(); exports.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); exports.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key>; var <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); exports.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key>; var publicModule; (function (publicModule) { var privateClass = (function () { function privateClass() { } return privateClass; })(); var publicClass = (function () { function publicClass() { } return publicClass; })(); publicModule.publicClass = publicClass; var <API key> = (function () { function <API key>() { } return <API key>; })(); publicModule.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); publicModule.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key>; var <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); publicModule.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key>; })(publicModule = exports.publicModule || (exports.publicModule = {})); var privateModule; (function (privateModule) { var privateClass = (function () { function privateClass() { } return privateClass; })(); var publicClass = (function () { function publicClass() { } return publicClass; })(); privateModule.publicClass = publicClass; var <API key> = (function () { function <API key>() { } return <API key>; })(); privateModule.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); privateModule.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key>; var <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); privateModule.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key>; })(privateModule || (privateModule = {})); / [<API key>.js] var publicClassInGlobal = (function () { function publicClassInGlobal() { } return publicClassInGlobal; })(); var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key>; var <API key>; (function (<API key>) { var privateClass = (function () { function privateClass() { } return privateClass; })(); var publicClass = (function () { function publicClass() { } return publicClass; })(); <API key>.publicClass = publicClass; var privateModule; (function (privateModule) { var privateClass = (function () { function privateClass() { } return privateClass; })(); var publicClass = (function () { function publicClass() { } return publicClass; })(); privateModule.publicClass = publicClass; var <API key> = (function () { function <API key>() { } return <API key>; })(); privateModule.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); privateModule.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key>; var <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); privateModule.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key>; })(privateModule || (privateModule = {})); var <API key> = (function () { function <API key>() { } return <API key>; })(); <API key>.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); <API key>.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key>; var <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); <API key>.<API key> = <API key>; var <API key> = (function () { function <API key>() { } return <API key>; })(); var <API key>; })(<API key> || (<API key> = {}));
package com.mindoo.domino.jna.internal.structs.compoundtext; import java.security.AccessController; import java.security.PrivilegedAction; import java.util.Arrays; import java.util.List; import com.mindoo.domino.jna.IAdaptable; import com.mindoo.domino.jna.internal.structs.BaseStructure; import com.sun.jna.Pointer; import com.sun.jna.Structure; /** * * This structure specifies the start of a "hot" region in a rich text field.<br> * <br> * Clicking on a hot region causes some other action to occur.<br> * <br> * For instance, clicking on a popup will cause a block of text associated with that popup to be displayed. */ public class <API key> extends BaseStructure implements IAdaptable { // C type : WSIG */ public short Signature; /* ORed with WORDRECORDLENGTH */ public short Length; /* (length is inclusive with this struct) */ public short Type; public int Flags; public short DataLength; public <API key>() { super(); } public static <API key> newInstance() { return AccessController.doPrivileged(new PrivilegedAction<<API key>>() { @Override public <API key> run() { return new <API key>(); } }); } protected List<String> getFieldOrder() { return Arrays.asList("Signature", "Length", "Type", "Flags", "DataLength"); } public <API key>(Pointer peer) { super(peer); } public static <API key> newInstance(final Pointer peer) { return AccessController.doPrivileged(new PrivilegedAction<<API key>>() { @Override public <API key> run() { return new <API key>(peer); } }); } public static class ByReference extends <API key> implements Structure.ByReference { }; public static class ByValue extends <API key> implements Structure.ByValue { } @Override public <T> T getAdapter(Class<T> clazz) { if (clazz == <API key>.class) { return (T) this; } return null; } }
<md-toolbar class="md-warn"> <div class="md-toolbar-tools"> <h2 class="md-flex">Hello there, we are using websockets!</h2> </div> </md-toolbar> <md-content id="start-message" layout-padding> <span class="md-display-2"> Visit us on Github: <a href="https://github.com/TTTee/webmind">Webmind</a> </span> </md-content>
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc --> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>squidpony.panel Class Hierarchy (squidlib-util 3.0.0-SNAPSHOT)</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="squidpony.panel Class Hierarchy (squidlib-util 3.0.0-SNAPSHOT)"; } } 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="../../index-files/index-1.html">Index</a></li> <li><a href="../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../squidpony/annotation/package-tree.html">Prev</a></li> <li><a href="../../squidpony/squidai/package-tree.html">Next</a></li> </ul> <ul class="navList"> <li><a href="../../index.html?squidpony/panel/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 squidpony.panel</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="http://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">squidpony.panel.<a href="../../squidpony/panel/IColoredString.Bucket.html" title="class in squidpony.panel"><span class="typeNameLink">IColoredString.Bucket</span></a>&lt;T&gt;</li> <li type="circle">squidpony.panel.<a href="../../squidpony/panel/IColoredString.Impl.html" title="class in squidpony.panel"><span class="typeNameLink">IColoredString.Impl</span></a>&lt;T&gt; (implements squidpony.panel.<a href="../../squidpony/panel/IColoredString.html" title="interface in squidpony.panel">IColoredString</a>&lt;T&gt;)</li> <li type="circle">squidpony.panel.<a href="../../squidpony/panel/ICombinedPanel.Impl.html" title="class in squidpony.panel"><span class="typeNameLink">ICombinedPanel.Impl</span></a>&lt;T&gt; (implements squidpony.panel.<a href="../../squidpony/panel/ICombinedPanel.html" title="interface in squidpony.panel">ICombinedPanel</a>&lt;T&gt;)</li> <li type="circle">squidpony.panel.<a href="../../squidpony/panel/IMarkup.StringMarkup.html" title="class in squidpony.panel"><span class="typeNameLink">IMarkup.StringMarkup</span></a> (implements squidpony.panel.<a href="../../squidpony/panel/IMarkup.html" title="interface in squidpony.panel">IMarkup</a>&lt;T&gt;)</li> </ul> </li> </ul> <h2 title="Interface Hierarchy">Interface Hierarchy</h2> <ul> <li type="circle">squidpony.panel.<a href="../../squidpony/panel/ICombinedPanel.html" title="interface in squidpony.panel"><span class="typeNameLink">ICombinedPanel</span></a>&lt;T&gt;</li> <li type="circle">squidpony.panel.<a href="../../squidpony/panel/IMarkup.html" title="interface in squidpony.panel"><span class="typeNameLink">IMarkup</span></a>&lt;T&gt;</li> <li type="circle">squidpony.panel.<a href="../../squidpony/panel/ISquidPanel.html" title="interface in squidpony.panel"><span class="typeNameLink">ISquidPanel</span></a>&lt;T&gt;</li> <li type="circle">java.lang.<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang"><span class="typeNameLink">Iterable</span></a>&lt;T&gt; <ul> <li type="circle">squidpony.panel.<a href="../../squidpony/panel/IColoredString.html" title="interface in squidpony.panel"><span class="typeNameLink">IColoredString</span></a>&lt;T&gt;</li> </ul> </li> </ul> <h2 title="Enum Hierarchy">Enum Hierarchy</h2> <ul> <li type="circle">java.lang.<a href="http://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="http: <ul> <li type="circle">squidpony.panel.<a href="../../squidpony/panel/ICombinedPanel.What.html" title="enum in squidpony.panel"><span class="typeNameLink">ICombinedPanel.What</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="../../index-files/index-1.html">Index</a></li> <li><a href="../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../squidpony/annotation/package-tree.html">Prev</a></li> <li><a href="../../squidpony/squidai/package-tree.html">Next</a></li> </ul> <ul class="navList"> <li><a href="../../index.html?squidpony/panel/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>Copyright & </body> </html>
package com.taoswork.tallybook.business.dataservice.tallyuser.service.userdetails; import com.taoswork.tallybook.business.datadomain.tallyuser.AccountStatus; import com.taoswork.tallybook.business.datadomain.tallyuser.FacetType; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.User; import java.util.Collection; public abstract class FacetDetails extends User { protected final PersonDetails personDetails; protected final FacetType facetType; protected final Long facetId; public FacetDetails(PersonDetails personDetails, FacetType facetType, Long facetId, String facetName, String password, AccountStatus accountStatus, Collection<? extends GrantedAuthority> authorities) { super(facetName, password, accountStatus.isEnabled(), accountStatus.checkNowIfExpired(), true, !accountStatus.isLocked(), authorities); this.personDetails = personDetails; this.facetType = facetType; this.facetId = facetId; } public PersonDetails getPersonDetails() { return personDetails; } public FacetType getFacetType() { return facetType; } public Long getFacetId() { return facetId; } }
# AUTOGENERATED FILE FROM balenalib/aarch64-fedora:34-build ENV NODE_VERSION 16.14.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 keyserver.ubuntu.com --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 \
package com.acme.osgi; import java.util.Dictionary; import java.util.Hashtable; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.ContextHandler; import org.eclipse.jetty.webapp.WebAppContext; import org.osgi.framework.Bundle; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.framework.BundleException; import org.osgi.framework.FrameworkUtil; import org.osgi.framework.ServiceRegistration; import org.osgi.util.tracker.BundleTracker; /** * Bootstrap a webapp * * */ public class Activator implements BundleActivator { /** * * @param context */ public void start(BundleContext context) throws Exception { WebAppContext webapp = new WebAppContext(); Dictionary props = new Hashtable(); props.put("war","."); props.put("contextPath","/acme"); //uiProps.put(OSGiServerConstants.<API key>, serverName); context.registerService(ContextHandler.class.getName(),webapp,props); } /** * Stop the activator. * * @see * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) */ public void stop(BundleContext context) throws Exception { } }
A generator for Apache Cordova CLI 3.x ## Getting Started What is Yeoman? Trick question. It's not a thing. It's this guy: ![](http://i.imgur.com/JHaAlBJ.png) Basically, he wears a top hat, lives in your computer, and waits for you to tell him what kind of application you wish to create. Not every new computer comes with a Yeoman pre-installed. He lives in the [npm](https://npmjs.org) package repository. You only have to ask for him once, then he packs up and moves into your hard drive. *Make sure you clean up, he likes new and shiny things.* $ npm install -g yo If npm is down, you are npm help @ [scalenpm.org](https://scalenpm.org) Yeoman Generators Yeoman travels light. He didn't pack any generators when he moved in. You can think of a generator like a plug-in. You get to choose what type of application you wish to create, such as a Backbone application or even a Chrome extension. To install <API key> from npm, run: $ npm install -g <API key> If npm is down, you are npm help @ [scalenpm.org](https://scalenpm.org) Finally, initiate the generator: $ yo cordovacli Then what? Run `grunt --help` to see available tasks Here are a few options: $ grunt build $ grunt server (build, emulate, watch) $ grunt emulate $ grunt demo Platforms Supported: Android (Linux, OSX, Windows) iOS (OSX) BlackBerry 10 (OSX, Windows) Windows Phone 8 (Windows) Windows 8 (Windows) Plugins Supported: Apache Cordova Core Plugins Additional plugins can be added by editing the grunt-cordovacli task in the Grunfile.js Getting To Know Yeoman Yeoman has a heart of gold. He's a person with feelings and opinions, but he's very easy to work with. If you think he's too opinionated, he can be easily convinced. If you'd like to get to know Yeoman better and meet some of his friends, [Grunt](http: [Apache-2.0](./LICENSE-Apache-2.0)
package java2bash.java2bash.commands.simple; public enum TextStyle { BLACK("$(tput setaf 0)"), RED("$(tput setaf 1)"), GREEN("$(tput setaf 2)"), YELLOW("$(tput setaf 3)"), BLUE("$(tput setaf 4)"), PURPLE("$(tput setaf 5)"), CYAN("$(tput setaf 6)"), WHITE("$(tput setaf 7)"), BLACK_BG("$(tput setab 0)"), RED_BG("$(tput setab 1)"), GREEN_BG("$(tput setab 2)"), YELLOW_BG("$(tput setab 3)"), BLUE_BG("$(tput setab 4)"), PURPLE_BG("$(tput setab 5)"), CYAN_BG("$(tput setab 6)"), WHITE_BG("$(tput setab 7)"), DIM("$(tput dim)"), REVERSE("$(tput rev)"), CLEAR_SCREEN("$(tput clear)"), UP_ONE_LINE("$(tput cuu1)"), BOLD("$(tput bold)"), UNDERLINE("$(tput smul)"), UNDERLINE_OFF("$(tput rmul)"), CLEAR_TO_EOL("$(tput el)"), CLEAR_TILL_EOL("$'\\x1B[K'"), // To handle trailing background colors in new lines RESET("$(tput sgr0)"); private String bashVariable; private TextStyle(String bashVariable) { this.bashVariable = bashVariable; } public String getBashVariable() { return bashVariable; } }
package com.bya.curator.atomicinteger; import org.apache.curator.RetryPolicy; import org.apache.curator.framework.CuratorFramework; import org.apache.curator.framework.<API key>; import org.apache.curator.framework.recipes.atomic.AtomicValue; import org.apache.curator.framework.recipes.atomic.<API key>; import org.apache.curator.retry.<API key>; import org.apache.curator.retry.RetryNTimes; public class <API key> { /** zookeeper */ static final String CONNECT_ADDR = "192.16.30.46:2181,192.16.30.52:2181,192.16.30.54:2181"; /** session */ static final int SESSION_OUTTIME = 5000; public static void main(String[] args) throws Exception { //1 1s 10 RetryPolicy retryPolicy = new <API key>(1000, 10); CuratorFramework cf = <API key>.builder() .connectString(CONNECT_ADDR) .sessionTimeoutMs(SESSION_OUTTIME) .retryPolicy(retryPolicy) .build(); cf.start(); //cf.delete().forPath("/super"); //4 DistributedAtomicInteger <API key> atomicIntger = new <API key>(cf, "/super", new RetryNTimes(3, 1000)); AtomicValue<Integer> value = atomicIntger.add(1); System.out.println(value.succeeded()); System.out.println(""+value.postValue()); System.out.println(""+value.preValue()); } }
package com.vmware.vim25; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "returnval" }) @XmlRootElement(name = "<API key>") public class <API key> { @XmlElement(required = true) protected HostConnectInfo returnval; /** * Gets the value of the returnval property. * * @return * possible object is * {@link HostConnectInfo } * */ public HostConnectInfo getReturnval() { return returnval; } /** * Sets the value of the returnval property. * * @param value * allowed object is * {@link HostConnectInfo } * */ public void setReturnval(HostConnectInfo value) { this.returnval = value; } }
from .. import parser, IniConfigFile from insights.specs import ceilometer_conf @parser(ceilometer_conf) class CeilometerConf(IniConfigFile): """ A dict of the content of the ``ceilometer.conf`` configuration file. Example selection of dictionary contents:: { "DEFAULT": { "http_timeout":"600", "debug": "False" }, "api": { "port":"8877", }, } """ pass
menu: main: parent: "Exporting Metrics (Surfacers)" weight: 30 title: "Stackdriver (Google Cloud Monitoring)" date: 2020-11-01T17:24:32-07:00 Cloudprober can natively export metrics to Google Cloud Monitoring (formerly, Stackdriver) using stackdriver [surfacer](/surfacers/overview). Adding stackdriver surfacer to cloudprober is as simple as adding the following stanza to the config: surfacer { type: STACKDRIVER } This config will work if you're running on GCP and your VM (or GKE pod) has access to Cloud Monitoring (Stackdriver). If running on any other platform, you'll have to specify the GCP project where you want to send the metrics, and you'll have to configure your environment for [Google Application Default Credentials](https://cloud.google.com/docs/authentication/production#automatically). By default, stackdriver surfacer exports metrics with the following prefix: `custom.googleapis.com/cloudprober/<probe-type>/<probe>`. For example, for HTTP probe named `google_com`, standard metrics will be exported as: custom.googleapis.com/cloudprober/http/google_com/total custom.googleapis.com/cloudprober/http/google_com/success custom.googleapis.com/cloudprober/http/google_com/failure custom.googleapis.com/cloudprober/http/google_com/latency Here are all the config options for stackdriver surfacer: protobuf // GCP project name for stackdriver. If not specified and running on GCP, // local project is used. optional string project = 1; // If <API key> is specified, only metrics matching the given // regular expression will be exported to stackdriver. Since probe type and // probe name are part of the metric name, you can use this field to restrict // stackdriver metrics to a particular probe. // Example: // <API key>: ".*(http|ping).*(success|validation_failure).*" optional string <API key> = 3; // Monitoring URL base. Full metric URL looks like the following: // <monitoring_url>/<ptype>/<probe>/<metric> // Example: // custom.googleapis.com/cloudprober/http/google-homepage/latency optional string monitoring_url = 4 [default = "custom.googleapis.com/cloudprober/"]; (Source: https://github.com/google/cloudprober/blob/master/surfacers/stackdriver/proto/config.proto) For example, you can configure stackdriver surfacer to export only metrics that match a specific regex: protobuf surfacer { <API key> { # Export only "http" probe metrics. <API key>: ".*\\/http\\/.*" } } ## Accessing the data Cloudprober exports metrics to stackdriver as [custom metrics](https: However, stackdriver now provides a powerful monitoring query language,[MQL](https://cloud.google.com/monitoring/mql), using which we can get more useful metrics. MQL to get failure ratio: shell fetch global | { metric 'custom.googleapis.com/cloudprober/http/google_com/failure' ; metric 'custom.googleapis.com/cloudprober/http/google_com/total' } | align delta(1m) | join | div MQL to get average latency for a probe: shell fetch global | { metric 'custom.googleapis.com/cloudprober/http/google_com/latency' ; metric 'custom.googleapis.com/cloudprober/http/google_com/success' } | align delta(1m) | join | div You can use MQL to create graphs and generate alerts. Note that in the examples here we are fetching from the "global" source (_fetch global_); if you're running on GCP, you can improve performance of your queries by specifying the "gce_instance" resource type: _fetch gce_instance_.
code: true type: page title: searchProfiles description: Security:searchProfiles # searchProfiles Search for security profiles, optionally returning only those linked to the provided list of security roles. ## searchProfiles(filters, [options], callback) | Arguments | Type | Description | | | `filters` | JSON Object | Search query | | `options` | JSON Object | Optional parameters | | `callback` | function | Callback handling the response | ## Options | Option | Type | Description | Default | | | `from` | number | Starting offset | `0` | | `queuable` | boolean | Make this request queuable or not | `true` | | `scroll` | string | Start a scroll session, with a time to live equals to this parameter's value following the [Elastisearch time format](https://www.elastic.co/guide/en/elasticsearch/reference/5.0/common-options.html#time-units) | `undefined` | | `size` | integer | Number of hits to return per page | `10` | ## Filters | Filter | Type | Description | Default | | | `roles` | array | Contains an array `roles` with a list of role id | `[]` | ## Callback Response Returns a JSON Object ## Usage ./snippets/search-profiles-1.java > Callback response: json { "total": 124, "profiles": [ // array of Profile objects ], // only if a scroll parameter has been provided "scrollId": "<scroll identifier>" }
package com.blacar.apps.preveges.domain.util; import java.sql.Types; import org.hibernate.dialect.H2Dialect; public class FixedH2Dialect extends H2Dialect { public FixedH2Dialect() { super(); registerColumnType( Types.FLOAT, "real" ); } }
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE html PUBLIC "- <html> <head> <title>TaskContext - Spark Project Core 1.6.1 API - org.apache.spark.TaskContext</title> <meta name="description" content="TaskContext - Spark Project Core 1.6.1 API - org.apache.spark.TaskContext" /> <meta name="keywords" content="TaskContext Spark Project Core 1.6.1 API org.apache.spark.TaskContext" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <link href="../../../lib/template.css" media="screen" type="text/css" rel="stylesheet" /> <link href="../../../lib/diagrams.css" media="screen" type="text/css" rel="stylesheet" id="diagrams-css" /> <script type="text/javascript"> if(top === self) { var url = '../../../index.html'; var hash = 'org.apache.spark.TaskContext$'; var anchor = window.location.hash; var anchor_opt = ''; if (anchor.length >= 1) anchor_opt = '@' + anchor.substring(1); window.location.href = url + '#' + hash + anchor_opt; } </script> </head> <body class="value"> <div id="definition"> <a href="TaskContext.html" title="Go to companion"><img src="../../../lib/object_to_class_big.png" /></a> <p id="owner"><a href="../../package.html" class="extype" name="org">org</a>.<a href="../package.html" class="extype" name="org.apache">apache</a>.<a href="package.html" class="extype" name="org.apache.spark">spark</a></p> <h1><a href="TaskContext.html" title="Go to companion">TaskContext</a></h1> </div> <h4 id="signature" class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">object</span> </span> <span class="symbol"> <span class="name">TaskContext</span><span class="result"> extends <span class="extype" name="scala.Serializable">Serializable</span></span> </span> </h4> <div id="comment" class="fullcommenttop"><div class="toggleContainer block"> <span class="toggle">Linear Supertypes</span> <div class="superTypes hiddenContent"><span class="extype" name="scala.Serializable">Serializable</span>, <span class="extype" name="java.io.Serializable">Serializable</span>, <span class="extype" name="scala.AnyRef">AnyRef</span>, <span class="extype" name="scala.Any">Any</span></div> </div></div> <div id="mbrsel"> <div id="textfilter"><span class="pre"></span><span class="input"><input id="mbrsel-input" type="text" accesskey="/" /></span><span class="post"></span></div> <div id="order"> <span class="filtertype">Ordering</span> <ol> <li class="alpha in"><span>Alphabetic</span></li> <li class="inherit out"><span>By inheritance</span></li> </ol> </div> <div id="ancestors"> <span class="filtertype">Inherited<br /> </span> <ol id="linearization"> <li class="in" name="org.apache.spark.TaskContext"><span>TaskContext</span></li><li class="in" name="scala.Serializable"><span>Serializable</span></li><li class="in" name="java.io.Serializable"><span>Serializable</span></li><li class="in" name="scala.AnyRef"><span>AnyRef</span></li><li class="in" name="scala.Any"><span>Any</span></li> </ol> </div><div id="ancestors"> <span class="filtertype"></span> <ol> <li class="hideall out"><span>Hide All</span></li> <li class="showall in"><span>Show all</span></li> </ol> <a href="http://docs.scala-lang.org/overviews/scaladoc/usage.html#members" target="_blank">Learn more about member selection</a> </div> <div id="visbl"> <span class="filtertype">Visibility</span> <ol><li class="public in"><span>Public</span></li><li class="all out"><span>All</span></li></ol> </div> </div> <div id="template"> <div id="allMembers"> <div id="values" class="values members"> <h3>Value Members</h3> <ol><li name="scala.AnyRef#!=" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="!=(x$1:AnyRef):Boolean"></a> <a id="!=(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $bang$eq" class="name">!=</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.Any#!=" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="!=(x$1:Any):Boolean"></a> <a id="!=(Any):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $bang$eq" class="name">!=</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.AnyRef###" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="##():Int"></a> <a id="##():Int"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $hash$hash" class="name">##</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.AnyRef#==" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="==(x$1:AnyRef):Boolean"></a> <a id="==(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $eq$eq" class="name">==</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.Any#==" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="==(x$1:Any):Boolean"></a> <a id="==(Any):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span title="gt4s: $eq$eq" class="name">==</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.Any#asInstanceOf" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="asInstanceOf[T0]:T0"></a> <a id="asInstanceOf[T0]:T0"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">asInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="result">: <span class="extype" name="scala.Any.asInstanceOf.T0">T0</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.AnyRef#clone" visbl="prt" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="clone():Object"></a> <a id="clone():AnyRef"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">clone</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.AnyRef">AnyRef</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a href="../../../java$lang.html" class="extype" name="java.lang">java.lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">(<span> <span class="defval" name="classOf[java.lang.<API key>]">...</span> </span>)</span> </dd></dl></div> </li><li name="scala.AnyRef#eq" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="eq(x$1:AnyRef):Boolean"></a> <a id="eq(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">eq</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#equals" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="equals(x$1:Any):Boolean"></a> <a id="equals(Any):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">equals</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.AnyRef#finalize" visbl="prt" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="finalize():Unit"></a> <a id="finalize():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">finalize</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a href="../../../java$lang.html" class="extype" name="java.lang">java.lang</a>] </dd><dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">(<span> <span class="symbol">classOf[java.lang.Throwable]</span> </span>)</span> </dd></dl></div> </li><li name="org.apache.spark.TaskContext#get" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="get():org.apache.spark.TaskContext"></a> <a id="get():TaskContext"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">get</span><span class="params">()</span><span class="result">: <a href="TaskContext.html" class="extype" name="org.apache.spark.TaskContext">TaskContext</a></span> </span> </h4> <p class="shortcomment cmt">Return the currently active TaskContext.</p><div class="fullcomment"><div class="comment cmt"><p>Return the currently active TaskContext. This can be called inside of user functions to access contextual information about running tasks. </p></div></div> </li><li name="scala.AnyRef#getClass" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="getClass():Class[_]"></a> <a id="getClass():Class[_]"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">getClass</span><span class="params">()</span><span class="result">: <span class="extype" name="java.lang.Class">Class</span>[_]</span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="org.apache.spark.TaskContext#getPartitionId" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="getPartitionId():Int"></a> <a id="getPartitionId():Int"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">getPartitionId</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span> </span> </h4> <p class="shortcomment cmt">Returns the partition id of currently active TaskContext.</p><div class="fullcomment"><div class="comment cmt"><p>Returns the partition id of currently active TaskContext. It will return 0 if there is no active TaskContext for cases like local execution. </p></div></div> </li><li name="scala.AnyRef#hashCode" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="hashCode():Int"></a> <a id="hashCode():Int"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">hashCode</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="scala.Any#isInstanceOf" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="isInstanceOf[T0]:Boolean"></a> <a id="isInstanceOf[T0]:Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">isInstanceOf</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>Any</dd></dl></div> </li><li name="scala.AnyRef#ne" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="ne(x$1:AnyRef):Boolean"></a> <a id="ne(AnyRef):Boolean"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">ne</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.AnyRef">AnyRef</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#notify" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="notify():Unit"></a> <a id="notify():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">notify</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#notifyAll" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="notifyAll():Unit"></a> <a id="notifyAll():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">notifyAll</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="org.apache.spark.TaskContext#setTaskContext" visbl="prt" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="setTaskContext(tc:org.apache.spark.TaskContext):Unit"></a> <a id="setTaskContext(TaskContext):Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">setTaskContext</span><span class="params">(<span name="tc">tc: <a href="TaskContext.html" class="extype" name="org.apache.spark.TaskContext">TaskContext</a></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <p class="shortcomment cmt">Set the thread local TaskContext.</p><div class="fullcomment"><div class="comment cmt"><p>Set the thread local TaskContext. Internal to Spark. </p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a href="package.html" class="extype" name="org.apache.spark">org.apache.spark</a>] </dd></dl></div> </li><li name="scala.AnyRef#synchronized" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="synchronized[T0](x$1:=&gt;T0):T0"></a> <a id="synchronized[T0](⇒T0):T0"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">synchronized</span><span class="tparams">[<span name="T0">T0</span>]</span><span class="params">(<span name="arg0">arg0: ⇒ <span class="extype" name="java.lang.AnyRef.synchronized.T0">T0</span></span>)</span><span class="result">: <span class="extype" name="java.lang.AnyRef.synchronized.T0">T0</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd></dl></div> </li><li name="scala.AnyRef#toString" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="toString():String"></a> <a id="toString():String"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">toString</span><span class="params">()</span><span class="result">: <span class="extype" name="java.lang.String">String</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef → Any</dd></dl></div> </li><li name="org.apache.spark.TaskContext#unset" visbl="prt" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="unset():Unit"></a> <a id="unset():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier"></span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">unset</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <p class="shortcomment cmt">Unset the thread local TaskContext.</p><div class="fullcomment"><div class="comment cmt"><p>Unset the thread local TaskContext. Internal to Spark. </p></div><dl class="attributes block"> <dt>Attributes</dt><dd>protected[<a href="package.html" class="extype" name="org.apache.spark">org.apache.spark</a>] </dd></dl></div> </li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="wait():Unit"></a> <a id="wait():Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">wait</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">(<span> <span class="defval" name="classOf[java.lang.<API key>]">...</span> </span>)</span> </dd></dl></div> </li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="wait(x$1:Long,x$2:Int):Unit"></a> <a id="wait(Long,Int):Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">wait</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Long">Long</span></span>, <span name="arg1">arg1: <span class="extype" name="scala.Int">Int</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">(<span> <span class="defval" name="classOf[java.lang.<API key>]">...</span> </span>)</span> </dd></dl></div> </li><li name="scala.AnyRef#wait" visbl="pub" data-isabs="false" fullComment="yes" group="Ungrouped"> <a id="wait(x$1:Long):Unit"></a> <a id="wait(Long):Unit"></a> <h4 class="signature"> <span class="modifier_kind"> <span class="modifier">final </span> <span class="kind">def</span> </span> <span class="symbol"> <span class="name">wait</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Long">Long</span></span>)</span><span class="result">: <span class="extype" name="scala.Unit">Unit</span></span> </span> </h4> <div class="fullcomment"><dl class="attributes block"> <dt>Definition Classes</dt><dd>AnyRef</dd><dt>Annotations</dt><dd> <span class="name">@throws</span><span class="args">(<span> <span class="defval" name="classOf[java.lang.<API key>]">...</span> </span>)</span> </dd></dl></div> </li></ol> </div> </div> <div id="inheritedMembers"> <div class="parent" name="scala.Serializable"> <h3>Inherited from <span class="extype" name="scala.Serializable">Serializable</span></h3> </div><div class="parent" name="java.io.Serializable"> <h3>Inherited from <span class="extype" name="java.io.Serializable">Serializable</span></h3> </div><div class="parent" name="scala.AnyRef"> <h3>Inherited from <span class="extype" name="scala.AnyRef">AnyRef</span></h3> </div><div class="parent" name="scala.Any"> <h3>Inherited from <span class="extype" name="scala.Any">Any</span></h3> </div> </div> <div id="groupedMembers"> <div class="group" name="Ungrouped"> <h3>Ungrouped</h3> </div> </div> </div> <div id="tooltip"></div> <div id="footer"> </div> <script defer="defer" type="text/javascript" id="jquery-js" src="../../../lib/jquery.js"></script><script defer="defer" type="text/javascript" id="jquery-ui-js" src="../../../lib/jquery-ui.js"></script><script defer="defer" type="text/javascript" id="tools-tooltip-js" src="../../../lib/tools.tooltip.js"></script><script defer="defer" type="text/javascript" id="template-js" src="../../../lib/template.js"></script> </body> </html>
package org.jpc.term; import java.util.ArrayList; import java.util.List; import org.jpc.engine.dialect.Dialect; import org.jpc.engine.prolog.OperatorsContext; import org.jpc.term.visitor.TermVisitor; import org.jpc.util.salt.TermContentHandler; import java.util.function.Function; /** * An abstract Prolog variable. * @author sergioc * */ public abstract class AbstractVar extends Term { public abstract boolean isAnonymous(); public abstract String getName(); @Override public boolean isGround() { return false; } /** * @return the variables names present in the term. */ public static List<String> getVariableNames(List<AbstractVar> vars) { List<String> names = new ArrayList<>(); for(AbstractVar var : vars) { names.add(var.getName()); } return names; } @Override public boolean hasFunctor(Functor functor) { return functor.getArity() == 0 && termEquals(functor.getName()); } @Override public void accept(TermVisitor termVisitor) { termVisitor.visitVariable(this); } @Override protected void basicRead(TermContentHandler contentHandler, Function<Term, Term> termExpander) { contentHandler.startVariable(getName()); } /** * Returns a Prolog source text representation of this Variable * * @return a Prolog source text representation of this Variable */ @Override public String toEscapedString(Dialect dialect, OperatorsContext operatorsContext) { return getName(); } /** * A Variable is equal to another if their names are the same and they are not anonymous. * * @param obj The Object to compare. * @return true if the Object is a Variable and the above condition apply. */ @Override public boolean equals(Object obj) { try { return !isAnonymous() && termEquals((Term) obj); } catch(ClassCastException e) { return false; } } }
name 'pgsql' version '0.1' maintainer 'Gleb M Borisov' maintainer_email 'borisov.gleb@gmail.com' license 'Apache 2.0' description 'Installs and configures postgresql for clients or servers' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) recipe 'postgresql', 'Includes postgresql::client' recipe 'postgresql::client', 'Installs postgresql client package(s)' recipe 'postgresql::server', 'Installs postgresql server packages, templates' recipe 'postgresql::server_debian', 'Installs postgresql server packages, debian family style' recipe 'postgresql::setup', 'Create users/databases from data bags' supports 'ubuntu' depends 'apt' depends 'database' depends 'openssl'
## Treebank Statistics (UD_English-ESL) This relation is universal. 142 nodes (0%) are attached to their parents as `name`. 142 instances of `name` (100%) are left-to-right (parent precedes child). Average distance between parent and child is 1.01408450704225. The following 1 pairs of parts of speech are connected with `name`: [en-pos/PROPN]()-[en-pos/PROPN]() (142; 100% instances). conllu # visual-style 5 bgColor:blue # visual-style 5 fgColor:white # visual-style 4 bgColor:blue # visual-style 4 fgColor:white # visual-style 4 5 name color:blue 1 _ _ VERB VB _ 0 root _ _ 2 _ _ PRON PRP _ 1 dobj _ _ 3 _ _ PROPN NNP _ 4 compound _ _ 4 _ _ PROPN NNP _ 1 vocative _ _ 5 _ _ PROPN NNP _ 4 name _ _ 6 _ _ PUNCT , _ 1 punct _ _ 7 _ _ CONJ CC _ 1 cc _ _ 8 _ _ INTJ UH _ 9 discourse _ _ 9 _ _ VERB VB _ 1 conj _ _ 10 _ _ PRON PRP _ 9 dobj _ _ 11 _ _ ADV RB _ 9 advmod _ _ 12 _ _ PUNCT . _ 1 punct _ _
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8"> <title>name</title> <link href="../../../../images/logo-icon.svg" rel="icon" type="image/svg"> <script>var pathToRoot = "../../../../";</script> <script type="text/javascript" src="../../../../scripts/<API key>.js" async="async"></script> <link href="../../../../styles/style.css" rel="Stylesheet"> <link href="../../../../styles/logo-styles.css" rel="Stylesheet"> <link href="../../../../styles/jetbrains-mono.css" rel="Stylesheet"> <link href="../../../../styles/main.css" rel="Stylesheet"> <script type="text/javascript" src="../../../../scripts/clipboard.js" async="async"></script> <script type="text/javascript" src="../../../../scripts/navigation-loader.js" async="async"></script> <script type="text/javascript" src="../../../../scripts/<API key>.js" async="async"></script> <script type="text/javascript" src="../../../../scripts/main.js" async="async"></script> </head> <body> <div id="container"> <div id="leftColumn"> <div id="logo"></div> <div id="paneSearch"></div> <div id="sideMenu"></div> </div> <div id="main"> <div id="leftToggler"><span class="icon-toggler"></span></div> <script type="text/javascript" src="../../../../scripts/pages.js"></script> <script type="text/javascript" src="../../../../scripts/main.js"></script> <div class="main-content" id="content" pageIds="org.hexworks.zircon.internal.resource/ColorThemeResource.CHERRY_BEAR/name/#/<API key>//-755115832"> <div class="navigation-wrapper" id="navigation-wrapper"> <div class="breadcrumbs"><a href="../../../index.html">zircon.core</a>/<a href="../../index.html">org.hexworks.zircon.internal.resource</a>/<a href="../index.html">ColorThemeResource</a>/<a href="index.html">CHERRY_BEAR</a>/<a href="name.html">name</a></div> <div class="pull-right d-flex"> <div class="filter-section" id="filter-section"><button class="platform-tag platform-selector common-like" data-active="" data-filter=":zircon.core:dokkaHtml/commonMain">common</button></div> <div id="searchBar"></div> </div> </div> <div class="cover "> <h1 class="cover"><span>name</span></h1> </div> <div class="divergent-group" <API key>=":zircon.core:dokkaHtml/commonMain" data-filterable-set=":zircon.core:dokkaHtml/commonMain"><div class="with-platform-tags"><span class="pull-right"></span></div> <div> <div class="platform-hinted " <API key>="<API key>"><div class="content <API key>" data-active="" data-togglable=":zircon.core:dokkaHtml/commonMain"><div class="symbol monospace">val <a href="name.html">name</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html">String</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div> </div> </div> </div> <div class="footer"><span class="go-to-top-icon"><a href=" </div> </div> </body> </html>
package com.miya.masa.domain.model.todo; import java.time.LocalDateTime; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EntityListeners; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.ManyToOne; import javax.persistence.TableGenerator; import javax.persistence.Version; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.<API key>; import com.miya.masa.domain.model.user.User; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Entity @EntityListeners(<API key>.class) @Data @AllArgsConstructor @NoArgsConstructor public class Todo { @Id @GeneratedValue(strategy = GenerationType.TABLE, generator = "sequence") @TableGenerator( valueColumnName = "SEQUENCE_NO", pkColumnName = "TABLE_NAME", pkColumnValue = "TODO", table = "SEQUENCE", name = "sequence", allocationSize = 1) private Long id; @Column(name = "CODE", nullable = false, unique = true) private String code; @Column(name = "TODO", nullable = false) private String todo; @Column(name = "COMPLETE", nullable = false) private Boolean complete; @Column(name = "LIMIT_DATE") private LocalDateTime limitDate; @ManyToOne private User user; @CreatedDate private LocalDateTime createDate; @LastModifiedDate private LocalDateTime updateTime; @Version @Column(name = "VERSION", nullable = false) private Long version; }
# AUTOGENERATED FILE FROM balenalib/qemux86-64-alpine:3.12-build # remove several traces of python RUN apk del python* # > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. ENV LANG C.UTF-8 # key 63C7CC90: public key "Simon McVittie <smcv@pseudorandom.co.uk>" imported # key 3372DCFA: public key "Donald Stufft (dstufft) <donald@stufft.io>" imported RUN gpg --keyserver keyring.debian.org --recv-keys 4DE8FF2A63C7CC90 \ && gpg --keyserver keyserver.ubuntu.com --recv-key 6E3CBCE93372DCFA \ && gpg --keyserver keyserver.ubuntu.com --recv-keys 0x52a43a1e4b77b059 # point Python at a system-provided certificate database. Otherwise, we might hit <API key>. ENV SSL_CERT_FILE /etc/ssl/certs/ca-certificates.crt ENV PYTHON_VERSION 3.8.12 # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'" ENV PYTHON_PIP_VERSION 21.3.1 ENV SETUPTOOLS_VERSION 60.5.4 RUN set -x \ && curl -SLO "http://resin-packages.s3.amazonaws.com/python/v$PYTHON_VERSION/Python-$PYTHON_VERSION.<API key>.3.tar.gz" \ && echo "<SHA256-like> Python-$PYTHON_VERSION.<API key>.3.tar.gz" | sha256sum -c - \ && tar -xzf "Python-$PYTHON_VERSION.<API key>.3.tar.gz" --strip-components=1 \ && rm -rf "Python-$PYTHON_VERSION.<API key>.3.tar.gz" \ && if [ ! -e /usr/local/bin/pip3 ]; then : \ && curl -SLO "https://raw.githubusercontent.com/pypa/get-pip/<SHA1-like>/get-pip.py" \ && echo "<SHA256-like> get-pip.py" | sha256sum -c - \ && python3 get-pip.py \ && rm get-pip.py \ ; fi \ && pip3 install --no-cache-dir --upgrade --force-reinstall pip=="$PYTHON_PIP_VERSION" setuptools=="$SETUPTOOLS_VERSION" \ && find /usr/local \ \( -type d -a -name test -o -name tests \) \ -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \ -exec rm -rf '{}' + \ && cd / \ && rm -rf /usr/src/python ~/.cache # install "virtualenv", since the vast majority of users of this image will want it RUN pip3 install --no-cache-dir virtualenv ENV PYTHON_DBUS_VERSION 1.2.18 # install dbus-python dependencies RUN apk add --no-cache \ dbus-dev \ dbus-glib-dev # install dbus-python RUN set -x \ && mkdir -p /usr/src/dbus-python \ && curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz" -o dbus-python.tar.gz \ && curl -SL "http://dbus.freedesktop.org/releases/dbus-python/dbus-python-$PYTHON_DBUS_VERSION.tar.gz.asc" -o dbus-python.tar.gz.asc \ && gpg --verify dbus-python.tar.gz.asc \ && tar -xzC /usr/src/dbus-python --strip-components=1 -f dbus-python.tar.gz \ && rm dbus-python.tar.gz* \ && cd /usr/src/dbus-python \ && PYTHON_VERSION=$(expr match "$PYTHON_VERSION" '\([0-9]*\.[0-9]*\)') ./configure \ && make -j$(nproc) \ && make install -j$(nproc) \ && cd / \ && rm -rf /usr/src/dbus-python # make some useful symlinks that are expected to exist RUN cd /usr/local/bin \ && ln -sf pip3 pip \ && { [ -e easy_install ] || ln -s easy_install-* easy_install; } \ && ln -sf idle3 idle \ && ln -sf pydoc3 pydoc \ && ln -sf python3 python \ && ln -sf python3-config python-config CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"] RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/<SHA1-like>/scripts/assets/tests/test-stack@python.sh" \ && echo "Running test-stack@python" \ && chmod +x test-stack@python.sh \ && bash test-stack@python.sh \ && rm -rf test-stack@python.sh RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo $'Here are a few details about this Docker image (For more information please visit https: RUN echo $'#!/bin/bash\nbalena-info\nbusybox ln -sf /bin/busybox /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \ && chmod +x /bin/sh-shim \ && ln -f /bin/sh /bin/sh.real \ && ln -f /bin/sh-shim /bin/sh
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc --> <title>nl.esciencecenter.xenon.adaptors.filesystems.local Class Hierarchy (Xenon 2.2.0 API for Xenon developers)</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="nl.esciencecenter.xenon.adaptors.filesystems.local Class Hierarchy (Xenon 2.2.0 API for Xenon developers)"; } } 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 class="navBarCell1Rev">Tree</li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../../nl/esciencecenter/xenon/adaptors/filesystems/jclouds/package-tree.html">Prev</a></li> <li><a href="../../../../../../nl/esciencecenter/xenon/adaptors/filesystems/s3/package-tree.html">Next</a></li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?nl/esciencecenter/xenon/adaptors/filesystems/local/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 nl.esciencecenter.xenon.adaptors.filesystems.local</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.Object <ul> <li type="circle">nl.esciencecenter.xenon.adaptors.<a href="../../../../../../nl/esciencecenter/xenon/adaptors/Adaptor.html" title="class in nl.esciencecenter.xenon.adaptors"><span class="typeNameLink">Adaptor</span></a> (implements nl.esciencecenter.xenon.<a href="../../../../../../nl/esciencecenter/xenon/AdaptorDescription.html" title="interface in nl.esciencecenter.xenon">AdaptorDescription</a>) <ul> <li type="circle">nl.esciencecenter.xenon.adaptors.filesystems.<a href="../../../../../../nl/esciencecenter/xenon/adaptors/filesystems/FileAdaptor.html" title="class in nl.esciencecenter.xenon.adaptors.filesystems"><span class="typeNameLink">FileAdaptor</span></a> (implements nl.esciencecenter.xenon.filesystems.<a href="../../../../../../nl/esciencecenter/xenon/filesystems/<API key>.html" title="interface in nl.esciencecenter.xenon.filesystems"><API key></a>) <ul> <li type="circle">nl.esciencecenter.xenon.adaptors.filesystems.local.<a href="../../../../../../nl/esciencecenter/xenon/adaptors/filesystems/local/LocalFileAdaptor.html" title="class in nl.esciencecenter.xenon.adaptors.filesystems.local"><span class="typeNameLink">LocalFileAdaptor</span></a></li> </ul> </li> </ul> </li> <li type="circle">nl.esciencecenter.xenon.filesystems.<a href="../../../../../../nl/esciencecenter/xenon/filesystems/FileSystem.html" title="class in nl.esciencecenter.xenon.filesystems"><span class="typeNameLink">FileSystem</span></a> (implements java.lang.AutoCloseable) <ul> <li type="circle">nl.esciencecenter.xenon.adaptors.filesystems.local.<a href="../../../../../../nl/esciencecenter/xenon/adaptors/filesystems/local/LocalFileSystem.html" title="class in nl.esciencecenter.xenon.adaptors.filesystems.local"><span class="typeNameLink">LocalFileSystem</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 class="navBarCell1Rev">Tree</li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-all.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../../../../nl/esciencecenter/xenon/adaptors/filesystems/jclouds/package-tree.html">Prev</a></li> <li><a href="../../../../../../nl/esciencecenter/xenon/adaptors/filesystems/s3/package-tree.html">Next</a></li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?nl/esciencecenter/xenon/adaptors/filesystems/local/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> </body> </html>
<!DOCTYPE HTML PUBLIC "- <!--NewPage <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_20) on Thu Feb 24 01:10:11 PST 2011 --> <TITLE> Uses of Class org.apache.hadoop.mapred.lib.ChainReducer (Hadoop 0.20.2-cdh3u0-SNAPSHOT API) </TITLE> <META NAME="date" CONTENT="2011-02-24"> <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.mapred.lib.ChainReducer (Hadoop 0.20.2-cdh3u0-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/mapred/lib/ChainReducer.html" title="class in org.apache.hadoop.mapred.lib"><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/mapred/lib//<API key>.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="ChainReducer.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.mapred.lib.ChainReducer</B></H2> </CENTER> No usage of org.apache.hadoop.mapred.lib.ChainReducer <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/mapred/lib/ChainReducer.html" title="class in org.apache.hadoop.mapred.lib"><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/mapred/lib//<API key>.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="ChainReducer.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>
<form action="" method="post">{% csrf_token %} <p></p> <input id="id_email" maxlength="254" name="email" type="email" /> <input type="submit" value="" /> </form>
/* BASIC THEME CONFIGURATION */ body { color: #797979; background: #f2f2f2; font-family: 'Ruda', sans-serif; padding: 0px !important; margin: 0px !important; font-size: 13px; } ul li { list-style: none; } a, a:hover, a:focus { text-decoration: none; outline: none; } ::selection { background: #68dff0; color: #fff; } ::-moz-selection { background: #68dff0; color: #fff; } #container { width: 100%; height: 100%; } /* Bootstrap Modifications */ .modal-header { background: #68dff0; } .modal-title { color: white; } .btn-round { border-radius: 20px; -<API key>: 20px; } .accordion-heading .accordion-toggle { display: block; cursor: pointer; border-top: 1px solid #F5F5F5; padding: 5px 0px; line-height: 28.75px; text-transform: uppercase; color: #1a1a1a; background-color: #ffffff; outline: none !important; text-decoration: none; } /*Theme Backgrounds*/ .bg-theme { background-color: #68dff0; } .bg-theme02 { background-color: #ac92ec; } .bg-theme03 { background-color: #48cfad; } .bg-theme04 { background-color: #ed5565; } /*Theme Buttons*/ .btn-theme { color: #fff; background-color: #68dff0; border-color: #48bcb4; } .btn-theme:hover, .btn-theme:focus, .btn-theme:active, .btn-theme.active, .open .dropdown-toggle.btn-theme { color: #fff; background-color: #48bcb4; border-color: #48bcb4; } .btn-theme02 { color: #fff; background-color: #ac92ec; border-color: #967adc; } .btn-theme02:hover, .btn-theme02:focus, .btn-theme02:active, .btn-theme02.active, .open .dropdown-toggle.btn-theme02 { color: #fff; background-color: #967adc; border-color: #967adc; } .btn-theme03 { color: #fff; background-color: #48cfad; border-color: #37bc9b; } .btn-theme03:hover, .btn-theme03:focus, .btn-theme03:active, .btn-theme03.active, .open .dropdown-toggle.btn-theme03 { color: #fff; background-color: #37bc9b; border-color: #37bc9b; } .btn-theme04 { color: #fff; background-color: #ed5565; border-color: #da4453; } .btn-theme04:hover, .btn-theme04:focus, .btn-theme04:active, .btn-theme04.active, .open .dropdown-toggle.btn-theme04 { color: #fff; background-color: #da4453; border-color: #da4453; } .btn-clear-g { color: #48bcb4; background: transparent; border-color: #48bcb4; } .btn-clear-g:hover { color: white; } hr { margin-top: 20px; margin-bottom: 20px; border: 0; border-top: 1px solid #797979; } /*Helpers*/ .centered { text-align: center; } .goleft { text-align: left; } .goright { text-align: right; } .mt { margin-top: 25px; } .mb { margin-bottom: 25px; } .ml { margin-left: 5px; } .no-padding { padding: 0 !important; } .no-margin { margin: 0 !important; } /*Exclusive Theme Colors Configuration*/ .label-theme { background-color: #68dff0; } .bg-theme { background-color: #68dff0; } ul.top-menu>li>.logout { color: #f2f2f2; font-size: 12px; border-radius: 4px; -<API key>: 4px; border: 1px solid #64c3c2 !important; padding: 5px 15px; margin-right: 15px; background: #68dff0; margin-top: 15px; } /*sidebar navigation*/ #sidebar { width: 210px; height: 100%; position: fixed; background: #424a5d; } #sidebar h5 { color: #f2f2f2; font-weight: 700; } #sidebar ul li { position: relative; } #sidebar .sub-menu>.sub li { padding-left: 32px; } #sidebar .sub-menu>.sub li:last-child { padding-bottom: 10px; } /*LEFT NAVIGATION ICON*/ .dcjq-icon { height: 17px; width: 17px; display: inline-block; background: url("../img/nav-expand.png") no-repeat top; border-radius: 3px; -moz-border-radius: 3px; -<API key>: 3px; position: absolute; right: 10px; top: 15px; } .active .dcjq-icon { background: url("../img/nav-expand.png") no-repeat bottom; border-radius: 3px; -moz-border-radius: 3px; -<API key>: 3px; } .nav-collapse.collapse { display: inline; } ul.sidebar-menu, ul.sidebar-menu li ul.sub { margin: -2px 0 0; padding: 0; } ul.sidebar-menu { margin-top: 75px; } #sidebar>ul>li>ul.sub { display: none; } #sidebar>ul>li.active>ul.sub, #sidebar>ul>li>ul.sub>li>a { display: block; } ul.sidebar-menu li ul.sub li { background: #424a5d; margin-bottom: 0; margin-left: 0; margin-right: 0; } ul.sidebar-menu li ul.sub li:last-child { border-radius: 0 0 4px 4px; -<API key>: 0 0 4px 4px; } ul.sidebar-menu li ul.sub li a { font-size: 12px; padding: 6px 0; line-height: 35px; height: 35px; -webkit-transition: all 0.3s ease; -moz-transition: all 0.3s ease; -o-transition: all 0.3s ease; -ms-transition: all 0.3s ease; transition: all 0.3s ease; } ul.sidebar-menu li ul.sub li a:hover { color: white; background: transparent; } ul.sidebar-menu li ul.sub li.active a { color: #68dff0; -webkit-transition: all 0.3s ease; -moz-transition: all 0.3s ease; -o-transition: all 0.3s ease; -ms-transition: all 0.3s ease; transition: all 0.3s ease; display: block; } ul.sidebar-menu li { /*line-height: 20px !important;*/ margin-bottom: 5px; margin-left: 10px; margin-right: 10px; } ul.sidebar-menu li.sub-menu { line-height: 15px; } ul.sidebar-menu li a span { display: inline-block; } ul.sidebar-menu li a { color: #aeb2b7; text-decoration: none; display: block; padding: 15px 0 15px 10px; font-size: 12px; outline: none; -webkit-transition: all 0.3s ease; -moz-transition: all 0.3s ease; -o-transition: all 0.3s ease; -ms-transition: all 0.3s ease; transition: all 0.3s ease; } ul.sidebar-menu li a.active, ul.sidebar-menu li a:hover, ul.sidebar-menu li a:focus { background: #68dff0; color: #fff; display: block; -webkit-transition: all 0.3s ease; -moz-transition: all 0.3s ease; -o-transition: all 0.3s ease; -ms-transition: all 0.3s ease; transition: all 0.3s ease; } ul.sidebar-menu li a i { font-size: 15px; padding-right: 6px; } ul.sidebar-menu li a:hover i, ul.sidebar-menu li a:focus i { color: #fff; } ul.sidebar-menu li a.active i { color: #fff; } .mail-info, .mail-info:hover { margin: -3px 6px 0 0; font-size: 11px; } /* MAIN CONTENT CONFIGURATION */ #main-content { margin-left: 210px; } .header, .footer { min-height: 60px; padding: 0 15px; } .header { position: fixed; left: 0; right: 0; z-index: 1002; } .black-bg { background: #ffd777; border-bottom: 1px solid #c9aa5f; } .wrapper { display: inline-block; margin-top: 60px; padding-left: 15px; padding-right: 15px; padding-bottom: 15px; padding-top: 0px; width: 100%; } a.logo { font-size: 20px; color: #ffffff; float: left; margin-top: 15px; text-transform: uppercase; } a.logo b { font-weight: 900; } a.logo:hover, a.logo:focus { text-decoration: none; outline: none; } a.logo span { color: #68dff0; } /*notification*/ #top_menu .nav>li, ul.top-menu>li { float: left; } .notify-row { float: left; margin-top: 15px; margin-left: 92px; } .notify-row .notification span.label { display: inline-block; height: 18px; width: 20px; padding: 5px; } ul.top-menu>li>a { color: #666666; font-size: 16px; border-radius: 4px; -<API key>: 4px; border: 1px solid #666666 !important; padding: 2px 6px; margin-right: 15px; } ul.top-menu>li>a:hover, ul.top-menu>li>a:focus { border: 1px solid #b6b6b6 !important; background-color: transparent !important; border-color: #b6b6b6 !important; text-decoration: none; border-radius: 4px; -<API key>: 4px; color: #b6b6b6 !important; } .notify-row .badge { position: absolute; right: -10px; top: -10px; z-index: 100; } .dropdown-menu.extended { max-width: 300px !important; min-width: 160px !important; top: 42px; width: 235px !important; padding: 0; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.176) !important; border: none !important; border-radius: 4px; -<API key>: 4px; } @media screen and (-<API key>:0) { /* Safari and Chrome */ .dropdown-menu.extended { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.176) !important; } ; } .dropdown-menu.extended li p { background-color: #F1F2F7; color: #666666; margin: 0; padding: 10px; border-radius: 4px 4px 0px 0px; -<API key>: 4px 4px 0px 0px; } .dropdown-menu.extended li p.green { background-color: #68dff0; color: #fff; } .dropdown-menu.extended li p.yellow { background-color: #fcb322; color: #fff; } .dropdown-menu.extended li a { border-bottom: 1px solid #EBEBEB !important; font-size: 12px; list-style: none; } .dropdown-menu.extended li a { padding: 15px 10px !important; width: 100%; display: inline-block; } .dropdown-menu.extended li a:hover { background-color: #F7F8F9 !important; color: #2E2E2E; } .dropdown-menu li span.message { white-space: normal; } .dropdown-menu.tasks-bar .task-info .desc { font-size: 13px; font-weight: normal; } .dropdown-menu.tasks-bar .task-info .percent { display: inline-block; float: right; font-size: 13px; font-weight: 600; padding-left: 10px; margin-top: -4px; } .dropdown-menu.extended .progress { margin-bottom: 0 !important; height: 10px; } .dropdown-menu.inbox li a .photo img { border-radius: 2px 2px 2px 2px; float: left; height: 40px; margin-right: 4px; width: 40px; } .dropdown-menu.inbox li a .subject { display: block; } .dropdown-menu.inbox li a .subject .from { font-size: 12px; font-weight: 600; } .dropdown-menu.inbox li a .subject .time { font-size: 11px; font-style: italic; font-weight: bold; position: absolute; right: 5px; } .dropdown-menu.inbox li a .message { display: block !important; font-size: 11px; } .top-nav { margin-top: 7px; } .top-nav ul.top-menu>li .dropdown-menu.logout { width: 268px !important; } .top-nav li.dropdown .dropdown-menu { float: right; right: 0; left: auto; } .dropdown-menu.extended.logout>li { float: left; text-align: center; width: 33.3%; } .dropdown-menu.extended.logout>li:last-child { float: left; text-align: center; width: 100%; background: #a9d96c; border-radius: 0 0 3px 3px; } .dropdown-menu.extended.logout>li:last-child>a, .dropdown-menu.extended.logout>li:last-child>a:hover { color: #fff; border-bottom: none !important; text-transform: uppercase; } .dropdown-menu.extended.logout>li:last-child>a:hover>i { color: #fff; } .dropdown-menu.extended.logout>li>a { color: #a4abbb; border-bottom: none !important; } .full-width .dropdown-menu.extended.logout>li>a:hover { background: none !important; color: #50c8ea !important; } .dropdown-menu.extended.logout>li>a:hover { background: none !important; } .dropdown-menu.extended.logout>li>a:hover i { color: #50c8ea; } .dropdown-menu.extended.logout>li>a i { font-size: 17px; } .dropdown-menu.extended.logout>li>a>i { display: block; } .top-nav ul.top-menu>li>a { border: 1px solid #eeeeee; border-radius: 4px; -<API key>: 4px; padding: 6px; background: none; margin-right: 0; } .top-nav ul.top-menu>li { margin-left: 10px; } .top-nav ul.top-menu>li>a:hover, .top-nav ul.top-menu>li>a:focus { border: 1px solid #F1F2F7; background: #F1F2F7; } .top-nav .dropdown-menu.extended.logout { top: 50px; } .top-nav .nav .caret { border-bottom-color: #A4AABA; border-top-color: #A4AABA; } .top-nav ul.top-menu>li>a:hover .caret { border-bottom-color: #000; border-top-color: #000; } .log-arrow-up { background: url("../img/arrow-up.png") no-repeat; width: 20px; height: 11px; position: absolute; right: 20px; top: -10px; } .notify-arrow { border-style: solid; border-width: 0 9px 9px; height: 0; margin-top: 0; opacity: 0; position: absolute; left: 7px; top: -18px; transition: all 0.25s ease 0s; width: 0; z-index: 10; margin-top: 10px; opacity: 1; } .notify-arrow-yellow { border-color: transparent transparent #FCB322; border-bottom-color: #FCB322 !important; border-top-color: #FCB322 !important; } .notify-arrow-green { border-color: transparent transparent #68dff0; border-bottom-color: #68dff0 !important; border-top-color: #68dff0 !important; } .sidebar-toggle-box { float: left; padding-right: 15px; margin-top: 20px; } .sidebar-toggle-box .fa-bars { cursor: pointer; display: inline-block; font-size: 20px; } .sidebar-closed>#sidebar>ul { display: none; } .sidebar-closed #main-content { margin-left: 0px; } .sidebar-closed #sidebar { margin-left: -180px; } /* Dash Side */ .ds { background: #ffffff; padding-top: 20px; } .ds h4 { font-size: 14px; font-weight: 700; } .ds h3 { color: #ffffff; font-size: 16px; padding: 0 10px; line-height: 60px; height: 60px; margin: 0; background: #ff865c; text-align: center; } .ds i { font-size: 12px; line-height: 16px; } .ds .desc { border-bottom: 1px solid #eaeaea; display: inline-block; padding: 15px 0; width: 100%; } .ds .desc:hover { background: #f2f2f2; } .ds .thumb { width: 30px; margin: 0 10px 0 20px; display: block; float: left; } .ds .details { width: 170px; float: left; } .ds>.desc p { font-size: 11px; } .ds p>muted { font-size: 9px; text-transform: uppercase; font-style: italic; color: #666666 } .ds a { color: #68dff0; } /* LINE ICONS CONFIGURATION */ .mtbox { margin-top: 80px; margin-bottom: 40px; } .box1 { padding: 15px; text-align: center; color: #989898; border-bottom: 1px solid #989898; } .box1 span { font-size: 50px; } .box1 h3 { text-align: center; } .box0:hover .box1 { border-bottom: 1px solid #ffffff; } .box0 p { text-align: center; font-size: 12px; color: #f2f2f2; } .box0:hover p { color: #ff865c; } .box0:hover { background: #ffffff; box-shadow: 0 2px 1px rgba(0, 0, 0, 0.2); } /* MAIN CHART CONFIGURATION */ .main-chart { padding-top: 20px; } .mleft { } .border-head h3 { margin-top: 20px; margin-bottom: 20px; margin-left: 15px; padding-bottom: 5px; font-weight: normal; font-size: 18px; display: inline-block; width: 100%; font-weight: 700; color: #989898; } .custom-bar-chart { height: 290px; margin-top: 20px; margin-left: 20px; position: relative; border-bottom: 1px solid #c9cdd7; } .custom-bar-chart .bar { height: 100%; position: relative; width: 6%; margin: 0px 4%; float: left; text-align: center; z-index: 10; } .custom-bar-chart .bar .title { position: absolute; bottom: -30px; width: 100%; text-align: center; font-size: 11px; } .custom-bar-chart .bar .value { position: absolute; bottom: 0; background: #ff865c; color: #68dff0; width: 100%; -<API key>: 5px 5px 0 0; -moz-border-radius: 5px 5px 0 0; border-radius: 5px 5px 0 0; -webkit-transition: all .3s ease; -moz-transition: all .3s ease; -ms-transition: all .3s ease; -o-transition: all .3s ease; transition: all .3s ease; } .custom-bar-chart .bar .value:hover { background: #2f2f2f; color: #fff; } .y-axis { color: #555555; position: absolute; text-align: left; width: 100%; font-size: 11px; } .y-axis li { border-top: 1px dashed #dbdce0; display: block; height: 58px; width: 100%; } .y-axis li:last-child { border-top: none; } .y-axis li span { display: block; margin: -10px 0 0 -60px; padding: 0 10px; width: 40px; } /*Donut Chart Main Page Conf*/ .donut-main { display: block; text-align: center; } .donut-main h4 { font-weight: 700; font-size: 16px; } /*Panel Size*/ .pn { height: 250px; box-shadow: 0 2px 1px rgba(0, 0, 0, 0.2); } .pn:hover { box-shadow: 2px 3px 2px rgba(0, 0, 0, 0.3); } /*Grey Panel*/ .grey-panel { text-align: center; background: #dfdfe1; } .grey-panel .grey-header { background: #ccd1d9; padding: 3px; margin-bottom: 15px; } .grey-panel h5 { font-weight: 200; margin-top: 10px; } .grey-panel p { margin-left: 5px; } /* Specific Conf for Donut Charts*/ .donut-chart p { margin-top: 5px; font-weight: 700; margin-left: 15px; } .donut-chart h2 { font-weight: 900; color: #FF6B6B; font-size: 38px; } /* Dark Blue*/ .darkblue-panel { text-align: center; background: #444c57; } .darkblue-panel .darkblue-header { background: transparent; padding: 3px; margin-bottom: 15px; } .darkblue-panel h1 { color: #f2f2f2; } .darkblue-panel h5 { font-weight: 200; margin-top: 10px; color: white; } .darkblue-panel footer { color: white; } .darkblue-panel footer h5 { margin-left: 10px; margin-right: 10px; font-weight: 700; } /*Green Panel*/ .green-panel { text-align: center; background: #68dff0; } .green-panel .green-header { background: #43b1a9; padding: 3px; margin-bottom: 15px; } .green-panel h5 { color: white; font-weight: 200; margin-top: 10px; } .green-panel h3 { color: white; font-weight: 100; } .green-panel p { color: white; } /*White Panel */ .white-panel { text-align: center; background: #ffffff; color: #ccd1d9; } .white-panel p { margin-top: 5px; font-weight: 700; margin-left: 15px; } .white-panel .white-header { background: #f4f4f4; padding: 3px; margin-bottom: 15px; color: #c6c6c6; } .white-panel .small { font-size: 10px; color: #ccd1d9; } .white-panel i { color: #68dff0; padding-right: 4px; font-size: 14px; } /*STOCK CARD Panel*/ .card { background: white; box-shadow: 0 2px 1px rgba(0, 0, 0, 0.2); margin-bottom: 1em; height: 250px; } .stock .stock-chart { background: #00c5de; } .stock .stock-chart #chart { height: 10.7em; background: url(http://i.imgbox.com/abmuNQx2) center bottom no-repeat; } .stock .current-price { background: #1d2122; padding: 10px; } .stock .current-price .info abbr { display: block; color: #f8f8f8; font-size: 1.5em; font-weight: 600; margin-top: 0.18em; } .stock .current-price .changes { text-align: right; } .stock .changes .up { color: #4fd98b } .stock .current-price .changes .value { font-size: 1.8em; font-weight: 700; } .stock .summary { color: #2f2f2f; display: block; background: #f2f2f2; padding: 10px; text-align: center; } .stock .summary strong { font-weight: 900; font-size: 14px; } /*Content Panel*/ .content-panel { background: #ffffff; box-shadow: 0px 3px 2px #aab2bd; padding-top: 15px; padding-bottom: 5px; } .content-panel h4 { margin-left: 10px; } /*WEATHER PANELS*/ /* Weather 1 */ .weather { background: url(../img/weather.jpg) no-repeat center top; text-align: center; background-position: center center; } .weather i { color: white; margin-top: 45px; } .weather h2 { color: white; font-weight: 900; } .weather h4 { color: white; font-weight: 900; letter-spacing: 1px; } /* Weather 2 */ .weather-2 { background: #e9f0f4; } .weather-2 .weather-2-header { background: #54bae6; padding-top: 5px; margin-bottom: 5px; } .weather-2 .weather-2-header p { color: white; margin-left: 5px; margin-right: 5px; } .weather-2 .weather-2-header p small { font-size: 10px; } .weather-2 .data { margin-right: 10px; margin-left: 10px; color: #272b34; } .weather-2 .data h5 { margin-top: 0px; font-weight: lighter; } .weather-2 .data h1 { margin-top: 2px; } /* Weather 3 */ .weather-3 { background: #ffcf00; } .weather-3 i { color: white; margin-top: 30px; font-size: 70px; } .weather-3 h1 { margin-top: 10px; color: white; font-weight: 900; } .weather-3 .info { background: #f2f2f2; } .weather-3 .info i { font-size: 15px; color: #c2c2c2; margin-bottom: 0px; margin-top: 10px; } .weather-3 .info h3 { font-weight: 900; margin-bottom: 0px; } .weather-3 .info p { margin-left: 10px; margin-right: 10px; margin-bottom: 16px; color: #c2c2c2; font-size: 15px; font-weight: 700; } /*Twitter Panel*/ .twitter-panel { background: #4fc1e9; text-align: center; } .twitter-panel i { color: white; margin-top: 40px; } .twitter-panel p { color: #f5f5f5; margin: 10px; } .twitter-panel .user { color: white; font-weight: 900; } /* Instagram Panel*/ .instagram-panel { background: url(../img/instagram.jpg) no-repeat center top; text-align: center; background-position: center center; } .instagram-panel i { color: white; margin-top: 35px; } .instagram-panel p { margin: 5px; color: white; } /* Product Panel */ .product-panel { background: #dadad2; text-align: center; padding-top: 50px; height: 100%; } /* Product Panel 2*/ .product-panel-2 { background: #dadad2; text-align: center; } .product-panel-2 .badge { position: absolute; top: 20px; left: 35px; } .badge-hot { background: #ed5565; width: 70px; height: 70px; line-height: 70px; font-size: 18px; color: #fff; text-align: center; border-radius: 100%; } /* Soptify Panel */ #spotify { background: url(../img/lorde.jpg) no-repeat center top; margin-top: -15px; <API key>: relative; background-position: center center; min-height: 220px; width: 100%; -<API key>: 100%; -moz-background-size: 100%; -o-background-size: 100%; background-size: 100%; -<API key>: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } #spotify .btn-clear-g { top: 15%; right: 10px; position: absolute; margin-top: 5px; } #spotify .sp-title { bottom: 15%; left: 25px; position: absolute; color: #efefef; } #spotify .sp-title h3 { font-weight: 900; } #spotify .play { bottom: 18%; right: 25px; position: absolute; color: #efefef; font-size: 20px } .followers { margin-left: 5px; margin-top: 5px; } /* BLOG PANEL */ #blog-bg { background: url(../img/blog-bg.jpg) no-repeat center top; margin-top: -15px; <API key>: relative; background-position: center center; min-height: 150px; width: 100%; -<API key>: 100%; -moz-background-size: 100%; -o-background-size: 100%; background-size: 100%; -<API key>: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } #blog-bg .badge { position: absolute; top: 20px; left: 35px; } .badge-popular { background: #3498db; width: 70px; height: 70px; line-height: 70px; font-size: 13px; color: #fff; text-align: center; border-radius: 100%; } .blog-title { background: rgba(0, 0, 0, 0.5); bottom: 100px; padding: 6px; color: white; font-weight: 700; position: absolute; display: block; width: 120px; } .blog-text { margin-left: 8px; margin-right: 8px; margin-top: 15px; font-size: 12px; } /* Calendar Configuration */ #calendar { color: white; padding: 0px !important; } .<API key> { background: #43b1a9; } /* TODO PANEL */ .steps { display: block; } .steps input[type=checkbox] { display: none; } .steps input[type=submit] { background: #f1783c; border: none; padding: 0px; margin: 0 auto; width: 100%; height: 55px; color: white; text-transform: uppercase; font-weight: 900; font-size: 11px; letter-spacing: 1px; cursor: pointer; transition: background 0.5s ease } .steps input[type=submit]:hover { background: #8fde9c; } .steps label { background: #393D40; height: 65px; line-height: 65px; width: 100%; display: block; border-bottom: 1px solid #44494e; color: #889199; text-transform: uppercase; font-weight: 900; font-size: 11px; letter-spacing: 1px; text-indent: 52px; cursor: pointer; transition: all 0.7s ease; margin: 0px; } .steps label:before { content: ""; width: 12px; height: 12px; display: block; position: absolute; margin: 26px 0px 0px 18px; border-radius: 100%; transition: border 0.7s ease } .steps label:hover { background: #2B2E30; color: #46b7e5 } .steps label:hover:before { border: 1px solid #46b7e5; } #op1:checked ~ label[for=op1]:before, #op2:checked ~ label[for=op2]:before, #op3:checked ~ label[for=op3]:before { border: 2px solid #96c93c; background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAGFJREFUeNpinHLMhgEHKADia0xQThIQs6JJ9gPxZhYQAcS6QHwDiI8hSYJAC0gBPxDLAvFcIJ6JJJkDxFNBVtgBcQ8Qa6BLghgwN4A4a9ElQYAFSj8C4mwg3o8sCQIAAQYA78QTYqnPZuEAAAAASUVORK5CYII=') no-repeat center center; } /* PROFILE PANELS */ /* Profile 01*/ #profile-01 { background: url(../img/profile-01.jpg) no-repeat center top; margin-top: -15px; <API key>: relative; background-position: center center; min-height: 150px; width: 100%; -<API key>: 100%; -moz-background-size: 100%; -o-background-size: 100%; background-size: 100%; -<API key>: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } #profile-01 h3 { color: white; padding-top: 50px; margin: 0px; text-align: center; } #profile-01 h6 { color: white; text-align: center; margin-bottom: 0px; font-weight: 900; } .profile-01 { background: #68dff0; height: 50px; } .profile-01:hover { background: #2f2f2f; -webkit-transition: background-color 0.6s; -moz-transition: background-color 0.6s; -o-transition: background-color 0.6s; transition: background-color 0.6s; cursor: pointer; } .profile-01 p { color: white; padding-top: 15px; font-weight: 400; font-size: 15px; } /* Profile 02*/ #profile-02 { background: url(../img/profile-02.jpg) no-repeat center top; margin-top: -15px; <API key>: relative; background-position: center center; min-height: 200px; width: 100%; -<API key>: 100%; -moz-background-size: 100%; -o-background-size: 100%; background-size: 100%; -<API key>: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } #profile-02 .user { padding-top: 40px; text-align: center; } #profile-02 h4 { color: white; margin: 0px; padding-top: 8px; } .pr2-social a { color: #cdcdcd; } .pr2-social a:hover { color: #68dff0; } .pr2-social i { margin-top: 15px; margin-right: 12px; font-size: 20px; } /*spark line*/ .chart { display: inline-block; text-align: center; width: 100%; } .chart .heading { text-align: left; } .chart .heading span { display: block; } .panel.green-chart .chart-tittle { font-size: 16px; padding: 15px; display: inline-block; font-weight: normal; background: #99c262; width: 100%; -<API key>: 0px 0px 4px 4px; border-radius: 0px 0px 4px 4px; } #barchart { margin-bottom: -15px; display: inline-block; } .panel.green-chart .chart-tittle .value { float: right; color: #c0f080; } .panel.green-chart { background: #a9d96c; color: #fff; } .panel.terques-chart { background: transparent; color: #797979; } .panel.terques-chart .chart-tittle .value { float: right; color: #fff; } .panel.terques-chart .chart-tittle .value a { color: #2f2f2f; font-size: 12px; } .panel.terques-chart .chart-tittle .value a:hover, .panel.terques-chart .chart-tittle .value a.active { color: #68dff0; font-size: 12px; } .panel.terques-chart .chart-tittle { font-size: 16px; padding: 15px; display: inline-block; font-weight: normal; background: #39b7ac; width: 100%; -<API key>: 0px 0px 4px 4px; border-radius: 0px 0px 4px 4px; } .inline-block { display: inline-block; } /* showcase background */ .showback { background: #ffffff; padding: 15px; margin-bottom: 15px; box-shadow: 0px 3px 2px #aab2bd; } /* Calendar Events - Calendar.html*/ .external-event { cursor: move; display: inline-block !important; margin-bottom: 7px !important; margin-right: 7px !important; padding: 10px; } .drop-after { padding-top: 15px; margin-top: 15px; border-top: 1px solid #ccc; } .fc-state-default, .fc-state-default .fc-button-inner { background: #f2f2f2; } .fc-state-active .fc-button-inner { background: #FFFFFF; } /* Gallery Configuration */ .photo-wrapper { display: block; position: relative; overflow: hidden; background-color: #68dff0; -webkit-transition: background-color 0.4s; -moz-transition: background-color 0.4s; -o-transition: background-color 0.4s; transition: background-color 0.4s; } .project .overlay { position: absolute; text-align: center; color: #fff; opacity: 0; filter: alpha(opacity = 0); -webkit-transition: opacity 0.4s; -moz-transition: opacity 0.4s; -o-transition: opacity 0.4s; transition: opacity 0.4s; } .project:hover .photo-wrapper { background-color: #68dff0; background-image: url(../img/zoom.png); background-repeat: no-repeat; background-position: center; top: 0; bottom: 0; left: 0; right: 0; position: relative; } .project:hover .photo { opacity: 10; filter: alpha(opacity = 4000); opacity: 0.1; filter: alpha(opacity = 40); } .project:hover .overlay { opacity: 100; filter: alpha(opacity = 10000); opacity: 1; filter: alpha(opacity = 100); } /* EZ Checklist */ .ez-checkbox { margin-right: 5px; } .ez-checkbox, .ez-radio { height: 20px; width: 20px; } .brand-highlight { background: #fffbcc !important; } /* FORMS CONFIGURATION */ .form-panel { background: #ffffff; margin: 10px; padding: 10px; box-shadow: 0px 3px 2px #aab2bd; text-align: left; } label { font-weight: 400; } .form-horizontal.style-form .form-group { border-bottom: 1px solid #eff2f7; padding-bottom: 15px; margin-bottom: 15px; } .round-form { border-radius: 500px; -<API key>: 500px; } @media ( min-width : 768px) { .form-horizontal .control-label { text-align: left; } } #focusedInput { border: 1px solid #ed5565; box-shadow: none; } .add-on { float: right; margin-top: -37px; padding: 3px; text-align: center; } .add-on .btn { height: 34px; } /* TOGGLE CONFIGURATION */ .has-switch { border-radius: 30px; -<API key>: 30px; display: inline-block; cursor: pointer; line-height: 1.231; overflow: hidden; position: relative; text-align: left; width: 80px; -webkit-mask: url('../img/mask.png') 0 0 no-repeat; mask: url('../img/mask.png') 0 0 no-repeat; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -o-user-select: none; user-select: none; } .has-switch.deactivate { opacity: 0.5; filter: alpha(opacity = 50); cursor: default !important; } .has-switch.deactivate label, .has-switch.deactivate span { cursor: default !important; } .has-switch>div { width: 162%; position: relative; top: 0; } .has-switch>div.switch-animate { -webkit-transition: left 0.25s ease-out; -moz-transition: left 0.25s ease-out; -o-transition: left 0.25s ease-out; transition: left 0.25s ease-out; -<API key>: hidden; } .has-switch>div.switch-off { left: -63%; } .has-switch>div.switch-off label { background-color: #7f8c9a; border-color: #bdc3c7; -webkit-box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5); -moz-box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5); box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5); } .has-switch>div.switch-on { left: 0%; } .has-switch>div.switch-on label { background-color: #41cac0; } .has-switch input[type=checkbox] { display: none; } .has-switch span { cursor: pointer; font-size: 14.994px; font-weight: 700; float: left; height: 29px; line-height: 19px; margin: 0; padding-bottom: 6px; padding-top: 5px; position: relative; text-align: center; width: 50%; z-index: 1; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-transition: 0.25s ease-out; -moz-transition: 0.25s ease-out; -o-transition: 0.25s ease-out; transition: 0.25s ease-out; -<API key>: hidden; } .has-switch span.switch-left { border-radius: 30px 0 0 30px; background-color: #2A3542; color: #41cac0; border-left: 1px solid transparent; } .has-switch span.switch-right { border-radius: 0 30px 30px 0; background-color: #bdc3c7; color: #ffffff; text-indent: 7px; } .has-switch span.switch-right [class*="fui-"] { text-indent: 0; } .has-switch label { border: 4px solid #2A3542; border-radius: 50%; -<API key>: 50%; float: left; height: 29px; margin: 0 -21px 0 -14px; padding: 0; position: relative; vertical-align: middle; width: 29px; z-index: 100; -webkit-transition: 0.25s ease-out; -moz-transition: 0.25s ease-out; -o-transition: 0.25s ease-out; transition: 0.25s ease-out; -<API key>: hidden; } .switch-square { border-radius: 6px; -<API key>: 6px; -webkit-mask: url('../img/mask.png') 0 0 no-repeat; mask: url('../img/mask.png') 0 0 no-repeat; } .switch-square>div.switch-off label { border-color: #7f8c9a; border-radius: 6px 0 0 6px; } .switch-square span.switch-left { border-radius: 6px 0 0 6px; } .switch-square span.switch-left [class*="fui-"] { text-indent: -10px; } .switch-square span.switch-right { border-radius: 0 6px 6px 0; } .switch-square span.switch-right [class*="fui-"] { text-indent: 5px; } .switch-square label { border-radius: 0 6px 6px 0; border-color: #41cac0; } /*LOGIN CONFIGURATION PAGE*/ .form-login { max-width: 330px; margin: 100px auto 0; background: #fff; border-radius: 5px; -<API key>: 5px; } .form-login h2.form-login-heading { margin: 0; padding: 25px 20px; text-align: center; background: #68dff0; border-radius: 5px 5px 0 0; -<API key>: 5px 5px 0 0; color: #fff; font-size: 20px; text-transform: uppercase; font-weight: 300; } .login-wrap { padding: 20px; } .login-wrap .registration { text-align: center; } .login-social-link { display: block; margin-top: 20px; margin-bottom: 15px; } /*LOCK SCREEN CONF*/ #showtime { width: 100%; color: #fff; font-size: 90px; margin-bottom: 30px; margin-top: 250px; display: inline-block; text-align: center; font-weight: 400; } .lock-screen { text-align: center; } .lock-screen a { color: white; } .lock-screen a:hover { color: #48cfad } .lock-screen i { font-size: 60px; } .lock-screen .modal-content { position: relative; background-color: #f2f2f2; background-clip: padding-box; border: 1px solid #999; border: 1px solid rgba(0, 0, 0, .2); border-radius: 5px; } .btn-facebook { color: #fff; background-color: #5193ea; border-color: #2775e2; } .btn-facebook:hover, .btn-facebook:focus, .btn-facebook:active, .btn-facebook.active, .open .dropdown-toggle.btn-facebook { color: #fff; background-color: #2775e2; border-color: #2775e2; } .btn-twitter { color: #fff; background-color: #44ccfe; border-color: #2bb4e8; } .btn-twitter:hover, .btn-twitter:focus, .btn-twitter:active, .btn-twitter.active, .open .dropdown-toggle.btn-twitter { color: #fff; background-color: #2bb4e8; border-color: #2bb4e8; } /*badge*/ .badge.bg-primary { background: #8075c4; } .badge.bg-success { background: #a9d86e; } .badge.bg-warning { background: #FCB322; } .badge.bg-important { background: #ff6c60; } .badge.bg-info { background: #41cac0; } .badge.bg-inverse { background: #2A3542; } /*easy pie chart*/ .easy-pie-chart { display: inline-block; padding: 30px 0; } .chart-info, .chart-info .increase, .chart-info .decrease { display: inline-block; } .chart-info { width: 100%; margin-bottom: 5px; } .chart-position { margin-top: 70px; } .chart-info span { margin: 0 3px; } .chart-info .increase { background: #ff6c60; width: 10px; height: 10px; } .chart-info .decrease { background: #f2f2f2; width: 10px; height: 10px; } .panel-footer.revenue-foot { background-color: #e6e7ec; -<API key>: 0px 0px 4px 4px; border-radius: 0px 0px 4px 4px; border: none; padding: 0; width: 100%; display: inline-block; } @media screen and (-<API key>:0) { /* Safari and Chrome */ .panel-footer.revenue-foot { margin-bottom: -4px; } ; } .panel-footer.revenue-foot ul { margin: 0; padding: 0; width: 100%; display: inline-flex; } .panel-footer.revenue-foot ul li { float: left; width: 33.33%; } .panel-footer.revenue-foot ul li.first a:hover, .panel-footer.revenue-foot ul li.first a { -<API key>: 0px 0px 0px 4px; border-radius: 0px 0px 0px 4px; } .panel-footer.revenue-foot ul li.last a:hover, .panel-footer.revenue-foot ul li.last a { -<API key>: 0px 0px 4px 0px; border-radius: 0px 0px 4px 0px; border-right: none; } .panel-footer.revenue-foot ul li a { display: inline-block; width: 100%; padding: 14px 15px; text-align: center; border-right: 1px solid #d5d8df; color: #797979; } .panel-footer.revenue-foot ul li a:hover, .panel-footer.revenue-foot ul li.active a { background: #fff; position: relative; } .panel-footer.revenue-foot ul li a i { color: #c6cad5; display: block; font-size: 16px; } .panel-footer.revenue-foot ul li a:hover i, .panel-footer.revenue-foot ul li.active a i { color: #ff6c60; display: block; font-size: 16px; } /*flot chart*/ .flot-chart .chart, .flot-chart .pie, .flot-chart .bars { height: 300px; } /*todolist*/ #sortable { list-style-type: none; margin: 0 0 20px 0; padding: 0; width: 100%; } #sortable li { padding-left: 3em; font-size: 12px; } #sortable li i { position: absolute; left: 6px; padding: 4px 10px 0 10px; cursor: pointer; } #sortable li input[type=checkbox] { margin-top: 0; } .ui-sortable>li { padding: 15px 0 15px 35px !important; position: relative; background: #f5f6f8; margin-bottom: 2px; border-bottom: none !important; } .ui-sortable li.list-primary { border-left: 3px solid #41CAC0; } .ui-sortable li.list-success { border-left: 3px solid #78CD51; } .ui-sortable li.list-danger { border-left: 3px solid #FF6C60; } .ui-sortable li.list-warning { border-left: 3px solid #F1C500; } .ui-sortable li.list-info { border-left: 3px solid #58C9F3; } .ui-sortable li.list-inverse { border-left: 3px solid #BEC3C7; } /*footer*/ .site-footer { background: #68dff0; color: #fff; padding: 10px 0; } .go-top { margin-right: 1%; float: right; background: rgba(255, 255, 255, .5); width: 20px; height: 20px; border-radius: 50%; -<API key>: 50%; } .go-top i { color: #2A3542; } .site-min-height { min-height: 900px; }
<!DOCTYPE html> <html xmlns="http: <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <style type="text/css"> div { font-family: ""; font-size: 29px; font-weight: bold; } </style> </head> <body> <div>1</div> </body> </html>
package org.jsapar; import org.jsapar.compose.bean.BeanComposeConfig; import org.jsapar.compose.bean.BeanFactory; import org.jsapar.model.Cell; import org.jsapar.model.Line; import org.jsapar.schema.CsvSchema; import org.jsapar.schema.CsvSchemaLine; import org.jsapar.text.TextParseConfig; import org.junit.Test; import java.io.IOException; import java.io.Reader; import java.io.StringReader; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertSame; public class <API key> { @Test public void convert() throws IOException { CsvSchema schema = makeTestCsvSchema(); String input = "John;Doe"; Text2BeanConverter<TstPerson> converter = new Text2BeanConverter<>(schema); try(Reader reader=new StringReader(input)){ long count = converter.convertForEach(reader, b -> { assertEquals("John", b.getFirstName()); assertEquals("Doe", b.getLastName()); }); assertEquals(1, count); } } protected CsvSchema makeTestCsvSchema() { return CsvSchema.builder() .withLine(CsvSchemaLine.builder("org.jsapar.TstPerson") .withCells("firstName", "lastName") .build()) .build(); } @Test public void <API key>() throws IOException { CsvSchema schema = makeTestCsvSchema(); String input = "John;Doe"; Text2BeanConverter<TstPerson> converter = new Text2BeanConverter<>(schema); converter.setBeanFactory(new BeanFactory<TstPerson>() { @Override public TstPerson createBean(Line line) { return new TstPerson(); } @Override public void assignCellToBean(String lineType, TstPerson bean, Cell cell) { // Just convert to upper case and assign. switch(cell.getName()){ case "firstName": bean.setFirstName(cell.getStringValue().toUpperCase()); break; case "lastName": bean.setLastName(cell.getStringValue().toUpperCase()); break; } } }); try(Reader reader=new StringReader(input)){ long count = converter.convertForEach(reader, bean -> { assertEquals("JOHN", bean.getFirstName()); assertEquals("DOE", bean.getLastName()); }); assertEquals(1, count); } } @Test public void setGetComposeConfig() { CsvSchema schema = CsvSchema.builder().build(); Text2BeanConverter<TstPerson> converter = new Text2BeanConverter<>(schema); BeanComposeConfig composeConfig = new BeanComposeConfig(); converter.setComposeConfig(composeConfig); assertSame(composeConfig, converter.getComposeConfig()); } @Test public void setGetParseConfig() { CsvSchema schema = CsvSchema.builder().build(); Text2BeanConverter<TstPerson> converter = new Text2BeanConverter<>(schema); TextParseConfig config = new TextParseConfig(); converter.setParseConfig(config); assertSame(config, converter.getParseConfig()); } }
package com.way.mms.common.google; import android.net.Uri; /** * Interface for querying the state of a pending item loading request. * <p> * freeme.linqingwei, 20171123. */ public interface ItemLoadedFuture { /** * Returns whether the associated task has invoked its callback. Note that * in some implementations this value only indicates whether the load * request was satisfied synchronously via a cache rather than * asynchronously. */ boolean isDone(); void setIsDone(boolean done); void cancel(Uri uri); }
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_25) on Fri Jun 05 10:51:20 EDT 2015 --> <title>org.apache.cassandra.gms (apache-cassandra API)</title> <meta name="date" content="2015-06-05"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../script.js"></script> </head> <body> <h1 class="bar"><a href="../../../../org/apache/cassandra/gms/package-summary.html" target="classFrame">org.apache.cassandra.gms</a></h1> <div class="indexContainer"> <h2 title="Interfaces">Interfaces</h2> <ul title="Interfaces"> <li><a href="<API key>.html" title="interface in org.apache.cassandra.gms" target="classFrame"><span class="interfaceName"><API key></span></a></li> <li><a href="GossiperMBean.html" title="interface in org.apache.cassandra.gms" target="classFrame"><span class="interfaceName">GossiperMBean</span></a></li> <li><a href="<API key>.html" title="interface in org.apache.cassandra.gms" target="classFrame"><span class="interfaceName"><API key></span></a></li> <li><a href="<API key>.html" title="interface in org.apache.cassandra.gms" target="classFrame"><span class="interfaceName"><API key></span></a></li> <li><a href="IFailureDetector.html" title="interface in org.apache.cassandra.gms" target="classFrame"><span class="interfaceName">IFailureDetector</span></a></li> </ul> <h2 title="Classes">Classes</h2> <ul title="Classes"> <li><a href="EchoMessage.html" title="class in org.apache.cassandra.gms" target="classFrame">EchoMessage</a></li> <li><a href="EchoMessage.<API key>.html" title="class in org.apache.cassandra.gms" target="classFrame">EchoMessage.<API key></a></li> <li><a href="EndpointState.html" title="class in org.apache.cassandra.gms" target="classFrame">EndpointState</a></li> <li><a href="FailureDetector.html" title="class in org.apache.cassandra.gms" target="classFrame">FailureDetector</a></li> <li><a href="GossipDigest.html" title="class in org.apache.cassandra.gms" target="classFrame">GossipDigest</a></li> <li><a href="GossipDigestAck.html" title="class in org.apache.cassandra.gms" target="classFrame">GossipDigestAck</a></li> <li><a href="GossipDigestAck2.html" title="class in org.apache.cassandra.gms" target="classFrame">GossipDigestAck2</a></li> <li><a href="<API key>.html" title="class in org.apache.cassandra.gms" target="classFrame"><API key></a></li> <li><a href="<API key>.html" title="class in org.apache.cassandra.gms" target="classFrame"><API key></a></li> <li><a href="GossipDigestSyn.html" title="class in org.apache.cassandra.gms" target="classFrame">GossipDigestSyn</a></li> <li><a href="<API key>.html" title="class in org.apache.cassandra.gms" target="classFrame"><API key></a></li> <li><a href="Gossiper.html" title="class in org.apache.cassandra.gms" target="classFrame">Gossiper</a></li> <li><a href="<API key>.html" title="class in org.apache.cassandra.gms" target="classFrame"><API key></a></li> <li><a href="TokenSerializer.html" title="class in org.apache.cassandra.gms" target="classFrame">TokenSerializer</a></li> <li><a href="VersionedValue.html" title="class in org.apache.cassandra.gms" target="classFrame">VersionedValue</a></li> <li><a href="VersionedValue.<API key>.html" title="class in org.apache.cassandra.gms" target="classFrame">VersionedValue.<API key></a></li> <li><a href="VersionGenerator.html" title="class in org.apache.cassandra.gms" target="classFrame">VersionGenerator</a></li> </ul> <h2 title="Enums">Enums</h2> <ul title="Enums"> <li><a href="ApplicationState.html" title="enum in org.apache.cassandra.gms" target="classFrame">ApplicationState</a></li> </ul> </div> </body> </html>
package crypto import ( "bytes" secp256k1 "github.com/btcsuite/btcd/btcec" "github.com/DelosIsland/core/module/lib/ed25519" "github.com/DelosIsland/core/module/lib/ed25519/extra25519" . "github.com/DelosIsland/core/module/lib/go-common" "github.com/DelosIsland/core/module/lib/go-wire" ) // PrivKey is part of PrivAccount and state.PrivValidator. type PrivKey interface { Bytes() []byte Sign(msg []byte) Signature PubKey() PubKey Equals(PrivKey) bool KeyString() string } // Types of PrivKey implementations const ( PrivKeyTypeEd25519 = byte(0x01) <API key> = byte(0x02) ) // for wire.readReflect var _ = wire.RegisterInterface( struct{ PrivKey }{}, wire.ConcreteType{PrivKeyEd25519{}, PrivKeyTypeEd25519}, wire.ConcreteType{PrivKeySecp256k1{}, <API key>}, ) func PrivKeyFromBytes(privKeyBytes []byte) (privKey PrivKey, err error) { err = wire.ReadBinaryBytes(privKeyBytes, &privKey) return } // Implements PrivKey type PrivKeyEd25519 [64]byte func (privKey PrivKeyEd25519) Bytes() []byte { return wire.BinaryBytes(struct{ PrivKey }{privKey}) } func (privKey PrivKeyEd25519) Sign(msg []byte) Signature { privKeyBytes := [64]byte(privKey) signatureBytes := ed25519.Sign(&privKeyBytes, msg) return SignatureEd25519(*signatureBytes) } func (privKey PrivKeyEd25519) PubKey() PubKey { privKeyBytes := [64]byte(privKey) return PubKeyEd25519(*ed25519.MakePublicKey(&privKeyBytes)) } func (privKey PrivKeyEd25519) Equals(other PrivKey) bool { if otherEd, ok := other.(PrivKeyEd25519); ok { return bytes.Equal(privKey[:], otherEd[:]) } else { return false } } func (privKey PrivKeyEd25519) KeyString() string { return Fmt("%X", privKey[:]) } func (privKey PrivKeyEd25519) ToCurve25519() *[32]byte { keyCurve25519 := new([32]byte) privKeyBytes := [64]byte(privKey) extra25519.<API key>(keyCurve25519, &privKeyBytes) return keyCurve25519 } func (privKey PrivKeyEd25519) String() string { return Fmt("PrivKeyEd25519{*****}") } // Deterministically generates new priv-key bytes from key. func (privKey PrivKeyEd25519) Generate(index int) PrivKeyEd25519 { newBytes := wire.BinarySha256(struct { PrivKey [64]byte Index int }{privKey, index}) var newKey [64]byte copy(newKey[:], newBytes) return PrivKeyEd25519(newKey) } func GenPrivKeyEd25519() PrivKeyEd25519 { privKeyBytes := new([64]byte) copy(privKeyBytes[:32], CRandBytes(32)) ed25519.MakePublicKey(privKeyBytes) return PrivKeyEd25519(*privKeyBytes) } // NOTE: secret should be the output of a KDF like bcrypt, // if it's derived from user input. func <API key>(secret []byte) PrivKeyEd25519 { privKey32 := Sha256(secret) // Not Ripemd160 because we want 32 bytes. privKeyBytes := new([64]byte) copy(privKeyBytes[:32], privKey32) ed25519.MakePublicKey(privKeyBytes) return PrivKeyEd25519(*privKeyBytes) } // Implements PrivKey type PrivKeySecp256k1 [32]byte func (privKey PrivKeySecp256k1) Bytes() []byte { return wire.BinaryBytes(struct{ PrivKey }{privKey}) } func (privKey PrivKeySecp256k1) Sign(msg []byte) Signature { priv__, _ := secp256k1.PrivKeyFromBytes(secp256k1.S256(), privKey[:]) sig__, err := priv__.Sign(Sha256(msg)) if err != nil { PanicSanity(err) } return SignatureSecp256k1(sig__.Serialize()) } func (privKey PrivKeySecp256k1) PubKey() PubKey { _, pub__ := secp256k1.PrivKeyFromBytes(secp256k1.S256(), privKey[:]) pub := [64]byte{} copy(pub[:], pub__.<API key>()[1:]) return PubKeySecp256k1(pub) } func (privKey PrivKeySecp256k1) Equals(other PrivKey) bool { if otherSecp, ok := other.(PrivKeySecp256k1); ok { return bytes.Equal(privKey[:], otherSecp[:]) } else { return false } } func (privKey PrivKeySecp256k1) String() string { return Fmt("PrivKeySecp256k1{*****}") } func (privKey PrivKeySecp256k1) KeyString() string { return Fmt("%X", privKey[:]) } /* // Deterministically generates new priv-key bytes from key. func (key PrivKeySecp256k1) Generate(index int) PrivKeySecp256k1 { newBytes := wire.BinarySha256(struct { PrivKey [64]byte Index int }{key, index}) var newKey [64]byte copy(newKey[:], newBytes) return PrivKeySecp256k1(newKey) } */ func GenPrivKeySecp256k1() PrivKeySecp256k1 { privKeyBytes := [32]byte{} copy(privKeyBytes[:], CRandBytes(32)) priv, _ := secp256k1.PrivKeyFromBytes(secp256k1.S256(), privKeyBytes[:]) copy(privKeyBytes[:], priv.Serialize()) return PrivKeySecp256k1(privKeyBytes) } // NOTE: secret should be the output of a KDF like bcrypt, // if it's derived from user input. func <API key>(secret []byte) PrivKeySecp256k1 { privKey32 := Sha256(secret) // Not Ripemd160 because we want 32 bytes. priv, _ := secp256k1.PrivKeyFromBytes(secp256k1.S256(), privKey32) privKeyBytes := [32]byte{} copy(privKeyBytes[:], priv.Serialize()) return PrivKeySecp256k1(privKeyBytes) }
package main import ( "flag" "fmt" "net/http" "os" "github.com/jtolds/golincs/web/dbs" "github.com/jtolds/golincs/web/dbs/lincs_gse92742_v0" "gopkg.in/webhelp.v1/whfatal" "gopkg.in/webhelp.v1/whlog" "gopkg.in/webhelp.v1/whmux" "gopkg.in/webhelp.v1/whredir" "gopkg.in/webhelp.v1/whroute" ) var ( listenAddr = flag.String("addr", ":8080", "address to listen on") sampleId = whmux.NewStringArg() geneSigId = whmux.NewStringArg() genesetId = whmux.NewStringArg() ) func main() { flag.Parse() lincs_92742, err := lincs_gse92742_v0.New() if err != nil { panic(err) } datasetMux := whmux.Dir{"": whredir.RedirectHandler("/")} datasets := []dbs.Dataset{lincs_92742} for id, dataset := range datasets { endpoints := NewEndpoints(struct { dbs.Dataset Id int }{Dataset: dataset, Id: id}) datasetMux[fmt.Sprint(id)] = whmux.Dir{ "": whmux.Exact(http.HandlerFunc(endpoints.Dataset)), "sample": sampleId.Shift( whmux.Exact(http.HandlerFunc(endpoints.Sample))), "genesig": geneSigId.Shift( whmux.Exact(http.HandlerFunc(endpoints.GeneSig))), "geneset": genesetId.Shift( whmux.Exact(http.HandlerFunc(endpoints.Geneset))), "search": whmux.Dir{ "keyword": whmux.Exact(http.HandlerFunc(endpoints.Keyword)), "signature": whmux.Exact(http.HandlerFunc(endpoints.Signature)), }, } } routes := whlog.LogRequests(whlog.Default, whfatal.Catch(whmux.Dir{ "": whmux.Exact(http.HandlerFunc( func(w http.ResponseWriter, r *http.Request) { Render("datasets", map[string]interface{}{"datasets": datasets}) })), "dataset": datasetMux, })) switch flag.Arg(0) { case "serve": panic(whlog.ListenAndServe(*listenAddr, routes)) case "routes": whroute.PrintRoutes(os.Stdout, routes) default: fmt.Printf("Usage: %s <serve|routes>\n", os.Args[0]) } }
# tc_format.rb # Test case for the String#% instance method. # TODO: Add more tests require 'test/unit' require 'test/helper' class <API key> < Test::Unit::TestCase include Test::Helper def setup @string1 = '%05d' @string2 = '%-5s: %08x' end def test_format_basic assert_respond_to(@string1, :%) <API key>{ @string1 % 123 } end def test_format assert_equal('00123', @string1 % 123) assert_equal('ID : 000003db', @string2 % ['ID', 987]) end # See ruby-core: 14139 if RELEASE > 6 def <API key> assert_equal('ff', '%x' % '0_3_7_7') end end def <API key> assert_raises(TypeError){ @string1 % {'ID' => 987} } end def teardown @string1 = nil @string2 = nil end end
package com.coolweather.android; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.os.Build; import android.os.Bundle; import android.preference.PreferenceManager; import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.ScrollView; import android.widget.TextView; import android.widget.Toast; import com.bumptech.glide.Glide; import com.coolweather.android.gson.Forecast; import com.coolweather.android.gson.Weather; import com.coolweather.android.service.AutoUpdateService; import com.coolweather.android.util.HttpUtil; import com.coolweather.android.util.Utility; import java.io.IOException; import okhttp3.Call; import okhttp3.Response; public class WeatherActivity extends AppCompatActivity { private ScrollView weatherLayout; private TextView titleCity; private TextView titleUpdateTime; private TextView degreeText; private TextView weatherInfoText; private LinearLayout forecastLayout; private TextView aqiText; private TextView pm25Text; private TextView comfortText; private TextView carWashText; private TextView sportText; private ImageView bingPicImg; public SwipeRefreshLayout swipeRefresh; private String mWeatherId; public DrawerLayout drawerLayout; private Button navButton; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (Build.VERSION.SDK_INT >= 21) { View decorView = getWindow().getDecorView(); decorView.<API key>(View.<API key> | View.<API key>); getWindow().setStatusBarColor(Color.TRANSPARENT); } setContentView(R.layout.activity_weather); bingPicImg= (ImageView) findViewById(R.id.bing_pic_img); weatherLayout = (ScrollView) findViewById(R.id.weather_layout); titleCity = (TextView) findViewById(R.id.title_city); titleUpdateTime = (TextView) findViewById(R.id.title_update_time); degreeText = (TextView) findViewById(R.id.degree_text); weatherInfoText = (TextView) findViewById(R.id.weather_info_text); forecastLayout = (LinearLayout) findViewById(R.id.forecast_layout); aqiText = (TextView) findViewById(R.id.aqi_text); pm25Text = (TextView) findViewById(R.id.pm25_text); comfortText = (TextView) findViewById(R.id.comfort_text); carWashText = (TextView) findViewById(R.id.car_wash_text); sportText = (TextView) findViewById(R.id.sport_text); swipeRefresh = (SwipeRefreshLayout) findViewById(R.id.swipe_refresh); swipeRefresh.<API key>(R.color.colorPrimary); drawerLayout= (DrawerLayout) findViewById(R.id.drawer_layout); navButton= (Button) findViewById(R.id.nav_button); navButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { drawerLayout.openDrawer(GravityCompat.START); } }); SharedPreferences prefs = PreferenceManager.<API key>(this); String weatherString = prefs.getString("weather", null); if (weatherString != null) { Weather weather = Utility.<API key>(weatherString); mWeatherId=weather.basic.weatherId; showWeatherInfo(weather); } else { mWeatherId= getIntent().getStringExtra("weather_id"); weatherLayout.setVisibility(View.INVISIBLE); requestWeather( mWeatherId); } swipeRefresh.<API key>(new SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { requestWeather(mWeatherId); } }); String bingPic=prefs.getString("bing_pic",null); if(bingPic!=null){ Glide.with(this).load(bingPic).into(bingPicImg); }else{ loadBingPic(); } } public void requestWeather(final String weatherId) { Log.d("WeatherActivity","WeatherId="+weatherId); String weatherUrl = "http://guolin.tech/api/weather?cityid=" + weatherId + "&key=<API key>"; HttpUtil.sendOkHttpRequest(weatherUrl, new okhttp3.Callback() { @Override public void onResponse(Call call, Response response) throws IOException { final String responseText = response.body().string(); final Weather weather = Utility.<API key>(responseText); runOnUiThread(new Runnable() { @Override public void run() { if (weather != null && "ok".equals(weather.status)) { SharedPreferences.Editor editor = PreferenceManager.<API key>(WeatherActivity.this).edit(); editor.putString("weather", responseText); editor.apply(); showWeatherInfo(weather); } else { Toast.makeText(WeatherActivity.this, "", Toast.LENGTH_SHORT).show(); } swipeRefresh.setRefreshing(false); } }); } @Override public void onFailure(Call call, IOException e) { e.printStackTrace(); runOnUiThread(new Runnable() { @Override public void run() { Toast.makeText(WeatherActivity.this, "", Toast.LENGTH_SHORT).show(); swipeRefresh.setRefreshing(false); } }); } }); loadBingPic(); } /** * Weather */ private void showWeatherInfo(Weather weather) { String cityName = weather.basic.cityName; String updateTime = weather.basic.update.updateTime.split(" ")[1]; String degree = weather.now.temperature + "℃"; String weatherInfo = weather.now.more.info; titleCity.setText(cityName); titleUpdateTime.setText(updateTime); degreeText.setText(degree); weatherInfoText.setText(weatherInfo); forecastLayout.removeAllViews(); for (Forecast forecast : weather.forecastList) { View view = LayoutInflater.from(this).inflate(R.layout.forecast_item, forecastLayout, false); TextView dateText = (TextView) view.findViewById(R.id.date_text); TextView infoText = (TextView) view.findViewById(R.id.info_text); TextView maxText = (TextView) view.findViewById(R.id.max_text); TextView minText = (TextView) view.findViewById(R.id.min_text); dateText.setText(forecast.date); infoText.setText(forecast.more.info); maxText.setText(forecast.temperature.max); minText.setText(forecast.temperature.min); forecastLayout.addView(view); } if (weather.aqi != null) { aqiText.setText(weather.aqi.city.aqi); pm25Text.setText(weather.aqi.city.pm25); } String comfort = "" + weather.suggestion.comfort.info; String carWash = "" + weather.suggestion.carWash.info; String sport = "" + weather.suggestion.sport.info; comfortText.setText(comfort); carWashText.setText(carWash); sportText.setText(sport); weatherLayout.setVisibility(View.VISIBLE); Intent intent = new Intent(this, AutoUpdateService.class); startService(intent); } private void loadBingPic() { String requestBingPic = "http://guolin.tech/api/bing_pic"; HttpUtil.sendOkHttpRequest(requestBingPic, new okhttp3.Callback() { @Override public void onResponse(Call call, Response response) throws IOException { final String bingPic = response.body().string(); SharedPreferences.Editor editor = PreferenceManager.<API key>(WeatherActivity.this).edit(); editor.putString("bing_pic", bingPic); editor.apply(); runOnUiThread(new Runnable() { @Override public void run() { Glide.with(WeatherActivity.this).load(bingPic).into(bingPicImg); } }); } @Override public void onFailure(Call call, IOException e) { e.printStackTrace(); } }); } }
<!DOCTYPE HTML PUBLIC "- <!--NewPage <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_20) on Sat Jul 16 17:38:37 CEST 2011 --> <TITLE> <API key> </TITLE> <META NAME="date" CONTENT="2011-07-16"> <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="<API key>"; } } </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="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/<API key>.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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-files/index-1.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;<A HREF="../../../../../../org/jboss/shrinkwrap/descriptor/impl/javaee5/IconTypeImpl.html" title="class in org.jboss.shrinkwrap.descriptor.impl.javaee5"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../../../org/jboss/shrinkwrap/descriptor/impl/javaee5/<API key>.html" title="class in org.jboss.shrinkwrap.descriptor.impl.javaee5"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/jboss/shrinkwrap/descriptor/impl/javaee5/<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> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <HR> <H2> <FONT SIZE="-1"> org.jboss.shrinkwrap.descriptor.impl.javaee5</FONT> <BR> Class <API key></H2> <PRE> java.lang.Object <IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>org.jboss.shrinkwrap.descriptor.impl.javaee5.<API key></B> </PRE> <HR> <DL> <DT><PRE>public class <B><API key></B><DT>extends java.lang.Object</DL> </PRE> <P> <HR> <P> <A NAME="constructor_summary"></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../../org/jboss/shrinkwrap/descriptor/impl/javaee5/<API key>.html#<API key>()"><API key></A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <A NAME="method_summary"></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../org/jboss/shrinkwrap/descriptor/impl/javaee5/<API key>.html#testLargeIcon()">testLargeIcon</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../../org/jboss/shrinkwrap/descriptor/impl/javaee5/<API key>.html#testSmallIcon()">testSmallIcon</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp;<A NAME="<API key>.lang.Object"></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="<API key>"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> &nbsp; <P> <A NAME="constructor_detail"></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="<API key>()"></A><H3> <API key></H3> <PRE> public <B><API key></B>()</PRE> <DL> </DL> <A NAME="method_detail"></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="testSmallIcon()"></A><H3> testSmallIcon</H3> <PRE> public void <B>testSmallIcon</B>() throws java.lang.Exception</PRE> <DL> <DD><DL> <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> </DL> <HR> <A NAME="testLargeIcon()"></A><H3> testLargeIcon</H3> <PRE> public void <B>testLargeIcon</B>() throws java.lang.Exception</PRE> <DL> <DD><DL> <DT><B>Throws:</B> <DD><CODE>java.lang.Exception</CODE></DL> </DD> </DL> <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="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/<API key>.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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-files/index-1.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;<A HREF="../../../../../../org/jboss/shrinkwrap/descriptor/impl/javaee5/IconTypeImpl.html" title="class in org.jboss.shrinkwrap.descriptor.impl.javaee5"><B>PREV CLASS</B></A>&nbsp; &nbsp;<A HREF="../../../../../../org/jboss/shrinkwrap/descriptor/impl/javaee5/<API key>.html" title="class in org.jboss.shrinkwrap.descriptor.impl.javaee5"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/jboss/shrinkwrap/descriptor/impl/javaee5/<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> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <HR> </BODY> </HTML>
/** * <API key>.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package org.springframework.ws.axis1.case2.contractfirst.<API key>; public class <API key> extends org.apache.axis.client.Stub implements org.springframework.ws.axis1.case2.contractfirst.<API key>.EchoEndpoint { private java.util.Vector cachedSerClasses = new java.util.Vector(); private java.util.Vector cachedSerQNames = new java.util.Vector(); private java.util.Vector cachedSerFactories = new java.util.Vector(); private java.util.Vector <API key> = new java.util.Vector(); static org.apache.axis.description.OperationDesc [] _operations; static { _operations = new org.apache.axis.description.OperationDesc[1]; _initOperationDesc1(); } private static void _initOperationDesc1(){ org.apache.axis.description.OperationDesc oper; org.apache.axis.description.ParameterDesc param; oper = new org.apache.axis.description.OperationDesc(); oper.setName("echo"); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http: oper.addParameter(param); param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http: oper.addParameter(param); oper.setReturnType(new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "Result1")); oper.setReturnClass(org.springframework.ws.axis1.case2.contractfirst.<API key>.Result1.class); oper.setReturnQName(new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "echoReturn")); oper.setStyle(org.apache.axis.constants.Style.DOCUMENT); oper.setUse(org.apache.axis.constants.Use.LITERAL); _operations[0] = oper; } public <API key>() throws org.apache.axis.AxisFault { this(null); } public <API key>(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { this(service); super.cachedEndpoint = endpointURL; } public <API key>(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { if (service == null) { super.service = new org.apache.axis.client.Service(); } else { super.service = service; } ((org.apache.axis.client.Service)super.service).<API key>("1.2"); java.lang.Class cls; javax.xml.namespace.QName qName; javax.xml.namespace.QName qName2; java.lang.Class beansf = org.apache.axis.encoding.ser.<API key>.class; java.lang.Class beandf = org.apache.axis.encoding.ser.<API key>.class; java.lang.Class enumsf = org.apache.axis.encoding.ser.<API key>.class; java.lang.Class enumdf = org.apache.axis.encoding.ser.<API key>.class; java.lang.Class arraysf = org.apache.axis.encoding.ser.<API key>.class; java.lang.Class arraydf = org.apache.axis.encoding.ser.<API key>.class; java.lang.Class simplesf = org.apache.axis.encoding.ser.<API key>.class; java.lang.Class simpledf = org.apache.axis.encoding.ser.<API key>.class; java.lang.Class simplelistsf = org.apache.axis.encoding.ser.<API key>.class; java.lang.Class simplelistdf = org.apache.axis.encoding.ser.<API key>.class; qName = new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "ArrayOf_xsd_byte"); cachedSerQNames.add(qName); cls = byte[].class; cachedSerClasses.add(cls); qName = new javax.xml.namespace.QName("http: qName2 = new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "item"); cachedSerFactories.add(new org.apache.axis.encoding.ser.<API key>(qName, qName2)); <API key>.add(new org.apache.axis.encoding.ser.<API key>()); qName = new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "ArrayOf_xsd_decimal"); cachedSerQNames.add(qName); cls = java.math.BigDecimal[].class; cachedSerClasses.add(cls); qName = new javax.xml.namespace.QName("http: qName2 = new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "item"); cachedSerFactories.add(new org.apache.axis.encoding.ser.<API key>(qName, qName2)); <API key>.add(new org.apache.axis.encoding.ser.<API key>()); qName = new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "ArrayOf_xsd_string"); cachedSerQNames.add(qName); cls = java.lang.String[].class; cachedSerClasses.add(cls); qName = new javax.xml.namespace.QName("http: qName2 = new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "item"); cachedSerFactories.add(new org.apache.axis.encoding.ser.<API key>(qName, qName2)); <API key>.add(new org.apache.axis.encoding.ser.<API key>()); qName = new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "ArrayOfParam3"); cachedSerQNames.add(qName); cls = org.springframework.ws.axis1.case2.contractfirst.<API key>.Param3[].class; cachedSerClasses.add(cls); qName = new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "Param3"); qName2 = new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "item"); cachedSerFactories.add(new org.apache.axis.encoding.ser.<API key>(qName, qName2)); <API key>.add(new org.apache.axis.encoding.ser.<API key>()); qName = new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "Param1"); cachedSerQNames.add(qName); cls = org.springframework.ws.axis1.case2.contractfirst.<API key>.Param1.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); <API key>.add(beandf); qName = new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "Param2"); cachedSerQNames.add(qName); cls = org.springframework.ws.axis1.case2.contractfirst.<API key>.Param2.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); <API key>.add(beandf); qName = new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "Param3"); cachedSerQNames.add(qName); cls = org.springframework.ws.axis1.case2.contractfirst.<API key>.Param3.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); <API key>.add(beandf); qName = new javax.xml.namespace.QName("http://codefirst.case2.axis1.ws.springframework.org", "Result1"); cachedSerQNames.add(qName); cls = org.springframework.ws.axis1.case2.contractfirst.<API key>.Result1.class; cachedSerClasses.add(cls); cachedSerFactories.add(beansf); <API key>.add(beandf); } protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { try { org.apache.axis.client.Call _call = super._createCall(); if (super.maintainSessionSet) { _call.setMaintainSession(super.maintainSession); } if (super.cachedUsername != null) { _call.setUsername(super.cachedUsername); } if (super.cachedPassword != null) { _call.setPassword(super.cachedPassword); } if (super.cachedEndpoint != null) { _call.<API key>(super.cachedEndpoint); } if (super.cachedTimeout != null) { _call.setTimeout(super.cachedTimeout); } if (super.cachedPortName != null) { _call.setPortName(super.cachedPortName); } java.util.Enumeration keys = super.cachedProperties.keys(); while (keys.hasMoreElements()) { java.lang.String key = (java.lang.String) keys.nextElement(); _call.setProperty(key, super.cachedProperties.get(key)); } // All the type mapping information is registered // when the first call is made. // The type mapping information is actually registered in // the TypeMappingRegistry of the service, which // is the reason why registration is only needed for the first call. synchronized (this) { if (firstCall()) { // must set encoding style before registering serializers _call.setEncodingStyle(null); for (int i = 0; i < cachedSerFactories.size(); ++i) { java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i); javax.xml.namespace.QName qName = (javax.xml.namespace.QName) cachedSerQNames.get(i); java.lang.Object x = cachedSerFactories.get(i); if (x instanceof Class) { java.lang.Class sf = (java.lang.Class) cachedSerFactories.get(i); java.lang.Class df = (java.lang.Class) <API key>.get(i); _call.registerTypeMapping(cls, qName, sf, df, false); } else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) { org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory) cachedSerFactories.get(i); org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory) <API key>.get(i); _call.registerTypeMapping(cls, qName, sf, df, false); } } } } return _call; } catch (java.lang.Throwable _t) { throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t); } } public org.springframework.ws.axis1.case2.contractfirst.<API key>.Result1 echo(org.springframework.ws.axis1.case2.contractfirst.<API key>.Param1 param, org.springframework.ws.axis1.case2.contractfirst.<API key>.Param2 param2) throws java.rmi.RemoteException { if (super.cachedEndpoint == null) { throw new org.apache.axis.NoEndPointException(); } org.apache.axis.client.Call _call = createCall(); _call.setOperation(_operations[0]); _call.setUseSOAPAction(true); _call.setSOAPActionURI("echo"); _call.setEncodingStyle(null); _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE); _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE); _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS); _call.setOperationName(new javax.xml.namespace.QName("", "echo")); setRequestHeaders(_call); setAttachments(_call); try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {param, param2}); if (_resp instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException)_resp; } else { extractAttachments(_call); try { return (org.springframework.ws.axis1.case2.contractfirst.<API key>.Result1) _resp; } catch (java.lang.Exception _exception) { return (org.springframework.ws.axis1.case2.contractfirst.<API key>.Result1) org.apache.axis.utils.JavaUtils.convert(_resp, org.springframework.ws.axis1.case2.contractfirst.<API key>.Result1.class); } } } catch (org.apache.axis.AxisFault axisFaultException) { throw axisFaultException; } } }
<?php namespace Bpm\Controller; use Common\Controller\BaseRestController; class WorkflowController extends BaseRestController { public function _EM_get_full_data() { $data = D('Bpm/Workflow')->to_language(I('get.id')); $this->response(['workflow'=>$data]); } /* * POST * */ public function _EM_node_post() { $source_id = I('get.source_id'); $node_id = I('get.node_id'); $workflow = D('Bpm/Workflow'); $node = D('Bpm/WorkflowNode')->where(['id'=>$node_id])->find(); $result = $workflow->exec($node['workflow_id'], $source_id, $node_id); if(false === $result) { $this->error($workflow->getError()); } } public function _EM_start_workflow() { $workflow_id = I('post.workflow_id'); $source_module = I('post.source_model'); $source_id = I('post.source_id'); $service = D(model_alias_to_name($source_module)); $source_data = $service->where(['id'=>$source_id])->find(); if(!$source_data) { return; } $workflow_service = D('Bpm/Workflow'); $workflow_result = $workflow_service->start_progress($workflow_id, $source_id, $source_data); if(false === $workflow_result) { $this->error($workflow_service->getError()); $this->rollback(); return false; } $service->where(['id'=>$source_id])->save([ 'workflow_id' => $workflow_id ]); } }
using EPiServer.Recommendations.Commerce.Tracking; using System.Collections.Generic; namespace EPiServer.Reference.Commerce.Site.Features.Recommendations.ViewModels { public abstract class <API key> { public IList<string> Images { get; set; } public IEnumerable<Recommendation> AlternativeProducts { get; set; } public IEnumerable<Recommendation> CrossSellProducts { get; set; } } }
package ch02; public class DebugLinkList { public static void main(String[] args) throws Exception { System.out.println("3"); LinkList L = new LinkList(3, true); System.out.println(""); L.display(); System.out.println(":" + L.length()); if (L.get(2) != null) System.out.println("2:" + L.get(2)); int order = L.indexOf("c"); if (order != -1) System.out.println("c" + order); else System.out.println("'c'"); L.remove(2); System.out.println(""); L.display(); L.insert(2, 'd'); System.out.println("2d"); L.display(); L.clear(); System.out.println(":"); if (L.isEmpty()) System.out.println(""); else { System.out.println(","); L.display(); } } } // 1 2 3 // 1 2 3 // 1 2 // 1 2 d
"""Support for Google Assistant Smart Home API.""" from asyncio import gather from collections.abc import Mapping from itertools import product import logging from homeassistant.util.decorator import Registry from homeassistant.core import callback from homeassistant.const import ( <API key>, CONF_NAME, STATE_UNAVAILABLE, <API key>, ATTR_ENTITY_ID, ) from homeassistant.components import ( camera, climate, cover, fan, group, input_boolean, light, lock, media_player, scene, script, switch, vacuum, ) from . import trait from .const import ( TYPE_LIGHT, TYPE_LOCK, TYPE_SCENE, TYPE_SWITCH, TYPE_VACUUM, TYPE_THERMOSTAT, TYPE_FAN, TYPE_CAMERA, TYPE_BLINDS, CONF_ALIASES, CONF_ROOM_HINT, <API key>, ERR_PROTOCOL_ERROR, ERR_DEVICE_OFFLINE, ERR_UNKNOWN_ERROR, <API key>, EVENT_SYNC_RECEIVED, <API key> ) from .helpers import SmartHomeError, RequestData HANDLERS = Registry() _LOGGER = logging.getLogger(__name__) <API key> = { camera.DOMAIN: TYPE_CAMERA, climate.DOMAIN: TYPE_THERMOSTAT, cover.DOMAIN: TYPE_BLINDS, fan.DOMAIN: TYPE_FAN, group.DOMAIN: TYPE_SWITCH, input_boolean.DOMAIN: TYPE_SWITCH, light.DOMAIN: TYPE_LIGHT, lock.DOMAIN: TYPE_LOCK, media_player.DOMAIN: TYPE_SWITCH, scene.DOMAIN: TYPE_SCENE, script.DOMAIN: TYPE_SCENE, switch.DOMAIN: TYPE_SWITCH, vacuum.DOMAIN: TYPE_VACUUM, } def deep_update(target, source): """Update a nested dictionary with another nested dictionary.""" for key, value in source.items(): if isinstance(value, Mapping): target[key] = deep_update(target.get(key, {}), value) else: target[key] = value return target class _GoogleEntity: """Adaptation of Entity expressed in Google's terms.""" def __init__(self, hass, config, state): self.hass = hass self.config = config self.state = state self._traits = None @property def entity_id(self): """Return entity ID.""" return self.state.entity_id @callback def traits(self): """Return traits for entity.""" if self._traits is not None: return self._traits state = self.state domain = state.domain features = state.attributes.get(<API key>, 0) self._traits = [Trait(self.hass, state, self.config) for Trait in trait.TRAITS if Trait.supported(domain, features)] return self._traits async def sync_serialize(self): state = self.state # When a state is unavailable, the attributes that describe # capabilities will be stripped. For example, a light entity will miss # the min/max mireds. Therefore they will be excluded from a sync. if state.state == STATE_UNAVAILABLE: return None entity_config = self.config.entity_config.get(state.entity_id, {}) name = (entity_config.get(CONF_NAME) or state.name).strip() # If an empty string if not name: return None traits = self.traits() # Found no supported traits for this entity if not traits: return None device = { 'id': state.entity_id, 'name': { 'name': name }, 'attributes': {}, 'traits': [trait.name for trait in traits], 'willReportState': False, 'type': <API key>[state.domain], } # use aliases aliases = entity_config.get(CONF_ALIASES) if aliases: device['name']['nicknames'] = aliases for trt in traits: device['attributes'].update(trt.sync_attributes()) room = entity_config.get(CONF_ROOM_HINT) if room: device['roomHint'] = room return device dev_reg, ent_reg, area_reg = await gather( self.hass.helpers.device_registry.async_get_registry(), self.hass.helpers.entity_registry.async_get_registry(), self.hass.helpers.area_registry.async_get_registry(), ) entity_entry = ent_reg.async_get(state.entity_id) if not (entity_entry and entity_entry.device_id): return device device_entry = dev_reg.devices.get(entity_entry.device_id) if not (device_entry and device_entry.area_id): return device area_entry = area_reg.areas.get(device_entry.area_id) if area_entry and area_entry.name: device['roomHint'] = area_entry.name return device @callback def query_serialize(self): state = self.state if state.state == STATE_UNAVAILABLE: return {'online': False} attrs = {'online': True} for trt in self.traits(): deep_update(attrs, trt.query_attributes()) return attrs async def execute(self, command, data, params): executed = False for trt in self.traits(): if trt.can_execute(command, params): await trt.execute(command, data, params) executed = True break if not executed: raise SmartHomeError( <API key>, 'Unable to execute {} for {}'.format(command, self.state.entity_id)) @callback def async_update(self): """Update the entity with latest info from Home Assistant.""" self.state = self.hass.states.get(self.entity_id) if self._traits is None: return for trt in self._traits: trt.state = self.state async def <API key>(hass, config, user_id, message): """Handle incoming API messages.""" request_id = message.get('requestId') # type: str data = RequestData(config, user_id, request_id) response = await _process(hass, data, message) if response and 'errorCode' in response['payload']: _LOGGER.error('Error handling message %s: %s', message, response['payload']) return response async def _process(hass, data, message): """Process a message.""" inputs = message.get('inputs') # type: list if len(inputs) != 1: return { 'requestId': data.request_id, 'payload': {'errorCode': ERR_PROTOCOL_ERROR} } handler = HANDLERS.get(inputs[0].get('intent')) if handler is None: return { 'requestId': data.request_id, 'payload': {'errorCode': ERR_PROTOCOL_ERROR} } try: result = await handler(hass, data, inputs[0].get('payload')) except SmartHomeError as err: return { 'requestId': data.request_id, 'payload': {'errorCode': err.code} } except Exception: # pylint: disable=broad-except _LOGGER.exception('Unexpected error') return { 'requestId': data.request_id, 'payload': {'errorCode': ERR_UNKNOWN_ERROR} } if result is None: return None return {'requestId': data.request_id, 'payload': result} @HANDLERS.register('action.devices.SYNC') async def async_devices_sync(hass, data, payload): hass.bus.async_fire( EVENT_SYNC_RECEIVED, {'request_id': data.request_id}, context=data.context) devices = [] for state in hass.states.async_all(): if state.entity_id in <API key>: continue if not data.config.should_expose(state): continue entity = _GoogleEntity(hass, data.config, state) serialized = await entity.sync_serialize() if serialized is None: _LOGGER.debug("No mapping for %s domain", entity.state) continue devices.append(serialized) response = { 'agentUserId': data.context.user_id, 'devices': devices, } return response @HANDLERS.register('action.devices.QUERY') async def async_devices_query(hass, data, payload): devices = {} for device in payload.get('devices', []): devid = device['id'] state = hass.states.get(devid) hass.bus.async_fire( <API key>, { 'request_id': data.request_id, ATTR_ENTITY_ID: devid, }, context=data.context) if not state: # If we can't find a state, the device is offline devices[devid] = {'online': False} continue entity = _GoogleEntity(hass, data.config, state) devices[devid] = entity.query_serialize() return {'devices': devices} @HANDLERS.register('action.devices.EXECUTE') async def <API key>(hass, data, payload): entities = {} results = {} for command in payload['commands']: for device, execution in product(command['devices'], command['execution']): entity_id = device['id'] hass.bus.async_fire( <API key>, { 'request_id': data.request_id, ATTR_ENTITY_ID: entity_id, 'execution': execution }, context=data.context) # Happens if error occurred. Skip entity for further processing if entity_id in results: continue if entity_id not in entities: state = hass.states.get(entity_id) if state is None: results[entity_id] = { 'ids': [entity_id], 'status': 'ERROR', 'errorCode': ERR_DEVICE_OFFLINE } continue entities[entity_id] = _GoogleEntity(hass, data.config, state) try: await entities[entity_id].execute(execution['command'], data, execution.get('params', {})) except SmartHomeError as err: results[entity_id] = { 'ids': [entity_id], 'status': 'ERROR', 'errorCode': err.code } final_results = list(results.values()) for entity in entities.values(): if entity.entity_id in results: continue entity.async_update() final_results.append({ 'ids': [entity.entity_id], 'status': 'SUCCESS', 'states': entity.query_serialize(), }) return {'commands': final_results} @HANDLERS.register('action.devices.DISCONNECT') async def <API key>(hass, data, payload): return None def turned_off_response(message): """Return a device turned off response.""" return { 'requestId': message.get('requestId'), 'payload': {'errorCode': 'deviceTurnedOff'} }