input
stringlengths
10
828
output
stringlengths
5
107
public object parse qname qname class value type string value for value writer vw writers if vw supports qname get namespace uri qname get local part value type return vw parse qname get namespace uri qname get local part value return null
find the first value writer which supports the given property and use it
public date and seconds get locked until long default seconds long max seconds long l get seconds if l null if default seconds null return add seconds default seconds else if max seconds null return add seconds max seconds else return add seconds 60l default default else if max seconds null if get seconds max seconds return add seconds max seconds else return add seconds l else return add seconds l
returns a current object which holds the expected end date time based
public void set tag object auth tag tag auth tag
set after a successful authenticate method with a not null value
public void set nonce stale boolean nonce stale this nonce stale nonce stale
set by digest auth processing
public void test generate digest2 system out println test generate digest2 digest response dr new digest response method propfind user realm zwy5 ntdm zdgt zjg1 oc00 nzhh ltg4 mjct mz bl nz rm mgnj nte4 webdav secure auth 00000001 7cfd3b057b80f1d9e2ff691f926c31f5 string resp generator generate digest dr password system out println server resp resp system out println expected 2bd4ead0c52ff8191c2a0464a6e80fbb assert equals 2bd4ead0c52ff8191c2a0464a6e80fbb resp system out println
this matches the data in milton test secure folder
public void test parse without seconds throws date parse exception date dt date utils parse date sun 28 mar 2010 01 00 gmt system out println dt get time assert equals 1269738000000l dt get time
see http www
protected void register named filter string key ifilter filter log info register filter filter get class get name for key key this named filter map put key filter add corresponding schema to main model this semfs instance add to model filter
registers the new filter for the given key
private void check handle ifile handle vh throws illegal file handle exception if this open handles contains vh throw new illegal file handle exception
checks that handle is open and ready
public void add cookie cookie cookie this cookies add element cookie
adds the specified cookie to the response
public boolean contains header string name return this headers contains key name to upper case
checks whether the response message header has a field with the specified
public void send error int sc string msg throws ioexception set status sc this status message msg this writer null this servlet stream null set content type text html get writer println html head title msg title head body msg body html
sends an error response to the client using the specified status code and
public void set status int sc this status sc
sets the status code for this response
public void set header string name string value array list values new array list values add value synchronized this headers this headers put name to upper case values
adds a field to the response header with the given name and value
public string get character encoding return this encoding null http unit utils default character set this encoding
returns the name of the character set encoding used for the mime body
public void set content type string type string type and encoding http unit utils parse content type header type this content type type and encoding 0 if type and encoding 1 null this encoding type and encoding 1
sets the content type of the response the server sends to the client
public print writer get writer throws unsupported encoding exception if this servlet stream null throw new illegal state exception tried to create writer output stream already exists if this writer null this output stream new byte array output stream this writer new print writer new output stream writer this output stream get character encoding return this writer
returns a code print writer code object that you can use to send
public void add header string name string value synchronized this headers string key name to upper case array list values array list this headers get key if values null values new array list this headers put key values values add value
adds a response header with the given name and value
public boolean is committed return this committed
returns a boolean indicating if the response has been committed
public void flush buffer throws ioexception this committed true
forces any content in the buffer to be written to the client
public void set locale locale locale this locale locale if this encoding null for iterator it encoding map entry set iterator it has next map entry entry map entry it next string locales string entry get value if locales index of locale get language 0 locales index of locale to string 0 this encoding string entry get key return
sets the locale of the response setting the headers including the
public void reset buffer if this committed throw new illegal state exception may not reset buffer after response is committed this output stream null this servlet stream null this writer null
clears the content of the underlying buffer in the response without
protected http response execute wrapper http request base base throws sardine exception try if this auth enabled credentials creds this client get credentials provider get credentials auth scope any string value basic new string base64 encode base64 new string creds get user principal get name creds get password get bytes base set header authorization value return this client execute base catch ioexception ex base abort throw new sardine exception ex
small wrapper around http client
public vector2 check for collision linear function other if this point equals other point return this point if this direction other direction return null equation a lambda x x mu y a2 x2 y2 a1 x1 y1 lambda b1 y2 y1 b2 double lambda this point y other point y other direction y this point x other point x other direction x this direction x other direction y other direction x this direction y if lambda 0 lambda max lambda return null return f lambda
returns the point of collision or else null
public void optimize linked list t temp get all clear all for t t temp insert t
optimizes the structure of the tree after heavy changes
public vector2 check for collision linear function other if this point equals other point return this point if this direction other direction return null equation a lambda x x mu y a2 x2 y2 a1 x1 y1 lambda b1 y2 y1 b2 double lambda this point y other point y other direction y this point x other point x other direction x this direction x other direction y other direction x this direction y return f lambda
returns the point of collision or else null
protected vector2 f double lambda return new vector2 point x lambda direction x point y lambda direction y
returns the point for the given lambda
public void set vector vector2 vec this set x vec get x this set y vec get y
replace coordinates by another vector
public double get abs return math sqrt this x this x this y this y
calculate the absolute value norm of the vector
public void init swing utilities invoke later new runnable public void run instance set visible true
initialize graphical user interface
private double floor double number if math abs number 0 0000000000000001 return 0 else return number
round to 0 if number is epsilon 0
public vector2 add with change vector2 summand this x summand get x this y summand get y return this
add another vector add x y coordinates of each
public vector2 add without change vector2 summand return new vector2 this x summand get x this y summand get y
add another vector add x y coordinates of each
public vector2 subtract with change vector2 summand this x summand get x this y summand get y return this
subtract another vector subtract x y coordinates of each
public vector2 subtract without change vector2 summand return new vector2 this x summand get x this y summand get y
subtract another vector add x y coordinates of each
private void compute functions ab new linear function with end a b bc new linear function with end b c cd new linear function with end c d da new linear function with end d a
computes the functions for the given points
public vector2 multiply with change double factor x factor y factor return this
multiply with a scalar
private void compute properties vector2 temp a add without change b add without change c add without change d temp multiply with change 0 25 middle temp width int b x a x height int c y b y
computes the middle point of the object
public void normalise throws vector not normisable exception if this x 0 this y 0 try throw new vector not normisable exception all coordinates equal zero catch vector not normisable exception e throw e double temp math sqrt this x this x this y this y this x temp this y temp
normalise the vector norm 1
public boolean check if both positive if this get x 0 this get y 0 return false else return true
return true if x and y coordinates are 0
private boolean filter umlbean bean if bean instanceof umltagged value bean instanceof umlstereotype return true return false
filter tagged value and stereotypes beans
public void load progress monitor new progress monitor my progress monitor this loading solution 0 100 progress monitor set progress 0 task aodbuilder runner get instance file name task add property change listener this set parser resource file constants parser english task execute
invoked when the user presses the start button
public void run iaction action welcome welcome welcome get instance welcome set visible true
the action has been activated
public void set config file pattern string pattern this config file pattern pattern
sets the pattern
public double double value return d
get the value as a double
public int serial return serial
get the serial number from the pid
public void encode otp output stream buf buf write double this d
convert this double to the equivalent erlang external representation
public int creation return creation
get the creation number from the pid
public boolean equals object o if o instanceof otp erlang double return false otp erlang double d otp erlang double o return this d d d
determine if two floats are equal
public string node return node
get the node name from the pid
public string to string return pid node to string id serial
get the string representation of the pid
public int arity if elems null return 0 else return elems length
get the arity of the list
public void encode otp output stream buf buf write pid node id serial creation
convert this pid to the equivalent erlang external representation
public string string value return str
get the actual string contained in this object
public long long value return val
get this number as a long
public otp erlang object element at int i if i arity i 0 return null return elems i
get the specified element from the list
public void encode otp output stream buf buf write string str
convert this string to the equivalent erlang external representation
public boolean equals object o if o instanceof string return this str compare to string o 0 else if o instanceof otp erlang string return this str compare to otp erlang string o str 0 return false
determine if two strings are equal
public boolean equals object o if o instanceof otp erlang pid return false otp erlang pid pid otp erlang pid o return this creation pid creation this serial pid serial this id pid id node compare to pid node 0
determine if two pids are equal
public string to string string buffer s new string buffer int arity arity s append for int i 0 i arity i if i 0 s append s append elems i to string s append return s to string
get the string representation of the list
public otp erlang object reason return this reason
get the reason associated with this exit signal
public otp erlang pid pid return this pid
get the pid that sent this exit
public void encode otp output stream buf int arity arity if arity 0 buf write list head arity for int i 0 i arity i buf write any elems i buf write nil
convert this list to the equivalent erlang external
public int port return this port
get the port number used by this node
protected void set epmd java net socket s this epmd s
set the epmd socket after publishing this nodes listen port to
public int arity return elems length
get the arity of the tuple
public boolean equals object o if o instanceof otp erlang list return false otp erlang list l otp erlang list o int a this arity if a l arity return false for int i 0 i a i if this elems i equals l elems i return false early exit return true
determine if two lists are equal
public string to string int i string buffer s new string buffer int arity elems length s append for i 0 i arity i if i 0 s append s append elems i to string s append return s to string
get the string representation of the tuple
public void encode otp output stream buf int arity elems length buf write tuple head arity for int i 0 i arity i buf write any elems i
convert this tuple to the equivalent erlang external representation
public string to string return port node id
get the string representation of the port
public boolean equals object o if o instanceof otp erlang tuple return false otp erlang tuple t otp erlang tuple o int a this arity if a t arity return false for int i 0 i a i if this elems i equals t elems i return false early exit return true
determine if two tuples are equal
public void encode otp output stream buf buf write port node id creation
convert this port to the equivalent erlang external representation
public otp peer peer return peer
get information about the node at the peer end of this
public void encode otp output stream buf buf write long this val
convert this number to the equivalent erlang external
public boolean equals object o if o instanceof otp erlang port return false otp erlang port port otp erlang port o return this creation port creation this id port id node compare to port node 0
determine if two ports are equal
public boolean equals object o if o instanceof otp erlang long return false otp erlang long l otp erlang long o return this val l val
determine if two numbers are equal
public string atom value return atom
get the actual string contained in this object
public otp self self return self
get information about the node at the local end of this
public boolean boolean value return boolean value of atom value boolean value
the boolean value of this atom
public string get recipient name return to name
p get the name of the recipient for this message
public string to string if atom needs quoting atom return escape special chars atom else return atom
get the printname of the atom represented by this object
public int msg count return queue get count
return the number of messages currently waiting in the receive
public boolean equals object o if o instanceof otp erlang atom return false otp erlang atom atom otp erlang atom o return this atom compare to atom atom 0
determine if two atoms are equal
public void encode otp output stream buf buf write atom this atom
convert this atom to the equivalent erlang external representation
public void un publish port unregister with epmd otp epmd un publish port this close the local descriptor if we have one try if super epmd null super epmd close catch ioexception e ignore close errors super epmd null
unregister the server nodes name and port number from the erlang
public otp erlang pid get sender pid return from
p get the pid of the sender of this message
public int size return bin length
get the size of the binary
public void remote status string node boolean up object info
notify about remote node status changes
public object get object return from byte array this bin
get the java object from the binary
public void local status string node boolean up object info
notify about local node exceptions
public string to string return bin bin length
get the string representation of this binary object
public void conn attempt string node boolean incoming object info
notify about failed connection attempts
public otp erlang pid self return self
p get the identifying
public void encode otp output stream buf buf write binary this bin
convert this binary to the equivalent erlang external representation
public boolean equals object o if o instanceof otp erlang binary return false otp erlang binary bin otp erlang binary o int size this size if size bin size return false for int i 0 i size i if this bin i bin bin i return false early exit return true
determine if two binaries are equal
public int get pos return count
get the current position in the stream
public void write byte b if count size system err println expanding buffer from size to size default increment byte tmp new byte size default increment system arraycopy buf 0 tmp 0 count size default increment buf tmp buf count b
write one byte to the stream
public void write byte buf if count buf length size system err println expanding buffer from size to buf length size default increment byte tmp new byte size buf length default increment system arraycopy this buf 0 tmp 0 count size default increment buf length this buf tmp system arraycopy buf 0 this buf count buf length count buf length
write an array of bytes to the stream
public void write1 long n write byte n 0xff
write the low byte of a value to the stream
public void write n byte bytes write bytes
write an array of bytes to the stream
public void send otp erlang pid to otp erlang object msg try string node to node if node equals home node home deliver new otp msg to otp erlang object msg clone else otp cooked connection conn home get connection node if conn null return conn send self to msg catch exception e
send a message to a remote