input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void set caption string caption this caption caption impl set caption get element legend caption
|
set the title in the border
|
public bootstrap data get bootstrap data return bootstrap data
|
get a bootstrap data
|
public long get system time return system time
|
get the system time
|
public void set system time long system time this system time system time
|
set system time
|
public string get application code return application code
|
get the application code
|
public void set application code string application code this application code application code
|
set the application code
|
public void insert item string item int index col type value throws index out of bounds exception if index 0 index list box get item count throw new index out of bounds exception list box insert item item index item values add index value
|
inserts an item into the
|
protected boolean equals non trivially data column sort info csi return csi null get column csi get column is ascending csi is ascending
|
check if this object is equal to another
|
public void add int index data column sort info sort info remove sort info for duplicate columns int column sort info get column for int i 0 i infos size i data column sort info cur info infos get i if cur info get column column infos remove i i if column index index insert the new sort info infos add index sort info
|
inserts the specified
|
public boolean equals data column sort list csl object is null if csl null return false check the size of the lists int size size if size csl size return false compare the entries for int i 0 i size i if infos get i equals csl infos get i return false everything is equal return true
|
check if this object is equal to another
|
public data column sort info get primary column sort info null safe return infos size 0 infos get 0 get dummy column sort info
|
get the primary first
|
public int get primary column return get primary column sort info null safe get column
|
get the primary first
|
public boolean is primary ascending return get primary column sort info null safe is ascending
|
get the primary first
|
public data column sort info get primary column sort info return infos size 0 infos get 0 null
|
get the primary first
|
private void test creating node depth final node n final int expected depth node depth depth test new node depth n assert equals expected depth depth test get depth assert equals n depth test get node
|
helper method for testing nodes
|
private void test xpath for node final node n final xpath xp if n get node type node document type node string xpath node ops get xpath n uncomment for debug info system out println node domops get node as string n xpath xpath compare xpath result n xpath xp
|
helper method for test get xpath
|
public boolean accept final file f boolean ret false if f is file f get name ends with a xml ret true return ret
|
tests whether the given file is a file and ends in a
|
private int calculate depth final node node int depth 0 node tmp node node node doc if node get node type node document node doc node else doc tmp node get owner document while tmp node equals doc depth tmp node tmp node get parent node return depth
|
calculates the depth of a node
|
public int get dom if m domchild no 1 calculate domchild number return m domchild no
|
get the dom child number
|
public int get xpath char pos if m xpath char pos 1 calculate xpath child number and position return m xpath char pos
|
get the xpath child number
|
public int get in order xpath char pos if m in order xpath char pos 1 calculate in order xpath child number and position return m in order xpath char pos
|
get the xpath child number
|
public int get xpath if m xpath child no 1 calculate xpath child number and position return m xpath child no
|
get the xpath child number
|
public int get in order xpath if m in order xpath child no 1 calculate in order xpath child number and position return m in order xpath child no
|
get the in order xpath child number
|
public int get in order dom if m in order xpath child no 1 calculate in order domchild number return m in order domchild no
|
get the in order dom child number
|
private boolean inc index final int i boolean inc true node curr m siblings item i handle non coalescing of text nodes if i 0 nodes are text nodes curr m siblings item i 1 node ops node is empty text curr curr get node type node document type node inc false return inc
|
determines whether xpath index should be incremented
|
private void calculate domchild number int cn for cn 0 cn m siblings get length cn if node ops check if same node m siblings item cn m node break m domchild no cn
|
calculates the dom index of the node
|
private void calculate in order domchild number m in order domchild no 0 for int i 0 i m siblings get length i if node ops check if same node m siblings item i m node break if node ops is in order m siblings item i m in order domchild no
|
calculates the in order dom child number of the node
|
private void calculate xpath child number and position int dom index calculate xpath child number calculate xpath text position dom index
|
sets the xpath child number and text position
|
private void output debug final node n if diff factory is debug system err print applying system err println domops get node as string deep n
|
outputs debug message for node
|
private void calculate in order xpath child number and position int dom index calculate in order xpath child number calculate in order xpath text position dom index
|
sets the xpath child number and text position
|
private void calculate xpath text position final int dom index m xpath char pos 1 for int i dom index 1 i 0 i if domops is text m siblings item i m xpath char pos m xpath char pos m siblings item i get text content length else break
|
calculate the character position of the node
|
private int calculate xpath child number int child no 1 int dom index for dom index 0 dom index m siblings get length dom index if node ops check if same node m siblings item dom index m node if inc index dom index child no break if inc index dom index child no m xpath child no child no return dom index
|
set the xpath child number of the node
|
private void calculate in order xpath text position final int dom index m in order xpath char pos 1 for int i dom index 1 i 0 i if domops is text m siblings item i if node ops is in order m siblings item i m in order xpath char pos m in order xpath char pos m siblings item i get text content length else if node ops is in order m siblings item i break
|
calculate the character position of the node
|
private void delete phase final node n final node pairs matchings deletes nodes in post order traversal node list kids n get child nodes if kids null note that we loop backward through kids for int i kids get length 1 i 0 i delete phase kids item i matchings if node isn t matched delete it if matchings is matched n n get node type node document type node m delta delete n n get parent node remove child n
|
performs the delete phase of the algorithm
|
private void output debug if diff factory is debug system err println result try domops output xml m doc1 system err catch ioexception e system err println failed to print debug info system err println system err println
|
outputs debug information
|
private int get old char pos final named node map op attrs int old char pos 1 node a op attrs get named item dulconstants old charpos if a null old char pos integer value of a get node value return old char pos
|
get value of old charpos attribute
|
private int get new char pos final named node map op attrs int new char pos 1 node a op attrs get named item dulconstants new charpos if a null new char pos integer value of a get node value return new char pos
|
get value of new charpos attribute
|
public void insert head attributed string p head int p int super insert head p head p int test xy
|
inserts text into the head text of the syntactic structure
|
public void splash init image and tracker set size m image get width null m image get height null center m media tracker add image m image 0 try m media tracker wait for id 0 catch interrupted exception ie system out println cannot track image load splash window splash window new splash window this m image splash window validate
|
show the splash screen to the end user
|
public boolean is data flavor supported data flavor p flavor if p flavor equals attributed string flavor p flavor equals data flavor string flavor return true return false
|
checks to see if a flavor is supported
|
private void resize dimension dim toolkit get default toolkit get screen size this set size int dim get width int dim get height 30
|
resizes the frame to screen resolution
|
public void print printer job l print job printer job get printer job l print job set printable this if l print job print dialog try l print job print catch printer exception pe system out println error printing pe
|
the command that controls the opening of the print dialog and does
|
public void update observable p observable object p object if p observable m observable new if m observable new get value 0 this set enabled false else this set enabled true
|
update implementing observer
|
public boolean is data flavor supported data flavor p flavor if p flavor equals data flavor image flavor return true return false
|
checks to see if a flavor is supported
|
public void print tree container l c m user frame get internal frame get content pane color l color l c get background l c set background new color 255 255 255 m user frame get syntax facade deselect tree print utilities print component l c l c set background l color
|
prints the tree
|
private void set icons if m size this set icon m enable icon else this set icon m enable icon small if m size this set disabled icon m disable icon else this set disabled icon m disable icon small
|
sets the icons
|
public void close tree int l i joption pane show confirm dialog null clicking no will close trees without saving them save trees first joption pane yes no option if l i joption pane yes option save as tree m user frame get syntax facade else m user frame get desktop pane close internal frame
|
closes trees without saving
|
public boolean close all trees int l i joption pane show confirm dialog null clicking no will close all trees without saving them save trees first joption pane yes no option if l i joption pane yes option save all trees m user frame get desktop pane return false else if l i joption pane no option m user frame get desktop pane close all internal frames return true return false
|
closes all trees without saving
|
public void copy if m user frame get observable clipboard get value instanceof editable component set clipboard editable component m user frame get observable clipboard get value get clip
|
copies selected text to clipboard
|
public void cut if m user frame get observable clipboard get value instanceof editable component set clipboard editable component m user frame get observable clipboard get value get clip
|
copies selected text to clipboard doesnt cut
|
public void select new frame m user frame get desktop pane selecte new frame
|
selects a new frame
|
public void set check for default button boolean has toggle button this check for default button has toggle button
|
sets the check for default button
|
public void set palette boolean is palette if is palette look and feel install border frame internal frame palette border else look and feel install border frame internal frame border title pane set palette is palette frame border is palette is palette frame set border frame border
|
changes this internal frame mode from to palette mode
|
protected liquid radio button icon get skinned icon if skinned icon null skinned icon new liquid radio button icon return skinned icon
|
returns the skinned icon
|
private jpopup menu create menu jpopup menu menu new jpopup menu if get window decoration style jroot pane frame add menu items menu we use this property to prevent the menu from drawing rollovers menu put client property is system menu boolean true return menu
|
returns the code jmenu code displaying the appropriate menu items
|
public string get description return mosfet s kde 3 x liquid look and feel for java
|
return a one line description of this look and feel implementation
|
public skin get skin return skin
|
returns the skin for this instance of the button
|
public void save file to disk syntax facade p syntax facade m doc save file p syntax facade transformer factory xform factory transformer factory new instance transformer id transform null try id transform xform factory new transformer catch transformer configuration exception e1 e1 print stack trace source input new domsource m doc result output new stream result p syntax facade get file try id transform transform input output catch transformer exception e2 e2 print stack trace
|
implementation of the save file interface
|
public skin get skin track if skin track null skin track scrollbar get orientation jscroll bar vertical get skin track vert get skin track horiz return skin track
|
returns the skin track
|
public skin get skin thumb if skin thumb null skin thumb scrollbar get orientation jscroll bar vertical get skin thumb vert get skin thumb horiz return skin thumb
|
returns the skin thumb
|
private void build set content pane build panel pack set resizable false utils locate on optical screen center this
|
builds the dialogs content pane packs it sets the resizable property
|
public void open build canceled false set visible true
|
builds the dialog content marks it as not canceled and makes it visible
|
public boolean has been canceled return canceled
|
checks and answers whether the dialog has been canceled
|
private void init components annotation table new jtable annotation table set model utils create annotation table model document presentation model get annotation selection annotation table set selection model new single list selection adapter document presentation model get annotation selection get selection index holder
|
creates and intializes the ui components
|
public jcomponent build panel init components init event handling form layout layout new form layout fill 250dlu grow p fill 80dlu 6dlu p panel builder builder new panel builder layout builder set default dialog border cell constraints cc new cell constraints builder add title annotation manager cc xy 1 1 builder add new jscroll pane annotation table cc xy 1 2 return builder get panel
|
builds and returns the panel for the gui annotation manager view
|
public gui annotation create item return new gui annotation
|
creates and return a new gui annotation
|
public void add annotation annotation annotation to add gui annotations add annotation to add set annotations gui annotations
|
adds the given gui annotation to the list of managed albums and notifies
|
public void close release dispose
|
closes the dialog releases obsolete bindings and disposes the dialog
|
public void remove item gui annotation annotation to remove gui annotations remove annotation to remove
|
removes the given gui annotation from the list of managed albums and
|
private void release annotation presentation model set bean null
|
removes listeners from the dialogs gui annotation that are created by the
|
private void build set content pane build content pane pack set resizable false utils locate on optical screen center this
|
builds the dialogs content pane packs it sets the resizable property
|
private void init event handling property connector connector new property connector model get bean gui annotation propertyname text text text connector update property1
|
observes the presentation models em buffered composer enabled em
|
private void init models annotation selection new selection in list annotation gui document get annotations rand annotations new random annotations action transduce new annotation create action
|
initializes the selection in list and action
|
private void init event handling get model gui annotation propertyname start add value change listener new classical change handler
|
registers a listener that is notified about changes in the classical
|
public void property change property change event evt fire property change propertyname correct null get model gui annotation propertyname start get value
|
the gui annotations classical property has changed
|
public void validate inv alp rule rule string input t validate rule rule input t
|
the same as
|
public int get min coverage return min coverage
|
this is the stop condition for creating the search space
|
public string get train instance type return train instance type
|
the type of the information to be extracted
|
public double calc accuracy return calc precision calc recall 2
|
the mean between precision and recall
|
public double calc precision if tp 0 fp 0 return double na n else return tp tp fp
|
calculates the precision
|
public double calc recall if tp 0 fn 0 return double na n else return tp tp fn
|
calculates the recall
|
public double calc bfmeasure return calc fmeasure 1
|
calculates the balanced f measure
|
public double calc fmeasure double alpha if alpha 0 throw new runtime exception alpha can t be null double precision calc precision double recall calc recall double f measure 1 alpha precision recall alpha precision recall return f measure
|
calculates the f measure
|
public boolean does intersect slot s1 if s1 document id equals document id return false long e astart s1 get start long e aend s1 get stop boolean left out of bound e astart start e aend start boolean right out of bound e astart stop e aend stop return left out of bound right out of bound
|
returns if two slots overlap
|
public long intersect slot s1 if s1 document id equals document id return 0 if does intersect s1 return 0 long e astart s1 get start long e astop s1 get stop if e astart start e astart start if e astop stop e astop stop return e astop e astart
|
returns how much the two slots intersect
|
public void add input final string input spt add input input this input add input
|
adds a new name of input annotations used by this transducer
|
public void add focus group string group m focus put group new default tuple set
|
add a new secondary or focus group to this visualization
|
public void add focus group string group tuple set tset m focus put group tset
|
add a new secondary or focus group to this visualization
|
public tuple add tuple tuple t if t get table this return null else schema s t get schema if get schema is assignable from s int r add row for int i 0 i s get column count i string field s get column name i this set r field t get value at i return get tuple r else return null
|
add a tuple to this table
|
public void set value at int row int col object val row get column row row col get column col set val row we don t fire a notification here as we catch the notification from the column itself and then dispatch
|
set the value of at the given row and column numbers
|
public int add edge int s int t get keys for the nodes int key1 get key s int key2 get key t add edge row set source target fields table edges get edge table int r edges add row edges set int r m skey key1 edges set int r m tkey key2 update degrees r s t 1 return r
|
add an edge to the graph
|
protected void clear edges get edge table clear todo this can be removed after remove edge fix is implemented for int iterator rows m links rows rows has next int row rows next int m links set int row outdegree 0 m links set int row indegree 0
|
internal method for clearing the edge table removing all edges
|
public node get node from key int key int n get node index key return n 0 null get node n
|
get the node tuple corresponding to the input node key field value
|
public int get source node int edge return get node index get edge table get int edge m skey
|
get the source node id node table row number for the given edge
|
public int get target node int edge return get node index get edge table get int edge m tkey
|
get the target node id node table row number for the given edge
|
public comparator get comparator tuple set ts get the schema so we can lookup column value types for tables we can get this directly otherwise use the schema of the first tuple in the set schema s ts instanceof table table ts get schema tuple ts tuples get schema create the comparator composite comparator cc new composite comparator m fields length for int i 0 i m fields length i cc add new tuple comparator m fields i s get column type m fields i m ascend i return cc
|
generates a comparator to be used for sorting tuples drawn from
|
public string get message int index if index 0 return super get message else return delegate get message index
|
returns the error message of the code throwable code in the chain
|
public fraction reduce int gcd greatest common divisor math abs numerator denominator return fraction get fraction numerator gcd denominator gcd
|
p reduce the fraction to the smallest values for the numerator and
|
protected boolean accept field field if field get name index of class utils inner class separator char 1 reject field from inner class return false if modifier is transient field get modifiers this is append transients transients return false if modifier is static field get modifiers this is append statics transients return false return true
|
returns whether or not to append the given code field code
|
public properties get application properties return personal application properties
|
returns the personalised application properties
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.