input
stringlengths
10
828
output
stringlengths
5
107
public void delete tb order entity log util log deleting tb order instance level info null try entity entity manager get reference tb order class entity get orderid entity manager remove entity log util log delete successful level info null catch runtime exception re log util log delete failed level severe re throw re
delete a persistent tb order entity
public void init throws servlet exception put your code here default feed type get servlet config get init parameter default feed type default feed type default feed type null default feed type atom 0 3
initialization of the servlet
public void execute special sql string sql object params throws exception try this engine execute special sql sql params this engine commit catch exception ex this engine rollback log error this class name ex throw new exception this class name ex finally this engine close engine
execute special sql
public connection get connection l conn close class inter java sql connection class connection conn2 null conn2 connection proxy new proxy instance conn get class get class loader inter this return conn2
returns the conn
public string get original by alias string alias return string this alias get alias
method get original by alias
public result map get result map by id string id return result map result map list get id
method get result map by id
public statement config get select by id string id return statement config select list get id
method get select by id
public statement config get insert by id string id return statement config insert list get id
method get insert by id
public statement config get update by id string id return statement config update list get id
method get update by id
public itable info sql get table info sql return null
method get column info sql
public iselect sql get select sql return null
method get select sql
public iversion sql get version sql return null
method get version sql
public engine get engine throws speed framework exception return default engine get proxy this data soruce this type
spring application context
private connection connection manager string type throws speed exception return this connection manager type
connection manager by type
public void set use cache status boolean status this use cache status
set user cache
public int get max count string sql object params throws speed exception this check sql params string type sqlhelper get data base type con string count sql sqlhelper get count sql type sql return execute get data count count sql params use cache
get max count
public string get sql string buffer sql new string buffer 50 string table name string utils get excute table name this table object get class sql append select c from sql append sys syscolumns c sys systables t where t tableid c referenceid and t tablename upper sql append table name sql append order by c columnnumber return sql to string
apache derby systables syscolumns br
public void test execute function call object params new integer 0 object obj engine execute function call sql params java sql types varchar log info obj
test execute function call
protected speed template create speed template string connection factory id return new speed template connection factory id
create a speed template for the given connection factory id
public void set connection factory id string connection factory id this connection factory id connection factory id
set the connection factory id to obtain engines from
public speed system exception convert speed access exception string sql exception ex return engine factory utils convert speed access exception speed operation sql ex
convert the given speed exception to an appropriate exception from the
protected void do commit engine engine string sql throws speed system exception logger debug invoking commit on engine engine factory utils to string engine commit engine when finished normally try engine commit catch speed exception ex throw convert speed access exception sql ex
execute after successful completion of call
protected void do rollback engine engine string sql throwable ex throws speed system exception logger debug invoking rollback on engine engine factory utils to string engine due to throwable ex try rollback this engine engine rollback catch speed exception se logger error application exception overridden by rollback exception se throw convert speed access exception sql se catch runtime exception rte logger error application exception overridden by rollback exception rte throw rte catch error err logger error application exception overridden by rollback error err throw err
perform a rollback handling rollback exceptions properly
public void set expose native engine boolean expose native engine this expose native engine expose native engine
set whether to expose the native speed engine to speed callback
public void set fetch index int fetch index this fetch index fetch index
set the fetch index for this speed template
protected engine create engine proxy engine engine return engine proxy new proxy instance get class get class loader new class engine class new close suppressing invocation handler engine
create a close suppressing proxy for the given speed engine
public void append role info pojo throws exception engine engine null try engine this get base engine engine save pojo engine commit catch exception ex engine rollback log error ex throw ex finally engine close engine
append role info
public void update role info role info ri throws exception engine engine null try engine this get base engine ri set inputdate new java sql date engine update ri engine commit catch exception ex engine rollback log error ex throw ex finally engine close engine
update role info
public object load final class pojo class final serializable id throws speed system exception if pojo class null throw new speed system exception pojo class must not be null if id null throw new speed system exception id must not be null logger debug loading pojo pojo class get name with id id to string class load speed callback implements speed callback public object do in speed engine engine throws speed exception return engine load pojo class id return execute new load speed callback true
return the persistent instance of the given entity class
public object update final object pojo throws speed system exception if pojo null throw new speed system exception pojo must not be null logger debug updating pojo pojo class update speed callback implements speed callback public object do in speed engine engine throws speed exception return engine update pojo return execute new update speed callback true
update the given persistent instance
public object save final object pojo throws speed system exception if pojo null throw new speed system exception pojo must not be null logger debug saving pojo pojo class save speed callback implements speed callback public object do in speed engine engine throws speed exception return engine save pojo return execute new save speed callback true
persist the given transient instance
public void delete final object pojo throws speed system exception if pojo null throw new speed system exception pojo must not be null logger debug deleting pojo pojo class delete speed callback implements speed callback public object do in speed engine engine throws speed exception engine delete pojo return null execute new delete speed callback true
delete the given persistent instance
public void execute batch final string sql final object params throws speed system exception if sql null throw new speed system exception sql must not be null if params null throw new speed system exception parameters must not be null logger debug executing batch with sql sql class execute batch speed callback implements speed callback sql provider public object do in speed engine engine throws speed exception engine execute batch sql params return null public string get sql return sql execute new execute batch speed callback true
execute a batched sql statement binding a
public void execute special sql final string sql final object params throws speed system exception if sql null throw new speed system exception sql must not be null if params null throw new speed system exception parameters must not be null logger debug executing special sql sql class execute special sqlspeed callback implements speed callback sql provider public object do in speed engine engine throws speed exception engine execute special sql sql params return null public string get sql return sql execute new execute special sqlspeed callback true
execute a special sql statement binding a
public void execute procedure call final string sql final object params throws speed system exception if sql null throw new speed system exception sql must not be null if params null throw new speed system exception parameters must not be null logger debug executing procedure call sql sql class execute procedure call speed callback implements speed callback sql provider public object do in speed engine engine throws speed exception engine execute procedure call sql params return null public string get sql return sql execute new execute procedure call speed callback true
execute a callable statement binding a
public int get max count string sql object params throws speed exception this check sql params string type sqlhelper get data base type con string count sql sqlhelper get count sql type sql string count sql pa get count sql sql to string execute select con count sql params use cache pa object rlist execute select con count sql params null use cache pa to array map map map rlist 0 return integer parse int map get count to string
get max count
public ipackage fragment root get ipackage fragment root return i package fragment root
return i package fragment root
public string get drive class name return drive class name
return drive class name
public void set drive class name string drive class name this drive class name drive class name
drive class name
public string get sequences final string seq name throws speed system exception if seq name null throw new speed system exception sequence name must not be null logger debug getting sequences for seq name class get sequences speed callback implements speed callback public object do in speed engine engine throws speed exception return engine get sequences seq name return string execute new get sequences speed callback true
retrieve the sequences of oracle database
public string get host ip return host ip
return host ip
public string get speed id return speed id
return speed id
public void init iworkbench workbench set preference store platform ui get preference store
iworkbench preference page
public list get article byid article at throws exception list list null engine engine null try engine base engine get forum engine query qy engine get query string parm at get forumclassid at get articleid string sql select from article where forumclassid and rootid order by rootid desc depth fatherid articleid list qy get results sql parm article class catch exception ex throw ex finally engine close engine return list
get article byid
protected void prepare engine engine engine engine set use cache status get use cache
prepare the given speed engine applying engine settings such as cache status
protected void prepare query query query object if get fetch index 0 query object set index get fetch index if get max results 0 query object set max results get max results query object set use cache status get use cache
prepare the given query object applying cache settings and or
public int get max count string sql object params throws speed exception this check sql params string type sqlhelper get data base type con string count sql sqlhelper get count sql type sql return execute get data count con count sql params use cache
get max count
public void next section section curr frame 0 start
gets next section number
public void erase point a point b map a x a y 0 map b x b y 0 rest checkers 2 switch section case 1 non move break case 2 to top to top a b break case 3 to bottom to bottom a b break case 4 to left to left a b break case 5 to right to right a b break case 6 to side horizontally to side horizontally a b break case 7 to side vertically to side vertically a b break
erases two points which are match
public void splash to menu display set current new menu screen this
splash screen to menu screen
public void start game game screen start display set current game screen
starts new game
public void menu to level selection display set current new level selection screen this
menu screen to level selection screen
public void menu to configuration display set current new configuration screen this
menu screen to configuration screen
public void menu to introduction display set current new introduction screen this
menu screen to introduction screen
public void screen to menu display set current new menu screen this
other screen to menu screen
public void level selection to menu init display set current new menu screen this
level selection screen to menu screen
public void splash screen painted new thread this start
calls when the first time splash screen painted
public void game end string title int state game screen stop display set current new game end screen this title state
when wins game goto end screen
public void alert tool string msg alert alert new alert msg null alert type info alert add command ok alert add command back alert set command listener new command listener public void command action command cmd displayable displayable display set current game screen game screen start pause false game screen stop pause true display set current alert
shows a alert for using tools
public void alert game to menu alert alert new alert null alert type confirmation alert add command ok alert add command back alert set command listener new command listener public void command action command cmd displayable displayable if cmd ok game to menu else if cmd back display set current game screen game screen start pause false game screen stop pause true display set current alert
alerts message for game screen to menu screen
public string evaluate string input throws piperexception string output1 piper evaluate input string output2 output collector to string output collector delete 0 output collector length return output1 n output2
use this method to pass an expression to the piper interpreter
public boolean is empty return this empty list
test for empty list
public clist rest int n todo return null
result is the same as rest
public e first return e get 0
get the value at first position
public int hash code if hash 0 return hash int sum 0 todo use explicit stack instead of recursion for traversal if next null sum next hash code if a0 null sum sum a0 hash code if a1 null sum sum a1 hash code if a2 null sum sum a2 hash code if a3 null sum sum a3 hash code if sum 0 sum 1 hash sum return hash
returns the hash code
public t value if result blackhole synchronized this if result blackhole result f get arg f null arg null if synchronized f null arg null return t result
computes the value
public boolean blackhole return result blackhole
returns true if the value is still blackholed
private void set add big integer x int y if x words null set long x ival long y return int len x ival realloc len 1 long carry y for int i 0 i len i carry x words i 0xffffffff l words i int carry carry 32 if x words len 1 0 carry words len int carry ival words needed words len 1
set this to the sum of x and y
private void set long y int i int y if i y ival i words null else realloc 2 words 0 i words 1 int y 32 ival 2
destructively set the value of this to a long
private void set int words int length this ival length this words words
destructively set the value of this to the given words
private void set big integer y if y words null set y ival else if this y realloc y ival system arraycopy y words 0 words 0 y ival ival y ival
destructively set the value of this to that of y
public int signum int cmp this compare to zero if cmp 0 return 1 else if cmp 0 return 0 else return 1
returns 1 1 for negative positive numbers and 0 for zero
static public big number create string a string int a base precision int a base 10 return yacas big number create a string a base precision a base
create number from string
static public big number create int p precision long value return yacas big number create p precision value
create number from long integer
static public big number create int p precision int value return yacas big number create p precision value
create number from integer
static public big number create int p precision double value return yacas big number create p precision value
create number from double
private void set negative big integer x int len x ival if x words null if len integer min value set long len else set len return realloc len 1 if negate words x words len words len 0 ival len
destructively set this to the negative of x
public big integer and big integer y if y words null return and this y ival else if words null return and y ival big integer x this if ival y ival big integer temp this x y y temp int i int len y is negative x ival y ival int words new int len for i 0 i y ival i words i x words i y words i for i len i words i x words i return make words len
return the logical bit wise and of two big integers
public big integer or big integer y return bit op 7 this y
return the logical bit wise inclusive or of two big integers
public big integer xor big integer y return bit op 6 this y
return the logical bit wise exclusive or of two big integers
public big integer not return bit op 12 this zero
return the logical bit wise negation of a big integer
public mod integer remainder mod integer s if s null s is zero throw new runtime exception this get class get name division by zero if s is one return ring get zero if s is unit return ring get zero return new mod integer ring val remainder s val
mod integer remainder
public string to script python case string s primary to script prime to string if exponent 0 return s else return s exponent
get a scripting compatible string representation
public double get degrees of freedom p return p
returns the degrees of freedom p
public double get degrees of freedom q return q
returns the degrees of freedom q
public double probability double x check range x if x 0 0 x 1 0 return 0 0 return math exp special math log beta p q p 1 0 math log x q 1 0 math log 1 0 x
probability density function of a beta distribution
public double cumulative double x check range x return special math incomplete beta x p q
cumulative beta distribution function
public double inverse double probability check range probability if probability 0 0 return 0 0 if probability 1 0 return 1 0 return find root probability 0 5 0 0 1 0
inverse of the cumulative beta distribution function
public int get trials parameter return n
returns the number of trials
public double get mean return special math gamma 1 0 1 0 shape
returns the mean
public double get probability parameter return p
returns the probability
public double get variance return special math gamma 1 0 2 0 shape get mean get mean
returns the variance
public double get mean return n p
returns the mean
public double probability double x check range x 0 0 double max value final double xpow shape math pow x shape return shape xpow shape x math exp xpow shape
probability density function of a weibull distribution
public double get variance return n p 1 0 p
returns the variance
public double cumulative double x check range x 0 0 double max value return 1 0 math exp math pow x shape
cumulative weibull distribution function
public double probability double x check range x 0 0 n return extra math binomial n x math pow p x math pow 1 0 p n x
probability density function of a binomial distribution
public double inverse double probability check range probability return math pow math log 1 0 probability 1 0 shape
inverse of the cumulative weibull distribution function
public double cumulative double x check range x 0 0 n double sum 0 0 for double i 0 0 i x i sum probability i return sum
cumulative binomial distribution function
public double probability double x check range x 0 0 double max value final double y q q p x return beta probability 1 0 y y y p q
probability density function of an f distribution