input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
private void build lighting set up a basic default light directional light light new directional light light set diffuse new color rgba 1 0f 1 0f 1 0f 1 0f light set ambient new color rgba 1 0f 1f 1f 1 0f light set direction new vector3f 1 1 0 light set enabled true attach the light to a light state and the light state to root node light state light state display get renderer create light state light state set enabled true light state attach light root node set render state light state
|
creates a light for the terrain
|
private void build lighting set up a basic default light directional light light new directional light light set diffuse new color rgba 1 0f 1 0f 1 0f 1 0f light set ambient new color rgba 1f 1f 1f 1 0f light set direction new vector3f 1 1 0 light set enabled true attach the light to a light state and the light state to root node light state light state display get renderer create light state light state set enabled true light state attach light root node set render state light state
|
creates a light for the terrain
|
public boolean is barrier return true
|
returns true iff the object is a barrier i
|
public object invoke method invocation invocation throws throwable string monitor name monitored helper get monitor name invocation split split simon manager get stopwatch monitor name start try return invocation proceed finally split stop
|
performs method invocation and wraps it with stopwatch
|
public void save tuple t throws sqlexception prepared statement stmt null try stmt conn prepare statement insert into table values populate statement stmt t stmt execute update stmt get connection commit finally close statement stmt
|
inserts tuple into the table
|
public void save list tuple list throws sqlexception prepared statement stmt null try stmt conn prepare statement insert into table values for tuple t list populate statement stmt t stmt add batch stmt execute batch stmt get connection commit finally close statement stmt
|
inserts list of tuples into the table
|
public void perform int runno split split simon manager get stopwatch org javasimon testapp action delete start int no provider no try int deleted new tuple dao conn tuple delete by unique1 no system out println run runno delete action unique1 no deleted deleted catch sqlexception e system err println e get message split stop
|
deletes random record
|
public int delete by unique1 int unique1 throws sqlexception prepared statement stmt null try stmt conn prepare statement delete from table where unique1 stmt set int 1 unique1 int res stmt execute update stmt get connection commit return res finally close statement stmt
|
deletes the tuple by id
|
private int rand int seed int limit do seed generator seed prime while seed limit return seed
|
generate a unique random number between 1 and limit
|
public void order splits splits set new array list split
|
initializes thread local list for splits which instructs the callback to accumulate splits
|
public void stopwatch start split split if controller null split get stopwatch get name equals controller order splits
|
if controller is set this method orders splits
|
public void stopwatch stop split split list split split list splits get if controller null split get stopwatch get name equals controller system out println splits get splits else if split list null split list add split
|
adds the split into the thread local list if the list was initialized
|
public void run while true stopwatch stopwatch simon manager get stopwatch sampled stopwatch system out println nstopwatch stopwatch system out println stopwatch sample stopwatch sample todo uncomment this if you want of course commment the line above system out println stopwatch sample stopwatch sample and reset try thread sleep 10000 catch interrupted exception e e print stack trace
|
method implementing the code of the thread
|
protected string construct object name simon simon return simon get name type simon type simon
|
constructs jmx object name from simon object
|
protected string simon type simon simon string type simon info unknown if simon instanceof counter type simon info counter else if simon instanceof stopwatch type simon info stopwatch return type
|
returns type of the simon as defined in
|
protected void save reset timestamp reset timestamp system current time millis
|
saves the timestamp when the simon was reset
|
public void message string message system out println simon message message
|
prints the message to the standard output
|
public void warning string warning exception cause if warning null system err println simon warning warning if cause null cause print stack trace
|
warning and stack trace are print out to the error output
|
private void update usages long now last usage now if first usage 0 first usage last usage
|
updates usage statistics
|
public boolean matches string name if name null return pattern equals if all null return all equals name if middle null return name contains middle if start null name starts with start return false return end null name ends with end
|
checks if simon name matches this pattern
|
public void set attribute string name object value if attributes null attributes new hash map string object attributes put name value
|
stores an attribute in this simon
|
public stopwatch get stopwatch return stopwatch
|
returns the stopwatch that this split is running for
|
public long stop if enabled start 0 total stopwatch impl stopwatch stop this start start 0 return total return 0
|
stops the time split and returns split time
|
public string present running for return simon utils present nano time running for
|
returns printable form of how long this split was running for
|
public void clear configs new linked hash map simon pattern simon configuration
|
clears any previously loaded configuration
|
public long get first usage return first usage
|
timestamp of the first usage from the sampled simon
|
public string get first usage as string return simon utils present timestamp first usage
|
timestamp of the first usage from the sampled simon as a formatted string
|
public void set first usage long first usage this first usage first usage
|
sets the timestamp of the first usage from the sampled simon
|
public long get last usage return last usage
|
timestamp of the last usage from the sampled simon
|
public string get last usage as string return simon utils present timestamp last usage
|
timestamp of the last usage from the sampled simon as a formatted string
|
public void set last usage long last usage this last usage last usage
|
sets the timestamp of the last usage from the sampled simon
|
public long get last reset return last reset
|
timestamp of the last reset from the sampled simon
|
public string get last reset as string return simon utils present timestamp last reset
|
timestamp of the last reset from the sampled simon as a formatted string
|
public void set last reset long last reset this last reset last reset
|
sets the timestamp of the last reset from the sampled simon
|
private void set property callback callback string property string value try if value null method setter callback get class get method setter name property string class setter invoke callback value else callback get class get method setter name property invoke callback catch no such method exception e throw new simon exception e catch illegal access exception e throw new simon exception e catch invocation target exception e throw new simon exception e
|
sets the callback property
|
public void add callback callback callback if initialized callback initialize callbacks add callback
|
adds another callback as a child to this callback
|
public void remove callback callback callback callbacks remove callback if initialized callback cleanup
|
removes specified callback from this callback
|
public void initialize initialized true for callback c callbacks try c initialize catch exception e warning initialization error e
|
calls initialize on all children
|
public void cleanup initialized false for callback c callbacks try c cleanup catch exception e warning deactivation error e
|
calls deactivate on all children
|
public simon pattern get pattern return pattern
|
retruns the simon pattern of this rule
|
public string get note return null
|
returns note for the simon
|
public void set note string note
|
sets note for the simon
|
public simon state get state return state
|
returns simon state for this configuration item
|
private void update usages long now nanos if first usage 0 first usage system current time millis first usage nanos now nanos last usage first usage now nanos first usage nanos simon utils nanos in millis
|
updates usage statistics
|
public void stopwatch start split split logger log level simon start split get stopwatch
|
logs simon start on a sprecified log level
|
public void stopwatch stop split split logger log level simon stop split get stopwatch split running for
|
logs simon stop on a specified log level
|
public void warning string warning exception cause logger log level simon warning warning cause
|
logs the warning on a specified log level
|
public string process final string in if repeat until unchanged string ret val in string old while old equals ret val old ret val ret val from matcher ret val replace all to return ret val return from matcher in replace all to
|
processes input replaces all as expected and returns the result
|
public void stopwatch start split split system out println start split split
|
prints split at the start of the split
|
public void stopwatch stop split split system out println stop split split
|
prints split at the stop of the split
|
public long get peak return peak
|
getter for max active count
|
public long get peak time return peak time
|
getter for peak time
|
public long get opened return opened
|
getter for count of opened objects conn stmt rset
|
public long get closed return closed
|
getter for count of closed objects conn stmt rset
|
public string get real url return real url
|
returns orignal jdbc url without any simon stuff
|
public string get normalized sql return normalized sql
|
returns the normalized sql
|
public string get real driver return real driver
|
return real driver fully classname
|
public string get prefix return prefix null default prefix prefix
|
returns prefix for hierarchy of jdbc related simons
|
protected string get simon name http servlet request request string builder name new string builder request get request uri replace all replace for int i 0 i name length i if name char at i name delete i name length break if simon utils allowed chars index of name char at i 1 name delete char at i i return name to string replace all replace all
|
returns simon name for the specified http request
|
public population next if this population null this population new population gauge engine init population this bits this fp else this population this population evolve new gauge evolution return this population
|
return the next generation of the current population
|
public void to file string path throws file not found exception ioexception file arq new file path file output stream stream new file output stream arq stream write get body get bytes
|
escreve o atributo body numa arquivo
|
public uniform type get type return type
|
get the value type of this uniform
|
public int get mipmap level return mipmap level
|
return the mipmap level used to select a mipmap from the layer specifed
|
public int get xoffset return x
|
return the x offset of this region within the image block
|
public int get yoffset return y
|
return the y offset of this region within the image block
|
public int push t change if change null throw new null pointer exception change cannot be null latest changes add last new versioned change t change version if latest changes size max change queue size latest changes remove first return version
|
push the given change to the end of this queue
|
public int get zoffset return z
|
return the z offset of this region within the image block
|
public boolean is packed format return is packed
|
return true if this format has its color components packed into a single
|
public t get latest change return latest changes is empty null latest changes get last change
|
return the last queued change representing the newest or most recent
|
public int get num components return num c
|
return the number of components representing the color
|
public boolean is version stale int last known version return version last known version last known version 0 version 0
|
return true if the provided version is older than the current version of
|
public boolean has lost changes int last known version if latest changes is empty return last known version version max change queue size if the input version is over 1 version behind the last stored version a change has been dropped so the input version is too old return version latest changes get first version 1
|
return true if so many changes have been pushed since
|
public int get primitives per color return p per c
|
get the number of primitive elements per each color element
|
public int clear latest changes clear return version increment version just in case
|
remove all queued changes and increment the version
|
public boolean is compressed return p per c 0
|
whether or not this texture has image data that is client compressed
|
public buffer data get data int level return levels level
|
return the current buffer data at the requested level
|
public boolean has alpha return has alpha
|
whether or not this texture has image data with alpha values
|
public data type get supported type return type
|
return the data type that is required by the texture format
|
public boolean is type valid data type type if type null throw new null pointer exception type cannot be null if this type null return true else return this type equals type
|
whether or not the data type is supported by this format
|
public color3f set read only color3f color return set color get red hdr color get green hdr color get blue hdr
|
copy the color values from tt color tt into this color
|
public color3f set float red float green float blue return set red red set green green set blue blue
|
set this color to use the given red green and blue values
|
public color3f set red float red return set value red red
|
set the red component value to tt blue tt
|
public color3f set green float green return set value green green
|
set the green component value to tt blue tt
|
public color3f set blue float blue return set value blue blue
|
set the blue component value to tt blue tt
|
public mutable matrix3f inverse return inverse this
|
inverse this matrix in place equivalent to
|
public mutable quat4f add read only quat4f q mutable quat4f result return add q get x q get y q get z q get w result
|
add the quaternion tt q tt to this quaternion component wise and
|
public mutable vector4f normalize return normalize this
|
normalize this vector in place equivalent to
|
public mutable vector4f set int index float val switch index case 0 return set x val case 1 return set y val case 2 return set z val case 3 return set w val default throw new index out of bounds exception index must be in 0 3
|
set the vector coordinate at index to the given value
|
public color3f set int index float value if index 0 index 3 return set value value index else throw new index out of bounds exception illegal index must be in 0 2 not index
|
set the component at tt index tt to the given value
|
public mutable quat4f sub read only quat4f q mutable quat4f result return sub q get x q get y q get z q get w result
|
subtract the quaternion tt q tt from this quaternion component wise
|
public float length squared return get x get x get y get y get z get z
|
compute the length of this vector squared
|
public float determinant float t1 get 1 1 get 2 2 get 1 2 get 2 1 float t2 get 1 0 get 2 2 get 1 2 get 2 0 float t3 get 1 0 get 2 1 get 1 1 get 2 0 return get 0 0 t1 get 0 1 t2 get 0 2 t3
|
compute and return the determinant for this matrix
|
public float distance read only vector3f v return float math sqrt distance squared v
|
compute the distance between this vector and tt v tt treating both
|
public mutable matrix3f transpose return transpose this
|
transpose this matrix in place equivalent to
|
public mutable quat4f mul read only quat4f q mutable quat4f result if result null result new quat4f return result set get w q get x get x q get w get y q get z get z q get y get w q get y get y q get w get z q get x get x q get z get w q get z get z q get w get x q get y get y q get x get w q get w get x q get x get y q get y get z q get z
|
multiply this quaternion by the quaternion tt q tt
|
public float distance squared read only vector3f v float dx get x v get x float dy get y v get y float dz get z v get z return dx dx dy dy dz dz
|
compute the square of the distance between this and tt v tt treating
|
public mutable quat4f mul read only vector3f v mutable quat4f result if result null result new quat4f return result set get w v get x get y v get z get z v get y get w v get y get z v get x get x v get z get w v get z get x v get y get y v get x get x v get x get y v get y get z v get z
|
multiply this quaternion by the quaternion implicitly formed by
|
public mutable matrix3f set col int col float values int offset return set 0 col values offset set 1 col values offset 1 set 2 col values offset 2
|
set the given matrix column to the values in the values array starting
|
public float angle read only vector3f v return float math acos dot v length v length
|
compute and return the shortest angle between this vector and v
|
public mutable matrix3f set col int col read only vector3f values return set 0 col values get x set 1 col values get y set 2 col values get z
|
set the given matrix column to the three values stored in the vector
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.