input
stringlengths
10
828
output
stringlengths
5
107
public void handle open file application event evt string file evt get filename fido frame globals active window load file
respond to an user double clicking on a fcd file
public void handle preferences application event evt fido frame globals active window show prefs
respond to an user clicking on the preferences menu
public int get text font size for int i 0 i primitive vector size i return graphic primitive primitive vector get i get macro font size return macro font size
get the size of the font used for all macros
public void select cursor switch action selected case none case selection default set cursor cursor get predefined cursor cursor default cursor break case zoom case hand set cursor cursor get predefined cursor cursor hand cursor break case line case text case bezier case polygon case complexcurve case ellipse case rectangle case connection case pcb line case pcb pad set cursor cursor get predefined cursor cursor crosshair cursor
define the icon used for the mouse cursor depending on the current
public boolean needs holes return false
this function should be redefined if the graphic primitive needs holes
public int unmap xnosnap int x int xc xc int x x center x magnitude return xc
un map the x screen coordinate given in the drawing coordinate
public int unmap ynosnap int y int yc yc int y y center y magnitude return yc
un map the y screen coordinate given in the drawing coordinate
public int unmap xsnap int x int xc xc int x x center x magnitude perform the snapping if snap active xc int double xc x grid step 5 xc x grid step return xc
un map the x screen coordinate given in the drawing coordinate
public int unmap ysnap int y int yc yc int y y center y magnitude if snap active yc int double yc y grid step 5 yc y grid step return yc
un map the y screen coordinate given in the drawing coordinate
public double get valor previsto return valor previsto
getter of the property tt valor previsto tt
public void set valor previsto double valor previsto this valor previsto valor previsto
setter of the property tt valor previsto tt
public date get data prevista return data prevista
getter of the property tt data prevista tt
public void set data prevista date data prevista this data prevista data prevista
setter of the property tt data prevista tt
public grupo get grupo return grupo
getter of the property tt grupo tt
public string get observacao return observacao
getter of the property tt observacao tt
public void set observacao string observacao this observacao observacao
setter of the property tt observacao tt
public periodo get periodo return periodo
getter of the property tt periodo tt
public void set xval int col this xval col
a setter method for for a column number xaxis
public void set yval int row this yval row
a setter method for for a row number yaxis
public void print head for int col 0 col this colnames length col system out print this colnames col to upper case t system out println
a method to print column headings
public void set vector float nums this datavec nums
a setter method for for a vector of a neuron
public void set name string local this name local
a setter method for for a name label of a neuron
public void print data while this cells 0 is empty for int col 0 col this colnames length col system out print this cells col remove 0 to string t system out println
a method to print the data row wise
public void set log user string newuser this login user newuser
a setter method to set the login user
public double get euc dist neuron compare double sum 0 for int h 0 h this datavec length h sum this datavec h compare get vector h this datavec h compare get vector h double distance math sqrt sum return distance
a getter method to return the euclidian distance between two neurons
public void set log pwd string newpwd this login passwd newpwd
a setter method to set the login password
public int get xval return this xval
a getter method to return x axis value of a neuron
public void set dburl string newurl this login url newurl
a setter method to set the database url
public int get yval return this yval
a getter method to return y axis value of a neuron
public string get log pwd return this login passwd
a getter method to return the password for the database user
public string get dburl return this login url
a getter method to return the url of the database
public result set meta data get metadata return this meta
a getter method to return the meta data of a database query
public int get rows return this rownum
a getter method to return the number of rows
public void set value float value int col int row grid row col value
a setter method for a float value in the grid
public int get cols return this varlength
a getter method to return the number of columns
public void set value double value int col int row grid row col float value
a setter method for a double value in the grid
public void set cell size double newcellsize this cell size newcellsize
a setter method for the cellsize of the grid
public void set x double newx this x newx
a setter method to set the x value
public void set y double newy this y newy
a setter method to set the y value
public int get cols return grid 0 length
a getter method to return the number of columns in the grid
public void set z double newz this z newz
a setter method to set the z value
public int get rows return grid length
a getter method to return the number of rows in the grid
public double get cell size return cell size
a getter method to return the distance between two neighboring rows or columns
public void normalize final double length this get length this x length this y length this z length
normalize the length of the vector
public double get length return math sqrt x x y y z z
a getter method to return the length of the vector
public double scalar product vector3 d v return v x this x v y this y v z this z
a getter method to compute the scalar vector with a second vector
public void set dim int newdim this dimension newdim
a setter method for the dimensions of the umatrix
public void set xaxis int newxaxis this xaxis newxaxis
a setter method for the x axis of the umatrix
public void set yaxis int newyaxis this yaxis newyaxis
a setter method for the y axis of the umatrix
public void set dimens int newdim this dimension newdim
a setter method to set the dimension
public void set xaxis int newx this xaxis newx
a setter method to set the xaxis value of the grid
public void set neighb string newneigh this neighborh newneigh
a setter method for the neighborhood of the umatrix
public void set yaxis int newy this yaxis newy
a setter method to set the yaxis value of the grid
public void set neurons vector neuron newneurons this neurons newneurons
a setter method for the neurons of the umatrix
public void set grid float newgrid this grid newgrid
a setter method for the grid of the umatrix
public void set datagrid grid newdatagrid this datagrid newdatagrid
a setter method to set the datagrid component plane values
public void set umat grid newgumat this gumat newgumat
a setter method for the grid umatrix of the umatrix
public void set neigh string newneigh this neighborh newneigh
a setter method to set the neighborhood description gaussion bubble
public int get xaxis return this xaxis
a getter method to return the xaxis in the umatrix
public int get yaxis return this yaxis
a getter method to return the yaxis in the umatrix
public int get dim return this dimension
a getter method to return the dimension in the umatrix
public string get topol return this topology
a getter method to return the topology of the umatrix
public string get neighb return this neighborh
a getter method to return the neighborhood of the umatrix
public grid get data return this datagrid
a getter method to return the datagrid of the component plane
public grid get gumat return this gumat
a getter method to return the dem of a umatrix
public void read packet byte buffer in pkt type in get byte x in get short y in get short size in get unsigned byte x int double x 256 setup width 0 5 y int double y radar height setup height 0 5
reads the packet type x y and size
public void set writing if writing mark buffer position buffer mark buffer position buffer limit buffer limit buffer capacity writing true
sets the buffer to start writing
public void set reading if writing buffer limit buffer position buffer position mark writing false
sets the buffer to start reading
public int write packet datagram channel channel throws ioexception set reading return channel write buffer
writes from this buffer into the channel
public int send packet datagram channel channel socket address address throws ioexception set reading return channel send buffer address
sends all remaining bytes in this buffer
public void position int pos buffer position pos
sets the buffers position
public void compact buffer compact mark 0 writing true
compacts the buffer and sets writing mode
public byte buffer wrap put byte byte b set writing buffer put b return this
puts a byte into this buffer
public byte buffer wrap put bytes byte bytes set writing buffer put bytes return this
puts an array of bytes into this buffer
public byte buffer wrap put bytes byte buffer wrap bytes set writing bytes set reading buffer put bytes buffer return this
puts another buffers bytes into this buffer
public byte buffer wrap put char char c set writing buffer put char c return this
puts a character into this buffer
public byte buffer wrap put short short s set writing buffer put short s return this
puts a short into this buffer
public byte buffer wrap put int int i set writing buffer put int i return this
puts an integer into this buffer
public byte buffer wrap put long long l set writing buffer put long l return this
puts a long into this buffer
public byte buffer wrap put string string str set writing try buffer put str get bytes us ascii if str ends with string value of char end of string buffer put end of string catch exception e e print stack trace return this
puts a string into this buffer
public byte get byte set reading return buffer get
reads a byte from this buffer
public short get unsigned byte return utilities get unsigned byte get byte
reads an unsigned byte from this buffer
public char get char set reading return buffer get char
reads a character from this buffer
public short get short set reading return buffer get short
reads a short integer from this buffer
public bit vector set bit int bit index boolean value if value bytes byte index bit index get mask bit index else bytes byte index bit index get mask bit index return this
sets the desired bit on or off
public int get unsigned short return utilities get unsigned short get short
reads an unsigned short integer from this buffer
public bit vector switch bit int bit index bytes byte index bit index get mask bit index return this
switches the value of the desired bit
public int get int set reading return buffer get int
reads an integer from this buffer
public bit vector set bits for int i 0 i bytes length i bytes i 0 return this
turns on all of the bits in this bit vector
public long get long set reading return buffer get long
reads a long integer from this buffer
public e add holder super e holder if size list size list add factory new instance system out println increased holder list size to size 1 e temp list get size holder set temp temp set from holder return temp
stores the specified data into the list
public string get string throws string read exception set reading string builder temp new string builder byte ch boolean ends with null false do if buffer remaining 0 ch buffer get if ch end of string ends with null true temp append char ch else system out println error reading string string so far for byte c b to string get bytes so far string format x c system out println so far get string has read n so far throw string read exception while ch end of string return temp to string
reads a string from this buffer
private void net read udpbuffer in throws socket timeout exception while true in clear receive packet in byte pkt type in peek byte if pkt type packet pkt start system out println quit packets system out println packet type pkt type break int loop in peek int 1 if loop last loops break packet is ok else packet out of order drop it system out println packet out of order
reads a packet into an input buffer
public void render int center x int center y int x radius int y radius graphics2 d g2d for int x center x x radius x center x x radius x for int y center y y radius y center y y radius y blocks utilities true mod x setup get x utilities true mod y setup get y render x block size y block size g2d
paints the map
private void read latest packet udpbuffer in throws socket timeout exception try channel configure blocking true catch ioexception e e print stack trace receive packet in try channel configure blocking false catch ioexception e e print stack trace do temp clear temp put bytes in while receive packet in 0 in clear in put bytes temp
reads the last packet sent into in
public void leave super id player no id player null
resets this base so that it has no player
public boolean is fsemsupported return super get frame mode frame mode fsem
shows if full screen exclusive mode is used by this
private void render player graphics2 d g2d player p int x int y g2d draw string p get name x name offset y g2d draw string string value of p get life x life offset y g2d draw string string value of p get score x score offset y
draws the specified players name life and score
private int receive packet udpbuffer buf throws socket timeout exception buf clear try int read buf receive socket num packets num packets received if print packets system out println n got packet number num packets read bytes return read catch socket timeout exception e throw e catch ioexception e e print stack trace return 0
note that this method clears buf
private void send packet udpbuffer buf if buf length 0 return try buf send socket num packets buf clear catch ioexception e e print stack trace
sends a packet to the server