input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
protected void write namespace string ns uri determine namespace uri writeln 1 p the namespace of the vocabulary as a string p writeln 1 public static final string ns ns uri writeln 1 writeln 1 p the namespace of the vocabulary as a string p writeln 1 see ns writeln 1 public static string get uri return ns writeln 1 writeln 1 p the namespace of the vocabulary as a resource p writeln 1 public static final resource namespace model create resource ns writeln 1 | write the string and resource that represent the namespace |
private void count namespace resource r map string integer ns count if r is anon string ns r get name space increment the count for this namespace integer count ns count contains key ns integer ns count get ns new integer 0 integer count1 new integer count int value 1 ns count put ns count1 | record a use of the given namespace in the count map |
protected void write object properties write 1 see net sf gaboto generation vocabulary generator write object properties n string template has value opt prop template get value opt prop template default prop template if is true opt lang rdfs for iterator extends rdfnode i sorted m source list object properties i has next write value resource i next template object property create object property prop write 1 n | write any object properties in the vocabulary |
protected void write datatype properties write 1 see net sf gaboto generation vocabulary generator write datatype properties n string template has value opt prop template get value opt prop template default prop template if is true opt lang rdfs for iterator extends rdfnode i sorted m source list datatype properties i has next write value resource i next template datatype property create datatype property prop write 1 n | write any datatype properties in the vocabulary |
public void test from config file throws exception gaboto configuration gc gaboto configuration from config file assert equals org postgresql driver gc get db driver assert equals org hsqldb jdbc driver gc get db driver | test method for |
protected void write annotation properties write 1 see net sf gaboto generation vocabulary generator write annotation properties n string template has value opt prop template get value opt prop template default prop template if is true opt lang rdfs for iterator extends rdfnode i sorted m source list annotation properties i has next write value resource i next template annotation property create annotation property prop write 1 n | write any annotation properties in the vocabulary |
protected void write ont classes write 1 see net sf gaboto generation vocabulary generator write ont classes n string template has value opt class template get value opt class template default class template for iterator extends rdfnode i sorted m source list classes i has next write value resource i next template ont class create class class write 1 n | write classes as ontology terms |
protected boolean is included resource r boolean accepted false if r is anon string uri r get uri for iterator string j m include uri iterator accepted j has next accepted uri starts with j next return accepted | answer true if the given resource is accepted for presentation in the |
protected string get comment resource r string buffer comment new string buffer collect any rdfs or daml comments attached to the node for node iterator ni m source list objects of property r rdfs comment ni has next rdfnode n ni next node if n instanceof literal comment append literal n get lexical form trim else throw new runtime exception not a literal n for node iterator ni m source list objects of property r daml oil comment ni has next comment append literal ni next node get lexical form trim return comment to string | answer all of the commentary on the given resource as a string |
protected string get value int index m cmd line args index of m cmd line form if index 0 try return m cmd line args get index 1 catch index out of bounds exception e system err println value for parameter m cmd line form not set aborting if m prop null m root has property m prop rdfnode val m root get required property m prop get object if val is literal return literal val get lexical form else return resource val get uri to string not set return null | answer the string value of the parameter if set or null otherwise |
protected resource get resource int index m cmd line args index of m cmd line form if index 0 try return m config get resource m cmd line args get index 1 catch index out of bounds exception e system err println value for parameter m cmd line form not set aborting if m prop null m root has property m prop return m root get required property m prop get resource not set return null | answer the resource value of the parameter if set or null otherwise |
public string get name return scheduler module | gets the name attribute of the scheduler module object |
public array list get services return services | gets the services attribute of the scheduler module object |
public string get name return default module | gets the name of the module |
public string help string buffer sb new string buffer sb append b schedule i text i b stores text in the system for retrieval later n sb append b cancel i all or i b removes all items or a specific item n sb append b events b lists all reminders n sb append if the preference reminderatsignon is set to true you will automatically get a list when you login to aim n return sb to string | describes the usage of the module |
public string help string buffer sb new string buffer sb append default module n this will output a resonse selected randomly from a list of responses n sb append b add response i text i b add a response to the list admin only sb append b remove response i response number i b remove the specified response from the list admin only sb append b list responses b lists the current responses admin only return sb to string | describes the usage of the module |
public boolean retrieve events aimbuddy buddy check for messages array list br array list events get buddy get name if br null string eventlist events br if br size 0 collect the messages for int i 0 i br size i scheduler task st scheduler task br get i eventlist i 1 st get command scheduled st get create date br else eventlist no events scheduled send the list super send message buddy eventlist return true return false | grabs and sends any stored reminders for a buddy |
public void perform service aimbuddy buddy string query if query to lower case starts with schedule handle schedule buddy query else if query to lower case starts with cancel handle cancel buddy query else if query to lower case starts with events if retrieve events buddy send message buddy no events scheduled | handle a messaging query |
public string get name return tic tac toe module | gets the name attribute of the tic tack toe module object |
public string help string buffer sb new string buffer sb append b ttt i buddy i b starts a game with a buddy if buddy is left blank bot will play n sb append b ttt i n i b tells tic tac toe what your move is where n is the place to move n sb append b ttt end b ends a current game n sb append b ttt show b shows the current game n return sb to string | describes the usage of the module |
public void send message unless robot aimbuddy buddy string message if buddy get name equals ignore case bot get username send message buddy message | sends a message unless it is to the computer |
public boolean remove event aimbuddy buddy int i array list br array list events get buddy get name if br null i 0 i br size br remove i return true return false | remove specific reminder |
public string get current player return player current turn | get the current player |
public void add event aimbuddy buddy date event date string command array list br array list events get buddy get name if br null br new array list events put buddy get name br scheduler task st new scheduler task buddy command timer schedule st event date br add st | add a reminder for a buddy |
public string get player name int p return player p | get player name |
public int get player number string p if p equals player 0 return 0 return 1 | get player number |
public string get competitor string p if p equals player 0 return player 1 return player 0 | get the competitor of the current player |
public boolean game over either all the spaces are full or someone won if winner 1 return true for int i 0 i 9 i if board i 3 i 3 return false return true | decide whether the game is over or not |
public string get name return list module | gets the name attribute of the list module object |
public boolean player move string player name int loc if loc 1 loc 9 return false if get current player equals ignore case player name loc loc 1 if board loc 3 loc 3 board loc 3 loc 3 xo current turn current turn current turn 1 2 return true else return false else return false | handle a players move |
public string display moves string b for int i 0 i 3 i y dir for int j 0 j 3 j x dir if board j i b i 3 j 1 else b b board j i b if j 2 b else b n if i 2 b n return b | display the possible moves |
public string get name return babel poetry module | gets the name attribute of the babel module object |
public string help string buffer sb new string buffer sb append b babel n i distortion i i text i b creates poetry from text this may take several seconds n sb append note using n optionally specifies amount to distort meaning max max trials sb append n n b example babel today is a great day to talk to a robot b return sb to string | describes the usage of the module |
private void send group message aimgroup group string message aimbuddy from int told now 0 for list iterator it group get list list iterator it has next aimbuddy next get buddy string it next if next is online super send message next from get name posted to the group get name list message told now else next add message from get name posted to the group get name list message at new date super send message from told told now of group size list members | sends a message to a group of buddies |
public void handle start tag html tag t mutable attribute set a int pos if t html tag a a get attribute html attribute name null a get attribute html attribute name equals t theater stage 1 else if t html tag a stage 1 stage 2 else if t html tag a a get attribute html attribute name null a get attribute html attribute name equals t theater next stage 5 | looks for link t0 for start of first theater |
public void handle start tag html tag t mutable attribute set a int pos if t html tag a valid link string url string a get attribute html attribute href to string int ind url string index of base url this state if ind 0 try string temp url string substring ind base url this state length string code temp substring ind temp index of if codes contains code codes add code grab urltext true catch exception e logger fine parser didn t handle parsing url string cleanly e get message | look for resort name and code |
public array list get times try url url new url url part zipcode logger fine looking for movies for zipcode using url url urlconnection conn url open connection buffered reader br new buffered reader new input stream reader conn get input stream parser delegator pd new parser delegator pd parse br this true catch exception e e print stack trace return this result | grabs the movie times |
public void handle end tag tag t int pos if t html tag table valid text valid text false | looks for the end of table |
public void handle start tag html tag t mutable attribute set a int pos if a get attribute html attribute href null a get attribute html attribute href equals t10 create list false if t html tag a a get attribute html attribute href null string a get attribute html attribute href starts with t create list start a true line a get attribute html attribute href | looks for links t0 to t9 and creates a list |
public void handle text char data int pos if grab urltext true string name new string data trim if name starts with don t see the resort names add name grab urltext false else string line new string data trim ignore the time zone providers if line equals resort name valid link true | grab the resorts when appropriate |
public void handle end tag tag t int pos if t html tag a start a start a false | looks for links |
public void handle text char data int pos if create list start a result result line substring 2 new string data n | grabs the theater text |
public void handle start tag html tag t mutable attribute set a int pos if t html tag title grab title true | looks for start of links paragraphs and hrs |
public string get theaters try url url new url url part zipcode logger fine looking for theaters for zipcode using url url urlconnection conn url open connection buffered reader br new buffered reader new input stream reader conn get input stream parser delegator pd new parser delegator pd parse br this true catch exception e e print stack trace return result return result | grabs a list of theaters |
public string get name return reminder module | gets the name attribute of the reminder module object |
public string help string buffer sb new string buffer sb append b remember i text i b stores text in the system for retrieval later n sb append b forget i all or i b removes all items or a specific item n sb append b remind b lists all reminders n sb append if the preference reminderatsignon is set to true you will automatically get a list when you login to aim n return sb to string | describes the usage of the module |
public boolean retrieve reminders aimbuddy buddy check for messages array list br array list reminders get buddy get name if br null if br size 0 string reminder reminders br collect the messages for int i 0 i br size i reminder i 1 br get i br send the list super send message buddy reminder return true return false | grabs and sends any stored reminders for a buddy |
public void perform service aimbuddy buddy string query if query to lower case starts with remember handle remember buddy query else if query to lower case starts with forget handle forget buddy query else if query to lower case starts with remind if retrieve reminders buddy send message buddy no reminders available | handle a messaging query |
public boolean remove reminder aimbuddy buddy int i array list br array list reminders get buddy get name if br null i 0 i br size br remove i return true return false | remove specific reminder |
public string get name return user administration module | gets the name attribute of the user admin module object |
public string help string buffer sb new string buffer sb append b adduser i buddy i admin b adds a user to the list along with allowing for admin perms n sb append b rmuser i buddy i b removes a user from the list n sb append b denyuser i buddy i b deny a user admin only n sb append b permituser i buddy i b permit a user admin only n sb append b permitmode i mode i b set or display the permitmode admin only n return sb to string | describes the usage of the module |
public string get name return messenger module | gets the name attribute of the messenger module object |
private ssi item find buddy string buddy for ssi item si ssi buddies if si get name equals buddy return si return null | find a buddy in the ssi buddy list by name |
public boolean retrieve messages aimbuddy buddy check for messages if buddy has messages array list messages buddy get messages string message collect the messages for int i 0 i messages size i message messages get i br send the list super send message buddy message check if they should be saved string save pref buddy get preference savemessages if save pref null save pref equals false buddy clear messages return true return false | grabs and sends any stored messages for a buddy when they sign on |
public void perform service aimbuddy buddy string query if query to lower case starts with tell handle tell buddy query else if query to lower case starts with offline handle offline buddy query else if query to lower case starts with clear messages logger info clearing messages for user buddy buddy clear messages super send message buddy messages cleared else if query to lower case starts with show messages if retrieve messages buddy super send message buddy no messages | handle a messaging query |
public boolean warn string title string error msg return true | warn is used for errors that occur |
public boolean progress string message int done int total return true | allow for progress tracking of certain activities in mega model |
public void debug string str | allows for printing of debug information |
public string get name return mega hal module | gets the name attribute of the babel module object |
public string help string buffer sb new string buffer sb append b megahal b commands n sb append b megahaladmin save b saves the megahal brain admin only n sb append b megahaladmin think i n i b sets the think time to n seconds admin only n return sb to string | describes the usage of the module |
public string get name return preference module | gets the name attribute of the preference module object |
public string help string buffer sb new string buffer sb append b listprefs b displays current preferences n sb append b setpref i preference i i value i b sets a preference for the user n sb append n b example setpref zipcode 12345 b n return sb to string | describes the usage of the module |
public string get name return telnet module | gets the name attribute of the list module object |
public string help string buffer sb new string buffer sb append the telnet module does not support commands through this interface n return sb to string | describes the usage of the module |
private aimbuddy get mod buddy aimbuddy mod buddy super get buddy telnet buddy name if mod buddy null mod buddy new aimbuddy telnet buddy name super add buddy mod buddy return mod buddy | returns or creates and returns the mods buddy |
public void handle start tag html tag t mutable attribute set a int pos if t html tag select a get attribute html attribute name null a get attribute html attribute name equals lineup valid select true else if t html tag option valid select a get attribute html attribute value null string code a get attribute html attribute value to string codes add code valid text true | look for lineup dropdown and its values |
public void handle end tag tag t int pos if t html tag select valid select false else if t html tag option valid text false | looks for the end of select and option tags |
private int get next buddy id int next id 0 for ssi item si ssi buddies next id math max next id si get id return next id 1 | gets the next available buddy id |
public void handle text char data int pos if valid text string line new string data trim ignore the time zone providers if line index of time zone 1 line index of none 1 names add line else codes remove codes size 1 | grab the providers when appropriate |
public map get providers hash map result new hash map try url url new url base url this zipcode logger fine looking for prividers for zipcode using url url urlconnection conn url open connection buffered reader br new buffered reader new input stream reader conn get input stream parser delegator pd new parser delegator pd parse br this true if codes size names size for int i 0 i codes size i result put codes get i names get i catch exception e e print stack trace return new hash map return result | uses the parser to return a map of appropriate providers |
public void handle start tag html tag t mutable attribute set a int pos if t html tag hr use text false else if t html tag a in link true else if t html tag p use text result append n else if t html tag table result length 0 use text false found end true | looks for start of links paragraphs and hrs |
public void handle end tag tag t int pos if t html tag a in link false | looks for end of links |
public string get name return buddy management module | gets the name attribute of the buddy management module object |
public string help string buffer sb new string buffer sb append b makeusers b converts all non user buddies to users admin only n sb append b prune buddies b removes all non user buddies admin only n sb append b prune inactive b removes inactive users admin only n return sb to string | describes the usage of the module |
public aimbuddy get buddy string name return this bot aim get buddy name | convience method to call aimsenders get buddy |
public void handle text char data int pos string line new string data trim if ignore line starts with this show if show count 0 found start use text ignore true else if line starts with original airdate use text false found end true result append line else if line starts with future airings use text false found end true else if use text in link line equals result append line | grabs the show info |
public iterator get buddy names return this bot aim get buddy names | convience method to call aimsenders get buddy iterator |
public void add buddy aimbuddy buddy this bot aim add buddy buddy | convience method to call aimsenders add buddy |
public void add buddies list aimbuddies this bot aim add buddies aimbuddies | convience method to call aimsenders add buddies |
public void remove buddy aimbuddy buddy this bot aim remove buddy buddy | convience method to call aimsenders remove buddy |
public void remove buddies list aimbuddies this bot aim remove buddies aimbuddies | convience method to call aimsenders remove buddies |
public void set permit mode int mode this bot aim set permit mode mode | sets the permit mode on the server |
public int get permit mode return this bot aim get permit mode | gets the permit mode that is set on the server |
public string get summary logger fine looking for show show using url url string temp result try urlconnection conn this url open connection buffered reader br new buffered reader new input stream reader conn get input stream parser delegator pd new parser delegator pd parse br this true temp result get result if found start found end temp result catch exception e e print stack trace logger severe e to string return return temp result | grabs the summary info |
public void send message aimbuddy buddy string text this bot aim send message buddy text | convenience method to call aimsenders send message |
public void send warning aimbuddy buddy this bot aim send warning buddy | convenience method to call aimsenders send warning |
public void handle simple tag tag t mutable attribute set a int pos if t html tag br use text result append n | looks for brs and appends newlines |
public void add aimlistener aimlistener listener this bot aim add aimlistener listener | convenience method to call aimsenders add aimlistener |
public aimgroup get group string group name return aimgroup this groups get group name | gets the specified group |
public void handle start tag html tag t mutable attribute set a int pos if found url if grab url try string url string a get attribute html attribute href to string string tokenizer stok new string tokenizer url string string result string while stok has more elements result string stok next element url url new url result string result set url url found url true catch exception e | grabs the shows url when its appropriate |
public enumeration get groups return this groups elements | gets an enum of the groups of the aimbot |
public void handle text char data int pos if found url found text logger finer found text new string data result set show new string data found text true else if new string data trim equals chronologically grab the first link after the chronologically link grab url true else if grab channel string line new string data trim int index line index of if index 0 grab channel false result set channel line substring 0 index | looks for link to show detail |
public void handle error string error string message logger severe error error message | called when aim encounters an error |
public void handle warning aimbuddy enemy int amount if enemy null enemy get name equals anonymous logger info aimbot under attack anonymous raised warning to amount return logger info aimbot under attack enemy get name raised warning to amount retaliate enemy | handle being warned from others |
private void retaliate aimbuddy enemy if enemy has role role enemy enemy add role role enemy aim send message enemy in the end we will remember not the words of our enemies but the silence of our friends else aim ban buddy enemy aim send warning enemy | warn a user and mark them as an enemy |
public void add group aimgroup group this groups put group get name group | adds a group |
public void set show string string show string | set show name |
public void set channel string string channel string | set the channel the show is on |
public void receive error get security token java lang exception e | auto generated axis2 error handler |
public void receive error get security token for delegatee java lang exception e | auto generated axis2 error handler |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.