input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public iterator get ip subnet iterator return this ip subnets iterator
|
returns an iterator over the configured ip subnets
|
public int get num of threads return this num of threads
|
returns the number of concurrent threads
|
public string get save map path return this savemappath
|
returns the path to the saved hostmap
|
public long get sleep return this sleep
|
returns the sleep value
|
public string get subnets return this ip subnets string
|
return the initial ip subnets string
|
public int get tcp timeout return this tcp timeout
|
returns the tcp timeout value
|
private void reset form tree set plugins string plugin configuration form cf clear the data because it might still contain data from another plugin cf reset iterator i plugins iterator while i has next plugin wrapper plw plugin wrapper i next find the correct plugin if plw get name equals plugin iterator j tree set plw get properties iterator copy the values while j has next property wrapper prw property wrapper j next cf set value prw get key prw get value break
|
reset the form and populate it with values from the xml file
|
public void run this is running true this scan scan at startup to provide values as fast as possible thread running thread thread current thread while control thread running thread try thread sleep this parent get conf get sleep catch interrupted exception e wake up neo every interval milliseconds if system current time millis this parent get conf get interval this parent get conf get sleep this scan this is running false
|
the thread run method
|
public host map get hosts return this hosts
|
returns the hostmap
|
public void destroy terminate the thread the server will continue to shutdown as we leave the destroy method to ensure that we leave our run method in time we have to wait until is running is false br i know is is not very stylish but for now i have no better idea this save map this hosts log info ju nk scanner plugin version thread terminated
|
destroys the plugin
|
private boolean is smb string ip socket sock new socket boolean ret try try to connect to the smb port sock connect new inet socket address ip parent smb port this parent get conf get tcp timeout if it worked close it again sock close ret true catch exception e any exception will result in false ret false return ret
|
determine if smb is running on host code ip code br
|
public connection get connection throws sqlexception return driver manager get connection url user pass
|
return a valid database connection
|
private host map populate map host map h new host map iterator iterator this conf get ip subnet iterator while iterator has next ip subnet i ip subnet ip subnet iterator next clone while i has next string ip string i next h put ip new name online ip boolean false log info ip return h
|
populates a host map with inital name online values
|
public boolean get show return this show
|
return show it must go on
|
public int compare to object obj return plugin wrapper obj name compare to this name
|
implemented to achieve automatic sorting within treesets
|
public int compare to object obj return property wrapper obj key compare to this key
|
implemented to achieve automatic sorting within treesets
|
public void set message string from string to string message list text message msg parts font parser construct msg list message sender from if recipient null recipient to set message sender msg parts false
|
this is for message from mobile user
|
public void run simple message simple msg new simple message test message object msg null try while connected msg object input read object null system out println server client messageable msg display message notify observers this set changed notify send out recieved messages to observers this notify observers msg catch ioexception ioe fixme fill the code of this exception catch class not found exception cnfe fixme fill the code of this exception system err println class not found finally connected false
|
this method is called by the client constructor
|
private void adjust to image size if is displayable add notify do this to get valid insets insets insets get insets int w m buffered image get width insets left insets right int h m buffered image get height insets top insets bottom h m control panel get preferred size height set size w h
|
when an image is loaded the window is resized to
|
private void center dimension screen toolkit get default toolkit get screen size dimension d get size int x screen width d width 2 int y screen height d height 2 set location x y
|
center this window in the users desktop
|
public void paint graphics g if m buffered image null return insets insets get insets g draw image m buffered image insets left insets top null
|
all paint has to do is show the current image
|
public dao get dao class c throws sqlexception log d tag dbadapter get dao called dao my dao daolist get c get name retrieve by if my dao null log d tag dbadapter get dao loading dao into daolist my dao super get dao c daolist put c get name my dao return my dao
|
returns the database access object dao for our trigger class
|
private long get next execution time string cron expression throws parse exception date now new date cron expression ce new cron expression cron expression date next ce get next valid time after now long ret next get time return ret
|
computes the next execution time according to the
|
private intent create cron scheduled intent string action string cron expression intent result new intent get application context on event receiver class result set action action result put extra extra field cron expression cron expression return result
|
creates an intent that will be repeatedly scheduled using the
|
public void stop scheduled job string action string cron expression alarm manager alarm manager alarm manager get system service context alarm service log d tag un scheduling job action for execution at cron expression intent next intent create cron scheduled intent action cron expression pending intent pi pending intent get broadcast get application context 0 next intent pending intent flag cancel current alarm manager cancel pi
|
stops a job that has been scheduled for future execution from being
|
public void set button next jbutton btn next set the attribute this btn next btn next
|
setter for the next button
|
public void set button previous jbutton btn previous set the attribute this btn previous btn previous
|
setter for the previous button
|
public void set button start jbutton btn start set the attribute this btn start btn start
|
setter for the start button
|
public void set image mystery jlabel img mystery set the attribute this img mystery img mystery
|
setter for the mystery image label
|
public void set image rosary jlabel img rosary set the attribute this img rosary img rosary
|
setter for the rosary image label
|
public void set label mystery text jlabel lbl mystery text set the attribute this lbl mystery text lbl mystery text
|
setter for the mystery description label
|
public void set label mystery title jlabel lbl mystery title set the attribute this lbl mystery title lbl mystery title
|
setter for the mystery title label
|
public void set label mystery type jlabel lbl mystery type set the attribute this lbl mystery type lbl mystery type
|
setter for the mystery type label
|
public void stop no descriptions set mystery texts rosary mystery none 11 no image set mystery image rosary mystery none rosary count is back to zero rosary utils add image to label img rosary rosary0 png rosary stop button becomes start button again rosary utils add icons to button btn start play png play hover png disable previous button btn previous set enabled false disable next button btn next set enabled false
|
interrupt the rosary
|
public void next increase the counter counter update the rosary state set rosary state
|
goes to the next step in the rosary
|
public void previous increase the counter counter update the rosary state set rosary state
|
goes to the previous step in the rosary
|
public void draw if necessary refresh interpolation if interp 1 0 interp interp this pass interpolation increment if interp 1 0 interpolation end interp 1 0f this current this next this interpola super draw
|
draws the interpolated model
|
public void start anim this interp 0
|
unlock the transformation that will take place as draw is invoked
|
public void set pass float pass this pass pass
|
define how faster is the interpolation default is 0
|
public void add pro argument c argument if pro next pro list add argument pro next false else throw new invalid parameter exception next argument should be an opp argument in this branch
|
add a pro argument to this branch
|
public void add opp argument c argument if pro next opp list add argument pro next true else throw new invalid parameter exception next argument should be an pro argument in this branch
|
add an opp argument to this branch
|
protected void log string message int level indent based on level this is the reason level is passed around string buffer indented message new string buffer for int i 0 i level i indented message append indented message append message logger fine indented message to string
|
write indented message to the log stream
|
protected string draw branch branch c dialogue string buffer buff new string buffer iterator argument c iterator dialogue iterator while iterator has next buff append iterator next if iterator has next buff append return buff to string
|
draw a version of the current line of reasoning
|
private jframe get jframe if j frame null j frame new jframe j frame set default close operation jframe exit on close j frame set size 616 398 j frame set content pane get jcontent pane j frame set title dungine scratchpad refresh graph return j frame
|
this method initializes j frame
|
private jpanel get jcontent pane if j content pane null status bar new jlabel status bar set text j content pane new jpanel j content pane set layout new border layout j content pane add status bar border layout south j content pane add get jsplit pane border layout center j content pane add get jtool bar border layout north return j content pane
|
this method initializes j content pane
|
private jtool bar get jtool bar if j tool bar null j label new jlabel j label set text semantics j tool bar new jtool bar j tool bar set floatable false j tool bar add j label j tool bar add get jcombo box return j tool bar
|
this method initializes j jtool bar bar
|
private jframe get jframe if j frame null j frame new jframe j frame set default close operation jframe exit on close j frame set jmenu bar get jjmenu bar j frame set size 717 491 j frame set content pane get jcontent pane j frame set title dungine test viewer get grounded menu item set selected true load test file new file etc tests xml return j frame
|
this method initializes j frame
|
private jsplit pane get jsplit pane if j split pane null j split pane new jsplit pane j split pane set divider location 200 j split pane set right component get jtabbed pane j split pane set left component get jscroll pane return j split pane
|
this method initializes j split pane
|
private jpanel get jcontent pane if j content pane null j label new jlabel j label set text grounded semantics j label set font new font dialog font plain 12 j content pane new jpanel j content pane set layout new border layout j content pane add j label border layout south j content pane add get jsplit pane border layout center return j content pane
|
this method initializes j content pane
|
private visualization viewer get visualization viewer if visualization viewer null visualization viewer jung dung engine writer make viewer return visualization viewer
|
this method initializes visualization viewer
|
private graph zoom scroll pane get graph zoom scroll pane if graph zoom scroll pane null graph zoom scroll pane new graph zoom scroll pane get visualization viewer return graph zoom scroll pane
|
this method initializes graph zoom scroll pane
|
private jmenu bar get jjmenu bar if j jmenu bar null j jmenu bar new jmenu bar j jmenu bar add get file menu j jmenu bar add get options menu j jmenu bar add get help menu return j jmenu bar
|
this method initializes j jmenu bar
|
private jtabbed pane get jtabbed pane if j tabbed pane null j tabbed pane new jtabbed pane j tabbed pane add tab all null get graph zoom scroll pane null return j tabbed pane
|
this method initializes j tabbed pane
|
private jcombo box get jcombo box if j combo box null j combo box new jcombo box new object grounded preferred credulous stable credulous j combo box add action listener new java awt event action listener public void action performed java awt event action event e refresh graph return j combo box
|
this method initializes j combo box
|
private jtext area get jtext area if j text area null j text area new jtext area j text area set text default args j text area get document add document listener get document listener return j text area
|
this method initializes j text area
|
private jmenu get options menu if options menu null options menu new jmenu options menu set text options options menu add get grounded menu item options menu add get preferred credulous menu item return options menu
|
this method initializes j menu
|
private document listener get document listener if document listener null document listener new document listener public void changed update document event e refresh graph public void insert update document event e refresh graph public void remove update document event e refresh graph return document listener
|
this method initializes document listener
|
private jframe get jframe if j frame null j frame new jframe j frame set default close operation jframe exit on close j frame set jmenu bar get jjmenu bar j frame set size 708 412 j frame set content pane get jcontent pane j frame set title title unsaved title postfix get grounded menu item set selected true refresh graph return j frame
|
this method initializes j frame
|
private jpanel get jcontent pane if j content pane null status bar new jlabel status bar set text grounded semantics j content pane new jpanel j content pane set layout new border layout j content pane add status bar border layout south j content pane add get jsplit pane border layout center return j content pane
|
this method initializes j content pane
|
private jmenu bar get jjmenu bar if j jmenu bar null j jmenu bar new jmenu bar j jmenu bar add get file menu j jmenu bar add get option menu j jmenu bar add get help menu return j jmenu bar
|
this method initializes j jmenu bar
|
private jmenu get file menu if file menu null file menu new jmenu file menu set text file file menu add get new menu item file menu add get load menu item file menu add get save menu item file menu add get save as menu item file menu add get exit menu item return file menu
|
this method initializes j menu
|
private button group get semantics button group if semantics button group null semantics button group new button group return semantics button group
|
this method initializes j button group
|
private jradio button menu item get grounded menu item if grounded menu item null grounded menu item new jradio button menu item grounded menu item set text grounded grounded menu item add action listener new action listener public void action performed action event e j label set text grounded semantics refresh graph get semantics button group add grounded menu item return grounded menu item
|
this method initializes j menu item
|
private jradio button menu item get preferred credulous menu item if preferred credulous menu item null preferred credulous menu item new jradio button menu item preferred credulous menu item set text preferred credulous preferred credulous menu item add action listener new action listener public void action performed action event e j label set text preferred credulous semantics refresh graph get semantics button group add preferred credulous menu item return preferred credulous menu item
|
this method initializes j menu item
|
private jdialog get about dialog if about dialog null about dialog new jdialog get jframe true about dialog set title about about dialog set size new dimension 162 88 about dialog set content pane get about content pane return about dialog
|
this method initializes about dialog
|
private jsplit pane get jsplit pane if j split pane null j split pane new jsplit pane j split pane set divider location 200 j split pane set left component get jscroll pane j split pane set right component get jsplit pane1 return j split pane
|
this method initializes j split pane
|
public visualization viewer get viewer return this vv
|
get viewer for embedding in a jung graph panel
|
private jmenu item get new menu item if new menu item null new menu item new jmenu item new menu item set text new new menu item set accelerator key stroke get key stroke key event vk n event ctrl mask true new menu item add action listener new action listener public void action performed action event e get jtext area set text get jframe set title title unsaved title postfix graph editor this file null get save menu item set enabled false is dirty false return new menu item
|
this method initializes j menu item
|
private jsplit pane get jsplit pane1 if j split pane1 null j split pane1 new jsplit pane j split pane1 set orientation jsplit pane vertical split j split pane1 set divider location 200 j split pane1 set bottom component get jtabbed pane j split pane1 set top component get jscroll pane1 return j split pane1
|
this method initializes j split pane1
|
private jscroll pane get jscroll pane1 if j scroll pane1 null j scroll pane1 new jscroll pane j scroll pane1 set viewport view get jtext pane return j scroll pane1
|
this method initializes j scroll pane1
|
private jtext pane get jtext pane if j text pane null j text pane new jtext pane j text pane set font new font dialog font plain 18 return j text pane
|
this method initializes j text pane
|
private jmenu get option menu if option menu null option menu new jmenu option menu set text options option menu add get grounded menu item option menu add get preferred credulous menu item option menu add get stable credulous menu item return option menu
|
this method initializes option menu
|
private jradio button menu item get grounded menu item if grounded menu item null grounded menu item new jradio button menu item grounded menu item set text grounded grounded menu item add action listener new action listener public void action performed action event e refresh graph status bar set text grounded semantics get semantics button group add grounded menu item return grounded menu item
|
this method initializes grounded menu item
|
private jradio button menu item get preferred credulous menu item if preferred credulous menu item null preferred credulous menu item new jradio button menu item preferred credulous menu item set text preferred credulous preferred credulous menu item add action listener new action listener public void action performed action event e refresh graph status bar set text preferred credulous semantics get semantics button group add preferred credulous menu item return preferred credulous menu item
|
this method initializes preferred credulous menu item
|
protected void load plugins picking plugin new show proof graph mouse plugin c animated picking plugin new animated picking graph mouse plugin translating plugin new translating graph mouse plugin input event button1 mask scaling plugin new scaling graph mouse plugin new crossover scaling control 0 in out rotating plugin new rotating graph mouse plugin shearing plugin new shearing graph mouse plugin add scaling plugin set mode mode transforming
|
create the plugins and load the plugins for transforming mode
|
private jradio button menu item get stable credulous menu item if stable credulous menu item null stable credulous menu item new jradio button menu item stable credulous menu item set text stable credulous stable credulous menu item add action listener new action listener public void action performed action event e refresh graph status bar set text stable credulous semantics get semantics button group add stable credulous menu item return stable credulous menu item
|
this method initializes stable credulous menu item
|
private jsplit pane get jsplit pane if j split pane null j split pane new jsplit pane j split pane set divider location 200 j split pane set left component get jscroll pane j split pane set right component get jtabbed pane return j split pane
|
this method initializes j split pane
|
public boolean equals object other implementation of equals for a generic class is not straight forward see http angelikalanger com generics faq faqsections programming idioms html how 20do 20 i 20best 20implement 20the 20equals 20method 20of 20a 20parameterized 20type if this other return true if other null return false if other instanceof argument return false argument other argument argument other return this get claim equals other argument get claim
|
warning this equals method will return true if compared with an object thats
|
public void test query result dungine string engine new dungine string new informal argument source a b nb c query string query engine create query a assert assert equals a query get claim assert assert equals 1 query get arguments size acceptable argument string argument acceptable argument string query get arguments iterator next assert assert equals boolean true argument is acceptable assert assert equals a c b engine get reasoner run argument game argument get argument to string
|
basic unit test for query
|
private document listener get document listener if document listener null document listener new document listener public void changed update document event e refresh graph dirty file public void insert update document event e refresh graph dirty file public void remove update document event e refresh graph dirty file return document listener
|
this method initializes document listener
|
private jfile chooser get jfile chooser if j file chooser null j file chooser new jfile chooser return j file chooser
|
this method initializes j file chooser
|
public void test add methods try std add pro new argument string d assert assert true an error should have been thrown false catch invalid parameter exception e assert assert true true branch string blnk new branch string try blnk add opp new argument string a assert assert true an error should have been thrown false catch invalid parameter exception e assert assert true true
|
if arguments are added out of order pro opp pro
|
public void test set views branch string test new branch string new argument string a test add opp new argument string b test add pro new argument string a set argument string set test pro arguments assert assert equals 1 set size assert assert true set contains new argument string a set test opp arguments assert assert equals 1 set size assert assert true set contains new argument string b
|
std test isnt used because it doesnt demonstrate the set nature of
|
public void test copy and to string branch string copy std copy assert assert equals true copy is pro winning assert assert equals a c b copy to string copy add opp new argument string d assert assert equals a c b std to string
|
test copy and to string together
|
public void test argument subclasses branch string pair new branch string pair add pro new qualified argument string a qualifier likely pair add opp new qualified argument string b qualifier as likely as not pair add pro new qualified argument string c qualifier unlikely assert assert equals a likely c unlikely b as likely as not pair to string
|
a test just to make that the generic interfaces do allow
|
public void test equals argument string arg1 new argument string 1 assert assert true arg1 equals new argument string 1 assert assert false arg1 equals new argument integer 1
|
equals for a generic class is a little tricky
|
public void set format string format calendar get localize set date time format format init editor update calendar set editable is editable set enabled is enabled calendar show date
|
info format is string to info format date
|
public void set short date format string format date short this short date format format date short
|
short date format is string to short date format date
|
public void set long date format string format long date this long date format format long date
|
long date format is string to long date format date
|
public void set time format string format time this time format format time
|
long date format is string to long date format date
|
public void set start day int start day if start day 0 start day 6 this start day start day else try throw new exception invalid start day must 0 to 6 catch exception ex ex print stack trace
|
start day is the begining of day in a week
|
public void set min year int min year this min year min year
|
min year is the begining of day in a week
|
public void set max year int max year this max year max year
|
max year is the begining of day in a week
|
public list get reversed partial result return this reversed partial result
|
gets the value of reversed partial result
|
public list get remaining inputs return this remaining inputs
|
gets the value of remaining inputs
|
public void describe to description desc desc append text xpath xpath get expression
|
generates a description of which xpath is expected to match
|
public boolean matches object doc if doc null return false else if doc instanceof document return xpath match document doc else if doc instanceof string try return xpath match xmlmatchers parse string doc catch exception ex return false else return false
|
matches when the object can be converted to a document and the reference
|
public map get methods return null
|
returns a map containing the names and signatures of all methods
|
public boolean matches object o document d xmlmatchers get as document o if d null return false return is equivalent reference document get root element d get root element
|
matches when the object is a document or a parseable xml string which
|
public void describe to description desc desc append text resource string
|
the reference string
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.