input stringlengths 10 828 | output stringlengths 5 107 |
|---|---|
public string getfield14 return field14 | gets the value of the field14 property |
public string getfield16 return field16 | gets the value of the field16 property |
public string getfield17 return field17 | gets the value of the field17 property |
public string getfield19 return field19 | gets the value of the field19 property |
public string getfield4 return field4 | gets the value of the field4 property |
public string getfield5 return field5 | gets the value of the field5 property |
public string getfield6 return field6 | gets the value of the field6 property |
public string getfield7 return field7 | gets the value of the field7 property |
public string getfield9 return field9 | gets the value of the field9 property |
public void setfield10 string value this field10 value | sets the value of the field10 property |
public void setfield13 string value this field13 value | sets the value of the field13 property |
public void setfield14 string value this field14 value | sets the value of the field14 property |
public void setfield16 string value this field16 value | sets the value of the field16 property |
public void setfield17 string value this field17 value | sets the value of the field17 property |
public void setfield19 string value this field19 value | sets the value of the field19 property |
public void setfield4 string value this field4 value | sets the value of the field4 property |
public void setfield5 string value this field5 value | sets the value of the field5 property |
public void setfield6 string value this field6 value | sets the value of the field6 property |
public void setfield7 string value this field7 value | sets the value of the field7 property |
public void setfield9 string value this field9 value | sets the value of the field9 property |
private void clear stu labels for jcomponent j lbl stu labels this remove j lbl | clears the frame of all student group labels |
public password authentication byte username byte password | creates a new code password authentication code with the user name and |
public string to string if uuid string null uuid string for int i 0 i uuid bytes length i uuid string integer to string uuid bytes i 0xff 0x100 16 substring 1 uuid string uuid string to upper case return uuid string | returns the string representation of the 128 bit uuid object |
public long get connection id no connection id is used return 1 | retrieves the connection id that is being used in the present connection |
public void on authentication failure byte user name needs to be implemented by the class that extends this class | called when this object attempts to authenticate a client and the |
public int on connect header set request header set reply returns obex http ok by default if it s not implemented by the class that extends this class return response codes obex http ok | called when a connect request is received |
public int on delete header set request header set reply returns obex http not implemented by default if it s not implemented by the class that extends this class return response codes obex http not implemented | called when a delete request is received |
public boolean is trusted device return bluetooth cc is trusted this | determines if this is a trusted device according to the bcc |
public int on get operation op returns obex http not implemented by default if it s not implemented by the class that extends this class return response codes obex http not implemented | called when a get request is received |
public discovery agent get discovery agent if discovery agent null discovery agent new discovery agent bluetooth manager return discovery agent | returns the discovery agent for this device |
public int on put operation op returns obex http not implemented by default if it s not implemented by the class that extends this class return response codes obex http not implemented | called when a put request is received |
public int on set path header set request header set reply boolean backup boolean create returns obex http not implemented by default if it s not implemented by the class that extends this class return response codes obex http not implemented | called when a setpath request is received |
public void set connection id long id connection id not used in this implementation | sets the connection id header to include in the reply packets |
public boolean cancel inquiry discovery listener listener if listener null throw new null pointer exception discovery agent cancel inquiry discovery listener is null listeners remove element listener listener inquiry completed discovery listener inquiry terminated return true | removes the device from inquiry mode |
public l2 capchannel resolve and create l2 capchannel long psm l2 caplink link short local channel id short remote channel id bluetooth cc complete service record short psm link connection handle l2 capchannel factory channel creator l2 capchannel factory services get new long psm return channel creator new l2 capchannel | this method must be used to get connection handle from server side |
public int get byte size if vector null to byte array return data bytes length | christian lorenz added this for the byte parsing process |
public boolean equals object obj check to see if obj is instance of remote device author drazen njers if obj instanceof remote device try remote device remote remote device obj return this get bluetooth address remote get bluetooth address catch exception e return false else return false | determines if two code remote device code s are equal |
public string get friendly name try return bluetooth manager send hci hc read local name catch hciexception e debug println bcc debug level error hciexception local device get friendly name e return null | retrieves the name of the local device |
public boolean authenticate throws ioexception try return bluetooth cc authentication request this catch hciexception e throw new ioexception e get message | attempts to authenticate this code remote device code |
public device class get device class try int dev class num bluetooth manager send hci hc read class of device device class dev class new device class dev class num return dev class catch hciexception e debug println bcc debug level error hciexception local device get device class e return null | retrieves the code device class code object that represents the |
public boolean cancel service search int trans id todo cancel search services return true | cancels the service search transaction that has the specified |
public int get discoverable try byte scan enable bluetooth manager send hci hc read scan enable if scan enable 0x00 return discovery agent not discoverable int iac lap bluetooth manager send hci hc read current iac lap return iac lap catch hciexception e debug println bcc debug level error local device get discoverable failed hciexception e return discovery agent not discoverable | retrieves the local devices discoverable mode |
public void insert element at data element elem int index if value type datalt value type datseq throw new class cast exception if vector null vector vector this get vector vector insert element at elem index | inserts a code data element code at the specified location |
public boolean is authenticated return bluetooth cc is authenticated this | determines if this code remote device code has been authenticated |
public string get bluetooth address try if bd addr string null long bd addr bluetooth manager send hci ip read bd addr bd addr string long to hex string bd addr to upper case while bd addr string length 12 bd addr string 0 bd addr string return bd addr string catch hciexception e debug println bcc debug level error hciexception local device get bluetooth address e return 000000000000 | retrieves the bluetooth address of the local device |
public int get size if value type datalt value type datseq throw new class cast exception if vector null vector this get vector return vector size | returns the number of code data elements code that are present |
public service record get record connection notifier if notifier null throw new null pointer exception connection notifier is null todo check if notifier is a l2 capconnection notifier tini doesn t like this check so it s left out for now l2 capconnection notifier l2cap notifer l2 capconnection notifier notifier service record record l2cap notifer get record if record null throw new illegal argument exception connection notifier was unable to provide a valid service record return record | gets the service record corresponding to a code btspp code |
public void receive hci event inquiry complete byte event packet if event packet 3 0 synchronized cached remote devices cached remote devices remove all elements cached remote devices found remote devices enumeration discovery listeners listeners elements is inquiring false while discovery listeners has more elements discovery listener listener discovery listener discovery listeners next element listener inquiry completed discovery listener inquiry completed listeners remove all elements | christian lorenz this method is called from code bluetooth stack |
public boolean remove element data element elem if value type datalt value type datseq throw new class cast exception if vector null vector vector this get vector return vector remove element elem | removes the first occurrence of the code data element code |
public void close if channel state closed channel state closed if l2cap sender null l2cap sender close l2 capchannel this knjers when closing connection delete out of date records conn log could be deleted by cast l2 capchannel to jsr82 channel using information from conn log record conn handle could be obtained then check count of existing connections over that conn handle if 0 delete record from dev handle and auth devices | this method sets the state of this channel to closed and calls |
public remote device get remote device long remote address return remote device remote devices get new long remote address | christian lorenz resolves a bluetooth address to a remote device |
public void abort throws ioexception int b no 3 packet length byte opcode new byte 3 setting sending packet opcode 0 byte 0xff opcode for obex abort 0xff opcode 1 byte b no 0xff00 8 high byte of packet length opcode 2 byte b no 0xff low byte of packet length sending packet to server dos write opcode debug println bcc debug level verbose abort packet info sent closing streams is close dis close os close dos close closing this object this close | sends an abort message to the server |
public header set get received headers throws ioexception returns the received headers from the server return hdr | returns the headers that have been received during the operation |
public int get response code throws ioexception returns the received response code return response code | returns the response code received from the server |
public byte send hci lc inquiry int access code int inquiry length byte num responses throws hciexception byte time byte inquiry length 1 28 if inquiry length 61 44 time byte 0xff byte data cmd pkt 0x01 0x04 0x05 byte access code 0xff byte access code 8 0xff byte access code 16 0xff time num responses byte result data send hci command packet data return result data 3 | this command will cause the bluetooth device to enter inquiry mode |
public obexclient initialization of bt stack goes here if needed creating rfcomm data link connection create rfcommdlc | constructor for obexclient it is used for establish and close connection |
public vector get vector if value type datalt value type datseq throw new class cast exception if vector null vector new vector int byte count 0 while byte count data bytes length header byte size data element new element new data element data bytes int header byte size byte count byte count new element get byte size vector add element new element return vector | christian lorenz added this |
public byte send hci hc set event filter clear throws hciexception byte data cmd pkt 0x05 0x0c 0x01 0x00 byte result data send hci command packet data return result data 6 | clears all event filters |
public int get response code throws ioexception return resp code | returns the response code received from the server |
public header set create header set creating new header set object header set headers new obexheader set debug println bcc debug level debug header set object created and returning it return headers | creates an javax |
public header set delete header set headers throws ioexception obex delete is not specified in ir da obex or bt obex specifications throw new ioexception obex delete not implemented | performs an obex delete operation |
public byte send hci hc write event filter connection setup byte condition throws hciexception byte data cmd pkt 0x05 0x0c 0x03 0x02 0x00 condition byte result data send hci command packet data return result data 6 | adds connection setup filters for connections from all devices |
public long get connection id connection id is used for multiplexed communication it is optional but if connection id is send it must be the first header in request connection id is not set return 1 | retrieves the connection id that is being used in the present connection |
public byte send hci hc write event filter inquiry result throws hciexception byte data cmd pkt 0x05 0x0c 0x02 0x01 0x00 byte result data send hci command packet data return result data 6 | adds inquiry result filter for all new devices responding to the inquiry process |
public byte send hci hc write event filter inquiry result long bd addr throws hciexception byte data cmd pkt 0x05 0x0c 0x08 0x01 0x02 byte bd addr 0xff byte bd addr 8 0xff byte bd addr 16 0xff byte bd addr 24 0xff byte bd addr 32 0xff byte bd addr 40 0xff byte result data send hci command packet data return result data 6 | adds inquiry result filter for devices with a specific bluetooth address |
public void set authenticator authenticator auth throw new null pointer exception method set authenticator authenticator not implemented | sets the code authenticator code to use with this connection |
public void set connection id long id throw new illegal argument exception method set connection id long not implemented | sets the connection id header to include in the request packets |
public string send hci hc read local name throws hciexception byte data cmd pkt 0x14 0x0c 0x00 byte result data send hci command packet data if result data 6 0x00 int i 0 while i 248 result data i 7 0x00 i return new string result data 7 i else return null | retrieves the name of the local device |
public byte send hci hc write scan enable byte scan type throws hciexception byte data cmd pkt 0x1a 0x0 c 0x01 scan type byte result data send hci command packet data return result data 6 | this command will write the value for the scan enable parameter |
public byte send hci hc write class of device int class of device throws hciexception byte data cmd pkt 0x24 0x0c 0x03 byte class of device 0xff byte class of device 8 0xff byte class of device 16 0xff byte result data send hci command packet data return result data 6 | this command will write the value for the class of device parameter |
public byte send hci hc write current iac lap int iac lap throws hciexception byte data cmd pkt 0x3a 0x0c 0x04 0x01 byte iac lap 0xff byte iac lap 8 0xff byte iac lap 16 0xff byte result data send hci command packet data return result data 6 | this command writes the lap s used to create the inquiry access code |
public long send hci ip read bd addr throws hciexception byte data cmd pkt 0x09 0x10 0x00 byte result data send hci command packet data if result data 6 0x00 return long result data 7 0xff long result data 8 0xff 8 long result data 9 0xff 16 long result data 10 0xff 24 long result data 11 0xff 32 long result data 12 0xff 40 else throw new hciexception read db addr failed status result data 6 | this command will read the value for the bd addr parameter |
private void receive hci event connection complete byte event packet if event packet 3 0 is connected try bluetooth cc connection settings event packet catch bccexception b debug println 1 b get message return l2 caplink conn new l2 caplink this event packet bluetooth cc connection settings event packet debug println 1 hci received connection complete event long to string conn remote address 16 debug println bcc debug level debug hci received connection complete event conn remote address else debug println 1 hci received connection complete event create connection failed event packet 3 | receives information attached to connection complete event |
public double get area if area null area compute area return area | this returns the area of the polygon |
public point get normal return this normal | get the normal vector for this plane |
public double get perimiter return perimiter | this returns the perimiter of the polygon |
public double angle plane c return this normal distance c get normal | computes the dihedral angle between this plane and a given plane |
public boolean is self intersecting if self intersects null self intersects compute self intersects return self intersects | returns true if the polygon self intersects |
public cartesian postmultiply double matrix if matrix length 3 matrix 0 length 3 throw new sphere exception matrix has incorrect dimensions return new cartesian matrix 0 0 this x matrix 0 1 this y matrix 0 2 this z matrix 1 0 this x matrix 1 1 this y matrix 1 2 this z matrix 2 0 this x matrix 2 1 this y matrix 2 2 this z | multiply matrix x this and return the result as a cartesian point |
public cartesian cross cartesian b cartesian a this cartesian c new cartesian a get y b get z a get z b get y a get z b get x a get x b get z a get x b get y a get y b get x return c | compute the cross product of this and b |
public double dot cartesian b return x b x y b y z b z | compute the dot product of this and b |
public cartesian add cartesian b return new cartesian x b x y b y z b z | compute the vector sum this b |
public cartesian smult double s return new cartesian s x s y s z | compute scalar multiplication |
public cartesian sdiv double s return new cartesian x s y s z s | compute scalar division |
public void test get area throws sphere exception system out println get area polygon instance get instance double exp result 3 math pi 4 double result instance get area assert equals true util equals exp result result util tolerance | test of get area method of class com |
public void test get perimiter system out println get perimiter polygon instance get instance double exp result 9 math pi 4 double result instance get perimiter assert equals exp result result | test of get perimiter method of class com |
public void test is self intersecting a system out println is self intersecting a polygon instance get instance boolean exp result false boolean result instance is self intersecting assert equals exp result result | test of is self intersecting method of class com |
public void test is self intersecting b system out println is self intersecting b double x 0 1 math pi point ary new point x 0 0 new point x math pi new point x math pi 2 new point x math pi 2 polygon instance new polygon arrays as list ary boolean exp result true boolean result instance is self intersecting assert equals exp result result | test of is self intersecting method of class com |
public void test get centroid system out println get centroid point a new point math pi 4 0 point b new point math pi 4 math pi 4 point c new point math pi 4 math pi 4 set point s new hash set point s add a s add b s add c point set instance new point set s point exp result new triangle a b c centroid point result instance get centroid assert equals true exp result equals result util tolerance | test of get centroid method of class com |
public void test centroid system out println centroid point a new point 0 0 point b new point 0 math pi 2 point c new point math pi 2 0 triangle instance new triangle a b c point centroid instance centroid assert equals true math abs centroid distance a centroid distance b util tolerance assert equals true math abs centroid distance a centroid distance c util tolerance assert equals true math abs centroid distance b centroid distance c util tolerance | test of centroid method of class com |
public void test area system out println area triangle instance new triangle new point 0 0 new point math pi 2 0 new point 0 math pi 2 double exp result math pi 2 assert equals exp result instance area | test of area method of class com |
public void test get angles system out println get angle a b c triangle instance new triangle new point 0 0 new point math pi 2 0 new point 0 math pi 2 double exp result math pi 2 assert equals exp result instance get angle a assert equals exp result instance get angle b assert equals exp result instance get angle c | test of get angle a method of class com |
public void test get dihedrals system out println get alpha beta gamma triangle instance new triangle new point 0 0 new point math pi 2 0 new point 0 math pi 2 double exp result math pi 2 assert equals exp result instance get alpha assert equals exp result instance get beta assert equals exp result instance get gamma | test of get alpha method of class com |
public void test get normal system out println get normal point exp result new point 0 math pi 2 point result instance get normal assert equals true exp result equals result | test of get normal method of class com |
public void test has next system out println has next map iterator string character instance create instance assert equals true instance has next | test of has next method of class com |
public void test equals system out println equals plane c new plane point origin point north pole assert equals true instance equals c | test of equals method of class com |
public void test length system out println length orthodrome instance new orthodrome point origin point north pole double exp result math pi 2 double result instance length assert equals exp result result | test of length method of class com |
public void test angle a system out println angle a plane a new plane point north pole plane b new plane point origin double exp result math pi 2 double result a angle b assert equals exp result result | test of angle method of class com |
public void test next system out println next character output f o o b a r b a z int index 0 map iterator string character instance create instance while instance has next assert equals output index instance next | test of next method of class com |
public void test get next system out println get insert next linked circle list string instance new linked circle list string instance insert next x string exp result x string result instance get next assert equals exp result result | test of get next method of class com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.