text
stringlengths 2
99.9k
| meta
dict |
---|---|
/*
* Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "libadt/vectset.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "opto/block.hpp"
#include "opto/c2compiler.hpp"
#include "opto/callnode.hpp"
#include "opto/cfgnode.hpp"
#include "opto/machnode.hpp"
#include "opto/opcodes.hpp"
#include "opto/phaseX.hpp"
#include "opto/rootnode.hpp"
#include "opto/runtime.hpp"
#include "opto/chaitin.hpp"
#include "runtime/deoptimization.hpp"
// Portions of code courtesy of Clifford Click
// Optimization - Graph Style
// To avoid float value underflow
#define MIN_BLOCK_FREQUENCY 1.e-35f
//----------------------------schedule_node_into_block-------------------------
// Insert node n into block b. Look for projections of n and make sure they
// are in b also.
void PhaseCFG::schedule_node_into_block( Node *n, Block *b ) {
// Set basic block of n, Add n to b,
map_node_to_block(n, b);
b->add_inst(n);
// After Matching, nearly any old Node may have projections trailing it.
// These are usually machine-dependent flags. In any case, they might
// float to another block below this one. Move them up.
for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
Node* use = n->fast_out(i);
if (use->is_Proj()) {
Block* buse = get_block_for_node(use);
if (buse != b) { // In wrong block?
if (buse != NULL) {
buse->find_remove(use); // Remove from wrong block
}
map_node_to_block(use, b);
b->add_inst(use);
}
}
}
}
//----------------------------replace_block_proj_ctrl-------------------------
// Nodes that have is_block_proj() nodes as their control need to use
// the appropriate Region for their actual block as their control since
// the projection will be in a predecessor block.
void PhaseCFG::replace_block_proj_ctrl( Node *n ) {
const Node *in0 = n->in(0);
assert(in0 != NULL, "Only control-dependent");
const Node *p = in0->is_block_proj();
if (p != NULL && p != n) { // Control from a block projection?
assert(!n->pinned() || n->is_MachConstantBase(), "only pinned MachConstantBase node is expected here");
// Find trailing Region
Block *pb = get_block_for_node(in0); // Block-projection already has basic block
uint j = 0;
if (pb->_num_succs != 1) { // More then 1 successor?
// Search for successor
uint max = pb->number_of_nodes();
assert( max > 1, "" );
uint start = max - pb->_num_succs;
// Find which output path belongs to projection
for (j = start; j < max; j++) {
if( pb->get_node(j) == in0 )
break;
}
assert( j < max, "must find" );
// Change control to match head of successor basic block
j -= start;
}
n->set_req(0, pb->_succs[j]->head());
}
}
bool PhaseCFG::is_dominator(Node* dom_node, Node* node) {
assert(is_CFG(node) && is_CFG(dom_node), "node and dom_node must be CFG nodes");
if (dom_node == node) {
return true;
}
Block* d = find_block_for_node(dom_node);
Block* n = find_block_for_node(node);
assert(n != NULL && d != NULL, "blocks must exist");
if (d == n) {
if (dom_node->is_block_start()) {
return true;
}
if (node->is_block_start()) {
return false;
}
if (dom_node->is_block_proj()) {
return false;
}
if (node->is_block_proj()) {
return true;
}
assert(is_control_proj_or_safepoint(node), "node must be control projection or safepoint");
assert(is_control_proj_or_safepoint(dom_node), "dom_node must be control projection or safepoint");
// Neither 'node' nor 'dom_node' is a block start or block projection.
// Check if 'dom_node' is above 'node' in the control graph.
if (is_dominating_control(dom_node, node)) {
return true;
}
#ifdef ASSERT
// If 'dom_node' does not dominate 'node' then 'node' has to dominate 'dom_node'
if (!is_dominating_control(node, dom_node)) {
node->dump();
dom_node->dump();
assert(false, "neither dom_node nor node dominates the other");
}
#endif
return false;
}
return d->dom_lca(n) == d;
}
bool PhaseCFG::is_CFG(Node* n) {
return n->is_block_proj() || n->is_block_start() || is_control_proj_or_safepoint(n);
}
bool PhaseCFG::is_control_proj_or_safepoint(Node* n) {
bool result = (n->is_Mach() && n->as_Mach()->ideal_Opcode() == Op_SafePoint) || (n->is_Proj() && n->as_Proj()->bottom_type() == Type::CONTROL);
assert(!result || (n->is_Mach() && n->as_Mach()->ideal_Opcode() == Op_SafePoint)
|| (n->is_Proj() && n->as_Proj()->_con == 0), "If control projection, it must be projection 0");
return result;
}
Block* PhaseCFG::find_block_for_node(Node* n) {
if (n->is_block_start() || n->is_block_proj()) {
return get_block_for_node(n);
} else {
// Walk the control graph up if 'n' is not a block start nor a block projection. In this case 'n' must be
// an unmatched control projection or a not yet matched safepoint precedence edge in the middle of a block.
assert(is_control_proj_or_safepoint(n), "must be control projection or safepoint");
Node* ctrl = n->in(0);
while (!ctrl->is_block_start()) {
ctrl = ctrl->in(0);
}
return get_block_for_node(ctrl);
}
}
// Walk up the control graph from 'n' and check if 'dom_ctrl' is found.
bool PhaseCFG::is_dominating_control(Node* dom_ctrl, Node* n) {
Node* ctrl = n->in(0);
while (!ctrl->is_block_start()) {
if (ctrl == dom_ctrl) {
return true;
}
ctrl = ctrl->in(0);
}
return false;
}
//------------------------------schedule_pinned_nodes--------------------------
// Set the basic block for Nodes pinned into blocks
void PhaseCFG::schedule_pinned_nodes(VectorSet &visited) {
// Allocate node stack of size C->live_nodes()+8 to avoid frequent realloc
GrowableArray <Node*> spstack(C->live_nodes() + 8);
spstack.push(_root);
while (spstack.is_nonempty()) {
Node* node = spstack.pop();
if (!visited.test_set(node->_idx)) { // Test node and flag it as visited
if (node->pinned() && !has_block(node)) { // Pinned? Nail it down!
assert(node->in(0), "pinned Node must have Control");
// Before setting block replace block_proj control edge
replace_block_proj_ctrl(node);
Node* input = node->in(0);
while (!input->is_block_start()) {
input = input->in(0);
}
Block* block = get_block_for_node(input); // Basic block of controlling input
schedule_node_into_block(node, block);
}
// If the node has precedence edges (added when CastPP nodes are
// removed in final_graph_reshaping), fix the control of the
// node to cover the precedence edges and remove the
// dependencies.
Node* n = NULL;
for (uint i = node->len()-1; i >= node->req(); i--) {
Node* m = node->in(i);
if (m == NULL) continue;
// Only process precedence edges that are CFG nodes. Safepoints and control projections can be in the middle of a block
if (is_CFG(m)) {
node->rm_prec(i);
if (n == NULL) {
n = m;
} else {
assert(is_dominator(n, m) || is_dominator(m, n), "one must dominate the other");
n = is_dominator(n, m) ? m : n;
}
} else {
assert(node->is_Mach(), "sanity");
assert(node->as_Mach()->ideal_Opcode() == Op_StoreCM, "must be StoreCM node");
}
}
if (n != NULL) {
assert(node->in(0), "control should have been set");
assert(is_dominator(n, node->in(0)) || is_dominator(node->in(0), n), "one must dominate the other");
if (!is_dominator(n, node->in(0))) {
node->set_req(0, n);
}
}
// process all inputs that are non NULL
for (int i = node->req()-1; i >= 0; --i) {
if (node->in(i) != NULL) {
spstack.push(node->in(i));
}
}
}
}
}
#ifdef ASSERT
// Assert that new input b2 is dominated by all previous inputs.
// Check this by by seeing that it is dominated by b1, the deepest
// input observed until b2.
static void assert_dom(Block* b1, Block* b2, Node* n, const PhaseCFG* cfg) {
if (b1 == NULL) return;
assert(b1->_dom_depth < b2->_dom_depth, "sanity");
Block* tmp = b2;
while (tmp != b1 && tmp != NULL) {
tmp = tmp->_idom;
}
if (tmp != b1) {
// Detected an unschedulable graph. Print some nice stuff and die.
tty->print_cr("!!! Unschedulable graph !!!");
for (uint j=0; j<n->len(); j++) { // For all inputs
Node* inn = n->in(j); // Get input
if (inn == NULL) continue; // Ignore NULL, missing inputs
Block* inb = cfg->get_block_for_node(inn);
tty->print("B%d idom=B%d depth=%2d ",inb->_pre_order,
inb->_idom ? inb->_idom->_pre_order : 0, inb->_dom_depth);
inn->dump();
}
tty->print("Failing node: ");
n->dump();
assert(false, "unscheduable graph");
}
}
#endif
static Block* find_deepest_input(Node* n, const PhaseCFG* cfg) {
// Find the last input dominated by all other inputs.
Block* deepb = NULL; // Deepest block so far
int deepb_dom_depth = 0;
for (uint k = 0; k < n->len(); k++) { // For all inputs
Node* inn = n->in(k); // Get input
if (inn == NULL) continue; // Ignore NULL, missing inputs
Block* inb = cfg->get_block_for_node(inn);
assert(inb != NULL, "must already have scheduled this input");
if (deepb_dom_depth < (int) inb->_dom_depth) {
// The new inb must be dominated by the previous deepb.
// The various inputs must be linearly ordered in the dom
// tree, or else there will not be a unique deepest block.
DEBUG_ONLY(assert_dom(deepb, inb, n, cfg));
deepb = inb; // Save deepest block
deepb_dom_depth = deepb->_dom_depth;
}
}
assert(deepb != NULL, "must be at least one input to n");
return deepb;
}
//------------------------------schedule_early---------------------------------
// Find the earliest Block any instruction can be placed in. Some instructions
// are pinned into Blocks. Unpinned instructions can appear in last block in
// which all their inputs occur.
bool PhaseCFG::schedule_early(VectorSet &visited, Node_Stack &roots) {
// Allocate stack with enough space to avoid frequent realloc
Node_Stack nstack(roots.size() + 8);
// _root will be processed among C->top() inputs
roots.push(C->top(), 0);
visited.set(C->top()->_idx);
while (roots.size() != 0) {
// Use local variables nstack_top_n & nstack_top_i to cache values
// on stack's top.
Node* parent_node = roots.node();
uint input_index = 0;
roots.pop();
while (true) {
if (input_index == 0) {
// Fixup some control. Constants without control get attached
// to root and nodes that use is_block_proj() nodes should be attached
// to the region that starts their block.
const Node* control_input = parent_node->in(0);
if (control_input != NULL) {
replace_block_proj_ctrl(parent_node);
} else {
// Is a constant with NO inputs?
if (parent_node->req() == 1) {
parent_node->set_req(0, _root);
}
}
}
// First, visit all inputs and force them to get a block. If an
// input is already in a block we quit following inputs (to avoid
// cycles). Instead we put that Node on a worklist to be handled
// later (since IT'S inputs may not have a block yet).
// Assume all n's inputs will be processed
bool done = true;
while (input_index < parent_node->len()) {
Node* in = parent_node->in(input_index++);
if (in == NULL) {
continue;
}
int is_visited = visited.test_set(in->_idx);
if (!has_block(in)) {
if (is_visited) {
assert(false, "graph should be schedulable");
return false;
}
// Save parent node and next input's index.
nstack.push(parent_node, input_index);
// Process current input now.
parent_node = in;
input_index = 0;
// Not all n's inputs processed.
done = false;
break;
} else if (!is_visited) {
// Visit this guy later, using worklist
roots.push(in, 0);
}
}
if (done) {
// All of n's inputs have been processed, complete post-processing.
// Some instructions are pinned into a block. These include Region,
// Phi, Start, Return, and other control-dependent instructions and
// any projections which depend on them.
if (!parent_node->pinned()) {
// Set earliest legal block.
Block* earliest_block = find_deepest_input(parent_node, this);
map_node_to_block(parent_node, earliest_block);
} else {
assert(get_block_for_node(parent_node) == get_block_for_node(parent_node->in(0)), "Pinned Node should be at the same block as its control edge");
}
if (nstack.is_empty()) {
// Finished all nodes on stack.
// Process next node on the worklist 'roots'.
break;
}
// Get saved parent node and next input's index.
parent_node = nstack.node();
input_index = nstack.index();
nstack.pop();
}
}
}
return true;
}
//------------------------------dom_lca----------------------------------------
// Find least common ancestor in dominator tree
// LCA is a current notion of LCA, to be raised above 'this'.
// As a convenient boundary condition, return 'this' if LCA is NULL.
// Find the LCA of those two nodes.
Block* Block::dom_lca(Block* LCA) {
if (LCA == NULL || LCA == this) return this;
Block* anc = this;
while (anc->_dom_depth > LCA->_dom_depth)
anc = anc->_idom; // Walk up till anc is as high as LCA
while (LCA->_dom_depth > anc->_dom_depth)
LCA = LCA->_idom; // Walk up till LCA is as high as anc
while (LCA != anc) { // Walk both up till they are the same
LCA = LCA->_idom;
anc = anc->_idom;
}
return LCA;
}
//--------------------------raise_LCA_above_use--------------------------------
// We are placing a definition, and have been given a def->use edge.
// The definition must dominate the use, so move the LCA upward in the
// dominator tree to dominate the use. If the use is a phi, adjust
// the LCA only with the phi input paths which actually use this def.
static Block* raise_LCA_above_use(Block* LCA, Node* use, Node* def, const PhaseCFG* cfg) {
Block* buse = cfg->get_block_for_node(use);
if (buse == NULL) return LCA; // Unused killing Projs have no use block
if (!use->is_Phi()) return buse->dom_lca(LCA);
uint pmax = use->req(); // Number of Phi inputs
// Why does not this loop just break after finding the matching input to
// the Phi? Well...it's like this. I do not have true def-use/use-def
// chains. Means I cannot distinguish, from the def-use direction, which
// of many use-defs lead from the same use to the same def. That is, this
// Phi might have several uses of the same def. Each use appears in a
// different predecessor block. But when I enter here, I cannot distinguish
// which use-def edge I should find the predecessor block for. So I find
// them all. Means I do a little extra work if a Phi uses the same value
// more than once.
for (uint j=1; j<pmax; j++) { // For all inputs
if (use->in(j) == def) { // Found matching input?
Block* pred = cfg->get_block_for_node(buse->pred(j));
LCA = pred->dom_lca(LCA);
}
}
return LCA;
}
//----------------------------raise_LCA_above_marks----------------------------
// Return a new LCA that dominates LCA and any of its marked predecessors.
// Search all my parents up to 'early' (exclusive), looking for predecessors
// which are marked with the given index. Return the LCA (in the dom tree)
// of all marked blocks. If there are none marked, return the original
// LCA.
static Block* raise_LCA_above_marks(Block* LCA, node_idx_t mark, Block* early, const PhaseCFG* cfg) {
Block_List worklist;
worklist.push(LCA);
while (worklist.size() > 0) {
Block* mid = worklist.pop();
if (mid == early) continue; // stop searching here
// Test and set the visited bit.
if (mid->raise_LCA_visited() == mark) continue; // already visited
// Don't process the current LCA, otherwise the search may terminate early
if (mid != LCA && mid->raise_LCA_mark() == mark) {
// Raise the LCA.
LCA = mid->dom_lca(LCA);
if (LCA == early) break; // stop searching everywhere
assert(early->dominates(LCA), "early is high enough");
// Resume searching at that point, skipping intermediate levels.
worklist.push(LCA);
if (LCA == mid)
continue; // Don't mark as visited to avoid early termination.
} else {
// Keep searching through this block's predecessors.
for (uint j = 1, jmax = mid->num_preds(); j < jmax; j++) {
Block* mid_parent = cfg->get_block_for_node(mid->pred(j));
worklist.push(mid_parent);
}
}
mid->set_raise_LCA_visited(mark);
}
return LCA;
}
//--------------------------memory_early_block--------------------------------
// This is a variation of find_deepest_input, the heart of schedule_early.
// Find the "early" block for a load, if we considered only memory and
// address inputs, that is, if other data inputs were ignored.
//
// Because a subset of edges are considered, the resulting block will
// be earlier (at a shallower dom_depth) than the true schedule_early
// point of the node. We compute this earlier block as a more permissive
// site for anti-dependency insertion, but only if subsume_loads is enabled.
static Block* memory_early_block(Node* load, Block* early, const PhaseCFG* cfg) {
Node* base;
Node* index;
Node* store = load->in(MemNode::Memory);
load->as_Mach()->memory_inputs(base, index);
assert(base != NodeSentinel && index != NodeSentinel,
"unexpected base/index inputs");
Node* mem_inputs[4];
int mem_inputs_length = 0;
if (base != NULL) mem_inputs[mem_inputs_length++] = base;
if (index != NULL) mem_inputs[mem_inputs_length++] = index;
if (store != NULL) mem_inputs[mem_inputs_length++] = store;
// In the comparision below, add one to account for the control input,
// which may be null, but always takes up a spot in the in array.
if (mem_inputs_length + 1 < (int) load->req()) {
// This "load" has more inputs than just the memory, base and index inputs.
// For purposes of checking anti-dependences, we need to start
// from the early block of only the address portion of the instruction,
// and ignore other blocks that may have factored into the wider
// schedule_early calculation.
if (load->in(0) != NULL) mem_inputs[mem_inputs_length++] = load->in(0);
Block* deepb = NULL; // Deepest block so far
int deepb_dom_depth = 0;
for (int i = 0; i < mem_inputs_length; i++) {
Block* inb = cfg->get_block_for_node(mem_inputs[i]);
if (deepb_dom_depth < (int) inb->_dom_depth) {
// The new inb must be dominated by the previous deepb.
// The various inputs must be linearly ordered in the dom
// tree, or else there will not be a unique deepest block.
DEBUG_ONLY(assert_dom(deepb, inb, load, cfg));
deepb = inb; // Save deepest block
deepb_dom_depth = deepb->_dom_depth;
}
}
early = deepb;
}
return early;
}
//--------------------------insert_anti_dependences---------------------------
// A load may need to witness memory that nearby stores can overwrite.
// For each nearby store, either insert an "anti-dependence" edge
// from the load to the store, or else move LCA upward to force the
// load to (eventually) be scheduled in a block above the store.
//
// Do not add edges to stores on distinct control-flow paths;
// only add edges to stores which might interfere.
//
// Return the (updated) LCA. There will not be any possibly interfering
// store between the load's "early block" and the updated LCA.
// Any stores in the updated LCA will have new precedence edges
// back to the load. The caller is expected to schedule the load
// in the LCA, in which case the precedence edges will make LCM
// preserve anti-dependences. The caller may also hoist the load
// above the LCA, if it is not the early block.
Block* PhaseCFG::insert_anti_dependences(Block* LCA, Node* load, bool verify) {
assert(load->needs_anti_dependence_check(), "must be a load of some sort");
assert(LCA != NULL, "");
DEBUG_ONLY(Block* LCA_orig = LCA);
// Compute the alias index. Loads and stores with different alias indices
// do not need anti-dependence edges.
int load_alias_idx = C->get_alias_index(load->adr_type());
#ifdef ASSERT
assert(Compile::AliasIdxTop <= load_alias_idx && load_alias_idx < C->num_alias_types(), "Invalid alias index");
if (load_alias_idx == Compile::AliasIdxBot && C->AliasLevel() > 0 &&
(PrintOpto || VerifyAliases ||
(PrintMiscellaneous && (WizardMode || Verbose)))) {
// Load nodes should not consume all of memory.
// Reporting a bottom type indicates a bug in adlc.
// If some particular type of node validly consumes all of memory,
// sharpen the preceding "if" to exclude it, so we can catch bugs here.
tty->print_cr("*** Possible Anti-Dependence Bug: Load consumes all of memory.");
load->dump(2);
if (VerifyAliases) assert(load_alias_idx != Compile::AliasIdxBot, "");
}
#endif
if (!C->alias_type(load_alias_idx)->is_rewritable()) {
// It is impossible to spoil this load by putting stores before it,
// because we know that the stores will never update the value
// which 'load' must witness.
return LCA;
}
node_idx_t load_index = load->_idx;
// Note the earliest legal placement of 'load', as determined by
// by the unique point in the dom tree where all memory effects
// and other inputs are first available. (Computed by schedule_early.)
// For normal loads, 'early' is the shallowest place (dom graph wise)
// to look for anti-deps between this load and any store.
Block* early = get_block_for_node(load);
// If we are subsuming loads, compute an "early" block that only considers
// memory or address inputs. This block may be different than the
// schedule_early block in that it could be at an even shallower depth in the
// dominator tree, and allow for a broader discovery of anti-dependences.
if (C->subsume_loads()) {
early = memory_early_block(load, early, this);
}
ResourceArea *area = Thread::current()->resource_area();
Node_List worklist_mem(area); // prior memory state to store
Node_List worklist_store(area); // possible-def to explore
Node_List worklist_visited(area); // visited mergemem nodes
Node_List non_early_stores(area); // all relevant stores outside of early
bool must_raise_LCA = false;
#ifdef TRACK_PHI_INPUTS
// %%% This extra checking fails because MergeMem nodes are not GVNed.
// Provide "phi_inputs" to check if every input to a PhiNode is from the
// original memory state. This indicates a PhiNode for which should not
// prevent the load from sinking. For such a block, set_raise_LCA_mark
// may be overly conservative.
// Mechanism: count inputs seen for each Phi encountered in worklist_store.
DEBUG_ONLY(GrowableArray<uint> phi_inputs(area, C->unique(),0,0));
#endif
// 'load' uses some memory state; look for users of the same state.
// Recurse through MergeMem nodes to the stores that use them.
// Each of these stores is a possible definition of memory
// that 'load' needs to use. We need to force 'load'
// to occur before each such store. When the store is in
// the same block as 'load', we insert an anti-dependence
// edge load->store.
// The relevant stores "nearby" the load consist of a tree rooted
// at initial_mem, with internal nodes of type MergeMem.
// Therefore, the branches visited by the worklist are of this form:
// initial_mem -> (MergeMem ->)* store
// The anti-dependence constraints apply only to the fringe of this tree.
Node* initial_mem = load->in(MemNode::Memory);
worklist_store.push(initial_mem);
worklist_visited.push(initial_mem);
worklist_mem.push(NULL);
while (worklist_store.size() > 0) {
// Examine a nearby store to see if it might interfere with our load.
Node* mem = worklist_mem.pop();
Node* store = worklist_store.pop();
uint op = store->Opcode();
// MergeMems do not directly have anti-deps.
// Treat them as internal nodes in a forward tree of memory states,
// the leaves of which are each a 'possible-def'.
if (store == initial_mem // root (exclusive) of tree we are searching
|| op == Op_MergeMem // internal node of tree we are searching
) {
mem = store; // It's not a possibly interfering store.
if (store == initial_mem)
initial_mem = NULL; // only process initial memory once
for (DUIterator_Fast imax, i = mem->fast_outs(imax); i < imax; i++) {
store = mem->fast_out(i);
if (store->is_MergeMem()) {
// Be sure we don't get into combinatorial problems.
// (Allow phis to be repeated; they can merge two relevant states.)
uint j = worklist_visited.size();
for (; j > 0; j--) {
if (worklist_visited.at(j-1) == store) break;
}
if (j > 0) continue; // already on work list; do not repeat
worklist_visited.push(store);
}
worklist_mem.push(mem);
worklist_store.push(store);
}
continue;
}
if (op == Op_MachProj || op == Op_Catch) continue;
if (store->needs_anti_dependence_check()) continue; // not really a store
// Compute the alias index. Loads and stores with different alias
// indices do not need anti-dependence edges. Wide MemBar's are
// anti-dependent on everything (except immutable memories).
const TypePtr* adr_type = store->adr_type();
if (!C->can_alias(adr_type, load_alias_idx)) continue;
// Most slow-path runtime calls do NOT modify Java memory, but
// they can block and so write Raw memory.
if (store->is_Mach()) {
MachNode* mstore = store->as_Mach();
if (load_alias_idx != Compile::AliasIdxRaw) {
// Check for call into the runtime using the Java calling
// convention (and from there into a wrapper); it has no
// _method. Can't do this optimization for Native calls because
// they CAN write to Java memory.
if (mstore->ideal_Opcode() == Op_CallStaticJava) {
assert(mstore->is_MachSafePoint(), "");
MachSafePointNode* ms = (MachSafePointNode*) mstore;
assert(ms->is_MachCallJava(), "");
MachCallJavaNode* mcj = (MachCallJavaNode*) ms;
if (mcj->_method == NULL) {
// These runtime calls do not write to Java visible memory
// (other than Raw) and so do not require anti-dependence edges.
continue;
}
}
// Same for SafePoints: they read/write Raw but only read otherwise.
// This is basically a workaround for SafePoints only defining control
// instead of control + memory.
if (mstore->ideal_Opcode() == Op_SafePoint)
continue;
} else {
// Some raw memory, such as the load of "top" at an allocation,
// can be control dependent on the previous safepoint. See
// comments in GraphKit::allocate_heap() about control input.
// Inserting an anti-dep between such a safepoint and a use
// creates a cycle, and will cause a subsequent failure in
// local scheduling. (BugId 4919904)
// (%%% How can a control input be a safepoint and not a projection??)
if (mstore->ideal_Opcode() == Op_SafePoint && load->in(0) == mstore)
continue;
}
}
// Identify a block that the current load must be above,
// or else observe that 'store' is all the way up in the
// earliest legal block for 'load'. In the latter case,
// immediately insert an anti-dependence edge.
Block* store_block = get_block_for_node(store);
assert(store_block != NULL, "unused killing projections skipped above");
if (store->is_Phi()) {
// Loop-phis need to raise load before input. (Other phis are treated
// as store below.)
//
// 'load' uses memory which is one (or more) of the Phi's inputs.
// It must be scheduled not before the Phi, but rather before
// each of the relevant Phi inputs.
//
// Instead of finding the LCA of all inputs to a Phi that match 'mem',
// we mark each corresponding predecessor block and do a combined
// hoisting operation later (raise_LCA_above_marks).
//
// Do not assert(store_block != early, "Phi merging memory after access")
// PhiNode may be at start of block 'early' with backedge to 'early'
DEBUG_ONLY(bool found_match = false);
for (uint j = PhiNode::Input, jmax = store->req(); j < jmax; j++) {
if (store->in(j) == mem) { // Found matching input?
DEBUG_ONLY(found_match = true);
Block* pred_block = get_block_for_node(store_block->pred(j));
if (pred_block != early) {
// If any predecessor of the Phi matches the load's "early block",
// we do not need a precedence edge between the Phi and 'load'
// since the load will be forced into a block preceding the Phi.
pred_block->set_raise_LCA_mark(load_index);
assert(!LCA_orig->dominates(pred_block) ||
early->dominates(pred_block), "early is high enough");
must_raise_LCA = true;
} else {
// anti-dependent upon PHI pinned below 'early', no edge needed
LCA = early; // but can not schedule below 'early'
}
}
}
assert(found_match, "no worklist bug");
#ifdef TRACK_PHI_INPUTS
#ifdef ASSERT
// This assert asks about correct handling of PhiNodes, which may not
// have all input edges directly from 'mem'. See BugId 4621264
int num_mem_inputs = phi_inputs.at_grow(store->_idx,0) + 1;
// Increment by exactly one even if there are multiple copies of 'mem'
// coming into the phi, because we will run this block several times
// if there are several copies of 'mem'. (That's how DU iterators work.)
phi_inputs.at_put(store->_idx, num_mem_inputs);
assert(PhiNode::Input + num_mem_inputs < store->req(),
"Expect at least one phi input will not be from original memory state");
#endif //ASSERT
#endif //TRACK_PHI_INPUTS
} else if (store_block != early) {
// 'store' is between the current LCA and earliest possible block.
// Label its block, and decide later on how to raise the LCA
// to include the effect on LCA of this store.
// If this store's block gets chosen as the raised LCA, we
// will find him on the non_early_stores list and stick him
// with a precedence edge.
// (But, don't bother if LCA is already raised all the way.)
if (LCA != early) {
store_block->set_raise_LCA_mark(load_index);
must_raise_LCA = true;
non_early_stores.push(store);
}
} else {
// Found a possibly-interfering store in the load's 'early' block.
// This means 'load' cannot sink at all in the dominator tree.
// Add an anti-dep edge, and squeeze 'load' into the highest block.
assert(store != load->find_exact_control(load->in(0)), "dependence cycle found");
if (verify) {
assert(store->find_edge(load) != -1, "missing precedence edge");
} else {
store->add_prec(load);
}
LCA = early;
// This turns off the process of gathering non_early_stores.
}
}
// (Worklist is now empty; all nearby stores have been visited.)
// Finished if 'load' must be scheduled in its 'early' block.
// If we found any stores there, they have already been given
// precedence edges.
if (LCA == early) return LCA;
// We get here only if there are no possibly-interfering stores
// in the load's 'early' block. Move LCA up above all predecessors
// which contain stores we have noted.
//
// The raised LCA block can be a home to such interfering stores,
// but its predecessors must not contain any such stores.
//
// The raised LCA will be a lower bound for placing the load,
// preventing the load from sinking past any block containing
// a store that may invalidate the memory state required by 'load'.
if (must_raise_LCA)
LCA = raise_LCA_above_marks(LCA, load->_idx, early, this);
if (LCA == early) return LCA;
// Insert anti-dependence edges from 'load' to each store
// in the non-early LCA block.
// Mine the non_early_stores list for such stores.
if (LCA->raise_LCA_mark() == load_index) {
while (non_early_stores.size() > 0) {
Node* store = non_early_stores.pop();
Block* store_block = get_block_for_node(store);
if (store_block == LCA) {
// add anti_dependence from store to load in its own block
assert(store != load->find_exact_control(load->in(0)), "dependence cycle found");
if (verify) {
assert(store->find_edge(load) != -1, "missing precedence edge");
} else {
store->add_prec(load);
}
} else {
assert(store_block->raise_LCA_mark() == load_index, "block was marked");
// Any other stores we found must be either inside the new LCA
// or else outside the original LCA. In the latter case, they
// did not interfere with any use of 'load'.
assert(LCA->dominates(store_block)
|| !LCA_orig->dominates(store_block), "no stray stores");
}
}
}
// Return the highest block containing stores; any stores
// within that block have been given anti-dependence edges.
return LCA;
}
// This class is used to iterate backwards over the nodes in the graph.
class Node_Backward_Iterator {
private:
Node_Backward_Iterator();
public:
// Constructor for the iterator
Node_Backward_Iterator(Node *root, VectorSet &visited, Node_Stack &stack, PhaseCFG &cfg);
// Postincrement operator to iterate over the nodes
Node *next();
private:
VectorSet &_visited;
Node_Stack &_stack;
PhaseCFG &_cfg;
};
// Constructor for the Node_Backward_Iterator
Node_Backward_Iterator::Node_Backward_Iterator( Node *root, VectorSet &visited, Node_Stack &stack, PhaseCFG &cfg)
: _visited(visited), _stack(stack), _cfg(cfg) {
// The stack should contain exactly the root
stack.clear();
stack.push(root, root->outcnt());
// Clear the visited bits
visited.clear();
}
// Iterator for the Node_Backward_Iterator
Node *Node_Backward_Iterator::next() {
// If the _stack is empty, then just return NULL: finished.
if ( !_stack.size() )
return NULL;
// I visit unvisited not-anti-dependence users first, then anti-dependent
// children next. I iterate backwards to support removal of nodes.
// The stack holds states consisting of 3 values:
// current Def node, flag which indicates 1st/2nd pass, index of current out edge
Node *self = (Node*)(((uintptr_t)_stack.node()) & ~1);
bool iterate_anti_dep = (((uintptr_t)_stack.node()) & 1);
uint idx = MIN2(_stack.index(), self->outcnt()); // Support removal of nodes.
_stack.pop();
// I cycle here when I am entering a deeper level of recursion.
// The key variable 'self' was set prior to jumping here.
while( 1 ) {
_visited.set(self->_idx);
// Now schedule all uses as late as possible.
const Node* src = self->is_Proj() ? self->in(0) : self;
uint src_rpo = _cfg.get_block_for_node(src)->_rpo;
// Schedule all nodes in a post-order visit
Node *unvisited = NULL; // Unvisited anti-dependent Node, if any
// Scan for unvisited nodes
while (idx > 0) {
// For all uses, schedule late
Node* n = self->raw_out(--idx); // Use
// Skip already visited children
if ( _visited.test(n->_idx) )
continue;
// do not traverse backward control edges
Node *use = n->is_Proj() ? n->in(0) : n;
uint use_rpo = _cfg.get_block_for_node(use)->_rpo;
if ( use_rpo < src_rpo )
continue;
// Phi nodes always precede uses in a basic block
if ( use_rpo == src_rpo && use->is_Phi() )
continue;
unvisited = n; // Found unvisited
// Check for possible-anti-dependent
// 1st pass: No such nodes, 2nd pass: Only such nodes.
if (n->needs_anti_dependence_check() == iterate_anti_dep) {
unvisited = n; // Found unvisited
break;
}
}
// Did I find an unvisited not-anti-dependent Node?
if (!unvisited) {
if (!iterate_anti_dep) {
// 2nd pass: Iterate over nodes which needs_anti_dependence_check.
iterate_anti_dep = true;
idx = self->outcnt();
continue;
}
break; // All done with children; post-visit 'self'
}
// Visit the unvisited Node. Contains the obvious push to
// indicate I'm entering a deeper level of recursion. I push the
// old state onto the _stack and set a new state and loop (recurse).
_stack.push((Node*)((uintptr_t)self | (uintptr_t)iterate_anti_dep), idx);
self = unvisited;
iterate_anti_dep = false;
idx = self->outcnt();
} // End recursion loop
return self;
}
//------------------------------ComputeLatenciesBackwards----------------------
// Compute the latency of all the instructions.
void PhaseCFG::compute_latencies_backwards(VectorSet &visited, Node_Stack &stack) {
#ifndef PRODUCT
if (trace_opto_pipelining())
tty->print("\n#---- ComputeLatenciesBackwards ----\n");
#endif
Node_Backward_Iterator iter((Node *)_root, visited, stack, *this);
Node *n;
// Walk over all the nodes from last to first
while ((n = iter.next())) {
// Set the latency for the definitions of this instruction
partial_latency_of_defs(n);
}
} // end ComputeLatenciesBackwards
//------------------------------partial_latency_of_defs------------------------
// Compute the latency impact of this node on all defs. This computes
// a number that increases as we approach the beginning of the routine.
void PhaseCFG::partial_latency_of_defs(Node *n) {
// Set the latency for this instruction
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print("# latency_to_inputs: node_latency[%d] = %d for node", n->_idx, get_latency_for_node(n));
dump();
}
#endif
if (n->is_Proj()) {
n = n->in(0);
}
if (n->is_Root()) {
return;
}
uint nlen = n->len();
uint use_latency = get_latency_for_node(n);
uint use_pre_order = get_block_for_node(n)->_pre_order;
for (uint j = 0; j < nlen; j++) {
Node *def = n->in(j);
if (!def || def == n) {
continue;
}
// Walk backwards thru projections
if (def->is_Proj()) {
def = def->in(0);
}
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print("# in(%2d): ", j);
def->dump();
}
#endif
// If the defining block is not known, assume it is ok
Block *def_block = get_block_for_node(def);
uint def_pre_order = def_block ? def_block->_pre_order : 0;
if ((use_pre_order < def_pre_order) || (use_pre_order == def_pre_order && n->is_Phi())) {
continue;
}
uint delta_latency = n->latency(j);
uint current_latency = delta_latency + use_latency;
if (get_latency_for_node(def) < current_latency) {
set_latency_for_node(def, current_latency);
}
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print_cr("# %d + edge_latency(%d) == %d -> %d, node_latency[%d] = %d", use_latency, j, delta_latency, current_latency, def->_idx, get_latency_for_node(def));
}
#endif
}
}
//------------------------------latency_from_use-------------------------------
// Compute the latency of a specific use
int PhaseCFG::latency_from_use(Node *n, const Node *def, Node *use) {
// If self-reference, return no latency
if (use == n || use->is_Root()) {
return 0;
}
uint def_pre_order = get_block_for_node(def)->_pre_order;
uint latency = 0;
// If the use is not a projection, then it is simple...
if (!use->is_Proj()) {
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print("# out(): ");
use->dump();
}
#endif
uint use_pre_order = get_block_for_node(use)->_pre_order;
if (use_pre_order < def_pre_order)
return 0;
if (use_pre_order == def_pre_order && use->is_Phi())
return 0;
uint nlen = use->len();
uint nl = get_latency_for_node(use);
for ( uint j=0; j<nlen; j++ ) {
if (use->in(j) == n) {
// Change this if we want local latencies
uint ul = use->latency(j);
uint l = ul + nl;
if (latency < l) latency = l;
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print_cr("# %d + edge_latency(%d) == %d -> %d, latency = %d",
nl, j, ul, l, latency);
}
#endif
}
}
} else {
// This is a projection, just grab the latency of the use(s)
for (DUIterator_Fast jmax, j = use->fast_outs(jmax); j < jmax; j++) {
uint l = latency_from_use(use, def, use->fast_out(j));
if (latency < l) latency = l;
}
}
return latency;
}
//------------------------------latency_from_uses------------------------------
// Compute the latency of this instruction relative to all of it's uses.
// This computes a number that increases as we approach the beginning of the
// routine.
void PhaseCFG::latency_from_uses(Node *n) {
// Set the latency for this instruction
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print("# latency_from_outputs: node_latency[%d] = %d for node", n->_idx, get_latency_for_node(n));
dump();
}
#endif
uint latency=0;
const Node *def = n->is_Proj() ? n->in(0): n;
for (DUIterator_Fast imax, i = n->fast_outs(imax); i < imax; i++) {
uint l = latency_from_use(n, def, n->fast_out(i));
if (latency < l) latency = l;
}
set_latency_for_node(n, latency);
}
//------------------------------hoist_to_cheaper_block-------------------------
// Pick a block for node self, between early and LCA, that is a cheaper
// alternative to LCA.
Block* PhaseCFG::hoist_to_cheaper_block(Block* LCA, Block* early, Node* self) {
const double delta = 1+PROB_UNLIKELY_MAG(4);
Block* least = LCA;
double least_freq = least->_freq;
uint target = get_latency_for_node(self);
uint start_latency = get_latency_for_node(LCA->head());
uint end_latency = get_latency_for_node(LCA->get_node(LCA->end_idx()));
bool in_latency = (target <= start_latency);
const Block* root_block = get_block_for_node(_root);
// Turn off latency scheduling if scheduling is just plain off
if (!C->do_scheduling())
in_latency = true;
// Do not hoist (to cover latency) instructions which target a
// single register. Hoisting stretches the live range of the
// single register and may force spilling.
MachNode* mach = self->is_Mach() ? self->as_Mach() : NULL;
if (mach && mach->out_RegMask().is_bound1() && mach->out_RegMask().is_NotEmpty())
in_latency = true;
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print("# Find cheaper block for latency %d: ", get_latency_for_node(self));
self->dump();
tty->print_cr("# B%d: start latency for [%4d]=%d, end latency for [%4d]=%d, freq=%g",
LCA->_pre_order,
LCA->head()->_idx,
start_latency,
LCA->get_node(LCA->end_idx())->_idx,
end_latency,
least_freq);
}
#endif
int cand_cnt = 0; // number of candidates tried
// Walk up the dominator tree from LCA (Lowest common ancestor) to
// the earliest legal location. Capture the least execution frequency.
while (LCA != early) {
LCA = LCA->_idom; // Follow up the dominator tree
if (LCA == NULL) {
// Bailout without retry
assert(false, "graph should be schedulable");
C->record_method_not_compilable("late schedule failed: LCA == NULL");
return least;
}
// Don't hoist machine instructions to the root basic block
if (mach && LCA == root_block)
break;
uint start_lat = get_latency_for_node(LCA->head());
uint end_idx = LCA->end_idx();
uint end_lat = get_latency_for_node(LCA->get_node(end_idx));
double LCA_freq = LCA->_freq;
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print_cr("# B%d: start latency for [%4d]=%d, end latency for [%4d]=%d, freq=%g",
LCA->_pre_order, LCA->head()->_idx, start_lat, end_idx, end_lat, LCA_freq);
}
#endif
cand_cnt++;
if (LCA_freq < least_freq || // Better Frequency
(StressGCM && Compile::randomized_select(cand_cnt)) || // Should be randomly accepted in stress mode
(!StressGCM && // Otherwise, choose with latency
!in_latency && // No block containing latency
LCA_freq < least_freq * delta && // No worse frequency
target >= end_lat && // within latency range
!self->is_iteratively_computed() ) // But don't hoist IV increments
// because they may end up above other uses of their phi forcing
// their result register to be different from their input.
) {
least = LCA; // Found cheaper block
least_freq = LCA_freq;
start_latency = start_lat;
end_latency = end_lat;
if (target <= start_lat)
in_latency = true;
}
}
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print_cr("# Choose block B%d with start latency=%d and freq=%g",
least->_pre_order, start_latency, least_freq);
}
#endif
// See if the latency needs to be updated
if (target < end_latency) {
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print_cr("# Change latency for [%4d] from %d to %d", self->_idx, target, end_latency);
}
#endif
set_latency_for_node(self, end_latency);
partial_latency_of_defs(self);
}
return least;
}
//------------------------------schedule_late-----------------------------------
// Now schedule all codes as LATE as possible. This is the LCA in the
// dominator tree of all USES of a value. Pick the block with the least
// loop nesting depth that is lowest in the dominator tree.
extern const char must_clone[];
void PhaseCFG::schedule_late(VectorSet &visited, Node_Stack &stack) {
#ifndef PRODUCT
if (trace_opto_pipelining())
tty->print("\n#---- schedule_late ----\n");
#endif
Node_Backward_Iterator iter((Node *)_root, visited, stack, *this);
Node *self;
// Walk over all the nodes from last to first
while ((self = iter.next())) {
Block* early = get_block_for_node(self); // Earliest legal placement
if (self->is_top()) {
// Top node goes in bb #2 with other constants.
// It must be special-cased, because it has no out edges.
early->add_inst(self);
continue;
}
// No uses, just terminate
if (self->outcnt() == 0) {
assert(self->is_MachProj(), "sanity");
continue; // Must be a dead machine projection
}
// If node is pinned in the block, then no scheduling can be done.
if( self->pinned() ) // Pinned in block?
continue;
MachNode* mach = self->is_Mach() ? self->as_Mach() : NULL;
if (mach) {
switch (mach->ideal_Opcode()) {
case Op_CreateEx:
// Don't move exception creation
early->add_inst(self);
continue;
break;
case Op_CheckCastPP: {
// Don't move CheckCastPP nodes away from their input, if the input
// is a rawptr (5071820).
Node *def = self->in(1);
if (def != NULL && def->bottom_type()->base() == Type::RawPtr) {
early->add_inst(self);
#ifdef ASSERT
_raw_oops.push(def);
#endif
continue;
}
break;
}
default:
break;
}
}
// Gather LCA of all uses
Block *LCA = NULL;
{
for (DUIterator_Fast imax, i = self->fast_outs(imax); i < imax; i++) {
// For all uses, find LCA
Node* use = self->fast_out(i);
LCA = raise_LCA_above_use(LCA, use, self, this);
}
guarantee(LCA != NULL, "There must be a LCA");
} // (Hide defs of imax, i from rest of block.)
// Place temps in the block of their use. This isn't a
// requirement for correctness but it reduces useless
// interference between temps and other nodes.
if (mach != NULL && mach->is_MachTemp()) {
map_node_to_block(self, LCA);
LCA->add_inst(self);
continue;
}
// Check if 'self' could be anti-dependent on memory
if (self->needs_anti_dependence_check()) {
// Hoist LCA above possible-defs and insert anti-dependences to
// defs in new LCA block.
LCA = insert_anti_dependences(LCA, self);
}
if (early->_dom_depth > LCA->_dom_depth) {
// Somehow the LCA has moved above the earliest legal point.
// (One way this can happen is via memory_early_block.)
if (C->subsume_loads() == true && !C->failing()) {
// Retry with subsume_loads == false
// If this is the first failure, the sentinel string will "stick"
// to the Compile object, and the C2Compiler will see it and retry.
C->record_failure(C2Compiler::retry_no_subsuming_loads());
} else {
// Bailout without retry when (early->_dom_depth > LCA->_dom_depth)
assert(false, "graph should be schedulable");
C->record_method_not_compilable("late schedule failed: incorrect graph");
}
return;
}
// If there is no opportunity to hoist, then we're done.
// In stress mode, try to hoist even the single operations.
bool try_to_hoist = StressGCM || (LCA != early);
// Must clone guys stay next to use; no hoisting allowed.
// Also cannot hoist guys that alter memory or are otherwise not
// allocatable (hoisting can make a value live longer, leading to
// anti and output dependency problems which are normally resolved
// by the register allocator giving everyone a different register).
if (mach != NULL && must_clone[mach->ideal_Opcode()])
try_to_hoist = false;
Block* late = NULL;
if (try_to_hoist) {
// Now find the block with the least execution frequency.
// Start at the latest schedule and work up to the earliest schedule
// in the dominator tree. Thus the Node will dominate all its uses.
late = hoist_to_cheaper_block(LCA, early, self);
} else {
// Just use the LCA of the uses.
late = LCA;
}
// Put the node into target block
schedule_node_into_block(self, late);
#ifdef ASSERT
if (self->needs_anti_dependence_check()) {
// since precedence edges are only inserted when we're sure they
// are needed make sure that after placement in a block we don't
// need any new precedence edges.
verify_anti_dependences(late, self);
}
#endif
} // Loop until all nodes have been visited
} // end ScheduleLate
//------------------------------GlobalCodeMotion-------------------------------
void PhaseCFG::global_code_motion() {
ResourceMark rm;
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print("\n---- Start GlobalCodeMotion ----\n");
}
#endif
// Initialize the node to block mapping for things on the proj_list
for (uint i = 0; i < _matcher.number_of_projections(); i++) {
unmap_node_from_block(_matcher.get_projection(i));
}
// Set the basic block for Nodes pinned into blocks
VectorSet visited;
schedule_pinned_nodes(visited);
// Find the earliest Block any instruction can be placed in. Some
// instructions are pinned into Blocks. Unpinned instructions can
// appear in last block in which all their inputs occur.
visited.clear();
Node_Stack stack((C->live_nodes() >> 2) + 16); // pre-grow
if (!schedule_early(visited, stack)) {
// Bailout without retry
C->record_method_not_compilable("early schedule failed");
return;
}
// Build Def-Use edges.
// Compute the latency information (via backwards walk) for all the
// instructions in the graph
_node_latency = new GrowableArray<uint>(); // resource_area allocation
if (C->do_scheduling()) {
compute_latencies_backwards(visited, stack);
}
// Now schedule all codes as LATE as possible. This is the LCA in the
// dominator tree of all USES of a value. Pick the block with the least
// loop nesting depth that is lowest in the dominator tree.
// ( visited.clear() called in schedule_late()->Node_Backward_Iterator() )
schedule_late(visited, stack);
if (C->failing()) {
return;
}
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print("\n---- Detect implicit null checks ----\n");
}
#endif
// Detect implicit-null-check opportunities. Basically, find NULL checks
// with suitable memory ops nearby. Use the memory op to do the NULL check.
// I can generate a memory op if there is not one nearby.
if (C->is_method_compilation()) {
// By reversing the loop direction we get a very minor gain on mpegaudio.
// Feel free to revert to a forward loop for clarity.
// for( int i=0; i < (int)matcher._null_check_tests.size(); i+=2 ) {
for (int i = _matcher._null_check_tests.size() - 2; i >= 0; i -= 2) {
Node* proj = _matcher._null_check_tests[i];
Node* val = _matcher._null_check_tests[i + 1];
Block* block = get_block_for_node(proj);
implicit_null_check(block, proj, val, C->allowed_deopt_reasons());
// The implicit_null_check will only perform the transformation
// if the null branch is truly uncommon, *and* it leads to an
// uncommon trap. Combined with the too_many_traps guards
// above, this prevents SEGV storms reported in 6366351,
// by recompiling offending methods without this optimization.
}
}
bool block_size_threshold_ok = false;
intptr_t *recalc_pressure_nodes = NULL;
if (OptoRegScheduling) {
for (uint i = 0; i < number_of_blocks(); i++) {
Block* block = get_block(i);
if (block->number_of_nodes() > 10) {
block_size_threshold_ok = true;
break;
}
}
}
// Enabling the scheduler for register pressure plus finding blocks of size to schedule for it
// is key to enabling this feature.
PhaseChaitin regalloc(C->unique(), *this, _matcher, true);
ResourceArea live_arena(mtCompiler); // Arena for liveness
ResourceMark rm_live(&live_arena);
PhaseLive live(*this, regalloc._lrg_map.names(), &live_arena, true);
PhaseIFG ifg(&live_arena);
if (OptoRegScheduling && block_size_threshold_ok) {
regalloc.mark_ssa();
Compile::TracePhase tp("computeLive", &timers[_t_computeLive]);
rm_live.reset_to_mark(); // Reclaim working storage
IndexSet::reset_memory(C, &live_arena);
uint node_size = regalloc._lrg_map.max_lrg_id();
ifg.init(node_size); // Empty IFG
regalloc.set_ifg(ifg);
regalloc.set_live(live);
regalloc.gather_lrg_masks(false); // Collect LRG masks
live.compute(node_size); // Compute liveness
recalc_pressure_nodes = NEW_RESOURCE_ARRAY(intptr_t, node_size);
for (uint i = 0; i < node_size; i++) {
recalc_pressure_nodes[i] = 0;
}
}
_regalloc = ®alloc;
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print("\n---- Start Local Scheduling ----\n");
}
#endif
// Schedule locally. Right now a simple topological sort.
// Later, do a real latency aware scheduler.
GrowableArray<int> ready_cnt(C->unique(), C->unique(), -1);
visited.reset();
for (uint i = 0; i < number_of_blocks(); i++) {
Block* block = get_block(i);
if (!schedule_local(block, ready_cnt, visited, recalc_pressure_nodes)) {
if (!C->failure_reason_is(C2Compiler::retry_no_subsuming_loads())) {
C->record_method_not_compilable("local schedule failed");
}
_regalloc = NULL;
return;
}
}
_regalloc = NULL;
// If we inserted any instructions between a Call and his CatchNode,
// clone the instructions on all paths below the Catch.
for (uint i = 0; i < number_of_blocks(); i++) {
Block* block = get_block(i);
call_catch_cleanup(block);
}
#ifndef PRODUCT
if (trace_opto_pipelining()) {
tty->print("\n---- After GlobalCodeMotion ----\n");
for (uint i = 0; i < number_of_blocks(); i++) {
Block* block = get_block(i);
block->dump();
}
}
#endif
// Dead.
_node_latency = (GrowableArray<uint> *)((intptr_t)0xdeadbeef);
}
bool PhaseCFG::do_global_code_motion() {
build_dominator_tree();
if (C->failing()) {
return false;
}
NOT_PRODUCT( C->verify_graph_edges(); )
estimate_block_frequency();
global_code_motion();
if (C->failing()) {
return false;
}
return true;
}
//------------------------------Estimate_Block_Frequency-----------------------
// Estimate block frequencies based on IfNode probabilities.
void PhaseCFG::estimate_block_frequency() {
// Force conditional branches leading to uncommon traps to be unlikely,
// not because we get to the uncommon_trap with less relative frequency,
// but because an uncommon_trap typically causes a deopt, so we only get
// there once.
if (C->do_freq_based_layout()) {
Block_List worklist;
Block* root_blk = get_block(0);
for (uint i = 1; i < root_blk->num_preds(); i++) {
Block *pb = get_block_for_node(root_blk->pred(i));
if (pb->has_uncommon_code()) {
worklist.push(pb);
}
}
while (worklist.size() > 0) {
Block* uct = worklist.pop();
if (uct == get_root_block()) {
continue;
}
for (uint i = 1; i < uct->num_preds(); i++) {
Block *pb = get_block_for_node(uct->pred(i));
if (pb->_num_succs == 1) {
worklist.push(pb);
} else if (pb->num_fall_throughs() == 2) {
pb->update_uncommon_branch(uct);
}
}
}
}
// Create the loop tree and calculate loop depth.
_root_loop = create_loop_tree();
_root_loop->compute_loop_depth(0);
// Compute block frequency of each block, relative to a single loop entry.
_root_loop->compute_freq();
// Adjust all frequencies to be relative to a single method entry
_root_loop->_freq = 1.0;
_root_loop->scale_freq();
// Save outmost loop frequency for LRG frequency threshold
_outer_loop_frequency = _root_loop->outer_loop_freq();
// force paths ending at uncommon traps to be infrequent
if (!C->do_freq_based_layout()) {
Block_List worklist;
Block* root_blk = get_block(0);
for (uint i = 1; i < root_blk->num_preds(); i++) {
Block *pb = get_block_for_node(root_blk->pred(i));
if (pb->has_uncommon_code()) {
worklist.push(pb);
}
}
while (worklist.size() > 0) {
Block* uct = worklist.pop();
uct->_freq = PROB_MIN;
for (uint i = 1; i < uct->num_preds(); i++) {
Block *pb = get_block_for_node(uct->pred(i));
if (pb->_num_succs == 1 && pb->_freq > PROB_MIN) {
worklist.push(pb);
}
}
}
}
#ifdef ASSERT
for (uint i = 0; i < number_of_blocks(); i++) {
Block* b = get_block(i);
assert(b->_freq >= MIN_BLOCK_FREQUENCY, "Register Allocator requires meaningful block frequency");
}
#endif
#ifndef PRODUCT
if (PrintCFGBlockFreq) {
tty->print_cr("CFG Block Frequencies");
_root_loop->dump_tree();
if (Verbose) {
tty->print_cr("PhaseCFG dump");
dump();
tty->print_cr("Node dump");
_root->dump(99999);
}
}
#endif
}
//----------------------------create_loop_tree--------------------------------
// Create a loop tree from the CFG
CFGLoop* PhaseCFG::create_loop_tree() {
#ifdef ASSERT
assert(get_block(0) == get_root_block(), "first block should be root block");
for (uint i = 0; i < number_of_blocks(); i++) {
Block* block = get_block(i);
// Check that _loop field are clear...we could clear them if not.
assert(block->_loop == NULL, "clear _loop expected");
// Sanity check that the RPO numbering is reflected in the _blocks array.
// It doesn't have to be for the loop tree to be built, but if it is not,
// then the blocks have been reordered since dom graph building...which
// may question the RPO numbering
assert(block->_rpo == i, "unexpected reverse post order number");
}
#endif
int idct = 0;
CFGLoop* root_loop = new CFGLoop(idct++);
Block_List worklist;
// Assign blocks to loops
for(uint i = number_of_blocks() - 1; i > 0; i-- ) { // skip Root block
Block* block = get_block(i);
if (block->head()->is_Loop()) {
Block* loop_head = block;
assert(loop_head->num_preds() - 1 == 2, "loop must have 2 predecessors");
Node* tail_n = loop_head->pred(LoopNode::LoopBackControl);
Block* tail = get_block_for_node(tail_n);
// Defensively filter out Loop nodes for non-single-entry loops.
// For all reasonable loops, the head occurs before the tail in RPO.
if (i <= tail->_rpo) {
// The tail and (recursive) predecessors of the tail
// are made members of a new loop.
assert(worklist.size() == 0, "nonempty worklist");
CFGLoop* nloop = new CFGLoop(idct++);
assert(loop_head->_loop == NULL, "just checking");
loop_head->_loop = nloop;
// Add to nloop so push_pred() will skip over inner loops
nloop->add_member(loop_head);
nloop->push_pred(loop_head, LoopNode::LoopBackControl, worklist, this);
while (worklist.size() > 0) {
Block* member = worklist.pop();
if (member != loop_head) {
for (uint j = 1; j < member->num_preds(); j++) {
nloop->push_pred(member, j, worklist, this);
}
}
}
}
}
}
// Create a member list for each loop consisting
// of both blocks and (immediate child) loops.
for (uint i = 0; i < number_of_blocks(); i++) {
Block* block = get_block(i);
CFGLoop* lp = block->_loop;
if (lp == NULL) {
// Not assigned to a loop. Add it to the method's pseudo loop.
block->_loop = root_loop;
lp = root_loop;
}
if (lp == root_loop || block != lp->head()) { // loop heads are already members
lp->add_member(block);
}
if (lp != root_loop) {
if (lp->parent() == NULL) {
// Not a nested loop. Make it a child of the method's pseudo loop.
root_loop->add_nested_loop(lp);
}
if (block == lp->head()) {
// Add nested loop to member list of parent loop.
lp->parent()->add_member(lp);
}
}
}
return root_loop;
}
//------------------------------push_pred--------------------------------------
void CFGLoop::push_pred(Block* blk, int i, Block_List& worklist, PhaseCFG* cfg) {
Node* pred_n = blk->pred(i);
Block* pred = cfg->get_block_for_node(pred_n);
CFGLoop *pred_loop = pred->_loop;
if (pred_loop == NULL) {
// Filter out blocks for non-single-entry loops.
// For all reasonable loops, the head occurs before the tail in RPO.
if (pred->_rpo > head()->_rpo) {
pred->_loop = this;
worklist.push(pred);
}
} else if (pred_loop != this) {
// Nested loop.
while (pred_loop->_parent != NULL && pred_loop->_parent != this) {
pred_loop = pred_loop->_parent;
}
// Make pred's loop be a child
if (pred_loop->_parent == NULL) {
add_nested_loop(pred_loop);
// Continue with loop entry predecessor.
Block* pred_head = pred_loop->head();
assert(pred_head->num_preds() - 1 == 2, "loop must have 2 predecessors");
assert(pred_head != head(), "loop head in only one loop");
push_pred(pred_head, LoopNode::EntryControl, worklist, cfg);
} else {
assert(pred_loop->_parent == this && _parent == NULL, "just checking");
}
}
}
//------------------------------add_nested_loop--------------------------------
// Make cl a child of the current loop in the loop tree.
void CFGLoop::add_nested_loop(CFGLoop* cl) {
assert(_parent == NULL, "no parent yet");
assert(cl != this, "not my own parent");
cl->_parent = this;
CFGLoop* ch = _child;
if (ch == NULL) {
_child = cl;
} else {
while (ch->_sibling != NULL) { ch = ch->_sibling; }
ch->_sibling = cl;
}
}
//------------------------------compute_loop_depth-----------------------------
// Store the loop depth in each CFGLoop object.
// Recursively walk the children to do the same for them.
void CFGLoop::compute_loop_depth(int depth) {
_depth = depth;
CFGLoop* ch = _child;
while (ch != NULL) {
ch->compute_loop_depth(depth + 1);
ch = ch->_sibling;
}
}
//------------------------------compute_freq-----------------------------------
// Compute the frequency of each block and loop, relative to a single entry
// into the dominating loop head.
void CFGLoop::compute_freq() {
// Bottom up traversal of loop tree (visit inner loops first.)
// Set loop head frequency to 1.0, then transitively
// compute frequency for all successors in the loop,
// as well as for each exit edge. Inner loops are
// treated as single blocks with loop exit targets
// as the successor blocks.
// Nested loops first
CFGLoop* ch = _child;
while (ch != NULL) {
ch->compute_freq();
ch = ch->_sibling;
}
assert (_members.length() > 0, "no empty loops");
Block* hd = head();
hd->_freq = 1.0;
for (int i = 0; i < _members.length(); i++) {
CFGElement* s = _members.at(i);
double freq = s->_freq;
if (s->is_block()) {
Block* b = s->as_Block();
for (uint j = 0; j < b->_num_succs; j++) {
Block* sb = b->_succs[j];
update_succ_freq(sb, freq * b->succ_prob(j));
}
} else {
CFGLoop* lp = s->as_CFGLoop();
assert(lp->_parent == this, "immediate child");
for (int k = 0; k < lp->_exits.length(); k++) {
Block* eb = lp->_exits.at(k).get_target();
double prob = lp->_exits.at(k).get_prob();
update_succ_freq(eb, freq * prob);
}
}
}
// For all loops other than the outer, "method" loop,
// sum and normalize the exit probability. The "method" loop
// should keep the initial exit probability of 1, so that
// inner blocks do not get erroneously scaled.
if (_depth != 0) {
// Total the exit probabilities for this loop.
double exits_sum = 0.0f;
for (int i = 0; i < _exits.length(); i++) {
exits_sum += _exits.at(i).get_prob();
}
// Normalize the exit probabilities. Until now, the
// probabilities estimate the possibility of exit per
// a single loop iteration; afterward, they estimate
// the probability of exit per loop entry.
for (int i = 0; i < _exits.length(); i++) {
Block* et = _exits.at(i).get_target();
float new_prob = 0.0f;
if (_exits.at(i).get_prob() > 0.0f) {
new_prob = _exits.at(i).get_prob() / exits_sum;
}
BlockProbPair bpp(et, new_prob);
_exits.at_put(i, bpp);
}
// Save the total, but guard against unreasonable probability,
// as the value is used to estimate the loop trip count.
// An infinite trip count would blur relative block
// frequencies.
if (exits_sum > 1.0f) exits_sum = 1.0;
if (exits_sum < PROB_MIN) exits_sum = PROB_MIN;
_exit_prob = exits_sum;
}
}
//------------------------------succ_prob-------------------------------------
// Determine the probability of reaching successor 'i' from the receiver block.
float Block::succ_prob(uint i) {
int eidx = end_idx();
Node *n = get_node(eidx); // Get ending Node
int op = n->Opcode();
if (n->is_Mach()) {
if (n->is_MachNullCheck()) {
// Can only reach here if called after lcm. The original Op_If is gone,
// so we attempt to infer the probability from one or both of the
// successor blocks.
assert(_num_succs == 2, "expecting 2 successors of a null check");
// If either successor has only one predecessor, then the
// probability estimate can be derived using the
// relative frequency of the successor and this block.
if (_succs[i]->num_preds() == 2) {
return _succs[i]->_freq / _freq;
} else if (_succs[1-i]->num_preds() == 2) {
return 1 - (_succs[1-i]->_freq / _freq);
} else {
// Estimate using both successor frequencies
float freq = _succs[i]->_freq;
return freq / (freq + _succs[1-i]->_freq);
}
}
op = n->as_Mach()->ideal_Opcode();
}
// Switch on branch type
switch( op ) {
case Op_CountedLoopEnd:
case Op_If: {
assert (i < 2, "just checking");
// Conditionals pass on only part of their frequency
float prob = n->as_MachIf()->_prob;
assert(prob >= 0.0 && prob <= 1.0, "out of range probability");
// If succ[i] is the FALSE branch, invert path info
if( get_node(i + eidx + 1)->Opcode() == Op_IfFalse ) {
return 1.0f - prob; // not taken
} else {
return prob; // taken
}
}
case Op_Jump:
return n->as_MachJump()->_probs[get_node(i + eidx + 1)->as_JumpProj()->_con];
case Op_Catch: {
const CatchProjNode *ci = get_node(i + eidx + 1)->as_CatchProj();
if (ci->_con == CatchProjNode::fall_through_index) {
// Fall-thru path gets the lion's share.
return 1.0f - PROB_UNLIKELY_MAG(5)*_num_succs;
} else {
// Presume exceptional paths are equally unlikely
return PROB_UNLIKELY_MAG(5);
}
}
case Op_Root:
case Op_Goto:
// Pass frequency straight thru to target
return 1.0f;
case Op_NeverBranch:
return 0.0f;
case Op_TailCall:
case Op_TailJump:
case Op_Return:
case Op_Halt:
case Op_Rethrow:
// Do not push out freq to root block
return 0.0f;
default:
ShouldNotReachHere();
}
return 0.0f;
}
//------------------------------num_fall_throughs-----------------------------
// Return the number of fall-through candidates for a block
int Block::num_fall_throughs() {
int eidx = end_idx();
Node *n = get_node(eidx); // Get ending Node
int op = n->Opcode();
if (n->is_Mach()) {
if (n->is_MachNullCheck()) {
// In theory, either side can fall-thru, for simplicity sake,
// let's say only the false branch can now.
return 1;
}
op = n->as_Mach()->ideal_Opcode();
}
// Switch on branch type
switch( op ) {
case Op_CountedLoopEnd:
case Op_If:
return 2;
case Op_Root:
case Op_Goto:
return 1;
case Op_Catch: {
for (uint i = 0; i < _num_succs; i++) {
const CatchProjNode *ci = get_node(i + eidx + 1)->as_CatchProj();
if (ci->_con == CatchProjNode::fall_through_index) {
return 1;
}
}
return 0;
}
case Op_Jump:
case Op_NeverBranch:
case Op_TailCall:
case Op_TailJump:
case Op_Return:
case Op_Halt:
case Op_Rethrow:
return 0;
default:
ShouldNotReachHere();
}
return 0;
}
//------------------------------succ_fall_through-----------------------------
// Return true if a specific successor could be fall-through target.
bool Block::succ_fall_through(uint i) {
int eidx = end_idx();
Node *n = get_node(eidx); // Get ending Node
int op = n->Opcode();
if (n->is_Mach()) {
if (n->is_MachNullCheck()) {
// In theory, either side can fall-thru, for simplicity sake,
// let's say only the false branch can now.
return get_node(i + eidx + 1)->Opcode() == Op_IfFalse;
}
op = n->as_Mach()->ideal_Opcode();
}
// Switch on branch type
switch( op ) {
case Op_CountedLoopEnd:
case Op_If:
case Op_Root:
case Op_Goto:
return true;
case Op_Catch: {
const CatchProjNode *ci = get_node(i + eidx + 1)->as_CatchProj();
return ci->_con == CatchProjNode::fall_through_index;
}
case Op_Jump:
case Op_NeverBranch:
case Op_TailCall:
case Op_TailJump:
case Op_Return:
case Op_Halt:
case Op_Rethrow:
return false;
default:
ShouldNotReachHere();
}
return false;
}
//------------------------------update_uncommon_branch------------------------
// Update the probability of a two-branch to be uncommon
void Block::update_uncommon_branch(Block* ub) {
int eidx = end_idx();
Node *n = get_node(eidx); // Get ending Node
int op = n->as_Mach()->ideal_Opcode();
assert(op == Op_CountedLoopEnd || op == Op_If, "must be a If");
assert(num_fall_throughs() == 2, "must be a two way branch block");
// Which successor is ub?
uint s;
for (s = 0; s <_num_succs; s++) {
if (_succs[s] == ub) break;
}
assert(s < 2, "uncommon successor must be found");
// If ub is the true path, make the proability small, else
// ub is the false path, and make the probability large
bool invert = (get_node(s + eidx + 1)->Opcode() == Op_IfFalse);
// Get existing probability
float p = n->as_MachIf()->_prob;
if (invert) p = 1.0 - p;
if (p > PROB_MIN) {
p = PROB_MIN;
}
if (invert) p = 1.0 - p;
n->as_MachIf()->_prob = p;
}
//------------------------------update_succ_freq-------------------------------
// Update the appropriate frequency associated with block 'b', a successor of
// a block in this loop.
void CFGLoop::update_succ_freq(Block* b, double freq) {
if (b->_loop == this) {
if (b == head()) {
// back branch within the loop
// Do nothing now, the loop carried frequency will be
// adjust later in scale_freq().
} else {
// simple branch within the loop
b->_freq += freq;
}
} else if (!in_loop_nest(b)) {
// branch is exit from this loop
BlockProbPair bpp(b, freq);
_exits.append(bpp);
} else {
// branch into nested loop
CFGLoop* ch = b->_loop;
ch->_freq += freq;
}
}
//------------------------------in_loop_nest-----------------------------------
// Determine if block b is in the receiver's loop nest.
bool CFGLoop::in_loop_nest(Block* b) {
int depth = _depth;
CFGLoop* b_loop = b->_loop;
int b_depth = b_loop->_depth;
if (depth == b_depth) {
return true;
}
while (b_depth > depth) {
b_loop = b_loop->_parent;
b_depth = b_loop->_depth;
}
return b_loop == this;
}
//------------------------------scale_freq-------------------------------------
// Scale frequency of loops and blocks by trip counts from outer loops
// Do a top down traversal of loop tree (visit outer loops first.)
void CFGLoop::scale_freq() {
double loop_freq = _freq * trip_count();
_freq = loop_freq;
for (int i = 0; i < _members.length(); i++) {
CFGElement* s = _members.at(i);
double block_freq = s->_freq * loop_freq;
if (g_isnan(block_freq) || block_freq < MIN_BLOCK_FREQUENCY)
block_freq = MIN_BLOCK_FREQUENCY;
s->_freq = block_freq;
}
CFGLoop* ch = _child;
while (ch != NULL) {
ch->scale_freq();
ch = ch->_sibling;
}
}
// Frequency of outer loop
double CFGLoop::outer_loop_freq() const {
if (_child != NULL) {
return _child->_freq;
}
return _freq;
}
#ifndef PRODUCT
//------------------------------dump_tree--------------------------------------
void CFGLoop::dump_tree() const {
dump();
if (_child != NULL) _child->dump_tree();
if (_sibling != NULL) _sibling->dump_tree();
}
//------------------------------dump-------------------------------------------
void CFGLoop::dump() const {
for (int i = 0; i < _depth; i++) tty->print(" ");
tty->print("%s: %d trip_count: %6.0f freq: %6.0f\n",
_depth == 0 ? "Method" : "Loop", _id, trip_count(), _freq);
for (int i = 0; i < _depth; i++) tty->print(" ");
tty->print(" members:");
int k = 0;
for (int i = 0; i < _members.length(); i++) {
if (k++ >= 6) {
tty->print("\n ");
for (int j = 0; j < _depth+1; j++) tty->print(" ");
k = 0;
}
CFGElement *s = _members.at(i);
if (s->is_block()) {
Block *b = s->as_Block();
tty->print(" B%d(%6.3f)", b->_pre_order, b->_freq);
} else {
CFGLoop* lp = s->as_CFGLoop();
tty->print(" L%d(%6.3f)", lp->_id, lp->_freq);
}
}
tty->print("\n");
for (int i = 0; i < _depth; i++) tty->print(" ");
tty->print(" exits: ");
k = 0;
for (int i = 0; i < _exits.length(); i++) {
if (k++ >= 7) {
tty->print("\n ");
for (int j = 0; j < _depth+1; j++) tty->print(" ");
k = 0;
}
Block *blk = _exits.at(i).get_target();
double prob = _exits.at(i).get_prob();
tty->print(" ->%d@%d%%", blk->_pre_order, (int)(prob*100));
}
tty->print("\n");
}
#endif
| {
"pile_set_name": "Github"
} |
// <copyright>
// Copyright by the Spark Development Network
//
// Licensed under the Rock Community License (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.rockrms.com/license
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// </copyright>
//
using System.IO;
using System.Net;
using System.Windows;
using Rock.Wpf;
namespace Rock.Apps.StatementGenerator
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
/// <summary>
/// Initializes a new instance of the <see cref="App"/> class.
/// </summary>
public App()
{
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11;
string applicationFolder = Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().Location );
// set the current directory to the same as the current exe so that we can find the layout and logo files
Directory.SetCurrentDirectory( applicationFolder );
this.DispatcherUnhandledException += App_DispatcherUnhandledException;
}
/// <summary>
/// Handles the DispatcherUnhandledException event of the App control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.Windows.Threading.DispatcherUnhandledExceptionEventArgs"/> instance containing the event data.</param>
void App_DispatcherUnhandledException( object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e )
{
ErrorMessageWindow errorMessageWindow = new ErrorMessageWindow( e.Exception );
errorMessageWindow.ShowDialog();
e.Handled = true;
}
}
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.alibaba.csp.sentinel.cluster.flow.statistic.limit;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import com.alibaba.csp.sentinel.cluster.server.config.ClusterServerConfigManager;
import com.alibaba.csp.sentinel.util.AssertUtil;
/**
* @author Eric Zhao
* @since 1.4.1
*/
public final class GlobalRequestLimiter {
private static final Map<String, RequestLimiter> GLOBAL_QPS_LIMITER_MAP = new ConcurrentHashMap<>();
public static void initIfAbsent(String namespace) {
AssertUtil.notEmpty(namespace, "namespace cannot be empty");
if (!GLOBAL_QPS_LIMITER_MAP.containsKey(namespace)) {
GLOBAL_QPS_LIMITER_MAP.put(namespace, new RequestLimiter(ClusterServerConfigManager.getMaxAllowedQps(namespace)));
}
}
public static RequestLimiter getRequestLimiter(String namespace) {
if (namespace == null) {
return null;
}
return GLOBAL_QPS_LIMITER_MAP.get(namespace);
}
public static boolean tryPass(String namespace) {
if (namespace == null) {
return false;
}
RequestLimiter limiter = GLOBAL_QPS_LIMITER_MAP.get(namespace);
if (limiter == null) {
return true;
}
return limiter.tryPass();
}
public static double getCurrentQps(String namespace) {
RequestLimiter limiter = getRequestLimiter(namespace);
if (limiter == null) {
return 0;
}
return limiter.getQps();
}
public static double getMaxAllowedQps(String namespace) {
RequestLimiter limiter = getRequestLimiter(namespace);
if (limiter == null) {
return 0;
}
return limiter.getQpsAllowed();
}
public static void applyMaxQpsChange(double maxAllowedQps) {
AssertUtil.isTrue(maxAllowedQps >= 0, "max allowed QPS should > 0");
for (RequestLimiter limiter : GLOBAL_QPS_LIMITER_MAP.values()) {
if (limiter != null) {
limiter.setQpsAllowed(maxAllowedQps);
}
}
}
private GlobalRequestLimiter() {}
}
| {
"pile_set_name": "Github"
} |
'use strict'
const url = require('url')
const SHORTCUTS = [
'style',
'label',
'logo',
'logoWidth',
'colorA',
'colorB',
'maxAge',
'longCache',
'link'
]
module.exports = function (service, path, opts) {
if (!opts) opts = {}
const type = opts.type || 'svg'
const query = opts.query || {}
for (const k of SHORTCUTS) {
if (opts[k]) query[k] = opts[k]
}
return url.format({
protocol: opts.protocol || 'https',
hostname: opts.hostname || 'img.shields.io',
pathname: `/${service}/${path}.${type}`,
query
})
}
| {
"pile_set_name": "Github"
} |
/*
* Firmata is a generic protocol for communicating with microcontrollers
* from software on a host computer. It is intended to work with
* any host computer software package.
*
* To download a host software package, please click on the following link
* to open the list of Firmata client libraries in your default browser.
*
* https://github.com/firmata/arduino#firmata-client-libraries
*/
/*
Copyright (C) 2006-2008 Hans-Christoph Steiner. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
See file LICENSE.txt for further informations on licensing terms.
*/
/*
* This is an old version of StandardFirmata (v2.0). It is kept here because
* its the last version that works on an ATMEGA8 chip. Also, it can be used
* for host software that has not been updated to a newer version of the
* protocol. It also uses the old baud rate of 115200 rather than 57600.
*/
#include <EEPROM.h>
#include <Firmata.h>
/*==============================================================================
* GLOBAL VARIABLES
*============================================================================*/
/* analog inputs */
int analogInputsToReport = 0; // bitwise array to store pin reporting
int analogPin = 0; // counter for reading analog pins
/* digital pins */
byte reportPINs[TOTAL_PORTS]; // PIN == input port
byte previousPINs[TOTAL_PORTS]; // PIN == input port
byte pinStatus[TOTAL_PINS]; // store pin status, default OUTPUT
byte portStatus[TOTAL_PORTS];
/* timer variables */
unsigned long currentMillis; // store the current value from millis()
unsigned long previousMillis; // for comparison with currentMillis
/*==============================================================================
* FUNCTIONS
*============================================================================*/
void outputPort(byte portNumber, byte portValue)
{
portValue = portValue & ~ portStatus[portNumber];
if (previousPINs[portNumber] != portValue) {
Firmata.sendDigitalPort(portNumber, portValue);
previousPINs[portNumber] = portValue;
Firmata.sendDigitalPort(portNumber, portValue);
}
}
/* -----------------------------------------------------------------------------
* check all the active digital inputs for change of state, then add any events
* to the Serial output queue using Serial.print() */
void checkDigitalInputs(void)
{
byte i, tmp;
for (i = 0; i < TOTAL_PORTS; i++) {
if (reportPINs[i]) {
switch (i) {
case 0: outputPort(0, PIND & ~ B00000011); break; // ignore Rx/Tx 0/1
case 1: outputPort(1, PINB); break;
case 2: outputPort(2, PINC); break;
}
}
}
}
// -----------------------------------------------------------------------------
/* sets the pin mode to the correct state and sets the relevant bits in the
* two bit-arrays that track Digital I/O and PWM status
*/
void setPinModeCallback(byte pin, int mode) {
byte port = 0;
byte offset = 0;
if (pin < 8) {
port = 0;
offset = 0;
} else if (pin < 14) {
port = 1;
offset = 8;
} else if (pin < 22) {
port = 2;
offset = 14;
}
if (pin > 1) { // ignore RxTx (pins 0 and 1)
pinStatus[pin] = mode;
switch (mode) {
case INPUT:
pinMode(pin, INPUT);
portStatus[port] = portStatus[port] & ~ (1 << (pin - offset));
break;
case OUTPUT:
digitalWrite(pin, LOW); // disable PWM
case PWM:
pinMode(pin, OUTPUT);
portStatus[port] = portStatus[port] | (1 << (pin - offset));
break;
//case ANALOG: // TODO figure this out
default:
Firmata.sendString("");
}
// TODO: save status to EEPROM here, if changed
}
}
void analogWriteCallback(byte pin, int value)
{
setPinModeCallback(pin, PIN_MODE_PWM);
analogWrite(pin, value);
}
void digitalWriteCallback(byte port, int value)
{
switch (port) {
case 0: // pins 2-7 (don't change Rx/Tx, pins 0 and 1)
// 0xFF03 == B1111111100000011 0x03 == B00000011
PORTD = (value & ~ 0xFF03) | (PORTD & 0x03);
break;
case 1: // pins 8-13 (14,15 are disabled for the crystal)
PORTB = (byte)value;
break;
case 2: // analog pins used as digital
PORTC = (byte)value;
break;
}
}
// -----------------------------------------------------------------------------
/* sets bits in a bit array (int) to toggle the reporting of the analogIns
*/
//void FirmataClass::setAnalogPinReporting(byte pin, byte state) {
//}
void reportAnalogCallback(byte pin, int value)
{
if (value == 0) {
analogInputsToReport = analogInputsToReport & ~ (1 << pin);
}
else { // everything but 0 enables reporting of that pin
analogInputsToReport = analogInputsToReport | (1 << pin);
}
// TODO: save status to EEPROM here, if changed
}
void reportDigitalCallback(byte port, int value)
{
reportPINs[port] = (byte)value;
if (port == 2) // turn off analog reporting when used as digital
analogInputsToReport = 0;
}
/*==============================================================================
* SETUP()
*============================================================================*/
void setup()
{
byte i;
Firmata.setFirmwareVersion(2, 0);
Firmata.attach(ANALOG_MESSAGE, analogWriteCallback);
Firmata.attach(DIGITAL_MESSAGE, digitalWriteCallback);
Firmata.attach(REPORT_ANALOG, reportAnalogCallback);
Firmata.attach(REPORT_DIGITAL, reportDigitalCallback);
Firmata.attach(SET_PIN_MODE, setPinModeCallback);
portStatus[0] = B00000011; // ignore Tx/RX pins
portStatus[1] = B11000000; // ignore 14/15 pins
portStatus[2] = B00000000;
// for(i=0; i<TOTAL_PINS; ++i) { // TODO make this work with analogs
for (i = 0; i < 14; ++i) {
setPinModeCallback(i, OUTPUT);
}
// set all outputs to 0 to make sure internal pull-up resistors are off
PORTB = 0; // pins 8-15
PORTC = 0; // analog port
PORTD = 0; // pins 0-7
// TODO rethink the init, perhaps it should report analog on default
for (i = 0; i < TOTAL_PORTS; ++i) {
reportPINs[i] = false;
}
// TODO: load state from EEPROM here
/* send digital inputs here, if enabled, to set the initial state on the
* host computer, since once in the loop(), this firmware will only send
* digital data on change. */
if (reportPINs[0]) outputPort(0, PIND & ~ B00000011); // ignore Rx/Tx 0/1
if (reportPINs[1]) outputPort(1, PINB);
if (reportPINs[2]) outputPort(2, PINC);
Firmata.begin(115200);
}
/*==============================================================================
* LOOP()
*============================================================================*/
void loop()
{
/* DIGITALREAD - as fast as possible, check for changes and output them to the
* FTDI buffer using Serial.print() */
checkDigitalInputs();
currentMillis = millis();
if (currentMillis - previousMillis > 20) {
previousMillis += 20; // run this every 20ms
/* SERIALREAD - Serial.read() uses a 128 byte circular buffer, so handle
* all serialReads at once, i.e. empty the buffer */
while (Firmata.available())
Firmata.processInput();
/* SEND FTDI WRITE BUFFER - make sure that the FTDI buffer doesn't go over
* 60 bytes. use a timer to sending an event character every 4 ms to
* trigger the buffer to dump. */
/* ANALOGREAD - right after the event character, do all of the
* analogReads(). These only need to be done every 4ms. */
for (analogPin = 0; analogPin < TOTAL_ANALOG_PINS; analogPin++) {
if ( analogInputsToReport & (1 << analogPin) ) {
Firmata.sendAnalog(analogPin, analogRead(analogPin));
}
}
}
}
| {
"pile_set_name": "Github"
} |
<?php
/**
* Locale data for 'en_Dsrt_US'.
*
* This file is automatically generated by yiic cldr command.
*
* Copyright © 1991-2007 Unicode, Inc. All rights reserved.
* Distributed under the Terms of Use in http://www.unicode.org/copyright.html.
*
* Copyright © 2008-2010 Yii Software LLC (http://www.yiiframework.com/license/)
*/
return array (
'version' => '4123',
'numberSymbols' =>
array (
'decimal' => '.',
'group' => ',',
'list' => ';',
'percentSign' => '%',
'nativeZeroDigit' => '0',
'patternDigit' => '#',
'plusSign' => '+',
'minusSign' => '-',
'exponential' => 'E',
'perMille' => '‰',
'infinity' => '∞',
'nan' => 'NaN',
),
'decimalFormat' => '#,##0.###',
'scientificFormat' => '#E0',
'percentFormat' => '#,##0%',
'currencyFormat' => '¤#,##0.00;(¤#,##0.00)',
'currencySymbols' =>
array (
'AFN' => 'Af',
'ANG' => 'NAf.',
'AOA' => 'Kz',
'ARA' => '₳',
'ARL' => '$L',
'ARM' => 'm$n',
'ARS' => 'AR$',
'AUD' => 'AU$',
'AWG' => 'Afl.',
'AZN' => 'man.',
'BAM' => 'KM',
'BBD' => 'Bds$',
'BDT' => 'Tk',
'BEF' => 'BF',
'BHD' => 'BD',
'BIF' => 'FBu',
'BMD' => 'BD$',
'BND' => 'BN$',
'BOB' => 'Bs',
'BOP' => '$b.',
'BRL' => 'R$',
'BSD' => 'BS$',
'BTN' => 'Nu.',
'BWP' => 'BWP',
'BZD' => 'BZ$',
'CAD' => 'CA$',
'CDF' => 'CDF',
'CHF' => 'Fr.',
'CLE' => 'Eº',
'CLP' => 'CL$',
'CNY' => 'CN¥',
'COP' => 'CO$',
'CRC' => '₡',
'CUC' => 'CUC$',
'CUP' => 'CU$',
'CVE' => 'CV$',
'CYP' => 'CY£',
'CZK' => 'Kč',
'DEM' => 'DM',
'DJF' => 'Fdj',
'DKK' => 'Dkr',
'DOP' => 'RD$',
'DZD' => 'DA',
'EEK' => 'Ekr',
'EGP' => 'EG£',
'ERN' => 'Nfk',
'ESP' => 'Pts',
'ETB' => 'Br',
'EUR' => '€',
'FIM' => 'mk',
'FJD' => 'FJ$',
'FKP' => 'FK£',
'FRF' => '₣',
'GBP' => '£',
'GHC' => '₵',
'GHS' => 'GH₵',
'GIP' => 'GI£',
'GMD' => 'GMD',
'GNF' => 'FG',
'GRD' => '₯',
'GTQ' => 'GTQ',
'GYD' => 'GY$',
'HKD' => 'HK$',
'HNL' => 'HNL',
'HRK' => 'kn',
'HTG' => 'HTG',
'HUF' => 'Ft',
'IDR' => 'Rp',
'IEP' => 'IR£',
'ILP' => 'I£',
'ILS' => '₪',
'INR' => 'Rs',
'ISK' => 'Ikr',
'ITL' => 'IT₤',
'JMD' => 'J$',
'JOD' => 'JD',
'JPY' => '¥',
'KES' => 'Ksh',
'KMF' => 'CF',
'KRW' => '₩',
'KWD' => 'KD',
'KYD' => 'KY$',
'LAK' => '₭',
'LBP' => 'LB£',
'LKR' => 'SLRs',
'LRD' => 'L$',
'LSL' => 'LSL',
'LTL' => 'Lt',
'LVL' => 'Ls',
'LYD' => 'LD',
'MMK' => 'MMK',
'MNT' => '₮',
'MOP' => 'MOP$',
'MRO' => 'UM',
'MTL' => 'Lm',
'MTP' => 'MT£',
'MUR' => 'MURs',
'MXP' => 'MX$',
'MYR' => 'RM',
'MZM' => 'Mt',
'MZN' => 'MTn',
'NAD' => 'N$',
'NGN' => '₦',
'NIO' => 'C$',
'NLG' => 'fl',
'NOK' => 'Nkr',
'NPR' => 'NPRs',
'NZD' => 'NZ$',
'PAB' => 'B/.',
'PEI' => 'I/.',
'PEN' => 'S/.',
'PGK' => 'PGK',
'PHP' => '₱',
'PKR' => 'PKRs',
'PLN' => 'zł',
'PTE' => 'Esc',
'PYG' => '₲',
'QAR' => 'QR',
'RHD' => 'RH$',
'RON' => 'RON',
'RSD' => 'din.',
'SAR' => 'SR',
'SBD' => 'SI$',
'SCR' => 'SRe',
'SDD' => 'LSd',
'SEK' => 'Skr',
'SGD' => 'S$',
'SHP' => 'SH£',
'SKK' => 'Sk',
'SLL' => 'Le',
'SOS' => 'Ssh',
'SRD' => 'SR$',
'SRG' => 'Sf',
'STD' => 'Db',
'SVC' => 'SV₡',
'SYP' => 'SY£',
'SZL' => 'SZL',
'THB' => '฿',
'TMM' => 'TMM',
'TND' => 'DT',
'TOP' => 'T$',
'TRL' => 'TRL',
'TRY' => 'TL',
'TTD' => 'TT$',
'TWD' => 'NT$',
'TZS' => 'TSh',
'UAH' => '₴',
'UGX' => 'USh',
'USD' => '$',
'UYU' => '$U',
'VEF' => 'Bs.F.',
'VND' => '₫',
'VUV' => 'VT',
'WST' => 'WS$',
'XAF' => 'FCFA',
'XCD' => 'EC$',
'XOF' => 'CFA',
'XPF' => 'CFPF',
'YER' => 'YR',
'ZAR' => 'R',
'ZMK' => 'ZK',
'ZRN' => 'NZ',
'ZRZ' => 'ZRZ',
'ZWD' => 'Z$',
),
'monthNames' =>
array (
'wide' =>
array (
1 => '𐐖𐐰𐑌𐐷𐐭𐐯𐑉𐐨',
2 => '𐐙𐐯𐐺𐑉𐐭𐐯𐑉𐐨',
3 => '𐐣𐐪𐑉𐐽',
4 => '𐐁𐐹𐑉𐐮𐑊',
5 => '𐐣𐐩',
6 => '𐐖𐐭𐑌',
7 => '𐐖𐐭𐑊𐐴',
8 => '𐐂𐑀𐐲𐑅𐐻',
9 => '𐐝𐐯𐐹𐐻𐐯𐑋𐐺𐐲𐑉',
10 => '𐐉𐐿𐐻𐐬𐐺𐐲𐑉',
11 => '𐐤𐐬𐑂𐐯𐑋𐐺𐐲𐑉',
12 => '𐐔𐐨𐑅𐐯𐑋𐐺𐐲𐑉',
),
'abbreviated' =>
array (
1 => '𐐖𐐰𐑌',
2 => '𐐙𐐯𐐺',
3 => '𐐣𐐪𐑉',
4 => '𐐁𐐹𐑉',
5 => '𐐣𐐩',
6 => '𐐖𐐭𐑌',
7 => '𐐖𐐭𐑊',
8 => '𐐂𐑀',
9 => '𐐝𐐯𐐹',
10 => '𐐉𐐿𐐻',
11 => '𐐤𐐬𐑂',
12 => '𐐔𐐨𐑅',
),
'narrow' =>
array (
1 => '𐐖',
2 => '𐐙',
3 => '𐐣',
4 => '𐐁',
5 => '𐐣',
6 => '𐐖',
7 => '𐐖',
8 => '𐐂',
9 => '𐐝',
10 => '𐐉',
11 => '𐐤',
12 => '𐐔',
),
),
'monthNamesSA' =>
array (
'narrow' =>
array (
1 => '𐐖',
2 => '𐐙',
3 => '𐐣',
4 => '𐐁',
5 => '𐐣',
6 => '𐐖',
7 => '𐐖',
8 => '𐐂',
9 => '𐐝',
10 => '𐐉',
11 => '𐐤',
12 => '𐐔',
),
'abbreviated' =>
array (
1 => '𐐖𐐰𐑌',
3 => '𐐣𐐪𐑉',
4 => '𐐁𐐹𐑉',
5 => '𐐣𐐩',
6 => '𐐖𐐭𐑌',
7 => '𐐖𐐭𐑊',
8 => '𐐂𐑀',
9 => '𐐝𐐯𐐹',
10 => '𐐉𐐿𐐻',
11 => '𐐤𐐬𐑂',
12 => '𐐔𐐨𐑅',
),
'wide' =>
array (
1 => '𐐖𐐰𐑌𐐷𐐭𐐯𐑉𐐨',
3 => '𐐣𐐪𐑉𐐽',
4 => '𐐁𐐹𐑉𐐮𐑊',
5 => '𐐣𐐩',
6 => '𐐖𐐭𐑌',
7 => '𐐖𐐭𐑊𐐴',
8 => '𐐂𐑀𐐲𐑅𐐻',
9 => '𐐝𐐯𐐹𐐻𐐯𐑋𐐺𐐲𐑉',
10 => '𐐉𐐿𐐻𐐬𐐺𐐲𐑉',
11 => '𐐤𐐬𐑂𐐯𐑋𐐺𐐲𐑉',
12 => '𐐔𐐨𐑅𐐯𐑋𐐺𐐲𐑉',
),
),
'weekDayNames' =>
array (
'wide' =>
array (
0 => '𐐝𐐲𐑌𐐼𐐩',
1 => '𐐣𐐲𐑌𐐼𐐩',
2 => '𐐓𐐭𐑆𐐼𐐩',
3 => '𐐎𐐯𐑌𐑆𐐼𐐩',
4 => '𐐛𐐲𐑉𐑆𐐼𐐩',
5 => '𐐙𐑉𐐴𐐼𐐩',
6 => '𐐝𐐰𐐻𐐲𐑉𐐼𐐩',
),
'abbreviated' =>
array (
0 => '𐐝𐐲𐑌',
1 => '𐐣𐐲𐑌',
2 => '𐐓𐐭𐑆',
3 => '𐐎𐐯𐑌',
4 => '𐐛𐐲𐑉',
5 => '𐐙𐑉𐐴',
6 => '𐐝𐐰𐐻',
),
),
'weekDayNamesSA' =>
array (
'narrow' =>
array (
0 => '𐐝',
1 => '𐐣',
2 => '𐐓',
3 => '𐐎',
4 => '𐐛',
5 => '𐐙',
6 => '𐐝',
),
),
'eraNames' =>
array (
'abbreviated' =>
array (
0 => '𐐒𐐗',
1 => '𐐈𐐔',
),
'wide' =>
array (
0 => '𐐒𐐲𐑁𐐬𐑉 𐐗𐑉𐐴𐑅𐐻',
1 => '𐐈𐑌𐐬 𐐔𐐱𐑋𐐮𐑌𐐨',
),
'narrow' =>
array (
0 => '𐐒',
1 => '𐐈',
),
),
'dateFormats' =>
array (
'full' => 'EEEE, MMMM d, y',
'long' => 'MMMM d, y',
'medium' => 'MMM d, y',
'short' => 'M/d/yy',
),
'timeFormats' =>
array (
'full' => 'h:mm:ss a zzzz',
'long' => 'h:mm:ss a z',
'medium' => 'h:mm:ss a',
'short' => 'h:mm a',
),
'dateTimeFormat' => '{1} {0}',
'amName' => '𐐈𐐣',
'pmName' => '𐐑𐐣',
'orientation' => 'ltr',
);
| {
"pile_set_name": "Github"
} |
const fs = require('fs')
function readFilePromise( filename ) {
let _callback = () => {}
let _errorCallback = () => {}
fs.readFile(filename, (error, buffer) => {
if (error) _errorCallback(error)
else _callback(buffer)
})
return {
then( cb, errCb ){
_callback = cb
_errorCallback = errCb
}
}
}
// readFilePromise('package.json').then( buffer => {
// console.log( buffer.toString() )
// process.exit(0)
// }, err => {
// console.error( err )
// process.exit(1)
// })
readFilePromise('package.jsan').then( buffer => {
console.log( buffer.toString() )
process.exit(0)
}, err => {
console.error( err )
process.exit(1)
}) | {
"pile_set_name": "Github"
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_152-release) on Sun Feb 11 13:07:09 CET 2018 -->
<title>org.opencv.core Class Hierarchy</title>
<meta name="date" content="2018-02-11">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="org.opencv.core Class Hierarchy";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<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-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="../../../org/opencv/calib3d/package-tree.html">Prev</a></li>
<li><a href="../../../org/opencv/dnn/package-tree.html">Next</a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/opencv/core/package-tree.html" target="_top">Frames</a></li>
<li><a href="package-tree.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 class="title">Hierarchy For Package org.opencv.core</h1>
<span class="packageHierarchyLabel">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">org.opencv.core.<a href="../../../org/opencv/core/Algorithm.html" title="class in org.opencv.core"><span class="typeNameLink">Algorithm</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/Core.html" title="class in org.opencv.core"><span class="typeNameLink">Core</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/Core.MinMaxLocResult.html" title="class in org.opencv.core"><span class="typeNameLink">Core.MinMaxLocResult</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/CvType.html" title="class in org.opencv.core"><span class="typeNameLink">CvType</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/DMatch.html" title="class in org.opencv.core"><span class="typeNameLink">DMatch</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/KeyPoint.html" title="class in org.opencv.core"><span class="typeNameLink">KeyPoint</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/Mat.html" title="class in org.opencv.core"><span class="typeNameLink">Mat</span></a>
<ul>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfByte.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfByte</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfDMatch.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfDMatch</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfDouble.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfDouble</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfFloat.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfFloat</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfFloat4.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfFloat4</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfFloat6.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfFloat6</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfInt.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfInt</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfInt4.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfInt4</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfKeyPoint.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfKeyPoint</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfPoint.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfPoint</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfPoint2f.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfPoint2f</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfPoint3.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfPoint3</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfPoint3f.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfPoint3f</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfRect.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfRect</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/MatOfRect2d.html" title="class in org.opencv.core"><span class="typeNameLink">MatOfRect2d</span></a></li>
</ul>
</li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/Point.html" title="class in org.opencv.core"><span class="typeNameLink">Point</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/Point3.html" title="class in org.opencv.core"><span class="typeNameLink">Point3</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/Range.html" title="class in org.opencv.core"><span class="typeNameLink">Range</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/Rect.html" title="class in org.opencv.core"><span class="typeNameLink">Rect</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/Rect2d.html" title="class in org.opencv.core"><span class="typeNameLink">Rect2d</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/RotatedRect.html" title="class in org.opencv.core"><span class="typeNameLink">RotatedRect</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/Scalar.html" title="class in org.opencv.core"><span class="typeNameLink">Scalar</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/Size.html" title="class in org.opencv.core"><span class="typeNameLink">Size</span></a></li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/TermCriteria.html" title="class in org.opencv.core"><span class="typeNameLink">TermCriteria</span></a></li>
<li type="circle">java.lang.Throwable (implements java.io.Serializable)
<ul>
<li type="circle">java.lang.Exception
<ul>
<li type="circle">java.lang.RuntimeException
<ul>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/CvException.html" title="class in org.opencv.core"><span class="typeNameLink">CvException</span></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li type="circle">org.opencv.core.<a href="../../../org/opencv/core/TickMeter.html" title="class in org.opencv.core"><span class="typeNameLink">TickMeter</span></a></li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<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-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="../../../org/opencv/calib3d/package-tree.html">Prev</a></li>
<li><a href="../../../org/opencv/dnn/package-tree.html">Next</a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/opencv/core/package-tree.html" target="_top">Frames</a></li>
<li><a href="package-tree.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"pile_set_name": "Github"
} |
/*
** Copyright (c) 2012 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
** "Materials"), to deal in the Materials without restriction, including
** without limitation the rights to use, copy, modify, merge, publish,
** distribute, sublicense, and/or sell copies of the Materials, and to
** permit persons to whom the Materials are furnished to do so, subject to
** the following conditions:
**
** The above copyright notice and this permission notice shall be included
** in all copies or substantial portions of the Materials.
**
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
*/
attribute vec4 gtf_Color;
attribute vec4 gtf_Vertex;
uniform mat4 gtf_ModelViewProjectionMatrix;
varying vec4 color;
void main (void)
{
float c = -2.0 * (gtf_Color.r - 0.5);
color = vec4(exp2(2.0 * c) / 4.0, 0.0, 0.0, 1.0);
gl_Position = gtf_ModelViewProjectionMatrix * gtf_Vertex;
}
| {
"pile_set_name": "Github"
} |
#!/bin/sh
REPO="cachelot"
[ -d "${REPO}" ] && rm -rf ${REPO}
git clone https://github.com/cachelot/cachelot.git ${REPO}
cd ${REPO} &&
./all_build.sh &&
./run_tests.sh
| {
"pile_set_name": "Github"
} |
## Business-card in GoBuffalo
[Part 1 - templates, navigation](http://mycodesmells.com/post/business-card-in-gobuffalo---part-1)
[Part 2 - i18n](http://mycodesmells.com/post/business-card-in-go-buffalo---part-2---i18n)
[Part 3 - database](http://mycodesmells.com/post/business-card-in-go-buffalo---part-3---database)
[Part 4 - resources](http://mycodesmells.com/post/business-card-in-go-buffalo---part-4---resources)
[Part 5 - authentication](http://mycodesmells.com/post/business-card-in-go-buffalo---part-5---authentication)
| {
"pile_set_name": "Github"
} |
platform 68k
imports InternetConfig.lib
| {
"pile_set_name": "Github"
} |
43f293da9093faa19436c48d38df43755047a392b4f51e081bfb791188d4cab3c8150043b4dea4c4439dfecd29e00c1948f5726444fceefee192b8863264b2be
| {
"pile_set_name": "Github"
} |
package validate
import (
"encoding/pem"
"fmt"
"regexp"
)
func AttestationName(i interface{}, k string) (warning []string, errors []error) {
v, ok := i.(string)
if !ok {
return nil, append(errors, fmt.Errorf("expected type of %s to be string", k))
}
if !regexp.MustCompile(`^[a-z\d]{3,24}\z`).MatchString(v) {
errors = append(errors, fmt.Errorf("%s must be between 3 and 24 characters in length and use numbers and lower-case letters only.", k))
}
return
}
func IsCert(i interface{}, k string) (warning []string, errors []error) {
v, ok := i.(string)
if !ok {
return nil, append(errors, fmt.Errorf("expected type of %s to be string", k))
}
block, _ := pem.Decode([]byte(v))
if block == nil {
errors = append(errors, fmt.Errorf("%s is an invalid X.509 certificate", k))
}
return
}
| {
"pile_set_name": "Github"
} |
name: Cleanup Duplicate CI Runs
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '*/5 * * * *'
jobs:
cleanup-prs:
if: github.repository == 'quarkusio/quarkus'
name: "Cleanup Duplicate PRs"
runs-on: ubuntu-latest
steps:
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
workflow: ci-actions.yml
| {
"pile_set_name": "Github"
} |
.. image:: https://travis-ci.org/matthew-brett/delocate.svg?branch=master
:target: https://travis-ci.org/matthew-brett/delocate
########
Delocate
########
OSX utilities to:
* find dynamic libraries imported from python extensions
* copy needed dynamic libraries to directory within package
* update OSX ``install_names`` and ``rpath`` to cause code to load from copies
of libraries
Provides scripts:
* ``delocate-listdeps`` -- show libraries a tree depends on
* ``delocate-path`` -- copy libraries a tree depends on into the tree and relink
* ``delocate-wheel`` -- rewrite wheel having copied and relinked library
dependencies into the wheel tree.
`auditwheel <https://github.com/pypa/auditwheel>`_ is a tool for Linux
similar to ``delocate``, on which it was based.
.. warning::
Please be careful - this software is alpha quality and has not been much
tested in the wild. Make backups of your paths and wheels before trying the
utilities on them, please report any problems on the issue tracker (see
below).
***********
The problem
***********
Let's say you have built a wheel somewhere, but it's linking to dynamic
libraries elsewhere on the machine, so you can't distribute it, because others
may not have these same libraries. Here we analyze the dependencies for a scipy
wheel::
$ delocate-listdeps scipy-0.14.0b1-cp34-cp34m-macosx_10_6_intel.whl
/usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libgcc_s.1.dylib
/usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libgfortran.3.dylib
/usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libquadmath.0.dylib
By default, this does not include libraries in ``/usr/lib`` and ``/System``.
See those too with::
$ delocate-listdeps --all scipy-0.14.0-cp34-cp34m-macosx_10_6_intel.whl
/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
/usr/lib/libSystem.B.dylib
/usr/lib/libstdc++.6.dylib
/usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libgcc_s.1.dylib
/usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libgfortran.3.dylib
/usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libquadmath.0.dylib
The output tells me that scipy has picked up dynamic libraries from my homebrew
installation of ``gfortran`` (as well as the system libs).
.. warning::
Dependency paths starting with ``@loader_path/`` or ``@executable_path/``
are ignored by delocate. These files will be skipped by the
``delocate-wheel`` command.
You can get a listing of the files depending on each of the libraries,
using the ``--depending`` flag::
$ delocate-listdeps --depending scipy-0.14.0-cp34-cp34m-macosx_10_6_intel.whl
/usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libgcc_s.1.dylib:
scipy/interpolate/dfitpack.so
scipy/special/specfun.so
scipy/interpolate/_fitpack.so
...
**********
A solution
**********
We can fix like this::
$ delocate-wheel -w fixed_wheels -v scipy-0.14.0-cp34-cp34m-macosx_10_6_intel.whl
Fixing: scipy-0.14.0-cp34-cp34m-macosx_10_6_intel.whl
Copied to package .dylibs directory:
/usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libgcc_s.1.dylib
/usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libgfortran.3.dylib
/usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libquadmath.0.dylib
The ``-w`` flag tells delocate-wheel to output to a new wheel directory instead
of overwriting the old wheel. ``-v`` (verbose) tells you what delocate-wheel is
doing. In this case it has made a new directory in the wheel zipfile, named
``scipy/.dylibs``. It has copied all the library dependencies that are outside
the OSX system trees into this directory, and patched the python ``.so``
extensions in the wheel to use these copies instead of looking in
``/usr/local/Cellar/gfortran/4.8.2/gfortran/lib``.
Check the links again to confirm::
$ delocate-listdeps --all fixed_wheels/scipy-0.14.0-cp34-cp34m-macosx_10_6_intel.whl
/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate
/usr/lib/libSystem.B.dylib
/usr/lib/libstdc++.6.0.9.dylib
@loader_path/../../../../.dylibs/libgcc_s.1.dylib
@loader_path/../../../../.dylibs/libgfortran.3.dylib
@loader_path/../../../../.dylibs/libquadmath.0.dylib
@loader_path/../../../.dylibs/libgcc_s.1.dylib
@loader_path/../../../.dylibs/libgfortran.3.dylib
@loader_path/../../../.dylibs/libquadmath.0.dylib
@loader_path/../../.dylibs/libgcc_s.1.dylib
@loader_path/../../.dylibs/libgfortran.3.dylib
@loader_path/../../.dylibs/libquadmath.0.dylib
@loader_path/../.dylibs/libgcc_s.1.dylib
@loader_path/../.dylibs/libgfortran.3.dylib
@loader_path/../.dylibs/libquadmath.0.dylib
@loader_path/libgcc_s.1.dylib
@loader_path/libquadmath.0.dylib
So - system dylibs the same, but the others moved into the wheel tree.
This makes the wheel more likely to work on another machine which does not have
the same version of gfortran installed - in this example.
Checking required architectures
===============================
Current Python.org Python and the OSX system Python (``/usr/bin/python``) are
both dual Intel architecture binaries. For example::
$ lipo -info /usr/bin/python
Architectures in the fat file: /usr/bin/python are: x86_64 i386
This means that wheels built for Python.org Python or system Python should
also have i386 and x86_64 versions of the Python extensions and their
libraries. It is easy to link Python extensions against single architecture
libraries by mistake, and therefore get single architecture extensions and /
or libraries. In fact my scipy wheel is one such example, because I
inadvertently linked against the homebrew libraries, which are x86_64 only.
To check this you can use the ``--require-archs`` flag::
$ delocate-wheel --require-archs=intel scipy-0.14.0-cp34-cp34m-macosx_10_6_intel.whl
Traceback (most recent call last):
File "/Users/mb312/.virtualenvs/delocate/bin/delocate-wheel", line 77, in <module>
main()
File "/Users/mb312/.virtualenvs/delocate/bin/delocate-wheel", line 69, in main
check_verbose=opts.verbose)
File "/Users/mb312/.virtualenvs/delocate/lib/python2.7/site-packages/delocate/delocating.py", line 477, in delocate_wheel
"Some missing architectures in wheel")
delocate.delocating.DelocationError: Some missing architectures in wheel
The "intel" argument requires dual architecture extensions and libraries. You
can see which extensions are at fault by adding the ``-v`` (verbose) flag::
$ delocate-wheel -w fixed_wheels --require-archs=intel -v scipy-0.14.0-cp34-cp34m-macosx_10_6_intel.whl
Fixing: scipy-0.14.0-cp34-cp34m-macosx_10_6_intel.whl
Required arch i386 missing from /usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libgfortran.3.dylib
Required arch i386 missing from /usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libquadmath.0.dylib
Required arch i386 missing from scipy/fftpack/_fftpack.so
Required arch i386 missing from scipy/fftpack/convolve.so
Required arch i386 missing from scipy/integrate/_dop.so
...
I need to rebuild this wheel to link with dual-architecture libraries.
Troubleshooting
===============
DelocationError: "library does not exist"
-----------------------------------------
When running ``delocate-wheel`` or its sister command ``delocate-path``, you
may get errors like this::
delocate.delocating.DelocationError: library "<long temporary path>/wheel/libme.dylib" does not exist
This happens when one of your libraries gives a library dependency with a
relative path. For example, let's say that some file in my wheel has this for
the output of ``otool -L myext.so``::
myext.so:
libme.dylib (compatibility version 10.0.0, current version 10.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
The first line means that ``myext.so`` expects to find ``libme.dylib`` at
exactly the path ``./libme.dylib`` - the current working directory from which
you ran the executable. The output *should* be something like::
myext.so:
/path/to/libme.dylib (compatibility version 10.0.0, current version 10.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 60.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
To set the path to the library, the linker is using the `install name id`_ of
the linked library. In this bad case, then ``otool -L libme.dylib`` will give
something like::
libme.dylib (compatibility version 10.0.0, current version 10.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
where the first line is the `install name id`_ that the linker picked up when
linking ``myext.so`` to ``libme.dylib``. You job is to fix the build process
so that ``libme.dylib`` has install name id ``/path/to/libme.dylib``.
This is not a problem specific to ``delocate``; you will need to do this to
make sure that ``myext.so`` can load ``libme.dylib`` without ``libme.dylib``
being in the current working directory. For ``CMAKE`` builds you may want to
check out CMAKE_INSTALL_NAME_DIR_.
External library is not bundled into wheel
------------------------------------------
If your project is structured as a standalone Python module rather
than package, ``delocate-wheel`` may not find the extension modules
that you want to patch::
$ delocate-wheel -w fixed_wheels -v my-wheel-name.whl
Fixing: my-wheel-name.whl
The above output is missing a line indicating that an external
shared library was copied into the wheel as intended.
To show this visually, this project layout will **not** work::
├── extension_module.cpp
├── setup.py
└── README.md
Instead, ``delocate-wheel`` requires a project organized as a Python
package rather than single standalone module::
├── proj/
│ ├── __init__.py
│ ├── extension_module.cpp
├── setup.py
└── README.md
Here, ``__init__.py`` contains::
from .extension_module import *
Along with this, make sure to include the ``packages`` argument
to ``setup()`` in ``setup.py``::
# setup.py
from setuptools import setup, find_packages
# ...
setup(
# ...
packages=find_packages(), # or packages=["proj"]
# ...
)
After these changes, you should see the dylibs successfully copied in::
$ delocate-wheel -w fixed_wheels -v my-wheel-name.whl
Fixing: my-wheel-name.whl
Copied to package .dylibs directory:
/usr/local/Cellar/package/1.0/lib/mylib.22.dylib
Refer to `Issue 12`_, `Issue 15`_, and `Issue 45`_ for more detail.
.. _Issue 12:
https://github.com/matthew-brett/delocate/issues/12
.. _Issue 15:
https://github.com/matthew-brett/delocate/issues/15
.. _Issue 45:
https://github.com/matthew-brett/delocate/issues/45
****
Code
****
See https://github.com/matthew-brett/delocate
Released under the BSD two-clause license - see the file ``LICENSE`` in the
source distribution.
`travis-ci <https://travis-ci.org/matthew-brett/delocate>`_ kindly tests the
code automatically under Python 2.7, and 3.5 through 3.8.
The latest released version is at https://pypi.python.org/pypi/delocate
*******
Support
*******
Please put up issues on the `delocate issue tracker
<https://github.com/matthew-brett/delocate/issues>`_.
.. _install name id:
http://matthew-brett.github.io/docosx/mac_runtime_link.html#the-install-name
.. _CMAKE_INSTALL_NAME_DIR:
http://www.cmake.org/cmake/help/v3.0/variable/CMAKE_INSTALL_NAME_DIR.html
| {
"pile_set_name": "Github"
} |
<!-- AUTO-GENERATED FILE. DO NOT MODIFY. -->
<shape xmlns:android="http://schemas.android.com/apk/res/android" /> | {
"pile_set_name": "Github"
} |
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/webcrypto/algorithm_registry.h"
#include "base/lazy_instance.h"
#include "components/webcrypto/algorithm_implementation.h"
#include "components/webcrypto/algorithm_implementations.h"
#include "components/webcrypto/status.h"
#include "crypto/openssl_util.h"
namespace webcrypto {
namespace {
// This class is used as a singleton. All methods must be threadsafe.
class AlgorithmRegistry {
public:
AlgorithmRegistry()
: sha_(CreateShaImplementation()),
aes_gcm_(CreateAesGcmImplementation()),
aes_cbc_(CreateAesCbcImplementation()),
aes_ctr_(CreateAesCtrImplementation()),
aes_kw_(CreateAesKwImplementation()),
hmac_(CreateHmacImplementation()),
rsa_ssa_(CreateRsaSsaImplementation()),
rsa_oaep_(CreateRsaOaepImplementation()),
rsa_pss_(CreateRsaPssImplementation()),
ecdsa_(CreateEcdsaImplementation()),
ecdh_(CreateEcdhImplementation()),
hkdf_(CreateHkdfImplementation()),
pbkdf2_(CreatePbkdf2Implementation()) {
crypto::EnsureOpenSSLInit();
}
const AlgorithmImplementation* GetAlgorithm(
blink::WebCryptoAlgorithmId id) const {
switch (id) {
case blink::WebCryptoAlgorithmIdSha1:
case blink::WebCryptoAlgorithmIdSha256:
case blink::WebCryptoAlgorithmIdSha384:
case blink::WebCryptoAlgorithmIdSha512:
return sha_.get();
case blink::WebCryptoAlgorithmIdAesGcm:
return aes_gcm_.get();
case blink::WebCryptoAlgorithmIdAesCbc:
return aes_cbc_.get();
case blink::WebCryptoAlgorithmIdAesCtr:
return aes_ctr_.get();
case blink::WebCryptoAlgorithmIdAesKw:
return aes_kw_.get();
case blink::WebCryptoAlgorithmIdHmac:
return hmac_.get();
case blink::WebCryptoAlgorithmIdRsaSsaPkcs1v1_5:
return rsa_ssa_.get();
case blink::WebCryptoAlgorithmIdRsaOaep:
return rsa_oaep_.get();
case blink::WebCryptoAlgorithmIdRsaPss:
return rsa_pss_.get();
case blink::WebCryptoAlgorithmIdEcdsa:
return ecdsa_.get();
case blink::WebCryptoAlgorithmIdEcdh:
return ecdh_.get();
case blink::WebCryptoAlgorithmIdHkdf:
return hkdf_.get();
case blink::WebCryptoAlgorithmIdPbkdf2:
return pbkdf2_.get();
default:
return NULL;
}
}
private:
const std::unique_ptr<AlgorithmImplementation> sha_;
const std::unique_ptr<AlgorithmImplementation> aes_gcm_;
const std::unique_ptr<AlgorithmImplementation> aes_cbc_;
const std::unique_ptr<AlgorithmImplementation> aes_ctr_;
const std::unique_ptr<AlgorithmImplementation> aes_kw_;
const std::unique_ptr<AlgorithmImplementation> hmac_;
const std::unique_ptr<AlgorithmImplementation> rsa_ssa_;
const std::unique_ptr<AlgorithmImplementation> rsa_oaep_;
const std::unique_ptr<AlgorithmImplementation> rsa_pss_;
const std::unique_ptr<AlgorithmImplementation> ecdsa_;
const std::unique_ptr<AlgorithmImplementation> ecdh_;
const std::unique_ptr<AlgorithmImplementation> hkdf_;
const std::unique_ptr<AlgorithmImplementation> pbkdf2_;
};
} // namespace
base::LazyInstance<AlgorithmRegistry>::Leaky g_algorithm_registry =
LAZY_INSTANCE_INITIALIZER;
Status GetAlgorithmImplementation(blink::WebCryptoAlgorithmId id,
const AlgorithmImplementation** impl) {
*impl = g_algorithm_registry.Get().GetAlgorithm(id);
if (*impl)
return Status::Success();
return Status::ErrorUnsupported();
}
} // namespace webcrypto
| {
"pile_set_name": "Github"
} |
# yada - full bundle
## Testing
Testing this bundle is done from the top-level yada directory:
lein test
| {
"pile_set_name": "Github"
} |
//
// UIView+DefaultColor.m
// Runtime
//
// Created by pro648 on 2020/3/7.
// Copyright © 2020 pro648. All rights reserved.
//
#import "UIView+DefaultColor.h"
#import <objc/runtime.h>
static void *kDefaultColorKey = &kDefaultColorKey;
@implementation UIView (DefaultColor)
- (UIColor *)defaultColor {
// return objc_getAssociatedObject(self, kDefaultColorKey);
return objc_getAssociatedObject(self, @selector(defaultColor));
}
- (void)setDefaultColor:(UIColor *)defaultColor {
// objc_setAssociatedObject(self, kDefaultColorKey, defaultColor, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
objc_setAssociatedObject(self, @selector(defaultColor), defaultColor, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
@end
| {
"pile_set_name": "Github"
} |
{%MainUnit ../stdctrls.pp}
{
*****************************************************************************
This file is part of the Lazarus Component Library (LCL)
See the file COPYING.modifiedLGPL.txt, included in this distribution,
for details about the license.
*****************************************************************************
}
{------------------------------------------------------------------------------}
class procedure TToggleBox.WSRegisterClass;
begin
inherited WSRegisterClass;
RegisterToggleBox;
end;
class function TToggleBox.GetControlClassDefaultSize: TSize;
begin
//Use TButton's size
Result := TButton.GetControlClassDefaultSize;
end;
procedure TToggleBox.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
Params.Style := (Params.Style and not BS_3STATE) or BS_AUTOCHECKBOX or BS_PUSHLIKE;
end;
constructor TToggleBox.Create(TheOwner : TComponent);
begin
inherited Create(TheOwner);
fCompStyle := csToggleBox;
TabStop := True;
ParentColor := False;
end;
{------------------------------------------------------------------------------}
// included by stdctrls.pp
| {
"pile_set_name": "Github"
} |
package sqlite
import (
"fmt"
"strings"
"github.com/sirupsen/logrus"
utilerrors "k8s.io/apimachinery/pkg/util/errors"
"github.com/operator-framework/operator-registry/pkg/registry"
)
type SQLRemover interface {
Remove() error
}
// PackageRemover removes a package from the database
type PackageRemover struct {
store registry.Load
packages string
}
var _ SQLRemover = &PackageRemover{}
func NewSQLRemoverForPackages(store registry.Load, packages string) *PackageRemover {
return &PackageRemover{
store: store,
packages: packages,
}
}
func (d *PackageRemover) Remove() error {
log := logrus.WithField("pkg", d.packages)
log.Info("deleting packages")
var errs []error
packages := sanitizePackageList(strings.Split(d.packages, ","))
log.Info("input has been sanitized")
log.Infof("packages: %s", packages)
for _, pkg := range packages {
if err := d.store.RmPackageName(pkg); err != nil {
errs = append(errs, fmt.Errorf("error removing operator package %s: %s", pkg, err))
}
}
return utilerrors.NewAggregate(errs)
}
// sanitizePackageList sanitizes the set of package(s) specified. It removes
// duplicates and ignores empty string.
func sanitizePackageList(in []string) []string {
out := make([]string, 0)
inMap := map[string]bool{}
for _, item := range in {
if _, ok := inMap[item]; ok || item == "" {
continue
}
inMap[item] = true
out = append(out, item)
}
return out
}
| {
"pile_set_name": "Github"
} |
/**
* Copyright (C) 2008-2014, Marvell International Ltd.
*
* This software file (the "File") is distributed by Marvell International
* Ltd. under the terms of the GNU General Public License Version 2, June 1991
* (the "License"). You may use, redistribute and/or modify this File in
* accordance with the terms and conditions of the License, a copy of which
* is available by writing to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or on the
* worldwide web at http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
*
* THE FILE IS DISTRIBUTED AS-IS, WITHOUT WARRANTY OF ANY KIND, AND THE
* IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE
* ARE EXPRESSLY DISCLAIMED. The License provides additional details about
* this warranty disclaimer.
*
*/
#ifndef AP8X_DMA_H_
#define AP8X_DMA_H_
#ifdef DMA_ENABLE
#ifdef WL_DEBUG
extern int mvDmaCopy(const char *func, int line, void *dst, void *src, int byteCount);
#define MEMCPY mvDmaCopy(__FUNCTION__,__LINE__,
#else
extern int mvDmaCopy(void *dst, void *src, int byteCount);
#define MEMCPY mvDmaCopy(
#endif
#else
#define MEMCPY memcpy(
#endif
#endif /*AP8X_DMA_H_*/
| {
"pile_set_name": "Github"
} |
/*
* -\-\-
* Spotify Apollo Metrics Module
* --
* Copyright (C) 2013 - 2016 Spotify AB
* --
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* -/-/-
*/
package com.spotify.apollo.metrics.noop;
import com.spotify.apollo.Request;
import com.spotify.apollo.Response;
import com.spotify.apollo.metrics.RequestMetrics;
import okio.ByteString;
class NoopRequestMetrics implements RequestMetrics {
private NoopRequestMetrics() {
}
private static final NoopRequestMetrics INSTANCE =
new NoopRequestMetrics();
public static RequestMetrics instance() {
return INSTANCE;
}
@Override
public void incoming(Request request) {
}
@Override
public void fanout(int i) {
}
@Override
public void response(Response<ByteString> response) {
}
@Override
public void drop() {
}
}
| {
"pile_set_name": "Github"
} |
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_AT_IMPL_09242011_1744)
#define BOOST_FUSION_AT_IMPL_09242011_1744
#include <boost/fusion/support/config.hpp>
#include <tuple>
#include <utility>
#include <boost/mpl/if.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/type_traits/remove_const.hpp>
namespace boost { namespace fusion
{
struct std_tuple_tag;
namespace extension
{
template<typename T>
struct at_impl;
template <>
struct at_impl<std_tuple_tag>
{
template <typename Sequence, typename N>
struct apply
{
typedef typename remove_const<Sequence>::type seq_type;
typedef typename std::tuple_element<N::value, seq_type>::type element;
typedef typename
mpl::if_<
is_const<Sequence>
, typename fusion::detail::cref_result<element>::type
, typename fusion::detail::ref_result<element>::type
>::type
type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(Sequence& seq)
{
return std::get<N::value>(seq);
}
};
};
}
}}
#endif
| {
"pile_set_name": "Github"
} |
namespace MassTransit.Testing.Indicators
{
using System.Threading.Tasks;
using GreenPipes;
using GreenPipes.Util;
public abstract class BaseBusActivityIndicatorConnectable : Connectable<IConditionObserver>,
IObservableCondition
{
public ConnectHandle ConnectConditionObserver(IConditionObserver observer)
{
return Connect(observer);
}
public abstract bool IsMet { get; }
protected Task ConditionUpdated()
{
return ForEachAsync(x => x.ConditionUpdated());
}
}
}
| {
"pile_set_name": "Github"
} |
/*
* Key idea:
*
* In C++14 we can omit the trailing return type, leaving just the leading
* auto. With that form of declaration, auto does mean that type deduction
* will take place. In particular, it means that compilers will deduce the
* function's return type from the function's implementation.
*/
template<typename Container, typename Index> // C++14 only, and
auto authAndAccess(Container& c, Index i) // not quite
// correct
{
authenticateUser();
return c[i]; // return type deduced from c[i]
}
| {
"pile_set_name": "Github"
} |
/*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
* in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.cloudasset.v1p4beta1.model;
/**
* A Google Cloud resource under analysis.
*
* <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
* transmitted over HTTP when working with the Cloud Asset API. For a detailed explanation see:
* <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
* </p>
*
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public final class GoogleCloudAssetV1p4beta1Resource extends com.google.api.client.json.GenericJson {
/**
* The analysis state of this resource.
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private GoogleCloudAssetV1p4beta1AnalysisState analysisState;
/**
* The [full resource name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
* The value may be {@code null}.
*/
@com.google.api.client.util.Key
private java.lang.String fullResourceName;
/**
* The analysis state of this resource.
* @return value or {@code null} for none
*/
public GoogleCloudAssetV1p4beta1AnalysisState getAnalysisState() {
return analysisState;
}
/**
* The analysis state of this resource.
* @param analysisState analysisState or {@code null} for none
*/
public GoogleCloudAssetV1p4beta1Resource setAnalysisState(GoogleCloudAssetV1p4beta1AnalysisState analysisState) {
this.analysisState = analysisState;
return this;
}
/**
* The [full resource name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
* @return value or {@code null} for none
*/
public java.lang.String getFullResourceName() {
return fullResourceName;
}
/**
* The [full resource name](https://cloud.google.com/asset-inventory/docs/resource-name-format)
* @param fullResourceName fullResourceName or {@code null} for none
*/
public GoogleCloudAssetV1p4beta1Resource setFullResourceName(java.lang.String fullResourceName) {
this.fullResourceName = fullResourceName;
return this;
}
@Override
public GoogleCloudAssetV1p4beta1Resource set(String fieldName, Object value) {
return (GoogleCloudAssetV1p4beta1Resource) super.set(fieldName, value);
}
@Override
public GoogleCloudAssetV1p4beta1Resource clone() {
return (GoogleCloudAssetV1p4beta1Resource) super.clone();
}
}
| {
"pile_set_name": "Github"
} |
#!/usr/bin/env python3
"""This is an example to train a task with TRPO algorithm (PyTorch).
Here it runs InvertedDoublePendulum-v2 environment with 100 iterations.
"""
import torch
from garage import wrap_experiment
from garage.envs import GymEnv
from garage.experiment.deterministic import set_seed
from garage.torch.algos import TRPO
from garage.torch.policies import GaussianMLPPolicy
from garage.torch.value_functions import GaussianMLPValueFunction
from garage.trainer import Trainer
@wrap_experiment
def trpo_pendulum(ctxt=None, seed=1):
"""Train TRPO with InvertedDoublePendulum-v2 environment.
Args:
ctxt (garage.experiment.ExperimentContext): The experiment
configuration used by Trainer to create the snapshotter.
seed (int): Used to seed the random number generator to produce
determinism.
"""
set_seed(seed)
env = GymEnv('InvertedDoublePendulum-v2')
trainer = Trainer(ctxt)
policy = GaussianMLPPolicy(env.spec,
hidden_sizes=[32, 32],
hidden_nonlinearity=torch.tanh,
output_nonlinearity=None)
value_function = GaussianMLPValueFunction(env_spec=env.spec,
hidden_sizes=(32, 32),
hidden_nonlinearity=torch.tanh,
output_nonlinearity=None)
algo = TRPO(env_spec=env.spec,
policy=policy,
value_function=value_function,
discount=0.99,
center_adv=False)
trainer.setup(algo, env)
trainer.train(n_epochs=100, batch_size=1024)
trpo_pendulum(seed=1)
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Add NLog Logger to a class</Title>
<Author>NLog Project</Author>
<Description>Add Logger creation statement to a class.</Description>
<Shortcut>nlogger</Shortcut>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal Editable="false">
<ID>Logger</ID>
<Function>SimpleTypeName(NLog.Logger)</Function>
</Literal>
<Literal Editable="false">
<ID>LogManager</ID>
<Function>SimpleTypeName(NLog.LogManager)</Function>
</Literal>
</Declarations>
<Code Language="csharp">
<![CDATA[private static $Logger$ logger = $LogManager$.GetCurrentClassLogger();]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets> | {
"pile_set_name": "Github"
} |
#! /bin/sh
. ../../testenv.sh
GHDL_STD_FLAGS=--std=08
analyze to_slv_issue.vhdl
elab_simulate to_slv_issue
clean
echo "Test successful"
| {
"pile_set_name": "Github"
} |
/*
* $HeadURL: $
* $Revision: $
* $Date: $
*
* ====================================================================
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
*/
package org.apache.http.client;
import java.io.IOException;
/**
* Signals an error in the HTTP protocol.
*/
public class ClientProtocolException extends IOException {
private static final long serialVersionUID = -5596590843227115865L;
public ClientProtocolException() {
super();
}
public ClientProtocolException(String s) {
super(s);
}
public ClientProtocolException(Throwable cause) {
initCause(cause);
}
public ClientProtocolException(String message, Throwable cause) {
super(message);
initCause(cause);
}
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.nodeclipse.nodeclipse-1</groupId>
<artifactId>parent</artifactId>
<version>1.0.2-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>org.nodeclipse.enide.editors.jade.feature</artifactId>
<packaging>eclipse-feature</packaging>
<name>org.nodeclipse.enide.editors.jade.feature</name>
<description>org.nodeclipse.enide.editors.jade.feature Minimalist Jade Editor</description>
</project>
| {
"pile_set_name": "Github"
} |
package com.cheng.utils;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.SystemClock;
import android.text.TextUtils;
/**
* 轮询服务工具类
*/
public final class PollingUtil {
private static final boolean DEBUG = true;
private static final String TAG = "PollingUtils";
/**
* Don't let anyone instantiate this class.
*/
private PollingUtil() {
throw new Error("Do not need instantiate!");
}
/**
* 判断是否存在轮询服务
*
* @param context 上下文
* @param cls Class
* @return
*/
public static boolean isPollingServiceExist(Context context, Class<?> cls) {
Intent intent = new Intent(context, cls);
PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0,
intent, PendingIntent.FLAG_NO_CREATE);
if (DEBUG) {
if (pendingIntent != null)
Logger.e(pendingIntent.toString());
Logger.e(pendingIntent != null ? "Exist" : "Not exist");
}
return pendingIntent != null;
}
/**
* 开启轮询服务
*
* @param context 上下文
* @param interval 时间间隔,单位为秒
* @param cls Class
*/
public static void startPollingService(Context context, int interval,
Class<?> cls) {
startPollingService(context, interval, cls, null);
}
/**
* 开启轮询服务
*
* @param context 上下文
* @param interval 时间间隔,单位为秒
* @param cls Class
* @param action Action
*/
public static void startPollingService(Context context, int interval,
Class<?> cls, String action) {
AlarmManager manager = (AlarmManager) context
.getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(context, cls);
if (!TextUtils.isEmpty(action)) {
intent.setAction(action);
}
PendingIntent pendingIntent = PendingIntent.getService(context, 0,
intent, PendingIntent.FLAG_UPDATE_CURRENT);
long triggerAtTime = SystemClock.elapsedRealtime();
manager.setRepeating(AlarmManager.ELAPSED_REALTIME, triggerAtTime,
interval * 1000, pendingIntent);
}
/**
* 停止轮询服务
*
* @param context 上下文
* @param cls Class
*/
public static void stopPollingService(Context context, Class<?> cls) {
stopPollingService(context, cls, null);
}
/**
* 停止轮询服务
*
* @param context 上下文
* @param cls Class
* @param action Action
*/
public static void stopPollingService(Context context, Class<?> cls,
String action) {
AlarmManager manager = (AlarmManager) context
.getSystemService(Context.ALARM_SERVICE);
Intent intent = new Intent(context, cls);
if (!TextUtils.isEmpty(action)) {
intent.setAction(action);
}
PendingIntent pendingIntent = PendingIntent.getService(context, 0,
intent, PendingIntent.FLAG_UPDATE_CURRENT);
manager.cancel(pendingIntent);
}
}
| {
"pile_set_name": "Github"
} |
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "FieldM.H"
#include "FieldFieldReuseFunctions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define UNARY_FUNCTION(ReturnType, Type, Func) \
\
TEMPLATE \
void Func \
( \
FieldField<Field, ReturnType>& res, \
const FieldField<Field, Type>& f \
) \
{ \
forAll(res, i) \
{ \
Func(res[i], f[i]); \
} \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > Func \
( \
const FieldField<Field, Type>& f \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
FieldField<Field, ReturnType>::NewCalculatedType(f) \
); \
Func(tRes(), f); \
return tRes; \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > Func \
( \
const tmp<FieldField<Field, Type> >& tf \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
reuseTmpFieldField<Field, Type, Type>::New(tf) \
); \
Func(tRes(), tf()); \
reuseTmpFieldField<Field, Type, Type>::clear(tf); \
return tRes; \
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define UNARY_OPERATOR(ReturnType, Type, Op, OpFunc) \
\
TEMPLATE \
void OpFunc \
( \
FieldField<Field, ReturnType>& res, \
const FieldField<Field, Type>& f \
) \
{ \
forAll(res, i) \
{ \
OpFunc(res[i], f[i]); \
} \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > operator Op \
( \
const FieldField<Field, Type>& f \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
FieldField<Field, Type>::NewCalculatedType(f) \
); \
OpFunc(tRes(), f); \
return tRes; \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > operator Op \
( \
const tmp<FieldField<Field, Type> >& tf \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
reuseTmpFieldField<Field, Type, Type>::New(tf) \
); \
OpFunc(tRes(), tf()); \
reuseTmpFieldField<Field, Type, Type>::clear(tf); \
return tRes; \
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define BINARY_FUNCTION(ReturnType, Type1, Type2, Func) \
\
TEMPLATE \
void Func \
( \
FieldField<Field, ReturnType>& f, \
const FieldField<Field, Type1>& f1, \
const FieldField<Field, Type2>& f2 \
) \
{ \
forAll(f, i) \
{ \
Func(f[i], f1[i], f2[i]); \
} \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > Func \
( \
const FieldField<Field, Type1>& f1, \
const FieldField<Field, Type2>& f2 \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
FieldField<Field, Type1>::NewCalculatedType(f1) \
); \
Func(tRes(), f1, f2); \
return tRes; \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > Func \
( \
const FieldField<Field, Type1>& f1, \
const tmp<FieldField<Field, Type2> >& tf2 \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
reuseTmpFieldField<Field, ReturnType, Type2>::New(tf2) \
); \
Func(tRes(), f1, tf2()); \
reuseTmpFieldField<Field, ReturnType, Type2>::clear(tf2); \
return tRes; \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > Func \
( \
const tmp<FieldField<Field, Type1> >& tf1, \
const FieldField<Field, Type2>& f2 \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
reuseTmpFieldField<Field, ReturnType, Type1>::New(tf1) \
); \
Func(tRes(), tf1(), f2); \
reuseTmpFieldField<Field, ReturnType, Type1>::clear(tf1); \
return tRes; \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > Func \
( \
const tmp<FieldField<Field, Type1> >& tf1, \
const tmp<FieldField<Field, Type2> >& tf2 \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
reuseTmpTmpFieldField<Field, ReturnType, Type1, Type1, Type2>:: \
New(tf1, tf2) \
); \
Func(tRes(), tf1(), tf2()); \
reuseTmpTmpFieldField<Field, ReturnType, Type1, Type1, Type2>:: \
clear(tf1, tf2); \
return tRes; \
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func) \
\
TEMPLATE \
void Func \
( \
FieldField<Field, ReturnType>& f, \
const FieldField<Field, Type1>& f1, \
const Type2& s \
) \
{ \
forAll(f, i) \
{ \
Func(f[i], f1[i], s); \
} \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > Func \
( \
const FieldField<Field, Type1>& f1, \
const Type2& s \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
FieldField<Field, Type1>::NewCalculatedType(f1) \
); \
Func(tRes(), f1, s); \
return tRes; \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > Func \
( \
const tmp<FieldField<Field, Type1> >& tf1, \
const Type2& s \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
reuseTmpFieldField<Field, ReturnType, Type1>::New(tf1) \
); \
Func(tRes(), tf1(), s); \
reuseTmpFieldField<Field, ReturnType, Type1>::clear(tf1); \
return tRes; \
}
#define BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func) \
\
TEMPLATE \
void Func \
( \
FieldField<Field, ReturnType>& f, \
const Type1& s, \
const FieldField<Field, Type2>& f2 \
) \
{ \
forAll(f, i) \
{ \
Func(f[i], s, f2[i]); \
} \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > Func \
( \
const Type1& s, \
const FieldField<Field, Type2>& f2 \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
FieldField<Field, Type2>::NewCalculatedType(f2) \
); \
Func(tRes(), s, f2); \
return tRes; \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > Func \
( \
const Type1& s, \
const tmp<FieldField<Field, Type2> >& tf2 \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
reuseTmpFieldField<Field, ReturnType, Type2>::New(tf2) \
); \
Func(tRes(), s, tf2()); \
reuseTmpFieldField<Field, ReturnType, Type2>::clear(tf2); \
return tRes; \
}
#define BINARY_TYPE_FUNCTION(ReturnType, Type1, Type2, Func) \
BINARY_TYPE_FUNCTION_SF(ReturnType, Type1, Type2, Func) \
BINARY_TYPE_FUNCTION_FS(ReturnType, Type1, Type2, Func)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define BINARY_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc) \
\
TEMPLATE \
void OpFunc \
( \
FieldField<Field, ReturnType>& f, \
const FieldField<Field, Type1>& f1, \
const FieldField<Field, Type2>& f2 \
) \
{ \
forAll(f, i) \
{ \
OpFunc(f[i], f1[i], f2[i]); \
} \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > operator Op \
( \
const FieldField<Field, Type1>& f1, \
const FieldField<Field, Type2>& f2 \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
FieldField<Field, ReturnType>::NewCalculatedType(f1) \
); \
OpFunc(tRes(), f1, f2); \
return tRes; \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > operator Op \
( \
const FieldField<Field, Type1>& f1, \
const tmp<FieldField<Field, Type2> >& tf2 \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
reuseTmpFieldField<Field, ReturnType, Type2>::New(tf2) \
); \
OpFunc(tRes(), f1, tf2()); \
reuseTmpFieldField<Field, ReturnType, Type2>::clear(tf2); \
return tRes; \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > operator Op \
( \
const tmp<FieldField<Field, Type1> >& tf1, \
const FieldField<Field, Type2>& f2 \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
reuseTmpFieldField<Field, ReturnType, Type1>::New(tf1) \
); \
OpFunc(tRes(), tf1(), f2); \
reuseTmpFieldField<Field, ReturnType, Type1>::clear(tf1); \
return tRes; \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > operator Op \
( \
const tmp<FieldField<Field, Type1> >& tf1, \
const tmp<FieldField<Field, Type2> >& tf2 \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
reuseTmpTmpFieldField<Field, ReturnType, Type1, Type1, Type2>:: \
New(tf1, tf2) \
); \
OpFunc(tRes(), tf1(), tf2()); \
reuseTmpTmpFieldField<Field, ReturnType, Type1, Type1, Type2>:: \
clear(tf1, tf2); \
return tRes; \
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#define BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc) \
\
TEMPLATE \
void OpFunc \
( \
FieldField<Field, ReturnType>& f, \
const Type1& s, \
const FieldField<Field, Type2>& f2 \
) \
{ \
forAll(f, i) \
{ \
OpFunc(f[i], s, f2[i]); \
} \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > operator Op \
( \
const Type1& s, \
const FieldField<Field, Type2>& f2 \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
FieldField<Field, Type2>::NewCalculatedType(f2) \
); \
OpFunc(tRes(), s, f2); \
return tRes; \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > operator Op \
( \
const Type1& s, \
const tmp<FieldField<Field, Type2> >& tf2 \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
reuseTmpFieldField<Field, ReturnType, Type2>::New(tf2) \
); \
OpFunc(tRes(), s, tf2()); \
reuseTmpFieldField<Field, ReturnType, Type2>::clear(tf2); \
return tRes; \
}
#define BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc) \
\
TEMPLATE \
void OpFunc \
( \
FieldField<Field, ReturnType>& f, \
const FieldField<Field, Type1>& f1, \
const Type2& s \
) \
{ \
forAll(f, i) \
{ \
OpFunc(f[i], f1[i], s); \
} \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > operator Op \
( \
const FieldField<Field, Type1>& f1, \
const Type2& s \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
FieldField<Field, Type1>::NewCalculatedType(f1) \
); \
OpFunc(tRes(), f1, s); \
return tRes; \
} \
\
TEMPLATE \
tmp<FieldField<Field, ReturnType> > operator Op \
( \
const tmp<FieldField<Field, Type1> >& tf1, \
const Type2& s \
) \
{ \
tmp<FieldField<Field, ReturnType> > tRes \
( \
reuseTmpFieldField<Field, ReturnType, Type1>::New(tf1) \
); \
OpFunc(tRes(), tf1(), s); \
reuseTmpFieldField<Field, ReturnType, Type1>::clear(tf1); \
return tRes; \
}
#define BINARY_TYPE_OPERATOR(ReturnType, Type1, Type2, Op, OpFunc) \
BINARY_TYPE_OPERATOR_SF(ReturnType, Type1, Type2, Op, OpFunc) \
BINARY_TYPE_OPERATOR_FS(ReturnType, Type1, Type2, Op, OpFunc)
// ************************************************************************* //
| {
"pile_set_name": "Github"
} |
// Copyright 2009 the Sputnik authors. All rights reserved.
/**
* No matter how control leaves the embedded 'Statement',
* the scope chain is always restored to its former state
*
* @path ch12/12.10/S12.10_A3.3_T3.js
* @description Declaring "with" statement within a function constructor, leading to normal completion by "return"
* @noStrict
*/
this.p1 = 1;
var result = "result";
var myObj = {
p1: 'a',
value: 'myObj_value',
valueOf : function(){return 'obj_valueOf';}
}
function __FACTORY(){
with(myObj){
return value;
p1 = 'x1';
}
}
var obj = new __FACTORY;
//////////////////////////////////////////////////////////////////////////////
//CHECK#1
if(p1 !== 1){
$ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );
}
//
//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
//CHECK#2
if(myObj.p1 !== "a"){
$ERROR('#2: myObj.p1 === "a". Actual: myObj.p1 ==='+ myObj.p1 );
}
//
//////////////////////////////////////////////////////////////////////////////
| {
"pile_set_name": "Github"
} |
// Copyright (C) 2003, Fernando Luis Cacciola Carballal.
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/optional for documentation.
//
// You are welcome to contact the author at:
// [email protected]
//
#ifndef AUTOBOOST_NONE_17SEP2003_HPP
#define AUTOBOOST_NONE_17SEP2003_HPP
#include "autoboost/none_t.hpp"
// NOTE: Borland users have to include this header outside any precompiled headers
// (bcc<=5.64 cannot include instance data in a precompiled header)
// -- * To be verified, now that there's no unnamed namespace
namespace autoboost {
none_t const none = (static_cast<none_t>(0)) ;
} // namespace autoboost
#endif
| {
"pile_set_name": "Github"
} |
#ifndef AL_ALIGN_H
#define AL_ALIGN_H
#if defined(HAVE_STDALIGN_H) && defined(HAVE_C11_ALIGNAS)
#include <stdalign.h>
#endif
#ifndef alignas
#if defined(IN_IDE_PARSER)
/* KDevelop has problems with our align macro, so just use nothing for parsing. */
#define alignas(x)
#elif defined(HAVE_C11_ALIGNAS)
#define alignas _Alignas
#else
/* NOTE: Our custom ALIGN macro can't take a type name like alignas can. For
* maximum compatibility, only provide constant integer values to alignas. */
#define alignas(_x) ALIGN(_x)
#endif
#endif
#endif /* AL_ALIGN_H */
| {
"pile_set_name": "Github"
} |
type=armor
items=minecraft:leather_chestplate minecraft:leather_leggings minecraft:leather_boots
texture.leather_layer_1=blank
texture.leather_layer_1_overlay=dragon_layer_1
texture.leather_layer_2_overlay=dragon_layer_2
nbt.display.Name=ipattern:*old dragon * | {
"pile_set_name": "Github"
} |
/*
* This file is part of the Jikes RVM project (http://jikesrvm.org).
*
* This file is licensed to You under the Eclipse Public License (EPL);
* You may not use this file except in compliance with the License. You
* may obtain a copy of the License at
*
* http://www.opensource.org/licenses/eclipse-1.0.php
*
* See the COPYRIGHT.txt file distributed with this work for information
* regarding copyright ownership.
*/
options {
JDK_VERSION = "1.5";
LOOKAHEAD = 2;
FORCE_LA_CHECK=true;
STATIC = false;
// DEBUG_PARSER=true;
}
PARSER_BEGIN(Parser)
package org.mmtk.harness.lang.parser;
// CHECKSTYLE:OFF
import org.mmtk.harness.lang.ast.*;
import org.mmtk.harness.lang.runtime.*;
import org.mmtk.harness.lang.type.*;
import java.util.*;
import java.io.*;
public class Parser {
private static BufferedInputStream createStream(String filename) {
try {
return new BufferedInputStream(new FileInputStream(filename));
} catch (Exception e) {
throw new RuntimeException(e);
}
}
public Parser(String filename) {
this(createStream(filename));
AbstractAST.setCurrentSource(new Source(filename));
}
private static void checkSymbol(SymbolTable symbols, Token tok) throws ParseException {
String id = tok.toString();
if (!symbols.isDefined(id)) {
throw new ParseException(
String.format("%d:%d - Variable %s is undefined",tok.beginLine,tok.beginColumn,id));
}
}
private static Type createTypeReference(TypeTable types, String name) {
if (types.isDefined(name)) {
return types.get(name);
}
return new TypeReference(types,name);
}
}
PARSER_END(Parser)
/* Lexical structure based from Java grammar */
/* White space */
SKIP : {
" " |
"\t" |
"\n" |
"\r" |
"\f"
}
/* Comments */
MORE : {
"//" : IN_SINGLE_LINE_COMMENT |
"/*" : IN_MULTI_LINE_COMMENT
}
<IN_SINGLE_LINE_COMMENT>
SPECIAL_TOKEN : {
<SINGLE_LINE_COMMENT: "\n" | "\r" | "\r\n" > : DEFAULT
}
<IN_MULTI_LINE_COMMENT>
SPECIAL_TOKEN : {
<MULTI_LINE_COMMENT: "*/" > : DEFAULT
}
<IN_SINGLE_LINE_COMMENT,IN_MULTI_LINE_COMMENT>
MORE : {
< ~[] >
}
/* Reserved words */
TOKEN : {
< ALLOC : "alloc" >
| < ASSERT : "assert" >
| < CLASS : "class" >
| < ELIF : "elif" >
| < ELSE : "else" >
| < EXPECT : "expect" >
| < IF : "if" >
| < INTRINSIC : "intrinsic" >
| < METHOD : "method" >
| < NULL : "null" >
| < OPTION : "option" >
| < PRINT : "print" >
| < RETURN : "return" >
| < SIGNATURE : "signature" >
| < SPAWN : "spawn" >
| < TYPE : "type" >
| < WHILE : "while" >
}
/* Literals */
TOKEN : {
< INTEGER_LITERAL: (["0"-"9"])+ > |
< BOOLEAN_LITERAL: ("true" | "false") > |
< STRING_LITERAL: "\"" (~["\""])* "\"" >
}
/* Identifiers */
TOKEN : {
<IDENTIFIER: ["a"-"z","A"-"Z","_"] (["a"-"z","A"-"Z","0"-"9","_"])* >
}
/* Separators */
TOKEN : {
< LPAREN: "(" > |
< RPAREN: ")" > |
< LBRACE: "{" > |
< RBRACE: "}" > |
< LBRACKET: "[" > |
< RBRACKET: "]" > |
< SEMICOLON: ";" > |
< COMMA: "," > |
< DOT: "." >
}
/* Operators */
TOKEN : {
< ASSIGN: "=" > |
< LT: "<" > |
< GT: ">" > |
< BANG: "!" > |
< EQ: "==" > |
< LE: "<=" > |
< GE: ">=" > |
< NE: "!=" > |
< SC_OR: "||" > |
< SC_AND: "&&" > |
< PLUS: "+" > |
< MINUS: "-" > |
< STAR: "*" > |
< SLASH: "/" > |
< REM: "%" >
}
GlobalDefs script() : {
GlobalDefs defs = new GlobalDefs();
}
{
( option(defs) )*
( method(defs)
| typeDeclaration(defs)
)+ <EOF>
{ return defs; }
}
/*
* An option to the harness, defined in the script.
*
* <OPTION> ::= "option" <name> [value { "," value }] ";"
*/
void option(GlobalDefs defs) : {
Token t;
String name;
String value;
List<String> values = new ArrayList<String >();
}
{
t=<OPTION> name=ident()
(
value=string() { values.add(value); }
( <COMMA>
value=string() { values.add(value); }
)*
)? <SEMICOLON>
{
defs.declare(new OptionDef(t,name,values));
}
}
/**
* A program method with its own variable scope.
*/
void method(GlobalDefs defs) : {
SymbolTable symbols = new SymbolTable();
Statement stmt;
String name;
int params = 0;
Type retType;
String javaClass, javaMethod, javaParam;
List<String> signature = new ArrayList<String>();
Token t;
}
{
retType=type(defs)
t=<IDENTIFIER> { name = t.toString(); } <LPAREN>
( declaration1(defs, symbols) { params++; } ( <COMMA> declaration1(defs, symbols) { params++; } )* )?
<RPAREN>
( stmt=statements(defs, symbols)
{ defs.declare(new NormalMethod(t, name, params, retType, symbols.declarations(), stmt)); }
| <INTRINSIC>
<CLASS> javaClass=string()
<METHOD> javaMethod=string()
( <SIGNATURE> <LPAREN>
(intrinsicParam(signature)
( <COMMA> intrinsicParam(signature))*
)?
<RPAREN>
)? <SEMICOLON>
{ defs.declare(new IntrinsicMethod(name,javaClass,javaMethod,signature)); }
)
}
void intrinsicParam(List<String> signature) : {
String javaParam;
}
{
javaParam=string()
{
if (javaParam.equals("org.mmtk.harness.lang.Env")) {
throw new ParseException("Env parameter to intrinsic methods is implicit!");
}
signature.add(javaParam);
}
}
/**
* A Type Declaration
*/
void typeDeclaration(GlobalDefs defs) : {
Token t;
}
{
<TYPE> t=<IDENTIFIER>
{ UserType type = new UserTypeImpl(t,t.toString());
defs.types.add(type);
}
<LBRACE>
( typeField(defs,type) )+
<RBRACE>
}
void typeField(GlobalDefs defs, UserType type) : {
String fieldType, name;
}
{
fieldType=ident() name=ident() <SEMICOLON>
{ type.defineField(name, createTypeReference(defs.types,fieldType)); }
}
/**
* A sequence of statements in braces, carrying an inner variable scope
*/
Statement statements(GlobalDefs defs, SymbolTable symbols) : {
Statement stmt;
List<Statement> stmts = new ArrayList<Statement>();
Token t;
}
{
t=<LBRACE>
{ symbols.pushScope(); }
( stmt=statement(defs, symbols)
{ stmts.add(stmt); }
)*
{ symbols.popScope(); }
<RBRACE>
{ return new Sequence(t,stmts); }
}
/**
* A single statement
*/
Statement statement(GlobalDefs defs, SymbolTable symbols) : {
Statement stmt;
Token t;
}
{
( stmt=conditional(defs, symbols)
| stmt=expect(defs, symbols) <SEMICOLON>
| stmt=spawn(defs, symbols) <SEMICOLON>
| stmt=whileLoop(defs, symbols)
| stmt=print(defs, symbols) <SEMICOLON>
| stmt=assertTrue(defs, symbols) <SEMICOLON>
| t=<IDENTIFIER>
( stmt=assignment(defs, symbols, t) <SEMICOLON>
| stmt=declaration(defs, symbols, t) <SEMICOLON>
| stmt=storeField(defs, symbols, t) <SEMICOLON>
| stmt=callMethod(defs, symbols, t) <SEMICOLON>
)
| stmt=returnStmt(defs, symbols) <SEMICOLON>
)
{ return stmt; }
}
/**
* if - then - else
*/
Statement conditional(GlobalDefs defs, SymbolTable symbols) : {
Expression cond;
List<Expression> conds = new ArrayList<Expression>();
Statement stmt;
List<Statement> stmts = new ArrayList<Statement>();
Token t;
}
{
t=<IF> <LPAREN> cond=expression(defs,symbols) { conds.add(cond); } <RPAREN>
stmt=statements(defs, symbols) { stmts.add(stmt); }
( <ELIF> <LPAREN> cond=expression(defs,symbols) { conds.add(cond); } <RPAREN>
stmt=statements(defs, symbols) { stmts.add(stmt); })*
( <ELSE> stmt=statements(defs, symbols) { stmts.add(stmt); } )?
{ return new IfStatement(t,conds,stmts); }
}
/**
* assert the expression in the first parameter,
* and print the remaining parameters if the assertion fails
*/
Statement assertTrue(GlobalDefs defs, SymbolTable symbols) : {
Expression cond;
List<Expression> exprs = new ArrayList<Expression>();
Expression expr;
Token t;
}
{
t=<ASSERT> <LPAREN> cond=expression(defs,symbols)
( <COMMA> expr=expression(defs,symbols)
{ exprs.add(expr); } )+
<RPAREN>
{ return new Assert(t,cond, exprs); }
}
/**
* while loop
*/
Statement whileLoop(GlobalDefs defs, SymbolTable symbols) : {
Expression cond;
Statement body;
Token t;
}
{
t=<WHILE> <LPAREN> cond=expression(defs,symbols) <RPAREN>
body=statements(defs, symbols)
{ return new WhileStatement(t,cond,body); }
}
/**
* Variable declaration, and optional initializing assignment
*
* Adds a symbol to the symbol table, and returns either an
* assignment statement or an empty sequence.
*/
Statement declaration(GlobalDefs defs, SymbolTable symbols, Token id) : {
String name;
Expression expr;
Statement stmt;
Token t;
}
{
name=declaration2(defs, symbols,id)
( ( t=<ASSIGN> expr=expression(defs,symbols)
{ return new Assignment(t,symbols.getSymbol(name), expr); }
)
)?
{ return new Empty(); }
}
/**
* First part of variable declaration (without initialization).
*
* Adds a symbol to the symbol table and returns the name.
*/
String declaration1(GlobalDefs defs, SymbolTable symbols) : {
String name;
Type type;
}
{
type=type(defs) name=ident()
{ symbols.declare(name,type);
return name;
}
}
/**
* First part of variable declaration (without initialization),
* where the parent production has consumed the type identifier token.
*
* Adds a symbol to the symbol table and returns the name.
*/
String declaration2(GlobalDefs defs, SymbolTable symbols, Token id) : {
String name;
Type type = defs.types.get(id.toString());
}
{
/* type - consumed by parent */
name=ident()
{ symbols.declare(name,type);
return name;
}
}
Type type(GlobalDefs defs) : {
String type;
}
{
type=ident()
{
return defs.types.get(type);
}
}
/*
* Set up an expectation for an exception
*/
Statement expect(GlobalDefs defs, SymbolTable symbols) : {
String name;
Token t;
}
{
t=<EXPECT> <LPAREN> name=ident() <RPAREN>
{ return new Expect(t,name); }
}
/*
* Assign a value to a variable
*/
Statement assignment(GlobalDefs defs, SymbolTable symbols, Token id) : {
String name = id.toString();
Expression expr;
Token t;
}
{
t=<ASSIGN> expr=expression(defs,symbols)
{ return new Assignment(t,symbols.getSymbol(name),expr); }
}
/*
* Assign a value to a field of an object
*/
Statement storeField(GlobalDefs defs, SymbolTable symbols, Token id) : {
Symbol objectSym = symbols.getSymbol(id.toString());
Expression index, rVal;
Token fieldId;
}
{
{ checkSymbol(symbols,id); }
<DOT> fieldId = <IDENTIFIER>
( <LBRACKET> index=expression(defs,symbols) <RBRACKET>
<ASSIGN> rVal=expression(defs,symbols)
{ Type fieldType = defs.types.get(fieldId.toString());
return new StoreField(id, objectSym, fieldType, index, rVal);
}
| <ASSIGN> rVal=expression(defs,symbols)
{ String fieldName = fieldId.toString();
return new StoreNamedField(id, objectSym, fieldName, rVal);
}
)
}
/**
* Procedure call, as a statement
*/
Statement callMethod(GlobalDefs defs, SymbolTable symbols, Token id) : {
String name = id.toString();
List<Expression> params = new ArrayList<Expression>();
Expression p;
}
{
<LPAREN>
( p=expression(defs,symbols)
{ params.add(p); }
( <COMMA> p=expression(defs,symbols)
{ params.add(p); }
)*
)?
<RPAREN>
{ return new Call(id, new MethodProxy(defs.methods, name, params.size()), params, false); }
}
/**
* Return a value from a method
*/
Statement returnStmt(GlobalDefs defs, SymbolTable symbols) : {
Expression e;
Token t;
}
{
t=<RETURN>
( e=expression(defs,symbols)
{ return new Return(t, e); }
)?
{ return new Return(t); }
}
/*
* Create a new thread
*/
Statement spawn(GlobalDefs defs, SymbolTable symbols) : {
String name;
List<Expression> params = new ArrayList<Expression>();
Expression p;
Token t;
}
{
t=<SPAWN> <LPAREN> name=ident()
( <COMMA> p=expression(defs,symbols)
{ params.add(p); }
)*
<RPAREN>
{ return new Spawn(t, defs.methods, name, params); }
}
Statement print(GlobalDefs defs, SymbolTable symbols) : {
List<Expression> exprs = new ArrayList<Expression>();
Expression expr;
Token t;
}
{
t=<PRINT> <LPAREN> expr=expression(defs,symbols)
{ exprs.add(expr); }
( <COMMA> expr=expression(defs,symbols)
{ exprs.add(expr); } )*
<RPAREN>
{ return new PrintStatement(t, exprs); }
}
/*******************************************************************************
* Arithmetic expressions
*
* Complicated slightly by the fact that we don't (currently) have a mechanism
* for enumerating temporaries at GC time. Therefore, method calls as expressions
* can only occur at the top level of an expression.
*/
Expression expression(GlobalDefs defs, SymbolTable symbols) : {
Expression e1,e2;
Token t;
}
{
e1=expr1(defs,symbols)
( t=<SC_OR> e2=expression(defs,symbols)
{ return new BinaryExpression(t, e1, Operator.OR, e2); } |
t=<SC_AND> e2=expression(defs,symbols)
{ return new BinaryExpression(t, e1, Operator.AND, e2); }
)?
{ return e1; }
}
Expression expr1(GlobalDefs defs, SymbolTable symbols) : {
Expression e;
Token t;
}
{
t=<BANG> e=expr1(defs,symbols)
{ return new UnaryExpression(t,Operator.NOT,e); } |
t=<MINUS> e=expr1(defs,symbols)
{ return new UnaryExpression(t,Operator.MINUS,e); } |
e=expr2(defs,symbols) { return e; }
}
Expression expr2(GlobalDefs defs, SymbolTable symbols) : {
Expression e1,e2;
Token t;
}
{
e1=expr3(defs,symbols)
( t=<LT> e2=expr3(defs,symbols)
{ return new BinaryExpression(t, e1,Operator.LT,e2); }
| t=<GT> e2=expr3(defs,symbols)
{ return new BinaryExpression(t, e1,Operator.GT,e2); }
| t=<LE> e2=expr3(defs,symbols)
{ return new BinaryExpression(t, e1,Operator.LE,e2); }
| t=<GE> e2=expr3(defs,symbols)
{ return new BinaryExpression(t, e1,Operator.GE,e2); }
| t=<EQ> e2=expr3(defs,symbols)
{ return new BinaryExpression(t, e1,Operator.EQ,e2); }
| t=<NE> e2=expr3(defs,symbols)
{ return new BinaryExpression(t, e1,Operator.NE,e2); }
)?
{ return e1; }
}
Expression expr3(GlobalDefs defs, SymbolTable symbols) : {
Expression e1,e2;
Token t;
}
{
e1=expr4(defs,symbols)
( t=<PLUS> e2=expr3(defs,symbols)
{ return new BinaryExpression(t, e1,Operator.PLUS,e2); }
| t=<MINUS> e2=expr3(defs,symbols)
{ return new BinaryExpression(t, e1,Operator.MINUS,e2); }
)?
{ return e1; }
}
Expression expr4(GlobalDefs defs, SymbolTable symbols) : {
Expression e1,e2;
Token t;
}
{
e1=expr5(defs,symbols)
( t=<STAR> e2=expr4(defs,symbols)
{ return new BinaryExpression(t, e1, Operator.MULT, e2); }
| t=<SLASH> e2=expr4(defs,symbols)
{ return new BinaryExpression(t, e1, Operator.DIV, e2); }
| t=<REM> e2=expr4(defs,symbols)
{ return new BinaryExpression(t, e1, Operator.REM, e2); }
)?
{ return e1; }
}
Expression expr5(GlobalDefs defs, SymbolTable symbols) : {
Expression e, index;
String id;
Token t, field;
}
{
/* constants of various types */
e=constant() { return e; } |
/* intrinsic functions */
e=alloc(defs,symbols) { return e; } |
/* An expression in parentheses */
<LPAREN> e=expression(defs,symbols) <RPAREN>
{ return e; } |
/* Field dereference */
( t=<IDENTIFIER> { id=t.toString(); }
(<DOT> field=<IDENTIFIER>
{ checkSymbol(symbols,t); }
( <LBRACKET> index=expression(defs,symbols) <RBRACKET>
{
Type type = defs.types.get(field.toString());
return new LoadField(t,symbols.getSymbol(id), type, index);
}
| {
String fieldName = field.toString();
return new LoadNamedField(t,symbols.getSymbol(id), fieldName);
}
)
| e=callExpr(t,id,defs,symbols) { return e; }
)?
/* Variable substitution or type name */
{
if (defs.types.isDefined(id)) {
return new TypeLiteral(t,defs.types.get(id));
}
checkSymbol(symbols,t);
return new Variable(t,symbols.getSymbol(id));
}
)
}
Expression constant() : {
Token t;
} {
/* Null constant */
t=<NULL>
{ return new Constant(t, ObjectValue.NULL); }
/* Integer constant */
| t=<INTEGER_LITERAL>
{ return new Constant(t, IntValue.valueOf(Integer.valueOf(t.toString()))); }
/* boolean constant */
| t=<BOOLEAN_LITERAL>
{ return new Constant(t, BoolValue.valueOf(Boolean.valueOf(t.toString()))); }
/* String constant */
| t=<STRING_LITERAL>
{
String s = t.toString();
return new Constant(t, new StringValue(s.substring(1, s.length() - 1)));
}
}
/**
* Procedure call, as an expression.
*
* Caller has matched the method name, which gets passed as the 'name' parameter.
* 't' is the token of the method name (for error location).
*/
Expression callExpr(Token t, String name, GlobalDefs defs, SymbolTable symbols) : {
List<Expression> params = new ArrayList<Expression>();
Expression p;
}
{
<LPAREN>
( p=expression(defs,symbols)
{ params.add(p); }
( <COMMA> p=expression(defs,symbols)
{ params.add(p); }
)*
)?
<RPAREN>
{ return new Call(t,new MethodProxy(defs.methods, name, params.size()), params, true); }
}
Expression alloc(GlobalDefs defs, SymbolTable symbols) : {
AllocationSite site;
Token t;
List<Expression> args = new ArrayList<Expression>();
Expression arg;
}
{
t=<ALLOC> { site = new AllocationSite(t); } <LPAREN>
(
arg=expression(defs,symbols) { args.add(arg); }
( <COMMA> arg=expression(defs,symbols) { args.add(arg); } )*
<RPAREN>
{
return new Alloc(t, site.getId(), args); }
)
}
/***************************************************************************
* Utility rules
*/
/*
* Match an identifier and return it as a string
*/
String ident() : {
Token t;
}
{
t=<IDENTIFIER> { return t.toString(); }
}
/*
* Match an integer literal and return it as an int
*/
int integer() : {
Token t;
}
{
t=<INTEGER_LITERAL> { return Integer.parseInt(t.toString()); }
}
/*
* Match a boolean literal and return it as a boolean
*/
boolean bool() : {
Token t;
}
{
t=<BOOLEAN_LITERAL> { return Boolean.parseBoolean(t.toString()); }
}
/*
* Match a string literal and return the contents as a string
*/
String string() : {
Token t;
String s;
}
{
t=<STRING_LITERAL> { s = t.toString(); return s.substring(1, s.length() - 1); }
}
| {
"pile_set_name": "Github"
} |
data:
files: []
chunks: []
tests:
-
description: "Upload when length is 0"
act:
operation: upload
arguments:
filename: "filename"
source: { $hex : "" }
options: { chunkSizeBytes : 4 }
assert:
result: "&result"
data:
-
{ insert : "expected.files", documents : [
{ _id : "*result", length : 0, chunkSize : 4, uploadDate : "*actual", md5 : "d41d8cd98f00b204e9800998ecf8427e", filename : "filename" }
] }
-
description: "Upload when length is 1"
act:
operation: upload
arguments:
filename: "filename"
source: { $hex : "11" }
options: { chunkSizeBytes : 4 }
assert:
result: "&result"
data:
-
{ insert : "expected.files", documents : [
{ _id : "*result", length : 1, chunkSize : 4, uploadDate : "*actual", md5 : "47ed733b8d10be225eceba344d533586", filename : "filename" }
] }
-
{ insert : "expected.chunks", documents : [
{ _id : "*actual", files_id : "*result", n : 0, data : { $hex : "11" } }
] }
-
description: "Upload when length is 3"
act:
operation: upload
arguments:
filename: "filename"
source: { $hex : "112233" }
options: { chunkSizeBytes : 4 }
assert:
result: "&result"
data:
-
{ insert : "expected.files", documents : [
{ _id : "*result", length : 3, chunkSize : 4, uploadDate : "*actual", md5 : "bafae3a174ab91fc70db7a6aa50f4f52", filename : "filename" }
] }
-
{ insert : "expected.chunks", documents : [
{ _id : "*actual", files_id : "*result", n : 0, data : { $hex : "112233" } }
] }
-
description: "Upload when length is 4"
act:
operation: upload
arguments:
filename: "filename"
source: { $hex : "11223344" }
options: { chunkSizeBytes : 4 }
assert:
result: "&result"
data:
-
{ insert : "expected.files", documents : [
{ _id : "*result", length : 4, chunkSize : 4, uploadDate : "*actual", md5 : "7e7c77cff5705d1f7574a25ef6662117", filename : "filename" }
] }
-
{ insert : "expected.chunks", documents : [
{ _id : "*actual", files_id : "*result", n : 0, data : { $hex : "11223344" } }
] }
-
description: "Upload when length is 5"
act:
operation: upload
arguments:
filename: "filename"
source: { $hex : "1122334455" }
options: { chunkSizeBytes : 4 }
assert:
result: "&result"
data:
-
{ insert : "expected.files", documents : [
{ _id : "*result", length : 5, chunkSize : 4, uploadDate : "*actual", md5 : "283d4fea5dded59cf837d3047328f5af", filename : "filename" }
] }
-
{ insert : "expected.chunks", documents : [
{ _id : "*actual", files_id : "*result", n : 0, data : { $hex : "11223344" } },
{ _id : "*actual", files_id : "*result", n : 1, data : { $hex : "55" } }
] }
-
description: "Upload when length is 8"
act:
operation: upload
arguments:
filename: "filename"
source: { $hex : "1122334455667788" }
options: { chunkSizeBytes : 4 }
assert:
result: "&result"
data:
-
{ insert : "expected.files", documents : [
{ _id : "*result", length : 8, chunkSize : 4, uploadDate : "*actual", md5 : "dd254cdc958e53abaa67da9f797125f5", filename : "filename" }
] }
-
{ insert : "expected.chunks", documents : [
{ _id : "*actual", files_id : "*result", n : 0, data : { $hex : "11223344" } },
{ _id : "*actual", files_id : "*result", n : 1, data : { $hex : "55667788" } }
] }
-
description: "Upload when contentType is provided"
act:
operation: upload
arguments:
filename: "filename"
source: { $hex : "11" }
options: { chunkSizeBytes : 4, contentType : "image/jpeg" }
assert:
result: "&result"
data:
-
{ insert : "expected.files", documents : [
{ _id : "*result", length : 1, chunkSize : 4, uploadDate : "*actual", md5 : "47ed733b8d10be225eceba344d533586", filename : "filename", contentType : "image/jpeg" }
] }
-
{ insert : "expected.chunks", documents : [
{ _id : "*actual", files_id : "*result", n : 0, data : { $hex : "11" } }
] }
-
description: "Upload when metadata is provided"
act:
operation: upload
arguments:
filename: "filename"
source: { $hex : "11" }
options:
chunkSizeBytes: 4
metadata: { x : 1 }
assert:
result: "&result"
data:
-
{ insert : "expected.files", documents : [
{ _id : "*result", length : 1, chunkSize : 4, uploadDate : "*actual", md5 : "47ed733b8d10be225eceba344d533586", filename : "filename", metadata : { x : 1 } }
] }
-
{ insert : "expected.chunks", documents : [
{ _id : "*actual", files_id : "*result", n : 0, data : { $hex : "11" } }
] }
-
description: "Upload when length is 0 sans MD5"
act:
operation: upload
arguments:
filename: "filename"
source: { $hex : "" }
options: { chunkSizeBytes : 4, disableMD5: true }
assert:
result: "&result"
data:
-
{ insert : "expected.files", documents : [
{ _id : "*result", length : 0, chunkSize : 4, uploadDate : "*actual", filename : "filename" }
] }
-
description: "Upload when length is 1 sans MD5"
act:
operation: upload
arguments:
filename: "filename"
source: { $hex : "11" }
options: { chunkSizeBytes : 4, disableMD5: true }
assert:
result: "&result"
data:
-
{ insert : "expected.files", documents : [
{ _id : "*result", length : 1, chunkSize : 4, uploadDate : "*actual", filename : "filename" }
] }
-
{ insert : "expected.chunks", documents : [
{ _id : "*actual", files_id : "*result", n : 0, data : { $hex : "11" } }
] }
| {
"pile_set_name": "Github"
} |
[package]
name = "traits-example"
version = "0.1.0"
authors = ["Your Name <[email protected]>"]
edition = "2018"
[dependencies]
| {
"pile_set_name": "Github"
} |
// Copyright 2009 the Sputnik authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/**
* @name: S15.6.3.1_A1;
* @section: 15.6.3.1;
* @assertion: The initial value of Boolean.prototype is the Boolean
* prototype object;
* @description: Checking Boolean.prototype property;
*/
//CHECK#1
if (typeof Boolean.prototype !== "object") {
$ERROR('#1: typeof Boolean.prototype === "object"');
}
//CHECK#2
if (Boolean.prototype != false) {
$ERROR('#2: Boolean.prototype == false');
}
delete Boolean.prototype.toString;
if (Boolean.prototype.toString() !== "[object Boolean]") {
$ERROR('#3: The [[Class]] property of the Boolean prototype object is set to "Boolean"');
}
| {
"pile_set_name": "Github"
} |
#if !defined(BOOST_PP_IS_ITERATING)
// Copyright David Abrahams 2002.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
# ifndef SIGNATURE_DWA20021121_HPP
# define SIGNATURE_DWA20021121_HPP
# include <boost/python/type_id.hpp>
# include <boost/python/detail/preprocessor.hpp>
# include <boost/python/detail/indirect_traits.hpp>
# include <boost/python/converter/pytype_function.hpp>
# include <boost/preprocessor/iterate.hpp>
# include <boost/preprocessor/iteration/local.hpp>
# include <boost/mpl/at.hpp>
# include <boost/mpl/size.hpp>
namespace boost { namespace python { namespace detail {
struct signature_element
{
char const* basename;
converter::pytype_function pytype_f;
bool lvalue;
};
struct py_func_sig_info
{
signature_element const *signature;
signature_element const *ret;
};
template <unsigned> struct signature_arity;
# define BOOST_PP_ITERATION_PARAMS_1 \
(3, (0, BOOST_PYTHON_MAX_ARITY + 1, <boost/python/detail/signature.hpp>))
# include BOOST_PP_ITERATE()
// A metafunction returning the base class used for
//
// signature<class F, class CallPolicies, class Sig>.
//
template <class Sig>
struct signature_base_select
{
enum { arity = mpl::size<Sig>::value - 1 };
typedef typename signature_arity<arity>::template impl<Sig> type;
};
template <class Sig>
struct signature
: signature_base_select<Sig>::type
{
};
}}} // namespace boost::python::detail
# endif // SIGNATURE_DWA20021121_HPP
#else
# define N BOOST_PP_ITERATION()
template <>
struct signature_arity<N>
{
template <class Sig>
struct impl
{
static signature_element const* elements()
{
static signature_element const result[N+2] = {
#ifndef BOOST_PYTHON_NO_PY_SIGNATURES
# define BOOST_PP_LOCAL_MACRO(i) \
{ \
type_id<BOOST_DEDUCED_TYPENAME mpl::at_c<Sig,i>::type>().name() \
, &converter::expected_pytype_for_arg<BOOST_DEDUCED_TYPENAME mpl::at_c<Sig,i>::type>::get_pytype \
, indirect_traits::is_reference_to_non_const<BOOST_DEDUCED_TYPENAME mpl::at_c<Sig,i>::type>::value \
},
#else
# define BOOST_PP_LOCAL_MACRO(i) \
{ \
type_id<BOOST_DEDUCED_TYPENAME mpl::at_c<Sig,i>::type>().name() \
, 0 \
, indirect_traits::is_reference_to_non_const<BOOST_DEDUCED_TYPENAME mpl::at_c<Sig,i>::type>::value \
},
#endif
# define BOOST_PP_LOCAL_LIMITS (0, N)
# include BOOST_PP_LOCAL_ITERATE()
{0,0,0}
};
return result;
}
};
};
#endif // BOOST_PP_IS_ITERATING
| {
"pile_set_name": "Github"
} |
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin" type="text/css"?>
<window title="XUL Radios"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script>
<![CDATA[
function setText(textID,val)
{
document.getElementById(textID).value=val;
}
]]>
</script>
<vbox flex="1" style="overflow: auto">
<hbox>
<groupbox flex="1">
<caption label="states" />
<radiogroup flex="1" onselect="alert('A')">
<label value="These show different states."/>
<radio label="Selected" checked="true" id="zone1_1"
oncommand="setText('state-text','Checked');" />
<radio label="Normal" id="zone1_2"
oncommand="setText('state-text','Normal');" />
<radio label="Disabled" disabled="true" id="zone1_3"
oncommand="setText('state-text','Disabled');" />
<spacer flex="1" />
<label id="state-text" value="(no input)" />
</radiogroup>
</groupbox>
<groupbox flex="1">
<caption label="accesskeys" />
<radiogroup flex="1">
<label value="These have access keys."/>
<label value="(Even if they're not marked)"/>
<radio label="Animal" accesskey="A" id="zone2_1"
oncommand="setText('accesskey-text','Animal');" />
<radio label="Bear" accesskey="B" id="zone2_2"
oncommand="setText('accesskey-text','Bear');" />
<radio label="Cat" accesskey="C" id="zone2_3"
oncommand="setText('accesskey-text','Cat');" />
<radio label="Dog" accesskey="D" id="zone2_4"
oncommand="setText('accesskey-text','Dog');" />
<radio label="Deer" accesskey="E" id="zone2_5"
oncommand="setText('accesskey-text','Deer');" />
<radio label="Fish" accesskey="F" id="zone2_6"
oncommand="setText('accesskey-text','Fish');" />
<spacer flex="1" />
<label id="accesskey-text" value="(no input)" />
</radiogroup>
</groupbox>
</hbox>
<hbox>
<groupbox flex="1">
<caption label="orientation" />
<radiogroup flex="1">
<label value="These radiobuttons show different orientations."/>
<radio label="Left" id="zone3_1"
oncommand="setText('or-text','A radiobutton to the left of the label');" />
<radio label="Right" dir="reverse" id="zone3_2"
oncommand="setText('or-text','A radiobutton to the right of the label');"/>
<radio label="Above" orient="vertical" dir="forward" id="zone3_3"
oncommand="setText('or-text','A radiobutton above the label');"/>
<radio label="Below" orient="vertical" dir="reverse" id="zone3_4"
oncommand="setText('or-text','A radiobutton below the label');"/>
<radio id="zone3_5"
oncommand="setText('or-text','A radiobutton with no label');" />
<radio id="zone3_6"
oncommand="setText('or-text','Another radiobutton with no label');" />
<spacer flex="1" />
<label id="or-text" value="(no input)" />
</radiogroup>
</groupbox>
<groupbox flex="1">
<caption label="images" />
<radiogroup flex="1">
<label value="These radiobuttons show images."/>
<radio label="Left" id="zone4_1"
src="images/star.png"
oncommand="setText('image-text','A radiobutton to the left of the label');" />
<radio label="Right" dir="reverse" id="zone4_2"
src="images/star.png"
oncommand="setText('image-text','A radiobutton to the right of the label');"/>
<radio label="Above" orient="vertical" dir="forward" id="zone4_3"
src="images/star.png"
oncommand="setText('image-text','A radiobutton above the label');"/>
<radio label="Below" orient="vertical" dir="reverse" id="zone4_4"
src="images/star.png"
oncommand="setText('image-text','A radiobutton below the label');"/>
<radio id="zone4_5"
src="images/star.png"
oncommand="setText('image-text','A radiobutton with no label');" />
<radio id="zone4_6"
src="images/star.png"
oncommand="setText('image-text','Another radiobutton with no label');" />
<spacer flex="1" />
<label id="image-text" value="(no input)" />
</radiogroup>
</groupbox>
</hbox>
</vbox>
</window>
| {
"pile_set_name": "Github"
} |
[
{
"op": "add",
"path": "/twoHanded",
"value": false
}
] | {
"pile_set_name": "Github"
} |
; RUN: llc -mcpu=pwr7 -O0 -code-model=medium <%s | FileCheck %s
; RUN: llc -mcpu=pwr7 -O0 -code-model=large <%s | FileCheck %s
; Test correct code generation for medium and large code model
; for loading and storing an external variable.
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
@ei = external global i32
define signext i32 @test_external() nounwind {
entry:
%0 = load i32* @ei, align 4
%inc = add nsw i32 %0, 1
store i32 %inc, i32* @ei, align 4
ret i32 %0
}
; CHECK-LABEL: test_external:
; CHECK: addis [[REG1:[0-9]+]], 2, .LC[[TOCNUM:[0-9]+]]@toc@ha
; CHECK: ld [[REG2:[0-9]+]], .LC[[TOCNUM]]@toc@l([[REG1]])
; CHECK: lwz {{[0-9]+}}, 0([[REG2]])
; CHECK: stw {{[0-9]+}}, 0([[REG2]])
; CHECK: .section .toc
; CHECK: .LC[[TOCNUM]]:
; CHECK: .tc {{[a-z0-9A-Z_.]+}}[TC],{{[a-z0-9A-Z_.]+}}
| {
"pile_set_name": "Github"
} |
Paragraphs
A short paragraph of text.
A second short paragraph this one is hard wrapped though.
Another paragraph of text that is really, honestly, too long not to
wrap I wonder what will happen?
And finally, here's a paragraph of text with extra spaces
| {
"pile_set_name": "Github"
} |
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Modules", "Modules", "{C25E055D-DBB5-4B7D-863C-40B12712B0CE}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ZKEACMS.Core", "ZKEACMS.Core", "{63653A41-AD32-4004-8934-D02BFAB493FE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZKEASOFT.CMS.Web", "Easy.CMS.Web\ZKEASOFT.CMS.Web.csproj", "{C2DCE03D-6FA4-4461-B5E3-761D7B0C1B0A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Easy.CMS.Product", "Easy.CMS.Web\Modules\Product\Easy.CMS.Product.csproj", "{A333A4DA-7A52-4E32-B7CA-6ADC1990B09E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Easy.CMS.Common", "Easy.CMS.Web\Modules\Common\Easy.CMS.Common.csproj", "{C4A0DA07-F772-4EAE-8F7E-768EF2D801A4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Easy.CMS.Article", "Easy.CMS.Web\Modules\Article\Easy.CMS.Article.csproj", "{14E79FF7-4DBA-47A7-9BED-1D775FA93E43}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Easy.Web.CMS", "EasyFrameWork.CMS\Easy.Web.CMS.csproj", "{2E8362AE-80D6-43E0-B3BF-CAB6D888D154}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Easy.CMS.Section", "Easy.CMS.Web\Modules\Section\Easy.CMS.Section.csproj", "{AE0623C5-EF7D-4BAC-9E9C-3E37E81A57D2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Easy.CMS.Breadcrumb", "Easy.CMS.Web\Modules\Breadcrumb\Easy.CMS.Breadcrumb.csproj", "{059B5837-2FB3-43B0-AB7F-470B44588009}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Easy.CMS.Message", "Easy.CMS.Web\Modules\Message\Easy.CMS.Message.csproj", "{D1E0BEA0-D9BB-4330-9813-235FB8A447AF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Easy", "EasyFrameWork\Easy.csproj", "{EDB1BAA7-EC61-4292-BBE5-3BC39EB171E4}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Easy.Web", "EasyFrameWork.Web\Easy.Web.csproj", "{A1228125-F5C4-4001-AC7D-1ACCF1679828}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EasyZip", "EasyZip\EasyZip.csproj", "{02422207-726E-498A-8FAE-848C78BBBF97}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LayoutsCompiler", "Easy.CMS.Web\Modules\LayoutEngine\LayoutsCompiler.csproj", "{19C1529D-2F17-4100-A0BF-C905C909B568}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C2DCE03D-6FA4-4461-B5E3-761D7B0C1B0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C2DCE03D-6FA4-4461-B5E3-761D7B0C1B0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C2DCE03D-6FA4-4461-B5E3-761D7B0C1B0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C2DCE03D-6FA4-4461-B5E3-761D7B0C1B0A}.Release|Any CPU.Build.0 = Release|Any CPU
{A333A4DA-7A52-4E32-B7CA-6ADC1990B09E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A333A4DA-7A52-4E32-B7CA-6ADC1990B09E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A333A4DA-7A52-4E32-B7CA-6ADC1990B09E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A333A4DA-7A52-4E32-B7CA-6ADC1990B09E}.Release|Any CPU.Build.0 = Release|Any CPU
{C4A0DA07-F772-4EAE-8F7E-768EF2D801A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C4A0DA07-F772-4EAE-8F7E-768EF2D801A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4A0DA07-F772-4EAE-8F7E-768EF2D801A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C4A0DA07-F772-4EAE-8F7E-768EF2D801A4}.Release|Any CPU.Build.0 = Release|Any CPU
{14E79FF7-4DBA-47A7-9BED-1D775FA93E43}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{14E79FF7-4DBA-47A7-9BED-1D775FA93E43}.Debug|Any CPU.Build.0 = Debug|Any CPU
{14E79FF7-4DBA-47A7-9BED-1D775FA93E43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{14E79FF7-4DBA-47A7-9BED-1D775FA93E43}.Release|Any CPU.Build.0 = Release|Any CPU
{2E8362AE-80D6-43E0-B3BF-CAB6D888D154}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2E8362AE-80D6-43E0-B3BF-CAB6D888D154}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2E8362AE-80D6-43E0-B3BF-CAB6D888D154}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2E8362AE-80D6-43E0-B3BF-CAB6D888D154}.Release|Any CPU.Build.0 = Release|Any CPU
{AE0623C5-EF7D-4BAC-9E9C-3E37E81A57D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AE0623C5-EF7D-4BAC-9E9C-3E37E81A57D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AE0623C5-EF7D-4BAC-9E9C-3E37E81A57D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AE0623C5-EF7D-4BAC-9E9C-3E37E81A57D2}.Release|Any CPU.Build.0 = Release|Any CPU
{059B5837-2FB3-43B0-AB7F-470B44588009}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{059B5837-2FB3-43B0-AB7F-470B44588009}.Debug|Any CPU.Build.0 = Debug|Any CPU
{059B5837-2FB3-43B0-AB7F-470B44588009}.Release|Any CPU.ActiveCfg = Release|Any CPU
{059B5837-2FB3-43B0-AB7F-470B44588009}.Release|Any CPU.Build.0 = Release|Any CPU
{D1E0BEA0-D9BB-4330-9813-235FB8A447AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D1E0BEA0-D9BB-4330-9813-235FB8A447AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D1E0BEA0-D9BB-4330-9813-235FB8A447AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D1E0BEA0-D9BB-4330-9813-235FB8A447AF}.Release|Any CPU.Build.0 = Release|Any CPU
{EDB1BAA7-EC61-4292-BBE5-3BC39EB171E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EDB1BAA7-EC61-4292-BBE5-3BC39EB171E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EDB1BAA7-EC61-4292-BBE5-3BC39EB171E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EDB1BAA7-EC61-4292-BBE5-3BC39EB171E4}.Release|Any CPU.Build.0 = Release|Any CPU
{A1228125-F5C4-4001-AC7D-1ACCF1679828}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A1228125-F5C4-4001-AC7D-1ACCF1679828}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A1228125-F5C4-4001-AC7D-1ACCF1679828}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A1228125-F5C4-4001-AC7D-1ACCF1679828}.Release|Any CPU.Build.0 = Release|Any CPU
{02422207-726E-498A-8FAE-848C78BBBF97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{02422207-726E-498A-8FAE-848C78BBBF97}.Debug|Any CPU.Build.0 = Debug|Any CPU
{02422207-726E-498A-8FAE-848C78BBBF97}.Release|Any CPU.ActiveCfg = Release|Any CPU
{02422207-726E-498A-8FAE-848C78BBBF97}.Release|Any CPU.Build.0 = Release|Any CPU
{19C1529D-2F17-4100-A0BF-C905C909B568}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19C1529D-2F17-4100-A0BF-C905C909B568}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19C1529D-2F17-4100-A0BF-C905C909B568}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19C1529D-2F17-4100-A0BF-C905C909B568}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{A333A4DA-7A52-4E32-B7CA-6ADC1990B09E} = {C25E055D-DBB5-4B7D-863C-40B12712B0CE}
{C4A0DA07-F772-4EAE-8F7E-768EF2D801A4} = {C25E055D-DBB5-4B7D-863C-40B12712B0CE}
{14E79FF7-4DBA-47A7-9BED-1D775FA93E43} = {C25E055D-DBB5-4B7D-863C-40B12712B0CE}
{2E8362AE-80D6-43E0-B3BF-CAB6D888D154} = {63653A41-AD32-4004-8934-D02BFAB493FE}
{AE0623C5-EF7D-4BAC-9E9C-3E37E81A57D2} = {C25E055D-DBB5-4B7D-863C-40B12712B0CE}
{059B5837-2FB3-43B0-AB7F-470B44588009} = {C25E055D-DBB5-4B7D-863C-40B12712B0CE}
{D1E0BEA0-D9BB-4330-9813-235FB8A447AF} = {C25E055D-DBB5-4B7D-863C-40B12712B0CE}
{EDB1BAA7-EC61-4292-BBE5-3BC39EB171E4} = {63653A41-AD32-4004-8934-D02BFAB493FE}
{A1228125-F5C4-4001-AC7D-1ACCF1679828} = {63653A41-AD32-4004-8934-D02BFAB493FE}
{02422207-726E-498A-8FAE-848C78BBBF97} = {63653A41-AD32-4004-8934-D02BFAB493FE}
{19C1529D-2F17-4100-A0BF-C905C909B568} = {63653A41-AD32-4004-8934-D02BFAB493FE}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EnterpriseLibraryConfigurationToolBinariesPath = packages\Unity.2.1.505.2\lib\NET35
EndGlobalSection
EndGlobal
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Qt 4.6: main.cpp Example File (itemviews/pixelator/main.cpp)</title>
<link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="functions.html"><font color="#004faf">All Functions</font></a> · <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">main.cpp Example File<br /><span class="small-subtitle">itemviews/pixelator/main.cpp</span>
</h1>
<pre><span class="comment"> /****************************************************************************
**
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation ([email protected])
**
** This file is part of the examples of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL$
** Commercial Usage
** Licensees holding valid Qt Commercial licenses may use this file in
** accordance with the Qt Commercial License Agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Nokia.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Nokia gives you certain additional
** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3.0 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU General Public License version 3.0 requirements will be
** met: http://www.gnu.org/copyleft/gpl.html.
**
** If you have questions regarding the use of this file, please contact
** Nokia at [email protected].
** $QT_END_LICENSE$
**
****************************************************************************/</span>
#include <QApplication>
#include "mainwindow.h"
int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(images);
QApplication app(argc, argv);
MainWindow window;
window.show();
window.openImage(":/images/qt.png");
return app.exec();
}</pre>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
</tr></table></div></address></body>
</html>
| {
"pile_set_name": "Github"
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_25) on Thu May 29 11:39:00 PDT 2014 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>NameN (Jackson-core 2.4.0 API)</title>
<meta name="date" content="2014-05-29">
<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="NameN (Jackson-core 2.4.0 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<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 class="navBarCell1Rev">Class</li>
<li><a href="class-use/NameN.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/fasterxml/jackson/core/sym/Name3.html" title="class in com.fasterxml.jackson.core.sym"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/fasterxml/jackson/core/sym/NameN.html" target="_top">Frames</a></li>
<li><a href="NameN.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#fields_inherited_from_class_com.fasterxml.jackson.core.sym.Name">Field</a> | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.fasterxml.jackson.core.sym</div>
<h2 title="Class NameN" class="title">Class NameN</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../com/fasterxml/jackson/core/sym/Name.html" title="class in com.fasterxml.jackson.core.sym">com.fasterxml.jackson.core.sym.Name</a></li>
<li>
<ul class="inheritance">
<li>com.fasterxml.jackson.core.sym.NameN</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="strong">NameN</span>
extends <a href="../../../../../com/fasterxml/jackson/core/sym/Name.html" title="class in com.fasterxml.jackson.core.sym">Name</a></pre>
<div class="block">Generic implementation of PName used for "long" names, where long
means that its byte (UTF-8) representation is 13 bytes or more.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_com.fasterxml.jackson.core.sym.Name">
<!-- -->
</a>
<h3>Fields inherited from class com.fasterxml.jackson.core.sym.<a href="../../../../../com/fasterxml/jackson/core/sym/Name.html" title="class in com.fasterxml.jackson.core.sym">Name</a></h3>
<code><a href="../../../../../com/fasterxml/jackson/core/sym/Name.html#_hashCode">_hashCode</a>, <a href="../../../../../com/fasterxml/jackson/core/sym/Name.html#_name">_name</a></code></li>
</ul>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../com/fasterxml/jackson/core/sym/NameN.html" title="class in com.fasterxml.jackson.core.sym">NameN</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/sym/NameN.html#construct(java.lang.String, int, int[], int)">construct</a></strong>(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name,
int hash,
int[] q,
int qlen)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/sym/NameN.html#equals(int)">equals</a></strong>(int quad)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/sym/NameN.html#equals(int[], int)">equals</a></strong>(int[] quads,
int len)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/fasterxml/jackson/core/sym/NameN.html#equals(int, int)">equals</a></strong>(int quad1,
int quad2)</code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_com.fasterxml.jackson.core.sym.Name">
<!-- -->
</a>
<h3>Methods inherited from class com.fasterxml.jackson.core.sym.<a href="../../../../../com/fasterxml/jackson/core/sym/Name.html" title="class in com.fasterxml.jackson.core.sym">Name</a></h3>
<code><a href="../../../../../com/fasterxml/jackson/core/sym/Name.html#equals(java.lang.Object)">equals</a>, <a href="../../../../../com/fasterxml/jackson/core/sym/Name.html#getName()">getName</a>, <a href="../../../../../com/fasterxml/jackson/core/sym/Name.html#hashCode()">hashCode</a>, <a href="../../../../../com/fasterxml/jackson/core/sym/Name.html#toString()">toString</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="construct(java.lang.String, int, int[], int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>construct</h4>
<pre>public static <a href="../../../../../com/fasterxml/jackson/core/sym/NameN.html" title="class in com.fasterxml.jackson.core.sym">NameN</a> construct(<a href="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> name,
int hash,
int[] q,
int qlen)</pre>
</li>
</ul>
<a name="equals(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public boolean equals(int quad)</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../com/fasterxml/jackson/core/sym/Name.html#equals(int)">equals</a></code> in class <code><a href="../../../../../com/fasterxml/jackson/core/sym/Name.html" title="class in com.fasterxml.jackson.core.sym">Name</a></code></dd>
</dl>
</li>
</ul>
<a name="equals(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public boolean equals(int quad1,
int quad2)</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../com/fasterxml/jackson/core/sym/Name.html#equals(int, int)">equals</a></code> in class <code><a href="../../../../../com/fasterxml/jackson/core/sym/Name.html" title="class in com.fasterxml.jackson.core.sym">Name</a></code></dd>
</dl>
</li>
</ul>
<a name="equals(int[], int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>equals</h4>
<pre>public boolean equals(int[] quads,
int len)</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../../com/fasterxml/jackson/core/sym/Name.html#equals(int[], int)">equals</a></code> in class <code><a href="../../../../../com/fasterxml/jackson/core/sym/Name.html" title="class in com.fasterxml.jackson.core.sym">Name</a></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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="class-use/NameN.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/fasterxml/jackson/core/sym/Name3.html" title="class in com.fasterxml.jackson.core.sym"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/fasterxml/jackson/core/sym/NameN.html" target="_top">Frames</a></li>
<li><a href="NameN.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#fields_inherited_from_class_com.fasterxml.jackson.core.sym.Name">Field</a> | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2014 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.</small></p>
</body>
</html>
| {
"pile_set_name": "Github"
} |
[1,000,000,000 Studs]
0032A3A0 05F5E0FF
[Infinite Health]
602C2478 00000000
B02C2478 00000000
00000108 3C000005
D2000000 00000000
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0">
<title>FixedColumns example - Index column</title>
<link rel="stylesheet" type="text/css" href="../../../media/css/jquery.dataTables.css">
<link rel="stylesheet" type="text/css" href="../css/dataTables.fixedColumns.css">
<link rel="stylesheet" type="text/css" href="../../../examples/resources/syntax/shCore.css">
<link rel="stylesheet" type="text/css" href="../../../examples/resources/demo.css">
<style type="text/css" class="init">
/* Ensure that the demo table scrolls */
th, td { white-space: nowrap; }
div.dataTables_wrapper {
width: 800px;
margin: 0 auto;
}
/* Styling for the index columns */
th.index,
td.index {
background-color: white !important;
border-top: 1px solid white !important;
border-bottom: none !important;
}
div.DTFC_LeftHeadWrapper table {
border-bottom: 1px solid white !important;
}
div.DTFC_LeftHeadWrapper th {
border-bottom: 1px solid white !important;
}
div.DTFC_LeftBodyWrapper {
border-right: 1px solid black;
}
div.DTFC_LeftFootWrapper th {
border-top: 1px solid white !important;
}
</style>
<script type="text/javascript" language="javascript" src="../../../media/js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="../../../media/js/jquery.dataTables.js"></script>
<script type="text/javascript" language="javascript" src="../js/dataTables.fixedColumns.js"></script>
<script type="text/javascript" language="javascript" src="../../../examples/resources/syntax/shCore.js"></script>
<script type="text/javascript" language="javascript" src="../../../examples/resources/demo.js"></script>
<script type="text/javascript" language="javascript" class="init">
$(document).ready(function() {
var table = $('#example').DataTable( {
scrollY: "300px",
scrollX: true,
scrollCollapse: true,
paging: false,
columnDefs: [ {
sortable: false,
"class": "index",
targets: 0
} ],
order: [[ 1, 'asc' ]]
} );
table.on( 'order.dt search.dt', function () {
table.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
cell.innerHTML = i+1;
} );
} ).draw();
new $.fn.dataTable.FixedColumns( table );
} );
</script>
</head>
<body class="dt-example">
<div class="container">
<section>
<h1>FixedColumns example <span>Index column</span></h1>
<div class="info">
<p>A typical interaction to want to perform with a fixed column, is an index column. A method for how this can be achieved with FixedColumns is shown in this
example, building on the <a href="http://datatables.net/examples/api/counter_column">index column</a> example for DataTables. Also shown in this example is how the
fixed column can be styled with CSS to show it more prominently.</p>
</div>
<table id="example" class="stripe row-border order-column" cellspacing="0" width="100%">
<thead>
<tr>
<th></th>
<th>First name</th>
<th>Last name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
<th>Extn.</th>
<th>E-mail</th>
</tr>
</thead>
<tbody>
<tr>
<td></td>
<td>Tiger</td>
<td>Nixon</td>
<td>System Architect</td>
<td>Edinburgh</td>
<td>61</td>
<td>2011/04/25</td>
<td>$320,800</td>
<td>5421</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Garrett</td>
<td>Winters</td>
<td>Accountant</td>
<td>Tokyo</td>
<td>63</td>
<td>2011/07/25</td>
<td>$170,750</td>
<td>8422</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Ashton</td>
<td>Cox</td>
<td>Junior Technical Author</td>
<td>San Francisco</td>
<td>66</td>
<td>2009/01/12</td>
<td>$86,000</td>
<td>1562</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Cedric</td>
<td>Kelly</td>
<td>Senior Javascript Developer</td>
<td>Edinburgh</td>
<td>22</td>
<td>2012/03/29</td>
<td>$433,060</td>
<td>6224</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Airi</td>
<td>Satou</td>
<td>Accountant</td>
<td>Tokyo</td>
<td>33</td>
<td>2008/11/28</td>
<td>$162,700</td>
<td>5407</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Brielle</td>
<td>Williamson</td>
<td>Integration Specialist</td>
<td>New York</td>
<td>61</td>
<td>2012/12/02</td>
<td>$372,000</td>
<td>4804</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Herrod</td>
<td>Chandler</td>
<td>Sales Assistant</td>
<td>San Francisco</td>
<td>59</td>
<td>2012/08/06</td>
<td>$137,500</td>
<td>9608</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Rhona</td>
<td>Davidson</td>
<td>Integration Specialist</td>
<td>Tokyo</td>
<td>55</td>
<td>2010/10/14</td>
<td>$327,900</td>
<td>6200</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Colleen</td>
<td>Hurst</td>
<td>Javascript Developer</td>
<td>San Francisco</td>
<td>39</td>
<td>2009/09/15</td>
<td>$205,500</td>
<td>2360</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Sonya</td>
<td>Frost</td>
<td>Software Engineer</td>
<td>Edinburgh</td>
<td>23</td>
<td>2008/12/13</td>
<td>$103,600</td>
<td>1667</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Jena</td>
<td>Gaines</td>
<td>Office Manager</td>
<td>London</td>
<td>30</td>
<td>2008/12/19</td>
<td>$90,560</td>
<td>3814</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Quinn</td>
<td>Flynn</td>
<td>Support Lead</td>
<td>Edinburgh</td>
<td>22</td>
<td>2013/03/03</td>
<td>$342,000</td>
<td>9497</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Charde</td>
<td>Marshall</td>
<td>Regional Director</td>
<td>San Francisco</td>
<td>36</td>
<td>2008/10/16</td>
<td>$470,600</td>
<td>6741</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Haley</td>
<td>Kennedy</td>
<td>Senior Marketing Designer</td>
<td>London</td>
<td>43</td>
<td>2012/12/18</td>
<td>$313,500</td>
<td>3597</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Tatyana</td>
<td>Fitzpatrick</td>
<td>Regional Director</td>
<td>London</td>
<td>19</td>
<td>2010/03/17</td>
<td>$385,750</td>
<td>1965</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Michael</td>
<td>Silva</td>
<td>Marketing Designer</td>
<td>London</td>
<td>66</td>
<td>2012/11/27</td>
<td>$198,500</td>
<td>1581</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Paul</td>
<td>Byrd</td>
<td>Chief Financial Officer (CFO)</td>
<td>New York</td>
<td>64</td>
<td>2010/06/09</td>
<td>$725,000</td>
<td>3059</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Gloria</td>
<td>Little</td>
<td>Systems Administrator</td>
<td>New York</td>
<td>59</td>
<td>2009/04/10</td>
<td>$237,500</td>
<td>1721</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Bradley</td>
<td>Greer</td>
<td>Software Engineer</td>
<td>London</td>
<td>41</td>
<td>2012/10/13</td>
<td>$132,000</td>
<td>2558</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Dai</td>
<td>Rios</td>
<td>Personnel Lead</td>
<td>Edinburgh</td>
<td>35</td>
<td>2012/09/26</td>
<td>$217,500</td>
<td>2290</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Jenette</td>
<td>Caldwell</td>
<td>Development Lead</td>
<td>New York</td>
<td>30</td>
<td>2011/09/03</td>
<td>$345,000</td>
<td>1937</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Yuri</td>
<td>Berry</td>
<td>Chief Marketing Officer (CMO)</td>
<td>New York</td>
<td>40</td>
<td>2009/06/25</td>
<td>$675,000</td>
<td>6154</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Caesar</td>
<td>Vance</td>
<td>Pre-Sales Support</td>
<td>New York</td>
<td>21</td>
<td>2011/12/12</td>
<td>$106,450</td>
<td>8330</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Doris</td>
<td>Wilder</td>
<td>Sales Assistant</td>
<td>Sidney</td>
<td>23</td>
<td>2010/09/20</td>
<td>$85,600</td>
<td>3023</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Angelica</td>
<td>Ramos</td>
<td>Chief Executive Officer (CEO)</td>
<td>London</td>
<td>47</td>
<td>2009/10/09</td>
<td>$1,200,000</td>
<td>5797</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Gavin</td>
<td>Joyce</td>
<td>Developer</td>
<td>Edinburgh</td>
<td>42</td>
<td>2010/12/22</td>
<td>$92,575</td>
<td>8822</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Jennifer</td>
<td>Chang</td>
<td>Regional Director</td>
<td>Singapore</td>
<td>28</td>
<td>2010/11/14</td>
<td>$357,650</td>
<td>9239</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Brenden</td>
<td>Wagner</td>
<td>Software Engineer</td>
<td>San Francisco</td>
<td>28</td>
<td>2011/06/07</td>
<td>$206,850</td>
<td>1314</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Fiona</td>
<td>Green</td>
<td>Chief Operating Officer (COO)</td>
<td>San Francisco</td>
<td>48</td>
<td>2010/03/11</td>
<td>$850,000</td>
<td>2947</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Shou</td>
<td>Itou</td>
<td>Regional Marketing</td>
<td>Tokyo</td>
<td>20</td>
<td>2011/08/14</td>
<td>$163,000</td>
<td>8899</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Michelle</td>
<td>House</td>
<td>Integration Specialist</td>
<td>Sidney</td>
<td>37</td>
<td>2011/06/02</td>
<td>$95,400</td>
<td>2769</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Suki</td>
<td>Burks</td>
<td>Developer</td>
<td>London</td>
<td>53</td>
<td>2009/10/22</td>
<td>$114,500</td>
<td>6832</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Prescott</td>
<td>Bartlett</td>
<td>Technical Author</td>
<td>London</td>
<td>27</td>
<td>2011/05/07</td>
<td>$145,000</td>
<td>3606</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Gavin</td>
<td>Cortez</td>
<td>Team Leader</td>
<td>San Francisco</td>
<td>22</td>
<td>2008/10/26</td>
<td>$235,500</td>
<td>2860</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Martena</td>
<td>Mccray</td>
<td>Post-Sales support</td>
<td>Edinburgh</td>
<td>46</td>
<td>2011/03/09</td>
<td>$324,050</td>
<td>8240</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Unity</td>
<td>Butler</td>
<td>Marketing Designer</td>
<td>San Francisco</td>
<td>47</td>
<td>2009/12/09</td>
<td>$85,675</td>
<td>5384</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Howard</td>
<td>Hatfield</td>
<td>Office Manager</td>
<td>San Francisco</td>
<td>51</td>
<td>2008/12/16</td>
<td>$164,500</td>
<td>7031</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Hope</td>
<td>Fuentes</td>
<td>Secretary</td>
<td>San Francisco</td>
<td>41</td>
<td>2010/02/12</td>
<td>$109,850</td>
<td>6318</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Vivian</td>
<td>Harrell</td>
<td>Financial Controller</td>
<td>San Francisco</td>
<td>62</td>
<td>2009/02/14</td>
<td>$452,500</td>
<td>9422</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Timothy</td>
<td>Mooney</td>
<td>Office Manager</td>
<td>London</td>
<td>37</td>
<td>2008/12/11</td>
<td>$136,200</td>
<td>7580</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Jackson</td>
<td>Bradshaw</td>
<td>Director</td>
<td>New York</td>
<td>65</td>
<td>2008/09/26</td>
<td>$645,750</td>
<td>1042</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Olivia</td>
<td>Liang</td>
<td>Support Engineer</td>
<td>Singapore</td>
<td>64</td>
<td>2011/02/03</td>
<td>$234,500</td>
<td>2120</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Bruno</td>
<td>Nash</td>
<td>Software Engineer</td>
<td>London</td>
<td>38</td>
<td>2011/05/03</td>
<td>$163,500</td>
<td>6222</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Sakura</td>
<td>Yamamoto</td>
<td>Support Engineer</td>
<td>Tokyo</td>
<td>37</td>
<td>2009/08/19</td>
<td>$139,575</td>
<td>9383</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Thor</td>
<td>Walton</td>
<td>Developer</td>
<td>New York</td>
<td>61</td>
<td>2013/08/11</td>
<td>$98,540</td>
<td>8327</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Finn</td>
<td>Camacho</td>
<td>Support Engineer</td>
<td>San Francisco</td>
<td>47</td>
<td>2009/07/07</td>
<td>$87,500</td>
<td>2927</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Serge</td>
<td>Baldwin</td>
<td>Data Coordinator</td>
<td>Singapore</td>
<td>64</td>
<td>2012/04/09</td>
<td>$138,575</td>
<td>8352</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Zenaida</td>
<td>Frank</td>
<td>Software Engineer</td>
<td>New York</td>
<td>63</td>
<td>2010/01/04</td>
<td>$125,250</td>
<td>7439</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Zorita</td>
<td>Serrano</td>
<td>Software Engineer</td>
<td>San Francisco</td>
<td>56</td>
<td>2012/06/01</td>
<td>$115,000</td>
<td>4389</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Jennifer</td>
<td>Acosta</td>
<td>Junior Javascript Developer</td>
<td>Edinburgh</td>
<td>43</td>
<td>2013/02/01</td>
<td>$75,650</td>
<td>3431</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Cara</td>
<td>Stevens</td>
<td>Sales Assistant</td>
<td>New York</td>
<td>46</td>
<td>2011/12/06</td>
<td>$145,600</td>
<td>3990</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Hermione</td>
<td>Butler</td>
<td>Regional Director</td>
<td>London</td>
<td>47</td>
<td>2011/03/21</td>
<td>$356,250</td>
<td>1016</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Lael</td>
<td>Greer</td>
<td>Systems Administrator</td>
<td>London</td>
<td>21</td>
<td>2009/02/27</td>
<td>$103,500</td>
<td>6733</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Jonas</td>
<td>Alexander</td>
<td>Developer</td>
<td>San Francisco</td>
<td>30</td>
<td>2010/07/14</td>
<td>$86,500</td>
<td>8196</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Shad</td>
<td>Decker</td>
<td>Regional Director</td>
<td>Edinburgh</td>
<td>51</td>
<td>2008/11/13</td>
<td>$183,000</td>
<td>6373</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Michael</td>
<td>Bruce</td>
<td>Javascript Developer</td>
<td>Singapore</td>
<td>29</td>
<td>2011/06/27</td>
<td>$183,000</td>
<td>5384</td>
<td>[email protected]</td>
</tr>
<tr>
<td></td>
<td>Donna</td>
<td>Snider</td>
<td>Customer Support</td>
<td>New York</td>
<td>27</td>
<td>2011/01/25</td>
<td>$112,000</td>
<td>4226</td>
<td>[email protected]</td>
</tr>
</tbody>
</table>
<ul class="tabs">
<li class="active">Javascript</li>
<li>HTML</li>
<li>CSS</li>
<li>Ajax</li>
<li>Server-side script</li>
</ul>
<div class="tabs">
<div class="js">
<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() {
var table = $('#example').DataTable( {
scrollY: "300px",
scrollX: true,
scrollCollapse: true,
paging: false,
columnDefs: [ {
sortable: false,
"class": "index",
targets: 0
} ],
order: [[ 1, 'asc' ]]
} );
table.on( 'order.dt search.dt', function () {
table.column(0, {search:'applied', order:'applied'}).nodes().each( function (cell, i) {
cell.innerHTML = i+1;
} );
} ).draw();
new $.fn.dataTable.FixedColumns( table );
} );</code>
<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>
<ul>
<li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li>
<li><a href="../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li>
<li><a href="../js/dataTables.fixedColumns.js">../js/dataTables.fixedColumns.js</a></li>
</ul>
</div>
<div class="table">
<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>
</div>
<div class="css">
<div>
<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The
additional CSS used is shown below:</p><code class="multiline language-css">/* Ensure that the demo table scrolls */
th, td { white-space: nowrap; }
div.dataTables_wrapper {
width: 800px;
margin: 0 auto;
}
/* Styling for the index columns */
th.index,
td.index {
background-color: white !important;
border-top: 1px solid white !important;
border-bottom: none !important;
}
div.DTFC_LeftHeadWrapper table {
border-bottom: 1px solid white !important;
}
div.DTFC_LeftHeadWrapper th {
border-bottom: 1px solid white !important;
}
div.DTFC_LeftBodyWrapper {
border-right: 1px solid black;
}
div.DTFC_LeftFootWrapper th {
border-top: 1px solid white !important;
}</code>
</div>
<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>
<ul>
<li><a href="../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css</a></li>
<li><a href="../css/dataTables.fixedColumns.css">../css/dataTables.fixedColumns.css</a></li>
</ul>
</div>
<div class="ajax">
<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is
loaded.</p>
</div>
<div class="php">
<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side
processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables
documentation</a>.</p>
</div>
</div>
</section>
</div>
<section>
<div class="footer">
<div class="gradient"></div>
<div class="liner">
<h2>Other examples</h2>
<div class="toc">
<div class="toc-group">
<h3><a href="./index.html">Examples</a></h3>
<ul class="toc active">
<li><a href="./left_right_columns.html">Left and right fixed columns</a></li>
<li><a href="./simple.html">Basic initialisation</a></li>
<li><a href="./two_columns.html">Multiple fixed columns</a></li>
<li><a href="./right_column.html">Right column only</a></li>
<li><a href="./rowspan.html">Complex headers</a></li>
<li><a href="./colvis.html">ColVis integration</a></li>
<li><a href="./server-side-processing.html">Server-side processing</a></li>
<li><a href="./css_size.html">CSS row sizing</a></li>
<li><a href="./size_fixed.html">Assigned column width</a></li>
<li><a href="./size_fluid.html">Fluid column width</a></li>
<li><a href="./col_filter.html">Individual column filtering</a></li>
<li><a href="./bootstrap.html">Bootstrap</a></li>
<li class="active"><a href="./index_column.html">Index column</a></li>
</ul>
</div>
</div>
<div class="epilogue">
<p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br>
Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a>
which extend the capabilities of DataTables.</p>
<p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> © 2007-2015<br>
DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p>
</div>
</div>
</div>
</section>
</body>
</html> | {
"pile_set_name": "Github"
} |
cmake_minimum_required(VERSION 3.1)
set(CPD_LANGUAGES CXX)
set(CPD_VERSION 0.5.1)
set(CPD_SOVERSION 0)
# Policies
if(POLICY CMP0048) # Project version
cmake_policy(SET CMP0048 NEW)
project(cpd LANGUAGES ${CPD_LANGUAGES} VERSION ${CPD_VERSION})
else()
project(cpd ${CPD_LANGUAGES})
endif()
if(POLICY CMP0042) # MACOSX_RPATH
cmake_policy(SET CMP0042 NEW)
endif()
if(POLICY CMP0054) # Quoted variables in if statements
cmake_policy(SET CMP0054 NEW)
endif()
# Upstream
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
find_package(Eigen3 REQUIRED)
find_package(Fgt QUIET)
option(WITH_FGT "Build with fgt" ${Fgt_FOUND})
if(WITH_FGT)
find_package(Fgt REQUIRED)
endif()
# Configuration
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
else()
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
endif()
include(CMakePackageConfigHelpers)
write_basic_package_version_file("${PROJECT_BINARY_DIR}/cmake/cpd-config-version.cmake" VERSION ${CPD_VERSION} COMPATIBILITY AnyNewerVersion)
configure_file(cmake/cpd-config.cmake.in "${PROJECT_BINARY_DIR}/cmake/cpd-config.cmake" @ONLY)
install(FILES "${PROJECT_BINARY_DIR}/cmake/cpd-config.cmake" "${PROJECT_BINARY_DIR}/cmake/cpd-config-version.cmake" DESTINATION lib/cmake/cpd)
configure_file(src/version.cpp.in "${PROJECT_BINARY_DIR}/src/version.cpp")
# C++ library
set(library-src
src/affine.cpp
src/gauss_transform.cpp
src/matrix.cpp
src/nonrigid.cpp
src/normalization.cpp
src/rigid.cpp
src/transform.cpp
src/utils.cpp
"${PROJECT_BINARY_DIR}/src/version.cpp"
)
if(WITH_FGT)
list(APPEND library-src src/gauss_transform_fgt.cpp)
else()
list(APPEND library-src src/gauss_transform_make_default.cpp)
endif()
add_library(Library-C++ ${library-src})
set_target_properties(Library-C++ PROPERTIES
OUTPUT_NAME cpd
VERSION ${CPD_VERSION}
SOVERSION ${CPD_SOVERSION}
)
target_include_directories(Library-C++
PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
${EIGEN3_INCLUDE_DIR}
)
target_compile_options(Library-C++ PUBLIC -std=c++11)
if(WITH_FGT)
target_link_libraries(Library-C++ PUBLIC Fgt::Library-C++)
target_compile_definitions(Library-C++ PUBLIC CPD_WITH_FGT)
endif()
option(WITH_STRICT_WARNINGS "Build with stricter warnings" ON)
if(WITH_STRICT_WARNINGS)
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
target_compile_options(Library-C++ PRIVATE -Wall -pedantic -Wno-gnu-zero-variadic-macro-arguments)
endif()
endif()
# Tests
option(WITH_TESTS "Build test suite" ON)
if(WITH_TESTS)
enable_testing()
add_subdirectory("${PROJECT_SOURCE_DIR}/vendor/googletest-release-1.8.1/googletest")
add_subdirectory(tests)
endif()
# Install
install(TARGETS Library-C++ DESTINATION lib EXPORT cpd-targets)
install(DIRECTORY include/cpd DESTINATION include)
install(EXPORT cpd-targets NAMESPACE Cpd:: DESTINATION lib/cmake/cpd)
# Docs
find_package(Doxygen QUIET)
option(WITH_DOCS "Add documentation target" ${Doxygen_FOUND})
if(WITH_DOCS)
find_package(Doxygen REQUIRED)
configure_file(docs/Doxyfile.in "${PROJECT_BINARY_DIR}/docs/Doxyfile")
add_custom_target(doc COMMAND ${DOXYGEN_EXECUTABLE} "${PROJECT_BINARY_DIR}/docs/Doxyfile")
endif()
# Components
find_package(jsoncpp QUIET)
option(WITH_JSONCPP "Build with jsoncpp" ${jsoncpp_FOUND})
if(WITH_JSONCPP)
find_package(jsoncpp REQUIRED)
add_subdirectory(components/jsoncpp)
endif()
| {
"pile_set_name": "Github"
} |
/*
* xlnx_dpdma.h
*
* Copyright (C) 2015 : GreenSocs Ltd
* http://www.greensocs.com/ , email: [email protected]
*
* Developed by :
* Frederic Konrad <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef XLNX_DPDMA_H
#define XLNX_DPDMA_H
#include "hw/sysbus.h"
#include "ui/console.h"
#include "sysemu/dma.h"
#define XLNX_DPDMA_REG_ARRAY_SIZE (0x1000 >> 2)
struct XlnxDPDMAState {
/*< private >*/
SysBusDevice parent_obj;
/*< public >*/
MemoryRegion iomem;
uint32_t registers[XLNX_DPDMA_REG_ARRAY_SIZE];
uint8_t *data[6];
bool operation_finished[6];
qemu_irq irq;
};
typedef struct XlnxDPDMAState XlnxDPDMAState;
#define TYPE_XLNX_DPDMA "xlnx.dpdma"
#define XLNX_DPDMA(obj) OBJECT_CHECK(XlnxDPDMAState, (obj), TYPE_XLNX_DPDMA)
/*
* xlnx_dpdma_start_operation: Start the operation on the specified channel. The
* DPDMA gets the current descriptor and retrieves
* data to the buffer specified by
* dpdma_set_host_data_location().
*
* Returns The number of bytes transferred by the DPDMA
* or 0 if an error occurred.
*
* @s The DPDMA state.
* @channel The channel to start.
*/
size_t xlnx_dpdma_start_operation(XlnxDPDMAState *s, uint8_t channel,
bool one_desc);
/*
* xlnx_dpdma_set_host_data_location: Set the location in the host memory where
* to store the data out from the dma
* channel.
*
* @s The DPDMA state.
* @channel The channel associated to the pointer.
* @p The buffer where to store the data.
*/
/* XXX: add a maximum size arg and send an interrupt in case of overflow. */
void xlnx_dpdma_set_host_data_location(XlnxDPDMAState *s, uint8_t channel,
void *p);
/*
* xlnx_dpdma_trigger_vsync_irq: Trigger a VSYNC IRQ when the display is
* updated.
*
* @s The DPDMA state.
*/
void xlnx_dpdma_trigger_vsync_irq(XlnxDPDMAState *s);
#endif /* XLNX_DPDMA_H */
| {
"pile_set_name": "Github"
} |
// CodeMirror, copyright (c) by Marijn Haverbeke and others
// Distributed under an MIT license: http://codemirror.net/LICENSE
(function(mod) {
if (typeof exports == "object" && typeof module == "object") // CommonJS
mod(require("../../lib/codemirror"));
else if (typeof define == "function" && define.amd) // AMD
define(["../../lib/codemirror"], mod);
else // Plain browser env
mod(CodeMirror);
})(function(CodeMirror) {
"use strict";
CodeMirror.defineMode("nginx", function(config) {
function words(str) {
var obj = {}, words = str.split(" ");
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
return obj;
}
var keywords = words(
/* ngxDirectiveControl */ "break return rewrite set" +
/* ngxDirective */ " accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23"
);
var keywords_block = words(
/* ngxDirectiveBlock */ "http mail events server types location upstream charset_map limit_except if geo map"
);
var keywords_important = words(
/* ngxDirectiveImportant */ "include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files"
);
var indentUnit = config.indentUnit, type;
function ret(style, tp) {type = tp; return style;}
function tokenBase(stream, state) {
stream.eatWhile(/[\w\$_]/);
var cur = stream.current();
if (keywords.propertyIsEnumerable(cur)) {
return "keyword";
}
else if (keywords_block.propertyIsEnumerable(cur)) {
return "variable-2";
}
else if (keywords_important.propertyIsEnumerable(cur)) {
return "string-2";
}
/**/
var ch = stream.next();
if (ch == "@") {stream.eatWhile(/[\w\\\-]/); return ret("meta", stream.current());}
else if (ch == "/" && stream.eat("*")) {
state.tokenize = tokenCComment;
return tokenCComment(stream, state);
}
else if (ch == "<" && stream.eat("!")) {
state.tokenize = tokenSGMLComment;
return tokenSGMLComment(stream, state);
}
else if (ch == "=") ret(null, "compare");
else if ((ch == "~" || ch == "|") && stream.eat("=")) return ret(null, "compare");
else if (ch == "\"" || ch == "'") {
state.tokenize = tokenString(ch);
return state.tokenize(stream, state);
}
else if (ch == "#") {
stream.skipToEnd();
return ret("comment", "comment");
}
else if (ch == "!") {
stream.match(/^\s*\w*/);
return ret("keyword", "important");
}
else if (/\d/.test(ch)) {
stream.eatWhile(/[\w.%]/);
return ret("number", "unit");
}
else if (/[,.+>*\/]/.test(ch)) {
return ret(null, "select-op");
}
else if (/[;{}:\[\]]/.test(ch)) {
return ret(null, ch);
}
else {
stream.eatWhile(/[\w\\\-]/);
return ret("variable", "variable");
}
}
function tokenCComment(stream, state) {
var maybeEnd = false, ch;
while ((ch = stream.next()) != null) {
if (maybeEnd && ch == "/") {
state.tokenize = tokenBase;
break;
}
maybeEnd = (ch == "*");
}
return ret("comment", "comment");
}
function tokenSGMLComment(stream, state) {
var dashes = 0, ch;
while ((ch = stream.next()) != null) {
if (dashes >= 2 && ch == ">") {
state.tokenize = tokenBase;
break;
}
dashes = (ch == "-") ? dashes + 1 : 0;
}
return ret("comment", "comment");
}
function tokenString(quote) {
return function(stream, state) {
var escaped = false, ch;
while ((ch = stream.next()) != null) {
if (ch == quote && !escaped)
break;
escaped = !escaped && ch == "\\";
}
if (!escaped) state.tokenize = tokenBase;
return ret("string", "string");
};
}
return {
startState: function(base) {
return {tokenize: tokenBase,
baseIndent: base || 0,
stack: []};
},
token: function(stream, state) {
if (stream.eatSpace()) return null;
type = null;
var style = state.tokenize(stream, state);
var context = state.stack[state.stack.length-1];
if (type == "hash" && context == "rule") style = "atom";
else if (style == "variable") {
if (context == "rule") style = "number";
else if (!context || context == "@media{") style = "tag";
}
if (context == "rule" && /^[\{\};]$/.test(type))
state.stack.pop();
if (type == "{") {
if (context == "@media") state.stack[state.stack.length-1] = "@media{";
else state.stack.push("{");
}
else if (type == "}") state.stack.pop();
else if (type == "@media") state.stack.push("@media");
else if (context == "{" && type != "comment") state.stack.push("rule");
return style;
},
indent: function(state, textAfter) {
var n = state.stack.length;
if (/^\}/.test(textAfter))
n -= state.stack[state.stack.length-1] == "rule" ? 2 : 1;
return state.baseIndent + n * indentUnit;
},
electricChars: "}"
};
});
CodeMirror.defineMIME("text/nginx", "text/x-nginx-conf");
});
| {
"pile_set_name": "Github"
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_35) on Tue Oct 09 17:08:15 PDT 2012 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
FromStringDeserializer (jackson-databind 2.1.0 API)
</TITLE>
<META NAME="date" CONTENT="2012-10-09">
<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="FromStringDeserializer (jackson-databind 2.1.0 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<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> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FromStringDeserializer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/EnumSetDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std"><B>PREV CLASS</B></A>
<A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/JacksonDeserializers.html" title="class in com.fasterxml.jackson.databind.deser.std"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.html" target="_top"><B>FRAMES</B></A>
<A HREF="FromStringDeserializer.html" target="_top"><B>NO FRAMES</B></A>
<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: <A HREF="#nested_classes_inherited_from_class_com.fasterxml.jackson.databind.JsonDeserializer">NESTED</A> | <A HREF="#fields_inherited_from_class_com.fasterxml.jackson.databind.deser.std.StdDeserializer">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.fasterxml.jackson.databind.deser.std</FONT>
<BR>
Class FromStringDeserializer<T></H2>
<PRE>
<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">com.fasterxml.jackson.databind.JsonDeserializer</A><T>
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">com.fasterxml.jackson.databind.deser.std.StdDeserializer</A><T>
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdScalarDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer</A><T>
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>com.fasterxml.jackson.databind.deser.std.FromStringDeserializer<T></B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../../com/fasterxml/jackson/databind/ext/CoreXMLDeserializers.DurationDeserializer.html" title="class in com.fasterxml.jackson.databind.ext">CoreXMLDeserializers.DurationDeserializer</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/ext/CoreXMLDeserializers.QNameDeserializer.html" title="class in com.fasterxml.jackson.databind.ext">CoreXMLDeserializers.QNameDeserializer</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/DateDeserializers.TimeZoneDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">DateDeserializers.TimeZoneDeserializer</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/ext/DOMDeserializer.html" title="class in com.fasterxml.jackson.databind.ext">DOMDeserializer</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/JdkDeserializers.CharsetDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">JdkDeserializers.CharsetDeserializer</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/JdkDeserializers.CurrencyDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">JdkDeserializers.CurrencyDeserializer</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/JdkDeserializers.InetAddressDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">JdkDeserializers.InetAddressDeserializer</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/JdkDeserializers.LocaleDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">JdkDeserializers.LocaleDeserializer</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/JdkDeserializers.PatternDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">JdkDeserializers.PatternDeserializer</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/JdkDeserializers.URIDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">JdkDeserializers.URIDeserializer</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/JdkDeserializers.URLDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">JdkDeserializers.URLDeserializer</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/JdkDeserializers.UUIDDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">JdkDeserializers.UUIDDeserializer</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public abstract class <B>FromStringDeserializer<T></B><DT>extends <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdScalarDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">StdScalarDeserializer</A><T></DL>
</PRE>
<P>
Base class for simple deserializers that only accept JSON String
values as the source.
<P>
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../../serialized-form.html#com.fasterxml.jackson.databind.deser.std.FromStringDeserializer">Serialized Form</A></DL>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_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>Nested Class Summary</B></FONT></TH>
</TR>
</TABLE>
<A NAME="nested_classes_inherited_from_class_com.fasterxml.jackson.databind.JsonDeserializer"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.<A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.None.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer.None</A></CODE></TD>
</TR>
</TABLE>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_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>Field Summary</B></FONT></TH>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_com.fasterxml.jackson.databind.deser.std.StdDeserializer"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Fields inherited from class com.fasterxml.jackson.databind.deser.std.<A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">StdDeserializer</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_valueClass">_valueClass</A></CODE></TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<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 ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected </CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.html#FromStringDeserializer(java.lang.Class)">FromStringDeserializer</A></B>(<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A><?> vc)</CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<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>protected abstract <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.html" title="type parameter in FromStringDeserializer">T</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.html#_deserialize(java.lang.String, com.fasterxml.jackson.databind.DeserializationContext)">_deserialize</A></B>(<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> value,
<A HREF="../../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.html" title="type parameter in FromStringDeserializer">T</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.html#_deserializeEmbedded(java.lang.Object, com.fasterxml.jackson.databind.DeserializationContext)">_deserializeEmbedded</A></B>(<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> ob,
<A HREF="../../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.html" title="type parameter in FromStringDeserializer">T</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.html#deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">deserialize</A></B>(<A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</A> jp,
<A HREF="../../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt)</CODE>
<BR>
Method that can be called to ask implementation to deserialize
JSON content into the value type this serializer handles.</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.fasterxml.jackson.databind.deser.std.<A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdScalarDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">StdScalarDeserializer</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdScalarDeserializer.html#deserializeWithType(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.jsontype.TypeDeserializer)">deserializeWithType</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_com.fasterxml.jackson.databind.deser.std.StdDeserializer"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.fasterxml.jackson.databind.deser.std.<A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std">StdDeserializer</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseBoolean(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseBoolean</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseBooleanFromNumber(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseBooleanFromNumber</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseBooleanPrimitive(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseBooleanPrimitive</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseByte(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseByte</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseDate(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseDate</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseDouble(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseDouble</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseDoublePrimitive(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseDoublePrimitive</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseFloat(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseFloat</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseFloatPrimitive(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseFloatPrimitive</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseInteger(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseInteger</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseIntPrimitive(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseIntPrimitive</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseLong(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseLong</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseLongPrimitive(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseLongPrimitive</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseShort(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseShort</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseShortPrimitive(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseShortPrimitive</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#_parseString(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">_parseString</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#findDeserializer(com.fasterxml.jackson.databind.DeserializationContext, com.fasterxml.jackson.databind.JavaType, com.fasterxml.jackson.databind.BeanProperty)">findDeserializer</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#getValueClass()">getValueClass</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#getValueType()">getValueType</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#handleUnknownProperty(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, java.lang.Object, java.lang.String)">handleUnknownProperty</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#isDefaultDeserializer(com.fasterxml.jackson.databind.JsonDeserializer)">isDefaultDeserializer</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#isDefaultKeyDeserializer(com.fasterxml.jackson.databind.KeyDeserializer)">isDefaultKeyDeserializer</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/StdDeserializer.html#parseDouble(java.lang.String)">parseDouble</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_com.fasterxml.jackson.databind.JsonDeserializer"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class com.fasterxml.jackson.databind.<A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, T)">deserialize</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getDelegatee()">getDelegatee</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getEmptyValue()">getEmptyValue</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getKnownPropertyNames()">getKnownPropertyNames</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getNullValue()">getNullValue</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#getObjectIdReader()">getObjectIdReader</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#isCachable()">isCachable</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#replaceDelegatee(com.fasterxml.jackson.databind.JsonDeserializer)">replaceDelegatee</A>, <A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#unwrappingDeserializer(com.fasterxml.jackson.databind.util.NameTransformer)">unwrappingDeserializer</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
<P>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<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="FromStringDeserializer(java.lang.Class)"><!-- --></A><H3>
FromStringDeserializer</H3>
<PRE>
protected <B>FromStringDeserializer</B>(<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A><?> vc)</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<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="deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)"><!-- --></A><H3>
deserialize</H3>
<PRE>
public final <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.html" title="type parameter in FromStringDeserializer">T</A> <B>deserialize</B>(<A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonParser</A> jp,
<A HREF="../../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt)
throws <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A>,
<A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</A></PRE>
<DL>
<DD><B>Description copied from class: <CODE><A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">JsonDeserializer</A></CODE></B></DD>
<DD>Method that can be called to ask implementation to deserialize
JSON content into the value type this serializer handles.
Returned instance is to be constructed by method itself.
<p>
Pre-condition for this method is that the parser points to the
first event that is part of value to deserializer (and which
is never JSON 'null' literal, more on this below): for simple
types it may be the only value; and for structured types the
Object start marker.
Post-condition is that the parser will point to the last
event that is part of deserialized value (or in case deserialization
fails, event that was not recognized or usable, which may be
the same event as the one it pointed to upon call).
<p>
Note that this method is never called for JSON null literal,
and thus deserializers need (and should) not check for it.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html#deserialize(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext)">deserialize</A></CODE> in class <CODE><A HREF="../../../../../../com/fasterxml/jackson/databind/JsonDeserializer.html" title="class in com.fasterxml.jackson.databind">JsonDeserializer</A><<A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.html" title="type parameter in FromStringDeserializer">T</A>></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>jp</CODE> - Parsed used for reading JSON content<DD><CODE>ctxt</CODE> - Context that can be used to access information about
this deserialization activity.
<DT><B>Returns:</B><DD>Deserializer value
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE>
<DD><CODE><A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="_deserialize(java.lang.String, com.fasterxml.jackson.databind.DeserializationContext)"><!-- --></A><H3>
_deserialize</H3>
<PRE>
protected abstract <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.html" title="type parameter in FromStringDeserializer">T</A> <B>_deserialize</B>(<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> value,
<A HREF="../../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt)
throws <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A>,
<A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</A></PRE>
<DL>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE>
<DD><CODE><A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</A></CODE></DL>
</DD>
</DL>
<HR>
<A NAME="_deserializeEmbedded(java.lang.Object, com.fasterxml.jackson.databind.DeserializationContext)"><!-- --></A><H3>
_deserializeEmbedded</H3>
<PRE>
protected <A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.html" title="type parameter in FromStringDeserializer">T</A> <B>_deserializeEmbedded</B>(<A HREF="http://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A> ob,
<A HREF="../../../../../../com/fasterxml/jackson/databind/DeserializationContext.html" title="class in com.fasterxml.jackson.databind">DeserializationContext</A> ctxt)
throws <A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A>,
<A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</A></PRE>
<DL>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://docs.oracle.com/javase/6/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</A></CODE>
<DD><CODE><A HREF="http://fasterxml.github.com/jackson-core/javadoc/2.1.0/com/fasterxml/jackson/core/JsonProcessingException.html?is-external=true" title="class or interface in com.fasterxml.jackson.core">JsonProcessingException</A></CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<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="navbar_bottom_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> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/FromStringDeserializer.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/EnumSetDeserializer.html" title="class in com.fasterxml.jackson.databind.deser.std"><B>PREV CLASS</B></A>
<A HREF="../../../../../../com/fasterxml/jackson/databind/deser/std/JacksonDeserializers.html" title="class in com.fasterxml.jackson.databind.deser.std"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.html" target="_top"><B>FRAMES</B></A>
<A HREF="FromStringDeserializer.html" target="_top"><B>NO FRAMES</B></A>
<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: <A HREF="#nested_classes_inherited_from_class_com.fasterxml.jackson.databind.JsonDeserializer">NESTED</A> | <A HREF="#fields_inherited_from_class_com.fasterxml.jackson.databind.deser.std.StdDeserializer">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright © 2012 <a href="http://fasterxml.com/">FasterXML</a>. All Rights Reserved.
</BODY>
</HTML>
| {
"pile_set_name": "Github"
} |
using DotVVM.Framework.Binding;
using DotVVM.Framework.Controls;
using System;
namespace DotVVM.Samples.Common.Views.ControlSamples.Repeater.SampleControl
{
public class ControlWithButton : DotvvmMarkupControl
{
public Action GoToDetailAction
{
get { return (Action)GetValue(GoToDetailActionProperty); }
set { SetValue(GoToDetailActionProperty, value); }
}
public static readonly DotvvmProperty GoToDetailActionProperty
= DotvvmProperty.Register<Action, ControlWithButton>(c => c.GoToDetailAction, null);
public void OnGoToDetail()
{
this.GoToDetailAction?.Invoke();
}
}
}
| {
"pile_set_name": "Github"
} |
# frozen_string_literal: true
module AwsSdkCodeGenerator
class ResourceClientRequestParams < String
include Helper
# @option options [Array] :params ([])
def initialize(options = {})
@params = options.fetch(:params, nil) || []
super(format_params)
end
def simple?
@params.all? { |p| p['target'].match(/^\w+$/) }
end
def empty?
@params.empty?
end
def size
@params.size
end
private
def format_params
hash = {}
@params.each do |param|
ParamTarget.new(param).apply(hash, ResourceValueSource.new(param))
end
formatter = HashFormatter.new(wrap:false, inline: @params.count == 1)
params = formatter.format(hash)
@params.size == 1 ? params.strip : params
end
class ParamTarget
def initialize(param)
@target = param['target']
@steps = []
@target.scan(/\w+|\[\]|\[\*\]|\[[0-9]+\]/) do |step|
case step
when /\[\d+\]/ then @steps += [:array, step[1..-2].to_i]
when /\[\*\]/ then @steps += [:array, :n]
when '[]' then @steps += [:array, -1]
else @steps += [:hash, Underscore.underscore(step).to_sym]
end
end
@steps.shift
@final = @steps.pop
end
# @return [String] target
attr_reader :target
def apply(hash, value, options = {})
resource_index = options.fetch(:resource_index, 0)
if @final == -1
build_context(hash, resource_index) << value
else
build_context(hash, resource_index)[@final] = value
end
hash
end
private
def build_context(params, n)
@steps.each_slice(2).inject(params) do |context, (key, type)|
entry = type == :array ? [] : {}
if key == -1
context << entry
entry
elsif key == :n
context[n] ||= entry
else
context[key] ||= entry
end
end
end
end
end
end
| {
"pile_set_name": "Github"
} |
0.0003441303682860819231167343154771665059 {omega[1]}
0.0008367064277683688467219135420551573423 {omega[2]}
0.0014271485282657703321934560230892230503 {omega[3]}
0.0022063350723832944777563433175898710559 {omega[4]}
0.0033170826663852254770310990688100827306 {omega[5]}
0.0049702295120621728845026403124929270660 {omega[6]}
0.0074598148300447634512905497466972448706 {omega[7]}
0.0111925033131611303818399414007622727496 {omega[8]}
0.0167408732612223811864855197578672019176 {omega[9]}
0.0249202508268891511923728886504503243771 {omega[10]}
0.0368922396160049555856167737000195216979 {omega[11]}
0.0543053576506714177260764630367217975504 {omega[12]}
0.0794882733701729303911042573416168011136 {omega[13]}
0.1157164998581709899999852945995382214051 {omega[14]}
0.1675820527878086388102844839220750827735 {omega[15]}
0.2415113789840977687536785825650476056126 {omega[16]}
0.3465094381247945097307850553791652714608 {omega[17]}
0.4952839640656329100207137805522705775729 {omega[18]}
0.7061011756092086096231810743439893940376 {omega[19]}
1.0062820802207279606479278788455644644273 {omega[20]}
1.4400007613120490572748352842147312458110 {omega[21]}
2.0895417976739252879838509846521787949314 {omega[22]}
3.1513302933553374173165917415673220602912 {omega[23]}
5.3892940908012303565487177703374754855759 {omega[24]}
0.0001334279798797334435123079931129370934 {alpha[1]}
0.0007184332548415464015689688170602372752 {alpha[2]}
0.0018390692702492175649556824072738958620 {alpha[3]}
0.0036350651574475375992965241189747160888 {alpha[4]}
0.0063614978598115034059479796363367753997 {alpha[5]}
0.0104491270264946769216263863094829034139 {alpha[6]}
0.0165795527241529987126102650696335416569 {alpha[7]}
0.0257813106025258319101595453834430138329 {alpha[8]}
0.0395671230072276642541703479266645970824 {alpha[9]}
0.0601362603417052552221336563648135253857 {alpha[10]}
0.0906664868182099208216242515467886420311 {alpha[11]}
0.1357269876168705350559474595573128397064 {alpha[12]}
0.2018567474543209939503605673816188925684 {alpha[13]}
0.2983708670958517067341338180330723162115 {alpha[14]}
0.4384820926388916989871989693394738196730 {alpha[15]}
0.6408613830131488162404791719684027384574 {alpha[16]}
0.9318208285622837999608199244239159497738 {alpha[17]}
1.3484125488338306996655147074193337175529 {alpha[18]}
1.9429738003820319037443647980367700256465 {alpha[19]}
2.7902294585597746069335900465091526712058 {alpha[20]}
3.9996767562662233095813202332635682978434 {alpha[21]}
5.7411486245728610561256388677975337486714 {alpha[22]}
8.3121787473199385846631126462114025343908 {alpha[23]}
12.4040095890847244484989086998893981217407 {alpha[24]}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ldml SYSTEM "../../common/dtd/ldml.dtd">
<!-- Copyright © 1991-2018 Unicode, Inc.
For terms of use, see http://www.unicode.org/copyright.html
Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
-->
<ldml>
<identity>
<version number="$Revision: 13869 $"/>
<language type="om"/>
<territory type="ET"/>
</identity>
</ldml>
| {
"pile_set_name": "Github"
} |
/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <chrono>
#include <string>
#include <unordered_map>
#include <folly/Format.h>
#include <folly/IPAddress.h>
#include <folly/Memory.h>
#include <folly/String.h>
#include <folly/futures/Future.h>
#include <folly/io/async/AsyncTimeout.h>
#include <thrift/lib/cpp2/Thrift.h>
#include <thrift/lib/cpp2/protocol/Serializer.h>
#include <openr/common/AsyncDebounce.h>
#include <openr/common/AsyncThrottle.h>
#include <openr/common/OpenrEventBase.h>
#include <openr/common/Util.h>
#include <openr/config/Config.h>
#include <openr/decision/LinkState.h>
#include <openr/decision/PrefixState.h>
#include <openr/decision/RibEntry.h>
#include <openr/decision/RibPolicy.h>
#include <openr/decision/RouteUpdate.h>
#include <openr/if/gen-cpp2/Decision_types.h>
#include <openr/if/gen-cpp2/Fib_types.h>
#include <openr/if/gen-cpp2/KvStore_types.h>
#include <openr/if/gen-cpp2/Lsdb_types.h>
#include <openr/if/gen-cpp2/OpenrConfig_types.h>
#include <openr/if/gen-cpp2/OpenrCtrl_types.h>
#include <openr/if/gen-cpp2/PrefixManager_types.h>
#include <openr/kvstore/KvStore.h>
#include <openr/messaging/ReplicateQueue.h>
namespace openr {
/**
* Captures the best route selection result. Especially highlights
* - Best announcing `pair<area, node>`
* - All best entries `list<pair<area, node>>`
*/
struct BestRouteSelectionResult {
// TODO: Remove once we move to metrics selection
bool success{false};
// Representing all `<Node, Area>` pair announcing the best-metrics
// NOTE: Using `std::set` helps ensuring uniqueness and ease code for electing
// the best entry in some-cases.
std::set<NodeAndArea> allNodeAreas;
// The best entry among all entries with best-metrics. This should be used
// for re-distributing across areas.
NodeAndArea bestNodeArea;
/**
* Function to check if provide node is one of the best node
*/
bool
hasNode(const std::string& node) const {
for (auto& [bestNode, _] : allNodeAreas) {
if (node == bestNode) {
return true;
}
}
return false;
}
};
class DecisionRouteDb {
public:
std::unordered_map<folly::CIDRNetwork /* prefix */, RibUnicastEntry>
unicastRoutes;
std::unordered_map<int32_t /* label */, RibMplsEntry> mplsRoutes;
// calculate the delta between this and newDb. Note, this method is const;
// We are not actually updating here. We may mutate the DecisionRouteUpdate in
// some way before calling update with it
DecisionRouteUpdate calculateUpdate(DecisionRouteDb&& newDb) const;
// update the state of this with the DecisionRouteUpdate passed
void update(DecisionRouteUpdate const& update);
thrift::RouteDatabase
toThrift() const {
thrift::RouteDatabase tRouteDb;
// unicast routes
for (const auto& [_, entry] : unicastRoutes) {
tRouteDb.unicastRoutes_ref()->emplace_back(entry.toThrift());
}
// mpls routes
for (const auto& [_, entry] : mplsRoutes) {
tRouteDb.mplsRoutes_ref()->emplace_back(entry.toThrift());
}
return tRouteDb;
}
// Assertion: no route for this prefix may already exist in the db
void
addUnicastRoute(RibUnicastEntry&& entry) {
auto key = entry.prefix;
CHECK(unicastRoutes.emplace(key, std::move(entry)).second);
}
// Assertion: no route for this label may already exist in the db
void
addMplsRoute(RibMplsEntry&& entry) {
auto key = entry.label;
CHECK(mplsRoutes.emplace(key, std::move(entry)).second);
}
};
namespace detail {
/**
* Keep track of hash for pending SPF calculation because of certain
* updates in graph.
* Out of all buffered applications we try to keep the perf events for the
* oldest appearing event.
*/
class DecisionPendingUpdates {
public:
explicit DecisionPendingUpdates(std::string const& myNodeName)
: myNodeName_(myNodeName) {}
void
setNeedsFullRebuild() {
needsFullRebuild_ = true;
}
bool
needsFullRebuild() const {
return needsFullRebuild_;
}
bool
needsRouteUpdate() const {
return needsFullRebuild() || !updatedPrefixes_.empty();
}
std::unordered_set<thrift::IpPrefix> const&
updatedPrefixes() const {
return updatedPrefixes_;
}
void applyLinkStateChange(
std::string const& nodeName,
LinkState::LinkStateChange const& change,
std::optional<thrift::PerfEvents> const& perfEvents = std::nullopt);
void applyPrefixStateChange(
std::unordered_set<thrift::IpPrefix>&& change,
std::optional<thrift::PerfEvents> const& perfEvents = std::nullopt);
void reset();
void addEvent(std::string const& eventDescription);
std::optional<thrift::PerfEvents> const&
perfEvents() const {
return perfEvents_;
}
std::optional<thrift::PerfEvents> moveOutEvents();
uint32_t
getCount() const {
return count_;
}
private:
void addUpdate(const std::optional<thrift::PerfEvents>& perfEvents);
// tracks how many updates are part of this batch
uint32_t count_{0};
// oldest perfEvents list in the batch
std::optional<thrift::PerfEvents> perfEvents_;
// set if we need to rebuild all routes
bool needsFullRebuild_{false};
// track prefixes that have changed in this batch
std::unordered_set<thrift::IpPrefix> updatedPrefixes_;
// local node name to determine action on linkAttributes change
std::string myNodeName_;
};
} // namespace detail
// The class to compute shortest-paths using Dijkstra algorithm
class SpfSolver {
public:
// these need to be defined in the .cpp so they can refer
// to the actual implementation of SpfSolverImpl
SpfSolver(
const std::string& myNodeName,
bool enableV4,
bool computeLfaPaths,
bool enableOrderedFib = false,
bool bgpDryRun = false,
bool enableBestRouteSelection = false);
~SpfSolver();
//
// The following methods talk to implementation so need to
// be defined in the .cpp
//
bool staticRoutesUpdated();
void pushRoutesDeltaUpdates(thrift::RouteDatabaseDelta& staticRoutesDelta);
std::optional<DecisionRouteUpdate> processStaticRouteUpdates();
thrift::StaticRoutes const& getStaticRoutes();
// Build route database using given prefix and link states for a given
// router, myNodeName
// Returns std::nullopt if myNodeName doesn't have any prefix database
std::optional<DecisionRouteDb> buildRouteDb(
const std::string& myNodeName,
std::unordered_map<std::string, LinkState> const& areaLinkStates,
PrefixState const& prefixState);
std::optional<RibUnicastEntry> createRouteForPrefix(
const std::string& myNodeName,
std::unordered_map<std::string, LinkState> const& areaLinkStates,
PrefixState const& prefixState,
thrift::IpPrefix const& prefix);
std::unordered_map<thrift::IpPrefix, BestRouteSelectionResult> const&
getBestRoutesCache() const;
private:
// no-copy
SpfSolver(SpfSolver const&) = delete;
SpfSolver& operator=(SpfSolver const&) = delete;
// pointer to implementation class
class SpfSolverImpl;
std::unique_ptr<SpfSolverImpl> impl_;
};
//
// The decision thread announces FIB updates for myNodeName every time
// there is a change in LSDB. The announcements are made on a PUB socket. At
// the same time, it listens on a REP socket to respond with the recent
// FIB state if requested by clients.
//
// On the "client" side of things, it uses REQ socket to request a full dump
// of link-state information from KvStore, and before that it subscribes to
// the PUB address of the KvStore to receive ongoing LSDB updates from KvStore.
//
// The prefix/adjacency Db markers are used to find the keys in KvStore that
// correspond to the prefix information or link state information. This way
// we do not need to try and parse the values to tell that. For example,
// the key name could be "adj:router1" or "prefix:router2" to tell of
// the AdjacencyDatabase of router1 and PrefixDatabase of router2
//
class Decision : public OpenrEventBase {
public:
Decision(
std::shared_ptr<const Config> config,
bool computeLfaPaths,
bool bgpDryRun,
std::chrono::milliseconds debounceMinDur,
std::chrono::milliseconds debounceMaxDur,
messaging::RQueue<thrift::Publication> kvStoreUpdatesQueue,
messaging::RQueue<thrift::RouteDatabaseDelta> staticRoutesUpdateQueue,
messaging::ReplicateQueue<DecisionRouteUpdate>& routeUpdatesQueue);
virtual ~Decision() = default;
/*
* Retrieve routeDb from specified node.
* If empty nodename specified, will return routeDb of its own
*/
folly::SemiFuture<std::unique_ptr<thrift::RouteDatabase>> getDecisionRouteDb(
std::string nodeName);
folly::SemiFuture<std::unique_ptr<thrift::StaticRoutes>>
getDecisionStaticRoutes();
/*
* Retrieve AdjacencyDatabase for kDefaultArea
*/
folly::SemiFuture<std::unique_ptr<thrift::AdjDbs>> getDecisionAdjacencyDbs();
/*
* Retrieve AdjacencyDatabase for all nodes in all areas
*/
folly::SemiFuture<std::unique_ptr<std::vector<thrift::AdjacencyDatabase>>>
getAllDecisionAdjacencyDbs();
/*
* Retrieve PrefixDatabase as a map.
*/
folly::SemiFuture<std::unique_ptr<thrift::PrefixDbs>> getDecisionPrefixDbs();
/*
* Retrieve received routes along with best route selection output.
*/
folly::SemiFuture<std::unique_ptr<std::vector<thrift::ReceivedRouteDetail>>>
getReceivedRoutesFiltered(thrift::ReceivedRouteFilter filter);
/*
* Set new or replace existing RibPolicy. This will trigger the new policy
* run against computed routes and delta will be published.
*/
folly::SemiFuture<folly::Unit> setRibPolicy(
thrift::RibPolicy const& ribPolicy);
/*
* Get the current RibPolicy instance. Throws exception if RibPolicy is not
* set yet.
*/
folly::SemiFuture<thrift::RibPolicy> getRibPolicy();
// periodically called by counterUpdateTimer_, exposed publicly for testing
void updateGlobalCounters() const;
void updateCounters(
std::string key,
std::chrono::steady_clock::time_point start,
std::chrono::steady_clock::time_point end) const;
private:
Decision(Decision const&) = delete;
Decision& operator=(Decision const&) = delete;
// process publication from KvStore
void processPublication(thrift::Publication const& thriftPub);
void pushRoutesDeltaUpdates(thrift::RouteDatabaseDelta& staticRoutesDelta);
// openr config
std::shared_ptr<const Config> config_;
// callback timer used on startup to publish routes after
// gracefulRestartDuration
std::unique_ptr<folly::AsyncTimeout> coldStartTimer_{nullptr};
/**
* Rebuild all routes and send out update delta. Check current pendingUpdates_
* to decide which routes need rebuilding, otherwise rebuild all. Use
* pendingUpdates_.perfEvents() in the sent route delta appended with param
* event before rebuild and "ROUTE_UPDATE" after.
*/
void rebuildRoutes(std::string const& event);
// decremnts holds and send any resulting output, returns true if any
// linkstate has remaining holds
bool decrementOrderedFibHolds();
void sendRouteUpdate(
DecisionRouteDb&& routeDb,
std::optional<thrift::PerfEvents>&& perfEvents);
std::chrono::milliseconds getMaxFib();
// node to prefix entries database for nodes advertising per prefix keys
std::optional<thrift::PrefixDatabase> updateNodePrefixDatabase(
const std::string& key, const thrift::PrefixDatabase& prefixDb);
// cached routeDb
DecisionRouteDb routeDb_;
// Queue to publish route changes
messaging::ReplicateQueue<DecisionRouteUpdate>& routeUpdatesQueue_;
// Pointer to RibPolicy
std::unique_ptr<RibPolicy> ribPolicy_;
// Timer associated with RibPolicy. Triggered when ribPolicy is expired. This
// aims to revert the policy effects on programmed routes.
std::unique_ptr<folly::AsyncTimeout> ribPolicyTimer_;
// the pointer to the SPF path calculator
std::unique_ptr<SpfSolver> spfSolver_;
// per area link states
std::unordered_map<std::string, LinkState> areaLinkStates_;
// global prefix state
PrefixState prefixState_;
// For orderedFib prgramming, we keep track of the fib programming times
// across the network
std::unordered_map<std::string, std::chrono::milliseconds> fibTimes_;
apache::thrift::CompactSerializer serializer_;
// base interval to submit to monitor with (jitter will be added)
std::chrono::seconds monitorSyncInterval_{0};
// Timer for submitting to monitor periodically
std::unique_ptr<folly::AsyncTimeout> monitorTimer_{nullptr};
// Timer for decrementing link holds for ordered fib programming
std::unique_ptr<folly::AsyncTimeout> orderedFibTimer_{nullptr};
// Timer for updating and submitting counters periodically
std::unique_ptr<folly::AsyncTimeout> counterUpdateTimer_{nullptr};
// need to store all this for backward compatibility, otherwise a key update
// can lead to mistakenly withdrawing some prefixes
std::unordered_map<
std::string,
std::unordered_map<thrift::IpPrefix, thrift::PrefixEntry>>
perPrefixPrefixEntries_, fullDbPrefixEntries_;
// this node's name and the key markers
const std::string myNodeName_;
// store rebuildROutes to-do status and perf events
detail::DecisionPendingUpdates pendingUpdates_;
/**
* Debounced trigger for rebuildRoutes invoked by input paths kvstore update
* queue and static routes update queue
*/
AsyncDebounce<std::chrono::milliseconds> rebuildRoutesDebounced_;
};
} // namespace openr
| {
"pile_set_name": "Github"
} |
.. title:: clang-tidy - modernize-use-auto
modernize-use-auto
==================
This check is responsible for using the ``auto`` type specifier for variable
declarations to *improve code readability and maintainability*. For example:
.. code-block:: c++
std::vector<int>::iterator I = my_container.begin();
// transforms to:
auto I = my_container.begin();
The ``auto`` type specifier will only be introduced in situations where the
variable type matches the type of the initializer expression. In other words
``auto`` should deduce the same type that was originally spelled in the source.
However, not every situation should be transformed:
.. code-block:: c++
int val = 42;
InfoStruct &I = SomeObject.getInfo();
// Should not become:
auto val = 42;
auto &I = SomeObject.getInfo();
In this example using ``auto`` for builtins doesn't improve readability. In
other situations it makes the code less self-documenting impairing readability
and maintainability. As a result, ``auto`` is used only introduced in specific
situations described below.
Iterators
---------
Iterator type specifiers tend to be long and used frequently, especially in
loop constructs. Since the functions generating iterators have a common format,
the type specifier can be replaced without obscuring the meaning of code while
improving readability and maintainability.
.. code-block:: c++
for (std::vector<int>::iterator I = my_container.begin(),
E = my_container.end();
I != E; ++I) {
}
// becomes
for (auto I = my_container.begin(), E = my_container.end(); I != E; ++I) {
}
The check will only replace iterator type-specifiers when all of the following
conditions are satisfied:
* The iterator is for one of the standard container in ``std`` namespace:
* ``array``
* ``deque``
* ``forward_list``
* ``list``
* ``vector``
* ``map``
* ``multimap``
* ``set``
* ``multiset``
* ``unordered_map``
* ``unordered_multimap``
* ``unordered_set``
* ``unordered_multiset``
* ``queue``
* ``priority_queue``
* ``stack``
* The iterator is one of the possible iterator types for standard containers:
* ``iterator``
* ``reverse_iterator``
* ``const_iterator``
* ``const_reverse_iterator``
* In addition to using iterator types directly, typedefs or other ways of
referring to those types are also allowed. However, implementation-specific
types for which a type like ``std::vector<int>::iterator`` is itself a
typedef will not be transformed. Consider the following examples:
.. code-block:: c++
// The following direct uses of iterator types will be transformed.
std::vector<int>::iterator I = MyVec.begin();
{
using namespace std;
list<int>::iterator I = MyList.begin();
}
// The type specifier for J would transform to auto since it's a typedef
// to a standard iterator type.
typedef std::map<int, std::string>::const_iterator map_iterator;
map_iterator J = MyMap.begin();
// The following implementation-specific iterator type for which
// std::vector<int>::iterator could be a typedef would not be transformed.
__gnu_cxx::__normal_iterator<int*, std::vector> K = MyVec.begin();
* The initializer for the variable being declared is not a braced initializer
list. Otherwise, use of ``auto`` would cause the type of the variable to be
deduced as ``std::initializer_list``.
New expressions
---------------
Frequently, when a pointer is declared and initialized with ``new``, the
pointee type is written twice: in the declaration type and in the
``new`` expression. In this cases, the declaration type can be replaced with
``auto`` improving readability and maintainability.
.. code-block:: c++
TypeName *my_pointer = new TypeName(my_param);
// becomes
auto *my_pointer = new TypeName(my_param);
The check will also replace the declaration type in multiple declarations, if
the following conditions are satisfied:
* All declared variables have the same type (i.e. all of them are pointers to
the same type).
* All declared variables are initialized with a ``new`` expression.
* The types of all the new expressions are the same than the pointee of the
declaration type.
.. code-block:: c++
TypeName *my_first_pointer = new TypeName, *my_second_pointer = new TypeName;
// becomes
auto *my_first_pointer = new TypeName, *my_second_pointer = new TypeName;
Cast expressions
----------------
Frequently, when a variable is declared and initialized with a cast, the
variable type is written twice: in the declaration type and in the
cast expression. In this cases, the declaration type can be replaced with
``auto`` improving readability and maintainability.
.. code-block:: c++
TypeName *my_pointer = static_cast<TypeName>(my_param);
// becomes
auto *my_pointer = static_cast<TypeName>(my_param);
The check handles ``static_cast``, ``dynamic_cast``, ``const_cast``,
``reinterpret_cast``, functional casts, C-style casts and function templates
that behave as casts, such as ``llvm::dyn_cast``, ``boost::lexical_cast`` and
``gsl::narrow_cast``. Calls to function templates are considered to behave as
casts if the first template argument is explicit and is a type, and the function
returns that type, or a pointer or reference to it.
Known Limitations
-----------------
* If the initializer is an explicit conversion constructor, the check will not
replace the type specifier even though it would be safe to do so.
* User-defined iterators are not handled at this time.
Options
-------
.. option:: MinTypeNameLength
If the option is set to non-zero (default `5`), the check will ignore type
names having a length less than the option value. The option affects
expressions only, not iterators.
Spaces between multi-lexeme type names (``long int``) are considered as one.
If ``RemoveStars`` option (see below) is set to non-zero, then ``*s`` in
the type are also counted as a part of the type name.
.. code-block:: c++
// MinTypeNameLength = 0, RemoveStars=0
int a = static_cast<int>(foo()); // ---> auto a = ...
// length(bool *) = 4
bool *b = new bool; // ---> auto *b = ...
unsigned c = static_cast<unsigned>(foo()); // ---> auto c = ...
// MinTypeNameLength = 5, RemoveStars=0
int a = static_cast<int>(foo()); // ---> int a = ...
bool b = static_cast<bool>(foo()); // ---> bool b = ...
bool *pb = static_cast<bool*>(foo()); // ---> bool *pb = ...
unsigned c = static_cast<unsigned>(foo()); // ---> auto c = ...
// length(long <on-or-more-spaces> int) = 8
long int d = static_cast<long int>(foo()); // ---> auto d = ...
// MinTypeNameLength = 5, RemoveStars=1
int a = static_cast<int>(foo()); // ---> int a = ...
// length(int * * ) = 5
int **pa = static_cast<int**>(foo()); // ---> auto pa = ...
bool b = static_cast<bool>(foo()); // ---> bool b = ...
bool *pb = static_cast<bool*>(foo()); // ---> auto pb = ...
unsigned c = static_cast<unsigned>(foo()); // ---> auto c = ...
long int d = static_cast<long int>(foo()); // ---> auto d = ...
.. option:: RemoveStars
If the option is set to non-zero (default is `0`), the check will remove
stars from the non-typedef pointer types when replacing type names with
``auto``. Otherwise, the check will leave stars. For example:
.. code-block:: c++
TypeName *my_first_pointer = new TypeName, *my_second_pointer = new TypeName;
// RemoveStars = 0
auto *my_first_pointer = new TypeName, *my_second_pointer = new TypeName;
// RemoveStars = 1
auto my_first_pointer = new TypeName, my_second_pointer = new TypeName;
| {
"pile_set_name": "Github"
} |
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = true
# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy like
# NGINX, varnish or squid.
# config.action_dispatch.rack_cache = true
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config.assets.digest = true
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = :debug
# Prepend all log lines with the following tags.
# config.log_tags = [ :subdomain, :uuid ]
# Use a different logger for distributed setups.
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = 'http://assets.example.com'
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
end
| {
"pile_set_name": "Github"
} |
<mods xmlns="http://www.loc.gov/mods/v3" xmlns:exslt="http://exslt.org/common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-3.xsd" version="3.3" ID="P0b002ee18175cc57">
<name type="corporate">
<namePart>United States Government Printing Office</namePart>
<role>
<roleTerm type="text" authority="marcrelator">printer</roleTerm>
<roleTerm type="code" authority="marcrelator">prt</roleTerm>
</role>
<role>
<roleTerm type="text" authority="marcrelator">distributor</roleTerm>
<roleTerm type="code" authority="marcrelator">dst</roleTerm>
</role>
</name>
<name type="corporate">
<namePart>United States</namePart>
<namePart>United States District Court District of Nebraska</namePart>
<role>
<roleTerm type="text" authority="marcrelator">author</roleTerm>
<roleTerm type="code" authority="marcrelator">aut</roleTerm>
</role>
<description>Government Organization</description>
</name>
<typeOfResource>text</typeOfResource>
<genre authority="marcgt">government publication</genre>
<language>
<languageTerm authority="iso639-2b" type="code">eng</languageTerm>
</language>
<extension>
<collectionCode>USCOURTS</collectionCode>
<category>Judicial Publications</category>
<branch>judicial</branch>
<dateIngested>2012-01-12</dateIngested>
</extension>
<originInfo>
<publisher>Administrative Office of the United States Courts</publisher>
<dateIssued encoding="w3cdtf">2008-01-07</dateIssued>
<issuance>monographic</issuance>
</originInfo>
<physicalDescription>
<note type="source content type">deposited</note>
<digitalOrigin>born digital</digitalOrigin>
</physicalDescription>
<classification authority="sudocs">JU 4.15</classification>
<identifier type="uri">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012</identifier>
<identifier type="local">P0b002ee18175cc57</identifier>
<recordInfo>
<recordContentSource authority="marcorg">DGPO</recordContentSource>
<recordCreationDate encoding="w3cdtf">2012-01-12</recordCreationDate>
<recordChangeDate encoding="w3cdtf">2012-01-13</recordChangeDate>
<recordIdentifier source="DGPO">USCOURTS-ned-8_06-cv-00012</recordIdentifier>
<recordOrigin>machine generated</recordOrigin>
<languageOfCataloging>
<languageTerm authority="iso639-2b" type="code">eng</languageTerm>
</languageOfCataloging>
</recordInfo>
<accessCondition type="GPO scope determination">fdlp</accessCondition>
<extension>
<docClass>USCOURTS</docClass>
<accessId>USCOURTS-ned-8_06-cv-00012</accessId>
<courtType>District</courtType>
<courtCode>ned</courtCode>
<courtCircuit>8th</courtCircuit>
<courtState>Nebraska</courtState>
<courtSortOrder>2300</courtSortOrder>
<caseNumber>8:06-cv-00012</caseNumber>
<caseOffice>8 Omaha</caseOffice>
<caseType>civil</caseType>
<natureSuitCode>442</natureSuitCode>
<natureSuit>Civil Rights Employment</natureSuit>
<cause>42:12101 Americans with Disabilities Act</cause>
<party fullName="Metropolitan Utilities District" lastName="Metropolitan Utilities District" role="Defendant"></party>
<party firstName="Janice" fullName="Janice Schmidt" lastName="Schmidt" role="Plaintiff"></party>
</extension>
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<partNumber>8:06-cv-00012</partNumber>
</titleInfo>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/content-detail.html</url>
</location>
<classification authority="sudocs">JU 4.15</classification>
<identifier type="preferred citation">8:06-cv-00012;06-012</identifier>
<name type="corporate">
<namePart>United States District Court District of Nebraska</namePart>
<namePart>8th Circuit</namePart>
<namePart>8 Omaha</namePart>
<affiliation>U.S. Courts</affiliation>
<role>
<roleTerm authority="marcrelator" type="text">author</roleTerm>
<roleTerm authority="marcrelator" type="code">aut</roleTerm>
</role>
</name>
<name type="personal">
<displayForm>Metropolitan Utilities District</displayForm>
<namePart type="family">Metropolitan Utilities District</namePart>
<namePart type="given"></namePart>
<namePart type="termsOfAddress"></namePart>
<description>Defendant</description>
</name>
<name type="personal">
<displayForm>Janice Schmidt</displayForm>
<namePart type="family">Schmidt</namePart>
<namePart type="given">Janice</namePart>
<namePart type="termsOfAddress"></namePart>
<description>Plaintiff</description>
</name>
<extension>
<docClass>USCOURTS</docClass>
<accessId>USCOURTS-ned-8_06-cv-00012</accessId>
<courtType>District</courtType>
<courtCode>ned</courtCode>
<courtCircuit>8th</courtCircuit>
<courtState>Nebraska</courtState>
<courtSortOrder>2300</courtSortOrder>
<caseNumber>8:06-cv-00012</caseNumber>
<caseOffice>8 Omaha</caseOffice>
<caseType>civil</caseType>
<natureSuitCode>442</natureSuitCode>
<natureSuit>Civil Rights Employment</natureSuit>
<cause>42:12101 Americans with Disabilities Act</cause>
<party fullName="Metropolitan Utilities District" lastName="Metropolitan Utilities District" role="Defendant"></party>
<party firstName="Janice" fullName="Janice Schmidt" lastName="Schmidt" role="Plaintiff"></party>
<state>Nebraska</state>
</extension>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-0" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-0/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>AMENDED FINAL PROGRESSION ORDER granting 16 Motion to Continue Progression Schedule. Final Pretrial Conference set for 4/9/2007 at 9:00 AM; Jury Trial set for 5/15/2007 before Judge Laurie Smith Camp. Status report re settlement negotiation due 1/29/2007. Signed by Magistrate Judge F. A. Gossett on 7/17/2006. (CLS, )</subTitle>
<partNumber>0</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2006-07-17</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-0.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee181794067</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-0</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_0.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-0/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-0.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-0</accessId>
<sequenceNumber>0</sequenceNumber>
<dateIssued>2006-07-17</dateIssued>
<docketText>AMENDED FINAL PROGRESSION ORDER granting 16 Motion to Continue Progression Schedule. Final Pretrial Conference set for 4/9/2007 at 9:00 AM; Jury Trial set for 5/15/2007 before Judge Laurie Smith Camp. Status report re settlement negotiation due 1/29/2007. Signed by Magistrate Judge F. A. Gossett on 7/17/2006. (CLS, )</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-1" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-1/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>PROTECTIVE ORDER (granting Motion for Protective Order). The terms of the parties' Stipulated Protective Order 18 are hereby adopted by the court and shall become effective immediately. Signed by Magistrate Judge F. A. Gossett on 7/20/2006. (CLS, )</subTitle>
<partNumber>1</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2006-07-20</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-1.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee1817940cd</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-1</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_1.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-1/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-1.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-1</accessId>
<sequenceNumber>1</sequenceNumber>
<dateIssued>2006-07-20</dateIssued>
<docketText>PROTECTIVE ORDER (granting Motion for Protective Order). The terms of the parties' Stipulated Protective Order 18 are hereby adopted by the court and shall become effective immediately. Signed by Magistrate Judge F. A. Gossett on 7/20/2006. (CLS, )</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-2" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-2/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>n accordance with NEGenR 1.3(d). If substitute counsel does not enter an appearance by November 15, 2006, the Motion to Withdraw will be granted and the plaintiff, Janice Schmidt, will be deemed to be proceeding pro se. Moving counsel shall serve a copy of this order on the plaintiff at her last known address and shall file proof of service with the court before the close of business on November 1, 2006. Ordered by Magistrate Judge F. A. Gossett. (CLS, )SCHEDULING ORDER regarding 23 Motion to Withdraw as Attorney. The motion is held in abeyance until November 15, 2006, pending the entry of appearance of substitute counsel. The motion will be granted after substitute counsel enters an appearance i</subTitle>
<partNumber>2</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2006-10-17</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-2.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee181794063</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-2</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_2.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-2/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-2.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-2</accessId>
<sequenceNumber>2</sequenceNumber>
<dateIssued>2006-10-17</dateIssued>
<docketText>n accordance with NEGenR 1.3(d). If substitute counsel does not enter an appearance by November 15, 2006, the Motion to Withdraw will be granted and the plaintiff, Janice Schmidt, will be deemed to be proceeding pro se. Moving counsel shall serve a copy of this order on the plaintiff at her last known address and shall file proof of service with the court before the close of business on November 1, 2006. Ordered by Magistrate Judge F. A. Gossett. (CLS, )SCHEDULING ORDER regarding 23 Motion to Withdraw as Attorney. The motion is held in abeyance until November 15, 2006, pending the entry of appearance of substitute counsel. The motion will be granted after substitute counsel enters an appearance i</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-3" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-3/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>ORDER RE: TRIAL PREPARATION (Civil Jury Trial). Ordered by Judge Laurie Smith Camp. (JB)</subTitle>
<partNumber>3</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2006-11-14</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-3.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee1817940c9</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-3</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_3.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-3/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-3.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-3</accessId>
<sequenceNumber>3</sequenceNumber>
<dateIssued>2006-11-14</dateIssued>
<docketText>ORDER RE: TRIAL PREPARATION (Civil Jury Trial). Ordered by Judge Laurie Smith Camp. (JB)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-4" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-4/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>ORDER granting 23 Motion to Withdraw as Attorney. Plaintiff, Janice Schmidt, is hereby deemed to be proceeding pro se. Plaintiff is now personally responsible for prosecuting this case on her own behalf in accordance with the Federal Rules of Civil Procedure. The Clerk shall amend the records of the court to show that plaintiff is proceeding pro se and shall mail a copy of this order to Janice Schmidt at her lat know address, together with a copy of the docket sheet. Ordered by Magistrate Judge F. A. Gossett.(MKR )Copies mailed as directed to 15819 Crying Wind Drive, Tampa, Florida 33624</subTitle>
<partNumber>4</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2006-11-17</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-4.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee181794062</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-4</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_4.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-4/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-4.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-4</accessId>
<sequenceNumber>4</sequenceNumber>
<dateIssued>2006-11-17</dateIssued>
<docketText>ORDER granting 23 Motion to Withdraw as Attorney. Plaintiff, Janice Schmidt, is hereby deemed to be proceeding pro se. Plaintiff is now personally responsible for prosecuting this case on her own behalf in accordance with the Federal Rules of Civil Procedure. The Clerk shall amend the records of the court to show that plaintiff is proceeding pro se and shall mail a copy of this order to Janice Schmidt at her lat know address, together with a copy of the docket sheet. Ordered by Magistrate Judge F. A. Gossett.(MKR )Copies mailed as directed to 15819 Crying Wind Drive, Tampa, Florida 33624</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-5" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-5/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>ORDER granting 28 defendant's motion to schedule a status conference with the parties. A status conference is set for 1/11/07 at 11:00 a.m. Ordered by Magistrate Judge F. A. Gossett.(JSF)</subTitle>
<partNumber>5</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2006-12-18</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-5.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee181794060</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-5</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_5.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-5/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-5.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-5</accessId>
<sequenceNumber>5</sequenceNumber>
<dateIssued>2006-12-18</dateIssued>
<docketText>ORDER granting 28 defendant's motion to schedule a status conference with the parties. A status conference is set for 1/11/07 at 11:00 a.m. Ordered by Magistrate Judge F. A. Gossett.(JSF)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-6" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-6/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>MEMORANDUM AND ORDER that the plaintiff shall have until April 9, 2007 to respond to the defendant's Amended Motion to Compel 36; The Clerk of Court is directed to send a copy of this Memorandum and Order to the plaintiff at her last known address. Ordered by Magistrate Judge F. A. Gossett. (MKR)copies mailed as directed</subTitle>
<partNumber>6</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2007-03-19</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-6.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee1817940cc</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-6</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_6.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-6/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-6.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-6</accessId>
<sequenceNumber>6</sequenceNumber>
<dateIssued>2007-03-19</dateIssued>
<docketText>MEMORANDUM AND ORDER that the plaintiff shall have until April 9, 2007 to respond to the defendant's Amended Motion to Compel 36; The Clerk of Court is directed to send a copy of this Memorandum and Order to the plaintiff at her last known address. Ordered by Magistrate Judge F. A. Gossett. (MKR)copies mailed as directed</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-7" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-7/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>MEMORANDUM AND ORDER granting 35 and 36 Motion to Compel and Amended Motion to Compel. The Defendant's Motion for Sanctions 36 is denied without prejudice subject to reassertion at a later date. The Final Progression Order is Amended as Follows: Deposition Deadline. All depositions, whether or not they are intended to be used at trial, shall be completed by 6/15/07; and all motions for summary judgment shall be filed on or before 7/20/07. The Clerk of Court is directed to send a copy of this Memorandum and Order to the Plaintiff at her last known address. Ordered by Judge Laurie Smith Camp. COPIES MAILED (JSF)</subTitle>
<partNumber>7</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2007-04-25</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-7.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee181794066</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-7</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_7.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-7/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-7.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-7</accessId>
<sequenceNumber>7</sequenceNumber>
<dateIssued>2007-04-25</dateIssued>
<docketText>MEMORANDUM AND ORDER granting 35 and 36 Motion to Compel and Amended Motion to Compel. The Defendant's Motion for Sanctions 36 is denied without prejudice subject to reassertion at a later date. The Final Progression Order is Amended as Follows: Deposition Deadline. All depositions, whether or not they are intended to be used at trial, shall be completed by 6/15/07; and all motions for summary judgment shall be filed on or before 7/20/07. The Clerk of Court is directed to send a copy of this Memorandum and Order to the Plaintiff at her last known address. Ordered by Judge Laurie Smith Camp. COPIES MAILED (JSF)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-8" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-8/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>GENERAL ORDER 07-09 concerning the management of pro se cases including supervision of pro se staff attorneys. Except for motions filed under 28 U.S.C. § 2255, and except for death penalty cases, Judge Kopf is assigned the overall responsibility for the management of pro se cases in the District of Nebraska and all previously filed pro se cases referred to Magistrate Judge Gossett or Magistrate Judge Thalken are herewith reassigned to Magistrate Judge Piester. The clerk's office shall file this order in each pending case referred to the Pro Se Docket in CM/ECF. Ordered by Chief Judge Bataillon. (JAR)</subTitle>
<partNumber>8</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2007-07-03</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-8.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee181794068</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-8</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_8.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-8/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-8.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-8</accessId>
<sequenceNumber>8</sequenceNumber>
<dateIssued>2007-07-03</dateIssued>
<docketText>GENERAL ORDER 07-09 concerning the management of pro se cases including supervision of pro se staff attorneys. Except for motions filed under 28 U.S.C. § 2255, and except for death penalty cases, Judge Kopf is assigned the overall responsibility for the management of pro se cases in the District of Nebraska and all previously filed pro se cases referred to Magistrate Judge Gossett or Magistrate Judge Thalken are herewith reassigned to Magistrate Judge Piester. The clerk's office shall file this order in each pending case referred to the Pro Se Docket in CM/ECF. Ordered by Chief Judge Bataillon. (JAR)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-9" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-9/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>MEMORANDUM AND ORDER - That the Defendants Motion to Dismiss or in the Alternative for MonetarySanctions, Filing No. 39, is granted in part and denied in part as follows:a. Defendants motion to dismiss this case as a discovery sanction isdenied; b. That portion of Defendants motion which seeks an order awardingthe defendant its reasonable expenses, including attorney fees, incurred in the filing of this motion, is granted, and: i. The Defendant is given until August 6, 2007 to file its application for expenses and fees; ii. The Plaintiff is given until August 16, 2007 to file her responseto the application for fees; andiii. Based on these submissions, the court will enter an orderawarding the Defendant its attorney fees and expenses. Thisaward will not be taxed immediately, but will become a part ofthe eventual judgment in this case as between the parties.c. The Defendants request for an extension of the progressiondeadlines is granted, and the deposition deadline is extended toAugust 30, 2007. This case is referred to Magistrate Judge Piesterfor issuance of an amended progression order for final resolution ofthis case.d. On or before August 6, 2007, the Plaintiff shall:i. Provide Defendant with full and complete answers toInterrogatory Nos. 34 and 35; and ii. Produce all documents responsive to Document Request Nos. 4, 5, 6, and 7 or, if she claims she does not have any or all of these documents in her possession, inform the Defendant of where it can obtain the responsive documents and provide the Defendant with the proper releases to obtain any such information. e. In the event that additional information that is responsive to any of Defendants discovery requests becomes available to Plaintiff, including but not limited to information responsive to Interrogatory No. 29, this information shall be disclosed to the Defendant at least five days prior to Plaintiffs deposition, or in the event no deposition is scheduled, five days prior to the deposition deadline. f. Absent good cause shown, the Plaintiff is barred from using any information not disclosed to the defendant in compliance with this order. The Plaintiffs Motion to Compel (Filing No. 40) is denied; The Plaintiffs Motion for Clarification (Filing No. 47) is denied as moot and; The Clerk of Court is directed to send a copy of this Memorandum and Order to the Plaintiff at her last known address. Deposition deadline set for 8/30/2007. Ordered by Judge Laurie Smith Camp. (MKR)Copies mailed as directed.</subTitle>
<partNumber>9</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2007-07-26</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-9.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee181794061</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-9</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_9.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-9/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-9.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-9</accessId>
<sequenceNumber>9</sequenceNumber>
<dateIssued>2007-07-26</dateIssued>
<docketText>MEMORANDUM AND ORDER - That the Defendants Motion to Dismiss or in the Alternative for MonetarySanctions, Filing No. 39, is granted in part and denied in part as follows:a. Defendants motion to dismiss this case as a discovery sanction isdenied; b. That portion of Defendants motion which seeks an order awardingthe defendant its reasonable expenses, including attorney fees, incurred in the filing of this motion, is granted, and: i. The Defendant is given until August 6, 2007 to file its application for expenses and fees; ii. The Plaintiff is given until August 16, 2007 to file her responseto the application for fees; andiii. Based on these submissions, the court will enter an orderawarding the Defendant its attorney fees and expenses. Thisaward will not be taxed immediately, but will become a part ofthe eventual judgment in this case as between the parties.c. The Defendants request for an extension of the progressiondeadlines is granted, and the deposition deadline is extended toAugust 30, 2007. This case is referred to Magistrate Judge Piesterfor issuance of an amended progression order for final resolution ofthis case.d. On or before August 6, 2007, the Plaintiff shall:i. Provide Defendant with full and complete answers toInterrogatory Nos. 34 and 35; and ii. Produce all documents responsive to Document Request Nos. 4, 5, 6, and 7 or, if she claims she does not have any or all of these documents in her possession, inform the Defendant of where it can obtain the responsive documents and provide the Defendant with the proper releases to obtain any such information. e. In the event that additional information that is responsive to any of Defendants discovery requests becomes available to Plaintiff, including but not limited to information responsive to Interrogatory No. 29, this information shall be disclosed to the Defendant at least five days prior to Plaintiffs deposition, or in the event no deposition is scheduled, five days prior to the deposition deadline. f. Absent good cause shown, the Plaintiff is barred from using any information not disclosed to the defendant in compliance with this order. The Plaintiffs Motion to Compel (Filing No. 40) is denied; The Plaintiffs Motion for Clarification (Filing No. 47) is denied as moot and; The Clerk of Court is directed to send a copy of this Memorandum and Order to the Plaintiff at her last known address. Deposition deadline set for 8/30/2007. Ordered by Judge Laurie Smith Camp. (MKR)Copies mailed as directed.</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-10" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-10/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>ORDER on the defendant's 51 MOTION for Attorney Fees and the plaintiff's reply to defendant's motion55: The defendant is awarded, and plaintiff is ordered to pay, $701.00; and This award will not be taxed immediately, but will become a part of the eventual judgment in this case as between the parties. Ordered by Judge Laurie Smith Camp. (MKR)</subTitle>
<partNumber>10</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2007-09-13</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-10.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee181794064</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-10</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_10.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-10/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-10.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-10</accessId>
<sequenceNumber>10</sequenceNumber>
<dateIssued>2007-09-13</dateIssued>
<docketText>ORDER on the defendant's 51 MOTION for Attorney Fees and the plaintiff's reply to defendant's motion55: The defendant is awarded, and plaintiff is ordered to pay, $701.00; and This award will not be taxed immediately, but will become a part of the eventual judgment in this case as between the parties. Ordered by Judge Laurie Smith Camp. (MKR)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-11" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-11/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>MEMORANDUM AND ORDER- By September 26, 2007, defendant shall provide the court with a listing of all discovery requested by the plaintiff as of the date of this order, and as to those discovery requests for which no objection was raised, a statement signed under oath stating that full and complete responses to these discovery requests have been provided to plaintiff; and The Clerk of court is directed to set a pro se case management deadline using the following language: Defendants listing of discovery due by September 26, 2007. ***Pro Se Case Management Deadlines: Pro Se Case Management Deadline set for 9/26/2007 (Defendant's listing of discovery due by September 26, 2007). Ordered by Judge Laurie Smith Camp. (MKR) copies mailed to plaintiff</subTitle>
<partNumber>11</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2007-09-18</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-11.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee1817940ce</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-11</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_11.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-11/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-11.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-11</accessId>
<sequenceNumber>11</sequenceNumber>
<dateIssued>2007-09-18</dateIssued>
<docketText>MEMORANDUM AND ORDER- By September 26, 2007, defendant shall provide the court with a listing of all discovery requested by the plaintiff as of the date of this order, and as to those discovery requests for which no objection was raised, a statement signed under oath stating that full and complete responses to these discovery requests have been provided to plaintiff; and The Clerk of court is directed to set a pro se case management deadline using the following language: Defendants listing of discovery due by September 26, 2007. ***Pro Se Case Management Deadlines: Pro Se Case Management Deadline set for 9/26/2007 (Defendant's listing of discovery due by September 26, 2007). Ordered by Judge Laurie Smith Camp. (MKR) copies mailed to plaintiff</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-12" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-12/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>s to cross motions for summary judgment. Pro Se Case Management Deadlines: Pro Se Case Management Deadline set for 11/8/2007 - deadline for responses to cross motions for summary judgment. Ordered by Judge Laurie Smith Camp. (Copies mailed to pro se party)(JAE, )MEMORANDUM AND ORDER - The plaintiff's response to defendant's motion, 63, and the defendant's response to the plaintiff's motion, 67, shall be filedon or before November 8, 2007, at which time these motions will be deemedfully submitted. No reply brief shall be filed except upon leave of the court for good cause shown. The Clerk of the court is directed to set a pro se case management deadline in this case using the following text: November 8, 2007deadline for response</subTitle>
<partNumber>12</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2007-10-18</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-12.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee18179405f</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-12</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_12.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-12/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-12.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-12</accessId>
<sequenceNumber>12</sequenceNumber>
<dateIssued>2007-10-18</dateIssued>
<docketText>s to cross motions for summary judgment. Pro Se Case Management Deadlines: Pro Se Case Management Deadline set for 11/8/2007 - deadline for responses to cross motions for summary judgment. Ordered by Judge Laurie Smith Camp. (Copies mailed to pro se party)(JAE, )MEMORANDUM AND ORDER - The plaintiff's response to defendant's motion, 63, and the defendant's response to the plaintiff's motion, 67, shall be filedon or before November 8, 2007, at which time these motions will be deemedfully submitted. No reply brief shall be filed except upon leave of the court for good cause shown. The Clerk of the court is directed to set a pro se case management deadline in this case using the following text: November 8, 2007deadline for response</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-13" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-13/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>MEMORANDUM AND ORDER - The pretrial conference in this matter, currently set to take place on November 20, 2007, at 9:00 a.m., shall be continued until further order of the court; The trial in this matter, currently set to begin December 11, 2007, at 9:00 a.m., shall be continued until further order of court; The courts memorandum, order, and judgment granting Defendants motion for summary judgment 63 and 67 shall be issued within 30 days of the date of this order; and The Clerk of the court is directed to provide a copy of this memorandum andorder to Magistrate Judge Piester. Ordered by Judge Laurie Smith Camp. (Copies mailed to pro se party and Magistrate Judge Piester as directed)(MKR)</subTitle>
<partNumber>13</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2007-11-15</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-13.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee1817940cb</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-13</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_13.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-13/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-13.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-13</accessId>
<sequenceNumber>13</sequenceNumber>
<dateIssued>2007-11-15</dateIssued>
<docketText>MEMORANDUM AND ORDER - The pretrial conference in this matter, currently set to take place on November 20, 2007, at 9:00 a.m., shall be continued until further order of the court; The trial in this matter, currently set to begin December 11, 2007, at 9:00 a.m., shall be continued until further order of court; The courts memorandum, order, and judgment granting Defendants motion for summary judgment 63 and 67 shall be issued within 30 days of the date of this order; and The Clerk of the court is directed to provide a copy of this memorandum andorder to Magistrate Judge Piester. Ordered by Judge Laurie Smith Camp. (Copies mailed to pro se party and Magistrate Judge Piester as directed)(MKR)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-14" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-14/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>MEMORANDUM AND ORDER - Defendant Metropolitan Utilities Districts motion for summary judgment (filing no. 63) is granted as set forth in this memorandum and order. All claims against Defendant are dismissed with prejudice; Plaintiff Janice Schmidts motion for summary judgment (filing no. 67) is denied; A separate judgment will be entered in accordance with this memorandum and order; and The Clerk of the court is directed to send a copy of this memorandum andorder and the judgment to Plaintiff at her last known address. Ordered by Judge Laurie Smith Camp. (Copies mailed to pro se party)(MKR)</subTitle>
<partNumber>14</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2007-11-29</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-14.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee1817940ca</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-14</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_14.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-14/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-14.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-14</accessId>
<sequenceNumber>14</sequenceNumber>
<dateIssued>2007-11-29</dateIssued>
<docketText>MEMORANDUM AND ORDER - Defendant Metropolitan Utilities Districts motion for summary judgment (filing no. 63) is granted as set forth in this memorandum and order. All claims against Defendant are dismissed with prejudice; Plaintiff Janice Schmidts motion for summary judgment (filing no. 67) is denied; A separate judgment will be entered in accordance with this memorandum and order; and The Clerk of the court is directed to send a copy of this memorandum andorder and the judgment to Plaintiff at her last known address. Ordered by Judge Laurie Smith Camp. (Copies mailed to pro se party)(MKR)</docketText>
</extension>
</relatedItem>
<relatedItem type="constituent" ID="id-USCOURTS-ned-8_06-cv-00012-15" xlink:href="http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-15/mods.xml">
<titleInfo>
<title>Schmidt v. Metropolitan Utilities District</title>
<subTitle>ORDER denying 79 the Plaintiff's Motion for Reconsideration of the Memorandum and Order 75. Ordered by Judge Laurie Smith Camp. (Copy mailed to pro se party)(MKR) Modified on 1/8/2008 to correct filing number (MKR).</subTitle>
<partNumber>15</partNumber>
</titleInfo>
<originInfo>
<dateIssued>2008-01-07</dateIssued>
</originInfo>
<relatedItem xlink:href="http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ned-8_06-cv-00012-15.pdf" type="otherFormat">
<identifier type="FDsys Unique ID">D09002ee181794065</identifier>
</relatedItem>
<identifier type="uri">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-15</identifier>
<identifier type="former granule identifier">ned-8_06-cv-00012_15.pdf</identifier>
<location>
<url access="object in context" displayLabel="Content Detail">http://www.gpo.gov/fdsys/granule/USCOURTS-ned-8_06-cv-00012/USCOURTS-ned-8_06-cv-00012-15/content-detail.html</url>
<url access="raw object" displayLabel="PDF rendition">http://www.gpo.gov/fdsys/pkg/USCOURTS-ned-8_06-cv-00012/pdf/USCOURTS-ned-8_06-cv-00012-15.pdf</url>
</location>
<extension>
<searchTitle>USCOURTS 8:06-cv-00012; Schmidt v. Metropolitan Utilities District; </searchTitle>
<courtName>United States District Court District of Nebraska</courtName>
<state>Nebraska</state>
<accessId>USCOURTS-ned-8_06-cv-00012-15</accessId>
<sequenceNumber>15</sequenceNumber>
<dateIssued>2008-01-07</dateIssued>
<docketText>ORDER denying 79 the Plaintiff's Motion for Reconsideration of the Memorandum and Order 75. Ordered by Judge Laurie Smith Camp. (Copy mailed to pro se party)(MKR) Modified on 1/8/2008 to correct filing number (MKR).</docketText>
</extension>
</relatedItem>
</mods> | {
"pile_set_name": "Github"
} |
/*
* Copyright 2011-2015 B2i Healthcare Pte Ltd, http://b2i.sg
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.b2international.commons.validation;
import java.util.Collection;
import java.util.Set;
import javax.validation.ConstraintViolation;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Ordering;
import com.google.common.collect.Sets;
/**
* @since 3.4
*/
public class ConstraintViolations {
private ConstraintViolations() {
}
/**
* Formats the given {@link ConstraintViolation} to a readable format.
*
* @param violation
* @return
*/
public static <T> String format(ConstraintViolation<T> violation) {
return String.format("'%s' %s (was '%s')", violation.getPropertyPath(), violation.getMessage(),
violation.getInvalidValue());
}
/**
* Formats the given set of {@link ConstraintViolation} to a list of
* readable format.
*
* @param violations
* @return
*/
public static ImmutableList<String> format(Collection<? extends ConstraintViolation<?>> violations) {
final Set<String> errors = Sets.newHashSet();
for (ConstraintViolation<?> v : violations) {
errors.add(format(v));
}
return ImmutableList.copyOf(Ordering.natural().sortedCopy(errors));
}
} | {
"pile_set_name": "Github"
} |
Akeneo\Tool\Bundle\MeasureBundle\Application\SaveMeasurementFamily\SaveMeasurementFamilyCommand:
group_sequence:
- SaveMeasurementFamilyCommand
- other_constraints
properties:
code:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\Common\Code: ~
labels:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\Common\LabelCollection: ~
units:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\MeasurementFamily\UnitCount: ~
- Akeneo\Tool\Bundle\MeasureBundle\Validation\MeasurementFamily\ShouldNotContainDuplicatedUnits: ~
- All:
- Collection:
fields:
code:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\Common\Code: ~
labels:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\Common\LabelCollection: ~
symbol:
- Type: string
- Length:
max: 255
convert_from_standard:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\MeasurementFamily\OperationCount: ~
- All:
- Collection:
fields:
operator:
- NotBlank: ~
- Type: string
- Choice:
choices: [mul, div, add, sub]
message: pim_measurements.validation.measurement_family.units.operation.invalid_operator
value:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\MeasurementFamily\OperationValue: ~
constraints:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\SaveMeasurementFamily\StandardUnitCodeShouldExist: ~
- Akeneo\Tool\Bundle\MeasureBundle\Validation\SaveMeasurementFamily\StandardUnitCodeCannotBeChanged: { groups: [other_constraints] }
- Akeneo\Tool\Bundle\MeasureBundle\Validation\SaveMeasurementFamily\StandardUnitCodeOperationShouldBeMultiplyByOne: { groups: [other_constraints] }
- Akeneo\Tool\Bundle\MeasureBundle\Validation\SaveMeasurementFamily\WhenUsedInAProductAttributeShouldBeAbleToUpdateOnlyLabelsAndSymbolAndAddUnits: { groups: [other_constraints] }
- Akeneo\Tool\Bundle\MeasureBundle\Validation\SaveMeasurementFamily\Count: { groups: [other_constraints] }
Akeneo\Tool\Bundle\MeasureBundle\Application\CreateMeasurementFamily\CreateMeasurementFamilyCommand:
group_sequence:
- CreateMeasurementFamilyCommand
- other_constraints
properties:
code:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\Common\Code: ~
- Akeneo\Tool\Bundle\MeasureBundle\Validation\MeasurementFamily\CodeMustBeUnique: { groups: [other_constraints] }
labels:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\Common\LabelCollection: ~
units:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\MeasurementFamily\UnitCount: ~
- Akeneo\Tool\Bundle\MeasureBundle\Validation\MeasurementFamily\ShouldNotContainDuplicatedUnits: ~
- All:
- Collection:
fields:
code:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\Common\Code: ~
labels:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\Common\LabelCollection: ~
symbol:
- Type: string
- Length:
max: 255
convert_from_standard:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\MeasurementFamily\OperationCount: ~
- All:
- Collection:
fields:
operator:
- NotBlank: ~
- Type: string
- Choice:
choices: [mul, div, add, sub]
message: pim_measurements.validation.measurement_family.units.operation.invalid_operator
value:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\MeasurementFamily\OperationValue: ~
constraints:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\CreateMeasurementFamily\StandardUnitCodeShouldExist: ~
- Akeneo\Tool\Bundle\MeasureBundle\Validation\CreateMeasurementFamily\StandardUnitCodeCannotBeChanged: { groups: [other_constraints] }
- Akeneo\Tool\Bundle\MeasureBundle\Validation\CreateMeasurementFamily\StandardUnitCodeOperationShouldBeMultiplyByOne: { groups: [other_constraints] }
- Akeneo\Tool\Bundle\MeasureBundle\Validation\CreateMeasurementFamily\WhenUsedInAProductAttributeShouldBeAbleToUpdateOnlyLabelsAndSymbolAndAddUnits: { groups: [other_constraints] }
- Akeneo\Tool\Bundle\MeasureBundle\Validation\CreateMeasurementFamily\Count: { groups: [other_constraints] }
Akeneo\Tool\Bundle\MeasureBundle\Application\DeleteMeasurementFamily\DeleteMeasurementFamilyCommand:
constraints:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\DeleteMeasurementFamily\ShouldNotBeUsedByProductAttribute: ~
Akeneo\Tool\Bundle\MeasureBundle\Application\ValidateUnit\ValidateUnitCommand:
group_sequence:
- ValidateUnitCommand
- other_constraints
constraints:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\Unit\CodeMustBeUnique: { groups: [other_constraints] }
properties:
code:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\Common\Code: ~
labels:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\Common\LabelCollection: ~
symbol:
- Type: string
- Length:
max: 255
convert_from_standard:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\MeasurementFamily\OperationCount: ~
- All:
- Collection:
fields:
operator:
- NotBlank: ~
- Type: string
- Choice:
choices: [mul, div, add, sub]
message: pim_measurements.validation.measurement_family.units.operation.invalid_operator
value:
- Akeneo\Tool\Bundle\MeasureBundle\Validation\MeasurementFamily\OperationValue: ~
| {
"pile_set_name": "Github"
} |
{
"Log in": "Iniciar sesión"
} | {
"pile_set_name": "Github"
} |
from __future__ import print_function
from sklearn.cross_validation import train_test_split
import pandas as pd
import numpy as np
np.random.seed(1337) # for reproducibility
from keras.preprocessing import sequence
from keras.utils import np_utils
from keras.models import Sequential
from keras.layers import Dense, Dropout, Activation, Embedding
from keras.layers import LSTM, SimpleRNN, GRU
from keras.datasets import imdb
from keras.utils.np_utils import to_categorical
from sklearn.metrics import (precision_score, recall_score,
f1_score, accuracy_score,mean_squared_error,mean_absolute_error)
from sklearn import metrics
from sklearn.preprocessing import Normalizer
import h5py
from keras import callbacks
from keras import callbacks
from keras.callbacks import ModelCheckpoint, EarlyStopping, ReduceLROnPlateau, CSVLogger
traindata = pd.read_csv('kdd/multiclass/kddtrain.csv', header=None)
testdata = pd.read_csv('kdd/multiclass/kddtest.csv', header=None)
X = traindata.iloc[:,1:42]
Y = traindata.iloc[:,0]
C = testdata.iloc[:,0]
T = testdata.iloc[:,1:42]
scaler = Normalizer().fit(X)
trainX = scaler.transform(X)
# summarize transformed data
np.set_printoptions(precision=3)
#print(trainX[0:5,:])
scaler = Normalizer().fit(T)
testT = scaler.transform(T)
# summarize transformed data
np.set_printoptions(precision=3)
#print(testT[0:5,:])
y_train1 = np.array(Y)
y_test1 = np.array(C)
y_train= to_categorical(y_train1)
y_test= to_categorical(y_test1)
# reshape input to be [samples, time steps, features]
X_train = np.reshape(trainX, (trainX.shape[0], 1, trainX.shape[1]))
X_test = np.reshape(testT, (testT.shape[0], 1, testT.shape[1]))
batch_size = 32
# 1. define the network
model = Sequential()
model.add(LSTM(4,input_dim=41)) # try using a GRU instead, for fun
model.add(Dropout(0.1))
model.add(Dense(5))
model.add(Activation('softmax'))
# try using different optimizers and different optimizer configs
model.compile(loss='categorical_crossentropy',optimizer='adam',metrics=['accuracy'])
checkpointer = callbacks.ModelCheckpoint(filepath="kddresults/lstm1layer/checkpoint-{epoch:02d}.hdf5", verbose=1, save_best_only=True, monitor='val_acc',mode='max')
csv_logger = CSVLogger('training_set_iranalysis.csv',separator=',', append=False)
model.fit(X_train, y_train, batch_size=batch_size, nb_epoch=1000, validation_data=(X_test, y_test),callbacks=[checkpointer,csv_logger])
model.save("kddresults/lstm1layer/fullmodel/lstm1layer_model.hdf5")
loss, accuracy = model.evaluate(X_test, y_test)
print("\nLoss: %.2f, Accuracy: %.2f%%" % (loss, accuracy*100))
y_pred = model.predict_classes(X_test)
np.savetxt('kddresults/lstm1layer/lstm1predicted.txt', np.transpose([y_test1,y_pred]), fmt='%01d')
| {
"pile_set_name": "Github"
} |
<!-- START - We recommend to place the below code in head tag of your website html -->
<style>
@font-face {
font-display: block;
font-family: Roboto;
src: url(https://assets.sendinblue.com/font/Roboto/Latin/normal/normal/7529907e9eaf8ebb5220c5f9850e3811.woff2) format("woff2"), url(https://assets.sendinblue.com/font/Roboto/Latin/normal/normal/25c678feafdc175a70922a116c9be3e7.woff) format("woff")
}
@font-face {
font-display: fallback;
font-family: Roboto;
font-weight: 600;
src: url(https://assets.sendinblue.com/font/Roboto/Latin/medium/normal/6e9caeeafb1f3491be3e32744bc30440.woff2) format("woff2"), url(https://assets.sendinblue.com/font/Roboto/Latin/medium/normal/71501f0d8d5aa95960f6475d5487d4c2.woff) format("woff")
}
@font-face {
font-display: fallback;
font-family: Roboto;
font-weight: 700;
src: url(https://assets.sendinblue.com/font/Roboto/Latin/bold/normal/3ef7cf158f310cf752d5ad08cd0e7e60.woff2) format("woff2"), url(https://assets.sendinblue.com/font/Roboto/Latin/bold/normal/ece3a1d82f18b60bcce0211725c476aa.woff) format("woff")
}
#sib-container input:-ms-input-placeholder {
text-align: left;
font-family: "Helvetica", sans-serif;
color: #c0ccda;
border-width: px;
}
#sib-container input::placeholder {
text-align: left;
font-family: "Helvetica", sans-serif;
color: #c0ccda;
border-width: px;
}
</style>
<link rel="stylesheet" href="https://assets.sendinblue.com/component/form/2ef8d8058c0694a305b0.css">
<link rel="stylesheet" href="https://assets.sendinblue.com/component/clickable/b056d6397f4ba3108595.css">
<link rel="stylesheet" href="https://sibforms.com/forms/end-form/build/sib-styles.css">
<!-- END - We recommend to place the above code in head tag of your website html -->
<!-- START - We recommend to place the below code where you want the form in your website html -->
<!-- background-color: #EFF2F7; -->
<div class="sib-form" style="text-align: center;">
<div id="sib-form-container" class="sib-form-container">
<div id="error-message" class="sib-form-message-panel" style=" font-size:16px; text-align:left; font-family:"Helvetica", sans-serif; color:#661d1d; background-color:#ffeded; border-radius:3px; border-width:px; border-color:#ff4949; max-width:540px; border-width:px;">
<div class="sib-form-message-panel__text sib-form-message-panel__text--center">
<svg viewbox="0 0 512 512" class="sib-icon sib-notification__icon">
<path d="M256 40c118.621 0 216 96.075 216 216 0 119.291-96.61 216-216 216-119.244 0-216-96.562-216-216 0-119.203 96.602-216 216-216m0-32C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm-11.49 120h22.979c6.823 0 12.274 5.682 11.99 12.5l-7 168c-.268 6.428-5.556 11.5-11.99 11.5h-8.979c-6.433 0-11.722-5.073-11.99-11.5l-7-168c-.283-6.818 5.167-12.5 11.99-12.5zM256 340c-15.464 0-28 12.536-28 28s12.536 28 28 28 28-12.536 28-28-12.536-28-28-28z"
/>
</svg>
<span class="sib-form-message-panel__inner-text">
Din tilmelding kunne ikke bekræftes
</span>
</div>
</div>
<div></div>
<div id="success-message" class="sib-form-message-panel" style=" font-size:16px; text-align:left; font-family:"Helvetica", sans-serif; color:#085229; background-color:#e7faf0; border-radius:3px; border-width:px; border-color:#13ce66; max-width:540px; border-width:px;">
<div class="sib-form-message-panel__text sib-form-message-panel__text--center">
<svg viewbox="0 0 512 512" class="sib-icon sib-notification__icon">
<path d="M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 464c-118.664 0-216-96.055-216-216 0-118.663 96.055-216 216-216 118.664 0 216 96.055 216 216 0 118.663-96.055 216-216 216zm141.63-274.961L217.15 376.071c-4.705 4.667-12.303 4.637-16.97-.068l-85.878-86.572c-4.667-4.705-4.637-12.303.068-16.97l8.52-8.451c4.705-4.667 12.303-4.637 16.97.068l68.976 69.533 163.441-162.13c4.705-4.667 12.303-4.637 16.97.068l8.451 8.52c4.668 4.705 4.637 12.303-.068 16.97z"
/>
</svg>
<span class="sib-form-message-panel__inner-text">
Din tilmelding er bekræftet.
</span>
</div>
</div>
<div></div>
<div id="sib-container" class="sib-container--large sib-container--vertical" style=" text-align:center; background-color:rgba(255,255,255,1); max-width:540px; border-radius:3px; border-width:1px; border-color:#C0CCD9; border-style:solid;">
<form id="sib-form" method="POST" action="https://sibforms.com/serve/MUIEAGCuaaKTrUOt-bPcoTck9Rk4J5PtAPUh01Hx-PqT88Bru99ACRxI2W7I8FHKP02D3hGOoXMixTa0dDhd4Y8Ve5C9AHVEJ7mVVFFl3olccq9xxXZYt2DLP8D0od72hff_zOPYgS_sYBun8AiF9UqasToOz0hlx8ziiA4C7fWNlJdrJnS7bLV3A3wjOC-5HzR0S2GFk56Qgzwv"
data-type="subscription">
<div style="padding: 16px 0;">
<div class="sib-form-block" style=" font-size:32px; text-align:left; font-weight:700; font-family:"Helvetica", sans-serif; color:#3C4858; background-color:transparent; border-width:px;">
<p>Nyhedsbrev til journalister</p>
</div>
</div>
<div style="padding: 16px 0;">
<div class="sib-form-block" style=" font-size:16px; text-align:left; font-family:"Helvetica", sans-serif; color:#3C4858; background-color:transparent; border-width:px;">
<div class="sib-text-form-block">
<p>Abonnér på nyhedsbrevet for at følge seneste nyt. Vi er en forening, og vores eneste formål er at spare dig tid. Vi vil kun sende dig nyheder, du kan bruge til dit journalistiske arbejde.</p>
</div>
</div>
</div>
<div style="padding: 16px 0;">
<div class="sib-input sib-form-block">
<div class="form__entry entry_block">
<div class="form__label-row ">
<label class="entry__label" style=" font-size:16px; text-align:left; font-weight:700; font-family:"Helvetica", sans-serif; color:#3c4858; border-width:px;" for="EMAIL" data-required="*">
Angiv din e-mail for at tilmelde
</label>
<!-- <div class="entry__field"> -->
<input class="input" maxlength="200" type="email" id="EMAIL" name="EMAIL" autocomplete="off" placeholder="E-MAIL" data-required="true" required />
<!-- </div> -->
</div>
<label class="entry__error entry__error--primary" style=" font-size:16px; text-align:left; font-family:"Helvetica", sans-serif; color:#661d1d; background-color:#ffeded; border-radius:3px; border-width:px; border-color:#ff4949;">
</label>
<label class="entry__specification" style=" font-size:12px; text-align:left; font-family:"Helvetica", sans-serif; color:#8390A4; border-width:px;">
Angiv din e-mail for at tilmelde. Ex: [email protected]
</label>
</div>
</div>
</div>
<div style="padding: 16px 0;">
<div class="sib-form-block" style="text-align: left">
<button class="sib-form-block__button" style=" font-size:16px; text-align:left; font-weight:700; font-family:"Helvetica", sans-serif; color:#FFFFFF; background-color:#3E4857; border-radius:3px; border-width:0px;" form="sib-form" type="submit">
ABONNÉR
</button>
<div class="sib-loader" style="display: none;">
<div style="background: #3E4857;"></div>
<div style="background: #3E4857;"></div>
<div style="background: #3E4857;"></div>
<div style="background: #3E4857;"></div>
<div style="background: #3E4857;"></div>
<div style="background: #3E4857;"></div>
<div style="background: #3E4857;"></div>
<div style="background: #3E4857;"></div>
<div style="background: #3E4857;"></div>
<div style="background: #3E4857;"></div>
<div style="background: #3E4857;"></div>
<div style="background: #3E4857;"></div>
</div>
</div>
</div>
<div style="padding: 16px 0;">
<div class="sib-form-block" style=" font-size:14px; text-align:center; font-family:"Helvetica", sans-serif; color:#333; background-color:transparent; border-width:px;">
<div class="sib-text-form-block">
<p>
<a href="/legal" target="_blank">Betingelser og Fortrolighed</a>
</p>
</div>
</div>
</div>
<input type="text" name="email_address_check" value="" class="input--hidden">
<input type="hidden" name="locale" value="en">
</form>
</div>
</div>
</div>
<!-- END - We recommend to place the below code where you want the form in your website html -->
<!-- START - We recommend to place the below code in footer or bottom of your website html -->
<script>
window.REQUIRED_CODE_ERROR_MESSAGE = 'Veuillez choisir un code pays';
window.EMAIL_INVALID_MESSAGE = window.SMS_INVALID_MESSAGE = "The information you provided is not valid. Please check the format of the field and try again.";
window.REQUIRED_ERROR_MESSAGE = "You must fill in this field. ";
window.GENERIC_INVALID_MESSAGE = "The information you provided is not valid. Please check the format of the field and try again.";
window.translation = {
common: {
selectedList: '{quantity} liste sélectionnée',
selectedLists: '{quantity} listes sélectionnées'
}
};
var AUTOHIDE = Boolean(0);
</script>
<script src="https://sibforms.com/forms/end-form/build/main.js">
</script>
<script src="https://www.google.com/recaptcha/api.js"></script>
<!-- END - We recommend to place the above code in footer or bottom of your website html -->
<!-- End Sendinblue Form -->
| {
"pile_set_name": "Github"
} |
var fs = require('graceful-fs')
var path = require('path')
var mkdirp = require('mkdirp')
var mr = require('npm-registry-mock')
var osenv = require('osenv')
var rimraf = require('rimraf')
var test = require('tap').test
var common = require('../common-tap')
var pkg = path.resolve(__dirname, 'ls-depth-cli')
var EXEC_OPTS = { cwd: pkg }
var json = {
name: 'ls-depth-cli',
version: '0.0.0',
dependencies: {
'test-package-with-one-dep': '0.0.0'
}
}
test('setup', function (t) {
cleanup()
mkdirp.sync(pkg)
fs.writeFileSync(
path.join(pkg, 'package.json'),
JSON.stringify(json, null, 2)
)
mr({ port: common.port }, function (er, s) {
common.npm(
[
'--registry', common.registry,
'install'
],
EXEC_OPTS,
function (er, c) {
t.ifError(er, 'setup installation ran without issue')
t.equal(c, 0)
s.close()
t.end()
}
)
})
})
test('npm ls --depth=0', function (t) {
common.npm(
['ls', '--depth=0'],
EXEC_OPTS,
function (er, c, out) {
t.ifError(er, 'npm ls ran without issue')
t.equal(c, 0, 'ls ran without raising error code')
t.has(
out,
/test-package-with-one-dep@0\.0\.0/,
'output contains [email protected]'
)
t.doesNotHave(
out,
/test-package@0\.0\.0/,
'output not contains [email protected]'
)
t.end()
}
)
})
test('npm ls --depth=1', function (t) {
common.npm(
['ls', '--depth=1'],
EXEC_OPTS,
function (er, c, out) {
t.ifError(er, 'npm ls ran without issue')
t.equal(c, 0, 'ls ran without raising error code')
t.has(
out,
/test-package-with-one-dep@0\.0\.0/,
'output contains [email protected]'
)
t.has(
out,
/test-package@0\.0\.0/,
'output contains [email protected]'
)
t.end()
}
)
})
test('npm ls --depth=Infinity', function (t) {
// travis has a preconfigured depth=0, in general we can not depend
// on the default value in all environments, so explictly set it here
common.npm(
['ls', '--depth=Infinity'],
EXEC_OPTS,
function (er, c, out) {
t.ifError(er, 'npm ls ran without issue')
t.equal(c, 0, 'ls ran without raising error code')
t.has(
out,
/test-package-with-one-dep@0\.0\.0/,
'output contains [email protected]'
)
t.has(
out,
/test-package@0\.0\.0/,
'output contains [email protected]'
)
t.end()
}
)
})
test('npm ls --depth=0 --json', function (t) {
common.npm(
['ls', '--depth=0', '--json'],
EXEC_OPTS,
function (er, c, out) {
t.ifError(er, 'npm ls ran without issue')
t.equal(c, 0, 'ls ran without raising error code')
t.has(
out,
/test-package-with-one-dep@0\.0\.0/,
'output contains [email protected]'
)
t.doesNotHave(
out,
/test-package@0\.0\.0/,
'output not contains [email protected]'
)
t.end()
}
)
})
test('npm ls --depth=Infinity --json', function (t) {
// travis has a preconfigured depth=0, in general we can not depend
// on the default value in all environments, so explictly set it here
common.npm(
['ls', '--depth=Infinity', '--json'],
EXEC_OPTS,
function (er, c, out) {
t.ifError(er, 'npm ls ran without issue')
t.equal(c, 0, 'ls ran without raising error code')
t.has(
out,
/test-package-with-one-dep@0\.0\.0/,
'output contains [email protected]'
)
t.has(
out,
/test-package@0\.0\.0/,
'output contains [email protected]'
)
t.end()
}
)
})
test('npm ls --depth=0 --parseable --long', function (t) {
common.npm(
['ls', '--depth=0', '--parseable', '--long'],
EXEC_OPTS,
function (er, c, out) {
t.ifError(er, 'npm ls ran without issue')
t.equal(c, 0, 'ls ran without raising error code')
t.has(
out,
/.*test-package-with-one-dep@0\.0\.0/,
'output contains test-package-with-one-dep'
)
t.doesNotHave(
out,
/.*test-package@0\.0\.0/,
'output not contains test-package'
)
t.end()
}
)
})
test('npm ls --depth=1 --parseable --long', function (t) {
common.npm(
['ls', '--depth=1', '--parseable', '--long'],
EXEC_OPTS,
function (er, c, out) {
t.ifError(er, 'npm ls ran without issue')
t.equal(c, 0, 'ls ran without raising error code')
t.has(
out,
/.*test-package-with-one-dep@0\.0\.0/,
'output contains test-package-with-one-dep'
)
t.has(
out,
/.*test-package@0\.0\.0/,
'output not contains test-package'
)
t.end()
}
)
})
test('cleanup', function (t) {
cleanup()
t.end()
})
function cleanup () {
process.chdir(osenv.tmpdir())
rimraf.sync(pkg)
}
| {
"pile_set_name": "Github"
} |
/*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright 2015 The ZAP Development Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.parosproxy.paros.db.paros;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.parosproxy.paros.db.DatabaseException;
import org.parosproxy.paros.db.DbUtils;
import org.parosproxy.paros.db.RecordContext;
import org.parosproxy.paros.db.TableContext;
public class ParosTableContext extends ParosAbstractTable implements TableContext {
private static final String TABLE_NAME = "CONTEXT_DATA";
private static final String DATAID = "DATAID";
private static final String CONTEXTID = "CONTEXTID";
private static final String TYPE = "TYPE";
private static final String DATA = "DATA";
private PreparedStatement psRead = null;
private PreparedStatement psInsert = null;
private CallableStatement psGetIdLastInsert = null;
private PreparedStatement psGetAllData = null;
private PreparedStatement psGetAllDataForContext = null;
private PreparedStatement psGetAllDataForContextAndType = null;
private PreparedStatement psDeleteData = null;
private PreparedStatement psDeleteAllDataForContext = null;
private PreparedStatement psDeleteAllDataForContextAndType = null;
public ParosTableContext() {}
@Override
protected void reconnect(Connection conn) throws DatabaseException {
try {
if (!DbUtils.hasTable(conn, TABLE_NAME)) {
// Need to create the table
DbUtils.execute(
conn,
"CREATE cached TABLE CONTEXT_DATA (dataid bigint generated by default as identity (start with 1), contextId int not null, type int not null, data varchar(1048576) default '')");
}
psRead = conn.prepareStatement("SELECT * FROM CONTEXT_DATA WHERE " + DATAID + " = ?");
psInsert =
conn.prepareStatement(
"INSERT INTO CONTEXT_DATA ("
+ CONTEXTID
+ ","
+ TYPE
+ ","
+ DATA
+ ") VALUES (?, ?, ?)");
psGetIdLastInsert = conn.prepareCall("CALL IDENTITY();");
psDeleteData =
conn.prepareStatement(
"DELETE FROM CONTEXT_DATA WHERE "
+ CONTEXTID
+ " = ? AND "
+ TYPE
+ " = ? AND "
+ DATA
+ " = ?");
psDeleteAllDataForContext =
conn.prepareStatement("DELETE FROM CONTEXT_DATA WHERE " + CONTEXTID + " = ?");
psDeleteAllDataForContextAndType =
conn.prepareStatement(
"DELETE FROM CONTEXT_DATA WHERE "
+ CONTEXTID
+ " = ? AND "
+ TYPE
+ " = ?");
psGetAllData = conn.prepareStatement("SELECT * FROM CONTEXT_DATA");
psGetAllDataForContext =
conn.prepareStatement("SELECT * FROM CONTEXT_DATA WHERE " + CONTEXTID + " = ?");
psGetAllDataForContextAndType =
conn.prepareStatement(
"SELECT * FROM CONTEXT_DATA WHERE "
+ CONTEXTID
+ " = ? AND "
+ TYPE
+ " = ?");
} catch (SQLException e) {
throw new DatabaseException(e);
}
}
/* (non-Javadoc)
* @see org.parosproxy.paros.db.paros.TableContext#read(long)
*/
@Override
public synchronized RecordContext read(long dataId) throws DatabaseException {
try {
psRead.setLong(1, dataId);
try (ResultSet rs = psRead.executeQuery()) {
RecordContext result = build(rs);
return result;
}
} catch (SQLException e) {
throw new DatabaseException(e);
}
}
/* (non-Javadoc)
* @see org.parosproxy.paros.db.paros.TableContext#insert(int, int, java.lang.String)
*/
@Override
public synchronized RecordContext insert(int contextId, int type, String url)
throws DatabaseException {
try {
psInsert.setInt(1, contextId);
psInsert.setInt(2, type);
psInsert.setString(3, url);
psInsert.executeUpdate();
long id;
try (ResultSet rs = psGetIdLastInsert.executeQuery()) {
rs.next();
id = rs.getLong(1);
}
return read(id);
} catch (SQLException e) {
throw new DatabaseException(e);
}
}
/* (non-Javadoc)
* @see org.parosproxy.paros.db.paros.TableContext#delete(int, int, java.lang.String)
*/
@Override
public synchronized void delete(int contextId, int type, String data) throws DatabaseException {
try {
psDeleteData.setInt(1, contextId);
psDeleteData.setInt(2, type);
psDeleteData.setString(3, data);
psDeleteData.executeUpdate();
} catch (SQLException e) {
throw new DatabaseException(e);
}
}
/* (non-Javadoc)
* @see org.parosproxy.paros.db.paros.TableContext#deleteAllDataForContextAndType(int, int)
*/
@Override
public synchronized void deleteAllDataForContextAndType(int contextId, int type)
throws DatabaseException {
try {
psDeleteAllDataForContextAndType.setInt(1, contextId);
psDeleteAllDataForContextAndType.setInt(2, type);
psDeleteAllDataForContextAndType.executeUpdate();
} catch (SQLException e) {
throw new DatabaseException(e);
}
}
/* (non-Javadoc)
* @see org.parosproxy.paros.db.paros.TableContext#deleteAllDataForContext(int)
*/
@Override
public synchronized void deleteAllDataForContext(int contextId) throws DatabaseException {
try {
psDeleteAllDataForContext.setInt(1, contextId);
psDeleteAllDataForContext.executeUpdate();
} catch (SQLException e) {
throw new DatabaseException(e);
}
}
/* (non-Javadoc)
* @see org.parosproxy.paros.db.paros.TableContext#getAllData()
*/
@Override
public List<RecordContext> getAllData() throws DatabaseException {
try {
List<RecordContext> result = new ArrayList<>();
try (ResultSet rs = psGetAllData.executeQuery()) {
while (rs.next()) {
result.add(
new RecordContext(
rs.getLong(DATAID),
rs.getInt(CONTEXTID),
rs.getInt(TYPE),
rs.getString(DATA)));
}
}
return result;
} catch (SQLException e) {
throw new DatabaseException(e);
}
}
/* (non-Javadoc)
* @see org.parosproxy.paros.db.paros.TableContext#getDataForContext(int)
*/
@Override
public synchronized List<RecordContext> getDataForContext(int contextId)
throws DatabaseException {
try {
List<RecordContext> result = new ArrayList<>();
psGetAllDataForContext.setInt(1, contextId);
try (ResultSet rs = psGetAllDataForContext.executeQuery()) {
while (rs.next()) {
result.add(
new RecordContext(
rs.getLong(DATAID),
rs.getInt(CONTEXTID),
rs.getInt(TYPE),
rs.getString(DATA)));
}
}
return result;
} catch (SQLException e) {
throw new DatabaseException(e);
}
}
/* (non-Javadoc)
* @see org.parosproxy.paros.db.paros.TableContext#getDataForContextAndType(int, int)
*/
@Override
public synchronized List<RecordContext> getDataForContextAndType(int contextId, int type)
throws DatabaseException {
try {
List<RecordContext> result = new ArrayList<>();
psGetAllDataForContextAndType.setInt(1, contextId);
psGetAllDataForContextAndType.setInt(2, type);
try (ResultSet rs = psGetAllDataForContextAndType.executeQuery()) {
while (rs.next()) {
result.add(
new RecordContext(
rs.getLong(DATAID),
rs.getInt(CONTEXTID),
rs.getInt(TYPE),
rs.getString(DATA)));
}
}
return result;
} catch (SQLException e) {
throw new DatabaseException(e);
}
}
private RecordContext build(ResultSet rs) throws DatabaseException {
try {
RecordContext rt = null;
if (rs.next()) {
rt =
new RecordContext(
rs.getLong(DATAID),
rs.getInt(CONTEXTID),
rs.getInt(TYPE),
rs.getString(DATA));
}
return rt;
} catch (SQLException e) {
throw new DatabaseException(e);
}
}
/* (non-Javadoc)
* @see org.parosproxy.paros.db.paros.TableContext#setData(int, int, java.util.List)
*/
@Override
public void setData(int contextId, int type, List<String> dataList) throws DatabaseException {
this.deleteAllDataForContextAndType(contextId, type);
for (String data : dataList) {
this.insert(contextId, type, data);
}
}
}
| {
"pile_set_name": "Github"
} |
// Copyright lowRISC contributors.
// Licensed under the Apache License, Version 2.0, see LICENSE for details.
// SPDX-License-Identifier: Apache-2.0
class uart_fifo_full_vseq extends uart_tx_rx_vseq;
`uvm_object_utils(uart_fifo_full_vseq)
constraint num_trans_c {
num_trans inside {[5:10]};
}
constraint num_tx_bytes_c {
num_tx_bytes dist {
[0:1] :/ 2,
[2:32] :/ 2,
[33:100] :/ 2
};
}
constraint num_rx_bytes_c {
num_rx_bytes dist {
[0:1] :/ 2,
[2:32] :/ 2,
[33:100] :/ 2
};
}
constraint dly_to_next_trans_c {
dly_to_next_trans dist {
0 :/ 30, // more back2back transaction
[1:100] :/ 5,
[100:10000] :/ 2
};
}
constraint wait_for_idle_c {
// fifo is 32 depth, wait/not_wait = 1/40, higher change to have fifo full
wait_for_idle dist {
1 :/ 1,
0 :/ 40
};
}
constraint weight_to_skip_rx_read_c {
// 3: read, 50: skip
weight_to_skip_rx_read == 50;
}
`uvm_object_new
endclass : uart_fifo_full_vseq
| {
"pile_set_name": "Github"
} |
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_linux.go
package ipv4
const (
sysIP_TOS = 0x1
sysIP_TTL = 0x2
sysIP_HDRINCL = 0x3
sysIP_OPTIONS = 0x4
sysIP_ROUTER_ALERT = 0x5
sysIP_RECVOPTS = 0x6
sysIP_RETOPTS = 0x7
sysIP_PKTINFO = 0x8
sysIP_PKTOPTIONS = 0x9
sysIP_MTU_DISCOVER = 0xa
sysIP_RECVERR = 0xb
sysIP_RECVTTL = 0xc
sysIP_RECVTOS = 0xd
sysIP_MTU = 0xe
sysIP_FREEBIND = 0xf
sysIP_TRANSPARENT = 0x13
sysIP_RECVRETOPTS = 0x7
sysIP_ORIGDSTADDR = 0x14
sysIP_RECVORIGDSTADDR = 0x14
sysIP_MINTTL = 0x15
sysIP_NODEFRAG = 0x16
sysIP_UNICAST_IF = 0x32
sysIP_MULTICAST_IF = 0x20
sysIP_MULTICAST_TTL = 0x21
sysIP_MULTICAST_LOOP = 0x22
sysIP_ADD_MEMBERSHIP = 0x23
sysIP_DROP_MEMBERSHIP = 0x24
sysIP_UNBLOCK_SOURCE = 0x25
sysIP_BLOCK_SOURCE = 0x26
sysIP_ADD_SOURCE_MEMBERSHIP = 0x27
sysIP_DROP_SOURCE_MEMBERSHIP = 0x28
sysIP_MSFILTER = 0x29
sysMCAST_JOIN_GROUP = 0x2a
sysMCAST_LEAVE_GROUP = 0x2d
sysMCAST_JOIN_SOURCE_GROUP = 0x2e
sysMCAST_LEAVE_SOURCE_GROUP = 0x2f
sysMCAST_BLOCK_SOURCE = 0x2b
sysMCAST_UNBLOCK_SOURCE = 0x2c
sysMCAST_MSFILTER = 0x30
sysIP_MULTICAST_ALL = 0x31
sysICMP_FILTER = 0x1
sysSO_EE_ORIGIN_NONE = 0x0
sysSO_EE_ORIGIN_LOCAL = 0x1
sysSO_EE_ORIGIN_ICMP = 0x2
sysSO_EE_ORIGIN_ICMP6 = 0x3
sysSO_EE_ORIGIN_TXSTATUS = 0x4
sysSO_EE_ORIGIN_TIMESTAMPING = 0x4
sizeofKernelSockaddrStorage = 0x80
sizeofSockaddrInet = 0x10
sizeofInetPktinfo = 0xc
sizeofSockExtendedErr = 0x10
sizeofIPMreq = 0x8
sizeofIPMreqn = 0xc
sizeofIPMreqSource = 0xc
sizeofGroupReq = 0x88
sizeofGroupSourceReq = 0x108
sizeofICMPFilter = 0x4
)
type kernelSockaddrStorage struct {
Family uint16
X__data [126]int8
}
type sockaddrInet struct {
Family uint16
Port uint16
Addr [4]byte /* in_addr */
X__pad [8]uint8
}
type inetPktinfo struct {
Ifindex int32
Spec_dst [4]byte /* in_addr */
Addr [4]byte /* in_addr */
}
type sockExtendedErr struct {
Errno uint32
Origin uint8
Type uint8
Code uint8
Pad uint8
Info uint32
Data uint32
}
type ipMreq struct {
Multiaddr [4]byte /* in_addr */
Interface [4]byte /* in_addr */
}
type ipMreqn struct {
Multiaddr [4]byte /* in_addr */
Address [4]byte /* in_addr */
Ifindex int32
}
type ipMreqSource struct {
Multiaddr uint32
Interface uint32
Sourceaddr uint32
}
type groupReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group kernelSockaddrStorage
}
type groupSourceReq struct {
Interface uint32
Pad_cgo_0 [4]byte
Group kernelSockaddrStorage
Source kernelSockaddrStorage
}
type icmpFilter struct {
Data uint32
}
| {
"pile_set_name": "Github"
} |
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*****************************************************************************
gif_err.c - handle error reporting for the GIF library.
SPDX-License-Identifier: MIT
****************************************************************************/
#include <stdio.h>
#include "gif_lib.h"
#include "gif_lib_private.h"
/*****************************************************************************
Return a string description of the last GIF error
*****************************************************************************/
const char *
GifErrorString(int ErrorCode)
{
const char *Err;
switch (ErrorCode) {
case E_GIF_ERR_OPEN_FAILED:
Err = "Failed to open given file";
break;
case E_GIF_ERR_WRITE_FAILED:
Err = "Failed to write to given file";
break;
case E_GIF_ERR_HAS_SCRN_DSCR:
Err = "Screen descriptor has already been set";
break;
case E_GIF_ERR_HAS_IMAG_DSCR:
Err = "Image descriptor is still active";
break;
case E_GIF_ERR_NO_COLOR_MAP:
Err = "Neither global nor local color map";
break;
case E_GIF_ERR_DATA_TOO_BIG:
Err = "Number of pixels bigger than width * height";
break;
case E_GIF_ERR_NOT_ENOUGH_MEM:
Err = "Failed to allocate required memory";
break;
case E_GIF_ERR_DISK_IS_FULL:
Err = "Write failed (disk full?)";
break;
case E_GIF_ERR_CLOSE_FAILED:
Err = "Failed to close given file";
break;
case E_GIF_ERR_NOT_WRITEABLE:
Err = "Given file was not opened for write";
break;
case D_GIF_ERR_OPEN_FAILED:
Err = "Failed to open given file";
break;
case D_GIF_ERR_READ_FAILED:
Err = "Failed to read from given file";
break;
case D_GIF_ERR_NOT_GIF_FILE:
Err = "Data is not in GIF format";
break;
case D_GIF_ERR_NO_SCRN_DSCR:
Err = "No screen descriptor detected";
break;
case D_GIF_ERR_NO_IMAG_DSCR:
Err = "No Image Descriptor detected";
break;
case D_GIF_ERR_NO_COLOR_MAP:
Err = "Neither global nor local color map";
break;
case D_GIF_ERR_WRONG_RECORD:
Err = "Wrong record type detected";
break;
case D_GIF_ERR_DATA_TOO_BIG:
Err = "Number of pixels bigger than width * height";
break;
case D_GIF_ERR_NOT_ENOUGH_MEM:
Err = "Failed to allocate required memory";
break;
case D_GIF_ERR_CLOSE_FAILED:
Err = "Failed to close given file";
break;
case D_GIF_ERR_NOT_READABLE:
Err = "Given file was not opened for read";
break;
case D_GIF_ERR_IMAGE_DEFECT:
Err = "Image is defective, decoding aborted";
break;
case D_GIF_ERR_EOF_TOO_SOON:
Err = "Image EOF detected before image complete";
break;
default:
Err = NULL;
break;
}
return Err;
}
/* end */
| {
"pile_set_name": "Github"
} |
// Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.
//
// Example Usage
//
// The following is a complete example using assert in a standard test function:
// import (
// "testing"
// "github.com/stretchr/testify/assert"
// )
//
// func TestSomething(t *testing.T) {
//
// var a string = "Hello"
// var b string = "Hello"
//
// assert.Equal(t, a, b, "The two words should be the same.")
//
// }
//
// if you assert many times, use the format below:
//
// import (
// "testing"
// "github.com/stretchr/testify/assert"
// )
//
// func TestSomething(t *testing.T) {
// assert := assert.New(t)
//
// var a string = "Hello"
// var b string = "Hello"
//
// assert.Equal(a, b, "The two words should be the same.")
// }
//
// Assertions
//
// Assertions allow you to easily write test code, and are global funcs in the `assert` package.
// All assertion functions take, as the first argument, the `*testing.T` object provided by the
// testing framework. This allows the assertion funcs to write the failings and other details to
// the correct place.
//
// Every assertion function also takes an optional string message as the final argument,
// allowing custom error messages to be appended to the message the assertion method outputs.
package assert
| {
"pile_set_name": "Github"
} |
### 回中国躲疫面临自费医疗 多人被关挨饿网上求救
------------------------
#### [首页](https://github.com/gfw-breaker/banned-news/blob/master/README.md) | [手把手翻墙教程](https://github.com/gfw-breaker/guides/wiki) | [禁闻聚合安卓版](https://github.com/gfw-breaker/bn-android) | [网门安卓版](https://github.com/oGate2/oGate) | [神州正道安卓版](https://github.com/SzzdOgate/update)
<div><div class="featured_image">
<a href="https://i.ntdtv.com/assets/uploads/2020/03/Untitled-1-copy-7.jpg" target="_blank">
<figure>
<img alt="回中国躲疫面临自费医疗 多人被关挨饿网上求救" src="https://i.ntdtv.com/assets/uploads/2020/03/Untitled-1-copy-7-800x450.jpg"/>
</figure><br/>
</a>
<span class="caption">
图为上海浦东机场,防疫人员严阵以待,处置回国人员。(视频截图)
</span>
</div>
</div><hr/>
#### [翻墙必看视频(文昭、江峰、法轮功、八九六四、香港反送中...)](https://github.com/gfw-breaker/banned-news/blob/master/pages/link3.md)
<div><div class="post_content" itemprop="articleBody">
<p>
【新唐人北京时间2020年03月15日讯】目前
<ok href="https://www.ntdtv.com/gb/中共隐瞒疫情.htm">
中共隐瞒疫情
</ok>
,宣传自己“抗疫成功”,同时大肆渲染国外疫情严重,很多华人相信中共,纷纷
<ok href="https://www.ntdtv.com/gb/回国躲疫.htm">
回国躲疫
</ok>
。不过,回国首先要面对的是隔离、检测和治疗自费等问题。还有多名回国者遭遇不人道待遇,在网上求救。
</p>
<p>
3月14日,北京市官员在防疫记者会上宣布,从境外回国的人员,如果参加了国内的基本医疗保险,则被确诊为
<ok href="https://www.ntdtv.com/gb/武汉肺炎.htm">
武汉肺炎
</ok>
或疑似病例的,可接受政府财政补助;而没有参加基本医疗保险的,则“原则上”不予补助。
</p>
<p>
感染
<ok href="https://www.ntdtv.com/gb/武汉肺炎.htm">
武汉肺炎
</ok>
的患者,如果只是轻症接受药物治疗,一般家庭尚可承受。如果是重症送入ICU(重症室)抢救,费用动辄数十万乃至上百万人民币。
</p>
<p>
13日,唐山市防疫办公室也发布通告称,境外返回人员如果隐瞒接触史、旅居史,谎报病情或不执行防控措施的,将追究其法律责任。并且,本人一旦感染,所有治疗费用由本人承担。对于举报“漏网”回国人员的则予以奖励。党媒《人民日报》引述所谓“网民评论”称,唐山“干得漂亮”,“建议全国都这样”。
</p>
<p>
而按照官方规定“不隐瞒”的回国人员,则可能面临程度不等的隔离措施。特别是从所谓“疫情严重国家”回国的人员,更有可能遭受类似湖北人一样的待遇。
</p>
<p>
目前,北京、上海等国际机场中,全国各地的驻场人员已经严阵以待,对本地区的回国人员进行分类处理。官方规定,要对回国人员分门别类,依情况不同可允许自行离开、回家自我隔离或送往集中隔离点。不过,在中共“防疫”政治高压下,很多人员往往被“从重处理”。
</p>
<p>
日前多名网友自曝回国后遭各种不人道待遇,在网上求救。也有网友告诉国外的朋友,千万别回北京。
</p>
<p>
有从马里西亚回北京的网友称,自己在北京有房子,还是被要求集中隔离,下飞机就被限制自由,不给机会喝水吃饭,几个小时后才能上厕所。自己在隔离点打了上百个电话,发动几十人投诉,找媒体朋友营救,最后才得以回家。该网友说,在官员眼中“我只是一个数字根本就不是人”!
</p>
<figure class="wp-caption aligncenter" id="attachment_102799711" style="width: 375px">
<ok href="https://i.ntdtv.com/assets/uploads/2020/03/ETFGMEMU8AAF9n2.jpg">
<img alt="" class="wp-image-102799711" src="https://i.ntdtv.com/assets/uploads/2020/03/ETFGMEMU8AAF9n2.jpg"/>
</ok>
<br/><figcaption class="wp-caption-text">
马来西亚返回北京的网友诉说悲惨遭遇。(网页截图)
</figcaption><br/>
</figure><br/>
<p>
这名网友没有详细叙述自己在隔离点的遭遇。网传多个地方政府通知显示,在许多地区,被
<ok href="https://www.ntdtv.com/gb/强制隔离.htm">
强制隔离
</ok>
14天的人员要自费负担数千到上万元人民币的“隔离费”,这已成为当地官员的敛财手段。
</p>
</div></div>
<hr/>
手机上长按并复制下列链接或二维码分享本文章:<br/>
https://github.com/gfw-breaker/banned-news/blob/master/pages/prog204/a102799703.md <br/>
<a href='https://github.com/gfw-breaker/banned-news/blob/master/pages/prog204/a102799703.md'><img src='https://github.com/gfw-breaker/banned-news/blob/master/pages/prog204/a102799703.md.png'/></a> <br/>
原文地址(需翻墙访问):https://www.ntdtv.com/gb/2020/03/14/a102799703.html
------------------------
#### [首页](https://github.com/gfw-breaker/banned-news/blob/master/README.md) | [一键翻墙软件](https://github.com/gfw-breaker/nogfw/blob/master/README.md) | [《九评共产党》](https://github.com/gfw-breaker/9ping.md/blob/master/README.md#九评之一评共产党是什么) | [《解体党文化》](https://github.com/gfw-breaker/jtdwh.md/blob/master/README.md) | [《共产主义的终极目的》](https://github.com/gfw-breaker/gczydzjmd.md/blob/master/README.md)
<img src='http://gfw-breaker.win/banned-news/pages/prog204/a102799703.md' width='0px' height='0px'/> | {
"pile_set_name": "Github"
} |
<?php
namespace Neos\FluidAdaptor\View\Exception;
/*
* This file is part of the Neos.FluidAdaptor package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
* This package is Open Source Software. For the full copyright and license
* information, please view the LICENSE file which was distributed with this
* source code.
*/
use Neos\FluidAdaptor\View;
/**
* An "Invalid Section" exception
*
* @api
*/
class InvalidSectionException extends View\Exception
{
}
| {
"pile_set_name": "Github"
} |
termux_extract_src_archive() {
# STRIP=1 extracts archives straight into TERMUX_PKG_SRCDIR while STRIP=0 puts them in subfolders. zip has same behaviour per default
# If this isn't desired then this can be fixed in termux_step_post_get_source.
local STRIP=1
local PKG_SRCURL=(${TERMUX_PKG_SRCURL[@]})
local PKG_SHA256=(${TERMUX_PKG_SHA256[@]})
for i in $(seq 0 $(( ${#PKG_SRCURL[@]}-1 ))); do
local file="$TERMUX_PKG_CACHEDIR/$(basename "${PKG_SRCURL[$i]}")"
local folder
set +o pipefail
if [ "${file##*.}" = zip ]; then
folder=$(unzip -qql "$file" | head -n1 | tr -s ' ' | cut -d' ' -f5-)
rm -Rf $folder
unzip -q "$file"
mv $folder "$TERMUX_PKG_SRCDIR"
else
test "$i" -gt 0 && STRIP=0
mkdir -p "$TERMUX_PKG_SRCDIR"
tar xf "$file" -C "$TERMUX_PKG_SRCDIR" --strip-components=$STRIP
fi
set -o pipefail
done
}
| {
"pile_set_name": "Github"
} |
#!/usr/bin/env python
"""
Parse training log
Evolved from parse_log.sh
"""
import os
import re
import extract_seconds
import argparse
import csv
from collections import OrderedDict
def parse_log(path_to_log):
"""Parse log file
Returns (train_dict_list, test_dict_list)
train_dict_list and test_dict_list are lists of dicts that define the table
rows
"""
regex_iteration = re.compile('Iteration (\d+)')
regex_train_output = re.compile('Train net output #(\d+): (\S+) = ([\.\deE+-]+)')
regex_test_output = re.compile('Test net output #(\d+): (\S+) = ([\.\deE+-]+)')
regex_learning_rate = re.compile('lr = ([-+]?[0-9]*\.?[0-9]+([eE]?[-+]?[0-9]+)?)')
# Pick out lines of interest
iteration = -1
learning_rate = float('NaN')
train_dict_list = []
test_dict_list = []
train_row = None
test_row = None
logfile_year = extract_seconds.get_log_created_year(path_to_log)
with open(path_to_log) as f:
start_time = extract_seconds.get_start_time(f, logfile_year)
last_time = start_time
for line in f:
iteration_match = regex_iteration.search(line)
if iteration_match:
iteration = float(iteration_match.group(1))
if iteration == -1:
# Only start parsing for other stuff if we've found the first
# iteration
continue
try:
time = extract_seconds.extract_datetime_from_line(line,
logfile_year)
except ValueError:
# Skip lines with bad formatting, for example when resuming solver
continue
# if it's another year
if time.month < last_time.month:
logfile_year += 1
time = extract_seconds.extract_datetime_from_line(line, logfile_year)
last_time = time
seconds = (time - start_time).total_seconds()
learning_rate_match = regex_learning_rate.search(line)
if learning_rate_match:
learning_rate = float(learning_rate_match.group(1))
train_dict_list, train_row = parse_line_for_net_output(
regex_train_output, train_row, train_dict_list,
line, iteration, seconds, learning_rate
)
test_dict_list, test_row = parse_line_for_net_output(
regex_test_output, test_row, test_dict_list,
line, iteration, seconds, learning_rate
)
fix_initial_nan_learning_rate(train_dict_list)
fix_initial_nan_learning_rate(test_dict_list)
return train_dict_list, test_dict_list
def parse_line_for_net_output(regex_obj, row, row_dict_list,
line, iteration, seconds, learning_rate):
"""Parse a single line for training or test output
Returns a a tuple with (row_dict_list, row)
row: may be either a new row or an augmented version of the current row
row_dict_list: may be either the current row_dict_list or an augmented
version of the current row_dict_list
"""
output_match = regex_obj.search(line)
if output_match:
if not row or row['NumIters'] != iteration:
# Push the last row and start a new one
if row:
# If we're on a new iteration, push the last row
# This will probably only happen for the first row; otherwise
# the full row checking logic below will push and clear full
# rows
row_dict_list.append(row)
row = OrderedDict([
('NumIters', iteration),
('Seconds', seconds),
('LearningRate', learning_rate)
])
# output_num is not used; may be used in the future
# output_num = output_match.group(1)
output_name = output_match.group(2)
output_val = output_match.group(3)
row[output_name] = float(output_val)
if row and len(row_dict_list) >= 1 and len(row) == len(row_dict_list[0]):
# The row is full, based on the fact that it has the same number of
# columns as the first row; append it to the list
row_dict_list.append(row)
row = None
return row_dict_list, row
def fix_initial_nan_learning_rate(dict_list):
"""Correct initial value of learning rate
Learning rate is normally not printed until after the initial test and
training step, which means the initial testing and training rows have
LearningRate = NaN. Fix this by copying over the LearningRate from the
second row, if it exists.
"""
if len(dict_list) > 1:
dict_list[0]['LearningRate'] = dict_list[1]['LearningRate']
def save_csv_files(logfile_path, output_dir, train_dict_list, test_dict_list,
delimiter=',', verbose=False):
"""Save CSV files to output_dir
If the input log file is, e.g., caffe.INFO, the names will be
caffe.INFO.train and caffe.INFO.test
"""
log_basename = os.path.basename(logfile_path)
train_filename = os.path.join(output_dir, log_basename + '.train')
write_csv(train_filename, train_dict_list, delimiter, verbose)
test_filename = os.path.join(output_dir, log_basename + '.test')
write_csv(test_filename, test_dict_list, delimiter, verbose)
def write_csv(output_filename, dict_list, delimiter, verbose=False):
"""Write a CSV file
"""
if not dict_list:
if verbose:
print('Not writing %s; no lines to write' % output_filename)
return
dialect = csv.excel
dialect.delimiter = delimiter
with open(output_filename, 'w') as f:
dict_writer = csv.DictWriter(f, fieldnames=dict_list[0].keys(),
dialect=dialect)
dict_writer.writeheader()
dict_writer.writerows(dict_list)
if verbose:
print 'Wrote %s' % output_filename
def parse_args():
description = ('Parse a Caffe training log into two CSV files '
'containing training and testing information')
parser = argparse.ArgumentParser(description=description)
parser.add_argument('logfile_path',
help='Path to log file')
parser.add_argument('output_dir',
help='Directory in which to place output CSV files')
parser.add_argument('--verbose',
action='store_true',
help='Print some extra info (e.g., output filenames)')
parser.add_argument('--delimiter',
default=',',
help=('Column delimiter in output files '
'(default: \'%(default)s\')'))
args = parser.parse_args()
return args
def main():
args = parse_args()
train_dict_list, test_dict_list = parse_log(args.logfile_path)
save_csv_files(args.logfile_path, args.output_dir, train_dict_list,
test_dict_list, delimiter=args.delimiter, verbose=args.verbose)
if __name__ == '__main__':
main()
| {
"pile_set_name": "Github"
} |
#include "SelectBackgroundColorDialog.h"
#include "control/Control.h"
#include "Util.h"
#include "i18n.h"
static inline std::array<GdkRGBA, 9> background1 = {
Util::rgb_to_GdkRGBA(0xfabebeU), //
Util::rgb_to_GdkRGBA(0xfee7c4U), //
Util::rgb_to_GdkRGBA(0xfef8c9U), //
Util::rgb_to_GdkRGBA(0xdcf6c1U), //
Util::rgb_to_GdkRGBA(0xd4e2f0U), //
Util::rgb_to_GdkRGBA(0xe6d8e4U), //
Util::rgb_to_GdkRGBA(0xf8ead3U), //
Util::rgb_to_GdkRGBA(0xdadcdaU), //
Util::rgb_to_GdkRGBA(0xfafaf9U) //
};
static inline std::array<GdkRGBA, 6> backgroundXournal = {
Util::rgb_to_GdkRGBA(0xffffffU), //
Util::rgb_to_GdkRGBA(0xa0e8ffU), //
Util::rgb_to_GdkRGBA(0x80ffc0U), //
Util::rgb_to_GdkRGBA(0xffc0d4U), //
Util::rgb_to_GdkRGBA(0xffc080U), //
Util::rgb_to_GdkRGBA(0xffff80U) //
};
SelectBackgroundColorDialog::SelectBackgroundColorDialog(Control* control):
control(control),
lastBackgroundColors{Util::rgb_to_GdkRGBA(0xffffffU), //
Util::rgb_to_GdkRGBA(0xffffffU), //
Util::rgb_to_GdkRGBA(0xffffffU), //
Util::rgb_to_GdkRGBA(0xffffffU), //
Util::rgb_to_GdkRGBA(0xffffffU), //
Util::rgb_to_GdkRGBA(0xffffffU), //
Util::rgb_to_GdkRGBA(0xffffffU), //
Util::rgb_to_GdkRGBA(0xffffffU), //
Util::rgb_to_GdkRGBA(0xffffffU)}
{
Settings* settings = control->getSettings();
SElement& el = settings->getCustomElement("lastUsedPageBgColor");
int count = 0;
el.getInt("count", count);
auto index = 0ULL;
for (int i = 0; i < count && index < LAST_BACKGROUND_COLOR_COUNT; i++) {
int iColor{};
char* settingName = g_strdup_printf("color%02i", i);
bool read = el.getInt(settingName, iColor);
g_free(settingName);
if (!read) {
continue;
}
lastBackgroundColors[index] = Util::rgb_to_GdkRGBA(Color(iColor));
++index;
}
}
void SelectBackgroundColorDialog::storeLastUsedValuesInSettings() {
if (!this->selected) { // No color selected, do not save to list
return;
}
GdkRGBA newColor = Util::rgb_to_GdkRGBA(*this->selected);
for (auto& lastBackgroundColor: lastBackgroundColors) {
if (gdk_rgba_equal(&lastBackgroundColor, &newColor)) {
// The new color is already in the list, do not save
return;
}
}
Settings* settings = control->getSettings();
SElement& el = settings->getCustomElement("lastUsedPageBgColor");
// Move all colors one step back
for (int i = LAST_BACKGROUND_COLOR_COUNT - 1; i > 0; i--) {
lastBackgroundColors[i] = lastBackgroundColors[i - 1];
}
lastBackgroundColors[0] = newColor;
el.setInt("count", LAST_BACKGROUND_COLOR_COUNT);
for (int i = 0; i < LAST_BACKGROUND_COLOR_COUNT; i++) {
char* settingName = g_strdup_printf("color%02i", i);
el.setIntHex(settingName, int(Util::GdkRGBA_to_argb(lastBackgroundColors[i])));
g_free(settingName);
}
settings->customSettingsChanged();
}
auto SelectBackgroundColorDialog::getSelectedColor() const -> std::optional<Color> { return this->selected; }
void SelectBackgroundColorDialog::show(GtkWindow* parent) {
GtkWidget* dialog = gtk_color_chooser_dialog_new(_("Select background color"), parent);
gtk_color_chooser_set_use_alpha(GTK_COLOR_CHOOSER(dialog), false);
gtk_color_chooser_add_palette(GTK_COLOR_CHOOSER(dialog), GTK_ORIENTATION_HORIZONTAL, 9, background1.size(),
background1.data());
gtk_color_chooser_add_palette(GTK_COLOR_CHOOSER(dialog), GTK_ORIENTATION_HORIZONTAL, 9, backgroundXournal.size(),
backgroundXournal.data());
// Last used colors (only by background, the general last used are shared with the
// pen and highlighter etc.)
gtk_color_chooser_add_palette(GTK_COLOR_CHOOSER(dialog), GTK_ORIENTATION_HORIZONTAL, 9, lastBackgroundColors.size(),
lastBackgroundColors.data());
int response = gtk_dialog_run(GTK_DIALOG(dialog));
if (response == GTK_RESPONSE_OK) {
GdkRGBA color;
gtk_color_chooser_get_rgba(GTK_COLOR_CHOOSER(dialog), &color);
this->selected = Util::GdkRGBA_to_argb(color);
storeLastUsedValuesInSettings();
}
gtk_widget_destroy(dialog);
}
| {
"pile_set_name": "Github"
} |
/* global describe, it, before */
const extensionState = require('../../../../../app/common/state/extensionState')
const settings = require('../../../../../js/constants/settings')
const Immutable = require('immutable')
const assert = require('assert')
const defaultAppState = Immutable.fromJS({
tabs: [],
extensions: {
'blah': {
browserAction: {
title: 'blah',
popup: 'blah.html'
}
}
},
otherProp: true
})
const abcdBrowserAction = Immutable.fromJS({
browserAction: {
title: 'title',
popup: 'popup.html',
tabs: {}
}
})
const commonTests = () => {
it('should not change any other extensions', function () {
let extension = this.state.getIn(['extensions', 'blah'])
assert(Immutable.is(extension, defaultAppState.getIn(['extensions', 'blah'])))
})
it('should not change other props in the state', function () {
assert.equal(this.state.get('otherProp'), true)
})
}
describe('extensionState', function () {
describe('browserActionRegistered', function () {
describe('extensionId has been installed', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'], Immutable.fromJS({}))
})
describe('browser action already exists', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'], abcdBrowserAction)
this.state = extensionState.browserActionRegistered(this.state, Immutable.fromJS({
extensionId: 'abcd',
browserAction: {
title: 'title2'
}
}))
})
it('should overwrite the existing browserAction', function () {
let browserAction = this.state.getIn(['extensions', 'abcd', 'browserAction'])
assert.equal(browserAction.get('title'), 'title2')
assert.equal(browserAction.get('popup'), undefined)
})
commonTests()
})
describe('browser action does not exist', function () {
before(function () {
this.state = extensionState.browserActionRegistered(this.state, Immutable.fromJS({
extensionId: 'abcd',
browserAction: abcdBrowserAction.get('browserAction')
}))
})
it('should create the browserAction', function () {
let browserAction = this.state.getIn(['extensions', 'abcd', 'browserAction'])
assert.equal(browserAction.get('title'), abcdBrowserAction.getIn(['browserAction', 'title']))
assert.equal(browserAction.get('popup'), abcdBrowserAction.getIn(['browserAction', 'popup']))
})
it('should add default values', function () {
let browserAction = this.state.getIn(['extensions', 'abcd', 'browserAction'])
assert.equal(browserAction.get('tabs'), Immutable.fromJS({}))
})
commonTests()
})
})
describe('extensionId has not been installed', function () {
before(function () {
this.state = extensionState.browserActionRegistered(defaultAppState, Immutable.fromJS({
extensionId: 'abcd',
browserAction: abcdBrowserAction.get('browserAction')
}))
})
it('should not update the state', function () {
Immutable.is(this.state, defaultAppState)
})
})
}) // browserActionRegistered
describe('browserActionUpdated', function () {
describe('extensionId has been installed', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'], Immutable.fromJS({}))
})
describe('with tabId', function () {
describe('browser action has been registered', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'], abcdBrowserAction)
this.state = extensionState.browserActionUpdated(this.state, Immutable.fromJS({
extensionId: 'abcd',
tabId: '1',
browserAction: {
title: 'title2'
}
}))
})
describe('browser action for tab already exists', function () {
before(function () {
let browserAction = abcdBrowserAction.setIn(['browserAction', 'tabs', '1'], Immutable.fromJS({
title: 'tabTitle',
popup: 'tabPopup'
}))
this.state = defaultAppState.setIn(['extensions', 'abcd'], browserAction)
this.state = extensionState.browserActionUpdated(this.state, Immutable.fromJS({
extensionId: 'abcd',
tabId: '1',
browserAction: {
title: 'tabTitle2'
}
}))
})
it('should update the existing tab browserAction', function () {
let browserAction = this.state.getIn(['extensions', 'abcd', 'browserAction', 'tabs', '1'])
assert.equal(browserAction.get('title'), 'tabTitle2')
assert.equal(browserAction.get('popup'), 'tabPopup')
})
it('should not change any properties of the non-tab browserAction', function () {
let browserAction = this.state.getIn(['extensions', 'abcd', 'browserAction'])
assert(browserAction.get('title'), abcdBrowserAction.getIn(['browserAction', 'title']))
assert(browserAction.get('popup'), abcdBrowserAction.getIn(['browserAction', 'popup']))
})
commonTests()
}) // browserActionUpdate extensionId has been installed with tabId browser action for tab already exists
describe('browser action for tab does not exist', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'], abcdBrowserAction)
this.state = extensionState.browserActionUpdated(this.state, Immutable.fromJS({
extensionId: 'abcd',
tabId: '1',
browserAction: {
title: 'tabTitle2'
}
}))
})
it('should create the tab browserAction', function () {
let browserAction = this.state.getIn(['extensions', 'abcd', 'browserAction', 'tabs', '1'])
assert.equal(browserAction.get('title'), 'tabTitle2')
assert.equal(browserAction.get('popup'), undefined)
})
it('should not change any properties of the non-tab browserAction', function () {
let browserAction = this.state.getIn(['extensions', 'abcd', 'browserAction'])
assert(browserAction.get('title'), abcdBrowserAction.getIn(['browserAction', 'title']))
assert(browserAction.get('popup'), abcdBrowserAction.getIn(['browserAction', 'popup']))
})
commonTests()
})
}) // browserActionUpdate extensionId has been installed with tabId browser action for tab does not exist
describe('browser action has not been registered', function () {
before(function () {
this.state = extensionState.browserActionUpdated(this.state, Immutable.fromJS({
extensionId: 'abcd',
browserAction: abcdBrowserAction.get('browserAction')
}))
})
it('should not update the state', function () {
Immutable.is(this.state, defaultAppState)
})
describe('with tabId', function () {
before(function () {
this.state = extensionState.browserActionUpdated(defaultAppState, Immutable.fromJS({
extensionId: 'abcd',
tabId: '1',
browserAction: {
title: 'tabTitle2'
}
}))
})
})
it('should not update the state', function () {
Immutable.is(this.state, defaultAppState)
})
})
}) // browserActionUpdate extensionId has been installed with tabId
describe('browser action already exists', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'], abcdBrowserAction)
this.state = extensionState.browserActionUpdated(this.state, Immutable.fromJS({
extensionId: 'abcd',
browserAction: {
title: 'title2'
}
}))
})
it('should update the existing browserAction', function () {
let browserAction = this.state.getIn(['extensions', 'abcd', 'browserAction'])
assert.equal(browserAction.get('title'), 'title2')
assert.equal(browserAction.get('popup'), abcdBrowserAction.getIn(['browserAction', 'popup']))
})
commonTests()
})
describe('browser action does not exist', function () {
before(function () {
this.state = extensionState.browserActionUpdated(this.state, Immutable.fromJS({
extensionId: 'abcd',
browserAction: abcdBrowserAction.get('browserAction')
}))
})
it('should not update the state', function () {
Immutable.is(this.state, defaultAppState)
})
})
}) // browserActionUpdated extensionId has been installed
describe('extensionId has not been installed', function () {
before(function () {
this.state = extensionState.browserActionUpdated(defaultAppState, Immutable.fromJS({
extensionId: 'abcd',
browserAction: abcdBrowserAction.get('browserAction')
}))
})
it('should not update the state', function () {
Immutable.is(this.state, defaultAppState)
})
})
}) // browserActionUpdated
describe('getEnabledExtensions', function () {
describe('without tab-specific properties', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'], Immutable.fromJS({
enabled: true,
id: 'abcd'
}))
this.enabledExtensions = extensionState.getEnabledExtensions(this.state)
})
it('return extensions where enabled === true', function () {
assert.equal(this.enabledExtensions.size, 1)
assert.equal(this.enabledExtensions.first().get('enabled'), true)
assert.equal(this.enabledExtensions.first().get('id'), 'abcd')
})
})
})
describe('getBrowserActionByTabId', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'],
abcdBrowserAction.setIn(['browserAction', 'tabs', '1'], Immutable.fromJS({
title: 'tabTitle'
})))
})
describe('without tab-specific properties', function () {
before(function () {
this.browserAction = extensionState.getBrowserActionByTabId(this.state, 'abcd', '1')
})
it('should return the default browserAction properties', function () {
assert.equal(this.browserAction.get('title'), abcdBrowserAction.getIn(['browserAction', 'title']))
assert.equal(this.browserAction.get('popup'), abcdBrowserAction.getIn(['browserAction', 'popup']))
})
})
describe('with tab-specific properties', function () {
before(function () {
this.browserAction = extensionState.getBrowserActionByTabId(this.state, 'abcd', '1')
})
it('should merge the tab-specific properties into the default browserAction properties', function () {
assert(this.browserAction.get('title'), 'tabTitle')
assert(this.browserAction.get('popup'), abcdBrowserAction.getIn(['browserAction', 'popup']))
})
})
describe('no browser action for the extensionId', function () {
before(function () {
let state = this.state.setIn(['extensions', 'abcde'], Immutable.fromJS({}))
this.browserAction1 = extensionState.getBrowserActionByTabId(state, 'abcde', '1')
this.browserAction2 = extensionState.getBrowserActionByTabId(state, 'abcdef', '1')
})
it('should return null', function () {
assert.equal(this.browserAction1, null)
assert.equal(this.browserAction2, null)
})
})
})
describe('extensionInstalled', function () {
describe('extensionId has been installed', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'], Immutable.fromJS({
name: 'old-brave',
id: 'abcd',
url: 'old_url',
path: 'old/path',
version: '0.9',
description: 'an awesome extension',
manifest: {
manifest_value: 'test1',
manifest_value2: 'test2'
},
enabled: true
}))
this.state = extensionState.extensionInstalled(this.state, Immutable.fromJS({
extensionId: 'abcd',
installInfo: {
name: 'brave',
id: 'abcd',
url: 'some_url',
path: 'some/path',
version: '1.0',
description: 'a more awesomer extension',
manifest: {
manifest_value: 'test2'
}
}
}))
})
it('should overwrite the existing extension', function () {
let extension = this.state.getIn(['extensions', 'abcd'])
assert.equal(extension.get('name'), 'brave')
assert.equal(extension.get('id'), 'abcd')
assert.equal(extension.get('url'), 'some_url')
assert.equal(extension.get('path'), 'some/path')
assert.equal(extension.get('version'), '1.0')
assert.equal(extension.get('description'), 'a more awesomer extension')
assert.equal(extension.get('enabled'), undefined)
assert(Immutable.is(extension.get('manifest'), Immutable.fromJS({manifest_value: 'test2'})))
})
commonTests()
})
describe('extensionId has not been installed', function () {
before(function () {
this.state = extensionState.extensionInstalled(defaultAppState, Immutable.fromJS({
extensionId: 'abcd',
installInfo: {
name: 'brave',
id: 'abcd',
url: 'some_url',
path: 'some/path',
version: '1.0',
description: 'a more awesomer extension',
manifest: {
manifest_value: 'test2'
}
}
}))
})
it('should add the extension to the state', function () {
let extension = this.state.getIn(['extensions', 'abcd'])
assert.equal(extension.get('name'), 'brave')
assert.equal(extension.get('id'), 'abcd')
assert.equal(extension.get('url'), 'some_url')
assert.equal(extension.get('path'), 'some/path')
assert.equal(extension.get('version'), '1.0')
assert.equal(extension.get('description'), 'a more awesomer extension')
assert(Immutable.is(extension.get('manifest'), Immutable.fromJS({manifest_value: 'test2'})))
})
commonTests()
})
})
describe('extensionEnabled', function () {
describe('extensionId has been installed', function () {
describe('extensionId has not been enabled', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'], Immutable.fromJS({
name: 'brave',
id: 'abcd',
url: 'some_url',
path: 'some/path',
version: '1.0',
description: 'a more awesomer extension',
manifest: {
manifest_value: 'test2'
}
}))
this.state = extensionState.extensionEnabled(this.state, Immutable.fromJS({extensionId: 'abcd'}))
})
it('should set the enabled property to true', function () {
let extension = this.state.getIn(['extensions', 'abcd'])
assert.equal(extension.get('enabled'), true)
})
it('should not alter any other properties', function () {
let extension = this.state.getIn(['extensions', 'abcd'])
assert.equal(extension.get('name'), 'brave')
assert.equal(extension.get('id'), 'abcd')
assert.equal(extension.get('url'), 'some_url')
assert.equal(extension.get('path'), 'some/path')
assert.equal(extension.get('version'), '1.0')
assert.equal(extension.get('description'), 'a more awesomer extension')
assert(Immutable.is(extension.get('manifest'), Immutable.fromJS({manifest_value: 'test2'})))
})
commonTests()
})
describe('extensionId is enabled', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'], Immutable.fromJS({
name: 'brave',
id: 'abcd',
url: 'some_url',
path: 'some/path',
version: '1.0',
description: 'a more awesomer extension',
manifest: {
manifest_value: 'test2'
},
enabled: true
}))
this.state = extensionState.extensionEnabled(this.state, Immutable.fromJS({extensionId: 'abcd'}))
})
it('should not update the state', function () {
Immutable.is(this.state, defaultAppState)
})
})
describe('extensionId is disabled', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'], Immutable.fromJS({
name: 'brave',
id: 'abcd',
url: 'some_url',
path: 'some/path',
version: '1.0',
description: 'a more awesomer extension',
manifest: {
manifest_value: 'test2'
},
enabled: false
}))
this.state = extensionState.extensionEnabled(this.state, Immutable.fromJS({extensionId: 'abcd'}))
})
it('should set the enabled property to true', function () {
let extension = this.state.getIn(['extensions', 'abcd'])
assert.equal(extension.get('enabled'), true)
})
it('should not alter any other properties', function () {
let extension = this.state.getIn(['extensions', 'abcd'])
assert.equal(extension.get('name'), 'brave')
assert.equal(extension.get('id'), 'abcd')
assert.equal(extension.get('url'), 'some_url')
assert.equal(extension.get('path'), 'some/path')
assert.equal(extension.get('version'), '1.0')
assert.equal(extension.get('description'), 'a more awesomer extension')
assert(Immutable.is(extension.get('manifest'), Immutable.fromJS({manifest_value: 'test2'})))
})
commonTests()
})
}) // extensionEnabled extensionId has been installed
describe('extensionId has not been installed', function () {
before(function () {
this.state = extensionState.extensionInstalled(defaultAppState, Immutable.fromJS({
extensionId: 'abcd',
installInfo: {
name: 'brave',
id: 'abcd',
url: 'some_url',
path: 'some/path',
version: '1.0',
description: 'a more awesomer extension',
manifest: {
manifest_value: 'test2'
}
}
}))
})
it('should not update the state', function () {
Immutable.is(this.state, defaultAppState)
})
commonTests()
})
}) // extensionEnabled
describe('extensionDisabled', function () {
describe('extensionId has been installed', function () {
describe('extensionId has not been enabled', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'], Immutable.fromJS({
name: 'brave',
id: 'abcd',
url: 'some_url',
path: 'some/path',
version: '1.0',
description: 'a more awesomer extension',
manifest: {
manifest_value: 'test2'
}
}))
this.state = extensionState.extensionDisabled(this.state, Immutable.fromJS({extensionId: 'abcd'}))
})
it('should set the enabled property to false', function () {
let extension = this.state.getIn(['extensions', 'abcd'])
assert.equal(extension.get('enabled'), false)
})
it('should not alter any other properties', function () {
let extension = this.state.getIn(['extensions', 'abcd'])
assert.equal(extension.get('name'), 'brave')
assert.equal(extension.get('id'), 'abcd')
assert.equal(extension.get('url'), 'some_url')
assert.equal(extension.get('path'), 'some/path')
assert.equal(extension.get('version'), '1.0')
assert.equal(extension.get('description'), 'a more awesomer extension')
assert(Immutable.is(extension.get('manifest'), Immutable.fromJS({manifest_value: 'test2'})))
})
commonTests()
})
describe('extensionId is disabled', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'], Immutable.fromJS({
name: 'brave',
id: 'abcd',
url: 'some_url',
path: 'some/path',
version: '1.0',
description: 'a more awesomer extension',
manifest: {
manifest_value: 'test2'
},
enabled: false
}))
this.state = extensionState.extensionDisabled(this.state, Immutable.fromJS({extensionId: 'abcd'}))
})
it('should not update the state', function () {
Immutable.is(this.state, defaultAppState)
})
})
describe('extensionId is enabled', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'abcd'], Immutable.fromJS({
name: 'brave',
id: 'abcd',
url: 'some_url',
path: 'some/path',
version: '1.0',
description: 'a more awesomer extension',
manifest: {
manifest_value: 'test2'
},
enabled: true
}))
this.state = extensionState.extensionDisabled(this.state, Immutable.fromJS({extensionId: 'abcd'}))
})
it('should set the enabled property to false', function () {
let extension = this.state.getIn(['extensions', 'abcd'])
assert.equal(extension.get('enabled'), false)
})
it('should not alter any other properties', function () {
let extension = this.state.getIn(['extensions', 'abcd'])
assert.equal(extension.get('name'), 'brave')
assert.equal(extension.get('id'), 'abcd')
assert.equal(extension.get('url'), 'some_url')
assert.equal(extension.get('path'), 'some/path')
assert.equal(extension.get('version'), '1.0')
assert.equal(extension.get('description'), 'a more awesomer extension')
assert(Immutable.is(extension.get('manifest'), Immutable.fromJS({manifest_value: 'test2'})))
})
commonTests()
})
}) // extensionEnabled extensionId has been installed
describe('extensionId has not been installed', function () {
before(function () {
this.state = extensionState.extensionInstalled(defaultAppState, Immutable.fromJS({
extensionId: 'abcd',
installInfo: {
name: 'brave',
id: 'abcd',
url: 'some_url',
path: 'some/path',
version: '1.0',
description: 'a more awesomer extension',
manifest: {
manifest_value: 'test2'
}
}
}))
})
it('should not update the state', function () {
Immutable.is(this.state, defaultAppState)
})
commonTests()
})
})
describe('extensionUninstalled', function () {
describe('extensionId has been uninstalled', function () {
before(function () {
this.state = defaultAppState.setIn(['extensions', 'androidDragon'], Immutable.fromJS({
name: 'android dragon dinossaur',
id: 'androidDragon',
url: 'some_url',
path: 'some/path',
version: '1.0',
description: 'epic game about an android dragon dinossaur',
manifest: {
manifest_value: 'dinossaur'
},
enabled: true,
excluded: false
}))
this.state = extensionState.extensionUninstalled(this.state, Immutable.fromJS({
extensionId: 'androidDragon'
}))
})
it('should set the excluded property to true', function () {
let extension = this.state.getIn(['extensions', 'androidDragon'])
assert.equal(extension.get('excluded'), true)
})
it('should not alter any other properties', function () {
let extension = this.state.getIn(['extensions', 'androidDragon'])
assert.equal(extension.get('name'), 'android dragon dinossaur')
assert.equal(extension.get('id'), 'androidDragon')
assert.equal(extension.get('url'), 'some_url')
assert.equal(extension.get('path'), 'some/path')
assert.equal(extension.get('version'), '1.0')
assert.equal(extension.get('description'), 'epic game about an android dragon dinossaur')
assert(Immutable.is(extension.get('manifest'), Immutable.fromJS({manifest_value: 'dinossaur'})))
assert.equal(extension.get('enabled'), true)
})
commonTests()
})
})
describe('isWebTorrentEnabled', function () {
it('null case', function () {
const result = extensionState.isWebTorrentEnabled()
assert.equal(result, false)
})
it('torrent is enabled by default', function () {
const result = extensionState.isWebTorrentEnabled(defaultAppState)
assert.equal(result, true)
})
it('torrent is disabled', function () {
const state = defaultAppState
.setIn(['settings', settings.TORRENT_VIEWER_ENABLED], false)
const result = extensionState.isWebTorrentEnabled(state)
assert.equal(result, false)
})
it('torrent is enabled', function () {
const state = defaultAppState
.setIn(['settings', settings.TORRENT_VIEWER_ENABLED], true)
const result = extensionState.isWebTorrentEnabled(state)
assert.equal(result, true)
})
})
})
| {
"pile_set_name": "Github"
} |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import "WAJSEventHandler_BaseEvent.h"
#import "InputKeyboardDelegate-Protocol.h"
#import "WAGameKeyboardDelegate-Protocol.h"
@class NSString;
@interface WAJSEventHandler_showKeyboard : WAJSEventHandler_BaseEvent <InputKeyboardDelegate, WAGameKeyboardDelegate>
{
}
- (void)onKeyboardDidShow;
- (void)onInputSuccess:(unsigned int)arg1;
- (void)onInputError:(id)arg1;
- (void)handleJSEvent:(id)arg1;
// Remaining properties
@property(readonly, copy) NSString *debugDescription;
@property(readonly, copy) NSString *description;
@property(readonly) unsigned long long hash;
@property(readonly) Class superclass;
@end
| {
"pile_set_name": "Github"
} |
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="StringField" module="Products.Formulator.StandardFields"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_parent_purchase_supply_line_source_reference</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>external_validator</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Supplier Reference</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.getParent().getPurchaseSupplyLineSourceReference()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
| {
"pile_set_name": "Github"
} |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build darwin linux solaris
package ipv4
import (
"net"
"unsafe"
"golang.org/x/net/internal/iana"
"golang.org/x/net/internal/socket"
)
func marshalPacketInfo(b []byte, cm *ControlMessage) []byte {
m := socket.ControlMessage(b)
m.MarshalHeader(iana.ProtocolIP, sysIP_PKTINFO, sizeofInetPktinfo)
if cm != nil {
pi := (*inetPktinfo)(unsafe.Pointer(&m.Data(sizeofInetPktinfo)[0]))
if ip := cm.Src.To4(); ip != nil {
copy(pi.Spec_dst[:], ip)
}
if cm.IfIndex > 0 {
pi.setIfindex(cm.IfIndex)
}
}
return m.Next(sizeofInetPktinfo)
}
func parsePacketInfo(cm *ControlMessage, b []byte) {
pi := (*inetPktinfo)(unsafe.Pointer(&b[0]))
cm.IfIndex = int(pi.Ifindex)
if len(cm.Dst) < net.IPv4len {
cm.Dst = make(net.IP, net.IPv4len)
}
copy(cm.Dst, pi.Addr[:])
}
| {
"pile_set_name": "Github"
} |
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
?>
<?php /* @var $block \Magento\Downloadable\Block\Catalog\Product\Links */ ?>
<?php $_linksPurchasedSeparately = $block->getLinksPurchasedSeparately(); ?>
<?php if ($block->getProduct()->isSaleable() && $block->hasLinks()) :?>
<?php $_links = $block->getLinks(); ?>
<?php $_linksLength = 0; ?>
<?php $_isRequired = $block->getLinkSelectionRequired(); ?>
<legend class="legend links-title"><span><?= $block->escapeHtml($block->getLinksTitle()) ?></span></legend><br>
<div class="field downloads<?php if ($_isRequired) { echo ' required'; } ?><?php if (!$_linksPurchasedSeparately) { echo ' downloads-no-separately'; } ?>">
<label class="label"><span><?= $block->escapeHtml($block->getLinksTitle()) ?></span></label>
<div class="control" id="downloadable-links-list"
data-mage-init='{"downloadable":{
"linkElement":"input:checkbox[value]",
"allElements":"#links_all",
"config":<?= $block->escapeHtmlAttr($block->getJsonConfig()) ?>}
}'
data-container-for="downloadable-links">
<?php foreach ($_links as $_link) : ?>
<?php $_linksLength++;?>
<div class="field choice" data-role="link">
<?php if ($_linksPurchasedSeparately) : ?>
<input type="checkbox"
<?php if ($_isRequired) : ?>data-validate="{'validate-one-checkbox-required-by-name':'downloadable-links-list'}" <?php endif; ?>
name="links[]"
id="links_<?= $block->escapeHtmlAttr($_link->getId()) ?>"
value="<?= $block->escapeHtmlAttr($_link->getId()) ?>" <?= $block->escapeHtml($block->getLinkCheckedValue($_link)) ?> />
<?php endif; ?>
<label class="label" for="links_<?= $block->escapeHtmlAttr($_link->getId()) ?>">
<span><?= $block->escapeHtml($_link->getTitle()) ?></span>
<?php if ($_link->getSampleFile() || $_link->getSampleUrl()) : ?>
<a class="sample link"
href="<?= $block->escapeUrl($block->getLinkSampleUrl($_link)) ?>" <?= $block->getIsOpenInNewWindow() ? 'target="_blank"' : '' ?>>
<?= $block->escapeHtml(__('sample')) ?>
</a>
<?php endif; ?>
<?php if ($_linksPurchasedSeparately) : ?>
<?= /* @noEscape */ $block->getLinkPrice($_link) ?>
<?php endif; ?>
</label>
</div>
<?php endforeach; ?>
<?php if ($_linksPurchasedSeparately && $_linksLength > 1) : ?>
<div class="field choice downloads-all">
<input type="checkbox"
data-notchecked="<?= $block->escapeHtmlAttr(__('Select all')) ?>"
data-checked="<?= $block->escapeHtmlAttr(__('Unselect all')) ?>"
id="links_all" />
<label class="label" for="links_all"><span><?= $block->escapeHtml(__('Select all')) ?></span></label>
</div>
<?php endif; ?>
</div>
<?php if ($_isRequired) : ?>
<span id="links-advice-container"></span>
<?php endif;?>
</div>
<?php endif; ?>
| {
"pile_set_name": "Github"
} |
ALTER TABLE db_version CHANGE COLUMN required_z0090_089_01_mangos_mangos_string required_z0095_090_01_mangos_player_xp_for_level bit;
DROP TABLE IF EXISTS `player_xp_for_level`;
CREATE TABLE `player_xp_for_level` (
`lvl` int(3) unsigned NOT NULL,
`xp_for_next_level` int(10) unsigned NOT NULL,
PRIMARY KEY (`lvl`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
--
-- Dumping data for table `player_xp_for_level`
--
INSERT INTO `player_xp_for_level` VALUES
('1', '400'),
('2', '900'),
('3', '1400'),
('4', '2100'),
('5', '2800'),
('6', '3600'),
('7', '4500'),
('8', '5400'),
('9', '6500'),
('10', '7600'),
('11', '8800'),
('12', '10100'),
('13', '11400'),
('14', '12900'),
('15', '14400'),
('16', '16000'),
('17', '17700'),
('18', '19400'),
('19', '21300'),
('20', '23200'),
('21', '25200'),
('22', '27300'),
('23', '29400'),
('24', '31700'),
('25', '34000'),
('26', '36400'),
('27', '38900'),
('28', '41400'),
('29', '44300'),
('30', '47400'),
('31', '50800'),
('32', '54500'),
('33', '58600'),
('34', '62800'),
('35', '67100'),
('36', '71600'),
('37', '76100'),
('38', '80800'),
('39', '85700'),
('40', '90700'),
('41', '95800'),
('42', '101000'),
('43', '106300'),
('44', '111800'),
('45', '117500'),
('46', '123200'),
('47', '129100'),
('48', '135100'),
('49', '141200'),
('50', '147500'),
('51', '153900'),
('52', '160400'),
('53', '167100'),
('54', '173900'),
('55', '180800'),
('56', '187900'),
('57', '195000'),
('58', '202300'),
('59', '209800');
| {
"pile_set_name": "Github"
} |
package org.sql2o.pojos;
/**
* Created by IntelliJ IDEA.
* User: lars
* Date: 12/6/11
* Time: 10:14 AM
* To change this template use File | Settings | File Templates.
*/
public class StringConversionPojo {
public Integer val1;
public long val2;
public Integer val3;
public int val4;
public Double val5;
}
| {
"pile_set_name": "Github"
} |
//
// SPDX-License-Identifier: LGPL-2.1-or-later
//
// Copyright © 2011-2019 ANSSI. All Rights Reserved.
//
// Author(s): Jean Gautier (ANSSI)
//
#include "stdafx.h"
#include "DbgHelpLibrary.h"
#include "SystemDetails.h"
using namespace Orc;
using namespace std::string_literals;
DbgHelpLibrary::DbgHelpLibrary(logger pLog)
: ExtensionLibrary(std::move(pLog), L"DbgHelp.dll"s, L"DBGHELP_X86DLL"s, L"DBGHELP_X64DLL"s, L""s)
{
m_strDesiredName = L"DbgHelp.dll"s;
}
HRESULT DbgHelpLibrary::Initialize()
{
using namespace std::string_literals;
HRESULT hr = E_FAIL;
concurrency::critical_section::scoped_lock sl(m_cs);
if (m_bInitialized)
return S_OK;
DWORD dwMajor = 0L, dwMinor = 0L;
if (FAILED(hr = SystemDetails::GetOSVersion(dwMajor, dwMinor)))
return hr;
if (dwMajor < 6)
{
if (FAILED(hr = Load(L"DBGHELP_XPDLL"s)))
return hr;
}
else
{
if (FAILED(hr = Load()))
return hr;
}
if (IsLoaded())
{
Get(m_ImagehlpApiVersion, "ImagehlpApiVersion");
Get(m_MiniDumpWriteDump, "MiniDumpWriteDump");
m_bInitialized = true;
}
return S_OK;
}
API_VERSION DbgHelpLibrary::GetVersion()
{
if (FAILED(Initialize()))
{
API_VERSION retval;
ZeroMemory(&retval, sizeof(API_VERSION));
return retval;
}
API_VERSION* pVersion = m_ImagehlpApiVersion();
if (pVersion != nullptr)
return *pVersion;
else
{
API_VERSION retval;
ZeroMemory(&retval, sizeof(API_VERSION));
return retval;
}
}
DbgHelpLibrary::~DbgHelpLibrary() {}
| {
"pile_set_name": "Github"
} |
/* ----------------------------------------------------------------------
* Copyright (C) 2010-2014 ARM Limited. All rights reserved.
*
* $Date: 19. March 2015
* $Revision: V.1.4.5
*
* Project: CMSIS DSP Library
* Title: arm_offset_q7.c
*
* Description: Q7 vector offset.
*
* Target Processor: Cortex-M4/Cortex-M3/Cortex-M0
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* - Neither the name of ARM LIMITED nor the names of its contributors
* may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* -------------------------------------------------------------------- */
#include "arm_math.h"
/**
* @ingroup groupMath
*/
/**
* @addtogroup offset
* @{
*/
/**
* @brief Adds a constant offset to a Q7 vector.
* @param[in] *pSrc points to the input vector
* @param[in] offset is the offset to be added
* @param[out] *pDst points to the output vector
* @param[in] blockSize number of samples in the vector
* @return none.
*
* <b>Scaling and Overflow Behavior:</b>
* \par
* The function uses saturating arithmetic.
* Results outside of the allowable Q7 range [0x80 0x7F] are saturated.
*/
void arm_offset_q7(
q7_t * pSrc,
q7_t offset,
q7_t * pDst,
uint32_t blockSize)
{
uint32_t blkCnt; /* loop counter */
#ifndef ARM_MATH_CM0_FAMILY
/* Run the below code for Cortex-M4 and Cortex-M3 */
q31_t offset_packed; /* Offset packed to 32 bit */
/*loop Unrolling */
blkCnt = blockSize >> 2u;
/* Offset is packed to 32 bit in order to use SIMD32 for addition */
offset_packed = __PACKq7(offset, offset, offset, offset);
/* First part of the processing with loop unrolling. Compute 4 outputs at a time.
** a second loop below computes the remaining 1 to 3 samples. */
while(blkCnt > 0u)
{
/* C = A + offset */
/* Add offset and then store the results in the destination bufferfor 4 samples at a time. */
*__SIMD32(pDst)++ = __QADD8(*__SIMD32(pSrc)++, offset_packed);
/* Decrement the loop counter */
blkCnt--;
}
/* If the blockSize is not a multiple of 4, compute any remaining output samples here.
** No loop unrolling is used. */
blkCnt = blockSize % 0x4u;
while(blkCnt > 0u)
{
/* C = A + offset */
/* Add offset and then store the result in the destination buffer. */
*pDst++ = (q7_t) __SSAT(*pSrc++ + offset, 8);
/* Decrement the loop counter */
blkCnt--;
}
#else
/* Run the below code for Cortex-M0 */
/* Initialize blkCnt with number of samples */
blkCnt = blockSize;
while(blkCnt > 0u)
{
/* C = A + offset */
/* Add offset and then store the result in the destination buffer. */
*pDst++ = (q7_t) __SSAT((q15_t) * pSrc++ + offset, 8);
/* Decrement the loop counter */
blkCnt--;
}
#endif /* #ifndef ARM_MATH_CM0_FAMILY */
}
/**
* @} end of offset group
*/
| {
"pile_set_name": "Github"
} |
commandlinefu_id: 6611
translator:
weibo: ''
hide: true
command: |-
echo ondemand | sudo tee /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
summary: |-
using tee to echo to a system file with sudo privileges
| {
"pile_set_name": "Github"
} |
StartChar: two.propold
Encoding: 65541 -1 85
Width: 537
Flags: W
LayerCount: 2
Fore
SplineSet
328 480 m 256,0,1
237.487804878 480 237.487804878 480 224 401 c 1,2,-1
102 401 l 1,3,4
109.600447261 490.305255311 109.600447261 490.305255311 175.5 540 c 0,5,6
236.5 586 236.5 586 332 586 c 256,7,8
422 586 422 586 474 534 c 0,9,10
525.095238095 482.904761905 525.095238095 482.904761905 517.547619048 408.452380952 c 128,-1,11
510 334 510 334 470 293 c 128,-1,12
430 252 430 252 348 230 c 2,13,-1
251 204 l 1,14,15
179.013483146 183.161797753 179.013483146 183.161797753 175 135 c 1,16,-1
174 111 l 1,17,-1
493 111 l 1,18,-1
483 0 l 1,19,-1
54 0 l 1,20,-1
63 99 l 2,21,22
74.2694877506 220.146993318 74.2694877506 220.146993318 156.5 265 c 0,23,24
184 280 184 280 221 290 c 2,25,-1
309 313 l 2,26,27
360 327 360 327 381.5 349 c 128,-1,28
403 371 403 371 406 404 c 128,-1,29
409 437 409 437 389 458.5 c 128,-1,30
369 480 369 480 328 480 c 256,0,1
EndSplineSet
EndChar
| {
"pile_set_name": "Github"
} |
var makeString = require('./helper/makeString');
var strRepeat = require('./helper/strRepeat');
module.exports = function pad(str, length, padStr, type) {
str = makeString(str);
length = ~~length;
var padlen = 0;
if (!padStr)
padStr = ' ';
else if (padStr.length > 1)
padStr = padStr.charAt(0);
switch (type) {
case 'right':
padlen = length - str.length;
return str + strRepeat(padStr, padlen);
case 'both':
padlen = length - str.length;
return strRepeat(padStr, Math.ceil(padlen / 2)) + str + strRepeat(padStr, Math.floor(padlen / 2));
default: // 'left'
padlen = length - str.length;
return strRepeat(padStr, padlen) + str;
}
};
| {
"pile_set_name": "Github"
} |
icecast:
image: easypi/icecast-arm
ports:
- "8000:8000"
restart: unless-stopped
| {
"pile_set_name": "Github"
} |
\version "2.18.0"
\include "dynamic_defaults.ily"
\markup \icon #size1 \dynamic ff
| {
"pile_set_name": "Github"
} |
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe MarkupHelper do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) do
user = create(:user, username: 'gfm')
project.add_maintainer(user)
user
end
let_it_be(:issue) { create(:issue, project: project) }
let_it_be(:merge_request) { create(:merge_request, source_project: project, target_project: project) }
let_it_be(:snippet) { create(:project_snippet, project: project) }
let(:commit) { project.commit }
before do
# Helper expects a @project instance variable
helper.instance_variable_set(:@project, project)
# Stub the `current_user` helper
allow(helper).to receive(:current_user).and_return(user)
end
describe "#markdown" do
describe "referencing multiple objects" do
let(:actual) { "#{merge_request.to_reference} -> #{commit.to_reference} -> #{issue.to_reference}" }
it "links to the merge request" do
expected = urls.project_merge_request_path(project, merge_request)
expect(helper.markdown(actual)).to match(expected)
end
it "links to the commit" do
expected = urls.project_commit_path(project, commit)
expect(helper.markdown(actual)).to match(expected)
end
it "links to the issue" do
expected = urls.project_issue_path(project, issue)
expect(helper.markdown(actual)).to match(expected)
end
end
describe "override default project" do
let(:actual) { issue.to_reference }
let_it_be(:second_project) { create(:project, :public) }
let_it_be(:second_issue) { create(:issue, project: second_project) }
it 'links to the issue' do
expected = urls.project_issue_path(second_project, second_issue)
expect(markdown(actual, project: second_project)).to match(expected)
end
end
describe 'uploads' do
let(:text) { "" }
let_it_be(:group) { create(:group) }
subject { helper.markdown(text) }
describe 'inside a project' do
it 'renders uploads relative to project' do
expect(subject).to include("#{project.full_path}/uploads/test.png")
end
end
describe 'inside a group' do
before do
helper.instance_variable_set(:@group, group)
helper.instance_variable_set(:@project, nil)
end
it 'renders uploads relative to the group' do
expect(subject).to include("#{group.full_path}/-/uploads/test.png")
end
end
describe "with a group in the context" do
let_it_be(:project_in_group) { create(:project, group: group) }
before do
helper.instance_variable_set(:@group, group)
helper.instance_variable_set(:@project, project_in_group)
end
it 'renders uploads relative to project' do
expect(subject).to include("#{project_in_group.path_with_namespace}/uploads/test.png")
end
end
end
context 'when text contains a relative link to an image in the repository' do
let(:image_file) { "logo-white.png" }
let(:text_with_relative_path) { "\n" }
let(:generated_html) { helper.markdown(text_with_relative_path, requested_path: requested_path, ref: ref) }
subject { Nokogiri::HTML.parse(generated_html) }
context 'when requested_path is provided, but ref isn\'t' do
let(:requested_path) { 'files/images/README.md' }
let(:ref) { nil }
it 'returns the correct HTML for the image' do
expanded_path = "/#{project.full_path}/-/raw/master/files/images/#{image_file}"
expect(subject.css('a')[0].attr('href')).to eq(expanded_path)
expect(subject.css('img')[0].attr('data-src')).to eq(expanded_path)
end
end
context 'when requested_path and ref parameters are both provided' do
let(:requested_path) { 'files/images/README.md' }
let(:ref) { 'other_branch' }
it 'returns the correct HTML for the image' do
project.repository.create_branch('other_branch')
expanded_path = "/#{project.full_path}/-/raw/#{ref}/files/images/#{image_file}"
expect(subject.css('a')[0].attr('href')).to eq(expanded_path)
expect(subject.css('img')[0].attr('data-src')).to eq(expanded_path)
end
end
context 'when ref is provided, but requested_path isn\'t' do
let(:ref) { 'other_branch' }
let(:requested_path) { nil }
it 'returns the correct HTML for the image' do
project.repository.create_branch('other_branch')
expanded_path = "/#{project.full_path}/-/blob/#{ref}/./#{image_file}"
expect(subject.css('a')[0].attr('href')).to eq(expanded_path)
expect(subject.css('img')[0].attr('data-src')).to eq(expanded_path)
end
end
context 'when neither requested_path, nor ref parameter is provided' do
let(:ref) { nil }
let(:requested_path) { nil }
it 'returns the correct HTML for the image' do
expanded_path = "/#{project.full_path}/-/blob/master/./#{image_file}"
expect(subject.css('a')[0].attr('href')).to eq(expanded_path)
expect(subject.css('img')[0].attr('data-src')).to eq(expanded_path)
end
end
end
end
describe '#markdown_field' do
let(:attribute) { :title }
describe 'with already redacted attribute' do
it 'returns the redacted attribute' do
commit.redacted_title_html = 'commit title'
expect(Banzai).not_to receive(:render_field)
expect(helper.markdown_field(commit, attribute)).to eq('commit title')
end
end
describe 'without redacted attribute' do
it 'renders the markdown value' do
expect(Banzai).to receive(:render_field).with(commit, attribute, {}).and_call_original
expect(Banzai).to receive(:post_process)
helper.markdown_field(commit, attribute)
end
end
context 'when post_process is false' do
it 'does not run Markdown post processing' do
expect(Banzai).to receive(:render_field).with(commit, attribute, {}).and_call_original
expect(Banzai).not_to receive(:post_process)
helper.markdown_field(commit, attribute, post_process: false)
end
end
end
describe '#link_to_markdown_field' do
let(:link) { '/commits/0a1b2c3d' }
let(:issues) { create_list(:issue, 2, project: project) }
# Clean the cache to make sure the title is re-rendered from the stubbed one
it 'handles references nested in links with all the text', :clean_gitlab_redis_cache do
allow(commit).to receive(:title).and_return("This should finally fix #{issues[0].to_reference} and #{issues[1].to_reference} for real")
actual = helper.link_to_markdown_field(commit, :title, link)
doc = Nokogiri::HTML.parse(actual)
# Make sure we didn't create invalid markup
expect(doc.errors).to be_empty
# Leading commit link
expect(doc.css('a')[0].attr('href')).to eq link
expect(doc.css('a')[0].text).to eq 'This should finally fix '
# First issue link
expect(doc.css('a')[1].attr('href'))
.to eq urls.project_issue_path(project, issues[0])
expect(doc.css('a')[1].text).to eq issues[0].to_reference
# Internal commit link
expect(doc.css('a')[2].attr('href')).to eq link
expect(doc.css('a')[2].text).to eq ' and '
# Second issue link
expect(doc.css('a')[3].attr('href'))
.to eq urls.project_issue_path(project, issues[1])
expect(doc.css('a')[3].text).to eq issues[1].to_reference
# Trailing commit link
expect(doc.css('a')[4].attr('href')).to eq link
expect(doc.css('a')[4].text).to eq ' for real'
end
end
describe '#link_to_markdown' do
let(:link) { '/commits/0a1b2c3d' }
let(:issues) { create_list(:issue, 2, project: project) }
it 'handles references nested in links with all the text' do
actual = helper.link_to_markdown("This should finally fix #{issues[0].to_reference} and #{issues[1].to_reference} for real", link)
doc = Nokogiri::HTML.parse(actual)
# Make sure we didn't create invalid markup
expect(doc.errors).to be_empty
# Leading commit link
expect(doc.css('a')[0].attr('href')).to eq link
expect(doc.css('a')[0].text).to eq 'This should finally fix '
# First issue link
expect(doc.css('a')[1].attr('href'))
.to eq urls.project_issue_path(project, issues[0])
expect(doc.css('a')[1].text).to eq issues[0].to_reference
# Internal commit link
expect(doc.css('a')[2].attr('href')).to eq link
expect(doc.css('a')[2].text).to eq ' and '
# Second issue link
expect(doc.css('a')[3].attr('href'))
.to eq urls.project_issue_path(project, issues[1])
expect(doc.css('a')[3].text).to eq issues[1].to_reference
# Trailing commit link
expect(doc.css('a')[4].attr('href')).to eq link
expect(doc.css('a')[4].text).to eq ' for real'
end
it 'forwards HTML options' do
actual = helper.link_to_markdown("Fixed in #{commit.id}", link, class: 'foo')
doc = Nokogiri::HTML.parse(actual)
expect(doc.css('a')).to satisfy do |v|
# 'foo' gets added to all links
v.all? { |a| a.attr('class').match(/foo$/) }
end
end
it "escapes HTML passed in as the body" do
actual = "This is a <h1>test</h1> - see #{issues[0].to_reference}"
expect(helper.link_to_markdown(actual, link))
.to match('<h1>test</h1>')
end
it 'ignores reference links when they are the entire body' do
text = issues[0].to_reference
act = helper.link_to_markdown(text, '/foo')
expect(act).to eq %Q(<a href="/foo">#{issues[0].to_reference}</a>)
end
it 'replaces commit message with emoji to link' do
actual = link_to_markdown(':book: Book', '/foo')
expect(actual)
.to eq '<a href="/foo"><gl-emoji title="open book" data-name="book" data-unicode-version="6.0">📖</gl-emoji></a><a href="/foo"> Book</a>'
end
end
describe '#link_to_html' do
it 'wraps the rendered content in a link' do
link = '/commits/0a1b2c3d'
issue = create(:issue, project: project)
rendered = helper.markdown("This should finally fix #{issue.to_reference} for real", pipeline: :single_line)
doc = Nokogiri::HTML.parse(rendered)
expect(doc.css('a')[0].attr('href'))
.to eq urls.project_issue_path(project, issue)
expect(doc.css('a')[0].text).to eq issue.to_reference
wrapped = helper.link_to_html(rendered, link)
doc = Nokogiri::HTML.parse(wrapped)
expect(doc.css('a')[0].attr('href')).to eq link
expect(doc.css('a')[0].text).to eq 'This should finally fix '
end
it "escapes HTML passed as an emoji" do
rendered = '<gl-emoji><div class="test">test</div></gl-emoji>'
expect(helper.link_to_html(rendered, '/foo'))
.to eq '<a href="/foo"><gl-emoji><div class="test">test</div></gl-emoji></a>'
end
end
describe '#render_wiki_content' do
let(:wiki) { double('WikiPage', path: "file.#{extension}") }
let(:wiki_repository) { double('Repository') }
let(:context) do
{
pipeline: :wiki, project: project, wiki: wiki,
page_slug: 'nested/page', issuable_state_filter_enabled: true,
repository: wiki_repository
}
end
before do
expect(wiki).to receive(:content).and_return('wiki content')
expect(wiki).to receive(:slug).and_return('nested/page')
expect(wiki).to receive(:repository).and_return(wiki_repository)
helper.instance_variable_set(:@wiki, wiki)
end
context 'when file is Markdown' do
let(:extension) { 'md' }
it 'renders using #markdown_unsafe helper method' do
expect(helper).to receive(:markdown_unsafe).with('wiki content', context)
helper.render_wiki_content(wiki)
end
end
context 'when file is Asciidoc' do
let(:extension) { 'adoc' }
it 'renders using Gitlab::Asciidoc' do
expect(Gitlab::Asciidoc).to receive(:render)
helper.render_wiki_content(wiki)
end
end
context 'any other format' do
let(:extension) { 'foo' }
it 'renders all other formats using Gitlab::OtherMarkup' do
expect(Gitlab::OtherMarkup).to receive(:render)
helper.render_wiki_content(wiki)
end
end
end
describe '#markup' do
let(:content) { 'Noël' }
it 'preserves encoding' do
expect(content.encoding.name).to eq('UTF-8')
expect(helper.markup('foo.rst', content).encoding.name).to eq('UTF-8')
end
it 'delegates to #markdown_unsafe when file name corresponds to Markdown' do
expect(helper).to receive(:gitlab_markdown?).with('foo.md').and_return(true)
expect(helper).to receive(:markdown_unsafe).and_return('NOEL')
expect(helper.markup('foo.md', content)).to eq('NOEL')
end
it 'delegates to #asciidoc_unsafe when file name corresponds to AsciiDoc' do
expect(helper).to receive(:asciidoc?).with('foo.adoc').and_return(true)
expect(helper).to receive(:asciidoc_unsafe).and_return('NOEL')
expect(helper.markup('foo.adoc', content)).to eq('NOEL')
end
it 'uses passed in rendered content' do
expect(helper).not_to receive(:gitlab_markdown?)
expect(helper).not_to receive(:markdown_unsafe)
expect(helper.markup('foo.md', content, rendered: '<p>NOEL</p>')).to eq('<p>NOEL</p>')
end
it 'defaults to CommonMark' do
expect(helper.markup('foo.md', 'x^2')).to include('x^2')
end
end
describe '#markup_unsafe' do
subject { helper.markup_unsafe(file_name, text, context) }
let_it_be(:project_base) { create(:project, :repository) }
let_it_be(:context) { { project: project_base } }
let(:file_name) { 'foo.bar' }
let(:text) { 'Noël' }
context 'when text is missing' do
let(:text) { nil }
it 'returns an empty string' do
is_expected.to eq('')
end
end
context 'when file is a markdown file' do
let(:file_name) { 'foo.md' }
it 'returns html (rendered by Banzai)' do
expected_html = '<p data-sourcepos="1:1-1:5" dir="auto">Noël</p>'
expect(Banzai).to receive(:render).with(text, context) { expected_html }
is_expected.to eq(expected_html)
end
context 'when renderer returns an error' do
before do
allow(Banzai).to receive(:render).and_raise(StandardError, "An error")
end
it 'returns html (rendered by ActionView:TextHelper)' do
is_expected.to eq('<p>Noël</p>')
end
it 'logs the error' do
expect(Gitlab::ErrorTracking).to receive(:track_exception).with(
instance_of(StandardError),
project_id: project.id, file_name: 'foo.md'
)
subject
end
end
end
context 'when file is asciidoc file' do
let(:file_name) { 'foo.adoc' }
it 'returns html (rendered by Gitlab::Asciidoc)' do
expected_html = "<div>\n<p>Noël</p>\n</div>"
expect(Gitlab::Asciidoc).to receive(:render).with(text, context) { expected_html }
is_expected.to eq(expected_html)
end
end
context 'when file is a regular text file' do
let(:file_name) { 'foo.txt' }
it 'returns html (rendered by ActionView::TagHelper)' do
is_expected.to eq('<pre class="plain-readme">Noël</pre>')
end
end
context 'when file has an unknown type' do
let(:file_name) { 'foo.tex' }
it 'returns html (rendered by Gitlab::OtherMarkup)' do
expected_html = 'Noël'
expect(Gitlab::OtherMarkup).to receive(:render).with(file_name, text, context) { expected_html }
is_expected.to eq(expected_html)
end
end
end
describe '#first_line_in_markdown' do
shared_examples_for 'common markdown examples' do
let(:project_base) { build(:project, :repository) }
it 'displays inline code' do
object = create_object('Text with `inline code`')
expected = 'Text with <code>inline code</code>'
expect(first_line_in_markdown(object, attribute, 100, project: project)).to match(expected)
end
it 'truncates the text with multiple paragraphs' do
object = create_object("Paragraph 1\n\nParagraph 2")
expected = 'Paragraph 1...'
expect(first_line_in_markdown(object, attribute, 100, project: project)).to match(expected)
end
it 'displays the first line of a code block' do
object = create_object("```\nCode block\nwith two lines\n```")
expected = %r{<pre.+><code><span class="line">Code block\.\.\.</span>\n</code></pre>}
expect(first_line_in_markdown(object, attribute, 100, project: project)).to match(expected)
end
it 'truncates a single long line of text' do
text = 'The quick brown fox jumped over the lazy dog twice' # 50 chars
object = create_object(text * 4)
expected = (text * 2).sub(/.{3}/, '...')
expect(first_line_in_markdown(object, attribute, 150, project: project)).to match(expected)
end
it 'preserves a link href when link text is truncated' do
text = 'The quick brown fox jumped over the lazy dog' # 44 chars
link_url = 'http://example.com/foo/bar/baz' # 30 chars
input = "#{text}#{text}#{text} #{link_url}" # 163 chars
expected_link_text = 'http://example...</a>'
object = create_object(input)
expect(first_line_in_markdown(object, attribute, 150, project: project)).to match(link_url)
expect(first_line_in_markdown(object, attribute, 150, project: project)).to match(expected_link_text)
end
it 'preserves code color scheme' do
object = create_object("```ruby\ndef test\n 'hello world'\nend\n```")
expected = "<pre class=\"code highlight js-syntax-highlight ruby\">" \
"<code><span class=\"line\"><span class=\"k\">def</span> <span class=\"nf\">test</span>...</span>\n" \
"</code></pre>"
expect(first_line_in_markdown(object, attribute, 150, project: project)).to eq(expected)
end
context 'when images are allowed' do
it 'preserves data-src for lazy images' do
object = create_object("")
image_url = "data-src=\".*/uploads/test.png\""
text = first_line_in_markdown(object, attribute, 150, project: project, allow_images: true)
expect(text).to match(image_url)
expect(text).to match('<a')
end
end
context 'when images are not allowed' do
it 'removes any images' do
object = create_object("")
text = first_line_in_markdown(object, attribute, 150, project: project)
expect(text).not_to match('<img')
expect(text).not_to match('<a')
end
end
context 'labels formatting' do
let(:label_title) { 'this should be ~label_1' }
def create_and_format_label(project)
create(:label, title: 'label_1', project: project)
object = create_object(label_title, project: project)
first_line_in_markdown(object, attribute, 150, project: project)
end
it 'preserves style attribute for a label that can be accessed by current_user' do
project = create(:project, :public)
label = create_and_format_label(project)
expect(label).to match(/span class=.*style=.*/)
expect(label).to include('data-html="true"')
end
it 'does not style a label that can not be accessed by current_user' do
project = create(:project, :private)
label = create_and_format_label(project)
expect(label).to include("~label_1")
expect(label).not_to match(/span class=.*style=.*/)
end
end
it 'keeps whitelisted tags' do
html = '<a><i></i></a> <strong>strong</strong><em>em</em><b>b</b>'
object = create_object(html)
result = first_line_in_markdown(object, attribute, 100, project: project)
expect(result).to include(html)
end
it 'truncates Markdown properly' do
object = create_object("@#{user.username}, can you look at this?\nHello world\n")
actual = first_line_in_markdown(object, attribute, 100, project: project)
doc = Nokogiri::HTML.parse(actual)
# Make sure we didn't create invalid markup
expect(doc.errors).to be_empty
# Leading user link
expect(doc.css('a').length).to eq(1)
expect(doc.css('a')[0].attr('href')).to eq user_path(user)
expect(doc.css('a')[0].text).to eq "@#{user.username}"
expect(doc.content).to eq "@#{user.username}, can you look at this?..."
end
it 'truncates Markdown with emoji properly' do
object = create_object("foo :wink:\nbar :grinning:")
actual = first_line_in_markdown(object, attribute, 100, project: project)
doc = Nokogiri::HTML.parse(actual)
# Make sure we didn't create invalid markup
# But also account for the 2 errors caused by the unknown `gl-emoji` elements
expect(doc.errors.length).to eq(2)
expect(doc.css('gl-emoji').length).to eq(2)
expect(doc.css('gl-emoji')[0].attr('data-name')).to eq 'wink'
expect(doc.css('gl-emoji')[1].attr('data-name')).to eq 'grinning'
expect(doc.content).to eq "foo 😉\nbar 😀"
end
it 'does not post-process truncated text', :request_store do
object = create_object("hello \n\n [Test](README.md)")
expect do
first_line_in_markdown(object, attribute, nil, project: project)
end.not_to change { Gitlab::GitalyClient.get_request_count }
end
end
context 'when the asked attribute can be redacted' do
include_examples 'common markdown examples' do
let(:attribute) { :note }
def create_object(title, project: project_base)
build(:note, note: title, project: project)
end
end
end
context 'when the asked attribute can not be redacted' do
include_examples 'common markdown examples' do
let(:attribute) { :body }
def create_object(title, project: project_base)
issue = build(:issue, title: title)
build(:todo, :done, project: project_base, author: user, target: issue)
end
end
end
end
describe '#cross_project_reference' do
it 'shows the full MR reference' do
expect(helper.cross_project_reference(project, merge_request)).to include(project.full_path)
end
it 'shows the full issue reference' do
expect(helper.cross_project_reference(project, issue)).to include(project.full_path)
end
end
def urls
Gitlab::Routing.url_helpers
end
end
| {
"pile_set_name": "Github"
} |
'use strict';
import path from 'path';
const deploy = ({
gulp,
config,
plugins
}) => {
const dir = config.directory;
// deploy
gulp.task('deploy', (done) => {
return gulp.src(path.join(dir.production, '**/*'))
// fix #4 the "dir.production" folder being published into gh-pages branch
.pipe(plugins.rename(file => {
let pathPartList = file.dirname.split(path.sep);
if (pathPartList[0] === dir.production) {
pathPartList.shift();
file.dirname = pathPartList.join(path.sep);
}
}))
.pipe(plugins.ghPages({
branch: 'gh-pages',
}));
});
};
export default deploy;
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>org.glimpse_editor.Glimpse</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0+ AND LGPL-3.0+</project_license>
<name>Glimpse</name>
<name xml:lang="ar">جمب</name>
<name xml:lang="ast">Glimpse</name>
<name xml:lang="br">Kuitaat Glimpse</name>
<name xml:lang="bs">Zatvori Glimpse</name>
<name xml:lang="ca">Surt de Glimpse</name>
<name xml:lang="da">Afslut Glimpse</name>
<name xml:lang="en_GB">Glimpse</name>
<name xml:lang="ka">Glimpse</name>
<summary>Create images and edit photographs</summary>
<summary xml:lang="ar">أنشئ صورا وحرّر لقطات</summary>
<summary xml:lang="ast">Cree imáxenes y edite semeyes</summary>
<summary xml:lang="be">Стварэньне відарысаў і праўленьне фатаздымкаў</summary>
<summary xml:lang="bg">Създаване на изображения и редакция на снимки</summary>
<summary xml:lang="br">Krouiñ hag embann skeudennoù pe luc'hskeudennoù</summary>
<summary xml:lang="bs">Napravite slike i obradite fotografije</summary>
<summary xml:lang="ca">Creeu imatges i editeu fotografies</summary>
<summary xml:lang="ca@valencia">Creeu imatges i editeu fotografies</summary>
<summary xml:lang="cs">Vytvářejte obrázky a upravujte fotografie</summary>
<summary xml:lang="da">Opret billeder og redigér fotografier</summary>
<summary xml:lang="de">Bilder erstellen und Fotografien bearbeiten</summary>
<summary xml:lang="dz">གཟུགས་བརྙན་ཚུ་ གསར་བསྐྲུན་འབད་ནི་དང་ དཔར་ཚུ་ཞུན་དག་འབད།</summary>
<summary xml:lang="el">Δημιουργία εικόνων και επεξεργασία φωτογραφιών</summary>
<summary xml:lang="en_CA">Create images and edit photographs</summary>
<summary xml:lang="en_GB">Create images and edit photographs</summary>
<summary xml:lang="eo">Krei bildojn aŭ redakti fotaĵojn</summary>
<summary xml:lang="es">Cree imágenes y edite fotografías</summary>
<summary xml:lang="et">Joonistamine ja fotode töötlemine</summary>
<summary xml:lang="eu">Sortu irudiak eta editatu argazkiak</summary>
<summary xml:lang="fi">Luo kuvia ja muokkaa valokuvia</summary>
<summary xml:lang="fr">Créer des images et modifier des photographies</summary>
<summary xml:lang="gd">Cruthaich dealbhan is deasaich dealbhan camara</summary>
<summary xml:lang="gl">Crear imaxes e editar fotografías</summary>
<summary xml:lang="gu">ચિત્રો બનાવો અને ફોટાઓમાં ફેરફાર કરો</summary>
<summary xml:lang="hr">Stvarajte slike i uređujte fotografije</summary>
<summary xml:lang="hu">Képek létrehozása és fotók szerkesztése</summary>
<summary xml:lang="id">Buat gambar dan sunting foto</summary>
<summary xml:lang="is">Búa til myndir og breyta ljósmyndum</summary>
<summary xml:lang="it">Crea immagini e modifica fotografie</summary>
<summary xml:lang="ja">画像の作成と写真の編集を行います</summary>
<summary xml:lang="kk">Суреттерді жасау және фотоларды түзету</summary>
<summary xml:lang="km">បង្កើតរូបភាព និង កែសម្រួលរូបថត</summary>
<summary xml:lang="kn">ಚಿತ್ರಗಳನ್ನು ರಚಿಸಿ ಹಾಗು ಫೋಟೋಗ್ರಾಫ್ಗಳನ್ನು ಸಂಪಾದಿಸಿ</summary>
<summary xml:lang="ko">이미지를 만들고 사진을 편집합니다</summary>
<summary xml:lang="lt">Kurti paveikslėlius ir redaguoti fotografijas</summary>
<summary xml:lang="lv">Veido attēlus vai rediģē fotogrāfijas</summary>
<summary xml:lang="mk">Направи слики и уреди фотографии</summary>
<summary xml:lang="mr">प्रतिमा तयार करा आणि छायाचित्रे संपादित करा</summary>
<summary xml:lang="my">ရုပ်ပုံများကို ဖန်တီးပြီး ဓါတ်ပုံများကို တည်းဖြတ်ပါ</summary>
<summary xml:lang="nb">Lag bilder og rediger fotografier</summary>
<summary xml:lang="ne">छवि सिर्जना गर्नुहोस् र फोटोग्राफ सम्पादन गर्नुहोस्</summary>
<summary xml:lang="nl">Afbeeldingen aanmaken en foto's bewerken</summary>
<summary xml:lang="nn">Lag teikningar eller rediger foto</summary>
<summary xml:lang="oc">Crear d'imatges e modificar de fotografias</summary>
<summary xml:lang="pa">ਚਿੱਤਰ ਬਣਾਓ ਅਤੇ ਤਸਵੀਰਾਂ ਸੋਧੋ</summary>
<summary xml:lang="pl">Tworzenie oraz obróbka obrazów i fotografii</summary>
<summary xml:lang="pt">Criar imagens e editar fotografias</summary>
<summary xml:lang="pt_BR">Crie e edite imagens ou fotografias</summary>
<summary xml:lang="ro">Creează imagini și editează fotografii</summary>
<summary xml:lang="ru">Создание изображений и редактирование фотографий</summary>
<summary xml:lang="sk">Vytvárajte a upravujte obrázky alebo fotografie</summary>
<summary xml:lang="sl">Ustvari slike in uredi fotografije</summary>
<summary xml:lang="sr">Направите нове сличице и средите ваше фотографије</summary>
<summary xml:lang="sr@latin">Napravite slike i uredite fotografije</summary>
<summary xml:lang="sv">Skapa bilder och redigera fotografier</summary>
<summary xml:lang="ta">பிம்பங்களை உருவாக்கவும் மற்றும் படங்களை திருத்தவும்</summary>
<summary xml:lang="te">బొమ్మలను సృష్టించు మరియు చిత్రాలను సవరించు</summary>
<summary xml:lang="tr">Görüntü oluşturur ve fotoğraf düzenler</summary>
<summary xml:lang="uk">Створення зображень та редагування фотографій</summary>
<summary xml:lang="vi">Tạo và biên soạn ảnh hay ảnh chụp</summary>
<summary xml:lang="zh_CN">创建图像或编辑照片</summary>
<summary xml:lang="zh_HK">建立圖像與編輯照片</summary>
<summary xml:lang="zh_TW">建立圖像與編輯照片</summary>
<description>
<p>Glimpse Image Editor is a usability-focused free software application capable of expert level image manipulation.</p>
<p>Simple tasks like cropping, transforming and retouching photos can be achieved in just a few clicks. Professional features like batch image processing, color balance correction and automated format conversions are also included.</p>
<p>Glimpse is based on the GNU Image Manipulation Program 2.10, so it is extensible and fully compatible with the same plug-ins, themes and save files. It is available for Windows and Linux.</p>
</description>
<url type="homepage">https://glimpse-editor.github.io</url>
<url type="donation">https://opencollective.com/glimpse</url>
<url type="bugtracker">https://github.com/glimpse-editor/Glimpse/issues/new</url>
<update_contact>glimpse.editor_AT_icloud.com</update_contact>
<screenshots>
<screenshot type="default">
<image>https://glimpse-editor.github.io/flatpak/0.2/dark-theme1.png</image>
<caption>Crop and transform images in just a few clicks</caption>
</screenshot>
<screenshot>
<image>https://glimpse-editor.github.io/flatpak/0.2/light-theme2.png</image>
<caption>Apply professional filters and create animations</caption>
</screenshot>
</screenshots>
<keywords>
<keyword>GIMP</keyword>
<keyword>Photoshop</keyword>
</keywords>
<translation type="gettext">gimp20</translation>
<launchable type="desktop-id">org.glimpse_editor.Glimpse.desktop</launchable>
<releases>
<release version="0.2.0" date="2020-08-25">
<url type="details">https://glimpse-editor.github.io/posts/glimpse-0-2-0-release-notes/</url>
<description>
<p>Glimpse 0.2.0 rebases on a newer version of the GNU Image Manipulation Program and makes minor tweaks and improvements.</p>
<ul><li> Every feature in the GNU Image Manipulation Program 2.10.18 </li> <li> Customized icon packs with the Glimpse logo </li> <li> Backported security fixes </li> <li> Updated documentation and in-app links </li> <li> Fully reproducible builds </li></ul>
</description>
</release>
<release version="0.1.2" date="2020-03-02">
<url type="details">https://glimpse-editor.github.io/posts/glimpse-0-1-2-release-notes/</url>
<description>
<p>Glimpse 0.1.2 builds on our very first "minimum viable product" release with minor tweaks and bug fixes.</p>
<ul><li> Improved non-English translations and rebranding </li> <li> Upstream contributors are better credited in the UI </li> <li> "Color" icon pack and the "Gray" UI theme are back </li> <li> Rebranded "Gimpressionist" plug-in and text color chooser </li> <li> Unnecessary "fun" brushes have been removed </li></ul>
</description>
</release>
<release version="0.1.0" date="2019-11-20">
<url type="details">https://glimpse-editor.github.io/posts/glimpse-0-1-0-release-notes/</url>
<description>
<p>After four months of intensive effort, Glimpse 0.1.0 is our very first binary release. We would like to thank everyone that has supported the project so far and look forward to building on this work in future releases.</p>
<ul><li> Every feature in the GNU Image Manipulation Program 2.10.12 </li> <li> Professional branding throughout the application </li> <li> De-cluttered user interface without animal mascots and "easter eggs" </li> <li> Full plug-in, theme and save file compatibility with the GNU Image Manipulation Program </li> <li> Improved build/packaging tools and developer documentation </li></ul>
</description>
</release>
</releases>
<content_rating type="oars-1.1"/>
</component> | {
"pile_set_name": "Github"
} |
### ByteTextEncoder
### Metadata: {}
| {
"pile_set_name": "Github"
} |
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @providesModule DatePickerIOS
*/
'use strict';
var React = require('React');
var StyleSheet = require('StyleSheet');
var Text = require('Text');
var View = require('View');
var DummyDatePickerIOS = React.createClass({
render: function() {
return (
<View style={[styles.dummyDatePickerIOS, this.props.style]}>
<Text style={styles.datePickerText}>DatePickerIOS is not supported on this platform!</Text>
</View>
);
},
});
var styles = StyleSheet.create({
dummyDatePickerIOS: {
height: 100,
width: 300,
backgroundColor: '#ffbcbc',
borderWidth: 1,
borderColor: 'red',
alignItems: 'center',
justifyContent: 'center',
margin: 10,
},
datePickerText: {
color: '#333333',
margin: 20,
}
});
module.exports = DummyDatePickerIOS;
| {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.