input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
public void set geo data model geo data model geo data model this geo data model geo data model main3 dwidget get drawable manager remove earth draw earth draw build tree draw sphere geo data model get current geometry main3 dwidget get drawable manager add earth draw system gc
|
sets the given geo data model as currently used and displays it in
|
public boolean intersect rect2 d coordinates calculate the intersection rect2 d result new rect2 d result p x math max p x coordinates p x result p y math max p y coordinates p y double x2 math min p x size x coordinates p x coordinates size x double y2 math min p y size y coordinates p y coordinates size y result size x x2 result p x result size y y2 result p y return result size x 0 result size y 0
|
returns true when there is an intersection between this
|
public void set viewer point3 d p nav set viewer p
|
set the camera position
|
public void set view culling boolean state view culling state
|
turns view culling on or off
|
protected void read form marker set label get jtext field label get text
|
reads the values out of the widgets and saves them into the
|
public void set marker marker marker this marker marker get jtext field label set text marker get label
|
sets the marker that is edited by this dialog
|
public void add action listener action listener al actionlisteners add al
|
all listeners added with this method are informed when the
|
public void set label string label this label label try icon create icon label default icon catch ioexception e icon default icon e print stack trace icon buffer make pixels icon
|
sets the new label and recreates the icon
|
public point2 d get world coordinates int mx int my get map coordinates float projplane 0 3f int dy size height my if dy 0 dy 0 if dy depth height dy depth height 1 if mx depth width mx depth width 1 float depth1 depthbuffer get dy depth width mx double sd new double 3 glu glu un project mx size height my depth1 modl 0 proj 0 viewport 0 sd 0 point2 d mappos sphere inverse new point3 d sd 0 sd 1 sd 2 get texture at coordinates return mappos
|
returns the gps north east coordinates for a given pixel
|
public void garbage collect do not call superclass as it relies on get selected for drawing that is not used in this subclass delete children if they were not used for at least 30 timesteps if global globaltime lastchildused 30 for int i 0 i 4 i heightfield tree node child get child i if child null child can be deleted set child i null delete data from this node if the data was not needed for at least 30 timesteps if global globaltime lastused 30 tile discard scaled image tile discard uncompressed image
|
removes children that were not used for some time
|
public void download download texture for connection conn get texture connections get connections if conn instanceof connection url try new urldownload new url get source connection url conn get url this download type texture start download break catch malformed urlexception e e print stack trace download heightfield for connection conn get heightfield connections get connections if conn instanceof connection url try new urldownload new url get source connection url conn get url this download type heightfield start download break catch malformed urlexception e e print stack trace
|
downloads the referenced service to determine the geometry object
|
protected void request from network heightfield tree node hnode if hnode get requested hnode set requested true if hnode get request id null hnode get request id length 0 hnode add downloader drmt cns get one hnode get request id hnode hnode 10 else if hnode get parent get downloaded try hnode get parent enqueue request hnode catch ioexception e todo auto generated catch block e print stack trace else hnode set downloaded true hnode set download failed
|
loads the given node from the network instead of trying to see
|
public void add task runnable run synchronized tasks tasks add run tasks notify
|
add a task that is run using the next free thread
|
protected boolean has loop plugin class loader parent plugin class loader child if parent child return true for plugin class loader loader parent get parents if has loop loader child return true return false
|
checks for a loop in the dependency graph by searching upwards from parent
|
public void extension added extension extension if extension instanceof main window main window main window main window extension jbutton button new jbutton next satellite map main window get content pane add button border layout north button add action listener this
|
listens for new extensions to add itself to every new main window
|
protected void start map creation string config get jtext field filename get text string output dir get jtext field directory get text map creator mc new map creator config output dir mc start
|
starts the creation of the map into the given directory using
|
protected geometry create geometry file string filename throws ioexception geometry map tree gmt new geometry map tree gmt get texture connections add connection new connection url textures 0 mxml gmt get heightfield connections add connection new connection url heightfield 0 mxml gmt write xml filename get map name return gmt
|
creates a geometry file for the created map tree
|
public void discard children
|
discards the loaded children to save memory
|
public double buffer get vertex db return db
|
returns the double buffer used for gl vertex pointer
|
public double buffer get tex db return tex db
|
returns the double buffer used for gl tex coord pointer
|
private hash map get column location hash map hash map new hash map for int i 0 i get column name length i hash map put string value of i column name i key value return hash map
|
column header hashmap
|
private void add new data element element item element account xml account xmlbean add new type element item element account xmlbean get type add new account type element item element account xmlbean get account type add new handler element item element account xmlbean get handler add new money element item element account xmlbean get money add new remark element item element account xmlbean get remark
|
account xml item
|
public void test update account type string type name string account type ddppfamily1 ddppfamily2 ddppfamily3 ddppfamily4 min account config writer instance min account config writer get instance instance update account type type name account type instance write
|
test of update account type method of class min account config writer
|
public void test query items by date throws exception account xml axml bean initxmlbean account xmlwriter axml writer account xmlwriter get instance config util get string min accountmanage data path 200901 axml writer add record axml bean axml writer write
|
test of query items by date method of class account xmlreader
|
public void test money style system out println money style double number 1000000000 11 string result number format util money style number system out println result
|
test of money style method of class number format util
|
public void test add throws exception string a 1 2 3 string add arrays util add string a 4 for int i 0 i add length i system out println add i
|
test of add method of class arrays util
|
public void set string key object value keys add key values add value
|
sets a property of this object
|
public boolean has more input to parse if has next for int i next character index 1 i input length i if character is whitespace input char at i return true return false
|
returns true if there are still unparsed non whitespace characters in the input
|
private double rank thesis t collection user voters if pro voters reference get pro voter else voters reference get con voter array list user pro voter new array list user t get pro voter pro voter retain all voters array list user con voter new array list user t get con voter con voter retain all voters int pos pro voter size int neg con voter size return double pos 3 double neg 1 pos 3 for vorschusslorbeeren of new arguments
|
ranks a given thesis using this ranking algorithm
|
public void on module load no login information needed for thesis panel so we can load in parallel show login bar show thesis panel
|
this is the entry point method
|
private string check html string text throws sanitation exception try anti samy as new anti samy clean results cr as scan text policy return cr get clean html catch policy exception e log error sanitation exception e throw new sanitation exception failed to check input e catch scan exception e log warn sanitation exception e throw new sanitation exception failed to check input e
|
tries to sanitize html input
|
public void on module load debate panel root panel get debate build the ui show login bar and initial thesis react to hyperlinks and make the browser back button work history add value change handler new my history handler
|
this is the entry point method
|
private void build view modus pan clear pan add build header pan add build body pan add build footer
|
builds the view mode
|
private void send argument string title string text argument service add argument title text 0 true new async callback long 0 indicates new thesis override public void on failure throwable caught window alert comitting thesis failed caught get message override public void on success long result show new thesis in debate view string path window location get path path path substring 0 path last index of concat simple debate html url builder url window location create url builder set path path set hash debate helper get fragment id result window location assign url build string
|
commits the new thesis and then shows it in debate view
|
private widget build header horizontal panel pan new horizontal panel label title pan new label thesis get title title pan set style name thesis title pan add title pan pan add new vote buttons thesis vote service pan set style name thesis header return pan
|
builds the title line of view mode
|
private widget build body html text pan new html thesis get text html is ok because the server checks during commit on malicious code return text pan
|
builds the detail text of view mode
|
private widget build footer final horizontal panel footer new horizontal panel if thesis get author equals current user anchor edit new anchor editieren edit add click handler new edit handler footer insert edit 0 flow panel author flow new flow panel label author pan new label thesis get author get username author pan set style name thesis author author flow add author pan author flow set width 100 footer add author flow footer set style name thesis footer return footer
|
builds the footer line of view modus
|
private void update text final string titel string text argument service async argument service gwt create argument service class argument service update thesis titel text thesis get id new async callback string override public void on failure throwable caught window alert failed to commit because caught get message override public void on success string result thesis set text result thesis set title titel build view modus
|
updates the text of the shown thesis
|
public void show final int left final int width final int bottom set popup position and show new position callback override public void set position int offset width int offset height set popup position left width offset width 2 bottom
|
shows this dialog box
|
private void logout login service logout new async callback void override public void on failure throwable caught window alert server error override public void on success void result window location reload
|
logs the user out
|
private widget build arguments comparator thesis rank sort the arguments collections sort arguments rank add all arguments from top to bottom vertical panel argument list new vertical panel for thesis argument arguments argument list add build argument panel argument argument list set width 100 return argument list
|
builds the list of arguments
|
public void vote dbuser u boolean pro if pro con voters remove u get id pro voters add u get id else pro voters remove u get id con voters add u get id
|
adds a vote to this thesis
|
public vote option get vote dbuser u if pro voters contains u get id return vote option pro else if con voters contains u get id return vote option con else return vote option undecided
|
fetches the vote of the given user
|
public boolean get notification all if notification all null return false else return notification all
|
true if notifications should be send at all changes
|
private widget build argument panel thesis t only show the detail text if the user wishes to see it disclosure panel pan new disclosure panel pan set header build argument title t pan pan set content build argument body t pan set width 100 show a nice border could be nicer decorator panel decorator new decorator panel decorator add pan decorator set width 100 return decorator
|
build the widget for one argument
|
public void add argument dbthesis t boolean pro if t parent null throw new illegal argument exception thesis was already added as an argument if pro pro arguments add t key t parent this key else contra arguments add t key t parent this key
|
each argument can only be added once
|
public boolean equals object o if o instanceof dbuser dbuser u dbuser o return id equals u id else return false
|
two users are equal iff their id is equal
|
private void logout login service logout new async callback void override public void on failure throwable caught window alert caught get message override public void on success void result window location reload
|
logs the user out
|
public long get id return key
|
fetches the id primary key of this thesis
|
public dbuser get author persistence manager pm dbuser author user pm get object by id dbuser class author return author user
|
fetches the author of this thesis
|
private void show thesis thesis thesis show thesis thesis get id
|
loads the discussion about the given thesis
|
private void show thesis long thesis id debate service get debate thesis id new async callback debate override public void on success debate result show debate result override public void on failure throwable caught window alert caught get message
|
loads the discussion about the given thesis
|
public void set argument listener argument listener listener this listener listener
|
registers the argument listener
|
public boolean equals object other if other instanceof relex task result return false relex task result x relex task result other if sentence null return x sentence null else if this sentence equals x sentence return false else return true
|
very superficial compare doesnt compare actual parses just the sentence
|
public void push string sentence throws interrupted exception push sentence null
|
submit a new sentence to be processed blocking if no resources are available
|
public void push string sentence entity maintainer entity maintainer throws interrupted exception if entity maintainer null entity maintainer new entity maintainer entity maintainer set entity tagger factory get relex context context pool take callable relex task result callable new relex task count sentence entity maintainer sentence algorithm applier phrase markup context pool future relex task result submit exec submit callable results add submit
|
submit a new sentence to be processed blocking if no resources are available
|
protected relex task result take throws interrupted exception execution exception future relex task result first results take relex task result task result first get perform anaphora resolution hobbs add parse task result result hobbs resolve task result result return task result
|
return the next result in order of submission or blocks until
|
public void shutdown stop true exec shutdown
|
stop accepting requests and shutdown the thread pool after all
|
public void remove group member feature node other remove group member fn other
|
removes a group member and shifts all the others down
|
public void repair group repair group fn
|
repairs this group if it is a member of another group
|
private string get parse element ele string e null node list nl ele get elements by tag name parse if nl null nl get length 0 element el element nl item 0 get the sentence object e get sentence el return e
|
i take an sentence element and read the values in create
|
private string get sentence element emp el string replacement regex 0 9 for each parse element get relations string e get text value emp el relations e e replace first n e e replace all replacement regex if e trim length 0 e null return e
|
i take an parse element and read the values in create
|
public ewahcompressed bitmap this buffer new long defaultbuffersize this rlw new running length word this buffer 0
|
creates an empty bitmap not bit set to true
|
public ewahcompressed bitmap final int buffersize this buffer new long buffersize this rlw new running length word this buffer 0
|
sets explicitly the buffer size in 64 bit words
|
public void add list string fout t for int j 0 j fout t length j list add fout t j
|
adds the given frames to the output list
|
handler method id set knowledge base public void set knowledge base knowledge base kb int index boolean stat kbase kb arrived true if stat arrived index index status stat
|
handler method which gets called by the knowlege base buffer to set the
|
private void request knowledge base int index throws exception default listener manager listner new default listener manager listner add kbb get knowledge base listner invoke all this index
|
used to request a kb from the knowlege base buffer
|
public void not final ewahiterator i new ewahiterator this buffer this actualsizeinwords while i has next final running length word rlw1 i next rlw1 set running bit rlw1 get running bit for int j 0 j rlw1 get number of literal words j i buffer i dirty words j i buffer i dirty words j
|
negate bitwise the current bitmap
|
public boolean set rule name string name rule name name system out println rule name rule name return true
|
will be called by if part of the rule
|
private boolean is already false evaluated condition string condition if false evaluated conditions of existence method contains condition return true return false
|
avoid unnecessary execution of the same condition
|
public void store text rules throws file not found exception ioexception file rule file new file text rules file reader file reader new file reader rule file buffered reader buffered reader new buffered reader file reader rule list new array list string string line null try while line buffered reader read line null if line starts with rule list add line catch ioexception e finally buffered reader close file reader close
|
read text rules and add them to an array list
|
public int add final long newdata return add newdata wordinbits
|
adding words directly to the bitmap for expert use
|
public int add final long newdata final int bitsthatmatter this sizeinbits bitsthatmatter if newdata 0 return add empty word false else if newdata 0l return add empty word true else return add literal word newdata
|
adding words directly to the bitmap for expert use
|
public void build relation count to rule map for int j 0 j converted rules size j int rel count 0 string temp break rule into relations converted rules get j conditions for int k 0 k temp length k string key get key temp k if key null rel count if relation count to rule map contains key rel count relation count to rule map get rel count add j else array list integer rule new array list integer rule add j relation count to rule map put rel count rule
|
build an index which maps number of relations to rules
|
public int size in bits return this sizeinbits
|
returns the size in bits of the uncompressed bitmap represented by this
|
public boolean set size in bits final int size final boolean defaultvalue if size this sizeinbits return false next loop could be optimized further if defaultvalue while this sizeinbits 64 0 this sizeinbits size this set this sizeinbits final int leftover size 64 if defaultvalue false this add stream of empty words defaultvalue size 64 this sizeinbits 64 leftover 0 1 0 else this add stream of empty words defaultvalue size 64 this sizeinbits 64 final long newdata 1l leftover 1l leftover 1 this add literal word newdata this sizeinbits size return true
|
change the reported size in bits of the uncompressed bitmap represented by
|
private boolean reserve final int size if size this buffer length final long oldbuffer this buffer this buffer new long size system arraycopy oldbuffer 0 this buffer 0 oldbuffer length this rlw array this buffer return true return false
|
for internal use trading off memory for speed
|
private string get key string relation string key null if relation contains p set test concept var string temp2 relation split try string head temp2 1 split 0 key head catch exception e e print stack trace return key
|
extract the header portion of a relation
|
private void push back final long data if this actualsizeinwords this buffer length final long oldbuffer this buffer this buffer new long oldbuffer length 2 system arraycopy oldbuffer 0 this buffer 0 oldbuffer length this rlw array this buffer this buffer this actualsizeinwords data
|
for internal use
|
private void push back final long data final int start final int number while this actualsizeinwords number this buffer length final long oldbuffer this buffer this buffer new long oldbuffer length 2 system arraycopy oldbuffer 0 this buffer 0 oldbuffer length this rlw array this buffer system arraycopy data start this buffer this actualsizeinwords number this actualsizeinwords number
|
for internal use
|
private void negative push back final long data final int start final int number while this actualsizeinwords number this buffer length final long oldbuffer this buffer this buffer new long oldbuffer length 2 system arraycopy oldbuffer 0 this buffer 0 oldbuffer length this rlw array this buffer for int k 0 k number k this buffer this actualsizeinwords k data start k this actualsizeinwords number
|
for internal use
|
private int add empty word final boolean v final boolean noliteralword this rlw get number of literal words 0 final long runlen this rlw get running length if noliteralword runlen 0 this rlw set running bit v if noliteralword this rlw get running bit v runlen running length word largestrunninglengthcount this rlw set running length runlen 1 return 0 push back 0 this rlw position this actualsizeinwords 1 this rlw set running bit v this rlw set running length 1 return 1
|
for internal use
|
private int add literal word final long newdata final long numbersofar this rlw get number of literal words if numbersofar running length word largestliteralcount push back 0 this rlw position this actualsizeinwords 1 this rlw set number of literal words 1 push back newdata return 2 this rlw set number of literal words numbersofar 1 push back newdata return 1
|
for internal use
|
public int cardinality int counter 0 final ewahiterator i new ewahiterator this buffer this actualsizeinwords while i has next running length word localrlw i next if localrlw get running bit counter wordinbits localrlw get running length for int j 0 j localrlw get number of literal words j long data i buffer i dirty words j for int c 0 c wordinbits c if data 1l c 0 counter return counter
|
reports the number of bits set to true
|
public string to debug string string ans ewahcompressed bitmap size in bits this sizeinbits size in words this actualsizeinwords n final ewahiterator i new ewahiterator this buffer this actualsizeinwords while i has next running length word localrlw i next if localrlw get running bit ans localrlw get running length 1x11 n else ans localrlw get running length 0x00 n ans localrlw get number of literal words dirties n for int j 0 j localrlw get number of literal words j long data i buffer i dirty words j ans t data n return ans
|
a more detailed string describing the bitmap useful for debugging
|
public void convert rules converted rules new array list rule for int i 0 i rule list size i string tokens convert conditional part rule list get i i converted rules add build rule i rule list get i tokens
|
convert text rules to the drools rule format and add them to an
|
private string get key string relation string key null if relation contains p test concept var string temp2 relation split try string head temp2 1 split 0 key head catch exception e e print stack trace return key
|
extract the header portion of a relation
|
public void add item binary item i m items add i
|
add an item to this item set
|
public void add item binary item i m items add i collections sort m items
|
add an item to this item set
|
public void set support int support m support support
|
set the support for this item set
|
public int get all conf collections sort m items m all conf m support m items get 0 get frequency return m all conf
|
get the all confidence of this item set support maximum item support
|
public int get support return m support
|
get the support of this item set
|
public binary item get item int index return m items get index
|
get a particular item from this item set
|
public int number of items return m items size
|
get the number of items in this item set
|
public string to string string buffer buff new string buffer iterator binary item i m items iterator while i has next buff append i next to string buff append m support return buff to string
|
get a textual description of this item set
|
public object clone array list binary item items new array list binary item m items return new frequent binary item set items m support
|
make a copy of this item set
|
private ewahcompressed bitmap select possible rules ewahcompressed bitmap map new ewahcompressed bitmap frame indexes new array list integer for frame object f frames int idx find frame list f while idx 1 map map or frame bitmap idx frame indexes add idx system out println idx idx find frame list f return map
|
perform or operation on frame rule bitmaps of matching frame templates to obtain
|
public frequent binary item set get item set int index return m sets get index
|
get an item set
|
public int get number of transactions return m number of transactions
|
get the total number of transactions in the data that the item
|
public void add item set frequent binary item set set to add m sets add set to add
|
add an item set
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.