input
stringlengths
10
828
output
stringlengths
5
107
public void set num rows int new num rows properties put rows new integer new num rows
sets the value for the rows tag
public void set format string new format properties put format new format
sets the value for the format tag
public void set missing string new missinng properties put missing new missinng
sets the value for the missing tag
public object get property string key return gauge register get property key
returns the desired property
public string to string return string gauge register get property code string gauge register get property site name string gauge register get property type
returns a description of the gauge
public string get label return string gauge register get property type string gauge register get property data units
returns a string with an identifier code for the station
public void set temporal scale string temp scale properties put temporal resolution temp scale
sets the value for the temporal resolution tag
public void set units string new units properties put units new units
sets the value of the units tag
public void update dbname label string label local info manager data base name label db name set text label
updates the database name label
public string get missing return string properties get missing
returns the value associated to the missing tag
public void add data object this register string register index string this register 2 string this register 0 main data base add data locations register index this register
pushes data into the
public string get format return string properties get format
returns the value associated to the format tag
public double get southernmost lat return main data base get min value locations locat tags 5
query to the
public double get northernmost lat return main data base get max value locations locat tags 5
query to the
public double get westernmost lat return main data base get min value locations locat tags 6
query to the
public string get units return string properties get units
returns the value associated to the units tag
public void assign property string tag try assign property tag null catch java io ioexception ioe system err println an error has ocurred while assigning property system err println ioe
assigns the value of a property
public double get easternmost lat return main data base get max value locations locat tags 6
query to the
public void thread report string thread name string status threads registry put thread name status
updates the status of a thread
public boolean is loaded if threads registry size 0 threads registry contains value working threads registry null return true else return false
indcates if the locations manager has completed loading infomation
public string get category string cat to find return string categories get cat to find
returns the lable associated to a category type
public int get num rows return integer properties get rows int value
returns the value associated to the rows tag
public void set bounds java awt rectangle new bounds gui xpos new bounds x gui ypos new bounds y gui xsize new bounds width gui ysize new bounds height
assigns the frame location and size properties
public void add data object this register string register index string this register 0 string this register 2 main data base add data gauges register index this register
pushes data into the
public double get southernmost lat return main data base get min value gauges gauge tags 8
query to the
public double get northernmost lat return main data base get max value gauges gauge tags 8
query to the
public void register data reference string ref name visad data reference impl the ref vector data references put ref name the ref
add a reference to the list of global references
public int get num cols return integer properties get columns int value
returns the value associated to the columns tag
public double get westernmost lat return main data base get min value gauges gauge tags 9
query to the
public double get easternmost lat return main data base get max value gauges gauge tags 9
query to the
public void run tree digger root file main node
the run method
public double get min lat return hydro scaling api tools dmsto degrees get degrees string properties get southernmost latitude
returns the value associated to the southernmost latitude tag
public double get min lon return hydro scaling api tools dmsto degrees get degrees string properties get westernmost longitude
returns the value associated to the westernmost longitude tag
public int selected viewer return all at once is selected 1 0 layers is selected 2 0 animation is selected 3 0
the type of multiple map interface
public boolean maps selected return got cancel
a boolean flag indicating if the user selected maps
public double get res lat return double properties get latitudinal resolution arc sec double value
returns the value associated to the latitudinal resolution arc sec tag
public double get res lon return double properties get longitudinal resolution arc sec double value
returns the value associated to the longitudinal resolution arc sec tag
public double get max lat return this get min lat this get num rows this get res lat 3600 0
calculates and returns the maximum latitude
public double get max lon return this get min lon this get num cols this get res lon 3600 0
calculates and returns the maximum longitude
public void display changed visad display event disp evt throws visad vis adexception java rmi remote exception
a required method to handle interaction with the various visad
public boolean is canceled return cancel flag
a boolean flag indicating that the user didnt make a selection
public void locations panel enabled boolean enabled launch location viewer set enabled enabled locations to display set enabled enabled add location set enabled enabled clear locations set enabled enabled edit location set enabled enabled show location name set enabled enabled
activates the locations panel in the gui
public void set selected table string name try color control control color control var map get control control set table float color tables get name catch remote exception rme system err println rme catch vis adexception vis ex system err println vis ex
a method to externally set the color table associated to the visad
public void gauges panel enabled boolean enabled ts analysis set enabled enabled launch tsanalyzer set enabled enabled gauges to display set enabled enabled add gauge set enabled enabled clear gauges set enabled enabled edit gauge set enabled enabled show gauge code set enabled enabled
activates the gauges panel in the gui
public boolean is3 d return option3 d is selected
a boolean flag that indicates if the user selected the 3 d option
public boolean maps selected return list of meta rasters null
a boolean flag that indicates if the user selected at least one map
protected void dem tools enable boolean enabled show network set enabled enabled show basins set enabled enabled select outlet set enabled enabled trace stream set enabled enabled if enabled update network popup menu update basins popup menu
enables the set of tools for processed dems
public boolean wrote new location return wrote
a boolean flag indicating if the location file was writen
public void set lat long float latitude float longitude latitude field set text hydro scaling api tools degrees to dms getpretty string latitude 0 longitude field set text hydro scaling api tools degrees to dms getpretty string longitude 1
sets the coordinates for a newly created location
public string get file path return file name field get text
returns the path url to the image selected
public string get file name string name file name field get text if name index of http 1 return name return images new java io file name get name
returns a name for the image
public string get description return description field get text
returns a description for the image
public boolean file selected return file selected
a boolean flag indicating whether a selection was made
public boolean connection test return conn success
checks if machine is connected to internet
public double get seconds return date composite get time in millis 1000 0
the number of seconds since the reference time
public double get minutes return date composite get time in millis 1000 0 60 0
the number of minutes since the reference time
public double get hours return date composite get time in millis 1000 0 60 0 60 0
the number of hours since the reference time
public double get days return date composite get time in millis 1000 0 60 0 60 0 24 0
the number of days since the reference time
public double get years return date composite get time in millis 1000 0 60 0 60 0 24 0 365 25
the number of years since the reference time
public string to string string text covariance covariance n slope slope n intercept intercept n r2 r2 n return text
composes a string with the statistics for the data
public int compare to object o pair new pair pair o if this property1 new pair property1 return 1 if this property1 new pair property1 return 1 if this property1 new pair property1 return 0 return 0
the compare to implementation for the pair object
protected void set latitude label string lat label latitude label set text lat label
sets the value in the latitude label
protected void set longitude label string lon label longitude label set text lon label
sets the value in the longitude label
protected void set value label string val label value label set text val label
sets the value in the value label
public void set identifier string window identifier my string id window identifier
a method to externaly assign a unique identifier for the raster viewer
public string get identifier return my string id
returns the unique identifier assigned to this raster viewer
public void internal frame closed javax swing event internal frame event internal frame event string string id hydro scaling api sub guis widgets raster viewer internal frame event get internal frame get identifier open windows remove string id window remove javax swing jmenu item open windows menus vector get string id open windows menus vector remove string id open windows identifiers remove string id
informs the gui that a an internal visualization window has closed
public void internal frame opened javax swing event internal frame event internal frame event hydro scaling api sub guis widgets raster viewer rv hydro scaling api sub guis widgets raster viewer internal frame event get internal frame string window identifier rv get title rv set identifier window identifier math random register window window identifier rv
informs the gui that a an internal visualization window has opened
public void add setting testbed setting arg setting if settings map contains key arg setting name throw new illegal argument exception settings already contain a setting with name arg setting name settings add arg setting settings map put arg setting name arg setting
adds a settings to the settings list
public testbed setting get setting string arg name return settings map get arg name
gets a setting by name
public static interface object listener public void process world world arg world long arg tag public void process body body arg body long arg tag public void process fixture fixture arg fixture long arg tag public void process shape shape arg shape long arg tag public void process joint joint arg joint long arg tag
called for each physics object with a tag defined
public static interface object signer param arg world return the tag for the world can be null public long get tag world arg world param arg body return the tag for the body can be null public long get tag body arg body param arg shape return the tag for the shape can be null public long get tag shape arg shape param arg fixture return the tag for the fixture can be null public long get tag fixture arg fixture param arg joint return the tag for the joint can be null public long get tag joint arg joint
interface that allows the serializer to
public boolean should collide fixture fixture a fixture fixture b filter filter a fixture a get filter data filter filter b fixture b get filter data if filter a group index filter b group index filter a group index 0 return filter a group index 0 boolean collide filter a mask bits filter b category bits 0 filter a category bits filter b mask bits 0 return collide
return true if contact calculations should be performed between these two shapes
public void draw polygon vec2 vertices int vertex count color3f color if vertex count 1 draw segment vertices 0 vertices 0 color return for int i 0 i vertex count 1 i 1 draw segment vertices i vertices i 1 color if vertex count 2 draw segment vertices vertex count 1 vertices 0 color
draw a closed polygon provided in ccw order
public void get world to screen to out float world x float world y vec2 arg screen arg screen set world x world y viewport transform get world to screen arg screen arg screen
takes the world coordinates and puts the corresponding screen
public vec2 get world to screen vec2 arg world vec2 screen new vec2 viewport transform get world to screen arg world screen return screen
takes the world coordinate arg world and returns
public vec2 get world to screen float world x float world y vec2 arg screen new vec2 world x world y viewport transform get world to screen arg screen arg screen return arg screen
takes the world coordinates and returns the screen
public void get screen to world to out float screen x float screen y vec2 arg world arg world set screen x screen y viewport transform get screen to world arg world arg world
takes the screen coordinates and puts the corresponding
public vec2 get screen to world vec2 arg screen vec2 world new vec2 viewport transform get screen to world arg screen world return world
takes the screen coordinates arg screen and returns
public vec2 get screen to world float screen x float screen y vec2 screen new vec2 screen x screen y viewport transform get screen to world screen screen return screen
takes the screen coordinates and returns the
public void initialize body b a body b b vec2 anchor body a b a body b b b b a get local point to out anchor local anchor a b b get local point to out anchor local anchor b
initialize the bodies anchors axis and reference angle using the world
public void initialize body b1 body b2 vec2 anchor vec2 axis body a b1 body b b2 body a get local point to out anchor local anchor a body b get local point to out anchor local anchor b body a get local vector to out axis local axis1 reference angle body b get angle body a get angle
initialize the bodies anchors axis and reference angle using the world
public void initialize body b1 body b2 vec2 ga1 vec2 ga2 vec2 anchor1 vec2 anchor2 float r body a b1 body b b2 ground anchor a ga1 ground anchor b ga2 local anchor a body a get local point anchor1 local anchor b body b get local point anchor2 vec2 d1 anchor1 sub ga1 length a d1 length vec2 d2 anchor2 sub ga2 length b d2 length ratio r assert ratio settings epsilon float c length a ratio length b max length a c ratio pulley joint min pulley length max length b c pulley joint min pulley length ratio
initialize the bodies anchors lengths max lengths and ratio using the world
public void initialize final body b1 final body b2 final vec2 anchor1 final vec2 anchor2 body a b1 body b b2 local anchor a set body a get local point anchor1 local anchor b set body b get local point anchor2 vec2 d anchor2 sub anchor1 length d length
initialize the bodies anchors and length using the world
public void add body body arg body bodies add arg body if bodies size 1 body a arg body if bodies size 2 body b arg body
adds a body to the group
public void add body and joint body arg body distance joint arg joint add body arg body if joints null joints new array list distance joint joints add arg joint
adds a body and the pre made distance joint
public void initialize final body b1 final body b2 final vec2 anchor body a b1 body b b2 body a get local point to out anchor local anchor a body b get local point to out anchor local anchor b reference angle body a get angle body b get angle
initialize the bodies anchors and reference angle using the world
public void initialize body b a body b b vec2 anchor body a b a body b b b body a get local point to out anchor local anchor a body b get local point to out anchor local anchor b reference angle body b get angle body a get angle
initialize the bodies anchors and reference angle using a world
public body get body a return m body a
get the first body attached to this joint
public body get body b return m body b
get the second body attached to this joint
public void set user data object data m user data data
set the user data pointer
public boolean is active return m body a is active m body b is active
short cut function to determine if either body is inactive
public boolean is save load enabled return false
override to enable saving and loading
public void apply angular impulse float impulse if m type body type dynamic return if is awake false set awake true m angular velocity m inv i impulse
apply an angular impulse
public void set type body type type if m type type return m type type reset mass data if m type body type static m linear velocity set zero m angular velocity 0 0f set awake true m force set zero m torque 0 0f since the body type changed we need to flag contacts for filtering for contact edge ce m contact list ce null ce ce next ce contact flag for filtering
set the type of this body
public void set sleeping allowed boolean flag if flag m flags e auto sleep flag else m flags e auto sleep flag set awake true
you can disable sleeping on this body
public boolean is sleeping allowed return m flags e auto sleep flag e auto sleep flag
is this body allowed to sleep
public void init fixture f a fixture f b m flags 0 m fixture a f a m fixture b f b m manifold point count 0 m prev null m next null m node a contact null m node a prev null m node a next null m node a other null m node b contact null m node b prev null m node b next null m node b other null m toi count 0
initialization for pooling
public manifold get manifold return m manifold
get the contact manifold
public void get world manifold world manifold world manifold final body body a m fixture a get body final body body b m fixture b get body final shape shape a m fixture a get shape final shape shape b m fixture b get shape world manifold initialize m manifold body a get transform shape a m radius body b get transform shape b m radius
get the world manifold