input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public void set answer string text this answer text | sets the answer text |
public void set correct boolean is correct this is correct is correct | sets the correct flag |
public boolean get correct return is correct | returns whether this is the correct answer or not |
public string get question id return m question id | get the question identifier |
public string get question return m question | get the question string |
public string get note return m note | get the reference note associated with the question if any |
public answer list get answers return m answers | gets the list of possible answers for this question |
public int value return ordinal | returns the value associated with this enumeration |
public iterator iterator return new enum iterator | returns the iterator for this enumeration |
public iterator iterator start return new enum iterator this | returns the iterator for this enumeration starting with the specified |
private void init components get content pane set layout new java awt grid layout 1 0 | this method is called from within the constructor to |
public void uninstall m game controller stop game m desktop pane remove m game screen m desktop pane remove m score screen m desktop pane remove m lifeline timer frame | uninstalls this subset from the system |
public void game timer action performed game timer event evt if evt get type game timer event timer elapsed | called when a game timer event occurs |
public void append string text m text append text m vert scroll bar set value m vert scroll bar get maximum m vert scroll bar get visible amount | returns the jtext area contained in this frame |
private void exit form java awt event window event evt confirm program exit | exit the application |
public void set current level int number if m restricted throw new unsupported operation exception restricted mode if number 0 number 0 else if number m game config get num levels number m game config get num levels m current level number return | set the current question level number |
public void game timer action performed game timer event evt if evt get type game timer event timer elapsed update the lifeline clock m event packet set type game update enum game update lifeline clock m event packet set lifeline timer time m lifeline timer get time m packet processor process event packet m event packet do it play the time s up sound m sound player load sound sound idenum lifeline time up sound player effects channel false m sound player start sound player effects channel | called when a game timer event occurs |
public double get int index return data array index | get the element by index |
public void set int index double value data array index value | set the element by index |
public int find first of double key int res 1 for int i 0 i vector size i if get i key res i break return res | search the number in vector |
public int find last of double key int res 1 for int i vector size i 0 if get i key res i break return res | search the number in vector |
public vector multiply double number vector res new vector vector size for int i 0 i vector size i res set i get i number return res | multiply vector on number |
public vector add vector vec vector res new vector vector size for int i 0 i vector size i res set i get i vec get i return res | add vector to vector |
public void sort quick sort 0 vector size 1 | sort vector using quick sort algorithm |
public void silent status changed servo controller controller boolean mode mode label set text mode active setup | react to the notification from the |
private void reposition servos throws ioexception now that we ve taken care of the range let s reset the servo position repositioning now true try for iterator servo i get servos i has next ft639 servo s ft639 servo i next s set actual position s get position finally repositioning now false | make sure that the servos are at the places theyre supposed to be |
protected boolean is only vt fixme this may be a problem for advanced servo since we have to identify two product ids check the code return protocol handler map size 1 | is this class handling only one type of a device |
public void item state changed item event e if e get source silent box boolean selected e get state change item event selected vt fixme servo silent support has to be implemented first try servo set silent mode selected catch ioexception ioex logger warn unhandled exception ioex vt fixme reflect the changes on the silent label | react to checkbox status changes |
private void too many devices set usb device found throws ioexception usb exception string message no port name specified multiple phidget servo devices found for iterator usb device i found iterator i has next usb device next i next string serial next get serial number string message serial throw new ioexception message | unconditionally throw the code ioexception code |
public boolean is bootable return false | whether a device is bootable |
public boolean has next return target has next | returns code true code if the iteration has more elements |
public void silent status changed servo controller controller boolean mode silent label set text mode active sleeping | react to the notification from the |
public t next return target next | returns the next element in the iteration |
public void remove throw new unsupported operation exception can t remove an item from under immutable iterator | throws code unsupported operation exception code exception |
private void set position double position int i position int math round position precision 1 view slider set value i position double requested position target get position precision 1 position label set text integer to string i position math round requested position | reflect the change in actual position |
public void state changed change event e object source e get source if source control slider int position control slider get value try target set position double position double precision 1 catch throwable t system err println servo set position t print stack trace | react to the slider events |
public void item state changed item event e if e get source silent box boolean selected e get state change item event selected try controller set silent mode selected catch ioexception ioex ioex print stack trace if selected timeout slider set enabled true heartbeat slider set enabled true else silent label set text active timeout slider set enabled false heartbeat slider set enabled false | react to checkbox status changes |
public void state changed change event e int timeout timeout slider get value int heartbeat heartbeat slider get value controller set silent timeout timeout 1000 heartbeat 1000 timeout slider set border border factory create titled border timeout timeout heartbeat slider set border border factory create titled border heartbeat heartbeat | react to the slider events |
public void item state changed item event e if e get source enable box enabled enabled control slider set enabled enabled transition combo box set enabled enabled mapper combo box set enabled enabled | react to the checkbox events |
public void action performed action event e if demo null demo interrupt return if e get source reset button new thread new reset start else if e get source swing demo button demo new thread new swing demo start else if e get source clock demo button demo new thread new clock demo start else if e get source wave demo button demo new thread new swing demo start | react to the button presses |
public void position changed servo source double position this notification doesn t have to be visibly reflected system err println position requested position | accept the notification about the change in the requested position |
public void actual position changed servo source double position set position position | accept the notification about the change in the actual position |
public void item state changed item event e if e get source silent box boolean selected e get state change item event selected vt fixme servo silent support has to be implemented first try servo set silent mode selected catch ioexception ioex ioex print stack trace vt fixme reflect the changes on the silent label | react to checkbox status changes |
public string get name return get target get name | get the name |
public void allow disconnect boolean disconnected this disconnected disconnected | disable or enable the controller driver disconnected mode |
public boolean is disconnect allowed return disconnected | check the disconnected mode |
public void item state changed item event e if e get source silent box boolean selected e get state change item event selected try controller set silent mode selected catch ioexception ioex logger warn unhandled exception ioex if selected timeout slider set enabled true heartbeat slider set enabled true else silent label set text active timeout slider set enabled false heartbeat slider set enabled false | react to checkbox status changes |
public void state changed change event e object source e get source if source control slider int position control slider get value try target set position double position double precision 1 catch throwable t logger error servo set position t | react to the slider events |
public void position changed servo source double position this notification doesn t have to be visibly reflected logger debug position requested position | accept the notification about the change in the requested position |
public void init filter config config throws servlet exception this parse tags to sessionize config get init parameter tags to sessionize this parse debug config get init parameter debug | initialize this url rewriting filter instance by parsing the init parameters |
public void reset buffer if urf writer wrapper null urf writer wrapper recycle node match urf writer wrapper recycle state base response reset buffer | recycles the state of the url rewriting writer instance |
public void destroy blank method | tear down this filter |
public void reset if urf writer wrapper null urf writer wrapper recycle node match urf writer wrapper recycle state base response reset | recycles the state of the url rewriting writer instance |
private void parse debug string debug string throws servlet exception if debug string null debug string 0 try debug integer parse int debug string catch number format exception e throw new servlet exception url rewriting filter illegal argument exception occured while parsing debug | parsing method for debug |
public void recycle state this state scan state this node match length 0 this url new string buffer this is url quoted false this attr to match 0 | recycles the current internal state |
public string get reference string string builder retval new string builder identifiable target null for identifiable i reference list if target null target i retval append i get id retval append if retval length 0 retval append target get id return retval to string | constructs a string representation of the reference loop |
public void add java option final string opt this add java options collections singleton list opt | options to be passed into the jvm |
protected boolean can equal object other return other instanceof abstract check | this method is used to determine if the instance provided by the |
protected boolean eval equals object x object y return x equals y | test if the two parameters should be equal |
public file get definition xml file return definition xml file | returns the pathname of the oval definition file to use |
public void set definition xml file file definition xml file this definition xml file definition xml file | specifies the pathname of the oval definition file to use |
public file get output systems characteristics file return output systems characteristics file | returns the pathname of the file to which collected configuration data is |
public void set output systems characteristics file file output systems characteristics file this output systems characteristics file output systems characteristics file | specifies the pathname of the file to which collected configuration data is |
public result evaluate cpefact reference ref cpename source ref get referenced cpe collection cpename target list existing cpes result retval result false for cpename target target list boolean superset cpename matcher is superset source get well formed name target get well formed name if superset retval result true break return retval | from nist ir 7698 section 7 |
public file get results file return results file | returns the pathname of the file to which analysis results are to be |
public result evaluate check fact reference ref throws cpelanguage evaluation exception check check ref get check check result check result check results get check result check checked item result checking result check result get result return normalize results checking result | from nist ir 7698 section 7 |
public void set results file file results file this results file results file | specifies the pathname of the file to which analysis results are to be |
public file get external variable file return external variable file | returns the pathname of the external variable file to use |
public void set external variable file file external variable file this external variable file external variable file | specifies the pathname of the external variable file to use |
public void set evaluate definition ids list string evaluate definition ids this evaluate definition ids evaluate definition ids | specifies a set of oval definition ids to evaluate in the input oval |
public boolean is perform schematron validation return perform schematron validation | if set run schematron validation on the input oval definitions document |
public void set perform schematron validation boolean perform schematron validation this perform schematron validation perform schematron validation | if set run schematron validation on the input oval definitions document |
public file get schematron validation stylesheet return schematron validation stylesheet | return the pathname of the oval definitions schematron |
public void set schematron validation stylesheet file schematron validation stylesheet this schematron validation stylesheet schematron validation stylesheet | specifies the pathname of the oval definitions schematron |
public file get input systems characteristics file return input systems characteristics file | returns the pathname of a system characteristics file that is to be |
public void set input systems characteristics file file input systems characteristics file this input systems characteristics file input systems characteristics file | specifies the pathname of a system characteristics file that is to be |
public boolean is verify definitions file md5 hash return verify definitions file md5 hash | run without requiring an md5 checksum |
public void set verify definitions file md5 hash boolean verify definitions file md5 hash this verify definitions file md5 hash verify definitions file md5 hash | run without requiring an md5 checksum |
public boolean is apply xslstylesheet to results return apply xslstylesheet to results | if set do not apply the xsl to the oval results xml |
public void set apply xslstylesheet to results boolean apply xslstylesheet to results this apply xslstylesheet to results apply xslstylesheet to results | if set do not apply the xsl to the oval results xml |
public file get results xslstylesheet file return results xslstylesheet file | returns the pathname of the xsl file which should be used to |
public void set results xslstylesheet file file results xslstylesheet file this results xslstylesheet file results xslstylesheet file | specifies the pathname of the xsl file which should be used to |
public file get results xsloutput file return results xsloutput file | returns the pathname of the file which xsl transform results are to be |
public void set results xsloutput file file results xsloutput file this results xsloutput file results xsloutput file | specifies the pathname of the file which xsl transform results are to be |
public void open file string filename string type throws file not found exception ioexception this type type this filename filename system out println filename this filename if type equals ignore case read br new buffered reader new file reader filename eof false else if type equals ignore case write bw new buffered writer new file writer filename false eof true else if type equals ignore case append bw new buffered writer new file writer filename true eof true else throw new ioexception text file invalid type type | creates new text file |
public string read line throws ioexception string line line br read line if line null eof false check if there is any more to read if br mark supported true br mark 256 if br read line null eof true br reset else eof true return line | this returns a string or nothing if eof reached |
public color get colour return color yellow | this can be over ridden to choose a dif colour |
public void has collided with server object o throws ioexception if o instanceof server person if this side o side this combat o | make sure attackers and defenders have equal chance as troops will only |
protected void show to player int p throws ioexception if this side server players p side this invisible timer 0 do not show if invisible return else super show to player p | this overrides the function in server object to take into account invisibles |
protected void draw extra graphics g int x int y if this undead g set color color dark gray g draw rect x y this rect width this rect height if this frozen g set color color cyan brighter g draw rect x y this rect width this rect height if this invisible g set color color white g draw line x y x y 15 | this can be over ridden to draw anything special |
private boolean move xby angle double angle rads boolean extra move throws ioexception double off x math sin angle rads double this speed if extra move if off x 0 off x double this speed off x else off x double this speed off x return move xby dist off x | returns whether succesful or not |
private boolean move yby angle double angle rads boolean extra move throws ioexception double off y math cos angle rads double this speed if extra move if off y 0 off y double this speed off y else off y double this speed off y return move yby dist off y | returns whether succesful or not |
public boolean is traversable throws ioexception if can traverse server get map square from pixel coords rect x rect y type if can traverse server get map square from pixel coords rect x rect width rect y type if can traverse server get map square from pixel coords rect x rect y rect height type if can traverse server get map square from pixel coords rect x rect width rect y rect height type return true else return false else return false else return false else return false | this returns true if it is traversable |
public boolean test magic resistance int z ssmith lang functions rnd 0 this magic resistance return z 0 | this returns false if they failed |
public void delete image string stmt try query delete query stmt con get connection closing connection con close connection catch exception se system err println se end of delete image | the method delete an image in the database |
public vector get column string table string column connection con vector vec new vector result set result null try synchronized lock con clear warnings stmt con create statement string select select column from table order by column result stmt execute query select while result next vec add result get object 1 stmt close catch sqlexception se dbconnect show msg get column sql se get message return null catch exception e dbconnect show msg get column general e get message return null return vec end of get column | the method return a cloumn from a table ordered |
public boolean delete query string query connection con try synchronized lock con clear warnings stmt con create statement int rows stmt execute update query stmt close catch sqlexception se dbconnect show msg delete query sql se get message return false catch exception e dbconnect show msg delete query general e get message return false return true end of delete query | the method excecute a delete query to the database |
public boolean update query string query connection con try synchronized lock con clear warnings stmt con create statement creating statment getting result from db stmt execute update query stmt close return true catch sqlexception se dbconnect show msg update query sql se get message return false catch exception e dbconnect show msg update query general e get message return false end of update query | the method execute an update query |
public boolean insert query string query connection con try synchronized lock con clear warnings stmt con create statement creating statment getting result from db stmt execute update query stmt close return true catch sqlexception se dbconnect show msg insert query sql se get message return false catch exception e dbconnect show msg insert query general e get message return false end of insert query | the method execute a givven query to the database |
public string return query as one str string query connection con string temp vector vec execute query query con for int i 0 i vec size i for int j 0 j object vec element at 0 length j temp string value of object vec element at 0 j trim end for loop end for loop return temp | the methos return the result of a query as one string |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.