input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public id manager get id manager return this id manager | returns the id manager associated to the compatibility graph |
public compatibility node get compatibility node int id return nodes get id | returns the compatibility node with the given id |
public int get edges nb int e 0 for indexed object adj weighted comp nodes pair edges e pair get value size return e | returns the number of propagation edges in the graph |
public boolean has compatibility node int id return nodes has key id | returns true if the compatibility node with the given id exists false either |
public void complete list labeled edge new edges new linked list labeled edge for indexed object compatibility node pair get compatibility nodes for adj labeled comp node target adjacent node get target nodes pair get value compatibility node target node target adjacent node get node new edges add new labeled edge target node pair get value target adjacent node get label for labeled edge edge new edges create edge compatibility node edge get source compatibility node edge get target edge get label | adds reverse edges to the connectivity graph |
public void create edge compatibility node source compatibility node target string label edges get source get id add new adj labeled comp node target label | creates an edge in the connectivity graph |
public void add filter filter f f set alignment alignment filters add f | adds a filter to the list of filters |
public void apply filters for filter f filters f filter | applies all the filters of the list |
public int get source node nb return source node nb | returns the number of node in the source graph |
public int get target node nb return target node nb | returns the number of node in the target graph |
public int get max node id return max node id | returns the maximum unique id given the source and target graph sizes |
public labeled node get node return node | returns the node |
public adj labeled nodes get target nodes labeled node node return edge array node get id | returns the nodes connected to the given labeled node |
public int cycle nb int cycle nb 0 for labeled node n this get nodes list labeled node neighbours adj labeled nodes to list get target nodes n set labeled node visited new hash set labeled node while neighbours size 0 labeled node neighbour neighbours remove 0 if neighbour n cycle nb break if visited contains neighbour neighbours add all adj labeled nodes to list get target nodes neighbour visited add neighbour return cycle nb | returns the number of cycles of the graph |
public adj model graph to adj input graph return new adj model graph this | converts the source graph to an adjacent source graph |
public object node create object node string label object object string type object node n new object node last node id label type object last node id object node map put object n add node n return n | creates a new object node with the next available id |
public value node create value node string value string type value node n new value node last node id value type last node id if value node map contains key type value node map put type new hash map string value node value node map get type put value n add node n return n | creates a sink node for the given value of the given type |
public void add node labeled node node nodes add node | adds the given labeled node to the graph |
public void add edge labeled edge edge edges add edge | adds the given labeled directed edge to the graph |
public boolean is ok boolean ok true for labeled edge edge edges if edge get source instanceof value node ok false return ok | tests if there is now value node that is source of |
public boolean is empty return tree null | returns code true code if this treap contains no mappings |
private void step0 for int i 0 i row nb i float min float max value for int j 0 j col nb j if cost matrix i j min min cost matrix i j for int j 0 j col nb j cost matrix i j min step1 | find the smallest value of a row and substract it |
private void step2 for int j 0 j col nb j if starred zeros in cols j 1 covered cols j 1 if get covered cols nb row nb finish return step3 | checks if the assignment is completed or not |
public void test crud object ds try ds dao find unique by class for name sto orz rptp model datasource id 1128807c0f557272010f55c8738f0002 string value try value ognl get value id ds to string assert equals 1128807c0f557272010f55c8738f0002 value ognl set value name ds haha dao save ds dao flush dataset das new dataset ognl set value datasource das ds assert not null das get datasource catch ognl exception e e print stack trace catch class not found exception e1 todo auto generated catch block e1 print stack trace | simple test to verify base dao works |
public int time of nearest event return next events get 0 get time | the time of the nearest event |
public void on module load list ngone chart elt liste new array list ngone chart elt liste add new ngone chart elt 3 5 liste add new ngone chart elt 1 5 liste add new ngone chart elt 2 5 liste add new ngone chart elt 4 5 liste add new ngone chart elt 5 5 ngone chart chart new ngone chart liste root panel get add chart | this is the entry point method |
public void draw chart this draw gone this draw graduation | draw the chart |
public boolean contains my point point double delta boolean result false if math abs this a point get x this b point get y this c delta result true return result | return true if the line contains the point |
public boolean contains my point point boolean result this contains point 0 0 return result | return true if the line contains the point |
public double get length double u this b point get x this a point get x double v this b point get y this a point get y return math sqrt u u v v | get the length |
public boolean contains my point point double delta boolean result false my line line new my line this a point this b point if line contains point delta my interval interval1 new my interval this a point get x this b point get x my interval interval2 new my interval this a point get y this b point get y interval1 add delta delta interval2 add delta delta if interval1 contains point get x interval2 contains point get y result true return result | return true if the line contains the point |
public boolean contains my point point boolean result this contains point 0 001 return result | return true if the line contains the point |
public boolean is near zone int x int y double delta return x this x delta x this x delta y this y delta y this y delta | test if the point is near the current point |
public boolean contains double value boolean result false if strict if this value1 value value this value2 this value1 value value this value2 result true else if this value1 value value this value2 this value1 value value this value2 result true return result | check if the value is between value1 and value2 |
public boolean is near zone my point point double delta return point x this x delta point x this x delta point y this y delta point y this y delta | test if the point is near the current point |
public boolean is inside my point point return this center is near zone point radius | test if the point is inside the circle |
public bindings add string property jtoggle button c boolean default value register property change listener c return add new jtoggle button binding property c default value | handles jtoggle button jcheck box |
private void listen to host try datagram datagram broadcast receive connection new datagram broadcast receive connection get maximum length if broadcast receive connection packets available broadcast receive connection receive datagram receive host message datagram catch ioexception ioe ioe print stack trace | catches the messages coming from the hostapp |
private void playing string message try check for messages from active players for int i 0 i connections size i connection con connection connections element at i if con has message message con read utf game receive message message con get address check for messages from idle players for int i 0 i idle connections size i connection con connection idle connections element at i if con has message message con read utf game receive message message con get address catch ioexception ioe ioe print stack trace game update to check for the potatoelifetime constantly etc | catches the messages comming from connections and sends them to the game |
public boolean is may throw time return may throw time system current time millis | check if may throwtime is reached |
public void up score score | sets the score one up |
public void set end time long an end time end time an end time | sets the end time |
public void is out system out println i m out main mass message deadplayer has potato false game started false display for int i 0 i 7 i leds i set rgb 255 0 0 leds i set on leds 0 set rgb 255 0 0 leds 7 set rgb 255 0 0 leds 0 set on leds 7 set on main idle all connections should move all connections to idle and start waiting again for new connections | handles the fact when you lose a round |
public void begin game end time generate end time set end time has potato true this spot will have the potato since this spot started the game main mass message startgame let other spots know the game has started game started true left switch remove iswitch listener this remove listeners once game is started right switch remove iswitch listener this leds 0 set rgb 0 0 255 leds 7 set rgb 0 0 255 display sensor thread run system out println begin game started | begins a game this spot has started |
public void set connect led int i main get connections size get size of connections for int j i i 8 i put the amount of leds as many as connections are to green leds j set rgb 0 255 0 leds j set on | sets the leds for each connection |
public void do search string pattern if this m parentform null super empty form pattern this m parentform get input if pattern null pattern length 0 this m thr new dict index skeys thread this get index pattern this this m thr start do search | starts searching for keywords |
public void add result string a result string item item item new string item null a result item set default command new command a result command item 0 item set item command listener this this append item add result | appends the given result to the form |
public void start app display get display this set current this m form start app | called if the application starts |
public void destroy app boolean unconditional destroy app | does absolutely nothing |
protected void empty form this delete all this append this m gauge empty form | deletes of contents of the form but the gauge |
public void pause app pause app | does absolutely nothing |
protected void show form form a form if this m parent null a form null display get display this m parent set current a form show form | shows the given form |
protected void empty form super empty form this insert 0 this m input empty form | initializes the layout of an empty form |
private void do search string keyword keyword this get input if keyword null keyword length 0 if this m thr null this m thr do stop try this m thr join catch exception excp this m thr null this empty form this m thr new dict index search thread this get index keyword this this m thr start do search | starts searching for the keyword explanations |
public void stop this m goon false stop | stops any presently active operations |
private void stop if this m idxloader null this m idxloader stop this m idxloader null if this m srch null this m srch stop this m srch null | stops any currently running background operations |
private void searchexacttv char sequence keyword text view tv tv text view this find view by id r id key edit if tv null keyword tv get text this searchexact keyword | starts exact searching for the description in the text view control |
private void searchexactlv int a pos char sequence keyword list view lv text view tv lv list view this find view by id r id res list tv text view this find view by id r id key edit if tv null lv null if this m resultarr null this m resultarr size a pos keyword this m resultarr get a pos tv set text keyword this searchexacttv | starts exact searching for the description in the list view control |
private void searchsimilar char sequence keyword text view tv tv text view this find view by id r id key edit if tv null keyword tv get text this searchsimilar keyword | starts similar searching for the description in the text view control |
private void searchexact char sequence a keyword try this stop this m srch new search exact this m srch set db this m db this m srch search a keyword this catch exception excp this show exception excp | starts exact searching for a description of a keyword |
private void searchsimilar char sequence a keyword try this stop this m srch new search similar this m srch set db this m db this m srch search a keyword this catch exception excp this show exception excp | starts searching for similar keywords |
private void load dictionary alert dialog dlg alert dialog builder builder dict and activity dict selector selector string dnames dnames idx loader get available dictionaries if dnames null selector new dict and activity dict selector this dnames true builder new alert dialog builder this builder set title this get string r string load dictionary builder set items dnames selector dlg builder create dlg show | creates a submenu allowing the user to load a dictionary |
private void select dictionary alert dialog dlg alert dialog builder builder dict and activity dict selector selector string dnames dnames idx loader get loaded dictionaries if dnames null selector new dict and activity dict selector this dnames false builder new alert dialog builder this builder set title this get string r string select dictionary builder set items dnames selector dlg builder create dlg show | creates a submenu allowing the user to select a loaded |
public double distance double x if x upper bound return x upper bound if x lower bound return lower bound x return 0 0 | returns the distance between a point x and this interval |
public double distance final interval interval if lower bound interval lower bound return interval distance this else return distance interval lower bound | returns the minimum distance between this interval and another one |
public void sell throw new unsupported operation exception | sells an item in the store |
public void unsell throw new unsupported operation exception | unsells an item by reading it to the inventory count |
public int get count throw new unsupported operation exception | gets the quantity of this item |
public void change count int amount throw new unsupported operation exception | change the quantity of this item that is in stock |
public boolean sell item item throw new unsupported operation exception | sells an item to the user |
public void unsell item item throw new unsupported operation exception | unsells an item from a user |
public int get balance throw new unsupported operation exception | getter for balance |
public int get sugar throw new unsupported operation exception | gets the users sugar count |
public void set sugar int count throw new unsupported operation exception | sets the users sugar count |
public void change balance int amount throw new unsupported operation exception | adds code amount code to users balance |
public void set balance int balance throw new unsupported operation exception | sets the users balance |
public string get xml string buffer xml out new string buffer xml out append component n xml out append id xml out append id xml out append id n xml out append name cdata xml out append name xml out append name n xml out append price xml out append price xml out append price n xml out append quantity xml out append quantity xml out append quantity n xml out append description cdata xml out append description xml out append description n xml out append component n return xml out to string | get the xml representation of the bean |
public string get xml string buffer xml out new string buffer xml out append component xml out append id xml out append id xml out append id xml out append name cdata xml out append name xml out append name xml out append price xml out append price xml out append price xml out append quantity xml out append quantity xml out append quantity xml out append description cdata xml out append description xml out append description return xml out to string | get the xml representation of the bean |
public void set job locator final job locator job locator this job locator job locator | public setter for the |
public void set job launcher final job launcher job launcher this job launcher job launcher | public setter for the |
public void set registry final job registry registry this registry registry | public setter for the |
public void set name string name this name name set dirty true | this method sets the name |
public date get hire date return hire date | this method returns the hire date |
public void set serial num string serial num this serial num serial num | sets the serial number of the physical product |
public void set hire date date hire date this hire date hire date set dirty true | this method gets the hire date |
public string get serial num return serial num | gets the serial number of the physical product |
public void set position string position this position position set dirty true | this method sets the employees position |
public string get store return store | this method gets the employees store |
public conceptual bo get conceptual return conceptual | gets the conceptual product that the product is a part of |
public void set conceptual conceptual bo conceptual this conceptual conceptual | sets the conceptual product that the product is part of |
public void set location string location this location location set dirty true | this method sets the location |
public void set manager employee bo manager this manager manager set dirty true | this method gets the manager |
public void set address string address this address address set dirty true | this method sets the address |
public void set phone string phone this phone phone set dirty true | this method gets the phone number |
public void post transaction bo transaction current opts bo curr throws data exception set current opts of transaction transaction set current opts curr save transaction transaction dao get instance save transaction print receipt transaction display todo update inventory program later todo update accounts recievable program later todo update cash program later todo process payment with bank program later todo update customer | this method is to post transactions that are pending or void |
protected synchronized product bo populate product product bo object connection conn throws sqlexception data exception prepared statement pstmt conn prepare statement select from revenue source where revenue source id pstmt set string 1 object get id pstmt execute result set rs pstmt get result set if rs next object set price rs get double price returns object return object | this method recieves a product object and populates it the data |
public void set amount double amount this amount amount set dirty true | this method gets the amount of the coupon |
public void set type string type this type type set dirty true | sets the type variable |
public void set transaction transaction bo transaction this transaction transaction set dirty true | gets the transaction variable |
public double calc quantity you should caluclate the quantity here super set quantity 1 return super get quantity | the method used to derive the quantity may vary from revenue source |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.