input
stringlengths 10
828
| output
stringlengths 5
107
|
|---|---|
private string get creation date element h2date header if h2date header null return null iterator it h2date header find all elements h2 iterator while it has next element e element it next string class value e get attribute value class if util is string set class value class value contains date header return e extract text return null
|
returns the date when the post was created
|
public string get title element e source find next element 0 title if e null return null string title e extract text return title substring 0 title index of 1
|
gets wiki articles title from the page title
|
private string get description string buffer sb new string buffer element e source get element by id body content if e null return sb to string iterator it e find all elements p iterator int i 0 while it has next element el element it next sb append el extract text append if i 3 break return get content
|
returns the digest of the concept of the wiki article
|
public string get content return get content true
|
geets wiki articles body content
|
private string get content boolean whole content if source null return new string element e source get element by id body content if e null return string content e extract text if whole content false int desc length constant default description length if desc length content length desc length int content length constant default descr to content ratio return content substring 0 desc length return content
|
geets wiki articles body content
|
private string get last modificationdate element e source get element by id lastmod if e null return null string last mod date e extract text return util is string set last mod date last mod date null
|
returns date when current wiki page was modified
|
private void get lang element e source find next element 0 html if e null lang lomanifest language default return string temp e get attribute value xml lang lang util is string set temp temp lomanifest language default
|
sets the language of the media wiki page
|
public boolean has achieved goal taxonomy entry goal todo contains seems not to work correctly works better with calling equals on each item from list for taxonomy entry achieved goal this goals achieved if goal get path from root contains achieved goal return true return false
|
p check whether student has achieved given goal
|
public void add block learning path block new block blocks add new block total locount new block get total locount max duration new block get max duration
|
p adds sub block to the block p
|
public void add blocks set learning path block new blocks for learning path block new block new blocks add block new block
|
p adds set of subblocks to the block p
|
public boolean equals learning object learning object if location equals learning object get location return true return false
|
p checks wheter objects have same location uri
|
public boolean is required learning object lo to check for learning object required lo classification get required los if required lo equals lo to check required lo is required lo to check return true return false
|
p checks whether given learning object is required to complete this lo
|
public boolean check education level education user education if required education get attended institutions is empty return true return user education get attended institutions contains all required education get attended institutions
|
p compares required education against students education given in parameter p
|
public boolean check skill level set skill values to check boolean skill found for skill required skill required skills skill found false skill user skill null for iterator iter values to check iterator iter has next skill found user skill skill iter next skill found user skill same or higher required skill if skill found return false return true
|
p compares required skills against values from collection of users skills p
|
public boolean check prerequisites set taxonomy entry values to check todo change to equals instead of contains works better if values to check size prerequisites size for taxonomy entry required entry prerequisites if values to check contains required entry return false else for taxonomy entry usersachievement values to check if prerequisites contains usersachievement return false return true
|
compares list of los required to start completing given lo
|
public void set endpoint address java lang string port name java lang string address throws javax xml rpc service exception if remote repository equals port name set remote repository endpoint address address else unknown port name throw new javax xml rpc service exception cannot set endpoint address for unknown port port name
|
set the endpoint address for the specified port name
|
public void on module load list set multiple select true list set height 400px list set width 100px seleccionar ruta null root panel get lista puntos add list
|
this is the entry point method
|
private icon get icon string resource class loader cl get class get class loader url url cl get resource resource if url null file file new file resource try url file to uri to url catch malformed urlexception mue mue print stack trace never happens return url null new image icon url null
|
returns an icon
|
public void hyperlink update hyperlink event e if e get event type hyperlink event event type activated url url e get url if url null uimanager get look and feel provide error feedback null else joption pane show message dialog this url clicked n url to string
|
called when a hyperlink is clicked in the text area
|
private completion provider create completion provider create the provider used when typing code completion provider code cp create code completion provider the provider used when typing a string completion provider string cp create string completion provider the provider used when typing a comment completion provider comment cp create comment completion provider create the parent completion provider language aware completion provider provider new language aware completion provider code cp provider set string completion provider string cp provider set comment completion provider comment cp return provider
|
creates the completion provider for a c editor
|
private completion provider create string completion provider default completion provider cp new default completion provider cp add completion new basic completion cp c char prints a character cp add completion new basic completion cp i signed int prints a signed integer cp add completion new basic completion cp f float prints a float cp add completion new basic completion cp s string prints a string cp add completion new basic completion cp u unsigned int prints an unsigned integer cp add completion new basic completion cp n newline prints a newline return cp
|
returns the completion provider to use when the caret is in a string
|
private completion provider create comment completion provider default completion provider cp new default completion provider cp add completion new basic completion cp todo a to do reminder cp add completion new basic completion cp fixme a bug that needs to be fixed return cp
|
returns the provider to use when in a comment
|
public void init super init swing utilities invoke later new runnable public void run string laf uimanager get system look and feel class name try uimanager set look and feel laf catch exception e e print stack trace set root pane new demo root pane
|
initializes this applet
|
public void set visible boolean visible super set visible visible if visible demo root pane get root pane focus editor
|
called when this applet is made visible
|
public void test main system out println main string args null collect main args todo review the generated test code and remove the default call to fail fail the test case is a prototype
|
test of main method of class collect
|
public void focus editor text area request focus in window
|
focuses the text area
|
private void login create method to execute post method method new post method starting url method set parameter domain encrypted method set parameter username riga method set parameter password cr3dit app try int return code client execute method method system out println return code return code system out println session id cookie string catch exception e system err println e finally method release connection
|
this method accesses initial url attempts to login and set session id
|
public void fetch server url string url get method get method new get method url system out println fetching url url try int get result client execute method get method input stream result get method get response body as stream system out println received server response status get result displaying response display output from server result catch exception e system err println e finally get method release connection
|
attempts to request a specified url from the server and output the response
|
private rsyntax text area create text area rsyntax text area text area new rsyntax text area 25 70 text area set caret position 0 text area add hyperlink listener this text area request focus in window text area set mark occurrences true return text area
|
creates the text area for this application
|
private void set text string resource class loader cl get class get class loader buffered reader r null try r new buffered reader new input stream reader cl get resource as stream resource utf 8 text area read r null r close text area set caret position 0 catch runtime exception re throw re find bugs catch exception e text area set text type here to see syntax highlighting
|
sets the content in the text area to that in the specified resource
|
public object get value at int row int column property descriptor prop properties row switch column case 0 return prop get name case 1 return prop get property type case 2 return get access type prop case 3 return new boolean prop is bound default return null
|
this method returns the value that appears at the specified row and
|
protected void check perigee s4 s qoms24 qoms2 t if perigee perigee 156 km if perigee 98 0 s4 20 0 else s4 perigee 78 0 qoms24 math pow 120 s4 earth radius km 4 s4 s4 earth radius km 1 0
|
checks and adjusts the calculation if the perigee is less tan 156 km
|
private double delta et final double year return 26 465 0 747622 year 1950 1 886913 math sin two pi year 1975 33
|
the function delta et has been added to allow calculations on
|
private double radians final double degrees return degrees deg2 rad
|
returns angle in radians from argument in degrees
|
private void apply periodics sinok math sin dsv xnode cosok math cos dsv xnode alfdp sinis sinok betdp sinis cosok dalf ph cosok pinc cosis sinok dbet ph sinok pinc cosis cosok alfdp alfdp dalf betdp betdp dbet dsv xnode mod2 pi dsv xnode xls dsv xll dsv omgadf cosis dsv xnode dls pl pgh pinc dsv xnode sinis xls xls dls xnoh dsv xnode dsv xnode math atan2 alfdp betdp
|
apply periodics with lyddane modification
|
private jpanel get main panel if this main panel null this main panel new jpanel this main panel set layout null this main panel add this get status bar null this main panel add this get circuit tabbed pane null this toolbar panel this toolbar get panel this toolbar panel set bounds new rectangle 0 0 this get width 25 this toolbar panel set visible true this main panel add this toolbar panel null this main panel add this get jtree null this main panel add this get tool tabbed pane null return this main panel
|
this method initializes main panel
|
private jpanel get status bar if this status bar null lbl mouse position new jlabel x y lbl mouse position set bounds 10 0 90 20 this lbl status message new jlabel this lbl status message set bounds 120 0 300 20 this lbl status message set foreground color red this status bar new jpanel this status bar set layout null this status bar set bounds 0 620 990 20 this status bar add lbl mouse position null this status bar add this lbl status message null return this status bar
|
this method initializes status bar
|
public void inc circuit window count this circuit window count
|
increases the circuit window count
|
public void set look and feel string lf try uimanager set look and feel lf swing utilities update component tree ui this catch exception e show message e get message
|
sets the look and feel
|
public void close circuit int tab this toolbar set run simulation enabled false this get circuit stop simulation execute if this is changed tab this ask for save tab this circuit tabbed pane remove tab
|
closes the tab at the given position in the circuit tabbed pane
|
public int get selected tab return this circuit tabbed pane get selected index
|
getter for the selected tab in the circuit tabbed pane
|
public jframe get m frame return this m frame
|
getter for this frame
|
public void set m applet japplet m applet this m applet m applet
|
sets the applet object to this frame
|
public void ele close execute default mutable tree node node default mutable tree node this j tree get last selected path component if node get parent this top this top remove node this j tree update ui
|
this function is responseble to close the selected element file in the
|
private boolean is elements file open string file name for int i 0 i this top get child count i if default mutable tree node this top get child at i get user object equals file name this set status label i18 n get string message elefile ao replace first s file name return true return false
|
checks if the element file with the given file name already is opend
|
public void set toolbar tool bar x toolbar this toolbar x toolbar
|
sets the toolbar
|
public tool bar get toolbar return this toolbar
|
gets the toolbar
|
public jpanel get toolbar panel return this toolbar panel
|
gets the toolbar panel
|
public void close this get menu close
|
sends the close message to the menu
|
public void font chooser execute set event enabled false if this chooser show dialog this get circuit get org font jfont chooser cancel option this get circuit set org font this chooser get font set event enabled true
|
generates a diaolog which can be used to choos the font and other
|
public void set menu menuleiste x menu menu x menu
|
sets the menu
|
public menuleiste get menu return menu
|
getter for the used menu
|
private void set look and feel string lf n try uimanager set look and feel lf n swing utilities update component tree ui this parent popup men neu zeichnen damit look and feel bernommen wird this parent get circuit create popup menu this parent set look and feel lf n catch exception e e print stack trace
|
setzt das look and feel
|
private void initialize this set size new dimension 458 160 this set layout null this set title zeitraster this set background system color control this set content pane this get main panel
|
this method initializes this
|
private jpanel get main panel if this main panel null this main panel new jpanel this main panel set layout null this main panel add this get btn ok null this main panel add this get btn cancel null this main panel add this get jslider null this main panel add this get rbtn freguenz null this label1 new jlabel intervall ms this label1 set bounds 15 15 81 25 this main panel add this label1 null this main panel add this get jspinner null return this main panel
|
this method initializes main panel
|
private jbutton get btn ok if this btn ok null this btn ok new jbutton this btn ok set bounds 335 45 100 20 this btn ok set text bernemen this btn ok set action command ok this btn ok add action listener this adapter return this btn ok
|
this method initializes btn ok
|
private jbutton get btn cancel if this btn cancel null this btn cancel new jbutton this btn cancel set bounds 335 15 100 20 this btn cancel set text abbrechen this btn cancel set action command cancel this btn cancel add action listener this adapter return this btn cancel
|
this method initializes btn cancel
|
private jspinner get jspinner in if this in null this in new jspinner this in model set step size 1 this in model set minimum 0 this in model set maximum max inputs this in model set value this current in value this in set model this in model this in set bounds new rectangle 80 15 50 20 this in set tool tip text i18 n get string tooltip tabproperty in this in add change listener this adapter return this in
|
this method initializes j spinner
|
private jspinner get jspinner out if this out null this out new jspinner this out model set step size 1 this out model set minimum 0 this out model set maximum max outputs this out model set value this current out value this out set model this out model this out set bounds new rectangle 80 45 50 20 this out set tool tip text i18 n get string tooltip tabproperty out this out add change listener this adapter return this out
|
this method initializes j spinner1
|
private jspinner get jspinner state if this state null this state new jspinner this state model set step size 1 this state model set minimum 0 this state model set maximum max states this state model set value this current state value this state set model this state model this state set bounds new rectangle 80 75 50 20 this state set tool tip text i18 n get string tooltip tabproperty state this state add change listener this adapter return this state
|
this method initializes j spinner2
|
private jbutton get btn ok if this btn ok null this btn ok new jbutton this btn ok set bounds new rectangle 200 15 85 25 this btn ok set text ok this btn ok add action listener this adapter return this btn ok
|
this method initializes btn ok1
|
private jbutton get btn cancel if this btn cancel null this btn cancel new jbutton this btn cancel set bounds new rectangle 200 50 85 25 this btn cancel set text cancel this btn cancel add action listener this adapter return this btn cancel
|
this method initializes btn cancel1
|
private jradio button get rb line if this rb line null this rb line new jradio button this rb line set bounds new rectangle 110 15 80 20 this rb line set text linie this rb line add item listener this adapter return this rb line
|
this method initializes rb line
|
private jradio button get rb rect if this rb rect null this rb rect new jradio button this rb rect set bounds new rectangle 110 45 80 20 this rb rect set text rechteck this rb rect add item listener this adapter return this rb rect
|
this method initializes rb rect
|
private jradio button get rb ellipse if this rb ellipse null this rb ellipse new jradio button this rb ellipse set bounds new rectangle 110 75 80 20 this rb ellipse set text ellipse this rb ellipse add item listener this adapter return this rb ellipse
|
this method initializes rb ellipse
|
private jpanel get status bar if this status bar null lbl mouse position new jlabel x y lbl mouse position set bounds 10 0 90 20 this status bar new jpanel this status bar set layout null this status bar set bounds 180 320 100 20 this status bar add lbl mouse position null return this status bar
|
this method initializes status bar
|
private jpanel get new panel if this new panel null this new panel new jpanel this new panel set layout null this new panel set bounds 15 28 182 124 this new panel add this get cmd tab ele null this new panel add this get cmd bool ele null utility set titeled border this new panel i18 n get string caption ele new return this new panel
|
this method initializes new panel
|
private jpanel get change panel if this change panel null this change panel new jpanel this change panel set layout null this change panel set bounds 15 230 182 226 this change panel add this get cmd change name null this change panel add this get cmd del ele null this change panel add this get cmd ele graphic null utility set titeled border this change panel i18 n get string caption ele edit return this change panel
|
this method initializes new panel
|
private jbutton get cmd tab ele if this cmd tab ele null this cmd tab ele new jbutton i18 n get string menu newtabele this cmd tab ele set bounds 15 30 151 30 this cmd tab ele set action command tabellenelement this cmd tab ele add action listener this adapter menu return this cmd tab ele
|
this method initializes cmd tab ele
|
private jbutton get cmd bool ele if this cmd bool ele null this cmd bool ele new jbutton i18 n get string menu newboolele this cmd bool ele set bounds 15 76 151 30 this cmd bool ele set action command boolelement this cmd bool ele add action listener this adapter menu return this cmd bool ele
|
this method initializes cmd bool ele
|
private jbutton get cmd change name if this cmd change name null this cmd change name new jbutton i18 n get string menu changename this cmd change name set bounds 15 30 151 30 this cmd change name set enabled false this cmd change name set action command rename this cmd change name add action listener this adapter menu return this cmd change name
|
this method initializes cmd change name
|
private jbutton get cmd del ele if this cmd del ele null this cmd del ele new jbutton i18 n get string menu delete this cmd del ele set bounds 15 76 151 30 this cmd del ele set enabled false this cmd del ele set action command delete this cmd del ele add action listener this adapter menu return this cmd del ele
|
this method initializes cmd del ele
|
private jbutton get cmd ele graphic if this cmd ele graphic null this cmd ele graphic new jbutton i18 n get string menu graphic this cmd ele graphic set bounds 15 135 151 30 this cmd ele graphic set enabled false this cmd ele graphic set action command graphic this cmd ele graphic add action listener this adapter menu return this cmd ele graphic
|
this method initializes cmd ele graphic
|
private jscroll pane get list view scroll pane if this list view scroll pane null this list view scroll pane new jscroll pane this get list view table this list view scroll pane set bounds 5 0 700 150 return this list view scroll pane
|
this method initializes list view scroll pane
|
private jbutton get btn cancel if this btn cancel null this btn cancel new jbutton this btn cancel set text abbrechen this btn cancel set bounds 16 50 150 25 this btn cancel set action command cancel this btn cancel add action listener this adapter return this btn cancel
|
this method initializes btn cancel
|
private jbutton get btn ok if this btn ok null this btn ok new jbutton this btn ok set text bernehmen this btn ok set bounds 15 15 150 25 this btn ok set action command ok this btn ok add action listener this adapter return this btn ok
|
this method initializes btn ok
|
private jbutton get btn change font if this btn change font null this btn change font new jbutton this btn change font set text i18 n get string button changefont this btn change font set tool tip text i18 n get string tooltip changefont this btn change font set bounds 15 300 150 25 this btn change font set action command change font this btn change font add action listener this adapter return this btn change font
|
this method initializes btn change font
|
private jcheck box get cb raster if this cb grid null this cb grid new jcheck box this cb grid set text i18 n get string button align grid this cb grid set bounds 10 335 160 20 this cb grid set selected x raster align this cb grid add item listener this adapter return this cb grid
|
this method initializes cb raster
|
private jcheck box get cb ein aus if this cb in out null this cb in out new jcheck box this cb in out set text i18 n get string button show inout this cb in out set bounds 10 360 160 20 this cb in out set selected true this cb in out add item listener this adapter return this cb in out
|
this method initializes cb ein aus
|
private jcheck box get cb zoom if this cb zoom null this cb zoom new jcheck box this cb zoom set text i18 n get string button zoom this cb zoom set bounds 10 385 150 20 this cb zoom add item listener this adapter return this cb zoom
|
this method initializes cb zoom
|
public void add registro acesso dependencia fisica autorizada value if value null super add value value orm adapter
|
add the specified persistent object to ormset
|
public void remove registro acesso dependencia fisica autorizada value super remove value value orm adapter
|
remove the specified persistent object from ormset
|
public boolean contains registro acesso dependencia fisica autorizada value return super contains value
|
return true if ormset contains the specified persistent object
|
private void init throws exception tipo usuario row set set data source name java comp env jdbc ilocate my sql tipo usuario row set set command select from tipo usuario tipo usuario row set set table name tipo usuario
|
p automatically managed component initialization
|
private void init throws exception radio button group1 default options set options new com sun webui jsf model option new com sun webui jsf model option masculino masculino new com sun webui jsf model option feminino feminino
|
p automatically managed component initialization
|
override protected void startup show new semillas 609 dev view this
|
at startup create and show the main frame of the application
|
public line transformer get cleared clone string pre filter if this filter pattern null pre filter this filter pattern pattern line transformer copy new line transformer this use separator this column count this max row count this reg expressions this separator pre filter this caller return copy
|
returns a copied new instance of the current instance but with cleared
|
private void start reloading if this get is reloading string s this j text field reload get text if this timer null this timer new refresh timer this timer start if this check user input return int i integer parse int s does not throw an exception because of check user input befor this timer set refresh time i this timer resume refreshing else if this timer null this timer suspend refreshing
|
starts reloading of table
|
private boolean get is reloading boolean b1 this j check box on is selected boolean b2 this j check box reload is selected boolean b3 this is visible if b1 b2 b3 return true if this j dialog search results html null boolean b4 this j dialog search results html is automatic export switched on if b1 b2 b4 return true return false
|
if the automatic export to html xml file is activated then the
|
private void load string file content load line by line if this loader null this loader stop loading this loader new file loader file content this loader start
|
loads the table with a single string
|
private void load java util list files if files null return if this loader null this loader stop loading this loader new file loader files try this loader start catch exception e j label current status set text html font color red error loading files e get message font html
|
loads files into the table
|
private void load throws export exception j label current status set text loading table this load table j label current status set text done
|
loads the piped output from smart tail
|
public boolean copy string file1 string file2 throws ioexception file f1 new file file1 file f2 new file file2 return this copy f1 f2
|
copies binary and text files using data input stream
|
public void add directory string dir if this directories contains dir this directories add dir
|
adds a directory
|
public void set directories list dirs if this directories null this directories clear else this directories dirs
|
set the directories
|
public string get exclude expression if this pattern exclude null return null string exclude expression this pattern exclude pattern return exclude expression
|
returns the exclude expression as string
|
public void set run mode tail boolean b this run mode tail b
|
sets the run mode of the programm tail or grep
|
public void add tails while tailing list files to add if can add or remove tail while tailing return added base tails loader loader new added base tails loader files to add loader start
|
used by the directory polling process
|
public void remove tails while tailing list files to remove if can add or remove tail while tailing return list l new array list iterator it this file tails iterator while it has next base tail tail base tail it next string file ofe existing tail tail get file if files to remove contains file ofe existing tail l add tail logger finer this to string short marked tail for clean up file file ofe existing tail this stop running l
|
used by the directory polling process
|
public void set files list files this files files
|
sets the files
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.