answer stringlengths 15 1.25M |
|---|
#ifndef __WINDOW_H__
#define __WINDOW_H__
#include "Rectangle.h"
#include "DeviceContext.h"
#include "RegExp.h"
#include "Winvar.h"
#include "GuiScript.h"
#include "SimpleWindow.h"
const int WIN_CHILD = 0x00000001;
const int WIN_CAPTION = 0x00000002;
const int WIN_BORDER = 0x00000004;
const int WIN_SIZABLE = 0x00000008;
const int WIN_MOVABLE = 0x00000010;
const int WIN_FOCUS = 0x00000020;
const int WIN_CAPTURE = 0x00000040;
const int WIN_HCENTER = 0x00000080;
const int WIN_VCENTER = 0x00000100;
const int WIN_MODAL = 0x00000200;
const int WIN_INTRANSITION = 0x00000400;
const int WIN_CANFOCUS = 0x00000800;
const int WIN_SELECTED = 0x00001000;
const int WIN_TRANSFORM = 0x00002000;
const int WIN_HOLDCAPTURE = 0x00004000;
const int WIN_NOWRAP = 0x00008000;
const int WIN_NOCLIP = 0x00010000;
const int WIN_INVERTRECT = 0x00020000;
const int WIN_NATURALMAT = 0x00040000;
const int WIN_NOCURSOR = 0x00080000;
const int WIN_MENUGUI = 0x00100000;
const int WIN_ACTIVE = 0x00200000;
const int WIN_SHOWCOORDS = 0x00400000;
const int WIN_SHOWTIME = 0x00800000;
const int WIN_WANTENTER = 0x01000000;
const int WIN_DESKTOP = 0x10000000;
const char CAPTION_HEIGHT[] = "16.0";
const char SCROLLER_SIZE[] = "16.0";
const int SCROLLBAR_SIZE = 16;
const int MAX_WINDOW_NAME = 32;
const int MAX_LIST_ITEMS = 1024;
const char DEFAULT_BACKCOLOR[] = "1 1 1 1";
const char DEFAULT_FORECOLOR[] = "0 0 0 1";
const char DEFAULT_BORDERCOLOR[] = "0 0 0 1";
const char DEFAULT_TEXTSCALE[] = "0.4";
typedef enum {
WOP_TYPE_ADD,
WOP_TYPE_SUBTRACT,
WOP_TYPE_MULTIPLY,
WOP_TYPE_DIVIDE,
WOP_TYPE_MOD,
WOP_TYPE_TABLE,
WOP_TYPE_GT,
WOP_TYPE_GE,
WOP_TYPE_LT,
WOP_TYPE_LE,
WOP_TYPE_EQ,
WOP_TYPE_NE,
WOP_TYPE_AND,
WOP_TYPE_OR,
WOP_TYPE_VAR,
WOP_TYPE_VARS,
WOP_TYPE_VARF,
WOP_TYPE_VARI,
WOP_TYPE_VARB,
WOP_TYPE_COND
} wexpOpType_t;
typedef enum {
WEXP_REG_TIME,
<API key>
} wexpRegister_t;
typedef struct {
wexpOpType_t opType;
int a, b, c, d;
} wexpOp_t;
struct idRegEntry {
const char *name;
idRegister::REGTYPE type;
int index;
};
class rvGEWindowWrapper;
class idWindow;
struct idTimeLineEvent {
idTimeLineEvent() {
event = new idGuiScriptList;
}
~idTimeLineEvent() {
delete event;
}
int time;
idGuiScriptList *event;
bool pending;
size_t Size() {
return sizeof( *this ) + event->Size();
}
};
class rvNamedEvent {
public:
rvNamedEvent( const char *name ) {
mEvent = new idGuiScriptList;
mName = name;
}
~rvNamedEvent( void ) {
delete mEvent;
}
size_t Size() {
return sizeof( *this ) + mEvent->Size();
}
idStr mName;
idGuiScriptList *mEvent;
};
struct idTransitionData {
idWinVar *data;
int offset;
<API key><idVec4> interp;
};
class <API key>;
class idWindow {
public:
idWindow( <API key> *gui );
idWindow( idDeviceContext *d, <API key> *gui );
virtual ~idWindow();
enum {
ON_MOUSEENTER = 0,
ON_MOUSEEXIT,
ON_ACTION,
ON_ACTIVATE,
ON_DEACTIVATE,
ON_ESC,
ON_FRAME,
ON_TRIGGER,
ON_ACTIONRELEASE,
ON_ENTER,
ON_ENTERRELEASE,
SCRIPT_COUNT
};
enum {
ADJUST_MOVE = 0,
ADJUST_TOP,
ADJUST_RIGHT,
ADJUST_BOTTOM,
ADJUST_LEFT,
ADJUST_TOPLEFT,
ADJUST_BOTTOMRIGHT,
ADJUST_TOPRIGHT,
ADJUST_BOTTOMLEFT
};
static const char *ScriptNames[SCRIPT_COUNT];
static const idRegEntry RegisterVars[];
static const int NumRegisterVars;
void SetDC( idDeviceContext *d );
idDeviceContext *GetDC( void ) {
return dc;
}
idWindow *SetFocus( idWindow *w, bool scripts = true );
idWindow *SetCapture( idWindow *w );
void SetParent( idWindow *w );
void SetFlag( unsigned int f );
void ClearFlag( unsigned int f );
unsigned GetFlags() {
return flags;
};
void Move( float x, float y );
void BringToTop( idWindow *w );
void Adjust( float xd, float yd );
void SetAdjustMode( idWindow *child );
void Size( float x, float y, float w, float h );
void SetupFromState();
void SetupBackground();
drawWin_t *FindChildByName( const char *name );
idSimpleWindow *FindSimpleWinByName( const char *_name );
idWindow *GetParent() {
return parent;
}
<API key> *GetGui() {
return gui;
};
bool Contains( float x, float y );
size_t Size();
virtual size_t Allocated();
idStr *GetStrPtrByName( const char *_name );
virtual idWinVar *GetWinVarByName( const char *_name, bool winLookup = false, drawWin_t **owner = NULL );
int GetWinVarOffset( idWinVar *wv, drawWin_t *dw );
float GetMaxCharHeight();
float GetMaxCharWidth();
void SetFont();
void SetInitialState( const char *_name );
void AddChild( idWindow *win );
void DebugDraw( int time, float x, float y );
void CalcClientRect( float xofs, float yofs );
void CommonInit();
void CleanUp();
void <API key>( const idRectangle &drawRect );
void DrawCaption( int time, float x, float y );
void SetupTransforms( float x, float y );
bool Contains( const idRectangle &sr, float x, float y );
const char *GetName() {
return name;
};
virtual bool Parse( idParser *src, bool rebuild = true );
virtual const char *HandleEvent( const sysEvent_t *event, bool *updateVisuals );
void CalcRects( float x, float y );
virtual void Redraw( float x, float y );
virtual void ArchiveToDictionary( idDict *dict, bool useNames = true );
virtual void InitFromDictionary( idDict *dict, bool byName = true );
virtual void PostParse();
virtual void Activate( bool activate, idStr &act );
virtual void Trigger();
virtual void GainFocus();
virtual void LoseFocus();
virtual void GainCapture();
virtual void LoseCapture();
virtual void Sized();
virtual void Moved();
virtual void Draw( int time, float x, float y );
virtual void MouseExit();
virtual void MouseEnter();
virtual void DrawBackground( const idRectangle &drawRect );
virtual const char *RouteMouseCoords( float xd, float yd );
virtual void SetBuddy( idWindow *buddy ) {};
virtual void HandleBuddyUpdate( idWindow *buddy ) {};
virtual void StateChanged( bool redraw );
virtual void ReadFromDemoFile( class idDemoFile *f, bool rebuild = true );
virtual void WriteToDemoFile( class idDemoFile *f );
// SaveGame support
void WriteSaveGameString( const char *string, idFile *savefile );
void <API key>( idTransitionData &trans, idFile *savefile );
virtual void WriteToSaveGame( idFile *savefile );
void ReadSaveGameString( idStr &string, idFile *savefile );
void <API key>( idTransitionData &trans, idFile *savefile );
virtual void ReadFromSaveGame( idFile *savefile );
void FixupTransitions();
virtual void HasAction() {};
virtual void HasScripts() {};
void FixupParms();
void GetScriptString( const char *name, idStr &out );
void SetScriptParams();
bool HasOps() {
return ( ops.Num() > 0 );
};
float EvalRegs( int test = -1, bool force = false );
void StartTransition();
void AddTransition( idWinVar *dest, idVec4 from, idVec4 to, int time, float accelTime, float decelTime );
void ResetTime( int time );
void ResetCinematics();
int NumTransitions();
bool ParseScript( idParser *src, idGuiScriptList &list, int *timeParm = NULL, bool allowIf = false );
bool RunScript( int n );
bool RunScriptList( idGuiScriptList *src );
void SetRegs( const char *key, const char *val );
int ParseExpression( idParser *src, idWinVar *var = NULL, int component = 0 );
int ExpressionConstant( float f );
idRegisterList *RegList() {
return ®List;
}
void AddCommand( const char *cmd );
void AddUpdateVar( idWinVar *var );
bool Interactive();
bool ContainsStateVars();
void SetChildWinVarVal( const char *name, const char *var, const char *val );
idWindow *GetFocusedChild();
idWindow *GetCaptureChild();
const char *GetComment() {
return comment;
}
void SetComment( const char *p ) {
comment = p;
}
idStr cmd;
virtual void RunNamedEvent( const char *eventName );
void AddDefinedVar( idWinVar *var );
idWindow *FindChildByPoint( float x, float y, idWindow *below = NULL );
int GetChildIndex( idWindow *window );
int GetChildCount( void );
idWindow *GetChild( int index );
void RemoveChild( idWindow *win );
bool InsertChild( idWindow *win, idWindow *before );
void ScreenToClient( idRectangle *rect );
void ClientToScreen( idRectangle *rect );
bool <API key>( idDict &dict );
protected:
friend class rvGEWindowWrapper;
idWindow *FindChildByPoint( float x, float y, idWindow **below );
void SetDefaults( void );
friend class idSimpleWindow;
friend class <API key>;
bool IsSimple();
void UpdateWinVars();
void DisableRegister( const char *_name );
void Transition();
void Time();
bool RunTimeEvents( int time );
void Dump();
int ExpressionTemporary();
wexpOp_t *ExpressionOp();
int EmitOp( int a, int b, wexpOpType_t opType, wexpOp_t **opp = NULL );
int ParseEmitOp( idParser *src, int a, wexpOpType_t opType, int priority, wexpOp_t **opp = NULL );
int ParseTerm( idParser *src, idWinVar *var = NULL, int component = 0 );
int <API key>( idParser *src, int priority, idWinVar *var = NULL, int component = 0 );
void EvaluateRegisters( float *registers );
void <API key>();
void <API key>();
void <API key>( idParser *src );
bool ParseScriptEntry( const char *name, idParser *src );
bool ParseRegEntry( const char *name, idParser *src );
virtual bool ParseInternalVar( const char *name, idParser *src );
void ParseString( idParser *src, idStr &out );
void ParseVec4( idParser *src, idVec4 &out );
void ConvertRegEntry( const char *name, idParser *src, idStr &out, int tabs );
float actualX; // physical coords
float actualY;
int childID; // this childs id
unsigned int flags; // visible, focus, mouseover, cursor, border, etc..
int lastTimeRun;
idRectangle drawRect; // overall rect
idRectangle clientRect; // client area
idVec2 origin;
int timeLine; // time stamp used for various fx
float xOffset;
float yOffset;
float forceAspectWidth;
float forceAspectHeight;
float matScalex;
float matScaley;
float borderSize;
float textAlignx;
float textAligny;
idStr name;
idStr comment;
idVec2 shear;
signed char textShadow;
unsigned char fontNum;
unsigned char cursor;
signed char textAlign;
idWinBool noTime;
idWinBool visible;
idWinBool noEvents;
idWinRectangle rect; // overall rect
idWinVec4 backColor;
idWinVec4 matColor;
idWinVec4 foreColor;
idWinVec4 hoverColor;
idWinVec4 borderColor;
idWinFloat textScale;
idWinFloat rotate;
idWinStr text;
idWinBackground backGroundName;
idList<idWinVar *> definedVars;
idList<idWinVar *> updateVars;
idRectangle textRect; // text extented rect
const idMaterial *background; // background asset
idWindow *parent; // parent window
idList<idWindow *> children; // child windows
idList<drawWin_t> drawWindows;
idWindow *focusedChild; // if a child window has the focus
idWindow *captureChild; // if a child window has mouse capture
idWindow *overChild; // if a child window has mouse capture
bool hover;
idDeviceContext *dc;
<API key> *gui;
static idCVar gui_debug;
static idCVar gui_edit;
idGuiScriptList *scripts[SCRIPT_COUNT];
bool *saveTemps;
idList<idTimeLineEvent *> timeLineEvents;
idList<idTransitionData> transitions;
static bool registerIsTemporary[<API key>]; // statics to assist during parsing
idList<wexpOp_t> ops; // evaluate to make expressionRegisters
idList<float> expressionRegisters;
idList<wexpOp_t> *saveOps; // evaluate to make expressionRegisters
idList<rvNamedEvent *> namedEvents; // added named events
idList<float> *saveRegs;
idRegisterList regList;
idWinBool hideCursor;
};
ID_INLINE void idWindow::AddDefinedVar( idWinVar *var ) {
definedVars.AddUnique( var );
}
#endif /* !__WINDOW_H__ */ |
package com.samourai.sentinel;
import android.app.Application;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.support.multidex.MultiDex;
import com.samourai.sentinel.tor.TorService;
import com.samourai.sentinel.util.ConnectivityStatus;
import com.samourai.sentinel.util.PrefsUtil;
public class SentinelApplication extends Application {
public static String TOR_CHANNEL_ID = "TOR_CHANNEL";
@Override
public void onCreate() {
super.onCreate();
setUpChannels();
if (PrefsUtil.getInstance(this).getValue(PrefsUtil.ENABLE_TOR, false)) {
startService();
}
}
public void startService() {
if (ConnectivityStatus.hasConnectivity(<API key>()) && PrefsUtil.getInstance(<API key>()).getValue(PrefsUtil.ENABLE_TOR, false)) {
Intent startIntent = new Intent(this, TorService.class);
startIntent.setAction(TorService.START_SERVICE);
startService(startIntent);
}
}
private void setUpChannels() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
NotificationChannel serviceChannel = new NotificationChannel(
TOR_CHANNEL_ID,
"Tor service ",
NotificationManager.IMPORTANCE_DEFAULT
);
serviceChannel.setSound(null, null);
NotificationManager manager = getSystemService(NotificationManager.class);
if (manager != null) {
manager.<API key>(serviceChannel);
}
}
}
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
} |
title: A New Phase in Life
date: '2008-03-20 21:56:17'
tags:
- energyaustralia
- iec61850
- <API key>
- life
- moving-out
- opinion
- surry-hills
- sydney
- technology
- technology-analyst
<p style="text-align: center;"><a href="http:
<p style="text-align: center;"><small>Part of my new roll...distribution monitoring!</small></p>
So another new phase in my life has come about with the start of March. Last year I ended up moving to <a href="http:
Read more after the break...
<!--more
<h3>Moving Out</h3>
After six months back in Sydney, working as a graduate engineer for the Demand Management section. During this time I realised once again, after twelve months away from the city transport routes, just how bad <a href="http://euphemize.net/blog/archives/2008/01/31/<API key>/">traveling from the Northern Beaches through Mosman to the city</a> each day is. Housesitting for both Seb at Dee Why in the lead up to New Years while he was visiting his family and girlfriend in Europe and then Stuart and Sarah's Haberfield house as they were on their Tasmanian honeymoon definitely woke me up to the fact that my bus travel time has definitely been way <strong>way</strong> too high.
Given that my high school mates weren't interested in a move out to the inner-west, I had to look further afield. There was originally an option from a friend-of-a-friend to move out to Zetland, however when Ben, my former flatmate from Newcastle, told me he was heading down to Sydney I decided to go with someone I knew. Originally I hit up the inspections around in the inner-west, however we soon had an offer that we couldn't pass up - a couple of rooms had become available in Surry Hills with some of Ben's friends from New College. With the option locked in, it took me a couple of weeks to move in - first getting the furniture I'd "stored" in Newcastle (<strong>*ahem*</strong> I kinda hadn't quite got back up there to pick my stuff up again<strong>*ahem*</strong>) moved in and then a week later moving myself in and setting up some semblance of a room.
<p style="text-align: center;"><a href="http:
<p style="text-align: center;"><small>My (new) room in Surry Hills</small></p>
One of the things I noted when I was packing my room up at my parents place in North Narrabeen to move out was that I'd misplaced one particular box that has a cable "cage" for tidying computer and electrical cables and the screws to join the desk to the frame - so currently it's an interesting arrangement. I should thank Stuart and Sarah for giving me a hand carting about half a tonne of books up two flights of stairs as my room is "in the attic" - but it's got a massive amount of room which is awesome. Only really need another bookshelf, probably one of ikea's <a href="http:
<h3>A New Position</h3>
To go with the new location for living, I also accepted an offer for a new position as Technology Analyst with the Intelligent Network Group at EnergyAustralia. Finally moving off the graduate program, some might consider my time about 7 months late as I was able to for that amount of time, and jumping very much into the deep end as I take on my new roll. To date it has been interesting, challenging and also quite exhausting but definitely enjoyable. Time will tell how I go, but within three weeks of starting I feel that I'm already making headway with the work I'm undertaking.
<h3>The New Life</h3>
So with a new place to live, now within walking distance from work, and a new position to throw myself at, the next six months will be hectic, intense but above all fun. I'll try and keep a few updates of life as I move through the different phases of work and contribute comments I can make on here. |
--Data type way of creating a Person
{-data Person = Person String String Int Float String String deriving (Show)
firstName :: Person -> String
firstName (Person firstname _ _ _ _ _) = firstname
lastName :: Person -> String
lastName (Person _ lastname _ _ _ _) = lastname
age :: Person -> Int
age (Person _ _ age _ _ _) = age
height :: Person -> Float
height (Person _ _ _ height _ _) = height
phoneNumber :: Person -> String
phoneNumber (Person _ _ _ _ number _) = number
flavor :: Person -> String
flavor (Person _ _ _ _ _ flavor) = flavor -}
--Record way
{-data Person = Person { firstName :: String
, lastName :: String
, age :: Int
, height :: Float
, phoneNumber :: String
, flavor :: String } deriving (Show) -}
data Person = Person
{
firstName :: String
, lastName :: String
, age :: Int
} deriving (Eq, Show, Read)
mikeD = Person "Michael" "Diamond" 43
adRock = Person "Adam" "horovitz" 41
mca = Person "Adam" "Yauch" 44
mysteryDude = "Person { firstName =\"Michael\"" ++
", lastName =\"Diamond\"" ++
", age = 43}" |
/* This code is from here - */
#include "toksplit.h"
/* copy over the next token from an input string, after
skipping leading blanks (or other whitespace?). The
token is terminated by the first appearance of tokchar,
or by the end of the source string.
The caller must supply sufficient space in token to
receive any token, Otherwise tokens will be truncated.
Returns: a pointer past the terminating tokchar.
This will happily return an infinity of empty tokens if
called with src pointing to the end of a string. Tokens
will never include a copy of tokchar.
A better name would be "strtkn", except that is reserved
for the system namespace. Change to that at your risk.
released to Public Domain, by C.B. Falconer.
Published 2006-02-20. Attribution appreciated.
*/
const char *toksplit(const char *src, /* Source of tokens */
char tokchar, /* token delimiting char */
char *token, /* receiver of parsed token */
size_t lgh) /* length token can receive */
/* not including final '\0' */
{
if (src) {
while (' ' == *src) *src++;
while (*src && (tokchar != *src)) {
if (lgh) {
*token++ = *src;
--lgh;
}
src++;
}
if (*src && (tokchar == *src)) src++;
}
*token = '\0';
return src;
} /* toksplit */
#ifdef TESTING
#include <stdio.h>
#define ABRsize 6 /* length of acceptable token abbreviations */
int main(void)
{
char teststring[] = "This is a test, ,, abbrev, more";
const char *t, *s = teststring;
int i;
char token[ABRsize + 1];
puts(teststring);
t = s;
for (i = 0; i < 4; i++) {
t = toksplit(t, ',', token, ABRsize);
putchar(i + '1'); putchar(':');
puts(token);
}
puts("\nHow to detect 'no more tokens'");
t = s; i = 0;
while (*t) {
t = toksplit(t, ',', token, 3);
putchar(i + '1'); putchar(':');
puts(token);
i++;
}
puts("\nUsing blanks as token delimiters");
t = s; i = 0;
while (*t) {
t = toksplit(t, ' ', token, ABRsize);
putchar(i + '1'); putchar(':');
puts(token);
i++;
}
return 0;
} /* main */
#endif |
package com.magiclegend.gdxtestgame.world.tile;
import java.util.HashMap;
public abstract class TileType {
public static final int TILE_SIZE = 76; //Pixel width/height of the texture
public static final HashMap<Integer, TileType> tileMap = new HashMap<Integer, TileType>();
private static int counter = 0;
public abstract int getId();
public abstract boolean isCollidable();
public abstract Texture getTexture();
/**
* Adds a tile to the tileMap HashMap. The HashMap is based on the id of the tile and the tile itself.
* @param tile The tile that should be added to the HashMap.
*/
public static void addTile(TileType tile) {
tileMap.put(tile.getId(), tile);
}
/**
* Returns the count value that is used as an ID for all the tiles.
* @param increment Trick to allow for an getCounter return value that is the <b>current</b> value; but also allow for an incrementation of the value upon function call.
* @return counter; either incremented or the current value.
*/
public static int getCounter(int increment) {
if (increment != 0) {
counter += increment;
}
return counter;
}
/**
* Returns the Texture object of the given tile.
* @param id The id of the tile that the Texture object should be returned for.
* @return The Texture object of the given tile.
*/
public static Texture getTextureById(int id) {
return tileMap.get(id).getTexture();
}
} |
using System;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using SF = Microsoft.CodeAnalysis.CSharp.SyntaxFactory;
using System.Collections.Generic;
namespace SixtenLabs.Spawn.CSharp.Extensions
{
public static partial class <API key>
{
public static <API key> <API key>(this PropertyDefinition propertyDefinition)
{
var modifiers = GetModifierTokens(propertyDefinition.ModifierDefinitions);
var returnType = SF.ParseTypeName(propertyDefinition.ReturnType.Output);
var accessors = GetAccessors(propertyDefinition.Getter, propertyDefinition.Setter);
var initializer = propertyDefinition.DefaultValue.GetInitializer();
var declaration = SF.PropertyDeclaration(returnType, SF.Identifier(propertyDefinition.Name.Output))
.WithModifiers(modifiers)
.WithAccessorList(accessors)
.WithInitializer(initializer);
return declaration;
}
public static IList<<API key>> <API key>(this IList<PropertyDefinition> definitions)
{
var list = new List<<API key>>();
foreach (var property in definitions)
{
var propertyDeclaration = <API key>(property);
list.Add(propertyDeclaration);
}
return list;
}
}
} |
package org.hibernate.envers.revisioninfo;
import java.io.Serializable;
import java.util.Date;
import org.hibernate.MappingException;
import org.hibernate.Session;
import org.hibernate.envers.<API key>;
import org.hibernate.envers.RevisionListener;
import org.hibernate.envers.RevisionType;
import org.hibernate.envers.entities.PropertyData;
import org.hibernate.envers.synchronization.SessionCacheCleaner;
import org.hibernate.envers.tools.reflection.ReflectionTools;
import org.hibernate.property.Setter;
/**
* @author Adam Warski (adam at warski dot org)
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
*/
public class <API key> implements <API key> {
private final String <API key>;
private final RevisionListener listener;
private final Setter <API key>;
private final boolean timestampAsDate;
private final Class<?> revisionInfoClass;
private final SessionCacheCleaner sessionCacheCleaner;
public <API key>(String <API key>, Class<?> revisionInfoClass,
Class<? extends RevisionListener> listenerClass,
PropertyData <API key>,
boolean timestampAsDate) {
this.<API key> = <API key>;
this.revisionInfoClass = revisionInfoClass;
this.timestampAsDate = timestampAsDate;
<API key> = ReflectionTools.getSetter(revisionInfoClass, <API key>);
if (!listenerClass.equals(RevisionListener.class)) {
// This is not the default value.
try {
listener = listenerClass.newInstance();
} catch (<API key> e) {
throw new MappingException(e);
} catch (<API key> e) {
throw new MappingException(e);
}
} else {
// Default listener - none
listener = null;
}
sessionCacheCleaner = new SessionCacheCleaner();
}
public void saveRevisionData(Session session, Object revisionData) {
session.save(<API key>, revisionData);
sessionCacheCleaner.<API key>(session, revisionData);
}
public Object generate() {
Object revisionInfo;
try {
revisionInfo = revisionInfoClass.newInstance();
} catch (Exception e) {
throw new RuntimeException(e);
}
long timestamp = System.currentTimeMillis();
<API key>.set(revisionInfo, timestampAsDate ? new Date(timestamp) : timestamp, null);
if (listener != null) {
listener.newRevision(revisionInfo);
}
return revisionInfo;
}
public void entityChanged(Class entityClass, String entityName, Serializable entityId, RevisionType revisionType,
Object revisionInfo) {
if (listener instanceof <API key>) {
((<API key>) listener).entityChanged(entityClass, entityName, entityId, revisionType,
revisionInfo);
}
}
} |
"""Retrieves the Source and Destination station pairs for APSRTC buses
"""
import scraperwiki
import lxml.html
base_url = 'http:
sources = dict()
def get_sources():
html = scraperwiki.scrape(base_url)
assert 'APSRTC Official Website' in html
root = lxml.html.fromstring(html)
for option in root.cssselect('select[name=source] option'):
id = option.get('value')
if not id:
continue
name = str(option.text_content()).strip()
sources[id] = name
def get_destinations():
for source_id in sources:
print "Fetching destinations for", source_id
url = base_url + 'getdestinations.php?sourceid=' + source_id
html = scraperwiki.scrape(url)
root = lxml.html.fromstring(html)
data = []
for option in root.cssselect('select[name=destination] option'):
destination_id = option.get('value')
if not destination_id:
continue
destination_name = str(option.text_content()).strip()
data.append(dict(source_id=source_id,
source_name=sources[source_id],
destination_id=destination_id,
destination_name=destination_name))
scraperwiki.sqlite.save(data=data,
unique_keys=['source_name',
'destination_name'])
get_sources()
get_destinations() |
# Change Log
All notable changes to this project will be documented in this file.
## [1.0.3] - 2018-01-20
update dependencies with david
Changes
- update dependencies with david
## [1.0.2] - 2017-07-21
Changes
- update todo
- docs
- update dockblocks and readme
- tests
- remove
- main injector and launcher
## [1.0.0] - 2017-07-19
- created |
#pragma once
#include "logger.hpp"
#include "types.hpp"
#include <IOKit/IOKitLib.h>
#include <IOKit/hid/IOHIDDevice.h>
#include <IOKit/hid/IOHIDKeys.h>
#include <cstdint>
#include <pqrs/osx/iokit_hid_device.hpp>
#include <pqrs/string.hpp>
#include <string>
#include <vector>
namespace krbn {
class iokit_utility final {
public:
static bool is_keyboard(const pqrs::osx::iokit_hid_device& device) {
if (device.conforms_to(pqrs::hid::usage_page::generic_desktop,
pqrs::hid::usage::generic_desktop::keyboard)) {
return true;
}
return false;
}
static bool is_pointing_device(const pqrs::osx::iokit_hid_device& device) {
if (device.conforms_to(pqrs::hid::usage_page::generic_desktop, pqrs::hid::usage::generic_desktop::pointer) ||
device.conforms_to(pqrs::hid::usage_page::generic_desktop, pqrs::hid::usage::generic_desktop::mouse)) {
return true;
}
return false;
}
static bool <API key>(IOHIDDeviceRef _Nonnull device) {
pqrs::osx::iokit_hid_device hid_device(device);
if (auto manufacturer = hid_device.find_manufacturer()) {
if (*manufacturer == "pqrs.org") {
return true;
}
}
return false;
}
static std::string make_device_name(IOHIDDeviceRef _Nonnull device) {
std::stringstream stream;
pqrs::osx::iokit_hid_device hid_device(device);
if (auto product_name = hid_device.find_product()) {
stream << pqrs::string::trim_copy(*product_name);
} else {
if (auto vendor_id = hid_device.find_vendor_id()) {
if (auto product_id = hid_device.find_product_id()) {
stream << std::hex
<< "(vendor_id:0x" << type_safe::get(*vendor_id)
<< ", product_id:0x" << type_safe::get(*product_id)
<< ")"
<< std::dec;
}
}
}
return stream.str();
}
static std::string <API key>(device_id device_id,
IOHIDDeviceRef _Nonnull device) {
return fmt::format("{0} (device_id:{1})",
make_device_name(device),
type_safe::get(device_id));
}
static void log_matching_device(pqrs::osx::<API key>::value_t registry_entry_id,
IOHIDDeviceRef _Nonnull device) {
pqrs::osx::iokit_hid_device hid_device(device);
logger::get_logger()->info("matching device:");
logger::get_logger()->info(" registry_entry_id: {0}", type_safe::get(registry_entry_id));
if (auto manufacturer = hid_device.find_manufacturer()) {
logger::get_logger()->info(" manufacturer: {0}", *manufacturer);
}
if (auto product = hid_device.find_product()) {
logger::get_logger()->info(" product: {0}", *product);
}
if (auto vendor_id = hid_device.find_vendor_id()) {
logger::get_logger()->info(" vendor_id: {0}", type_safe::get(*vendor_id));
}
if (auto product_id = hid_device.find_product_id()) {
logger::get_logger()->info(" product_id: {0}", type_safe::get(*product_id));
}
if (auto location_id = hid_device.find_location_id()) {
logger::get_logger()->info(" location_id: {0:#x}", type_safe::get(*location_id));
}
if (auto serial_number = hid_device.find_serial_number()) {
logger::get_logger()->info(" serial_number: {0}", *serial_number);
}
logger::get_logger()->info(" is_keyboard: {0}", is_keyboard(device));
logger::get_logger()->info(" is_pointing_device: {0}", is_pointing_device(device));
}
};
} // namespace krbn |
<?php
namespace app\models;
/**
* Class Animal - Common class for all animals
* @package app\models
*/
class Animal
{
/**
* @var string
*/
private $_name;
/**
* Animal constructor.
* @param string $name
*/
public function __construct($name)
{
$this->setName($name);
}
/**
* @return string
*/
public function getName()
{
return $this->_name;
}
/**
* @param string $name
*/
public function setName($name)
{
$this->_name = $name;
}
} |
#include "hack.hpp"
#include "netvar.hpp"
struct iovec g_remote[1024], g_local[1024];
struct hack::<API key> g_glow[1024];
int <API key> = -1;
void Radar(remote::Handle* csgo, remote::<API key>* client, void* ent) {
if(<API key> == -1) {
<API key> = netvar::GetOffset("CBaseEntity", "m_bSpotted");
}
// give up :(
if(<API key> == -1)
return;
unsigned char spotted = 1;
csgo->Write((void*)((unsigned long) ent + <API key>), &spotted, sizeof(unsigned char));
}
void hack::Glow(remote::Handle* csgo, remote::<API key>* client, unsigned long glowAddress) {
if(!csgo || !client)
return;
// Reset
bzero(g_remote, sizeof(g_remote));
bzero(g_local, sizeof(g_local));
bzero(g_glow, sizeof(g_glow));
hack::CGlowObjectManager manager;
if(!csgo->Read((void*) glowAddress, &manager, sizeof(hack::CGlowObjectManager))) {
// std::cout << "Failed to read glowClassAddress" << std::endl;
return;
}
size_t count = manager.<API key>.Count;
void* data_ptr = (void*) manager.<API key>.DataPtr;
if(!csgo->Read(data_ptr, g_glow, sizeof(hack::<API key>) * count)) {
// std::cout << "Failed to read <API key>" << std::endl;
return;
}
size_t writeCount = 0;
for(unsigned int i = 0; i < count; i++) {
if(g_glow[i].m_pEntity != NULL) {
hack::Entity ent;
if(csgo->Read(g_glow[i].m_pEntity, &ent, sizeof(hack::Entity))) {
if(ent.m_iTeamNum != 2 && ent.m_iTeamNum != 3) {
g_glow[i].<API key> = 0;
g_glow[i].<API key> = 0;
continue;
}
// Radar Hack
Radar(csgo, client, g_glow[i].m_pEntity);
g_glow[i].<API key> = 1;
g_glow[i].<API key> = 0;
if(ent.m_iTeamNum == 2) {
g_glow[i].m_flGlowRed = 1.0f;
g_glow[i].m_flGlowGreen = 0.0f;
g_glow[i].m_flGlowBlue = 0.0f;
g_glow[i].m_flGlowAlpha = 0.8f;
} else if(ent.m_iTeamNum == 3) {
g_glow[i].m_flGlowRed = 0.0f;
g_glow[i].m_flGlowGreen = 0.0f;
g_glow[i].m_flGlowBlue = 1.0f;
g_glow[i].m_flGlowAlpha = 0.8f;
}
}
}
size_t bytesToCutOffEnd = sizeof(hack::<API key>) - g_glow[i].writeEnd();
size_t bytesToCutOffBegin = (size_t) g_glow[i].writeStart();
size_t totalWriteSize = (sizeof(hack::<API key>) - (bytesToCutOffBegin + bytesToCutOffEnd));
g_remote[writeCount].iov_base = ((uint8_t*) data_ptr + (sizeof(hack::<API key>) * i)) + bytesToCutOffBegin;
g_local[writeCount].iov_base = ((uint8_t*) &g_glow[i]) + bytesToCutOffBegin;
g_remote[writeCount].iov_len = g_local[writeCount].iov_len = totalWriteSize;
writeCount++;
}
process_vm_writev(csgo->GetPid(), g_local, writeCount, g_remote, writeCount, 0);
} |
package crazypants.enderio.material;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class <API key> extends ItemBlock {
public <API key>(Block block, String name) {
super(block);
setHasSubtypes(true);
setMaxDamage(0);
setRegistryName(name);
}
@Override
public String getUnlocalizedName(ItemStack stack) {
return "tile." + Alloy.values()[stack.getItemDamage()].unlocalisedName;
}
@Override
public int getMetadata(int damage) {
return damage;
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {
for (Alloy alloy : Alloy.values()) {
list.add(new ItemStack(this, 1, alloy.ordinal()));
}
}
} |
-- nodes
minetest.register_node("multitest:rubberblock", {
description = "Rubber Block",
tiles = {"<API key>.png"},
groups = {<API key>=5,crumbly=3},
})
minetest.register_node("multitest:blackstone", {
description = "Blackstone",
tiles = {"<API key>.png"},
groups = {cracky=3, stone=1},
drop = 'multitest:blackcobble',
sounds = default.<API key>(),
})
minetest.register_node("multitest:blackcobble", {
description = "Black Cobblestone",
tiles = {"<API key>.png"},
groups = {cracky=2, stone=2},
sounds = default.<API key>(),
})
minetest.register_node("multitest:blackstone_paved", {
description = "Paved Blackstone",
tiles = {"<API key>.png"},
groups = {cracky=2, stone=1},
sounds = default.<API key>(),
})
minetest.register_node("multitest:blackstone_paved", {
description = "Paved Blackstone",
tiles = {"<API key>.png"},
groups = {cracky=2, stone=1},
sounds = default.<API key>(),
})
minetest.register_node("multitest:blackstone_brick", {
description = "Blackstone Bricks",
tiles = {"<API key>.png"},
groups = {cracky=2, stone=1},
sounds = default.<API key>(),
})
--[[ maintenant dans farming redo
minetest.register_node("multitest:hayblock", {
description = "Hay Bale",
tiles = {"<API key>.png", "<API key>.png", "multitest_hayblock.png"},
paramtype2 = "facedir",
groups = {snappy=1,flammable=2,crumbly=1,cracky=4,<API key>=2},
sounds = default.<API key>(),
on_place = minetest.rotate_node
})
minetest.register_node("multitest:checkered_floor", {
description = "Checkered Floor",
tiles = {"<API key>.png"},
groups = {cracky=2, <API key>=4},
sounds = default.<API key>(),
})
minetest.register_node("multitest:lamp", {
description = "Lamp",
tiles = {"multitest_lamp.png"},
paramtype = "light",
sunlight_propagates = true,
light_source = LIGHT_MAX-1,
groups = {snappy=2,cracky=3,<API key>=3},
sounds = default.<API key>(),
})
]]
minetest.register_alias("multitest:lamp", "lantern:lantern")
minetest.register_node("multitest:andesite", {
description = "Andesite",
tiles = {"multitest_andesite.png"},
groups = {cracky=3,},
sounds = default.<API key>(),
})
minetest.register_node("multitest:diorite", {
description = "Diorite",
tiles = {"multitest_diorite.png"},
groups = {cracky=3,},
sounds = default.<API key>(),
})
minetest.register_node("multitest:granite", {
description = "Granite",
tiles = {"multitest_granite.png"},
groups = {cracky=3,},
sounds = default.<API key>(),
})
minetest.register_node("multitest:andesite_smooth", {
description = "Smooth Andesite",
tiles = {"<API key>.png"},
groups = {cracky=3,},
sounds = default.<API key>(),
})
minetest.register_node("multitest:diorite_smooth", {
description = "Smooth Diorite",
tiles = {"<API key>.png"},
groups = {cracky=3,},
sounds = default.<API key>(),
})
minetest.register_node("multitest:granite_smooth", {
description = "Smooth Granite",
tiles = {"<API key>.png"},
groups = {cracky=3,},
sounds = default.<API key>(),
})
minetest.register_node("multitest:sandstone_carved", {
description = "Carved Sandstone",
tiles = {"<API key>.png", "<API key>.png", "<API key>.png"},
groups = {crumbly=2,cracky=4,},
sounds = default.<API key>(),
})
-- stairs:stair_blackstone
stairs.<API key>("blackstone", "multitest:blackstone",
{cracky=3, stone=1},
{"<API key>.png"},
"Blackstone Stairs",
"Blackstone Slab", nil)
stairs.<API key>("blackcobble", "multitest:blackcobble",
{cracky=3, stone=1},
{"<API key>.png"},
"Black Cobble Stairs",
"Black Cobble Slab", nil)
stairs.<API key>("blackstone_bricks", "multitest:blackstone_brick",
{cracky=3, stone=1},
{"<API key>.png"},
"Blackstonestone brick Stairs",
"Blackstone Brick Slab", nil)
stairs.<API key>("blackstone_paved", "multitest:blackstone_paved",
{cracky=3, stone=1},
{"<API key>.png"},
"Paved Blackstone Stairs",
"Paved Blackstone Slab", nil)
-- others
for i, v in ipairs(multitest.colors) do
minetest.register_node("multitest:carpet_"..v, {
tiles = {"wool_"..v..".png"},
description = multitest.colornames[i].."Carpet",
groups = {<API key>=2,flammable=3},
drawtype="nodebox",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.4, 0.5},
}
}
})
end
minetest.register_node("multitest:door_mat", {
description = "Door Mat",
tiles = {"multitest_door_mat.png"},
inventory_image = "multitest_door_mat.png",
wield_image = "multitest_door_mat.png",
groups = {<API key>=2,flammable=3},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.363675, 0.5, -0.454674, 0.426703},
}
}
})
minetest.register_node("multitest:sponge_block", {
description = "Sponge Block (Decorative)",
tiles = {"<API key>.png"},
groups = {<API key>=3,},
}) |
package se.jtiden.sudoku.struct;
public interface Collector<T, R> {
void collect(T t);
R get();
} |
using System;
namespace ZeugnissDruckerWPF
{
public class MainWindowViewModel
{
public Database SchuelerData = new Database();
public MainWindowViewModel(MainWindow mainWindow)
{
this.ViewItems = new[]
{
new ViewItem("Browser", new Browser(this.SchuelerData)),
new ViewItem("Editor", new Editor(this.SchuelerData, mainWindow.MainSnackbar)),
new ViewItem("Creator", new Creator(this.SchuelerData, mainWindow.MainSnackbar))
};
}
public ViewItem[] ViewItems { get; }
}
} |
<!DOCTYPE HTML PUBLIC "-
<html>
<head>
<title>vFabric Hyperic 5.7 : Manage Resource Auto-Discovery</title>
<link rel="stylesheet" href="styles/site.css" type="text/css" />
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<b><a href="vFabric Hyperic 5.7.html" title="vFabric Hyperic 5.7 Documentation Home">vFabric Hyperic 5.7 Documentation Home (Internal)</a>
- <a href="https:
- <a href="https:
<p>
<p>
<table class="pagecontent" border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#ffffff">
<tr>
<td valign="top" class="pagebody">
<div class="pageheader">
<span class="pagetitle">
vFabric Hyperic 5.7 : Manage Resource Auto-Discovery
</span>
</div>
<div class="pagesubheading">
This page last changed on Jan 04, 2012 by <font color="#0050B2">mmcgarry</font>.
</div>
<ul><li><a href="Configure Auto-Discovery Frequency.html" title="Configure Auto-Discovery Frequency">Configure Auto-Discovery Frequency</a></li><li><a href="Scan a Platform On-Demand.html" title="Scan a Platform On-Demand">Scan a Platform On-Demand</a></li><li><a href="Prevent Resource Discovery.html" title="Prevent Resource Discovery">Prevent Resource Discovery</a></li><li><a href="Solving Auto-Discovery Problems.html" title="Solving Auto-Discovery Problems">Solving Auto-Discovery Problems</a></li></ul>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td height="12" background="http://support.hyperic.com/images/border/border_bottom.gif"><img src="images/border/spacer.gif" width="1" height="1" border="0"/></td>
</tr>
<tr>
<td align="center"><font color="grey">Document generated by Confluence on Oct 29, 2012 13:00</font></td>
</tr>
</table>
</body>
</html> |
export const backgroundConnector = function(){
this.cache = null;//chrome extention connect object
this.name = null;//connect name
this.onConnect = null;//function
this.onDisConnect = null;//function
this.send = function(msg){
if(this.cache != null){
var port = this.cache;
if(port.name==this.name){
port.postMessage(msg);
}
}
};
this.init = function(fn){
var This = this;
//console.log(this);
chrome.extension.onConnect.addListener(function(port){
This.cache = port;
if(port.name==This.name){
port.onDisconnect.addListener(function(){
This.cache = null;
if(typeof(This.onDisConnect)=="function")
This.onDisConnect(port);
});
port.onMessage.addListener(function(msg){
fn(msg) ;
});
if(typeof(This.onConnect)=="function")
This.onConnect(port);
port.postMessage({act:"connected"});
}
});
};
};
export const mainConnector = function(){
this.cache=null;//chrome extention connect object
this.name=null;//connect name
this.init=function(){
var port = chrome.extension.connect({name:this.name});
this.cache = port;
};
this.send=function(msg){
if(this.cache != null){
var port = this.cache;
port.postMessage(msg);
}
};
this.onMessage=function(fn){
if(this.cache != null){
var port = this.cache;
if(port.name==this.name){
port.onMessage.addListener(function(msg){
fn(msg);
});
}
}
};
};
import storage from './storage'
export const Storage = storage
export const formatTime = function(value) {
var sec = Number(value);
var min = 0;
var hour = 0;
//alert(sec);
if(sec > 60) {
min = Number(sec/60);
sec = Number(sec%60);
//alert(min+"-"+sec);
if(min > 60) {
hour = Number(min/60);
min = Number(sec%60);
}
}
var secTemp = String( parseInt(sec));
if(secTemp.length==1)
secTemp = "0"+secTemp;
var result = secTemp;
var minTemp = String( parseInt(min));
if(minTemp.length==1)
minTemp = "0"+minTemp;
result = minTemp+":"+result;
if(hour > 0) {
result = ""+parseInt(hour)+":"+result;
}
return result;
};
export function sleep(ms = 0) {
return new Promise((resolve, reject) => setTimeout(resolve, ms));
}
export function IsJsonString(str) {
try {
JSON.parse(str);
} catch (e) {
return false;
}
return true;
} |
<!DOCTYPE html>
<html>
<head>
<style>
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
border-top: 2pt;
}
li {
float: left;
}
li a {
display: inline-block;
color: white;
text-align: center;
padding: 10px 18px;
text-decoration: none;
}
li a:hover {
background-color: #111;
}
h1.banner {
font-size: 1.7em;
padding: 12px 5px;
color: white;
background-color: #333;
margin: auto;
text-align: center;
}
.info {
float: right;
}
</style>
</head>
<body>
<div class="banner">
<H1 class="banner">Student Survey</H1>
</div>
<div>
<ul>
<li><a class="active" href="index.php">Survey</a></li>
<li><a href="select.php">View / Update Records</a></li>
<li class="info"><a href="infopage.php">James Gruss, Jr. | Visual Database Programming | Fall 2015</a></li>
</ul>
</div>
</body>
</html> |
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_07) on Wed Feb 08 19:32:57 CST 2012 -->
<TITLE>
Uses of Class org.hibernate.<API key>.ScalarReturn (Hibernate JavaDocs)
</TITLE>
<META NAME="date" CONTENT="2012-02-08">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.hibernate.<API key>.ScalarReturn (Hibernate JavaDocs)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<A NAME="navbar_top"></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/hibernate/<API key>.ScalarReturn.html" title="class in org.hibernate"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </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">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/hibernate//<API key>.ScalarReturn.html" target="_top"><B>FRAMES</B></A>
<A HREF="<API key>.ScalarReturn.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>
</TABLE>
<A NAME="skip-navbar_top"></A>
<HR>
<CENTER>
<H2>
<B>Uses of Class<br>org.hibernate.<API key>.ScalarReturn</B></H2>
</CENTER>
No usage of org.hibernate.<API key>.ScalarReturn
<P>
<HR>
<A NAME="navbar_bottom"></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="<API key>"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../org/hibernate/<API key>.ScalarReturn.html" title="class in org.hibernate"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </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">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/hibernate//<API key>.ScalarReturn.html" target="_top"><B>FRAMES</B></A>
<A HREF="<API key>.ScalarReturn.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>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<HR>
Copyright © 2001-2010 <a href="http:
</BODY>
</HTML> |
package com.grs.dragon.ui;
import java.io.*;
import java.util.*;
/**
* This class implements the same interface as the CommandForwarder
* class, but doesn't actually create or send any command files, or
* wait for replies. It is used for situations where the UI runs
* independently as a prototype/reference for translators.
*/
public class <API key> extends CommandForwarder
{
/**
* Constructor. This method sets up data items.
* The class doesn't do anything until the immediately
* sendCommandToServer method is invoked.
*/
public <API key>(DragonUI dragonUI,
String filePath)
{
super(dragonUI,filePath);
}
/**
* Cancel current command unconditionally. Override
* the superclass method, since a null command forwarder
* does not have any monitors.
*/
public void cancelCommand(String sequence)
{
dragonUI.showDefaultPanel();
dragonUI.setReady(true);
}
/**
* This is the primary method of the class. We
* display the command, add to history etc., but
* otherwise we throw it away.
*/
public boolean sendCommandToServer(String commandString)
{
System.out.println("Processing command: " + commandString);
boolean bOk = true;
cmdCounter++;
SpecialCommand specCmd = checkSpecial(commandString);
if ((specCmd != null) &&
(specCmd.getVerb().equalsIgnoreCase("EXIT")))
System.exit(0);
return bOk;
}
protected static String cvsInfo = null;
protected static void setCvsInfo()
{
cvsInfo = "\n@(#) $Id: <API key>.java,v 1.4 2007/01/05 07:41:57 rudahl Exp $ \n";
}
} |
package main
import (
"net/http"
//"fmt"
"time"
logger "github.com/Industrial/learning-go-lang/microservices/blog/logger"
"gopkg.in/mgo.v2"
)
const (
SVC_HOSTNAME = "0.0.0.0"
SVC_PORT = "8080"
SVC_ADDRESS = SVC_HOSTNAME + ":" + SVC_PORT
DB_HOSTS = "mongodb:27017"
DB_DATABASE = "blog"
)
var log = logger.Logger()
func main() {
mongoDBDialInfo := &mgo.DialInfo{
Addrs: []string{DB_HOSTS},
Timeout: 60 * time.Second,
Database: DB_DATABASE,
}
mongoSession, err := mgo.DialWithInfo(mongoDBDialInfo)
if err != nil {
log.Error(err.Error())
return
}
log.Info("MongoDB Session:", mongoSession)
applicationRouter := NewRouter()
log.Info("Starting HTTP Server at http://" + SVC_ADDRESS)
err = http.ListenAndServe(SVC_ADDRESS, applicationRouter)
if err != nil {
log.Error(err.Error())
return
}
} |
#pragma once
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
void libkrbn_initialize(void);
const char* _Nonnull <API key>(void);
const char* _Nonnull <API key>(void);
const char* _Nonnull <API key>(void);
const char* _Nonnull <API key>(void);
uint32_t <API key>(void);
uint32_t <API key>(void);
uint32_t <API key>(void);
bool <API key>(uint8_t* _Nonnull key, const char* _Nonnull key_name);
bool <API key>(uint8_t* _Nonnull button, const char* _Nonnull key_name);
bool <API key>(const char* _Nonnull file_path, const char* _Nonnull json_string);
float libkrbn_system_preferences_convert_key_repeat_milliseconds_to_system_preferences_value(uint32_t value);
// <API key>
typedef void <API key>;
typedef void (*<API key>)(const char* _Nonnull <API key>, void* _Nullable refcon);
bool <API key>(<API key>* _Nullable* _Nonnull out,
<API key> _Nullable callback,
void* _Nullable refcon);
void <API key>(<API key>* _Nullable* _Nonnull out);
// <API key>
struct <API key> {
bool keyboard_fn_state;
uint32_t <API key>;
uint32_t <API key>;
};
typedef void <API key>;
typedef void (*<API key>)(const struct <API key>* _Nonnull <API key>,
void* _Nullable refcon);
bool <API key>(<API key>* _Nullable* _Nonnull out,
<API key> _Nullable callback,
void* _Nullable refcon);
void <API key>(<API key>* _Nullable* _Nonnull out);
// <API key>
typedef void <API key>;
typedef void (*<API key>)(void* _Nullable refcon);
bool <API key>(<API key>* _Nullable* _Nonnull out,
<API key> _Nullable callback,
void* _Nullable refcon);
void <API key>(<API key>* _Nullable* _Nonnull out);
typedef void libkrbn_log_monitor;
typedef void (*<API key>)(const char* _Nonnull line, void* _Nullable refcon);
bool <API key>(libkrbn_log_monitor* _Nullable* _Nonnull out,
<API key> _Nullable callback,
void* _Nullable refcon);
void <API key>(libkrbn_log_monitor* _Nullable* _Nonnull out);
size_t <API key>(libkrbn_log_monitor* _Nonnull p);
const char* _Nullable <API key>(libkrbn_log_monitor* _Nonnull p, size_t index);
void <API key>(libkrbn_log_monitor* _Nonnull p);
#ifdef __cplusplus
}
#endif |
:host>* {
display: block;
padding: 16px 0;
border-bottom: solid 1px #666;
margin: 0px 0;
border-top: solid 1px #444;
} |
<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-
<html xmlns="http:
<head> <meta name="viewport" content="width=996px"/>
<title>Real-time Area chart</title>
<link href="../assets/ui/css/style.css" rel="stylesheet" type="text/css" />
<link href="../assets/prettify/prettify.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../Charts/jquery.min.js"></script>
<script type="text/javascript" src="../../Charts/FusionCharts.js"></script>
<script type="text/javascript" src="../assets/prettify/prettify.js"></script>
<script type="text/javascript" src="../assets/ui/js/json2.js"></script>
<script type="text/javascript" src="../assets/ui/js/lib.js" ></script>
<script type="text/javascript" src="../assets/ui/js/date.js"></script>
<script type="text/javascript">
var <API key> = false;
</script>
<!--[if IE 6]>
<script type="text/javascript" src="../assets/ui/js/DD_belatedPNG_0.0.8a-min.js"></script>
<script>
/* select the element name, css selector, background etc */
DD_belatedPNG.fix('img');
/* string argument can be any CSS selector */
</script>
<p> </p>
<P align="center"></P>
<![endif]
</head>
<body>
<h3 class="chart-title" >Real-time Area Chart</h3>
<p> </p>
<script type="text/javascript" src="../Data/String/js/RTArea.js" ></script>
<div id="chartdiv" align="center">Chart will load here</div>
<script type="text/javascript">
if ((typeof <API key>=="undefined" || !<API key>==true) && (GALLERY_RENDERER && GALLERY_RENDERER.search(/javascript|flash/i)==0) ) FusionCharts.setCurrentRenderer(GALLERY_RENDERER);
var chart = new FusionCharts("../../Charts/RealTimeArea.swf", "ChartId", "550", "390", "0", "1" );
chart.setXMLData( dataString );
chart.render("chartdiv");
window.dataUpdateTimer = null;
FusionCharts.addEventListener("Rendered", function(e,a) {
if(e.sender.id=="tmpChartId") return;
window.dataUpdateTimer = window.setInterval (function (){
<API key>(e.sender);
},6000 );
});
function <API key>(sender)
{
var updater= sender.feedData? sender : null;
var visitorCount = Math.round(Math.random()*4000)+1000;
var dateTimeLabel = new Date().toString("HH:mm:ss");
if(updater) updater.feedData("&label=" + dateTimeLabel + "&value=" + visitorCount);
}
</script>
<p align="center" style="width: 580px; margin:0 auto; margin-top:10px; margin-bottom:20px; padding-left:1px; padding-right:1px;">Real-time Area Chart showing unique visitors. The chart is preloaded with historical data. <br />
<br />
The chart updates itself every 6 seconds.</p>
<div class="qua-button-holder"></div>
<div class="show-code-block"></div>
</body>
<script type="text/javascript">
$(document).ready ( function() {
if(chart.options.renderer=="javascript" && <API key>)
{
$(".description-text").css( { "visibility": "hidden" } );
$(".qua-button-holder").css( { "visibility": "hidden" } );
$(".show-code-block").css( { "visibility": "hidden" } );
$(".chart-title").next().addClass("highlightBlock").css({ "text-align": "center" }).html("JavaScript version of Real-time Area Chart is not supported.");
}
else
{
$(".chart-title").next().removeClass("highlightBlock").html(" ");
}
});
</script>
</html> |
#include "units_list_dlg.h"
#include "wfApp.h"
#include "utils/wf_operator.h"
//(*InternalHeaders(units_list_dlg)
#include <wx/intl.h>
#include <wx/string.h> |
function iconLoadListener() {
var icons = document.querySelectorAll(".icon__preview");
Array.prototype.forEach.call(icons, function(icon, i) {
icon.src += "#" + Date.now().toString();
icon.onload = function() {
this.parentNode.parentNode.className = "icon__loaded";
};
});
}
document.addEventListener("DOMContentLoaded", function() {
iconLoadListener();
}, false);
var form = document.querySelector(".search-form");
if (form.addEventListener) {
form.addEventListener("submit", iconLoadListener, false);
} |
package com.seanshubin.builder.domain
import java.io.PrintWriter
import java.nio.file.{Path, StandardOpenOption}
class RootLogger(directory: Path,
emitToView: String => Unit,
files: FilesContract,
system: SystemContract) extends (String => Unit) {
files.createDirectories(directory)
val path = directory.resolve("root.txt")
override def apply(line: String) = {
emitToView(line)
emitToStorage(path, line)
}
private def emitToStorage(path: Path, line: String): Unit = {
withPrintWriter(path) { printWriter =>
printWriter.println(line)
}
}
private def withPrintWriter(path: Path)(block: PrintWriter => Unit): Unit = {
import StandardOpenOption._
val writer = files.newBufferedWriter(path, CREATE, APPEND)
val printWriter = new PrintWriter(writer)
block(printWriter)
printWriter.close()
}
} |
#include <Windows.h>
#include <Psapi.h>
#include "<API key>.h"
#pragma comment(lib, "Psapi.lib")
namespace ProgressInfo
{
KWindowsScanProcess::KWindowsScanProcess()
: m_vecProcessPool(NULL)
{
}
KWindowsScanProcess::~KWindowsScanProcess()
{
}
BOOL KWindowsScanProcess::Scan( vecProcessPool* pprinfo )
{
if (pprinfo == NULL)
{
return FALSE;
}
m_vecProcessPool = pprinfo;
_ProcessList(m_vecProcessPool);
return TRUE;
}
BOOL KWindowsScanProcess::_ProcessList(vecProcessPool* pprinfo)
{
if (!m_vecProcessPool)
{
return FALSE;
}
HANDLE hProcessSnap = NULL;
PROCESSENTRY32 pe32;
hProcessSnap = <API key>(TH32CS_SNAPPROCESS, 0);
if(hProcessSnap == <API key>)
{
return FALSE;
}
pe32.dwSize = sizeof(pe32);
if(!Process32First(hProcessSnap, &pe32))
{
CloseHandle(hProcessSnap);
return FALSE;
}
TCHAR szBufPath[MAX_PATH]={0};
HANDLE hProcess = NULL;
KProcessInfo kpinfo;
do
{
kpinfo.SetBase(pe32.pcPriClassBase);
kpinfo.SetParentPId(pe32.th32ParentProcessID);
kpinfo.SetName(pe32.szExeFile);
kpinfo.SetPId(pe32.th32ProcessID);
kpinfo.SetThreadNum(pe32.cntThreads);
hProcess = OpenProcess(PROCESS_ALL_ACCESS,FALSE, pe32.th32ProcessID);
if (hProcess)
{
if (GetModuleFileNameEx(hProcess, NULL, szBufPath,MAX_PATH))
{
kpinfo.SetPath(szBufPath);
memset(szBufPath, 0, MAX_PATH);
}
CloseHandle(hProcess);
hProcess = NULL;
}
m_vecProcessPool->push_back(kpinfo);
kpinfo.Clear();
} while(Process32Next(hProcessSnap, &pe32));
CloseHandle(hProcessSnap);
return TRUE;
}
} |
require 'capistrano/git'
module Capistrano
module <API key>
include Capistrano::Git::DefaultStrategy
def release
super
<API key> = context.releases_path + "#{context.release_timestamp}-full"
subfolder_to_deploy = File.join(<API key>, fetch(:git_subfolder))
context.execute :mv, release_path, <API key>
context.execute :mv, subfolder_to_deploy, release_path
context.execute :rm, '-rf', <API key>
end
end
end |
package chat
import (
"code.google.com/p/go.net/websocket"
"log"
"net/http"
)
type Server struct {
clients []*Client
addClient chan *Client
removeClient chan *Client
sendAll chan *Message
messages []*Message
}
func NewServer() *Server {
clients := make([]*Client, 0)
addClient := make(chan *Client)
removeClient := make(chan *Client)
sendAll := make(chan *Message)
messages := make([]*Message, 0)
return &Server{clients, addClient, removeClient, sendAll, messages}
}
func (this *Server) Messages() []*Message {
msgs := make([]*Message, len(this.messages))
copy(msgs, this.messages)
return msgs
}
func (this *Server) Handler() http.Handler {
go func() {
log.Println("Listening server...")
for {
select {
case c := <-this.addClient:
log.Println("Added new client")
this.clients = append(this.clients, c)
for _, msg := range this.messages {
c.message <- msg
}
log.Println("Now", len(this.clients), "clients connected.")
case c := <-this.removeClient:
log.Println("Remove client")
for i := range this.clients {
if this.clients[i] == c {
this.clients = append(this.clients[:i], this.clients[i+1:]...)
break
}
}
case msg := <-this.sendAll:
log.Println("Send all:", msg)
this.messages = append(this.messages, msg)
for _, c := range this.clients {
c.message <- msg
}
}
}
}()
onConnected := func(ws *websocket.Conn) {
defer ws.Close()
client := NewClient(ws, this)
this.addClient <- client
client.Listen()
}
log.Println("Created handler")
return websocket.Handler(onConnected)
} |
<!DOCTYPE html PUBLIC "-
<HTML xmlns="http:
<TITLE>Palau Web Gallery - Palau 2005-01-27 01-25-03</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<LINK href="assets/css/global.css" rel="stylesheet" type="text/css">
<META name="description" localizable="true" content="Created by Apple Aperture">
</HEAD><BODY class="detail">
<DIV id="header">
<H1 localizable="true">Palau January 2005</H1>
<UL id="nav">
<LI class="index"><A href="index7.html" localizable="true">Index</A></LI><LI class="previous"> <A href="large-54.html"><EM class="previous_text" localizable="true">Previous</EM> </A> </LI><LI class="pageNumber">55 of 66</LI><LI class="next"> <A href="large-56.html"><EM class="next_text" localizable="true">Next</EM> </A> </LI></UL>
<DIV style="clear: both;"></DIV>
</DIV>
<TABLE><TBODY><TR><TD class="sideinfo">
<H2></H2>
<UL id="metadata"><LI>Rating: 3 </LI><LI>Badges: Keyword </LI><LI>Aperture: f8 </LI><LI>Shutter Speed: 1/80 </LI><LI>Exposure Bias: 0ev </LI><LI>Focal Length: 15mm </LI><LI>Keywords: Palau </LI><LI>Name: Palau 2005-01-27 01-25-03 </LI><LI>Image Date: 10/11/05 1:25:03 AM PDT </LI><LI>ISO Speed Rating: ISO100 </LI><LI>File Size: 2.97 MB </LI><LI>Master Location: Palau </LI></UL>
</TD><TD style="width:100%;">
<DIV id="photo"><TABLE startoffset="54"><TR><TD><IMG name="img" src="pictures/picture-55.jpg" width="640" height="480" alt=""></TD></TR></TABLE></DIV>
</TD></TR></TBODY></TABLE>
<DIV id="footer">
<P localizable="true">Copyright 2006, Gregg Kellogg. All rights reserved.</P>
</DIV>
</BODY></HTML> |
local is_healthpack = function(node)
if node.name == 'bobblocks:health_off' or node.name == 'health_on' then
return true
end
return false
end
local update_healthpack = function (pos, node)
local nodename=""
local param2=""
--Switch HealthPack State
if node.name == 'bobblocks:health_off' then
nodename = 'bobblocks:health_on'
elseif node.name == 'bobblocks:health_on' then
nodename = 'bobblocks:health_off'
end
minetest.add_node(pos, {name = nodename})
end
local toggle_healthpack = function (pos, node)
if not is_healthgate(node) then return end
update_healthpack (pos, node, state)
end
local <API key> = function (pos, node, puncher)
if node.name == 'bobblocks:health_off' or node.name == 'bobblocks:health_on' then
update_healthpack(pos, node)
end
end
-- Healing Node
minetest.register_node("bobblocks:health_off", {
description = "Health Pack 1 Off",
tile_images = {"<API key>.png"},
inventory_image = "<API key>.png",
paramtype2 = "facedir",
<API key> = true,
groups = {snappy=2,cracky=3,<API key>=3},
is_ground_content = true,
walkable = false,
climbable = false,
mesecons = {conductor={
state = mesecon.state.off,
onstate = "bobblocks:health_on"
}}
})
minetest.register_node("bobblocks:health_on", {
description = "Health Pack 1 On",
tile_images = {"bobblocks_health_on.png"},
paramtype2 = "facedir",
<API key> = true,
light_source = default.LIGHT_MAX-1,
groups = {snappy=2,cracky=3,<API key>=3},
is_ground_content = true,
walkable = false,
climbable = false,
drop = "bobblocks:health_off",
mesecons = {conductor={
state = mesecon.state.on,
offstate = "bobblocks:health_off"
}}
})
minetest.register_abm(
{nodenames = {"bobblocks:health_on"},
interval = 1.0,
chance = 1,
action = function(pos, node, active_object_count, <API key>)
local objs = minetest.<API key>(pos, 1)
for k, obj in pairs(objs) do
minetest.sound_play("bobblocks_health",
{pos = pos, gain = 1.0, max_hear_distance = 32,})
obj:set_hp(obj:get_hp()+5) -- give 2.5HP
minetest.remove_node(pos) -- remove the node after use
end
end,
})
Health
minetest.register_craft({
output = "bobblocks:health_off",
type = "shapeless",
recipe = {
"default:dirt", "default:paper", "default:apple", "default:apple"
},
})
minetest.<API key>(<API key>) |
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>HardwareMap.DeviceMapping</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="HardwareMap.DeviceMapping";
}
}
catch(err) {
}
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.html" title="class in com.qualcomm.robotcore.hardware"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../com/qualcomm/robotcore/hardware/I2cAddr.html" title="class in com.qualcomm.robotcore.hardware"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" target="_top">Frames</a></li>
<li><a href="HardwareMap.DeviceMapping.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="header">
<div class="subTitle">com.qualcomm.robotcore.hardware</div>
<h2 title="Class HardwareMap.DeviceMapping" class="title">Class HardwareMap.DeviceMapping<DEVICE_TYPE extends <a href="../../../../com/qualcomm/robotcore/hardware/HardwareDevice.html" title="interface in com.qualcomm.robotcore.hardware">HardwareDevice</a>></h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.qualcomm.robotcore.hardware.HardwareMap.DeviceMapping<DEVICE_TYPE></li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>DEVICE_TYPE</code> - </dd>
</dl>
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.lang.Iterable<DEVICE_TYPE></dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.html" title="class in com.qualcomm.robotcore.hardware">HardwareMap</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">HardwareMap.DeviceMapping<DEVICE_TYPE extends <a href="../../../../com/qualcomm/robotcore/hardware/HardwareDevice.html" title="interface in com.qualcomm.robotcore.hardware">HardwareDevice</a>></span>
extends java.lang.Object
implements java.lang.Iterable<DEVICE_TYPE></pre>
<div class="block">A DeviceMapping contains a subcollection of the devices registered in a <a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.html" title="class in com.qualcomm.robotcore.hardware"><code>HardwareMap</code></a>
comprised of all the devices of a particular device type</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#get-java.lang.String-"><code>get(String)</code></a>,
<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#get-java.lang.String-"><code>get(String)</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#DeviceMapping-java.lang.Class-">DeviceMapping</a></span>(java.lang.Class<<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a>> deviceTypeClass)</code> </td>
</tr>
</table>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="method.summary">
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#cast-java.lang.Object-">cast</a></span>(java.lang.Object obj)</code>
<div class="block">A small utility that assists in keeping the Java generics type system happy</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#contains-java.lang.String-">contains</a></span>(java.lang.String deviceName)</code>
<div class="block">Returns whether a device of the indicated name is contained within this mapping</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>java.util.Set<java.util.Map.Entry<java.lang.String,<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a>>></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#entrySet--">entrySet</a></span>()</code>
<div class="block">Returns a collection of all the (name, device) pairs in this DeviceMapping.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#get-java.lang.String-">get</a></span>(java.lang.String deviceName)</code> </td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.lang.Class<<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a>></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#getDeviceTypeClass--">getDeviceTypeClass</a></span>()</code>
<div class="block">Returns the runtime device type for this mapping</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#internalPut-com.qualcomm.robotcore.util.SerialNumber-java.lang.String-DEVICE_TYPE-">internalPut</a></span>(<a href="../../../../com/qualcomm/robotcore/util/SerialNumber.html" title="class in com.qualcomm.robotcore.util">SerialNumber</a> serialNumber,
java.lang.String deviceName,
<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a> device)</code> </td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>java.util.Iterator<<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a>></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#iterator--">iterator</a></span>()</code>
<div class="block">Returns an iterator over all the devices in this DeviceMapping.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#put-com.qualcomm.robotcore.util.SerialNumber-java.lang.String-DEVICE_TYPE-">put</a></span>(<a href="../../../../com/qualcomm/robotcore/util/SerialNumber.html" title="class in com.qualcomm.robotcore.util">SerialNumber</a> serialNumber,
java.lang.String deviceName,
<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a> device)</code>
<div class="block">(Advanced) Registers a new device in this DeviceMapping under the indicated name.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#put-java.lang.String-DEVICE_TYPE-">put</a></span>(java.lang.String deviceName,
<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a> device)</code>
<div class="block">Registers a new device in this DeviceMapping under the indicated name.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#putLocal-java.lang.String-DEVICE_TYPE-">putLocal</a></span>(java.lang.String deviceName,
<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a> device)</code> </td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#remove-com.qualcomm.robotcore.util.SerialNumber-java.lang.String-">remove</a></span>(<a href="../../../../com/qualcomm/robotcore/util/SerialNumber.html" title="class in com.qualcomm.robotcore.util">SerialNumber</a> serialNumber,
java.lang.String deviceName)</code>
<div class="block">(Advanced) Removes the device with the indicated name (if any) from this DeviceMapping.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#remove-java.lang.String-">remove</a></span>(java.lang.String deviceName)</code>
<div class="block">(Advanced) Removes the device with the indicated name (if any) from this DeviceMapping.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html#size--">size</a></span>()</code>
<div class="block">Returns the number of devices currently in this DeviceMapping</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Iterable">
</a>
<h3>Methods inherited from interface java.lang.Iterable</h3>
<code>forEach, spliterator</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
</a>
<h3>Constructor Detail</h3>
<a name="DeviceMapping-java.lang.Class-">
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DeviceMapping</h4>
<pre>public DeviceMapping(java.lang.Class<<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a>> deviceTypeClass)</pre>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="method.detail">
</a>
<h3>Method Detail</h3>
<a name="getDeviceTypeClass
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDeviceTypeClass</h4>
<pre>public java.lang.Class<<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a>> getDeviceTypeClass()</pre>
<div class="block">Returns the runtime device type for this mapping</div>
</li>
</ul>
<a name="cast-java.lang.Object-">
</a>
<ul class="blockList">
<li class="blockList">
<h4>cast</h4>
<pre>public <a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a> cast(java.lang.Object obj)</pre>
<div class="block">A small utility that assists in keeping the Java generics type system happy</div>
</li>
</ul>
<a name="get-java.lang.String-">
</a>
<ul class="blockList">
<li class="blockList">
<h4>get</h4>
<pre>public <a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a> get(java.lang.String deviceName)</pre>
</li>
</ul>
<a name="put-java.lang.String-com.qualcomm.robotcore.hardware.HardwareDevice-">
</a><a name="put-java.lang.String-DEVICE_TYPE-">
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre>public void put(java.lang.String deviceName,
<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a> device)</pre>
<div class="block">Registers a new device in this DeviceMapping under the indicated name. Any existing device
with this name in this DeviceMapping is removed. The new device is also added to the
overall collection in the overall map itself. Note that this method is normally called
only by code in the SDK itself, not by user code.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>deviceName</code> - the name by which the new device is to be known (case sensitive)</dd>
<dd><code>device</code> - the new device to be named</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.html#put-java.lang.String-com.qualcomm.robotcore.hardware.HardwareDevice-"><code>HardwareMap.put(String, HardwareDevice)</code></a></dd>
</dl>
</li>
</ul>
<a name="put-com.qualcomm.robotcore.util.SerialNumber-java.lang.String-com.qualcomm.robotcore.hardware.HardwareDevice-">
</a><a name="put-com.qualcomm.robotcore.util.SerialNumber-java.lang.String-DEVICE_TYPE-">
</a>
<ul class="blockList">
<li class="blockList">
<h4>put</h4>
<pre>public void put(<a href="../../../../com/qualcomm/robotcore/util/SerialNumber.html" title="class in com.qualcomm.robotcore.util">SerialNumber</a> serialNumber,
java.lang.String deviceName,
<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a> device)</pre>
<div class="block">(Advanced) Registers a new device in this DeviceMapping under the indicated name. Any existing device
with this name in this DeviceMapping is removed. The new device is also added to the
overall collection in the overall map itself. Note that this method is normally called
only by code in the SDK itself, not by user code.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>serialNumber</code> - the serial number of the device</dd>
<dd><code>deviceName</code> - the name by which the new device is to be known (case sensitive)</dd>
<dd><code>device</code> - the new device to be named</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.html#put-java.lang.String-com.qualcomm.robotcore.hardware.HardwareDevice-"><code>HardwareMap.put(String, HardwareDevice)</code></a></dd>
</dl>
</li>
</ul>
<a name="internalPut-com.qualcomm.robotcore.util.SerialNumber-java.lang.String-com.qualcomm.robotcore.hardware.HardwareDevice-">
</a><a name="internalPut-com.qualcomm.robotcore.util.SerialNumber-java.lang.String-DEVICE_TYPE-">
</a>
<ul class="blockList">
<li class="blockList">
<h4>internalPut</h4>
<pre>protected void internalPut(<a href="../../../../com/qualcomm/robotcore/util/SerialNumber.html" title="class in com.qualcomm.robotcore.util">SerialNumber</a> serialNumber,
java.lang.String deviceName,
<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a> device)</pre>
</li>
</ul>
<a name="putLocal-java.lang.String-com.qualcomm.robotcore.hardware.HardwareDevice-">
</a><a name="putLocal-java.lang.String-DEVICE_TYPE-">
</a>
<ul class="blockList">
<li class="blockList">
<h4>putLocal</h4>
<pre>public void putLocal(java.lang.String deviceName,
<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a> device)</pre>
</li>
</ul>
<a name="contains-java.lang.String-">
</a>
<ul class="blockList">
<li class="blockList">
<h4>contains</h4>
<pre>public boolean contains(java.lang.String deviceName)</pre>
<div class="block">Returns whether a device of the indicated name is contained within this mapping</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>deviceName</code> - the name sought</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether a device of the indicated name is contained within this mapping</dd>
</dl>
</li>
</ul>
<a name="remove-java.lang.String-">
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre>public boolean remove(java.lang.String deviceName)</pre>
<div class="block">(Advanced) Removes the device with the indicated name (if any) from this DeviceMapping. The device
is also removed under that name in the overall map itself. Note that this method is normally
called only by code in the SDK itself, not by user code.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>deviceName</code> - the name of the device to remove.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether any modifications were made to this DeviceMapping</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.html#remove-java.lang.String-com.qualcomm.robotcore.hardware.HardwareDevice-"><code>HardwareMap.remove(java.lang.String, com.qualcomm.robotcore.hardware.HardwareDevice)</code></a></dd>
</dl>
</li>
</ul>
<a name="remove-com.qualcomm.robotcore.util.SerialNumber-java.lang.String-">
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre>public boolean remove(<a href="../../../../com/qualcomm/robotcore/util/SerialNumber.html" title="class in com.qualcomm.robotcore.util">SerialNumber</a> serialNumber,
java.lang.String deviceName)</pre>
<div class="block">(Advanced) Removes the device with the indicated name (if any) from this DeviceMapping. The device
is also removed under that name in the overall map itself. Note that this method is normally
called only by code in the SDK itself, not by user code.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>serialNumber</code> - (optional) the serial number of the device to remove</dd>
<dd><code>deviceName</code> - the name of the device to remove.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>whether any modifications were made to this DeviceMapping</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.html#remove-java.lang.String-com.qualcomm.robotcore.hardware.HardwareDevice-"><code>HardwareMap.remove(java.lang.String, com.qualcomm.robotcore.hardware.HardwareDevice)</code></a></dd>
</dl>
</li>
</ul>
<a name="iterator
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre>public java.util.Iterator<<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a>> iterator()</pre>
<div class="block">Returns an iterator over all the devices in this DeviceMapping.</div>
<dl>
<dt><span class="<API key>">Specified by:</span></dt>
<dd><code>iterator</code> in interface <code>java.lang.Iterable<<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a> extends <a href="../../../../com/qualcomm/robotcore/hardware/HardwareDevice.html" title="interface in com.qualcomm.robotcore.hardware">HardwareDevice</a>></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an iterator over all the devices in this DeviceMapping.</dd>
</dl>
</li>
</ul>
<a name="entrySet
</a>
<ul class="blockList">
<li class="blockList">
<h4>entrySet</h4>
<pre>public java.util.Set<java.util.Map.Entry<java.lang.String,<a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" title="type parameter in HardwareMap.DeviceMapping">DEVICE_TYPE</a>>> entrySet()</pre>
<div class="block">Returns a collection of all the (name, device) pairs in this DeviceMapping.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a collection of all the (name, device) pairs in this DeviceMapping.</dd>
</dl>
</li>
</ul>
<a name="size
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>size</h4>
<pre>public int size()</pre>
<div class="block">Returns the number of devices currently in this DeviceMapping</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of devices currently in this DeviceMapping</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../com/qualcomm/robotcore/hardware/HardwareMap.html" title="class in com.qualcomm.robotcore.hardware"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../com/qualcomm/robotcore/hardware/I2cAddr.html" title="class in com.qualcomm.robotcore.hardware"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/qualcomm/robotcore/hardware/HardwareMap.DeviceMapping.html" target="_top">Frames</a></li>
<li><a href="HardwareMap.DeviceMapping.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
</a></div>
</body>
</html> |
import unittest
from music_app.post import Post
class TestPost(unittest.TestCase):
"""Class to test the Post Class"""
def <API key>(self):
p = Post('Promises', 'Dreamers', 'rock', '2014', 8, 'http:
self.assertEqual(p.title, 'Promises')
self.assertEqual(p.artist, 'Dreamers')
self.assertEqual(p.genre, 'rock')
self.assertEqual(p.year, '2014')
self.assertEqual(p.score, 8)
self.assertEqual(p.thumbnail, 'http://example.com')
self.assertEqual(p.timestamp, 146666666.66)
self.assertEqual(p.url, 'https: |
<!DOCTYPE html>
<html lang="en-US">
<head>
<base href="http://localhost/wordpress" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Zlotnick-1995 Empowering the Battered Woman: The Use of Criminal | Communicating with Prisoners</title>
<link rel='stylesheet' id='ortext-fonts-css' href='//fonts.googleapis.com/css?family=Lato%3A300%2C400%2C700%2C900%2C300italic%2C400italic%2C700italic' type='text/css' media='all' />
<link rel='stylesheet' id='ortext-style-css' href='http://cwpc.github.io/wp-content/themes/ortext/style.css?ver=4.1' type='text/css' media='all' />
<link rel='stylesheet' id='<API key>' href='http://cwpc.github.io/wp-content/themes/ortext/layouts/content.css?ver=4.1' type='text/css' media='all' />
<link rel='stylesheet' id='<API key>' href='http://cwpc.github.io/wp-content/themes/ortext/fonts/font-awesome/css/font-awesome.min.css?ver=4.1' type='text/css' media='all' />
<link rel='stylesheet' id='<API key>' href='http://cwpc.github.io/wp-content/plugins/tablepress/css/default.min.css?ver=1.5.1' type='text/css' media='all' />
<style id='<API key>' type='text/css'>
.tablepress{width:auto;border:2px solid;margin:0 auto 1em}.tablepress td,.tablepress thead th{text-align:center}.tablepress .column-1{text-align:left}.<API key>{font-weight:900;text-align:center;font-size:20px;line-height:1.3em}.tablepress tfoot th{font-size:14px}.<API key>{font-weight:900;text-align:center}
</style>
<script type='text/javascript' src='http://cwpc.github.io/wp-includes/js/jquery/jquery.js?ver=1.11.1'></script>
<script type='text/javascript' src='http://cwpc.github.io/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.2.1'></script>
<link rel='next' title='Sunstein-2001 On Academic Fads and Fashions' href='http://cwpc.github.io/refs/<API key>/' />
<link rel='canonical' href='http://cwpc.github.io/refs/<API key>/' />
<link rel='shortlink' href='http://cwpc.github.io/?p=31289' />
</head>
<body class="single single-refs postid-31289 custom-background">
<script>
(function(i,s,o,g,r,a,m){i['<API key>']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.<API key>(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','
ga('create', 'UA-56314084-1', 'auto');
ga('send', 'pageview');
</script><div id="page" class="hfeed site">
<a class="skip-link screen-reader-text" href="#content">Skip to content</a>
<header id="masthead" class="site-header" role="banner">
<div class="site-branding">
<div class="title-box">
<h1 class="site-title"><a href="http://cwpc.github.io/" rel="home">Communicating with Prisoners</a></h1>
<h2 class="site-description">Public Interest Analysis</h2>
</div>
</div>
<div id="scroller-anchor"></div>
<nav id="site-navigation" class="main-navigation clear" role="navigation">
<span class="menu-toggle"><a href="#">menu</a></span>
<div class="<API key>"><ul id="menu-left-nav" class="menu"><li id="menu-item-10830" class="menu-item <API key> <API key> menu-item-10830"><a title="outline of sections" href="http://cwpc.github.io/outline-post/">Outline</a></li>
<li id="menu-item-11571" class="menu-item <API key> <API key> menu-item-11571"><a title="context-sensitive notes link" href="http://cwpc.github.io/outline-notes/">Notes</a></li>
<li id="menu-item-11570" class="menu-item <API key> <API key> menu-item-11570"><a title="context-sensitive data link" href="http://cwpc.github.io/list-datasets/">Data</a></li>
</ul></div>
<div id="rng">
<div id="menu-secondary" class="menu-secondary"><ul id="<API key>" class="menu-items"><li id="menu-item-10840" class="menu-item <API key> <API key> menu-item-10840"><a title="about this ortext" href="http://cwpc.github.io/about/">About</a></li>
</ul></div> <div class="search-toggle">
<span class="fa fa-search"></span>
<a href="#search-container" class="screen-reader-text">search</a>
</div>
</div>
</nav><!-- #site-navigation -->
<div id="<API key>" class="search-box-wrapper clear hide">
<div class="search-box clear">
<form role="search" method="get" class="search-form" action="http://cwpc.github.io/">
<label>
<span class="screen-reader-text">Search for:</span>
<input type="search" class="search-field" placeholder="Search …" value="" name="s" title="Search for:" />
</label>
<input type="submit" class="search-submit" value="Search" />
</form> </div>
</div>
</header><!-- #masthead -->
<div id="content" class="site-content">
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<div class="section-label"></div>
<article id="post-31289" class="post-31289 refs type-refs status-publish hentry">
<header class="entry-header">
<h1 class="entry-title">Zlotnick-1995 Empowering the Battered Woman: The Use of Criminal</h1>
</header><!-- .entry-header -->
<div class="entry-content">
<img class="aligncenter otx-face" alt="face of a prisoner" src="http:
</div><!-- .entry-content -->
<footer class="entry-footer">
<div class="tags-footer">
</div>
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
<nav class="navigation post-navigation" role="navigation">
<h1 class="screen-reader-text">Post navigation</h1>
<div class="nav-links-nd"><div class="nav-nd-title">In Series of References</div><div class="nav-previous"><a href="http:
</nav><!-- .navigation -->
</main><!-- #main -->
</div><!-- #primary -->
</div><!-- #content -->
<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info">
<nav id="site-navigation" class="main-navigation clear" role="navigation">
<span class="menu-toggle"><a href="#">menu</a></span>
<div class="<API key>"><ul id="menu-left-nav-1" class="menu"><li class="menu-item <API key> <API key> menu-item-10830"><a title="outline of sections" href="http://cwpc.github.io/outline-post/">Outline</a></li>
<li class="menu-item <API key> <API key> menu-item-11571"><a title="context-sensitive notes link" href="http://cwpc.github.io/outline-notes/">Notes</a></li>
<li class="menu-item <API key> <API key> menu-item-11570"><a title="context-sensitive data link" href="http://cwpc.github.io/list-datasets/">Data</a></li>
</ul></div>
<div id="rng">
<div id="menu-secondary" class="menu-secondary"><ul id="<API key>" class="menu-items"><li class="menu-item <API key> <API key> menu-item-10840"><a title="about this ortext" href="http://cwpc.github.io/about/">About</a></li>
</ul></div> <div class="<API key>">
<span class="fa fa-search"></span>
<a href="#search-container" class="screen-reader-text">search</a>
</div>
</div>
<div id="<API key>" class="<API key> clear hide">
<div class="search-box clear">
<form role="search" method="get" class="search-form" action="http://cwpc.github.io/">
<label>
<span class="screen-reader-text">Search for:</span>
<input type="search" class="search-field" placeholder="Search …" value="" name="s" title="Search for:" />
</label>
<input type="submit" class="search-submit" value="Search" />
</form> </div>
</div>
<div id="footer-tagline">
<a href="http://cwpc.github.io/">Communicating with Prisoners</a>
</div>
</nav><!-- #site-navigation -->
</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->
<script type='text/javascript' src='http://cwpc.github.io/wp-content/themes/ortext/js/superfish.min.js?ver=1.7.4'></script>
<script type='text/javascript' src='http://cwpc.github.io/wp-content/themes/ortext/js/superfish-settings.js?ver=1.7.4'></script>
<script type='text/javascript' src='http://cwpc.github.io/wp-content/themes/ortext/js/navigation.js?ver=20120206'></script>
<script type='text/javascript' src='http://cwpc.github.io/wp-content/themes/ortext/js/skip-link-focus-fix.js?ver=20130115'></script>
<script type='text/javascript' src='http://cwpc.github.io/wp-content/themes/ortext/js/hide-search.js?ver=20120206'></script>
<script type='text/javascript' src='http://cwpc.github.io/wp-content/themes/ortext/js/show-hide-comments.js?ver=1.0'></script>
</body>
</html>
<!-- Dynamic page generated in 0.199 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2015-01-27 23:59:00 -->
<!-- super cache --> |
/// <autosync enabled="true" />
<reference path="js/app.min.js" />
<reference path="js/controllers/ChartControl.js" />
<reference path="js/controllers/DespesaControl.js" />
<reference path="js/controllers/doacaocontrol.js" />
<reference path="js/controllers/doadorcontrol.js" />
<reference path="js/controllers/estoquecontrol.js" />
<reference path="js/controllers/eventocontrol.js" />
<reference path="js/controllers/favorecidocontrol.js" />
<reference path="js/controllers/homecontrol.js" />
<reference path="js/controllers/informativocontrol.js" />
<reference path="js/controllers/InteressadoControl.js" />
<reference path="js/controllers/itemcontrol.js" />
<reference path="js/controllers/<API key>.js" />
<reference path="js/controllers/planejamentocontrol.js" />
<reference path="js/controllers/<API key> - copy.js" />
<reference path="js/controllers/<API key>.js" />
<reference path="js/controllers/<API key>.js" />
<reference path="js/controllers/usuariocontrol.js" />
<reference path="js/controllers/voluntariocontrol.js" />
<reference path="js/date.js" />
<reference path="js/directives/Directives.js" />
<reference path="js/services/services.js" />
<reference path="js/site.min.js" />
<reference path="js/vendor.min.js" />
<reference path="lib/admin-lte/dist/js/app.js" />
<reference path="lib/angular/angular.js" />
<reference path="lib/angular-animate/angular-animate.js" />
<reference path="lib/angular-bootstrap/ui-bootstrap-tpls.js" />
<reference path="lib/angular-br-filters/release/angular-br-filters.js" />
<reference path="lib/angular-echarts/dist/angular-echarts.min.js" />
<reference path="lib/angular-input-masks/<API key>.js" />
<reference path="lib/<API key>/dist/<API key>.js" />
<reference path="lib/angular-route/angular-route.js" />
<reference path="lib/<API key>/dist/<API key>.min.js" />
<reference path="lib/bootstrap/dist/js/bootstrap.js" />
<reference path="lib/br-masks/releases/br-masks.js" />
<reference path="lib/echarts/build/dist/echarts.js" />
<reference path="lib/fullcalendar/dist/fullcalendar.js" />
<reference path="lib/jquery/dist/jquery.js" />
<reference path="lib/jquery-validation/dist/jquery.validate.js" />
<reference path="lib/<API key>/jquery.validate.unobtrusive.js" />
<reference path="lib/moment/moment.js" />
<reference path="lib/ng-dialog/js/ngDialog.js" />
<reference path="lib/ng-file-upload/ng-file-upload.js" />
<reference path="lib/ng-tags-input/ng-tags-input.js" />
<reference path="lib/rangy/rangy-classapplier.js" />
<reference path="lib/rangy/rangy-core.js" />
<reference path="lib/rangy/rangy-highlighter.js" />
<reference path="lib/rangy/<API key>.js" />
<reference path="lib/rangy/rangy-serializer.js" />
<reference path="lib/rangy/rangy-textrange.js" />
<reference path="lib/string-mask/src/string-mask.js" />
<reference path="lib/textangular/dist/textAngular.js" />
<reference path="lib/textangular/dist/<API key>.js" />
<reference path="lib/textangular/dist/textAngularSetup.js" />
<reference path="lib/tinycolor/tinycolor.js" /> |
%!TEX root = 00-Thesis-Main.tex
\chapter*{Zusammenfassung}
\begin{german}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis eu metus maximus, sodales nisi eu, accumsan dolor. Curabitur consectetur augue dui, vitae ultricies turpis rhoncus quis. Nulla laoreet libero ac ipsum euismod luctus. Nam vehicula dapibus libero, eget fermentum nibh. Nullam sagittis lorem id lobortis faucibus. Quisque varius, eros vitae pellentesque imperdiet, odio felis sodales mi, a euismod nulla urna vitae augue. Sed in nisl vel arcu dignissim vehicula at id urna. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos.
\end{german} |
// UnityOSC - Open Sound Control interface for the Unity3d game engine
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation
// and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// of the Software.
// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
using System;
using System.Net;
using System.Collections.Generic;
using UnityEngine;
using UnityOSC;
<summary>
Models a log of a server composed by an OSCServer, a List of OSCPacket and a List of
strings that represent the current messages in the log.
</summary>
public struct ServerLog
{
public OSCServer server;
public List<OSCPacket> packets;
public List<string> log;
}
<summary>
Models a log of a client composed by an OSCClient, a List of OSCMessage and a List of
strings that represent the current messages in the log.
</summary>
public struct ClientLog
{
public OSCClient client;
public List<OSCMessage> messages;
public List<string> log;
}
<summary>
Handles all the OSC servers and clients of the current Unity game/application.
Tracks incoming and outgoing messages.
</summary>
public class OSCHandler : MonoBehaviour
{
#region Singleton Constructors
static OSCHandler()
{
}
OSCHandler()
{
}
public static OSCHandler Instance
{
get
{
if (_instance == null)
{
_instance = new GameObject ("OSCHandler").AddComponent<OSCHandler>();
}
return _instance;
}
}
#endregion
#region Member Variables
private static OSCHandler _instance = null;
private Dictionary<string, ClientLog> _clients = new Dictionary<string, ClientLog>();
private Dictionary<string, ServerLog> _servers = new Dictionary<string, ServerLog>();
private const int _loglength = 25;
#endregion
<summary>
Initializes the OSC Handler.
Here you can create the OSC servers and clientes.
</summary>
public void Init()
{
//Initialize OSC clients (transmitters)
//Example:
//CreateClient("SuperCollider", IPAddress.Parse("127.0.0.1"), 5555);
//Initialize OSC servers (listeners)
//Example:
//CreateServer("AndroidPhone", 6666);
}
#region Properties
public Dictionary<string, ClientLog> Clients
{
get
{
return _clients;
}
}
public Dictionary<string, ServerLog> Servers
{
get
{
return _servers;
}
}
#endregion
#region Methods
<summary>
Ensure that the instance is destroyed when the game is stopped in the Unity editor
Close all the OSC clients and servers
</summary>
void OnApplicationQuit()
{
foreach(KeyValuePair<string,ClientLog> pair in _clients)
{
pair.Value.client.Close();
}
foreach(KeyValuePair<string,ServerLog> pair in _servers)
{
pair.Value.server.Close();
}
_instance = null;
}
<summary>
Creates an OSC Client (sends OSC messages) given an outgoing port and address.
</summary>
<param name="clientId">
A <see cref="System.String"/>
</param>
<param name="destination">
A <see cref="IPAddress"/>
</param>
<param name="port">
A <see cref="System.Int32"/>
</param>
public void CreateClient(string clientId, IPAddress destination, int port)
{
ClientLog clientitem = new ClientLog();
clientitem.client = new OSCClient(destination, port);
clientitem.log = new List<string>();
clientitem.messages = new List<OSCMessage>();
_clients.Add(clientId, clientitem);
// Send test message
string testaddress = "/test/alive/";
OSCMessage message = new OSCMessage(testaddress, destination.ToString());
message.Append(port); message.Append("OK");
_clients[clientId].log.Add(String.Concat(DateTime.UtcNow.ToString(),".",
FormatMilliseconds(DateTime.Now.Millisecond), " : ",
testaddress," ", DataToString(message.Data)));
_clients[clientId].messages.Add(message);
_clients[clientId].client.Send(message);
}
<summary>
Creates an OSC Server (listens to upcoming OSC messages) given an incoming port.
</summary>
<param name="serverId">
A <see cref="System.String"/>
</param>
<param name="port">
A <see cref="System.Int32"/>
</param>
public void CreateServer(string serverId, int port)
{
OSCServer server = new OSCServer(port);
server.PacketReceivedEvent += OnPacketReceived;
ServerLog serveritem = new ServerLog();
serveritem.server = server;
serveritem.log = new List<string>();
serveritem.packets = new List<OSCPacket>();
_servers.Add(serverId, serveritem);
}
void OnPacketReceived(OSCServer server, OSCPacket packet)
{
}
<summary>
Sends an OSC message to a specified client, given its clientId (defined at the OSC client construction),
OSC address and a single value. Also updates the client log.
</summary>
<param name="clientId">
A <see cref="System.String"/>
</param>
<param name="address">
A <see cref="System.String"/>
</param>
<param name="value">
A <see cref="T"/>
</param>
public void SendMessageToClient<T>(string clientId, string address, T value)
{
List<object> temp = new List<object>();
temp.Add(value);
SendMessageToClient(clientId, address, temp);
}
<summary>
Sends an OSC message to a specified client, given its clientId (defined at the OSC client construction),
OSC address and a list of values. Also updates the client log.
</summary>
<param name="clientId">
A <see cref="System.String"/>
</param>
<param name="address">
A <see cref="System.String"/>
</param>
<param name="values">
A <see cref="List<T>"/>
</param>
public void SendMessageToClient<T>(string clientId, string address, List<T> values)
{
if(_clients.ContainsKey(clientId))
{
OSCMessage message = new OSCMessage(address);
foreach(T msgvalue in values)
{
message.Append(msgvalue);
}
if(_clients[clientId].log.Count < _loglength)
{
_clients[clientId].log.Add(String.Concat(DateTime.UtcNow.ToString(),".",
FormatMilliseconds(DateTime.Now.Millisecond),
" : ", address, " ", DataToString(message.Data)));
_clients[clientId].messages.Add(message);
}
else
{
_clients[clientId].log.RemoveAt(0);
_clients[clientId].messages.RemoveAt(0);
_clients[clientId].log.Add(String.Concat(DateTime.UtcNow.ToString(),".",
FormatMilliseconds(DateTime.Now.Millisecond),
" : ", address, " ", DataToString(message.Data)));
_clients[clientId].messages.Add(message);
}
_clients[clientId].client.Send(message);
}
else
{
Debug.LogError(string.Format("Can't send OSC messages to {0}. Client doesn't exist.", clientId));
}
}
<summary>
Updates clients and servers logs.
</summary>
public void UpdateLogs()
{
foreach(KeyValuePair<string,ServerLog> pair in _servers)
{
if(_servers[pair.Key].server.LastReceivedPacket != null)
{
//Initialization for the first packet received
if(_servers[pair.Key].log.Count == 0)
{
_servers[pair.Key].packets.Add(_servers[pair.Key].server.LastReceivedPacket);
_servers[pair.Key].log.Add(String.Concat(DateTime.UtcNow.ToString(), ".",
FormatMilliseconds(DateTime.Now.Millisecond)," : ",
_servers[pair.Key].server.LastReceivedPacket.Address," ",
DataToString(_servers[pair.Key].server.LastReceivedPacket.Data)));
break;
}
if(_servers[pair.Key].server.LastReceivedPacket.TimeStamp
!= _servers[pair.Key].packets[_servers[pair.Key].packets.Count - 1].TimeStamp)
{
if(_servers[pair.Key].log.Count > _loglength - 1)
{
_servers[pair.Key].log.RemoveAt(0);
_servers[pair.Key].packets.RemoveAt(0);
}
_servers[pair.Key].packets.Add(_servers[pair.Key].server.LastReceivedPacket);
_servers[pair.Key].log.Add(String.Concat(DateTime.UtcNow.ToString(), ".",
FormatMilliseconds(DateTime.Now.Millisecond)," : ",
_servers[pair.Key].server.LastReceivedPacket.Address," ",
DataToString(_servers[pair.Key].server.LastReceivedPacket.Data)));
}
}
}
}
<summary>
Converts a collection of object values to a concatenated string.
</summary>
<param name="data">
A <see cref="List<System.Object>"/>
</param>
<returns>
A <see cref="System.String"/>
</returns>
private string DataToString(List<object> data)
{
string buffer = "";
for(int i = 0; i < data.Count; i++)
{
buffer += data[i].ToString() + " ";
}
buffer += "\n";
return buffer;
}
<summary>
Formats a milliseconds number to a 000 format. E.g. given 50, it outputs 050. Given 5, it outputs 005
</summary>
<param name="milliseconds">
A <see cref="System.Int32"/>
</param>
<returns>
A <see cref="System.String"/>
</returns>
private string FormatMilliseconds(int milliseconds)
{
if(milliseconds < 100)
{
if(milliseconds < 10)
return String.Concat("00",milliseconds.ToString());
return String.Concat("0",milliseconds.ToString());
}
return milliseconds.ToString();
}
#endregion
} |
This plugin allows admins to see who or what placed a block, and revert it if needed.
# Commands
General
| Command | Permission | Description |
|
|/pb inspect | preciousblocks.inspect | Inspect who changed certain blocks|
|/pb revert | preciousblocks.reverse | Revert an area around you|
| Permissions | Description | Commands | Recommended groups |
|
| preciousblocks.inspect | | `/pb inspect` | |
| preciousblocks.reverse | | `/pb revert` | | |
package exterminatorjeff.undergroundbiomes.common.block.wall;
import exterminatorjeff.undergroundbiomes.api.API;
import exterminatorjeff.undergroundbiomes.api.names.BlockEntry;
import exterminatorjeff.undergroundbiomes.common.block.UBStone;
import exterminatorjeff.undergroundbiomes.config.UBConfig;
/**
*
* @author CurtisA, LouisDB
*
*/
public class <API key> extends UBWallMetamorphic {
public <API key>(BlockEntry baseStoneEntry) {
super(baseStoneEntry);
}
@Override
public UBStone baseStone() {
return (UBStone) API.METAMORPHIC_STONE.getBlock();
}
@Override
public boolean isEnabled() {
return super.isEnabled() && UBConfig.INSTANCE.stoneWallsOn();
}
} |
Javascript
[1,2,3,4,5,6,7,8].filter(function(num){
return num%2;
})
.map(function(num){
return num*num;
});
RxJS
Rx.Observable.from([1, 2, 3, 4, 5, 6, 7, 8])
.filter(function (num) {
return num % 2;
}).map(function (num) {
return num * num;
}).forEach(function (num) {
return console.log(num);
}); |
<ion-header>
<ion-navbar primary>
<ion-title><ion-icon name="albums"></ion-icon> {{title}}</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<ion-list>
<ion-item tappable *ngFor="let linea of lineas" (click)="goPerfiles(linea)">
<h2>{{linea.linea}}</h2>
<p>{{linea.descripcion}}</p>
<ion-icon name="arrow-dropright" item-right></ion-icon>
</ion-item>
</ion-list>
</ion-content> |
package com.hoperun.feiying.service.server.component;
/**
* ClassName: NetworkException
*
* @description
* @author zhang_linlin
* @Date Feb 8, 2014
*
*/
public class NetworkException extends Exception {
public NetworkException() {
super();
}
public NetworkException(String message, Throwable cause) {
super(message, cause);
}
public NetworkException(String message) {
super(message);
}
public NetworkException(Throwable cause) {
super(cause);
}
private static final long serialVersionUID = <API key>;
} |
package br.com.fiap.helper;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.<API key>;
import javax.persistence.Persistence;
import javax.persistence.Query;
import br.com.fiap.entity.Apolice;
import br.com.fiap.entity.Segurado;
import br.com.fiap.entity.Veiculo;
public class SeguroHelper implements AutoCloseable{
private <API key> emf;
private EntityManager em;
public SeguroHelper() {
this.emf = Persistence.<API key>("AtividadeFinal");
this.em = emf.createEntityManager();
}
@Override
public void close() throws Exception {
em.close();
emf.close();
}
public void criarNovoSeguro(Segurado segurado){
this.em.getTransaction().begin();
this.em.persist(segurado);
this.em.getTransaction().commit();
}
public Segurado buscarSeguro(Integer id){
return em.find(Segurado.class, id);
}
@SuppressWarnings("unchecked")
public List<Segurado> listarSegurados(){
Query query = em.createNamedQuery("Segurado.findAll");
return query.getResultList();
}
@SuppressWarnings("unchecked")
public List<Apolice> listarApolices(){
Query query = em.createNamedQuery("Apolice.findAll");
return query.getResultList();
}
@SuppressWarnings("unchecked")
public List<Veiculo> listarVeiculos(){
Query query = em.createNamedQuery("Veiculo.findAll");
return query.getResultList();
}
} |
package org.hyperic.hq.plugin.zimbra.five;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.FilenameFilter;
import java.io.IOException;
import java.text.MessageFormat;
import java.util.Arrays;
import java.util.List;
public class GenerateXML {
static String metricTag = "\t\t<metric name=\"{0}\" category=\"THROUGHPUT\" alias=\"{0}\" interval=\"60000\" indicator=\"false\" units=\"{1}\"/>\n";
static String serviceTag = "<service name=\"{0} Stats\">\r\t\t<plugin type=\"collector\" class=\"org.hyperic.hq.plugin.zimbra.five.ZimbraCollector\"/>\r\t\t<config>\r\t\t\t<option name=\"{0}-stat-ptql\" default=\"Pid.PidFile.eq=%installpath%/zmstat/pid/zmstat-{0}.pid\" description=\"Sigar PTQL Process Query\"/>\r\t\t</config>\r\t\t<filter name=\"template\" value=\"zimbra-stats:statsfile=%installpath%/zmstat/{0}.csv:$'{'alias'}'\"/>\r\t\t<metric name=\"Availability\" template=\"sigar:Type=ProcState,Arg=%{0}-stat-ptql%:State\" indicator=\"true\"/>\n";
public static void main(String[] arg) throws IOException {
StringBuffer res = new StringBuffer();
List percentage = Arrays.asList(ZimbraCollector.percentage_list);
File dir = new File("logs");
String[] files = dir.list(new CSVFilter());
for (int n=0;n<files.length;n++) {
String file=files[n];
System.out.println("-->" + file);
res.append(MessageFormat.format(serviceTag,file.split("\\.")));
BufferedReader buffer = new BufferedReader(new FileReader(new File("logs", file)));
String line = buffer.readLine();
System.out.println("-->" + line);
String[] metrics = line.split(",");
System.out.println("-->" + Arrays.asList(metrics));
for (int i=0;i<metrics.length;i++) {
String metric=metrics[i];
String type = percentage.contains(new File(file).getName()) ? "percentage" : "";
String args[]={metric.trim(), type};
res.append(MessageFormat.format(metricTag, args));
}
res.append("</service>\n");
}
System.out.println(res.toString());
}
private static class CSVFilter implements FilenameFilter {
public boolean accept(File dir, String name) {
return name.endsWith("csv");
}
}
} |
#ifndef USART0_H_
#define USART0_H_
#include "sam.h"
#include <stdlib.h>
#include <stdbool.h>
#include "../HelperFunctions/HelperFunctions.h"
#include "../../config.h"
#include "../ErrorHandling/ErrorHandling.h"
typedef void (*USART_RECV_CALLBACK)(uint8_t* startPtr, uint16_t Length);
ErrorCode USART0_init(uint32_t BaudRate, uint32_t RecvLength);
ErrorCode USART0_put_data(uint8_t* sendData, uint16_t Length);
ErrorCode <API key>(uint32_t Length);
ErrorCode <API key>(USART_RECV_CALLBACK callBack);
bool USART0_has_space();
bool USART0_is_idle();
#endif /* USART0_H_ */ |
// <API key>.h
// ExpandableTableView
#import <Foundation/Foundation.h>
@class ExpandableTableView;
@protocol <API key> <NSObject>
@optional
- (void)tableView:(ExpandableTableView *)tableView willExpandSection:(NSUInteger)section;
- (void)tableView:(ExpandableTableView *)tableView didExpandSection:(NSUInteger)section;
- (void)tableView:(ExpandableTableView *)tableView willContractSection:(NSUInteger)section;
- (void)tableView:(ExpandableTableView *)tableView didContractSection:(NSUInteger)section;
- (BOOL)tableView:(ExpandableTableView *)tableView canRemoveSection:(NSUInteger)section;
//- (CGFloat)tableView:(ExpandableTableView *)tableView heightForSection:(NSUInteger)section;
- (CGFloat)tableView:(ExpandableTableView *)tableView <API key>:(NSIndexPath *)indexPath;
- (NSInteger)tableView:(ExpandableTableView *)tableView <API key>:(NSIndexPath *)indexPath;
- (void)tableView:(ExpandableTableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath;
- (void)tableView:(ExpandableTableView *)tableView willDisplayCell:(UITableViewCell *)cell forSection:(NSUInteger)section;
//- (void)tableView:(ExpandableTableView *)tableView <API key>:(NSIndexPath *)indexPath;
- (NSIndexPath *)tableView:(ExpandableTableView *)tableView <API key>:(NSIndexPath *)indexPath;
- (void)tableView:(ExpandableTableView *)tableView <API key>:(NSIndexPath *)indexPath;
- (NSIndexPath *)tableView:(ExpandableTableView *)tableView <API key>:(NSIndexPath *)indexPath;
- (void)tableView:(ExpandableTableView *)tableView <API key>:(NSIndexPath *)indexPath;
//- (void)tableView:(ExpandableTableView *)tableView <API key>:(NSIndexPath *)indexPath;
//- (void)tableView:(ExpandableTableView *)tableView <API key>:(NSIndexPath *)indexPath;
//- (<API key>)tableView:(ExpandableTableView *)tableView <API key>:(NSIndexPath *)indexPath;
//- (NSString *)tableView:(ExpandableTableView *)tableView <API key>:(NSIndexPath *)indexPath;
//- (BOOL)tableView:(ExpandableTableView *)tableView <API key>:(NSIndexPath *)indexPath;
/- (NSIndexPath *)tableView:(UITableView *)tableView <API key>:(NSIndexPath *)sourceIndexPath toProposedIndexPath:(NSIndexPath *)<API key>;
//- (BOOL)tableView:(ExpandableTableView *)tableView <API key>:(NSIndexPath *)indexPath;
//- (BOOL)tableView:(ExpandableTableView *)tableView canPerformAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender;
//- (void)tableView:(ExpandableTableView *)tableView performAction:(SEL)action forRowAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender;
@end |
jquery-scrollstop
==============
This plugin fires two events on `window` when scrolling starts and stops:
`scrollstart` and `scrollstop`.
## Example
The example shows a small box in the upper left that says "SCROLLING" and
colors the body different colors when scrolling:
[http:
## Usage
`scrollstart` fires after the first scroll event and won't fire again until
after a `scrollstop` event is fired.
`scrollstop` fires after no `scroll` events have fired for 250 milliseconds.
js
$(window)
.on("scrollstart", function() {
// Paint the world yellow when scrolling starts.
$(document.body).css({background: "yellow"});
})
.on("scrollstop", function() {
// Paint it all green when scrolling stops.
$(document.body).css({background: "green"});
})
Configuration
# latency
`latency` is the minimum time between the last scroll event and when the
`scrollstop` event fires. Set `$.event.special.scrollstop.latency` to the
desired number of milliseconds (default: 250).
js
// Configure time between final scroll event and
// `scrollstop` event to 650ms (default is 250ms).
$.event.special.scrollstop.latency = 650;
## latency per element
Latency can be configured per-element by passing options when the event listener
is bound. If multiple event listeners are bound to the same element, only the
data from the first event listener will set the configuration.
js
// Configure latency to 650ms for #scrolling-div
$("#scrolling-div").on("scrollstop", {latency: 650}, function() { ... });
jQuery Version Support
The plugin is tested in jQuery 1.2.3+ and jQuery 2.0.3+.
Attribution
Originally code taken from James Padolsey's blog:
[http: |
var formatString = function format(template, data) {
function `format`
Parameters
0, `template` [String]: The template
1, `data` [Array|Object]: The data
Returns
[String]: The result of formatting the template or unformatted template if data is nothing
Throws:
TypeError: If template is nothing
Examples:
formatString("Hello %user.name, my name is %name", {
user: {
name: function () {
return "Adam";
}
},
name: "Björn"
});
var
// the interpolation symbol:
interpolationSymbol = "%",
// This regex checks if template contains any matches that are similar to:
// %user.toString or %3.toLocaleString
extCheckRe = new RegExp(interpolationSymbol + "([A-Za-z0-9]+)[\.]{1}([A-Za-z]+)", "g"),
// function names:
checkIsExtended, foreach, isNothing, getRe, getValue;
isNothing = function (a) {
return a === null || a === void 0;
};
checkIsExtended = function() {
var r = new RegExp(extCheckRe);
return r.test(template);
};
getRe = function (key, prop) {
if (isNothing(prop)) {
return new RegExp(interpolationSymbol + key, "g");
}
return new RegExp(interpolationSymbol + key + "\\." + prop, "g");
};
getValue = function (obj, prop) {
if (obj === void 0 || prop === void 0) {
return void 0;
}
if (typeof obj[prop] === "function") {
return obj[prop]();
} else {
return obj[prop].toString();
}
};
foreach = function (collection, callback, optContext) {
var i, k, maxi;
if (isNothing(callback)) {
return;
}
if (collection instanceof Array) {
maxi = collection.length;
for (i = 0; i < maxi; i++) {
callback.call(optContext || this, collection[i], i, collection);
}
} else {
for (k in collection) {
if (collection.hasOwnProperty(k)) {
callback.call(optContext || this, collection[k], k, collection);
}
}
}
};
if (isNothing(template)) {
throw new TypeError("Parameter [0] (`template`) cannot be nothing!");
}
if (isNothing(data)) {
return template;
}
return (function main() {
var result = template;
if (checkIsExtended()) {
(function () {
var koi, prop, match;
while ((match = extCheckRe.exec(result))) {
koi = match[1];
prop = match[2];
result = result.replace(getRe(koi, prop), getValue(data[koi], prop));
}
})();
}
foreach(data, function (value, koi) {
result = result.replace(getRe(koi), value);
});
return result;
})();
}; |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Exception: JSON::LD::JsonLdError::InvalidEmbeddedNode
— Web portal for RDF.rb.
</title>
<link rel="stylesheet" href="../../../css/style.css" type="text/css" />
<link rel="stylesheet" href="../../../css/common.css" type="text/css" />
<script type="text/javascript">
pathId = "JSON::LD::JsonLdError::InvalidEmbeddedNode";
relpath = '../../../';
</script>
<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="../../../class_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="../../../_index.html">Index (I)</a> »
<span class='title'><span class='object_link'><a href="../../../JSON.html" title="JSON (module)">JSON</a></span></span> » <span class='title'><span class='object_link'><a href="../../LD.html" title="JSON::LD (module)">LD</a></span></span> » <span class='title'><span class='object_link'><a href="../JsonLdError.html" title="JSON::LD::JsonLdError (class)">JsonLdError</a></span></span>
»
<span class="title">InvalidEmbeddedNode</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="../../../class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><h1>Exception: JSON::LD::JsonLdError::InvalidEmbeddedNode
</h1>
<div class="box_info">
<dl>
<dt>Inherits:</dt>
<dd>
<span class="inheritName"><span class='object_link'><a href="../JsonLdError.html" title="JSON::LD::JsonLdError (class)">JSON::LD::JsonLdError</a></span></span>
<ul class="fullTree">
<li><span class='object_link'><a href="../../../Object.html" title="Object (class)">Object</a></span></li>
<li class="next">StandardError</li>
<li class="next"><span class='object_link'><a href="../JsonLdError.html" title="JSON::LD::JsonLdError (class)">JSON::LD::JsonLdError</a></span></li>
<li class="next">JSON::LD::JsonLdError::InvalidEmbeddedNode</li>
</ul>
<a href="#" class="inheritanceTree">show all</a>
</dd>
</dl>
<dl>
<dt>Defined in:</dt>
<dd>vendor/bundler/ruby/3.1.0/bundler/gems/<API key>/lib/json/ld.rb</dd>
</dl>
</div>
<h2>Method Summary</h2>
<h3 class="inherited">Methods inherited from <span class='object_link'><a href="../JsonLdError.html" title="JSON::LD::JsonLdError (class)">JSON::LD::JsonLdError</a></span></h3>
<p class="inherited"><span class='object_link'><a href="../JsonLdError.html#<API key>" title="JSON::LD::JsonLdError#code (method)">#code</a></span>, <span class='object_link'><a href="../JsonLdError.html#<API key>" title="JSON::LD::JsonLdError#to_s (method)">#to_s</a></span></p>
</div>
<div id="footer">
Generated on Thu Dec 30 14:45:53 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.27 (ruby-3.1.0).
</div>
</div>
</body>
</html> |
#include "i2c_func.h"
void I2C1_IRQHandler(void){
//if(I2C_GetFlagStatus(I2C1, I2C_FLAG_NACKF) == SET){
// I2C_ClearFlag(I2C1, I2C_FLAG_NACKF);
}
//initialize the i2c periperal
void init_i2c(void){
//<API key>(<API key>, ENABLE); //enable for i2c fast mode
//<API key>(<API key>|<API key>, ENABLE);
<API key>(RCC_AHBPeriph_GPIOB, ENABLE);
<API key>(RCC_APB1Periph_I2C1, ENABLE);
RCC_I2CCLKConfig(RCC_I2C1CLK_SYSCLK);
GPIO_PinAFConfig(GPIOB, GPIO_PinSource6, GPIO_AF_1);
GPIO_PinAFConfig(GPIOB, GPIO_PinSource7, GPIO_AF_1);
GPIO_InitTypeDef GPIOB_InitStruct = {
.GPIO_Pin = GPIO_Pin_6|GPIO_Pin_7,
.GPIO_Speed = GPIO_Speed_50MHz,
.GPIO_Mode = GPIO_Mode_AF,
.GPIO_OType = GPIO_OType_OD,
.GPIO_PuPd = GPIO_PuPd_UP
};
GPIO_Init(GPIOB, &GPIOB_InitStruct);
GPIO_PinLockConfig(GPIOB, GPIO_PinSource6);
GPIO_PinLockConfig(GPIOB, GPIO_PinSource7);
I2C_InitTypeDef I2C_InitStructure = {
//.I2C_Timing = 0x20310A0D,
.I2C_Timing = 0x0010020A,
.I2C_AnalogFilter = <API key>,
.I2C_DigitalFilter = 0x00,
.I2C_Mode = I2C_Mode_I2C,
.I2C_OwnAddress1 = 0x00,
.I2C_Ack = I2C_Ack_Enable,
.<API key> = <API key>
};
I2C_Init(I2C1, &I2C_InitStructure);
//I2C_ITConfig(USART1, I2C_IT_NACKI, ENABLE);
//NVIC_EnableIRQ(I2C1_IRQn);
I2C_Cmd(I2C1, ENABLE);
}
void I2C_WrReg(uint8_t Reg, uint8_t Val){
//Wait until I2C isn't busy
while(I2C_GetFlagStatus(I2C1, I2C_FLAG_BUSY) == SET);
//"Handle" a transfer - The STM32F0 series has a shocking I2C interface...
//...Regardless! Send the address of the HMC sensor down the I2C Bus and generate
//a start saying we're going to write one byte. I'll be completely honest,
//the I2C peripheral doesn't make too much sense to me and a lot of the code is
//from the Std peripheral library
<API key>(I2C1, 0x78, 1, I2C_Reload_Mode, <API key>);
//Ensure the transmit interrupted flag is set
while(I2C_GetFlagStatus(I2C1, I2C_FLAG_TXIS) == RESET);
//Send the address of the register we wish to write to
I2C_SendData(I2C1, Reg);
//Ensure that the transfer complete reload flag is Set, essentially a standard
//TC flag
while(I2C_GetFlagStatus(I2C1, I2C_FLAG_TCR) == RESET);
//Now that the HMC5883L knows which register we want to write to, send the address
//again and ensure the I2C peripheral doesn't add any start or stop conditions
<API key>(I2C1, 0x78, 1, I2C_AutoEnd_Mode, I2C_No_StartStop);
//Again, wait until the transmit interrupted flag is set
while(I2C_GetFlagStatus(I2C1, I2C_FLAG_TXIS) == RESET);
//Send the value you wish you write to the register
I2C_SendData(I2C1, Val);
//Wait for the stop flag to be set indicating a stop condition has been sent
while(I2C_GetFlagStatus(I2C1, I2C_FLAG_STOPF) == RESET);
//Clear the stop flag for the next potential transfer
I2C_ClearFlag(I2C1, I2C_FLAG_STOPF);
}
void i2c_out(uint8_t val){
//Wait until I2C isn't busy
while(I2C_GetFlagStatus(I2C1, I2C_FLAG_BUSY) == SET);
//"Handle" a transfer - The STM32F0 series has a shocking I2C interface...
//...Regardless! Send the address of the HMC sensor down the I2C Bus and generate
//a start saying we're going to write one byte. I'll be completely honest,
//the I2C peripheral doesn't make too much sense to me and a lot of the code is
//from the Std peripheral library
<API key>(I2C1, 0x78, 1, I2C_Reload_Mode, <API key>);
//Ensure the transmit interrupted flag is set
while(I2C_GetFlagStatus(I2C1, I2C_FLAG_TXIS) == RESET);
//Send the address of the register we wish to write to
I2C_SendData(I2C1, val);
//Ensure that the transfer complete reload flag is Set, essentially a standard
//TC flag
while(I2C_GetFlagStatus(I2C1, I2C_FLAG_TCR) == RESET);
//Clear the stop flag for the next potential transfer
I2C_ClearFlag(I2C1, I2C_FLAG_STOPF);
}
void I2C_start(uint8_t i2caddress, uint8_t i2cdirection){
<API key>(I2C1, i2caddress);
<API key>(I2C1, i2cdirection);
while(I2C_GetFlagStatus(I2C1, I2C_FLAG_BUSY) == SET);
//"Handle" a transfer - The STM32F0 series has a shocking I2C interface...
//...Regardless! Send the address of the HMC sensor down the I2C Bus and generate
//a start saying we're going to write one byte. I'll be completely honest,
//the I2C peripheral doesn't make too much sense to me and a lot of the code is
//from the Std peripheral library
<API key>(I2C1, i2caddress, 1, I2C_Reload_Mode, <API key>);
while(I2C_GetFlagStatus(I2C1, I2C_FLAG_TXIS) == RESET);
} |
<?php
App::uses('CakeSchema', 'Model');
/**
* Base Class for Migration management
*
* @package migrations
* @subpackage migrations.libs.model
*/
class CakeMigration extends Object {
/**
* Migration description
*
* @var string
*/
public $description = '';
/**
* Migration dependencies
*
* @var array
* @access public
*/
public $dependencies = array();
/**
* Migration information
*
* This variable will be set while the migration is running and contains:
* - `name` - File name without extension
* - `class` - Class name
* - `version` - What version represent on mapping
* - `type` - Can be 'app' or a plugin name
* - `migrated` - Datetime of when it was applied, or null
*
* @var array
*/
public $info = null;
/**
* Actions to be performed
*
* @var array $migration
*/
public $migration = array(
'up' => array(),
'down' => array()
);
/**
* Running direction
*
* @var string $direction
*/
public $direction = null;
/**
* Connection used
*
* @var string
*/
public $connection = 'default';
/**
* DataSource used
*
* @var DboSource
*/
public $db = null;
/**
* MigrationVersion instance
*
* @var MigrationVersion
*/
public $Version = null;
/**
* CakeSchema instance
*
* @var CakeSchema
*/
public $Schema = null;
/**
* Callback class that will be called before/after every action
*
* @var object
*/
public $callback = null;
/**
* Precheck object executed before db updated
*
* @var PrecheckBase
*/
public $Precheck = null;
/**
* Before migration callback
*
* @param string $direction, up or down direction of migration process
* @return boolean Should process continue
*/
public function before($direction) {
return true;
}
/**
* After migration callback
*
* @param string $direction, up or down direction of migration process
* @return boolean Should process continue
*/
public function after($direction) {
return true;
}
/**
* Constructor
*
* @param array $options optional load object properties
*/
public function __construct($options = array()) {
parent::__construct();
if (!empty($options['up'])) {
$this->migration['up'] = $options['up'];
}
if (!empty($options['down'])) {
$this->migration['down'] = $options['down'];
}
$allowed = array('connection', 'callback');
foreach ($allowed as $variable) {
if (!empty($options[$variable])) {
$this->{$variable} = $options[$variable];
}
}
if (empty($options['precheck'])) {
App::uses('PrecheckException', 'Migrations.Lib/Migration');
$this->Precheck = new PrecheckException();
} else {
$class = Inflector::camelize($options['precheck']);
list($plugin, $class) = pluginSplit($class, true);
App::uses($class, $plugin . 'Lib/Migration');
if (!class_exists($class)) {
throw new MigrationException($this, sprintf(
__d('migrations', 'Migration precheck class (%s) could not be loaded.'), $options['precheck']
), E_USER_NOTICE);
}
$this->Precheck = new $class();
if (!is_a($this->Precheck, 'PrecheckBase')) {
throw new MigrationException($this, sprintf(
__d('migrations', 'Migration precheck class (%s) is not a valid precheck class.'), $class
), E_USER_NOTICE);
}
}
}
/**
* Run migration
*
* @param string $direction, up or down direction of migration process
* @return boolean Status of the process
* @throws MigrationException
*/
public function run($direction) {
if (!in_array($direction, array('up', 'down'))) {
throw new MigrationException($this, sprintf(
__d('migrations', 'Migration direction (%s) is not one of valid directions.'), $direction
), E_USER_NOTICE);
}
$this->direction = $direction;
$null = null;
$this->db = ConnectionManager::getDataSource($this->connection);
$this->db->cacheSources = false;
$this->db->begin($null);
$this->Schema = new CakeSchema(array('connection' => $this->connection));
try {
$this->_invokeCallbacks('beforeMigration', $direction);
$result = $this->_run();
$this->_clearCache();
$this->_invokeCallbacks('afterMigration', $direction);
if (!$result) {
return false;
}
} catch (Exception $e) {
$this->db->rollback($null);
throw $e;
}
return $this->db->commit($null);
}
/**
* Run migration commands
*
* @return void
* @throws MigrationException
*/
protected function _run() {
$result = true;
//force the order of migration types
uksort($this->migration[$this->direction], array($this, 'migration_order'));
foreach ($this->migration[$this->direction] as $type => $info) {
switch ($type) {
case 'create_table':
$methodName = '_createTable';
break;
case 'drop_table':
$methodName = '_dropTable';
break;
case 'rename_table':
$methodName = '_renameTable';
break;
case 'create_field':
$type = 'add';
$methodName = '_alterTable';
break;
case 'drop_field':
$type = 'drop';
$methodName = '_alterTable';
break;
case 'alter_field':
$type = 'change';
$methodName = '_alterTable';
break;
case 'rename_field':
$type = 'rename';
$methodName = '_alterTable';
break;
default:
$message = __d('migrations', 'Migration action type (%s) is not one of valid actions type.', $type);
throw new MigrationException($this, $message, E_USER_NOTICE);
}
try {
$result = $this->{$methodName}($type, $info);
} catch (Exception $e) {
throw new MigrationException($this, sprintf(__d('migrations', '%s'), $e->getMessage()));
}
}
return $result;
}
/**
* Comparison method for sorting migration types
*
* @param string $a Type
* @param string $b Type
* @return int Comparison value
*/
protected function migration_order($a, $b) {
$order = array('drop_table', 'rename_table', 'create_table', 'drop_field', 'rename_field', 'alter_field', 'create_field');
return array_search($a, $order) - array_search($b, $order);
}
/**
* Create Table method
*
* @param string $type Type of operation to be done, in this case 'create_table'
* @param array $tables List of tables to be created
* @return boolean Return true in case of success, otherwise false
* @throws MigrationException
*/
protected function _createTable($type, $tables) {
foreach ($tables as $table => $fields) {
if ($this->_invokePrecheck('beforeAction', 'create_table', array('table' => $table))) {
$this->Schema->tables = array($table => $fields);
$this->_invokeCallbacks('beforeAction', 'create_table', array('table' => $table));
try {
$this->db->execute($this->db->createSchema($this->Schema));
} catch (Exception $exception) {
throw new MigrationException($this, __d('migrations', 'SQL Error: %s', $exception->getMessage()));
}
}
$this->_invokeCallbacks('afterAction', 'create_table', array('table' => $table));
}
return true;
}
/**
* Drop Table method
*
* @param string $type Type of operation to be done, in this case 'drop_table'
* @param array $tables List of tables to be dropped
* @return boolean Return true in case of success, otherwise false
* @throws MigrationException
*/
protected function _dropTable($type, $tables) {
foreach ($tables as $table) {
$this->Schema->tables = array($table => array());
if ($this->_invokePrecheck('beforeAction', 'drop_table', array('table' => $table))) {
$this->_invokeCallbacks('beforeAction', 'drop_table', array('table' => $table));
if (@$this->db->execute($this->db->dropSchema($this->Schema)) === false) {
throw new MigrationException($this, sprintf(__d('migrations', 'SQL Error: %s'), $this->db->error));
}
$this->_invokeCallbacks('afterAction', 'drop_table', array('table' => $table));
}
}
return true;
}
/**
* Rename Table method
*
* @param string $type Type of operation to be done, this case 'rename_table'
* @param array $tables List of tables to be renamed
* @return boolean Return true in case of success, otherwise false
* @throws MigrationException
*/
protected function _renameTable($type, $tables) {
foreach ($tables as $oldName => $newName) {
if ($this->_invokePrecheck('beforeAction', 'rename_table', array('old_name' => $oldName, 'new_name' => $newName))) {
$sql = 'ALTER TABLE ' . $this->db->fullTableName($oldName) . ' RENAME TO ' . $this->db->fullTableName($newName, true, false) . ';';
$this->_invokeCallbacks('beforeAction', 'rename_table', array('old_name' => $oldName, 'new_name' => $newName));
if (@$this->db->execute($sql) === false) {
throw new MigrationException($this, __d('migrations', 'SQL Error: %s', $this->db->error));
}
$this->_invokeCallbacks('afterAction', 'rename_table', array('old_name' => $oldName, 'new_name' => $newName));
}
}
return true;
}
/**
* Alter Table method
*
* @param string $type Type of operation to be done
* @param array $tables List of tables and fields
* @return boolean Return true in case of success, otherwise false
* @throws MigrationException
*/
protected function _alterTable($type, $tables) {
foreach ($tables as $table => $fields) {
$indexes = array();
if (isset($fields['indexes'])) {
$indexes = $fields['indexes'];
unset($fields['indexes']);
}
if ($type == 'drop') {
$this->_alterIndexes($indexes, $type, $table);
}
foreach ($fields as $field => $col) {
$model = new Model(array('table' => $table, 'ds' => $this->connection));
$tableFields = $this->db->describe($model);
if ($type === 'drop') {
$field = $col;
}
if ($type == 'rename') {
$data = array('table' => $table, 'old_name' => $field, 'new_name' => $col);
} else {
$data = array('table' => $table, 'field' => $field);
}
$callbackData = $data;
if ($this->_invokePrecheck('beforeAction', $type . '_field', $data)) {
switch ($type) {
case 'add':
$sql = $this->db->alterSchema(array(
$table => array('add' => array($field => $col))
));
break;
case 'drop':
$sql = $this->db->alterSchema(array(
$table => array('drop' => array($field => array()))
));
break;
case 'change':
if (!isset($col['type']) || $col['type'] == $tableFields[$field]['type']) {
$def = array_merge($tableFields[$field], $col);
} else {
$def = $col;
}
if (!empty($def['length']) && !empty($col['type']) && (substr($col['type'], 0, 4) == 'date' || substr($col['type'], 0, 4) == 'time')) {
$def['length'] = null;
}
$sql = $this->db->alterSchema(array(
$table => array('change' => array($field => $def))
));
break;
case 'rename':
$data = array();
if (array_key_exists($field, $tableFields)) {
$data = $tableFields[$field];
}
$sql = $this->db->alterSchema(array(
$table => array('change' => array($field => array_merge($data, array('name' => $col))))
));
break;
}
$this->_invokeCallbacks('beforeAction', $type . '_field', $callbackData);
if (@$this->db->execute($sql) === false) {
throw new MigrationException($this, sprintf(__d('migrations', 'SQL Error: %s'), $this->db->error));
}
$this->_invokeCallbacks('afterAction', $type . '_field', $callbackData);
}
}
if ($type != 'drop') {
$this->_alterIndexes($indexes, $type, $table);
}
}
return true;
}
/**
* Alter Indexes method
*
* @param array $indexes List of indexes
* @param string $type Type of operation to be done
* @param string $table table name
* @throws MigrationException
* @return void
*/
protected function _alterIndexes($indexes, $type, $table) {
foreach ($indexes as $key => $index) {
if (is_numeric($key)) {
$key = $index;
$index = array();
}
$sql = $this->db->alterSchema(array(
$table => array($type => array('indexes' => array($key => $index)))
));
if ($this->_invokePrecheck('beforeAction', $type . '_index', array('table' => $table, 'index' => $key))) {
$this->_invokeCallbacks('beforeAction', $type . '_index', array('table' => $table, 'index' => $key));
if (@$this->db->execute($sql) === false) {
throw new MigrationException($this, sprintf(__d('migrations', 'SQL Error: %s'), $this->db->error));
}
}
$this->_invokeCallbacks('afterAction', $type . '_index', array('table' => $table, 'index' => $key));
}
}
/**
* This method will invoke the before/afterAction callbacks, it is good when
* you need track every action.
*
* @param string $callback Callback name, beforeMigration, beforeAction, afterAction
* or afterMigration.
* @param string $type Type of action. i.e: create_table, drop_table, etc.
* Or also can be the direction, for before and after Migration callbacks
* @param array $data Data to send to the callback
* @return void
* @throws MigrationException
*/
protected function _invokeCallbacks($callback, $type, $data = array()) {
if ($this->callback !== null && method_exists($this->callback, $callback)) {
if ($callback == 'beforeMigration' || $callback == 'afterMigration') {
$this->callback->{$callback}($this, $type);
} else {
$this->callback->{$callback}($this, $type, $data);
}
}
if ($callback == 'beforeMigration' || $callback == 'afterMigration') {
$callback = str_replace('Migration', '', $callback);
if ($this->{$callback}($type)) {
return;
}
throw new MigrationException($this, sprintf(
__d('migrations', 'Interrupted when running "%s" callback.'), $callback
), E_USER_NOTICE);
}
}
/**
* This method will invoke the before/afterAction callbacks, it is good when
* you need track every action.
*
* @param string $callback Callback name, beforeMigration, beforeAction
* or afterMigration.
* @param string $type Type of action. i.e: create_table, drop_table, etc.
* Or also can be the direction, for before and after Migration callbacks
* @param array $data Data to send to the callback
* @return boolean
*/
protected function _invokePrecheck($callback, $type, $data = array()) {
if ($callback == 'beforeAction') {
return $this->Precheck->{$callback}($this, $type, $data);
}
return false;
}
/**
* Clear all caches present related to models
*
* Before the 'after' callback method be called is needed to clear all caches.
* Without it any model operations will use cached data instead of real/modified
* data.
*
* @return void
*/
protected function _clearCache() {
// Clear the cache
DboSource::$methodCache = array();
$keys = Cache::configured();
foreach ($keys as $key) {
Cache::clear(false, $key);
}
ClassRegistry::flush();
// Refresh the model, in case something changed
if ($this->Version instanceof MigrationVersion) {
$this->Version->initVersion();
}
}
/**
* Generate a instance of model for given options
*
* @param string $name Model name to be initialized
* @param string $table Table name to be initialized
* @param array $options
* @return Model
*/
public function generateModel($name, $table = null, $options = array()) {
if (empty($table)) {
$table = Inflector::tableize($name);
}
$defaults = array(
'name' => $name, 'table' => $table, 'ds' => $this->connection
);
$options = array_merge($defaults, $options);
return new AppModel($options);
}
}
/**
* Exception used when something goes wrong on migrations
*
* @package migrations
* @subpackage migrations.libs.model
*/
class MigrationException extends Exception {
/**
* Reference to the Migration being processed on time the error ocurred
* @var CakeMigration
*/
public $Migration;
/**
* Constructor
*
* @param CakeMigration $Migration Reference to the Migration
* @param string $message Message explaining the error
* @param int $code Error code
* @return \MigrationException
*/
public function __construct($Migration, $message = '', $code = 0) {
parent::__construct($message, $code);
$this->Migration = $Migration;
}
} |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML+RDFa 1.1//EN">
<html class="no-js not-oldie" lang="en" dir="ltr" version="HTML+RDFa 1.1">
<meta charset="utf-8" />
<link rel="shortcut icon" href="/sites/all/themes/epa/favicon.ico" type="image/vnd.microsoft.icon" />
<meta name="HandheldFriendly" content="true" />
<meta name="viewport" content="width=device-width" />
<meta name="MobileOptimized" content="width" />
<meta http-equiv="ImageToolbar" content="false" />
<meta http-equiv="cleartype" content="on" />
<meta name="keywords" content="climate change; global warming; science; indicator; data; ecosystem; leaf; bloom; phenology" />
<link rel="canonical" href="/climate-indicators/<API key>" />
<link rel="shortlink" href="/climate-indicators/<API key>" />
<meta name="WebArea" content="Climate Change Indicators" />
<meta name="WebAreaType" content="Microsite" />
<meta name="ContentType" content="page" />
<title>Climate Change Indicators: Leaf and Bloom Dates | Climate Change Indicators in the United States | US EPA</title>
<link type="text/css" rel="stylesheet" href="/sites/production/files/css/<API key>.css" media="all" />
<link type="text/css" rel="stylesheet" href="/sites/production/files/css/<API key>.css" media="all" />
<link type="text/css" rel="stylesheet" href="/sites/production/files/css/<API key>.css" media="all" />
<link type="text/css" rel="stylesheet" href="/sites/production/files/css/<API key>.css" media="all" />
<!--[if lt IE 9]>
<link type="text/css" rel="stylesheet" href="/sites/production/files/css/<API key>.css" media="all" />
<![endif]
<link type="text/css" rel="stylesheet" href="/sites/production/files/css/<API key>.css" media="all" />
<link rel="alternate" type="application/atom+xml" title="EPA.gov All Press Releases" href="/newsreleases/search/rss" />
<link rel="alternate" type="application/atom+xml" title="EPA.gov Headquarters Press Releases" href="/newsreleases/search/rss/field_press_office/headquarters" />
<link rel="alternate" type="application/atom+xml" title="Greenversations, EPA's Blog" href="https://blog.epa.gov/blog/feed/" />
<link rel="alternate" type="application/atom+xml" title="Climate Change Indicators" href="/feed/125251/rss.xml" /> </head>
<body class="html not-front not-logged-in one-sidebar sidebar-first page-node page-node-154081 node-type-page og-context og-context-node <API key> <API key> microsite" >
<div class="skip-links"><a href="#main-content" class="skip-link element-invisible element-focusable">Jump to main content</a></div>
<div class="region-alert"> <div id="<API key>" class="block block-pane <API key> block-alert">
</div>
<div id="block-pane-epa-gtm" class="block block-pane block-pane-epa-gtm">
</div>
</div>
<div id="brand-header"></div>
<header class="masthead clearfix" role="banner">
<img class="site-logo" src="/sites/all/themes/epa/logo.png" alt="" />
<hgroup class="<API key>">
<h1 class="site-name">
<a href="/" title="Go to the home page" rel="home"> <span>US EPA</span>
</a>
</h1>
<div class="site-slogan">United States Environmental Protection Agency</div>
</hgroup>
</header>
<div id="brand-menu"></div>
<section id="main-content" class="main-content clearfix" role="main" lang="en">
<h2 class="microsite-name">Climate Change Indicators</h2>
<div class="region-preface clearfix">
</div>
<div class="main-column clearfix">
<h1 class="page-title">Climate Change Indicators: Leaf and Bloom Dates</h1>
<div class="panel-pane pane-node-content" >
<div class="pane-content">
<div class="node node-page clearfix view-mode-full ">
<div id="social-icons" style="display:none">
<div><span class="twitter"><a href="http://twitter.com/home?status=Climate%20Change%20Indicators:%20Leaf%20and%20Bloom%20Dates:%20/climate-indicators/<API key>"><span
class="figure image file file-image file-image-png inline view-mode-thumbnail" style="width:32px;"><img alt="Share Icon" title="Twitter" height="32" width="32" class="inline media-element file-thumbnail inline" typeof="foaf:Image" src="/sites/production/files/styles/thumbnail/public/2016-01/twitter31.png" /></span></a></span></div>
<div><span><a href="http:
class="figure image file file-image file-image-png inline view-mode-thumbnail" style="width:32px;"><img alt="Share Icon" title="Facebook" height="32" width="32" class="inline media-element file-thumbnail inline" typeof="foaf:Image" src="/sites/production/files/styles/thumbnail/public/2016-01/facebook6.png" /></span></a></span></div>
<div><span><a href="http://reddit.com/submit?url=/climate-indicators/<API key>&title=Climate%20Change%20Indicators:Leaf%20and%20Bloom%20Dates"><span
class="figure image file file-image file-image-png inline view-mode-full" style="width:32px;"><img alt="Reddit Share Icon" title="Reddit Share Icon" height="32" width="32" class="media-element file-full" typeof="foaf:Image" src="/sites/production/files/styles/large/public/2016-03/reddit-new.png" /></span></a></span></div>
</div>
<p>This indicator examines the timing of leaf growth and flower blooms for two widely distributed plants in the United States.</p>
<div class="box" id="indicator-container">
<div class="pane-content">
<ul id="slideshow"><li><label for="img1"><strong>Figure 1.</strong> First Leaf and Bloom Dates in the Contiguous 48 States, 1900â2015</label> <span
class="figure image file file-image file-image-png view-mode-full" style="width:100%px;"><img alt="Line graph from 1900 to 2015 showing changes in the timing of when lilacs and honeysuckles grow their first leaves and flower blooms in the spring across the contiguous 48 states." title="First Leaf and Bloom Dates in the Contiguous 48 States, 1900â2015" height="580" width="100%" class="media-element file-full" typeof="foaf:Image" src="/sites/production/files/styles/large/public/2016-07/<API key>.png" /></span>
<div class="row cols-3">
<div class="col"><span><a href="/sites/production/files/2016-08/leaf-bloom_fig-1.csv"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:32px;"><img alt="Download Data" title="Download Data" height="32" width="32" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2015-12/spreadsheet4.png" /></span></a></span>Â <span><a href="/sites/production/files/styles/large/public/2016-07/<API key>.png"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:32px;"><img alt="Download Image" title="Download Image" height="32" width="32" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2015-12/images11.png" /></span></a></span>Â </div>
<div class="col">Â </div>
<div class="col">Â </div>
</div>
<div id="caption1">
<p>This figure shows modeled trends in lilac and honeysuckle first leaf dates and first bloom dates across the contiguous 48 states, using the 1981 to 2010 average as a baseline. Positive values indicate that leaf growth and blooming began later in the year, and negative values indicate that leafing and blooming occurred earlier. The thicker lines were smoothed using a nine-year weighted average. Choosing a different long-term average for comparison would not change the shape of the data over time.</p>
<p>Data source: Schwartz, 2016<a href="
</div>
</li>
<li><label for="img2"><strong>Figure 2.</strong> Change in First Leaf Date Between 1951â1960 and 2006â2015</label> <span
class="figure image file file-image file-image-png view-mode-full" style="width:100%px;"><img alt="Map showing the change in first leaf dates at weather stations across the contiguous 48 states. This map compares the average first leaf date during two 10-year periods: 1951-1960 and 2006-2015." title="Change in First Leaf Date Between 1951â1960 and 2006â2015" height="860" width="100%" class="media-element file-full" typeof="foaf:Image" src="/sites/production/files/styles/large/public/2016-07/<API key>.png" /></span>
<div class="row cols-3">
<div class="col"><span><a href="/sites/production/files/2016-08/leaf-bloom_fig-2.csv"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:32px;"><img alt="Download Data" title="Download Data" height="32" width="32" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2015-12/spreadsheet4.png" /></span></a></span>Â <span><a href="/sites/production/files/styles/large/public/2016-07/<API key>.png"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:32px;"><img alt="Download Image" title="Download Image" height="32" width="32" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2015-12/images11.png" /></span></a></span>Â <span><a href="http://arcg.is/2dVLdSD "><span
class="figure image file file-image file-image-png inline view-mode-thumbnail" style="width:32px;"><img alt="KMZ Icon" title="View Interactive Map" height="32" width="32" class="inline media-element file-thumbnail inline" typeof="foaf:Image" src="/sites/production/files/styles/thumbnail/public/2016-01/location73.png" /></span></a></span></div>
<div class="col">Â </div>
<div class="col">Â </div>
</div>
<div id="caption2">
<p>This figure shows modeled trends in lilac and honeysuckle first leaf dates at weather stations across the contiguous 48 states. This map compares the average first leaf date during two 10-year periods.</p>
<p>Data source: Schwartz, 2016<a href="
</div>
</li>
<li><label for="img3"><strong>Figure 3.</strong> Change in First Bloom Date Between 1951â1960 and 2006â2015</label> <span
class="figure image file file-image file-image-png view-mode-full" style="width:100%px;"><img alt="Map showing the change in first bloom dates at weather stations across the contiguous 48 states. This map compares the average first bloom date during two 10-year periods: 1951-1960 and 2006-2015." title="Change in First Bloom Date Between 1951â1960 and 2006â2015" height="860" width="100%" class="media-element file-full" typeof="foaf:Image" src="/sites/production/files/styles/large/public/2016-07/<API key>.png" /></span>
<div class="row cols-3">
<div class="col"><span><a href="/sites/production/files/2016-08/leaf-bloom_fig-3.csv"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:32px;"><img alt="Download Data" title="Download Data" height="32" width="32" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2015-12/spreadsheet4.png" /></span></a>Â </span>Â <span><a href="/sites/production/files/styles/large/public/2016-07/<API key>.png"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:32px;"><img alt="Download Image" title="Download Image" height="32" width="32" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2015-12/images11.png" /></span></a>Â </span> <span><a href="http://arcg.is/2dVKFfB "><span
class="figure image file file-image file-image-png inline view-mode-thumbnail" style="width:32px;"><img alt="KMZ Icon" title="View Interactive Map" height="32" width="32" class="inline media-element file-thumbnail inline" typeof="foaf:Image" src="/sites/production/files/styles/thumbnail/public/2016-01/location73.png" /></span></a></span></div>
<div class="col">Â </div>
<div class="col">Â </div>
</div>
<div id="caption3">
<p>This figure shows modeled trends in lilac and honeysuckle first bloom dates at weather stations across the contiguous 48 states. This map compares the average first bloom date during two 10-year periods.</p>
<p>Data source: Schwartz, 2016<a href="
</div>
</li>
</ul></div>
</div>
<div class="row cols-3" id="navigation">
<div class="col">
<table class="nostyle"><thead><tr><th>Â </th>
</tr></thead><tbody><tr><td style="vertical-align:top"><a href="# " id="nav1-tmb"><span
class="figure image file file-image file-image-png center view-mode-teaser" style="width:160px;"><img alt="Line graph from 1900 to 2015 showing changes in the timing of when lilacs and honeysuckles grow their first leaves and flower blooms in the spring across the contiguous 48 states." title="First Leaf and Bloom Dates in the Contiguous 48 States, 1900â2015" height="112" width="160" class="center media-element file-teaser center" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2016-07/<API key>.png" /></span></a></td>
</tr><tr><td style="vertical-align:top"><a href="
</tr></tbody></table></div>
<div class="col">
<table class="nostyle"><thead><tr><th>Â </th>
</tr></thead><tbody><tr><td style="vertical-align:top"><a href="# " id="nav2-tmb"><span
class="figure image file file-image file-image-png center view-mode-teaser" style="width:160px;"><img alt="Map showing the change in first leaf dates at weather stations across the contiguous 48 states. This map compares the average first leaf date during two 10-year periods: 1951-1960 and 2006-2015." title="Change in First Leaf Date Between 1951â1960 and 2006â2015" height="112" width="160" class="center media-element file-teaser center" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2016-07/<API key>.png" /></span></a></td>
</tr><tr><td style="vertical-align:top"><a href="
</tr></tbody></table></div>
<div class="col">
<table class="nostyle"><thead><tr><th>Â </th>
</tr></thead><tbody><tr><td style="vertical-align:top"><a href="# " id="nav3-tmb"><span
class="figure image file file-image file-image-png center view-mode-teaser" style="width:160px;"><img alt="Map showing the change in first bloom dates at weather stations across the contiguous 48 states. This map compares the average first bloom date during two 10-year periods: 1951-1960 and 2006-2015." title="Change in First Bloom Date Between 1951â1960 and 2006â2015" height="112" width="160" class="center media-element file-teaser center" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2016-07/<API key>.png" /></span></a></td>
</tr><tr><td style="vertical-align:top"><a href="
</tr></tbody></table></div>
</div>
</div>
</div>
</div>
<div class="panel-pane <API key> pane-vid-121697 <API key> pane-fpid-9429" >
<div class="pane-content">
<div id="tabs">
<ul class="tabs" id="tabsnav"><li><a class="menu-internal" href="
<li><a class="menu-internal" href="
<li><a class="menu-internal" href="#tab-3"><small>About the<br />Indicator</small></a></li>
<li><a class="menu-internal" href="
<li><a class="menu-internal" href="
<li><a class="menu-internal" href="#tab-6"><small>Technical<br />Documentation</small></a></li>
</ul><div id="tab-1">
<h3>Key Points</h3>
<ul class="roomy"><li>First leaf and bloom dates in lilacs and honeysuckles in the contiguous 48 states show a great deal of year-to-year variability, which makes it difficult to determine whether a statistically meaningful change has taken place. Earlier dates appear more prevalent in the last few decades, however (see Figure 1).</li>
<li>Leaf and bloom events are generally happening earlier throughout the North and West but later in much of the South (see Figures 2 and 3). This observation is generally consistent with regional differences in temperature change (see the <a href="/climate-indicators/<API key>">U.S. and Global Temperature</a> indicator).</li>
<li>Other studies have looked at trends in leaf and bloom dates across all of North America and the entire Northern Hemisphere. These studies have also found a trend toward earlier spring eventsâsome more pronounced than the trends seen in just the contiguous 48 states.<a href="#ref4"><sup>4</sup></a></li>
</ul></div>
<div id="tab-2">
<h3>Background</h3>
<p>The timing of natural events, such as flower blooms and animal migration, can be influenced by changes in climate. Phenology is the study of such important seasonal events. Phenological events are influenced by a combination of environmental factors, including temperature, light, rainfall, and humidity. Different plant and animal species respond to different cues.</p>
<p>Scientists have high confidence that the earlier arrival of spring events is linked to recent warming trends in global climate.<a href="
<p>Because of their close connection with climate, the timing of phenological events can be used as an indicator of the sensitivity of ecological processes to climate change. Two particularly useful indicators of the timing of spring events are the first leaf dates and the first bloom dates of lilacs and honeysuckles, which have an easily monitored flowering season, a relatively high survival rate, and a large geographic distribution. The first leaf date in these plants relates to the timing of events that occur in early spring, while the first bloom date is consistent with the timing of later spring events, such as the start of growth in forest vegetation.<a href="#ref2"><sup>2</sup></a></p>
</div>
<div id="tab-3">
<h3>About the Indicator</h3>
<p>This indicator shows trends in the timing of first leaf dates and first bloom dates in lilacs and honeysuckles across the contiguous 48 states. Because many of the phenological observation records in the United States are less than 40 years long, and because these records may have gaps in time or space, computer models have been used to provide a more complete understanding of long-term trends nationwide.</p>
<p>The models for this indicator were developed using data from the USA National Phenology Network, which collects ground observations from a network of federal agencies, field stations, educational institutions, and citizens who have been trained to log observations of leaf and bloom dates. For consistency, observations were limited to a few specific types of lilacs and honeysuckles. Next, models were created to relate actual leaf and bloom observations with records from nearby weather stations. Once scientists were able to determine the relationship between climate factors (particularly temperatures) and leaf and bloom dates, they used this knowledge to estimate leaf and bloom dates for earlier years based on historical weather records. They also used the models to estimate how leaf and bloom dates would have changed in a few areas (mostly in the far South) where lilacs and honeysuckles are not widespread.</p>
<p>This indicator uses data from nearly 3,000 weather stations throughout the contiguous 48 states. The exact number of stations varies from year to year. For each year, the timing of first leaf and first bloom at each station was compared with the 1981 to 2010 average to determine the number of daysâ âdeviation from normal.â? This indicator presents the average deviation across all stations, along with maps that compare the most recent 10-year period (2006â2015) with a mid-20<sup>th</sup>-century baseline (1951â1960) at individual stations. These time periods were chosen to match published studies.<a href="#ref3"><sup>3</sup></a></p>
</div>
<div id="tab-4">
<h3>Indicator Notes</h3>
<p>Plant phenological events are studied using several data collection methods, including satellite images, models, and direct observations. Locational differences, the use of varying data collection methods, and different phenological indicators (such as leaf or bloom dates for different types of plants) can lead to a range of estimates of the arrival of spring.</p>
<p>Climate is not the only factor that can affect phenology. Observed variations can also reflect plant genetics, changes in the surrounding ecosystem, and other factors. This indicator minimizes the influence of genetic variations by relying on cloned plants (that is, plants with no genetic differences).</p>
</div>
<div id="tab-5">
<h3>Data Sources</h3>
<p>Leaf and bloom observations were compiled by the USA National Phenology Network and are available at: <a href="http://www.usanpn.org" target="_self">www.usanpn.org</a>. This indicator is also based on temperature data from the National Oceanic and Atmospheric Administrationâs National Centers for Environmental Information, which maintains a large collection of climate data online at: <a href="http://www.ncei.noaa.gov">www.ncei.noaa.gov</a>. Data for this indicator were analyzed using methods described by Schwartz et al. (2013).<a href="#ref8"><sup>8</sup></a></p>
</div>
<div id="tab-6">
<h3>Technical Documentation</h3>
<ul><li><a href="/climate-indicators/<API key>">Download related technical information PDF</a></li>
</ul></div>
</div>
<hr /><h3>References</h3>
<p><small><sup><a id="ref1" name="ref1"></a>1 </sup>IPCC (Intergovernmental Panel on Climate Change). 2014. Climate change 2014: Impacts, adaptation, and vulnerability. Working Group II contribution to the IPCC Fifth Assessment Report. Cambridge, United Kingdom: Cambridge University Press. <a href="http:
<p><small><sup><a id="ref2" name="ref2"></a>2</sup> Schwartz, M.D., R. Ahas, and A. Aasa. 2006. Onset of spring starting earlier across the Northern Hemisphere. Glob. Chang. Biol. 12:343â351.</small></p>
<p><small><sup><a id="ref3" name="ref3"></a>3 </sup>Schwartz, M.D., T.R. Ault, and J.L. Betancourt. 2013. Spring onset variations and trends in the continental United States: Past and regional assessment using temperature-based indices. Int. J. Climatol. 33:2917â2922.</small></p>
<p><small><sup><a id="ref4" name="ref4"></a>4 </sup>For example, see: Schwartz, M.D., R. Ahas, and A. Aasa. 2006. Onset of spring starting earlier across the Northern Hemisphere. Glob. Chang. Biol. 12:343â351.</small></p>
<p><small><sup><a id="ref5" name="ref5"></a>5</sup> Schwartz, M.D. 2016 update to data originally published in: Schwartz, M.D., T.R. Ault, and J.L. Betancourt. 2013. Spring onset variations and trends in the continental United States: Past and regional assessment using temperature-based indices. Int. J. Climatol. 33:2917â2922.</small></p>
<p><small><sup><a id="ref6" name="ref6"></a>6 </sup>Schwartz, M.D. 2016 update to data originally published in: Schwartz, M.D., T.R. Ault, and J.L. Betancourt. 2013. Spring onset variations and trends in the continental United States: Past and regional assessment using temperature-based indices. Int. J. Climatol. 33:2917â2922.</small></p>
<p><small><sup><a id="ref7" name="ref7"></a>7 </sup>Schwartz, M.D. 2016 update to data originally published in: Schwartz, M.D., T.R. Ault, and J.L. Betancourt. 2013. Spring onset variations and trends in the continental United States: Past and regional assessment using temperature-based indices. Int. J. Climatol. 33:2917â2922.</small></p>
<p><small><sup><a id="ref8" name="ref8"></a>8</sup> Schwartz, M.D., T.R. Ault, and J.L. Betancourt. 2013. Spring onset variations and trends in the continental United States: Past and regional assessment using temperature-based indices. Int. J. Climatol. 33:2917â2922.</small></p>
<hr /><p><a href="/climate-indicators/<API key>">Printer-friendly PDF of all text and figures</a></p>
</div>
</div>
<div class="panel-pane <API key> pane-fpid-13545 <API key>" >
<div class="pane-content">
<h3>Learn about other indicators in this section</h3>
<p><a href="/climate-indicators/<API key>"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:160px;"><img alt="Wildfires" height="130" width="160" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2016-07/<API key>.png" title="" /></span></a>Â <a href="/climate-indicators/<API key>"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:160px;"><img alt="Streamflow" height="130" width="160" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2016-07/<API key>.png" title="" /></span></a>Â <a href="/climate-indicators/<API key>"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:160px;"><img alt="Stream Water Temperature" height="130" width="160" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2016-07/<API key>.png" title="" /></span></a>Â <a href="/climate-indicators/snake-river"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:160px;"><img alt="Water Temperature in the Snake River" height="130" width="160" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2016-07/<API key>.png" title="" /></span></a>Â <a href="/climate-indicators/great-lakes"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:160px;"><img alt="Great Lakes Water Levels and Temperatures" height="130" width="160" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2016-07/<API key>.png" title="" /></span></a>Â <a href="/climate-indicators/<API key>"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:160px;"><img alt="Bird Wintering Ranges" height="130" width="160" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2016-07/<API key>.png" title="" /></span></a>Â <a href="/climate-indicators/<API key>"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:160px;"><img alt="Marine Species Distribution" height="130" width="160" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2016-07/<API key>.png" title="" /></span></a>Â <a href="/climate-indicators/<API key>"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:160px;"><img alt="Leaf and Bloom Dates" height="130" width="160" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2016-07/<API key>.png" title="" /></span></a>Â <a href="/climate-indicators/cherry-blossoms"><span
class="figure image file file-image file-image-png inline view-mode-teaser" style="width:160px;"><img alt="Cherry Blossom Bloom Dates in Washington, D.C." height="130" width="160" class="inline media-element file-teaser inline" typeof="foaf:Image" src="/sites/production/files/styles/small/public/2016-07/<API key>.png" title="" /></span></a></p>
</div>
</div>
<div id="<API key>" class="block block-pane <API key>">
</div>
</div>
<div class="<API key> region-sidebar"> <div id="<API key>" class="block block-og-menu <API key>">
<h2 class="element-invisible">Climate Indicators</h2>
<ul class="menu"><li class="menu-item"><a href="/climate-indicators" title="" class="<API key> menu-link">Climate Change Indicators</a></li>
<li class="menu-item"><a href="/climate-indicators/greenhouse-gases" class="<API key> menu-link">Greenhouse Gases</a></li>
<li class="menu-item"><a href="/climate-indicators/weather-climate" class="<API key> menu-link">Weather and Climate</a></li>
<li class="menu-item"><a href="/climate-indicators/oceans" class="<API key> menu-link">Oceans</a></li>
<li class="menu-item"><a href="/climate-indicators/snow-ice" class="<API key> menu-link">Snow and Ice</a></li>
<li class="menu-item"><a href="/climate-indicators/health-society" class="<API key> menu-link">Health and Society</a></li>
<li class="active-trail menu-item"><a href="/climate-indicators/ecosystems" class="<API key> active-trail menu-link">Ecosystems</a><ul class="menu"><li class="menu-item"><a href="/climate-indicators/<API key>" class="<API key> menu-link">Wildfires</a></li>
<li class="menu-item"><a href="/climate-indicators/<API key>" class="<API key> menu-link">Streamflow</a></li>
<li class="menu-item"><a href="/climate-indicators/<API key>" class="<API key> menu-link">Stream Temperature</a></li>
<li class="menu-item"><a href="/climate-indicators/snake-river" class="<API key> menu-link">Tribal Connection: Trends in Stream Temperature in the Snake River</a></li>
<li class="menu-item"><a href="/climate-indicators/great-lakes" class="<API key> menu-link">Great Lakes Water Levels and Temperatures</a></li>
<li class="menu-item"><a href="/climate-indicators/<API key>" class="<API key> menu-link">Bird Wintering Ranges</a></li>
<li class="menu-item"><a href="/climate-indicators/<API key>" class="<API key> menu-link">Marine Species Distribution</a></li>
<li class="active-trail menu-item"><a href="/climate-indicators/<API key>" class="<API key> active-trail menu-link active">Leaf and Bloom Dates</a></li>
<li class="menu-item"><a href="/climate-indicators/cherry-blossoms" class="<API key> menu-link">Community Connection: Cherry Blossom Bloom Dates in Washington, D.C.</a></li>
</ul></li>
<li class="menu-item"><a href="/climate-indicators/<API key>" class="<API key> menu-link">Frequent Questions</a></li>
</ul>
</div>
</div>
</section>
<div id="brand-footer"></div>
<script type="text/javascript" src="/sites/production/files/js/<API key>.js"></script>
<script type="text/javascript" src="/sites/production/files/js/<API key>.js"></script>
<script type="text/javascript" src="/sites/production/files/js/<API key>.js"></script>
<script type="text/javascript" src="/sites/all/modules/custom/epa_core/js/alert.js?ok0rem"></script>
<script type="text/javascript" src="/sites/production/files/js/<API key>.js"></script>
<script type="text/javascript" src="/sites/production/files/js/<API key>.js"></script>
<script type="text/javascript" src="/sites/production/files/js/<API key>.js"></script>
<script src="/sites/all/libraries/cycle/jquery.cycle2.min.js"></script>
<script>var indicatorIndex = 7;</script>
<style>
#social-icons {
float: right;
width: 9%;
padding-left: 2em;
}
#indicator-container {
width: 90%;
}
#navigation {
width: 94%;
}
#navigation td {
padding:2px;
margin:0px !important;
}
#navigation td small {
padding:2px;
}
#active-indicator span {
display: inline-block;
position: relative;
width: 24%;
vertical-align: top;
}
#active-indicator img {
width: 100%;
vertical-align: top;
}
#active-indicator span:after {
content:'\A';
position:absolute;
width:100%;
height:100%;
top:0;
left:0;
background:rgba(0,0,0,0.6);
opacity:1;
transition: all 0.5s;;
-webkit-transition: all 0.5s;
}
#active-indicator span:hover:after {
opacity:0.5;
}
#slideshow {
height: 800px;
}
</style>
<script>
jQuery(document).ready(function() {
// Tabs
jQuery('#tabs > div').hide(); // hide all child divs
jQuery('#tabs div:first').show(); // show first child dive
jQuery('#tabsnav li:first').addClass('active');
jQuery('.menu-internal').click(function(){
jQuery('#tabsnav li').removeClass('active');
var currentTab = jQuery(this).attr('href');
jQuery('#tabsnav li a[href="' + currentTab + '" ]').parent().addClass('active');
jQuery('#tabs > div').hide();
jQuery(currentTab).show();
return false;
});
// Create a bookmarkable tab link
hash = window.location.hash;
elements = jQuery('a[href="' + hash + '"]');
// if there aren't any, then show the first tab;
// Otherwise, scroll back to top (if needed) and open the tab in the hash
if (elements.length === 0) {
jQuery("ul.tabs li:first").addClass("active").show();
} else {
jQuery('html,body').scrollTop(200); elements.click();
}
// Slideshow
var slideshow = jQuery("#slideshow"),
navBtns = ['nav1','nav2','nav3'],
activeStyle = {'border':'1px solid black'},
inactiveStyle = {'border':'none'},
$table;
slideshow.cycle({
loader: 'wait',
paused: true,
slides: 'li',
fx: 'none',
autoHeight: 'container',
updateView: 1,
log: false,
height: '900px',
timeout:0,
speed:1
});
navBtns.forEach(function (element, index) {
jQuery('a[id^=' + element + ']').click(function (e) {
e.preventDefault();
resetBorder(navBtns, inactiveStyle);
$table = jQuery(this).closest('tbody');
$table.css(activeStyle);
slideshow.cycle('goto',index);
console.log(element,index)
});
});
jQuery('#nav1').trigger('click');
// Overlay
var $<API key> = jQuery('h3:contains("Learn about other indicators in this section")').parent();
var $<API key> = $<API key>.find('a');
if(typeof indicatorIndex !== 'undefined') jQuery($<API key>[indicatorIndex]).attr('id','active-indicator');
});
function resetBorder(target,style){
target.forEach(function (element, index) {
$table = jQuery("a[id^=" + element + "]").closest('tbody');
$table.css(style);
});
}
</script>
</body>
</html> |
# Notes for talk
## Things the presentation should have
If not specific assume I'm talking about Js.
* Things this talk will not be about: DOM, jQuery, prototypal inheritance
* Syntax
* first class functions
* `this`
* quick clojure syntax and introduction
* clojure partial
* why is partial useful
* partial implementation
## Outline
1. Title
2. What this talk is not about
3. What this talk is about
4. Syntax
5. Scope
6. Functions In General (pure and sideaffecty) (CHECK)
7. Functions in Clojure
8. Functions in Javascript
9. Module Pattern
10. Closures |
pstree 32567
pstree -p 32567
pstree -p 32567| perl -ne 'print "$_\n" foreach /\((\d+)\)/g;'
pstree -p 32567| perl -ne '`kill -9 $_` foreach /\((\d+)\)/g;'
pstree -p 32567| perl -ne 'print "$1\n" while /\((\d+)\)/g;'
pstree -p 32567| perl -ne '`kill -9 $1` while /\((\d+)\)/g;' |
Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given binary tree {1,
1
\
2
/
3
return [1,2,3].
Note: Recursive solution is trivial, could you do it iteratively? |
# Downloading body pose (COCO and MPI), face and hand models
OPENPOSE_URL="http://posefs1.perception.cs.cmu.edu/OpenPose/models/"
POSE_FOLDER="pose/"
FACE_FOLDER="face/"
HAND_FOLDER="hand/"
# Body (BODY_25)
BODY_25_FOLDER=${POSE_FOLDER}"body_25/"
BODY_25_MODEL=${BODY_25_FOLDER}"pose_iter_584000.caffemodel"
wget -c ${OPENPOSE_URL}${BODY_25_MODEL} -P ${BODY_25_FOLDER}
# Body (COCO)
COCO_FOLDER=${POSE_FOLDER}"coco/"
COCO_MODEL=${COCO_FOLDER}"pose_iter_440000.caffemodel"
wget -c ${OPENPOSE_URL}${COCO_MODEL} -P ${COCO_FOLDER}
# Alternative: it will not check whether file was fully downloaded
# if [ ! -f $COCO_MODEL ]; then
# wget ${OPENPOSE_URL}$COCO_MODEL -P $COCO_FOLDER
# Body (MPI)
MPI_FOLDER=${POSE_FOLDER}"mpi/"
MPI_MODEL=${MPI_FOLDER}"pose_iter_160000.caffemodel"
wget -c ${OPENPOSE_URL}${MPI_MODEL} -P ${MPI_FOLDER}
# Face
FACE_MODEL=${FACE_FOLDER}"pose_iter_116000.caffemodel"
wget -c ${OPENPOSE_URL}${FACE_MODEL} -P ${FACE_FOLDER}
# Hand
HAND_MODEL=$HAND_FOLDER"pose_iter_102000.caffemodel"
wget -c ${OPENPOSE_URL}${HAND_MODEL} -P ${HAND_FOLDER} |
// thing_factory.h
// CTestArena
#ifndef <API key>
#define <API key>
struct thing {
char name[20];
int value;
};
struct thing create_thing(void);
#endif |
package bronz.utilities.swing.table;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.util.List;
import java.util.Map;
import javax.swing.AbstractCellEditor;
import javax.swing.CellEditor;
import javax.swing.DefaultCellEditor;
import javax.swing.JTable;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
import bronz.utilities.swing.table.AbstractDataTable;
@SuppressWarnings("unchecked")
public class <API key> extends AbstractCellEditor
implements TableCellRenderer, TableCellEditor
{
private static final long serialVersionUID = 1L;
private static final ThreadLocal<CellTable> LOCAL = new ThreadLocal<CellTable>();
private final List<String> colNames;
private final CellTable cellTableRenderer;
private final int colOneWidth;
public <API key>( final List<String> colNames, final int colOneWidth )
{
this.colNames = colNames;
this.colOneWidth = colOneWidth;
this.cellTableRenderer = new CellTable(colNames, this.colOneWidth);
}
public Object getCellEditorValue() {
final CellTable editor = LOCAL.get();
if (editor != null)
{
return editor.getDetails();
}
else
{
return null;
}
}
private CellTable getDefaultEditor(final Object value, final JTable parentTable)
{
final CellTable cellTableEditor = new CellTable(this.colNames, this.colOneWidth,
(Map<String, Object>) value, parentTable);
cellTableEditor.addFocusListener(new FocusAdapter()
{
public void focusLost(final FocusEvent e)
{
if (e.getComponent() == cellTableEditor)
{
final CellEditor editor = cellTableEditor.getCellEditor();
if (editor != null && editor instanceof DefaultCellEditor )
{
final DefaultCellEditor cellEditor = (DefaultCellEditor) editor;
if (e.<API key>() != cellEditor.getComponent())
{
cellEditor.stopCellEditing();
fireEditingStopped();
}
}
}
}
});
return cellTableEditor;
}
public Component <API key>(
final JTable table, final Object value, final boolean isSelected,
final boolean hasFocus, final int rowIndex, final int colIndex)
{
this.cellTableRenderer.setDetails(value);
return prepareComp(table, isSelected, rowIndex, this.cellTableRenderer);
}
public Component <API key>(final JTable table,
final Object value, final boolean isSelected, final int rowIndex,
final int colIndex) {
LOCAL.set(getDefaultEditor(value, table));
return prepareComp(table, isSelected, rowIndex, LOCAL.get());
}
private CellTable prepareComp(final JTable parentTable,
final boolean isSelected, final int rowIndex, final CellTable cellTable)
{
if (isSelected)
{
cellTable.setBackground(new Color(0xd1, 0xe0, 0xff));
}
else
{
if (rowIndex % 2 != 0)
{
cellTable.setBackground(new Color(0xf0, 0xf5, 0xff));
}
else
{
cellTable.setBackground(parentTable.getBackground());
}
}
return cellTable;
}
}
@SuppressWarnings("unchecked")
class CellTable extends JTable
{
private static final long serialVersionUID = 1L;
private Map<String, Object> details;
private final List<String> colNames;
private final JTable parentTable;
private final int colOneWidth;
CellTable(final List<String> colNames, final int colOneWidth,
final Map<String, Object> details, final JTable parentTable)
{
super(colNames.size(), 2);
this.details = details;
this.colNames = colNames;
this.parentTable = parentTable;
this.colOneWidth = colOneWidth;
this.setOpaque(true);
this.setRowHeight(15);
for (int i =0; i < colNames.size(); i++)
{
this.setValueAt(colNames.get(i), i, 0);
}
putClientProperty("<API key>", Boolean.TRUE);
}
CellTable(final List<String> colNames, final int colOneWidth)
{
this(colNames, colOneWidth, null, null);
}
public void setBounds(final int x, final int y, final int width,
final int height)
{
super.setBounds(x, y, width, height);
final Float portion = width / 100f;
getColumnModel().getColumn( 0 ).setPreferredWidth( this.colOneWidth * portion.intValue() );
getColumnModel().getColumn( 1 ).setPreferredWidth( (100 - this.colOneWidth) * portion.intValue() );
}
@SuppressWarnings("rawtypes")
public void setValueAt(Object value, final int rowIndex,
final int colIndex)
{
if (value != null && value instanceof String )
{
value = value.toString().toUpperCase();
}
if (colIndex == 1 && this.details != null)
{
final String key = this.colNames.get(rowIndex);
if (key != null)
{
this.details.put(key, value);
}
}
super.setValueAt(value, rowIndex, colIndex);
if (null != this.parentTable && this.parentTable instanceof AbstractDataTable )
{
((AbstractDataTable) this.parentTable).<API key>();
}
}
public Object getValueAt( final int rowIndex, final int colIndex)
{
if (colIndex == 1)
{
if (rowIndex < this.colNames.size() && this.details != null)
{
final String key = this.colNames.get(rowIndex);
if (key != null)
{
if (!this.details.containsKey(key))
{
this.details.put(key, "");
}
return this.details.get(key);
}
return null;
}
else
{
return null;
}
}
else
{
return super.getValueAt(rowIndex, colIndex);
}
}
public boolean isCellEditable(final int rowIndex, final int colIndex)
{
if (colIndex == 1 )
{
return true;
}
else
{
return false;
}
}
public Map<String, Object> getDetails()
{
return this.details;
}
public void setDetails(final Object value)
{
this.details = (Map<String, Object>) value;
}
} |
package org.terifan.util;
import java.util.Map.Entry;
import java.util.TreeMap;
/**
* A generic Pool implementation that will pool instances of objects for a limited time.
*
* If a pooled instances is older than the time limit it will be destroyed when the claim method is called.
*/
public abstract class Pool<E> implements AutoCloseable
{
private TreeMap<Long, E> mPool = new TreeMap<>();
private int mCapacity;
private long mExpireTime;
private boolean mOpen;
private boolean mYoungFirst;
/**
* Create a new Pool
*
* @param aCapacity number of items to maintain in the Pool.
* @param aExpireTimeSeconds maximum age of an item in seconds. If zero or negative then items will never expire.
*/
public Pool(int aCapacity, int aExpireTimeSeconds)
{
mOpen = true;
mExpireTime = aExpireTimeSeconds <= 0 ? Long.MAX_VALUE : 1000L * aExpireTimeSeconds;
capacity(aCapacity);
}
/**
* Return number of items in the Pool.
*/
public int getPoolSize()
{
return mPool.size();
}
/**
* Creates a new instance.
*
* @return a new instance
*/
protected abstract E create();
/**
* Release any resources used by the provided instance.
*
* This implementation does nothing.
*
* @param aItem the item being destroyed
* @param aReason a short description of the cause for the item being destroyed
*/
protected void destroy(E aItem, String aReason)
{
}
/**
* Optional method that resets an item before the item enters the pool. The release method calls this for any item not destroyed.
*
* This implementation always return true.
*
* @param aItem the item being pooled
* @return true if the item is usable. If not, the item will be destroyed with a call to the destroy method.
*/
protected boolean reset(E aItem)
{
return true;
}
/**
* Optional method that decides if an item should be reused or destroyed. The cleanUp method calls this for any item about to be
* destroyed. This method is not called for items when the size of the pool exceed the maximum size.
*
* This implementation always return false.
*
* @param aItem the item being pooled
* @return true if the item is still usable and should be added to the pool. If not, the item will be destroyed.
*/
protected boolean reuse(E aItem)
{
return false;
}
/**
* Optional method that prepares an item for use or reuse. Called after an item has been created or is about to be used after being
* pooled.
*
* This implementation always return true.
*
* Note: if the prepare method return false for an item that has just been created using the create method then an exception will be
* thrown in the claim method.
*
* @param aItem the item about to be used
* @return true if the item is usable. If not, the item will be destroyed with a call to the destroy method and the pool with claim
* another instance.
*/
protected boolean prepare(E aItem)
{
return true;
}
/**
* Return an instance by either creating a new item or claiming one from the pool.
* <p>
* This method calls the create method when the pool is empty. The prepare method is always called on each instance.
*
* @return an item
* @throws <API key> if the Pool is closed
*/
public synchronized E claim() throws <API key>
{
if (!mOpen)
{
throw new <API key>("This pool is closed.");
}
for (;;)
{
Entry<Long, E> entry;
if (mYoungFirst)
{
entry = mPool.pollLastEntry();
}
else
{
entry = mPool.pollFirstEntry();
}
if (entry == null)
{
E item = create();
if (!prepare(item))
{
throw new <API key>("Create method returned an instance that are not ready for use.");
}
return item;
}
E item = entry.getValue();
boolean fresh = System.currentTimeMillis() - entry.getKey() < mExpireTime;
if (fresh && prepare(item))
{
return item;
}
destroy(item, fresh ? "claim/broken" : "claim/expired");
}
}
/**
* Call this method when an instance is no longer used. The instance provided will either be destroyed or added to the pool for later
* reuse.
*
* @param aItem the item that is no longer used.
*/
public synchronized void release(E aItem)
{
if (mPool.size() < mCapacity && reset(aItem))
{
add(aItem);
}
else
{
destroy(aItem, "release/capacity");
}
}
private synchronized void add(E aItem)
{
for (;;)
{
Long key = System.currentTimeMillis();
if (!mPool.containsKey(key)) // handle cases where multiple instances are released the same millisecond.
{
// System.out.println("ConnectionPool: Adding connection to pool");
mPool.put(key, aItem);
return;
}
}
}
/**
* Clears all items from the pool. The destroy method will be called for each item in the pool.
*/
public synchronized void clear()
{
Exception ex = null;
for (E item : mPool.values())
{
try
{
destroy(item, "clear");
}
catch (Exception e)
{
ex = e;
}
}
mPool.clear();
if (ex != null)
{
throw new <API key>("An exception occured while clearing an item.", ex);
}
}
/**
* Destroys excessive items and any pooled instances that are older than the expire time.
*
* Calling this method from a Timer is recommended to release instances that may consume resources.
*/
public synchronized void cleanUp()
{
while (!mPool.isEmpty())
{
Long key = mPool.firstKey();
if (mPool.size() <= mCapacity && System.currentTimeMillis() - key < mExpireTime)
{
break;
}
boolean full = mPool.size() >= mCapacity;
E item = mPool.remove(key);
if (!full && reuse(item))
{
add(item);
}
else
{
destroy(item, full ? "cleanup/capacity" : "cleanup/reuse");
}
}
}
/**
* Return the number of items in this pool.
*/
public synchronized int size()
{
return mPool.size();
}
/**
* Return the capacity of this pool.
*/
public synchronized int capacity()
{
return mCapacity;
}
/**
* Set the capacity of this pool. This method calls cleanUp to remove any excessive items.
*/
public synchronized void capacity(int aNewCapacity)
{
if (aNewCapacity < 1)
{
throw new <API key>("Illegal capacity: " + aNewCapacity);
}
mCapacity = aNewCapacity;
if (mPool.size() > mCapacity)
{
cleanUp();
}
}
/**
* Return true if this Pool is open for business.
*/
public boolean isOpen()
{
return mOpen;
}
/**
* Sets the capacity to zero and destroys and pooled instance. Any future attempts to claim instances will fail. It's still possible to
* release instances to a closed Pool.
*/
@Override
public void close()
{
mOpen = false;
clear();
}
/**
* If true the youngest entries will be claimed from the pool
*/
public boolean isYoungFirst()
{
return mYoungFirst;
}
/**
* Decides in what order entries are claimed from the pool. Default value is false.
*
* A young-first pool will reuse a smaller set of items and remove unused items quicker. An old-first pool will act in a round-robin
* fashion returning items a fair amount of times.
*
* @param aYoungFirst if true the youngest entries will be claimed from the pool first
*/
public void setYoungFirst(boolean aYoungFirst)
{
mYoungFirst = aYoungFirst;
}
} |
// SearchRecord.h : main header file for the SEARCHRECORD application
#if !defined(<API key>)
#define <API key>
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
// CSearchRecordApp:
// See SearchRecord.cpp for the implementation of this class
class CSearchRecordApp : public CWinApp
{
public:
CSearchRecordApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSearchRecordApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CSearchRecordApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(<API key>) |
package com.ferreusveritas.dynamictrees.worldgen;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.ferreusveritas.dynamictrees.api.WorldGenRegistry.<API key>;
import com.ferreusveritas.dynamictrees.api.worldgen.<API key>.EnumChance;
import com.ferreusveritas.dynamictrees.api.worldgen.<API key>.SpeciesSelection;
import com.ferreusveritas.dynamictrees.api.worldgen.<API key>;
import com.ferreusveritas.dynamictrees.util.JsonHelper;
import com.ferreusveritas.dynamictrees.worldgen.BiomeDataBase.Operation;
import com.ferreusveritas.dynamictrees.worldgen.json.IJsonBiomeApplier;
import com.ferreusveritas.dynamictrees.worldgen.json.IJsonBiomeSelector;
import com.ferreusveritas.dynamictrees.worldgen.json.<API key>;
import com.ferreusveritas.dynamictrees.worldgen.json.<API key>;
import com.ferreusveritas.dynamictrees.worldgen.json.<API key>;
import com.google.common.collect.Lists;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonPrimitive;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.biome.Biome;
import net.minecraftforge.common.BiomeDictionary;
public class <API key> implements <API key> {
public static final String SPECIES = "species";
public static final String DENSITY = "density";
public static final String CHANCE = "chance";
public static final String CANCELVANILLA = "cancelvanilla";
public static final String MULTIPASS = "multipass";
public static final String SUBTERRANEAN = "subterranean";
public static final String FORESTNESS = "forestness";
public static final String BLACKLIST = "blacklist";
public static final String RESET = "reset";
public static final String WHITE = "white";
public static final String SELECT = "select";
public static final String APPLY = "apply";
public static final String NAME = "name";
public static final String TYPE = "type";
private JsonElement jsonElement;
private static Map<String, IJsonBiomeSelector> <API key> = new HashMap<>();
private static Map<String, IJsonBiomeApplier> jsonBiomeApplierMap = new HashMap<>();
public static Set<Biome> blacklistedBiomes = new HashSet<>();
public static void <API key>(String name, IJsonBiomeSelector selector) {
<API key>.put(name, selector);
}
public static void addJsonBiomeApplier(String name, IJsonBiomeApplier applier) {
jsonBiomeApplierMap.put(name, applier);
}
public static void cleanup() {
jsonBiomeApplierMap = new HashMap<>();
<API key> = new HashMap<>();
blacklistedBiomes = new HashSet<>();
}
public static void <API key>(<API key> event) {
event.register(NAME, jsonElement -> {
if(jsonElement != null && jsonElement.isJsonPrimitive()) {
JsonPrimitive primitive = jsonElement.getAsJsonPrimitive();
if(primitive.isString()) {
String biomeMatch = primitive.getAsString();
return b-> b.getRegistryName().toString().matches(biomeMatch);
}
}
return b -> false;
});
event.register(TYPE, jsonElement -> {
if(jsonElement != null) {
if (jsonElement.isJsonPrimitive()) {
String typeMatch = jsonElement.getAsString();
List<BiomeDictionary.Type> types = Arrays.asList(typeMatch.split(",")).stream().map(BiomeDictionary.Type::getType).collect(Collectors.toList());
return b -> biomeHasTypes(b, types);
} else
if (jsonElement.isJsonArray()) {
List<BiomeDictionary.Type> types = new ArrayList<>();
for(JsonElement element : jsonElement.getAsJsonArray()) {
if(element.isJsonPrimitive() && element.getAsJsonPrimitive().isString()) {
types.add(BiomeDictionary.Type.getType(element.getAsString()));
}
}
return b -> biomeHasTypes(b, types);
}
}
return b -> false;
});
event.register(SPECIES, new <API key>());
event.register(DENSITY, new <API key>());
event.register(CHANCE, new <API key>());
event.register(CANCELVANILLA, (dbase, element, biome) -> {
if(element.isJsonPrimitive()) {
boolean cancel = element.getAsBoolean();
//System.out.println("Biome " + (cancel ? "cancelled" : "uncancelled") + " for vanilla: " + biome);
dbase.<API key>(biome, cancel);
}
});
event.register(MULTIPASS, (dbase, element, biome) -> {
if(element.isJsonPrimitive()) {
boolean multipass = element.getAsBoolean();
if(multipass) {
//System.out.println("Biome set for multipass: " + biome);
//Enable poisson disc multipass of roofed forests to ensure maximum density even with large trees
//by filling in gaps in the generation with smaller trees
dbase.setMultipass(biome, pass -> {
switch(pass) {
case 0: return 0;//Zero means to run as normal
case 1: return 5;//Return only radius 5 on pass 1
case 2: return 3;//Return only radius 3 on pass 2
default: return -1;//A negative number means to terminate
}
});
}
}
});
event.register(SUBTERRANEAN, (dbase, element, biome) -> {
if(element.isJsonPrimitive()) {
boolean subterranean = element.getAsBoolean();
//System.out.println("Biome set to subterranean: " + biome);
dbase.setIsSubterranean(biome, subterranean);
}
});
event.register(FORESTNESS, (dbase, element, biome) -> {
if(element.isJsonPrimitive()) {
float forestness = element.getAsFloat();
//System.out.println("Forestness set for biome: " + biome + " at " + forestness);
dbase.setForestness(biome, forestness);
}
});
event.register(BLACKLIST, (dbase, element, biome) -> {
if(element.isJsonPrimitive()) {
boolean blacklist = element.getAsBoolean();
if(blacklist) {
//System.out.println("Blacklisted biome: " + biome);
blacklistedBiomes.add(biome);
} else {
blacklistedBiomes.remove(biome);
}
}
});
event.register(RESET, (dbase, element, biome) -> {
dbase.<API key>(biome, false);
dbase.setSpeciesSelector(biome, (pos, dirt, rnd) -> new SpeciesSelection(), Operation.REPLACE);
dbase.setDensitySelector(biome, (rnd, nd) -> -1, Operation.REPLACE);
dbase.setChanceSelector(biome, (rnd, spc, rad) -> EnumChance.UNHANDLED, Operation.REPLACE);
dbase.setForestness(biome, 0.0f);
dbase.setIsSubterranean(biome, false);
dbase.setMultipass(biome, pass -> (pass == 0 ? 0 : -1));
});
}
public <API key>(ResourceLocation jsonLocation) {
this(JsonHelper.load(jsonLocation));
}
public <API key>(JsonElement jsonElement) {
this.jsonElement = jsonElement;
}
@Override
public void populate(BiomeDataBase biomeDataBase) {
if(jsonElement != null && jsonElement.isJsonArray()) {
for(JsonElement sectionElement : jsonElement.getAsJsonArray()) {
if(sectionElement.isJsonObject()) {
JsonObject section = sectionElement.getAsJsonObject();
readSection(section, biomeDataBase);
}
}
}
}
public static boolean biomeHasTypes(Biome biome, List<BiomeDictionary.Type> types) {
return types.stream().allMatch(t -> BiomeDictionary.hasType(biome, t));
}
private class <API key> {
final IJsonBiomeSelector selector;
final JsonElement elementData;
<API key>(IJsonBiomeSelector selector, JsonElement elementData) {
this.selector = selector;
this.elementData = elementData;
}
Predicate<Biome> getFilter() {
return this.selector.getFilter(elementData);
}
}
private class <API key> {
IJsonBiomeApplier applier;
JsonElement elementData;
<API key>(IJsonBiomeApplier applier, JsonElement elementData) {
this.applier = applier;
this.elementData = elementData;
}
void apply(BiomeDataBase dbase, Biome biome) {
this.applier.apply(dbase, elementData, biome);
}
}
public static boolean isComment(String s) {
return s.startsWith("__");//Allow for comments. Comments are anything starting with "__"
}
private void readSection(JsonObject section, BiomeDataBase dbase) {
List<<API key>> selectors = new LinkedList<>();
List<<API key>> appliers = new LinkedList<>();
for(Entry<String, JsonElement> entry : section.entrySet()) {
String key = entry.getKey();
JsonElement element = entry.getValue();
if(!isComment(key)) {
if(WHITE.equals(key)) {
if(element.isJsonPrimitive()) {
if("all".equals(element.getAsString())) {
blacklistedBiomes.clear();
}
}
}
else
if(SELECT.equals(key)) {
if(element.isJsonObject()) {
for(Entry<String, JsonElement> selectElement : element.getAsJsonObject().entrySet()) {
String selectorName = selectElement.getKey();
if(!isComment(selectorName)) {
IJsonBiomeSelector selector = <API key>.get(selectorName);
if(selector != null) {
selectors.add(new <API key>(selector, selectElement.getValue()));
} else {
System.err.println("Json Error: Undefined selector property \"" + selectorName + "\"");
}
}
}
}
}
else
if(APPLY.equals(key)) {
if(element.isJsonObject()) {
for(Entry<String, JsonElement> selectElement : element.getAsJsonObject().entrySet()) {
String applierName = selectElement.getKey();
if(!isComment(applierName)) {
IJsonBiomeApplier applier = jsonBiomeApplierMap.get(applierName);
if(applier != null) {
appliers.add(new <API key>(applier, selectElement.getValue()));
} else {
System.err.println("Json Error: Undefined applier property \"" + applierName + "\"");
}
}
}
}
}
else {
System.err.println("Json Error: Undefined operation \"" + key + "\"");
}
}
}
//Filter biomes by selector predicates
Stream<Biome> stream = Lists.newArrayList(Biome.REGISTRY).stream();
for(<API key> s : selectors) {
stream = stream.filter(s.getFilter());
}
//Filter blacklisted biomes
stream = stream.filter(b -> !blacklistedBiomes.contains(b));
//Apply all of the applicators to the database
stream.forEach( biome -> {
appliers.forEach( a -> a.apply(dbase, biome) );
});
}
} |
package org.cfr.restlet.ext.spring;
import org.restlet.data.Status;
import org.restlet.resource.ResourceException;
public class <API key> extends ResourceException {
/**
* Generated serial version UID.
*/
private static final long serialVersionUID = -<API key>;
/**
* The object that will be returned to the client.
*/
private Object resultObject;
public <API key>(int code, String name, String description, String uri, Throwable cause, Object resultObject) {
super(code, name, description, uri, cause);
this.resultObject = resultObject;
}
public <API key>(int code, String name, String description, String uri, Object resultObject) {
super(code, name, description, uri);
this.resultObject = resultObject;
}
public <API key>(int code, Throwable cause, Object resultObject) {
super(code, cause);
this.resultObject = resultObject;
}
public <API key>(int code, Object resultObject) {
super(code);
this.resultObject = resultObject;
}
public <API key>(Status status, String description, Throwable cause, Object resultObject) {
super(status, description, cause);
this.resultObject = resultObject;
}
public <API key>(Status status, String description, Object resultObject) {
super(status, description);
this.resultObject = resultObject;
}
public <API key>(Status status, Throwable cause, Object resultObject) {
super(status, cause);
this.resultObject = resultObject;
}
public <API key>(Status status, Object resultObject) {
super(status);
this.resultObject = resultObject;
}
public <API key>(Throwable cause, Object resultObject) {
super(cause);
this.resultObject = resultObject;
}
public Object getResultObject() {
return resultObject;
}
} |
var gulp = require('gulp'),
cleanhtml = require('gulp-cleanhtml'),
csslint = require('gulp-csslint'),
htmlhint = require('gulp-htmlhint'),
jshint = require('gulp-jshint'),
notify = require('gulp-notify'),
plumber = require('gulp-plumber'),
size = require('gulp-size'),
uncss = require('gulp-uncss'),
w3cjs = require('gulp-w3cjs'),
gulputil = require('gulp-util'),
stylestats = require('<API key>'),
clean = require('gulp-clean'),
cssValidation = require('gulp-css-validator'),
connect = require('connect');
var fs = require('fs'),
mkdirp = require('mkdirp'),
runSequence = require('run-sequence');
var reportsDir = './reports/json'
//Individual Tasks
gulp.task('markymark', function() {
var jsonReporter = function (file) {
if (file && file.htmlhint) {
fs.writeFileSync(reportsDir + '/htmlhint-' + file.path.split('/').pop().replace(/\.[^\.]+$/, '') + '.json', JSON.stringify(file.htmlhint, null, 2));
}
}; |
<!DOCTYPE html>
<html>
<head>
<title>NCAA Football 2002</title>
<meta name="keywords" content=""/>
<meta name="description" content=""/>
<meta name="revised" content="Dan, 30/12/2012"/>
<meta name="author" content="Dan"/>
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
<link rel="stylesheet" href="http://electronicarts.coffeecup.com/stylesheets/nfs.css" type="text/css"/>
<link rel="stylesheet" href="http://electronicarts.coffeecup.com/stylesheets/style.css" type="text/css" />
<script type="text/javascript" src="http://electronicarts.coffeecup.com/scripts/clock.js"></script>
<script type="text/javascript" src="http://electronicarts.coffeecup.com/scripts/jquery.js"></script>
<script type="text/javascript" src="http://electronicarts.coffeecup.com/scripts/ad.js"></script>
</head>
<body onload="date();promote();footer()">
<div id="ad" onclick="warn()">Click</div>
<!--Header
<div id="header">
<center>
<div id="header_sub">
<div class="fontface">NCAA Football 2002</div>
<a href="http:
<div id="txt"></div>
<div id="global"><ul>
<li><a href="http://electronicarts.coffeecup.com/index.html">Acasa</a></li>
<li><a href="http://electronicarts.coffeecup.com/ea.html" class="selected">Electronic Arts</a></li>
<li><a href="http://electronicarts.coffeecup.com/photogallery/photogallery.html">Galerie Foto</a></li>
<li><a href="http://electronicarts.coffeecup.com/sitemap/sitemap.htm">Site Map</a></li>
<li><a href="http://electronicarts.coffeecup.com/contact.html">Contact</a></li>
</ul></div>
</div>
</center>
</div>
<!--Header
<div class="hcont"></div><div class="hcont"></div>
<div id="content">
<div id="coffeecup"></div>
<div class="hcont"></div><div class="hcont"></div>
<h2 class="title">Nume:</h2>
<div id="bar">
<table border="1">
<tr><td colspan="5"><img src="" alt="photoshop title"/></td></tr>
<tr><td rowspan="9"><img src="" alt="Coperta"/></td></tr>
<tr>
<td><b>Dezvoltator(i):</b></td><td></td>
<td rowspan="2">Cerinte de sistem:</td>
</tr>
<tr>
<td><b>Editor(i):</b></td><td></td>
</tr>
<tr>
<td><b>Serie:</b></td><td></td>
<td rowspan="6">
<ul style="list-style:none none;">
<li>Sistem de operare: </li>
<li>Microprocesor: </li>
<li>Memorie RAM: </li>
<li>Placa video: </li>
<li>Versiune DirectX: </li>
<li>Spatiu pe HDD: </li>
<li>Placa de sunet: </li>
<li>Viteza DVD-ROM: </li>
</ul>
</td>
</tr>
<tr>
<td><b>Motor grafic:</b></td><td></td>
</tr>
<tr>
<td><b>Platforma:</b></td><td></td>
</tr>
<tr>
<td><b>Genuri:</b></td><td></td>
</tr>
<tr>
<td><b>Moduri:</b></td><td></td>
</tr>
<tr>
<td><b>Mod de distributie:</b></td><td></td>
</tr>
</table>
</div>
<h3>Povestea:</h3>
<p>Jocul video</p>
<br />
<br /><br />
<h3><a href="">Vezi galeria foto</a></h3>
</div>
<div class="hcont"></div>
<footer id="footerscript"></footer>
<script id="_wauwo1" type="text/javascript">
var _wau = _wau || [];
_wau.push(["tab", "oqco5maz6n5j", "wo1", "left-lower"]);
(function() {var s=document.createElement("script"); s.async=true;
s.src="http://widgets.amung.us/tab.js";
document.<API key>("head")[0].appendChild(s);
})();</script>
</body>
</html> |
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_07) on Fri Oct 31 18:27:03 CET 2008 -->
<TITLE>
Uses of Class org.springframework.ui.velocity.<API key> (Spring Framework API 2.5)
</TITLE>
<META NAME="date" CONTENT="2008-10-31">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.springframework.ui.velocity.<API key> (Spring Framework API 2.5)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<A NAME="navbar_top"></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../org/springframework/ui/velocity/<API key>.html" title="class in org.springframework.ui.velocity"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </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-files/index-1.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">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/springframework/ui/velocity/\<API key>.html" target="_top"><B>FRAMES</B></A>
<A HREF="<API key>.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>
</TABLE>
<A NAME="skip-navbar_top"></A>
<HR>
<CENTER>
<H2>
<B>Uses of Class<br>org.springframework.ui.velocity.<API key></B></H2>
</CENTER>
No usage of org.springframework.ui.velocity.<API key>
<P>
<HR>
<A NAME="navbar_bottom"></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="<API key>"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../org/springframework/ui/velocity/<API key>.html" title="class in org.springframework.ui.velocity"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </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-files/index-1.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">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/springframework/ui/velocity/\<API key>.html" target="_top"><B>FRAMES</B></A>
<A HREF="<API key>.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>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<HR>
<i>Copyright © 2002-2008 <a href=http:
<!-- Begin LoopFuse code -->
<script src=http://loopfuse.net/webrecorder/js/listen.js type=text/javascript>
</script>
<script type=text/javascript>
_lf_cid = LF_48be82fa;
_lf_remora();
</script>
<!-- End LoopFuse code -->
</BODY>
</HTML> |
package Hexel.generation.terrainGenerator.<API key>.plate;
public class PlateChunk {
public static final int WIDTH = 129;
public static final int HEIGHT = 129;
Plate[][] plates = new Plate[WIDTH][HEIGHT];
} |
local ffi = require("ffi")
local C = ffi.C
local foundation = require("foundation")
-- Window types and functions
ffi.cdef[[
typedef struct window_config_t window_config_t;
typedef struct window_t window_t;
typedef void (* window_draw_fn)(window_t*);
int <API key>(const window_config_t);
void <API key>(void);
bool <API key>(void);
version_t <API key>(void);
window_t* window_create(unsigned int, const char*, size_t, int, int, unsigned int);
window_t* window_allocate(void*);
void window_initialize(window_t*, void*);
void window_finalize(window_t*);
void window_deallocate(window_t*);
unsigned int window_adapter(window_t*);
void window_maximize(window_t*);
void window_minimize(window_t*);
void window_restore(window_t*);
void window_resize(window_t*, int, int);
void window_move(window_t*, int, int);
bool window_is_open(window_t*);
bool window_is_visible(window_t*);
bool window_is_maximized(window_t*);
bool window_is_minimized(window_t*);
bool window_has_focus(window_t*);
void window_show_cursor(window_t*, bool, bool);
void <API key>(window_t*, int, int);
bool <API key>(window_t*);
void window_set_title(window_t*, const char*, size_t);
int window_width(window_t*);
int window_height(window_t*);
int window_position_x(window_t*);
int window_position_y(window_t*);
void <API key>(window_t*);
void* window_hwnd(window_t*);
void* window_hinstance(window_t*);
void* window_hdc(window_t*);
void window_release_hdc(void*, void*);
void* window_display(window_t*);
void* window_content_view(window_t*);
unsigned long window_drawable(window_t*);
void* window_visual(window_t*);
int window_screen(window_t*);
void* window_view(window_t*, unsigned int);
void* window_layer(window_t*, void*);
void <API key>(window_t*, window_draw_fn);
void <API key>(window_t*);
void <API key>(window_t*);
int window_screen_width(unsigned int);
int <API key>(unsigned int);
int window_view_width(window_t*, void*);
int window_view_height(window_t*, void*);
]]
return {
-- Constants
WINDOWEVENT_CREATE = 1,
WINDOWEVENT_RESIZE = 2,
WINDOWEVENT_CLOSE = 3,
WINDOWEVENT_DESTROY = 4,
WINDOWEVENT_SHOW = 5,
WINDOWEVENT_HIDE = 6,
<API key> = 7,
<API key> = 8,
WINDOWEVENT_REDRAW = 9,
<API key> = -1
} |
{-# LANGUAGE QuasiQuotes #-}
module JavaLight.UseJll where
import JavaLight.JavaletteLight
import Prelude hiding (exp)
{- This Javalette Light program is parsed at compile time,
and replaced by it's abstract syntax representation.
The 'holes' in square brackets are anti-quoted Haskell
expression.
The QuasiQuoter prog is generated from the grammar in JavaletteLight.hs
(it corresponds to the category Prog).
-}
printing' :: Expr -> Prog
printing' e = [prog|
int main ( ) {
print ( $e ) ;
}
|]
printing :: Expr -> Prog
printing e = Fun TInt (Ident "main") [SFunApp (Ident "print") [e]]
print10 :: Prog
print10 = printing' [expr| 5 + 5 |]
main :: IO ()
main = print print10 |
shlog
==
minimal colored action logger for command line applications |
"team peggle specific commands"
from util import hook, http
def format_server(server):
return "\x02%-16s\x02 steam://connect/%s" % (server.get('name')[0:16], server.get('host'))
@hook.command('server', autohelp=False)
@hook.command(autohelp=False)
def servers(inp, chan='', nick='', reply=None):
servers = http.get_json('http://teampeggle.com/servers.json')
if inp:
server_id = int(inp) - 1
if server_id >= 0 and server_id < len(servers):
server = servers[server_id]
return format_server(server)
else:
return 'No server found'
for server in servers:
reply(format_server(server)) |
package fr.mvanbesien.projecteuler.from041to060;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import fr.mvanbesien.projecteuler.utils.NumberUtils;
public class Problem055 implements Callable<Long> {
public static void main(String[] args) throws Exception {
long nanotime = System.nanoTime();
System.out.println("Answer is " + new Problem055().call());
System.out.println(String.format("Executed in %d µs", (System.nanoTime() - nanotime) / 1000));
}
@Override
public Long call() throws Exception {
List<BigInteger> initialConditions = new ArrayList<>();
for (long i = 10; i <= 10000; i++) {
initialConditions.add(BigInteger.valueOf(i));
}
List<BigInteger> lychrel = new ArrayList<>();
while (initialConditions.size() > 0) {
List<BigInteger> toRemove = new ArrayList<>();
BigInteger value = initialConditions.get(0);
BigInteger reverse = NumberUtils.getReverse(value);
toRemove.add(value);
toRemove.add(reverse);
boolean palindromeFound = false;
for (int i = 0; i < 50 && !palindromeFound; i++) {
BigInteger addition = value.add(reverse);
if (NumberUtils.isPalindrome(addition)) {
palindromeFound = true;
} else {
value = addition;
reverse = NumberUtils.getReverse(value);
toRemove.add(value);
toRemove.add(reverse);
}
}
if (!palindromeFound) {
lychrel.add(initialConditions.get(0));
initialConditions.remove(initialConditions.get(0));
} else
initialConditions.removeAll(toRemove);
}
return (long) lychrel.size();
}
} |
package samcoles.blabbermouth.samcoles.blabbermouth.ui;
import android.app.AlertDialog;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.GridView;
import android.widget.TextView;
import com.parse.FindCallback;
import com.parse.ParseException;
import com.parse.ParseQuery;
import com.parse.ParseRelation;
import com.parse.ParseUser;
import java.util.List;
import samcoles.blabbermouth.R;
import samcoles.blabbermouth.samcoles.blabbermouth.adapters.UserAdapter;
import samcoles.blabbermouth.samcoles.blabbermouth.utilities.ParseConstants;
public class FriendsFragment extends Fragment {
public static final String TAG = FriendsFragment.class.getSimpleName();
protected List<ParseUser> mFriends;
protected ParseRelation<ParseUser> mFriendsRelation;
protected ParseUser mCurrentUser;
protected GridView mGridView;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.user_grid, container, false);
mGridView = (GridView)rootView.findViewById(R.id.friendsGrid);
TextView emptyTextView = (TextView)rootView.findViewById(android.R.id.empty);
mGridView.setEmptyView(emptyTextView);
return rootView;
}
@Override
public void onResume() {
super.onResume();
mCurrentUser = ParseUser.getCurrentUser();
mFriendsRelation = mCurrentUser.getRelation(ParseConstants.<API key>);
getActivity().<API key>(true);
ParseQuery<ParseUser> query = mFriendsRelation.getQuery();
query.addAscendingOrder(ParseConstants.KEY_USERNAME);
query.findInBackground(new FindCallback<ParseUser>() {
@Override
public void done(List<ParseUser> friends, ParseException e) {
getActivity().<API key>(false);
if (e == null) {
mFriends = friends;
String[] usernames = new String[mFriends.size()];
int i = 0;
for (ParseUser user : mFriends) {
usernames[i] = user.getUsername();
i++;
}
if (mGridView.getAdapter() == null) {
UserAdapter adapter = new UserAdapter(getActivity(), mFriends);
mGridView.setAdapter(adapter);
}
else {
((UserAdapter)mGridView.getAdapter()).refill(mFriends);
}
}
else {
Log.e(TAG, e.getMessage());
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setMessage(e.getMessage())
.setTitle(R.string.error_title)
.setPositiveButton(android.R.string.ok, null);
AlertDialog dialog = builder.create();
dialog.show();
}
}
});
}
} |
package com.gmail.fthielisch.chestkits;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map.Entry;
import java.util.logging.Logger;
import org.bukkit.configuration.Configuration;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.inventory.ItemStack;
public class <API key> {
private HashMap<String, ChestKitsKit> kits;
public <API key>(Configuration config, Logger log) {
kits = new HashMap<String, ChestKitsKit>();
List<String> listOfKits = config.getStringList("kits");
if (listOfKits != null) {
for (String kitName : listOfKits) {
log.info("Loading kit " + kitName);
List<?> items = config.getList("kititems." + kitName);
if (items == null) {
log.severe("Kit " + kitName + " has no items defined! Skipping...");
continue;
}
List<ItemStack> itemStacks = new LinkedList<ItemStack>();
for (Object o : items) {
if (o instanceof ItemStack) {
itemStacks.add((ItemStack)o);
} else {
log.severe("Invalid object found in configuration for kit " + kitName + ": " + o);
}
}
long cooldown = config.getLong("kitcooldown." + kitName, 0L);
ChestKitsKit kit = new ChestKitsKit(kitName, itemStacks);
kit.setCooldown(cooldown);
addKit(kitName, kit);
}
}
log.info("Successfully loaded " + kits.size() + " kits.");
}
public ChestKitsKit getKit(String kit) {
return kits.get(kit);
}
public void saveConfig(ChestKitsPlugin plugin) {
List<String> kitNames = new LinkedList<String>();
for (String s : kits.keySet()) {
kitNames.add(s);
}
FileConfiguration fc = plugin.getConfig();
fc.set("kits", kitNames);
for (Entry<String, ChestKitsKit> entry : kits.entrySet()) {
ChestKitsKit kit = entry.getValue();
fc.set("kititems." + entry.getKey(), kit.getItems());
fc.set("kitcooldown." + entry.getKey(), kit.getCooldown());
}
plugin.saveConfig();
}
public void removeKit(String kit) {
kits.remove(kit);
}
public void addKit(String kitName, ChestKitsKit kit) {
kits.put(kitName, kit);
}
} |
package android.support.v7.internal.widget;
import android.support.v4.view.<API key>;
import android.support.v4.view.<API key>;
import android.support.v7.widget.ActionMenuView;
import android.view.View;
public class AbsActionBarView$<API key>
implements <API key>
{
private boolean a = false;
private int b;
protected AbsActionBarView$<API key>(AbsActionBarView <API key>)
{
}
public final <API key> a(<API key> <API key>, int paramInt)
{
this.c.g = <API key>;
this.b = paramInt;
return this;
}
public void onAnimationCancel(View paramView)
{
this.a = true;
}
public void onAnimationEnd(View paramView)
{
if (this.a);
do
{
return;
this.c.g = null;
this.c.setVisibility(this.b);
}
while ((this.c.d == null) || (this.c.b == null));
this.c.b.setVisibility(this.b);
}
public void onAnimationStart(View paramView)
{
this.c.setVisibility(0);
this.a = false;
}
} |
package com.serpardia.serparcraft.init;
import com.serpardia.serparcraft.reference.Reference;
import com.serpardia.serparcraft.block.BlockFlag;
import com.serpardia.serparcraft.block.BlockSC;
import cpw.mods.fml.common.registry.GameRegistry;
@GameRegistry.ObjectHolder( Reference.MOD_ID )
public class ModBlocks {
public static final BlockSC flag = new BlockFlag();
public static void init() {
GameRegistry.registerBlock( flag, "flag" );
}
} |
exports = module.exports = function (roa) {
'use strict';
var sri4node = roa;
return {
resource: function () {
var $s = sri4node.schemaUtils;
var $q = sri4node.queryUtils;
var $m = sri4node.mapUtils;
return { //eslint-disable-line
type: '/responsibilities',
public: true,
cache: {
ttl: 120,
type: 'local'
},
schema: {
$schema: 'http://json-schema.org/schema
title: 'Responsibility',
description: 'A relationship between a persoon and a functie',
type: 'object',
properties: {
key: $s.string('GUID for this document.'),
persoon: $s.permalink('/personen', 'Person of the Responsibility'),
functie: $s.permalink('/functies', 'Functie of the Responsibility'),
from: {
type: 'string',
format: 'date',
description: 'Validity start date of the responsibility.'
},
to: {
type: 'string',
format: 'date',
description: 'Validity end date of the responsibility.'
}
},
required: ['key', 'persoon', 'functie']
},
validate: [],
query: {
defaultFilter: $q.defaultFilter
},
map: {
key: {},
persoon: {references: '/personen'},
functie: {references: '/functies'},
from: {onread: $m.removeifnull},
to: {onread: $m.removeifnull}
}
};
}
};
}; |
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_07) on Fri Oct 31 18:27:05 CET 2008 -->
<TITLE>
Uses of Interface org.springframework.jdbc.core.simple.<API key> (Spring Framework API 2.5)
</TITLE>
<META NAME="date" CONTENT="2008-10-31">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Interface org.springframework.jdbc.core.simple.<API key> (Spring Framework API 2.5)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<A NAME="navbar_top"></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/springframework/jdbc/core/simple/<API key>.html" title="interface in org.springframework.jdbc.core.simple"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </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-files/index-1.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">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/springframework/jdbc/core/simple/\<API key>.html" target="_top"><B>FRAMES</B></A>
<A HREF="<API key>.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>
</TABLE>
<A NAME="skip-navbar_top"></A>
<HR>
<CENTER>
<H2>
<B>Uses of Interface<br>org.springframework.jdbc.core.simple.<API key></B></H2>
</CENTER>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Packages that use <A HREF="../../../../../../org/springframework/jdbc/core/simple/<API key>.html" title="interface in org.springframework.jdbc.core.simple"><API key></A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><A HREF="#org.springframework.jdbc.core.simple"><B>org.springframework.jdbc.core.simple</B></A></TD>
<TD>Simplification layer over JdbcTemplate for Java 5 and above. </TD>
</TR>
</TABLE>
<P>
<A NAME="org.springframework.jdbc.core.simple"></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Uses of <A HREF="../../../../../../org/springframework/jdbc/core/simple/<API key>.html" title="interface in org.springframework.jdbc.core.simple"><API key></A> in <A HREF="../../../../../../org/springframework/jdbc/core/simple/package-summary.html">org.springframework.jdbc.core.simple</A></FONT></TH>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="<API key>">
<TH ALIGN="left" COLSPAN="2">Classes in <A HREF="../../../../../../org/springframework/jdbc/core/simple/package-summary.html">org.springframework.jdbc.core.simple</A> that implement <A HREF="../../../../../../org/springframework/jdbc/core/simple/<API key>.html" title="interface in org.springframework.jdbc.core.simple"><API key></A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../org/springframework/jdbc/core/simple/SimpleJdbcTemplate.html" title="class in org.springframework.jdbc.core.simple">SimpleJdbcTemplate</A></B></CODE>
<BR>
Java-5-based convenience wrapper for the classic Spring
<A HREF="../../../../../../org/springframework/jdbc/core/JdbcTemplate.html" title="class in org.springframework.jdbc.core"><CODE>JdbcTemplate</CODE></A>,
taking advantage of varargs and autoboxing, and exposing only the most
commonly required operations in order to simplify JdbcTemplate usage.</TD>
</TR>
</TABLE>
<P>
<HR>
<A NAME="navbar_bottom"></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="<API key>"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/springframework/jdbc/core/simple/<API key>.html" title="interface in org.springframework.jdbc.core.simple"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </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-files/index-1.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">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/springframework/jdbc/core/simple/\<API key>.html" target="_top"><B>FRAMES</B></A>
<A HREF="<API key>.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>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<HR>
<i>Copyright © 2002-2008 <a href=http:
<!-- Begin LoopFuse code -->
<script src=http://loopfuse.net/webrecorder/js/listen.js type=text/javascript>
</script>
<script type=text/javascript>
_lf_cid = LF_48be82fa;
_lf_remora();
</script>
<!-- End LoopFuse code -->
</BODY>
</HTML> |
/* Make clicks pass-through */
#nprogress {
pointer-events: none;
}
#nprogress .bar {
background: #00b386;
position: fixed;
z-index: 1031;
top: 0;
left: 0;
width: 100%;
height: 3px;
}
/* Fancy blur effect */
#nprogress .peg {
display: block;
position: absolute;
right: 0px;
width: 100px;
height: 100%;
box-shadow: 0 0 10px #29d, 0 0 5px #29d;
opacity: 1.0;
-webkit-transform: rotate(3deg) translate(0px, -4px);
-ms-transform: rotate(3deg) translate(0px, -4px);
transform: rotate(3deg) translate(0px, -4px);
}
/* Remove these to get rid of the spinner */
#nprogress .spinner {
display: block;
position: fixed;
z-index: 1031;
top: 15px;
right: 15px;
}
#nprogress .spinner-icon {
width: 18px;
height: 18px;
box-sizing: border-box;
border: solid 2px transparent;
border-top-color: #29d;
border-left-color: #29d;
border-radius: 50%;
-webkit-animation: nprogress-spinner 400ms linear infinite;
animation: nprogress-spinner 400ms linear infinite;
}
.<API key> {
overflow: hidden;
position: relative;
}
.<API key> #nprogress .spinner,
.<API key> #nprogress .bar {
position: absolute;
}
@-webkit-keyframes nprogress-spinner {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes nprogress-spinner {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
} |
package com.ferreusveritas.dynamictrees.models;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Collectors;
import com.ferreusveritas.dynamictrees.entities.EntityFallingTree;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@SideOnly(Side.CLIENT)
public class <API key> {
public static Map<Integer, <API key>> modelMap = new HashMap<>();
public static <API key> getModel(EntityFallingTree entity) {
return modelMap.computeIfAbsent(entity.getEntityId(), e -> new <API key>(entity) );
}
public static void cleanupModels(World world, EntityFallingTree entity) {
modelMap.remove(entity.getEntityId());
cleanupModels(world);
}
public static void cleanupModels(World world) {
modelMap = modelMap.entrySet().stream()
.filter( map -> world.getEntityByID(map.getKey()) != null )
.collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue()));
}
} |
#!/bin/bash
wget "http:
gsettings set org.gnome.desktop.background show-desktop-icons false |
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-<API key>: 100%; }
body {
margin: 0; }
article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary {
display: block; }
audio, canvas, progress, video {
display: inline-block;
vertical-align: baseline; }
audio:not([controls]) {
display: none;
height: 0; }
[hidden], template {
display: none; }
a {
background: 0 0; }
a:active, a:hover {
outline: 0; }
abbr[title] {
border-bottom: 1px dotted; }
b, strong {
font-weight: 700; }
dfn {
font-style: italic; }
h1 {
font-size: 2em;
margin: .67em 0; }
mark {
background: #ff0;
color: #000; }
small {
font-size: 80%; }
sub, sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline; }
sup {
top: -.5em; }
sub {
bottom: -.25em; }
img {
border: 0; }
svg:not(:root) {
overflow: hidden; }
figure {
margin: 1em 40px; }
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0; }
pre {
overflow: auto; }
code, kbd, pre, samp {
font-family: monospace,monospace;
font-size: 1em; }
button, input, optgroup, select, textarea {
color: inherit;
font: inherit;
margin: 0; }
button {
overflow: visible; }
button, select {
text-transform: none; }
button, html input[type=button], input[type=reset], input[type=submit] {
-webkit-appearance: button;
cursor: pointer; }
button[disabled], html input[disabled] {
cursor: default; }
button::-moz-focus-inner, input::-moz-focus-inner {
border: 0;
padding: 0; }
input {
line-height: normal; }
input[type=checkbox], input[type=radio] {
box-sizing: border-box;
padding: 0; }
input[type=number]::-<API key>, input[type=number]::-<API key> {
height: auto; }
input[type=search] {
-webkit-appearance: textfield;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box; }
input[type=search]::-<API key>, input[type=search]::-<API key> {
-webkit-appearance: none; }
fieldset {
border: 1px solid silver;
margin: 0 2px;
padding: .35em .625em .75em; }
legend {
border: 0;
padding: 0; }
textarea {
overflow: auto; }
optgroup {
font-weight: 700; }
table {
border-collapse: collapse;
border-spacing: 0; }
td, th {
padding: 0; }
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local("Open Sans Light"), local("OpenSans-Light"), url(http://themes.googleusercontent.com/static/fonts/opensans/v8/<API key>.woff) format("woff"); }
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
src: local("Open Sans"), local("OpenSans"), url(http://themes.googleusercontent.com/static/fonts/opensans/v8/<API key>.woff) format("woff"); }
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 700;
src: local("Open Sans Bold"), local("OpenSans-Bold"), url(http://themes.googleusercontent.com/static/fonts/opensans/v8/<API key>.woff) format("woff"); }
.gigantic, .huge, .large, .bigger, .big,
h1, h2, h3, h4, h5, h6 {
color: #333;
font-weight: bold; }
.gigantic {
font-size: 110px;
line-height: 1.09;
letter-spacing: -2px; }
.huge, h1 {
font-size: 68px;
line-height: 1.05;
letter-spacing: -1px; }
.large, h2 {
font-size: 42px;
line-height: 1.14; }
.bigger, h3 {
font-size: 26px;
line-height: 1.38; }
.big, h4 {
font-size: 22px;
line-height: 1.38; }
.small, small {
font-size: 10px;
line-height: 1.2; }
p {
margin: 0 0 20px 0; }
em {
font-style: italic; }
strong {
font-weight: bold; }
hr {
border: solid #ddd;
border-width: 1px 0 0;
clear: both;
margin: 10px 0 30px;
height: 0; }
a {
color: #c99065;
text-decoration: none;
outline: 0; }
a:hover, a:focus {
color: #e3c6b1; }
::selection {
background: #ffff9e; }
::-moz-selection {
background: #ffff9e; }
img::selection {
background: transparent; }
img::-moz-selection {
background: transparent; }
body {
-<API key>: #ffff9e; }
body {
background: #fff;
font-size: 14px;
line-height: 1.6;
font-family: "Open Sans" sans-serif;
color: #666;
-<API key>: antialiased;
-<API key>: 100%; }
h3 {
color: #e1c184;
text-align: center;
padding: 100px 0 30px; }
@media screen and (max-width: 480px) {
h3 {
padding: 50px 0 50px; } }
h3, header nav a, header .kicker, footer .lockup .content-wrap a {
font-size: 14px;
font-weight: 700;
text-transform: uppercase; }
header, footer {
background-repeat: no-repeat, no-repeat;
background-size: 50px 50px, cover;
background-position: 30px 50px, 50% 50%;
<API key>: overlay, normal; }
header {
height: 450px;
background-position: 30px 20px, 50% 50%; }
header .logo {
height: 50px;
width: 50px;
float: left;
margin: 10px 0 0 30px; }
header .logo path {
fill: rgba(0, 0, 0, 0.4); }
header nav {
float: right;
margin: 30px 30px 0 0; }
header nav a {
display: inline-block;
margin-left: 20px;
color: rgba(0, 0, 0, 0.7); }
header nav a:hover {
color: black; }
header h1 {
text-align: center;
font-size: 72px;
font-weight: 700;
color: white;
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 20px;
clear: both;
padding-top: 100px; }
header h1 span {
display: inline-block;
padding: 0.2em 0.5em;
border: white solid 10px; }
header .kicker {
text-align: center;
letter-spacing: 0.05em;
color: white;
line-height: 1; }
footer .lockup {
padding: 50px 30px; }
footer .lockup:after {
content: "";
display: table;
clear: both; }
footer .lockup .content-wrap {
float: left;
margin-left: 80px; }
footer .lockup .content-wrap .copyright {
margin: 0;
text-transform: uppercase;
font-size: 12px;
color: rgba(0, 0, 0, 0.4); }
footer .lockup .content-wrap a {
color: rgba(0, 0, 0, 0.5);
display: inline-block;
margin-right: 30px; }
footer .lockup .content-wrap a:hover {
color: rgba(0, 0, 0, 0.7); }
.face-lockup {
max-width: 780px;
display: -webkit-box;
display: -moz-box;
display: box;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flexbox;
display: flex;
margin: 0 auto;
-webkit-box-align: center;
-moz-box-align: center;
box-align: center;
-webkit-align-items: center;
-moz-align-items: center;
-ms-align-items: center;
-o-align-items: center;
align-items: center;
-ms-flex-align: center;
-webkit-box-pack: justify;
-moz-box-pack: justify;
box-pack: justify;
-<API key>: space-between;
-moz-justify-content: space-between;
-ms-justify-content: space-between;
-o-justify-content: space-between;
justify-content: space-between;
-ms-flex-pack: justify; }
.face-lockup .face-img {
border-radius: 50%;
height: 200px;
width: 200px;
-<API key>: 3;
-<API key>: 3;
box-ordinal-group: 3;
-webkit-order: 3;
-moz-order: 3;
order: 3;
-ms-flex-order: 3; }
.face-lockup [class^="icon-"] {
height: 100px;
width: 100px;
background: #e5eaee;
border-radius: 50%; }
.face-lockup [class^="icon-"] path {
fill: #c99065; }
.face-lockup [class^="icon-"].icon-pencil {
-<API key>: 1;
-<API key>: 1;
box-ordinal-group: 1;
-webkit-order: 1;
-moz-order: 1;
order: 1;
-ms-flex-order: 1; }
.face-lockup [class^="icon-"].icon-mouse {
-<API key>: 2;
-<API key>: 2;
box-ordinal-group: 2;
-webkit-order: 2;
-moz-order: 2;
order: 2;
-ms-flex-order: 2; }
.face-lockup [class^="icon-"].icon-browser {
-<API key>: 4;
-<API key>: 4;
box-ordinal-group: 4;
-webkit-order: 4;
-moz-order: 4;
order: 4;
-ms-flex-order: 4; }
.face-lockup [class^="icon-"].icon-video {
-<API key>: 5;
-<API key>: 5;
box-ordinal-group: 5;
-webkit-order: 5;
-moz-order: 5;
order: 5;
-ms-flex-order: 5; }
@media screen and (max-width: 650px) {
.face-lockup {
display: block;
text-align: center; }
.face-lockup div {
display: inline-block; }
.face-lockup .face-img {
display: block;
background-position: center center;
background-repeat: no-repeat;
width: auto;
margin-bottom: 30px; }
.face-lockup [class^="icon-"] {
margin: 10px; } }
.blurb {
max-width: 620px;
padding: 0 20px;
margin: 50px auto;
font-size: 24px;
text-align: center;
font-weight: 300s; }
.skill-lockup {
max-width: 540px;
margin: 100px auto;
color: #999;
background: pinkm; }
.skill-lockup:after {
content: "";
display: table;
clear: both; }
.skill-lockup .skill-unit {
width: 270px;
float: left; }
.skill-lockup .skill-icons {
font-size: 0;
margin: 3px 0 30px; }
.skill-lockup .skill-icons span {
display: inline-block;
height: 14px;
width: 14px;
background-color: #c99065;
margin-right: 8px;
border-radius: 50%; }
.skill-lockup .skill-icons span:after {
content: "";
display: block;
height: 10px;
width: 10px;
background: #fff;
border-radius: 50%;
margin: 2px; }
.skill-lockup .skill-icons.skill-1 span:nth-child(n+2), .skill-lockup .skill-icons.skill-2 span:nth-child(n+3), .skill-lockup .skill-icons.skill-3 span:nth-child(n+4), .skill-lockup .skill-icons.skill-4 span:nth-child(n+5), .skill-lockup .skill-icons.skill-5 span:nth-child(n+6), .skill-lockup .skill-icons.skill-6 span:nth-child(n+7), .skill-lockup .skill-icons.skill-7 span:nth-child(n+8), .skill-lockup .skill-icons.skill-8 span:nth-child(n+9), .skill-lockup .skill-icons.skill-9 span:nth-child(n+10), .skill-lockup .skill-icons.skill-10 span:nth-child(n+11) {
background: #e5eaee; }
@media screen and (max-width: 541px) {
.skill-lockup {
width: 220px; }
.skill-lockup .skill-unit {
width: 220px; } } |
/*global describe*/
/*global require*/
/*global module*/
/*global it*/
/*global console*/
/*global process*/
var Solution = require("./Solution.js");
var MilpSolution = require("./MilpSolution.js");
function Tableau(precision) {
this.model = null;
this.matrix = null;
this.width = 0;
this.height = 0;
this.costRowIndex = 0;
this.rhsColumn = 0;
this.variablesPerIndex = [];
this.unrestrictedVars = null;
// Solution attributes
this.feasible = true; // until proven guilty
this.evaluation = 0;
this.simplexIters = 0;
this.varIndexByRow = null;
this.varIndexByCol = null;
this.rowByVarIndex = null;
this.colByVarIndex = null;
this.precision = precision || 1e-8;
this.optionalObjectives = [];
this.<API key> = {};
this.savedState = null;
this.availableIndexes = [];
this.lastElementIndex = 0;
this.variables = null;
this.nVars = 0;
this.bounded = true;
this.unboundedVarIndex = null;
this.<API key> = 0;
}
module.exports = Tableau;
Tableau.prototype.solve = function () {
if (this.model.<API key>() > 0) {
this.branchAndCut();
} else {
this.simplex();
}
this.<API key>();
return this.getSolution();
};
function OptionalObjective(priority, nColumns) {
this.priority = priority;
this.reducedCosts = new Array(nColumns);
for (var c = 0; c < nColumns; c += 1) {
this.reducedCosts[c] = 0;
}
}
OptionalObjective.prototype.copy = function () {
var copy = new OptionalObjective(this.priority, this.reducedCosts.length);
copy.reducedCosts = this.reducedCosts.slice();
return copy;
};
Tableau.prototype.<API key> = function (priority, column, cost) {
var <API key> = this.<API key>[priority];
if (<API key> === undefined) {
var nColumns = Math.max(this.width, column + 1);
<API key> = new OptionalObjective(priority, nColumns);
this.<API key>[priority] = <API key>;
this.optionalObjectives.push(<API key>);
this.optionalObjectives.sort(function (a, b) {
return a.priority - b.priority;
});
}
<API key>.reducedCosts[column] = cost;
};
Tableau.prototype.initialize = function (width, height, variables, unrestrictedVars) {
this.variables = variables;
this.unrestrictedVars = unrestrictedVars;
this.width = width;
this.height = height;
// console.time("tableau_build");
// BUILD AN EMPTY ARRAY OF THAT WIDTH
var tmpRow = new Array(width);
for (var i = 0; i < width; i++) {
tmpRow[i] = 0;
}
// BUILD AN EMPTY TABLEAU
this.matrix = new Array(height);
for (var j = 0; j < height; j++) {
this.matrix[j] = tmpRow.slice();
}
// TODO: Benchmark This
//this.matrix = new Array(height).fill(0).map(() => new Array(width).fill(0));
// console.timeEnd("tableau_build");
// console.log("height",height);
// console.log("width",width);
// console.log("");
this.varIndexByRow = new Array(this.height);
this.varIndexByCol = new Array(this.width);
this.varIndexByRow[0] = -1;
this.varIndexByCol[0] = -1;
this.nVars = width + height - 2;
this.rowByVarIndex = new Array(this.nVars);
this.colByVarIndex = new Array(this.nVars);
this.lastElementIndex = this.nVars;
};
Tableau.prototype._resetMatrix = function () {
var variables = this.model.variables;
var constraints = this.model.constraints;
var nVars = variables.length;
var nConstraints = constraints.length;
var v, varIndex;
var costRow = this.matrix[0];
var coeff = (this.model.isMinimization === true) ? -1 : 1;
for (v = 0; v < nVars; v += 1) {
var variable = variables[v];
var priority = variable.priority;
var cost = coeff * variable.cost;
if (priority === 0) {
costRow[v + 1] = cost;
} else {
this.<API key>(priority, v + 1, cost);
}
varIndex = variables[v].index;
this.rowByVarIndex[varIndex] = -1;
this.colByVarIndex[varIndex] = v + 1;
this.varIndexByCol[v + 1] = varIndex;
}
var rowIndex = 1;
for (var c = 0; c < nConstraints; c += 1) {
var constraint = constraints[c];
var constraintIndex = constraint.index;
this.rowByVarIndex[constraintIndex] = rowIndex;
this.colByVarIndex[constraintIndex] = -1;
this.varIndexByRow[rowIndex] = constraintIndex;
var t, term, column;
var terms = constraint.terms;
var nTerms = terms.length;
var row = this.matrix[rowIndex++];
if (constraint.isUpperBound) {
for (t = 0; t < nTerms; t += 1) {
term = terms[t];
column = this.colByVarIndex[term.variable.index];
row[column] = term.coefficient;
}
row[0] = constraint.rhs;
} else {
for (t = 0; t < nTerms; t += 1) {
term = terms[t];
column = this.colByVarIndex[term.variable.index];
row[column] = -term.coefficient;
}
row[0] = -constraint.rhs;
}
}
};
Tableau.prototype.setModel = function (model) {
this.model = model;
var width = model.nVariables + 1;
var height = model.nConstraints + 1;
this.initialize(width, height, model.variables, model.<API key>);
this._resetMatrix();
return this;
};
Tableau.prototype.getNewElementIndex = function () {
if (this.availableIndexes.length > 0) {
return this.availableIndexes.pop();
}
var index = this.lastElementIndex;
this.lastElementIndex += 1;
return index;
};
Tableau.prototype.density = function () {
var density = 0;
var matrix = this.matrix;
for (var r = 0; r < this.height; r++) {
var row = matrix[r];
for (var c = 0; c < this.width; c++) {
if (row[c] !== 0) {
density += 1;
}
}
}
return density / (this.height * this.width);
};
Tableau.prototype.setEvaluation = function () {
// Rounding objective value
var roundingCoeff = Math.round(1 / this.precision);
var evaluation = this.matrix[this.costRowIndex][this.rhsColumn];
var roundedEvaluation =
Math.round((Number.EPSILON + evaluation) * roundingCoeff) / roundingCoeff;
this.evaluation = roundedEvaluation;
if (this.simplexIters === 0) {
this.bestPossibleEval = roundedEvaluation;
}
};
Tableau.prototype.getSolution = function () {
var evaluation = (this.model.isMinimization === true) ?
this.evaluation : -this.evaluation;
if (this.model.<API key>() > 0) {
return new MilpSolution(this, evaluation, this.feasible, this.bounded, this.<API key>);
} else {
return new Solution(this, evaluation, this.feasible, this.bounded);
}
}; |
using System.ComponentModel.Composition.Primitives;
using System.Diagnostics;
using System.Reflection;
using System.Threading;
using Microsoft.VisualStudio.Text.Editor;
using Microsoft.VisualStudio.Text.Operations;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.Linq;
using System.Text;
namespace PSCodeAnalyzer
{
public interface <API key>
{
CodeAnalyzer Create(ITextView textView);
}
[Export(typeof(<API key>))]
public class CodeAnalyzerFactory : <API key>
{
//[ImportMany(typeof(IRule), <API key> = CreationPolicy.Shared)]
//private IEnumerable<Lazy<IRule, IRuleMetadata>> _rules = null;
public CodeAnalyzer Create(ITextView textView)
{
return new CodeAnalyzer(textView);
}
}
} |
from mws.parsers.base import first_element, BaseElementWrapper, BaseResponseMixin
from mws._mws import InboundShipments
namespaces = {
'a': 'http://mws.amazonaws.com/<API key>/2010-10-01/'
}
class Member(BaseElementWrapper):
def __init__(self, element):
BaseElementWrapper.__init__(self, element)
@property
@first_element
def quantity_shipped(self):
return self.element.xpath('./a:QuantityShipped/text()', namespaces=namespaces)
@property
@first_element
def shipment_id(self):
return self.element.xpath('./a:ShipmentId/text()', namespaces=namespaces)
@property
@first_element
def <API key>(self):
return self.element.xpath('./a:<API key>/text()', namespaces=namespaces)
@property
def asin(self):
return self.<API key>
@property
@first_element
def seller_sku(self):
return self.element.xpath('./a:SellerSKU/text()', namespaces=namespaces)
@property
@first_element
def quantity_received(self):
return self.element.xpath('./a:QuantityReceived/text()', namespaces=namespaces)
@property
@first_element
def quantity_in_case(self):
return self.element.xpath('./a:QuantityInCase/text()', namespaces=namespaces)
class <API key>(BaseElementWrapper, BaseResponseMixin):
@property
def shipment_items(self):
return [Member(x) for x in self.element.xpath('//a:member', namespaces=namespaces)]
@property
@first_element
def next_token(self):
return self.element.xpath('//a:NextToken/text()', namespaces=namespaces)
@classmethod
def from_next_token(cls, mws_access_key, mws_secret_key, mws_account_id, next_token, mws_auth_token=None):
api = InboundShipments(mws_access_key, mws_secret_key, mws_account_id, auth_token=mws_auth_token)
response = api.<API key>(next_token)
return cls.load(response.original)
@classmethod
def request(cls, mws_access_key, mws_secret_key, mws_account_id, shipment_id,
mws_auth_token=None, last_updated_after=None, last_updated_before=None):
api = InboundShipments(mws_access_key, mws_secret_key, mws_account_id, auth_token=mws_auth_token)
response = api.<API key>(shipment_id, last_updated_after, last_updated_before)
return cls.load(response.original) |
<a href="upload.html">Upload</a> | <a href="terms.html">Terms</a> | <a href="privacy.html">Privacy</a> | <a href="contact.html">Contact</a> | <a href="http://twitter.com/anon_img">Twitter</a>
<br><br><br>
<h1>Anonymous Image Hosting</h1> |
package com.zerulus.states;
import java.awt.Graphics2D;
import java.util.Stack;
import com.zerulus.util.InputHandler;
import com.zerulus.util.MouseHandler;
public class GameStateManager extends GameState{
private Stack<GameState> states;
public static final int MENU = 0;
public static final int PLAY = 1;
public static final int EXIT = 2;
public static final int GUIMENU = 3;
public static final int GAMEOVER = 4;
public GameStateManager() {
super(gsm);
states = new Stack<GameState>();
states.push(new MenuState(this));
}
public void setState(int i, boolean pop) {
// This is mainly for PlayState to GUIMenuState
pop(pop);
if(i == 0) states.push(new MenuState(this));
if(i == 1) states.push(new PlayState(this));
//if(i == 2) states.push(new ExitState());
//if(i == 3) states.push(new GUIMenuState());
if(i == 4) states.push(new GameOverState(this));
}
public void pop(boolean b) {
if(states.size() <= 0) {
states.pop();
}
}
public void update() {
states.peek().update();
}
public void input(InputHandler keys, MouseHandler mouse) {
states.peek().input(keys, mouse);
if(keys.escape.down) {
System.exit(0);
}
}
public void render(Graphics2D g) {
states.peek().render(g);
}
} |
import _ from 'lodash';
import * as util from '../../util';
import {signToken} from '../../auth/auth.service';
import User from './user.model';
import config from '../../config/environment';
import jwt from 'jsonwebtoken';
import mongoose from 'mongoose';
import gridform from 'gridform';
import Grid from 'gridfs-stream';
var gfs;
var conn = mongoose.createConnection(config.mongo.uri);
gridform.mongo = mongoose.mongo;
Grid.mongo = mongoose.mongo;
conn.once('open', function(err) {
if(err) return util.handleError(err);
gfs = Grid(conn.db);
gridform.db = conn.db;
});
/**
* Get list of users
* restriction: 'admin'
*/
export function index(req, res) {
User.find({}, '-salt -hashedPassword', function(err, users) {
if(err) return util.handleError(res, err);
res.status(200).json(users);
});
}
// Get the number of users
export function count(req, res) {
User.count({}, function(err, count) {
if(err) util.handleError(res, err);
else res.status(200).json(count);
});
}
/**
* Creates a new user
*/
export function create(req, res, next) {
var newUser = new User(req.body);
newUser.provider = 'local';
newUser.providers.local = true;
newUser.role = 'user';
util.saveFileFromFs(`${config.root}/server/components/images/default_user.jpg`, { filename: 'default_user.jpg' })
.then(userImgFile => {
newUser.imageId = userImgFile._id;
newUser.save(function(err, user) {
if(err) return util.handleError(res, err);
return signToken(user._id).then(token => {
res.json({token});
}).catch(err => {
res.status(500).send(err);
});
});
});
}
/** Update a user */
export function update(req, res) {
if(!util.isValidObjectId(req.params.id)) return res.status(400).send('Invalid ID');
var form = gridform({db: conn.db, mongo: mongoose.mongo});
User.findById(req.params.id).exec()
.catch(err => util.handleError(res, err))
.then(user => {
if(!user) return res.status(404).end();
form.parse(req, function(err, fields, files) {
if(err) return util.handleError(res, err);
if(fields._id) {
Reflect.deleteProperty(fields, '_id');
}
var file = files.file;
if((fields.newImage || !user.imageId) && (_.isNull(file) || _.isUndefined(file))) {
return res.status(400).send(new Error('No file'));
}
console.log(file);
console.log(fields);
var userModel = {};
if(fields.name && _.isString(fields.name)) {
userModel.name = fields.name;
}
if(fields.email && _.isString(fields.email)) {
userModel.email = fields.email;
}
if(fields.role && _.isString(fields.role)) {
userModel.role = fields.role;
}
if(fields.newImage || (!user.imageId && file)) {
if(user.imageId) {
gfs.remove({_id: user.imageId}, function(err) {
if(err) return util.handleError(err);
else console.log('deleted imageId');
});
gfs.remove({_id: user.smallImageId}, function(err) {
if(err) return util.handleError(err);
else console.log('deleted smallImageId');
});
}
userModel.imageId = file.id;
util.createThumbnail(file.id)
.catch(util.handleError)
.then(function(thumbnail) {
console.log(`${file.name} -> (thumb)${thumbnail.id}`);
userModel.smallImageId = thumbnail.id;
var updated = _.assign(user, userModel);
return updated.save(function(err) {
if(err) return util.handleError(res, err);
else return res.status(200).json(user);
});
});
} else {
var updated = _.assign(user, userModel);
return updated.save(function(err) {
if(err) {
return util.handleError(res, err);
} else {
return res.status(200).json(user);
}
});
}
});
});
}
/**
* Get a single user
*/
export function show(req, res, next) {
console.log(req.user);
User.findById(req.params.id, '-salt -hashedPassword', function(err, user) {
if(err) return next(err);
if(!user) return res.status(404).end();
console.log(user);
if(req.user && config.userRoles.indexOf(req.user.role) >= config.userRoles.indexOf('admin')) {
delete user.hashedPassword;
delete user.salt;
return res.json(user);
} else {
return res.json(user.profile);
}
});
}
/**
* Deletes a user
* restriction: 'admin'
*/
export function destroy(req, res) {
User.findByIdAndRemove(req.params.id, function(err, user) {
if(err) return res.send(500, err);
return res.status(204).json(user);
});
}
/**
* Change a users password
*/
export function changePassword(req, res) {
if(!req.user || !req.user._id) return res.status(401).end();
var oldPass = String(req.body.oldPassword);
var newPass = String(req.body.newPassword);
User.findById(req.user._id, function(err, user) {
if(err) {
console.log(err);
return res.sendStatus(500);
}
if(user.authenticate(oldPass)) {
user.password = newPass;
user.save(function(err) {
if(err) return util.handleError(res, err);
res.sendStatus(200);
});
} else {
res.sendStatus(403);
}
});
}
/**
* Get my info
*/
export function me(req, res, next) {
var userId = req.user._id;
User.findOne({
_id: userId
}, '-salt -hashedPassword', function(err, user) { // don't ever give out the password or salt
if(err) return next(err);
if(!user) return res.json(404);
res.json(user);
});
}
/**
* Authentication callback
*/
export function authCallback(req, res) {
res.redirect('/');
} |
<?php
/**
* debug
*/
$start = -microtime(true);
$sql_count = 0;
/**
* check requirement
*/
if (version_compare(phpversion(), '5.3.0', '<') == true)
{
exit('PHP 5.3+ Required');
}
/**
* session
*/
session_start();
/**
* configuration
*/
require_once 'apps/main/config.php';
/**
* loader
*/
require_once 'apps/main/loader.php';
/**
* init db
*/
$mysqli = new mysqli(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD, DB_DATABASE);
mysqli_query($mysqli, "SET NAMES 'utf8'");
mysqli_query($mysqli, "SET CHARACTER SET utf8");
mysqli_query($mysqli, "SET <API key>=utf8");
mysqli_query($mysqli, "SET SQL_MODE = ''");
require_once 'apps/main/database.php';
/**
* acl
*/
require_once 'apps/main/acl.php';
/**
* swift mailer
*/
require_once 'system/library/swiftmailer/swift_required.php';
/**
* language
*/
$languages = array();
$langs = load_model('language')->get()->rows;
foreach ($langs as $lang)
{
$languages[$lang['code']] = $lang;
}
$detect = '';
if (isset($_SERVER['<API key>']) && $_SERVER['<API key>'])
{
$browser_languages = explode(',', $_SERVER['<API key>']);
foreach ($browser_languages as $browser_language)
{
foreach ($languages as $key => $value)
{
$locale = explode(',', $value['locale']);
if (in_array($browser_language, $locale))
{
$detect = $key;
break;
}
}
if ($detect) break;
}
}
if (isset($_SESSION['language']) && array_key_exists($_SESSION['language'], $languages))
{
$code = $_SESSION['language'];
}
elseif (isset($_COOKIE['language']) && array_key_exists($_COOKIE['language'], $languages))
{
$code = $_COOKIE['language'];
}
elseif ($detect)
{
$code = $detect;
}
else
{
$code = 'en';
}
if (!isset($_SESSION['language']) || $_SESSION['language'] != $code)
{
$_SESSION['language'] = $code;
}
if (!isset($_COOKIE['language']) || $_COOKIE['language'] != $code)
{
setcookie('language', $code, time() + 60 * 60 * 24 * 30, '/', $_SERVER['HTTP_HOST']);
}
load_language($code);
/**
* function
*/
require_once 'apps/main/function.php';
/**
* error handler
*/
set_error_handler('error_handler');
/**
* routine
*/
require_once 'apps/main/routine.php';
/**
* simple router
* with the help of .htaccess
*/
if (isset($_GET['route']))
{
$_GET['route'] = trim ( $_GET['route'], '/' );
route($_GET['route']);
}
else
{
require_once 'apps/main/controller/home.php';
}
/**
* clean
*/
unset
(
$_SESSION['error'],
$_SESSION['success'],
$_SESSION['geterror']
);
/**
* close database connection
*/
mysqli_close($mysqli); |
class StoryFromTCO {
public:
int minimumChanges(vector <int> places, vector <int> cutoff) {
n = places.size();
For(i,1,n) A[i] = MP(cutoff[i - 1], places[i - 1]);
sort(A + 1, A + n + 1);
multiset<int> S;
int ans = 0;
For(i,1,n) if (A[i].FI < A[i].SE) {
++ans;
if (!S.empty()) {
int have_best = *S.begin();
if (have_best <= A[i].FI) {
S.erase(S.begin());
S.insert(A[i].SE);
continue ;
}
}
bool solved = false ;
Cor(j,n,i + 1) if (A[j].SE <= A[i].FI) {
A[j].SE = INF;
S.insert(A[i].SE);
solved = true;
break ;
}
if (!solved) return -1;
}
return ans;
}
}; |
package response
import (
"encoding/xml"
)
type TransferOrders struct {
Result
}
func (response TransferOrders) UnmarshalXml(body []byte) (ResponseParser, error) {
err := xml.Unmarshal(body, &response)
if err != nil {
return nil, err
}
return response, nil
} |
package org.hibernate.envers.test.integration.superclass.auditparents;
import org.hibernate.envers.Audited;
import javax.persistence.Entity;
/**
* @author Lukasz Antoniak (lukasz dot antoniak at gmail dot com)
*/
@Entity
@Audited
public class <API key> extends <API key> {
private String child;
public <API key>() {
super(null, null, null, null);
}
public <API key>(Long id, String grandparent, String notAudited, String parent, String child) {
super(id, grandparent, notAudited, parent);
this.child = child;
}
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof <API key>)) return false;
if (!super.equals(o)) return false;
<API key> that = (<API key>) o;
if (child != null ? !child.equals(that.child) : that.child != null) return false;
return true;
}
public int hashCode() {
int result = super.hashCode();
result = 31 * result + (child != null ? child.hashCode() : 0);
return result;
}
public String toString() {
return "<API key>(" + super.toString() + ", child = " + child + ")";
}
public String getChild() {
return child;
}
public void setChild(String child) {
this.child = child;
}
} |
<title>Design Pattern HW5</title>
<br/>
<p><API key> ¬O¥Î¨Ó²£¥Í DocumentBuilder ªº Factory¡C¤£¦Pªº¦a¤è¬O¡A
°£¤Fª½±µ new ¨ä¤¤¤@Ó Implementation ¤§¥~¡AÁÙ¦³ newInstance ³oÓ static method
¡AÅý§ÚÌ¥H°Ñ¼Æ¿ï¾Ün¥ÎþÓ Factory¡F³o¸Ìªº newDocumentBuilder method ´N¬O©w¸q
¤¤ªº Factory Method¡C</p>
<p>DocumentBuilder ªº¨¤¦â¬O Builder¡A¦Ó Document ´N¬O³oÓ Builder ªº Product¡C
DocumentBuilder ·|À°§ÚÌÀˬd XML ÀɬO¤£¬O¥¿½Tªº¡A¨Ã¥B§â data ¥H®e©ö¨Ï¥Îªº®æ¦¡
©ñ¶i memory¡C</p> |
package com.munepom.mailapp.dataset;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import javax.activation.DataSource;
import lombok.Data;
/**
*
* MIME Content
* @author nishimura
*
*/
@SuppressWarnings("serial")
@Data
public class MimeContentData implements Serializable {
private String charset = "iso-2022-jp";
private String contentType = "text/plain; charset=iso-2022-jp";
private String <API key> = "7bit";
private String body;
private byte[] rawBody;
private DataSource dataSource;
private String contentFileName;
private String contentMimeType;
private List<MimeContentData> contents;
/**
* default constructor
*/
public MimeContentData(){
// do nothing
}
/**
* base64 true
* @return
*/
public boolean hasRawBody() {
return Objects.nonNull(rawBody);
}
/**
* true
* @return
*/
public boolean hasFile() {
return Objects.nonNull(dataSource);
}
/**
* {@link #contents}
* @param content
*/
public void addContent(MimeContentData content) {
if (Objects.isNull(contents)) {
contents = new ArrayList<>();
}
this.contents.add(content);
}
} |
namespace TwitchBot.Debugger
{
static class DebugError
{
public static string NORMAL_NULL = "cannot be null",
NORMAL_UNKNOWN = "unknown error",
NORMAL_EXCEPTION = "compiler exception",
NORMAL_EXISTS_NO = "does not exist",
NORMAL_EXISTS_YES = "already exists",
NORMAL_SYNTAX = "bad syntax",
NORMAL_PERMANENT = "is permanent",
NORMAL_CONVERT = "could not convert object",
<API key> = "index out of bounds",
NORMAL_DESERIALIZE = "failed to deserialize";
public static string SYNTAX_NULL = "bad syntax, cannot be null",
SYNTAX_UNKNOWN = "bad syntax, unknown error",
<API key> = "bad syntax, cannot contain square brackets",
<API key> = "must be enclosed in square brackets",
SYNTAX_BRACKETS_NO = "bad syntax, cannot contain brackets",
<API key> = "bad syntax, must be enclosed in brackets",
<API key> = "bad syntax, cannot contain equal signs",
SYNTAX_SPACES_NO = "bad syntax, cannot contain spaces",
<API key> = "bad syntax, must be lead by an exclamation point",
SYNTAX_LENGTH = "bad syntax, incorrect length",
<API key> = "bad syntax, cannot contain parenthesis",
<API key> = "bad syntax, must contain parenthesis",
<API key> = "bad syntax, index out of bounds",
SYNTAX_POSITIVE_YES = "bad syntax, value must be positive or zero";
}
} |
<ion-view id="page_artisants">
<ion-nav-title>
{{ 'ARTISANS_TITLE' | translate }}
</ion-nav-title>
<div class="bar bar-subheader item-input-inset">
<label class="item-input-wrapper">
<i class="icon ion-ios-search placeholder-icon"></i>
<input id="searchbar" ng-model="search.name" type="search" placeholder="{{ 'FILTER_SEARCH' | translate }}">
</label>
</div>
<ion-content class="has-subheader">
<ion-refresher
pulling-text="Pull to refresh..."
on-refresh="doRefresh()">
</ion-refresher>
<ion-list>
<ion-item class="item item-thumbnail-left" ng-repeat="artisan in artisans | orderBy:getFilter('app.artisans') | filter: search" href="#/app/artisan/{{artisan.id}}">
<img src="{{artisan.img}}"/>
<h2>{{artisan.name}}</h2>
<p>{{artisan.description}}</p>
</ion-item>
</ion-list>
</ion-content>
<ion-nav-buttons side="right">
<button class="button button-icon button-clear ion-android-funnel" ng-click="openFilter('app.artisans')"></button>
<div id="filtresArtisans" class="filtres hidden">
<ion-list>
<ion-item class="item item-icon-left" ng-click="changeFilter('app.artisans','+name')">
<i class="icon ion-arrow-down-c"></i>
{{ 'FILTER_NAME_AZ' | translate }}
</ion-item>
<ion-item class="item item-icon-left" ng-click="changeFilter('app.artisans','-name')">
<i class="icon ion-arrow-up-c"></i>
{{ 'FILTER_NAME_ZA' | translate }}
</ion-item>
</ion-list>
</div>
</ion-nav-buttons>
</ion-view> |
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_191) on Wed Jun 05 15:47:25 CEST 2019 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Class se.litsec.eidas.opensaml.ext.attributes.impl.BirthNameTypeImpl (eIDAS extension for OpenSAML 3.x - 1.4.0)</title>
<meta name="date" content="2019-06-05">
<link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class se.litsec.eidas.opensaml.ext.attributes.impl.BirthNameTypeImpl (eIDAS extension for OpenSAML 3.x - 1.4.0)";
}
}
catch(err) {
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../../se/litsec/eidas/opensaml/ext/attributes/impl/BirthNameTypeImpl.html" title="class in se.litsec.eidas.opensaml.ext.attributes.impl">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?se/litsec/eidas/opensaml/ext/attributes/impl/class-use/BirthNameTypeImpl.html" target="_top">Frames</a></li>
<li><a href="BirthNameTypeImpl.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="header">
<h2 title="Uses of Class se.litsec.eidas.opensaml.ext.attributes.impl.BirthNameTypeImpl" class="title">Uses of Class<br>se.litsec.eidas.opensaml.ext.attributes.impl.BirthNameTypeImpl</h2>
</div>
<div class="classUseContainer">No usage of se.litsec.eidas.opensaml.ext.attributes.impl.BirthNameTypeImpl</div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../../se/litsec/eidas/opensaml/ext/attributes/impl/BirthNameTypeImpl.html" title="class in se.litsec.eidas.opensaml.ext.attributes.impl">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?se/litsec/eidas/opensaml/ext/attributes/impl/class-use/BirthNameTypeImpl.html" target="_top">Frames</a></li>
<li><a href="BirthNameTypeImpl.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.bottom">
</a></div>
<p class="legalCopy"><small>Copyright &
</body>
</html> |
package com.sortedunderbelly.motomileage;
import java.util.Date;
public interface Trip extends Comparable<Trip> {
String getId();
Date getDate();
String getDesc();
int getDistance();
boolean hasId();
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.