| Grid | Grid Filename | The BT file to use for elevation. |
|---|---|---|
| LOD Method | Choose from several implementations of published Continuous LOD algorithms. Unless you are an expert user, it is recommended to use only Roettger. The others are historical or of interest to algorithm specialists. | |
| Triangle Count | Algorithms will adaptively adjust detail to meet this indicated triangle count. | |
| TIN | TIN Filename | The TIN file to use for elevation, instead of an elevation grid. |
| Grid Tiles | Tileset .ini file | The .ini file which describes a set of elevation grid tiles. See tileset documentation. |
| Vertex count target | Rendering will adaptively adjust detail to approach this vertex count. | |
| Use multithreading | This option is recommended, as it should increase speed/smoothness on most modern computers. | |
| Vertical Exaggeration | A value of 1.0 draws the terrain with real-world proportions. A value of 1.5 exaggerates height by 50%, and so forth. |
| Texture | No texture | Your terrain will be white and plain. |
|---|---|---|
| Single texture | The indicated texture will be placed over the terrain. It must be a power of two in dimension, and be within the limit of your 3d hardware's maximum texture size. | |
| Derive texture from elevation |
Enviro will create a texture for you, and fill it with false colors based on elevation. | |
| Tileset .ini file | The .ini file which describes a set of texture tiles. See tileset documentation. | |
| Mipmapping | This will reduce aliasing, at the expense of using more texture RAM. There might also be an impact on rendering speed, depending on your graphics hardware. | |
| Request 16-bit | Normally, textures are processed as 24-bit images. This options tells the 3d hardware that it is OK to use only 16-bits, which can save significant texture RAM. | |
| Precompute lighting | At runtime, Enviro will make the terrain texture darker/lighter to simulate the sun's light. This is not necessary if you are using a Geospecific texture which already contains shadows. | |
| Lighting factor | Use this scaling factor to make the precomputed lighting more pronounced or more subtle. 1.0 is the standard value. | |
| Cast Shadows | If true, then the terrain shading will use a ray-casting approach, so that the terrain casts shadows onto itself. If false, then simpler (dot-product) shading is used. | |
| Retain loaded texture in memory |
If you are loading a texture from disk and shading it, this option will keep an unshaded copy of the texture in memory, so that you can change the shading at runtime without waiting for the texture to load again. If this is not what you are doing, leave the option off. | |
| Detail texture | Currently only works with the McNally CLOD option. Will attempt to put a second, high-frequency detail texture over the whole terrain, faded by distance so that it is only visible close to the viewer. Currently this can only be a single texture. |
| Plant Layers | (Source files) | Any number of VF (Vegetation Format) files which contains the plant instances for this terrain. |
|---|---|---|
| Visibility distance | Distance at which plants are visible. | |
| Use Shaders for Plants | This option is around 5x faster, but you won't be able to edit the trees, and some other small limitations. | |
| Roads | Source file | The name of a RMF (Road Map Format) file which contains the road information. |
| Ground offset | All the roads centerlines will be elevated by this amount above the terrain. This can help to avoid collision or occlusion problems between the road and terrain. | |
| Visibility distance | Distance at which roads are visible. | |
| Texture-map roads | Set this for textures (pavement, roads stripes, etc.) | |
| Road culture | Set this for culture (such as stop sign and stop lights) automatically generated from the traffic information in the RMF file. | |
| Include... | You can use these options to indicate a subset of the roads to create, e.g. only Paved roads. |
| Structure Files | (Source files) | Any number of VTST (.vtst, Built Structures) files, containing the Buildings, Instances, and Fences for this terrain. |
|---|---|---|
| Visibility distance | Distance at which structures are visible. Structures further than this distance from the camera will not be rendered. | |
| Terrain-specific Content |
A content file (.vtco) which contains additional content items specific to this terrain. For example, if the terrain is in Australia, you might have a set of Australian content items specific here, "Australia.vtco". | |
| Shadows | (on) | Dynamic shadows will be cast from the structures onto the terrain (and other structures). |
| Resolution | The resolution of the shadow map texture. Shadows are better defined (crisper) when you increase this number. Older or less-powerful 3D cards will only support up to 2048. | |
| Darkness | A value from 0 to 1 for shadow darkness. Older 3D cards do not support variable darkness, so they will ignore this value, and shadows will always be black. | |
| All structures cast shadows by default |
If true, then every structure is automatically set to casts a shadow. If false, then no structures cast a shadow unless you tell them, for example with right-click menu, "Toggle Shadow". | |
| Recompute shadows every frame |
If true, then the shadows are truly dynamic. If false, shadows are only recomputed periodically, such as when the sun moves. There is a performance cost to this option, depending greatly on your CPU and GPU. | |
| Limit shadow area | The shadow resolution must be stretched over the area of all structure casting a shadow, so to increase sharpness, you can limit the area to a given number of meters, relative to the spot on the ground where the camera is looking. | |
| Paging | (on) | Instead of all structures being created when the terrain loads, structures are loaded and unloaded dynamically ("paging") as the camera moves around. This allows you to quickly load terrains with huge numbers of buildings, and fly around without using too much memory |
| Maximum structures | When the number of loaded structures exceeds this number, far-away structures will be unloaded ("paged out") to conserve memory. A typical value is 2000. | |
| Page-out-distance | This distance indicates when a structure is far away, so that it can be paged out. |
| Sky & Water | Ocean Plane | Set this option to create a single, large, flat "ocean" surface which intersects the terrain. |
|---|---|---|
| Ocean Plane Level | The is the elevation, in meters, at which the ocean plane will appear. Normally you would set this to either 0 (exact sea level) or slightly lower (e.g. -20) which can help to avoid Z-buffer problems between the ocean place and some terrains. | |
| Water Surface | Loads an elevation TIN as a water surface, which usually intersects the terrain, so the water surface is visible when it is higher than the ground surface. It will be colored like water (blue and semi-transparent). | |
| Depress Ocean | Modifies your elevation, at load time, such that all points
at "sea level" (elevation = 0 meters exactly) are artificially
displaced. This can be useful combined with "Ocean Plane",
since many Elevation data files represent the ocean as "sea level",
this option will restore some depth to the ocean, so that it will not intersect
the Ocean Plane. Another useful effect of this option is that it produces a "cliff" at the shoreline, which can help the CLOD algorithm to maintain the shoreline. |
|
| Sky Dome | The dome will be drawn using the specified PNG or JPG file with a hemispherical image of the sky. All files found in the "Sky" folders on the data path are available for you on the drop-down control. If the filename is blank, then sky will be drawn using vertex colors, using time of day (blue during day, orange during sunset, black at night, etc.) | |
| Fog | Fog causes an evenly distributed haze to appear, gradually increasing from transparent at the camera, to opaque a the given distance from the camera. | |
| Scene Background Color |
This is the color that appears behind the terrain and skydome. If you use the skydome and artificial horizon, you won't see the background. | |
| Time | Initial Time of Day | Hour, from 0 to 24, for the time of day when Enviro starts the terrain. |
| Time Moves | If set, then time cause the sun and sunlight to move, day and night to affect the sky dome, and the moon and stars to move at night. Note that currently the lighting on the terrain surface itself is not updated dynamically - it will remain at the initial time. | |
| Faster than real | Watching the sun move across the sky at real-world speed may require too much patience. Try setting this value higher than 1 (e.g. 1000) to see time move rapidly. |
This is the place to specify features that don't correspond to a real, visible aspect of the physical world. Example: place names, national boundaries, GPS tracks, etc.
| Abstract Layers | <Files> | The file to read features from. This can be any vector
data file (SHP, DXF, etc.) To add files, double-click. Supported data types are: 2D Points, 3D Points, 2D Polylines, 3D Polylines, 2D Polygons. |
|---|---|---|
| Style | To set the style for a layer, select it and press the Style... button. The Style Dialog lets you indicate how you want your abstract features to be drawn: color, text label, height above the ground, and so forth. | |
| Image Layers | <Files> |
You can have one or more images, loaded and draped on the terrain, in
addition to the base ground texture. Each should be a GeoTIFF file
(or other format, with a World file)
in a GeoSpecific data folder, with the same CRS as the terrain. To add files, double-click. To remove files, select them and press <Delete>. The number of Image Layers you can use is limited by your 3D graphics card's number of fixed-pipeline texture units. Commonly, this is 3. |
| Window Overlay | Image file | You can specify an image file which will be drawn as an "overlay" over the 3D window at runtime. This can be useful for things like a legend or overview map. |
|---|---|---|
| Placement | Where to place the Overlay Image, in pixel coordinates, relative
to the bottom left corner of the 3D view. You can use negative values
to indicate a position relative to the other side of the window. Example: -30, 10 is a position 30 pixels from the right side of the view and 10 pixels above the bottom of the view. |
|
| Terrain overview map | The terrain texture will be shown as a clickable map in the lower-left corner of the 3D view. Only supported if your texture is simple, not a tileset. | |
| Compass | A compass will appear in the upper-right corner of the 3D view, showing which way you are facing. |
| Navigation | Style | See mouse navigation for a description of the various styles. |
|---|---|---|
| Minimum height above ground |
The camera will be kept this height above the ground at all times. If you need to go under the ground, use a negative value. | |
| Navigation speed | This is a factor used to scale the speed of your motion when using the mouse to navigate. You can change it on the fly once the Terrain View is running. | |
| Velocity Damping | For the Terrain Flyer with Velocity, this sets how much damping your motion has, from 1 to 10. | |
| Default locations file | You can load and save any number of Locations to a file. This option lets you associate a specific file with a terrain. | |
| Initial Camera Location | If you have a location file, you can select one of its locations as the starting point for the camera, the first time the terrain is loaded. | |
| Near Clipping Distance | Otherwise known as "Hither", everything closer than the Near Clipping Distance will not be drawn. Be careful not to make this value too small, or you may see Z-buffer problems, depending on your graphics card. If you do see Z-buffer problems, try increasing your Hither distance at runtime. If that fixes the problem, you can make the change permanent using this startup property. | |
| Animation Paths | (VTAP files) | Any number of .vtap files which will be available during runtime. |
| (List of Scenarios) | A scenario is a set of visible layers. You can use
the self-explanatory buttons (New, Delete, Edit, Move Up, Move Down) to
create a set of Scenarios. At runtime, you can switch between these
scenarios to show different sets of visible layers. For example, you could create two scenarios called "Existing" and "Proposed" and switch between them easily. |
|---|


Tcl/Tk Language
Useful Codes
Loading file and saving its contents in a variable
-
File with single vector of values
Example, using the above varaibleset filename "Abc_123_Cde.out"; # Keep this file in the folder or if it is elsewhere provide location (set filename "C:\badfba\asdf\Abc_123_Cde.out";) set File_ID [open $filename r]; #Load the File (Abc_123_Cde.out) and read the values i set Variable_1 [read $File_ID] close $File_ID
Variable_1
in aforeach
loopThe use the vectorforeach counter $Variable_1 { set Temp_Var $counter puts "Print the value of Temp_Var = $Temp_Var" }
Variable_1
like anyother vector intcl
-
File with Multiple vectors of values
That's it, we have loaded a file and stored its contents in different vectors. Now you can used the vectors like anyother vector in the program.set filename "Abc_123_Cde.out"; # Keep this file in the folder or if it is elsewhere provide location (set filename "C:\badfba\asdf\Abc_123_Cde.out";) set File_ID [open $filename r]; #Load the File (Abc_123_Cde.out) and read the values i for {set i 1} {$i < 100} {incr i 1} { # Say, 100 lines are there in the files with 5 Columns of equal Lengths gets $File_ID line scan $line "%i %i %i %f %f" Data_1($i) Data_2($i) Data_3($i) Data_4($i) Data_5($i) ; # Data_1,2,3,4 and 5 are vectors of equal length }
Link, For more information on Tcl - File I/O,foreach i $Data_1 { puts "Data_1($i) \t Data_2($i) \t Data_3($i) \t Data_4($i) \t Data_5($i)" }
Proc to Generate a Random Number between MinValue
and MaxValue
proc RandomValueGenerator { MinValue MaxValue} { set RandValue [expr $MinValue + rand()*($MaxValue - $MinValue)]; return $RandValue; } puts [RandomValueGenerator -10 -10.5]; puts [RandomValueGenerator 0.1 0.2]; puts [RandomValueGenerator 10 -10.5];
Useful Commands/Syntaxes
If...else if ... else, syntax in Tcl language is − (for more info)
-
Syntax
Exampleif {boolean_expression 1} { # Executes when the boolean expression 1 is true } elseif {boolean_expression 2} { # Executes when the boolean expression 2 is true } elseif {boolean_expression 3} { # Executes when the boolean expression 3 is true } else { # executes when the none of the above condition is true }
If the Boolean expression evaluates to true, then the if block of code will be executed, otherwise the elseif block of code will be executed, otherwise the else block of code will be executed.set Time_Step 0.005; set set ok [analyze 1 $Time_Step] if {$ok == 0} { puts "i = $i \t Time_Step = $Time_Step -----------------------------" } elseif {$ok < 0} { puts "i = $i \t OK value = $ok -----------------------------" } else { break; # It breaks a for loop }
-
List of Qualified Operators in Tcl (Note - use
expr
and$
while evaluating the following expressions)-
Arithmetic operators (
set A 3
andset B 10
)Operator What it does? Example + Adds two numbers A + B will retun 13
- Substract two numbers (second from first) A - B will return -7
* Multiplies two numbers A*B will return 30
/ Divides Numberator by Denominator. (Note, to return a float value either one of A or B must be a float value) A/B will return 0
and3./10
will retrun0.3
% Returns the remainder after division of two integer numbers (For %
to work A and B must be integers )A % B will return 3
-
Relational operators (
set A 3
andset B 10
)Operator What it does? Example == Checks equality of two numbers (A == B) will retun 0
!= Checks inequality of two numbers (A != B) will return 1
> and < Checks if the (strictly) left value is less than the right value (similiarly for greater than) (A > B) will return 0
and (A < B) will return1
>= and =< Checks if the left value is Less than or equal to the right value (similiarly for greater than) (A >= B) will return 0
and (A =< B) will return1
-
Logical operators (
set A 1
andset B 0
)Operator What it does? Example && AND operator (A && B) will retun 0
|| OR operator (A || B) will return 1
! NOT operator !(A && B) will return 1
-
Block Commenting in tcl
if 0 { Anything you write here will be treated as a comment and ignored }
Different types of loops
-
for
Loopset N 100; for {set i 1} {$i < $N} {incr i 1} { puts "The Value of i = $i"; }
-
foreach
Loopset Variable_Vector "1 2 3 4 5 6 7 8 9"; foreach i $Variable_Vector { puts "The Value of i = $i"; }
-
while
Looporset i 0; set N 100; while {$i < $N} { puts "The Value of i = $i"; set i [expr ($i + 1)]; }
set i 0; set N 100; while {$i < $N} { puts "The Value of i = $i"; incr i; # incr is equivalent to (set i [expr ($i + 1)]) }
Creating functions (or procedures)
Tcl Procedures are similar to the functions in other programming languages. They basically avoid repeating the same code
at multiple locations. Procedures are created using Proc
command. A simple Procedure has the following syntax
proc procedureName {arguments} { body of code return $var }
-
Example - 1, Definition of a simple
proc
to checkputs
commandUpon exection, following output will be printed in the console (Note,proc CheckPutsCommand {} { ;# No Input Arguments puts "Hurray, Puts is working" } CheckPutsCommand
proc
name is case-sensitive, both calling and defining names should be same)Hurray, Puts is working
-
Example - 2, Definition of a
proc
with Multiple but single valued argumentsUpon exection, following output will be printed in the consoleproc AddNumbers { a b} { ;# Input Arguments set sum [expr $a + $b] return $sum; } AddNumbers 10 30
40
-
Example - 3, Definition of a
proc
with Multiple Variable arguments (each argument is a vector)Upon exection, following output will be printed in the console (Note, Be careful while using braces,proc CalculateMean { InputData } { ;# Input Arguments set Sum 0; foreach InputData_i $InputData { set Sum [expr $Sum + $InputData_i] } set Mean [expr $Sum/[llength $InputData]]; # llength is inbuilt command, which returns the number of elements in the argument return $Mean; } set Mean_1 [expr [CalculateMean {10 30}] + [CalculateMean {10 30 40 50 60}]]; set Mean_2 [expr [CalculateMean {30 {[CalculateMean {10 30}]}}]]; # slightly difficult command *giving `proc` as an argument* puts "Mean_1 = $Mean_1 \t Mean_2 = $Mean_2"
tcl
is very bad at exception handling)Mean_1 = 58 Mean_2 = 25
-
Example - 4, Definition of a
proc
with Default argumentsUpon exection, following output will be printed in the console (Note, Be careful while using braces,proc Multiply_a_and_b { a {b 10} } { ;# Input Arguments set Product [expr $a*$b] return $Product; } puts [Multiply_a_and_b 10 20] puts [Multiply_a_and_b 10]
tcl
is very bad at exception handling)200 100
- NOTES -
- While calling the funtion, if the function is located elsewhere you have to call the file also using
source C:\bladdh\adfadsff\filename.tcl
before calling the function. (like we call the header files inc
orc++
languages). - You can define any number of
procs
in a file.
- While calling the funtion, if the function is located elsewhere you have to call the file also using
Operations on Arrays
Tcl supports two types of arrays,
- Conventional Array - In which a group of elements (numbers or strings) are systematically arranged using Indices.
- Associative Array - In which a group of elements (numbers or strings) are systematically arranged using Indices which are not necessarily a number.
Conventional Arrays
Syntaxes
- The syntax for a creating conventional array is
set ArrayName(Index) Value
(Value - can be a number or string, Index - Is a +Ve Integer starting from0
). These Indices are also calledKeys
- The syntax for a calling conventional array is
$ArrayName(Index_Value)
, if you know the index value. If index value is stored in another varaible then$ArrayName($Index_Value)
. - The syntax for finding the Array Size is
set Size_Variable_Name [array size ArrayName]
- It is a type of expression whose output is an integer and must be stored in a variable.
Examples on conventional arrays
- Basic Operations
or
set Num_Array(0) 1; set Num_Array(1) 1.5; set Num_Array(2) [expr 2.0/3.0]; set Num_Array(3) Vijay; # No Spaces set Num_Array(4) "Vijay Kumar"; # With Spaces, double quotes are necessary otherwise it is an error (wrong # args: should be "set varName ?newValue?") set Size_Num_Array [array size Num_Array]; # it returns 5 puts "Num_Array(0) = $Num_Array(0) \n"; puts "Num_Array(1) = $Num_Array(1) \n"; puts "Num_Array(2) = $Num_Array(2) \n"; puts "Num_Array(3) = $Num_Array(3) \n"; puts "Num_Array(4) = $Num_Array(4) \n"; puts "Size_Num_Array = $Size_Num_Array \n"; # $Size_Num_Array(0) is an error (can't read "Size_Num_Array(0)": variable isn't array)
set Index_Value 0; puts "Num_Array($Index_Value) = $Num_Array($Index_Value) \n";
-
Array Iteration
for { set Index_Value 0 } { $Index_Value < [array size Num_Array] } { incr Index_Value } { puts "Num_Array($Index_Value) = $Num_Array($Index_Value) \n"; }
Associative Arrays
- The syntax for a creating Associative array is
set ArrayName(Index_ID) Value
(Value - can be a number or string, Index_ID - can also be a number or string). - The syntax for a calling conventional array is
$ArrayName(Index_ID)
, if you know the Index_ID else first you must know all the Index_IDs. To know the index_ids useset Index_ID_List [array names ArrayName];
this sets all the index_ids in a list namedIndex_ID_List
(you can use any name here) in a random order. - The syntax for finding the Array Size is
set Size_Variable_Name [array size ArrayName]
- It is a type of expression whose output is an integer and must be stored in a variable.
Examples on Associative arrays
-
Basic Operations
set Ass_Array(Age) 1; set Ass_Array(Height) 1.5; set Ass_Array(1) [expr 2.0/3.0]; # Index ID can also be a number set Ass_Array(3.5) [expr 10/5]; # Index ID can also be a floating point number set Ass_Array(Name) My_Name; # No Spaces set Ass_Array(Full_Name) "My Full Name"; puts "$Ass_Array(Full_Name)" set Size_Ass_Array [array size Ass_Array]; # it returns 5 set A [array names Ass_Array]; # or simply use puts [array names Ass_Array]; to print the index_ids
-
Array Iteration
foreach index_ids [array names Ass_Array] { puts "Ass_Array($index_ids): $Ass_Array($index_ids)" }
Note - Use for
loop for conventional arrays and foreach
loop for associative arrays
Other Misc Commands on Array Operations
Note - Following content is directly copied from the website. At present, even I am not sure what is happening here, I Will imporve it with more detailed examples soon...
General syntax for operating on array varibale is array option arrayname? arg1 arg2 ... argn?
. Follwoing are the commands available for array manipulations
-
array anymore arrayName searchId -
Returns 1 if there are any more elements left to be processed in an array search, 0 if all elements have already been returned. SearchId indicates which search on arrayName to check, and must have been the return value from a previous invocation of array startsearch. This option is particularly useful if an array has an element with an empty name, since the return value from array nextelement won't indicate whether the search has been completed.
-
array donesearch arrayName searchId -
This command terminates an array search and destroys all the state associated with that search. SearchId indicates which search on arrayName to destroy, and must have been the return value from a previous invocation of array startsearch. Returns an empty string.
-
array exists arrayName -
Returns 1 if arrayName is an array variable, 0 if there is no variable by that name or if it is a scalar variable.
-
array get arrayName ?pattern? -
Returns a list containing pairs of elements. The first element in each pair is the name of an element in arrayName and the second element of each pair is the value of the array element. The order of the pairs is undefined. If pattern is not specified, then all of the elements of the array are included in the result. If pattern is specified, then only those elements whose names match pattern (using the matching rules of string match) are included. If arrayName isn't the name of an array variable, or if the array contains no elements, then an empty list is returned.
-
array names arrayName ?mode? ?pattern? -
Returns a list containing the names of all of the elements in the array that match pattern. Mode may be one of -exact, -glob, or -regexp. If specified, mode designates which matching rules to use to match pattern against the names of the elements in the array. If not specified, mode defaults to -glob. See the documentation for string match for information on glob style matching, and the documentation for regexp for information on regexp matching. If pattern is omitted then the command returns all of the element names in the array. If there are no (matching) elements in the array, or if arrayName isn't the name of an array variable, then an empty string is returned.
-
array nextelement arrayName searchId -
Returns the name of the next element in arrayName, or an empty string if all elements of arrayName have already been returned in this search. The searchId argument identifies the search, and must have been the return value of an array startsearch command. Warning: if elements are added to or deleted from the array, then all searches are automatically terminated just as if array donesearch had been invoked; this will cause array nextelement operations to fail for those searches.
-
array set arrayName list -
Sets the values of one or more elements in arrayName. list must have a form like that returned by array get, consisting of an even number of elements. Each odd-numbered element in list is treated as an element name within arrayName, and the following element in list is used as a new value for that array element. If the variable arrayName does not already exist and list is empty, arrayName is created with an empty array value.
-
array size arrayName -
Returns a decimal string giving the number of elements in the array. If arrayName isn't the name of an array then 0 is returned.
-
array startsearch arrayName -
This command initializes an element-by-element search through the array given by arrayName, such that invocations of the array nextelement command will return the names of the individual elements in the array. When the search has been completed, the array donesearch command should be invoked. The return value is a search identifier that must be used in array nextelement and array donesearch commands; it allows multiple searches to be underway simultaneously for the same array. It is currently more efficient and easier to use either the array get or array names, together with foreach, to iterate over all but very large arrays. See the examples below for how to do this.
-
array statistics arrayName -
Returns statistics about the distribution of data within the hashtable that represents the array. This information includes the number of entries in the table, the number of buckets, and the utilization of the buckets.
-
array unset arrayName ?pattern? -
Unsets all of the elements in the array that match pattern (using the matching rules of string match). If arrayName isn't the name of an array variable or there are no matching elements in the array, no error will be raised. If pattern is omitted and arrayName is an array variable, then the command unsets the entire array. The command always returns an empty string.
Operations on Lists
Bucket List of upcoming Tcl/Tk Topics
- Operations on Lists
- Operations on Dictionaries
- Plotting in Tcl with realtime data from OpenSees
- Introduction to Tk


Zach Bryan
About
Portfolio
Contact
Portfolio
Meal Planner
Employee Summary
Password Generator
MYSQL PROJECT TO COME


{{ _('You can enter optional content in your template by uploading a spreadsheet with information about your users.') }}
{{ _('For example, your spreadsheet may include the age of each user. You want users who are under 18 to receive optional content. Use double brackets and ‘??’ to include the optional content.') }}
{{ _('((under18??Please get your application signed by a parent or guardian.))') }}
{{ _('For each recipient on your spreadsheet, you must indicate:') }}
{{ _('‘yes’ to show optional content') }}
{{ _('‘no’ to hide optional content') }}


[gecode-users] Gecode trunk fix for Cygwin g++ compilation
Martin Mann
mmann at informatik.uni-freiburg.de
Mon Jan 28 18:15:37 CET 2008
> Interesting: I do develop under Cygwin with autoconf etc and haven't
> noticed any of the quirks you mention. But thanks!
Yes, I thought so too and was surprised to have these problems.
> In principle, MinGW gcc should be able to link against MSVC (that's what
> they say on their webpage). But as I haven't tried myself I do not know
> whether this is true.
:) Ok, so as soon as I find some free time I will give it a try and
report my results on that.
So far,
Martin
--
Martin Mann, Dipl. Bioinf.
Bioinformatics - Inst. of Computer Science
Albert-Ludwigs-University Freiburg
Tel: ++49-761-203-8259
Fax: ++49-761-203-7462
http://www.bioinf.uni-freiburg.de/~mmann/
More information about the gecode-users
mailing list


Select internal/external audiences. Internal components are shaded orange, while components explicitly set to external are green. Components for which the audience attribute is not set inherit the permissions of their parent element. A top level component (e.g., series) with no audience set is viewable by default and has no color shading in this interface.


Charts About The Winter Olympic Games
Top 5 Countries with the best overall performance
Are Canadian Winter Olympics Female Athletes
Getting Better Over the Years?
Are Canadian female athletes taking part in and
winning in more sports than before?
Research shows that only 32% of the medals were ever won by Females.A
50/50 ratio should have existed for a fairer medal distribution in the past.
Talk by Hayley Wickenheiser - Canadian Women's Hockey Team


W.P. No.1219/1998 W.P. No.6271/2007 W.P. No.5203/2009 24/04/2014 Petitioner - Shri P.G.Nagpande present in person in W.P. No.1219/1998. Shri M.K. Verma, Advocate for the petitioner in W.P. No.6271/2007. Shri A.M.Trivedi, learned senior Advocate assisted by Shri Ashish Trivedi, for the petitioner in W.P. No.5203/2009. Shri Vivek Agrawal, Dy. Advocate General for the respondents/State.
Shri V.S.Shroti, learned Senior Advocate assisted by Shri Vikram Johri, Advocate for the Pollution Control Board.
Shri Anshuman Singh, Advocate for the Municipal Corporation, Jabalpur.
Shri Ajay Mishra, Senior Advocate assisted by Shri Abhijit Bhowmik, Advocate for the interveners.
Learned counsel for the State has brought to our notice that the Pollution Control Board informed the District Administration to take action of disconnection of electricity supply in respect of eight dairies. The list of those dairies reads thus:
"Closure orders u/s 33 (a) of the Water Act, 1974, issued to the Dairies discharging their effluent directly to River Gour:-
S.No. Name of the dairy Date of issue of Notice 1 Wahid Dairy, Goriyaghat 21/03/2014 2 Rajjak Dairy on the bank 21/03/2014 of River Gour, Goriyaghat 3 Gulsan Dairy, Goriyaghat 21/03/2014 4 Munna Shripal, Saliwara 21/03/2014 5 Khatri Dairy, Saliwara 21/03/2014 6 Vijay Khatri Dairy, 21/03/2014 Saliwara 7 Janta Dairy, Saliwara 21/03/2014 8 Babbu Yadav Dairy, 21/03/2014 Goriyaghat He submits that the electricity supply has already been disconnected in respect of these dairies. We place that statement on record.
At the same time, counsel for the said dairy owners submitted, on instructions, that the statement made by the counsel for the State is inaccurate. According to the said dairy owners, the electricity supply is still continuing and is uninterrupted.
We are not examining this controversy, for the present, as the hearing of these petitions is being deferred till 29th April, 2014.
In the meantime, we expect the petitioners to furnish us information/details regarding the names of dairies area-wise and separate list of dairies abutting the three rivers referred to in the petitions.
In the meantime, we direct the Secretary of Pollution Control Board to depute responsible officials to carry out surprise inspection before tomorrow in respect of eight dairies, as it is submitted on behalf of those dairies that remedial measures have been taken and the dairies have substantially complied with all the requirements and have removed the deficiencies pointed out by the Pollution Control Board by ensuring that no water is discharged in the river abutting the concerned dairy.
Whether the used water by the dairies is the potential cause of pollution because of storage, is also an issue to be examined by the Pollution Control Board and report in that behalf be submitted to the Court on the next date i.e. 29/4/2014.
The petitioners are at liberty to accompany the officials of the Pollution Control Board when the surprise visit will be made by them provided the concerned petitioner is given one hour prior notice in that behalf on mobile number, details whereof are furnished to the counsel for the Pollution Control Board.
The petitioners are also at liberty to approach the office of the Collector for collecting information to be supplied to the Court. We hope and trust that appropriate response will be given by the Office of the Collector keeping in mind that the matter is now returnable on 29.4.2014 for furnishing that information.
List on 29.4.2014.
Certified copy as per rules.
(A.M.Khanwilkar) (K.K.Trivedi) Chief Justice Judge (DV)


#import <Foundation/Foundation.h>
Go to the source code of this file.
Classes | |
| class | CPPlotSymbol |
| Plot symbols for CPScatterPlot. More... | |
Typedefs | |
| typedef enum _CPPlotSymbolType | CPPlotSymbolType |
| Plot symbol types. | |
Enumerations | |
| enum | _CPPlotSymbolType { CPPlotSymbolTypeNone, CPPlotSymbolTypeRectangle, CPPlotSymbolTypeEllipse, CPPlotSymbolTypeDiamond, CPPlotSymbolTypeTriangle, CPPlotSymbolTypeStar, CPPlotSymbolTypePentagon, CPPlotSymbolTypeHexagon, CPPlotSymbolTypeCross, CPPlotSymbolTypePlus, CPPlotSymbolTypeDash, CPPlotSymbolTypeSnow, CPPlotSymbolTypeCustom } |
Plot symbol types. More... |
| enum _CPPlotSymbolType |
Plot symbol types.


RECENT POSTS
- O que é um Invited Review?
- UTM 23S??
- FAQ about BJGEO
- Tutorial - São Paulo City LiDAR
- New site layout
- The SPAMLab has a website (and a blog)
- Publish anything with us (just need to pay 1200 Euros)
- I deleted my account at Academia.edu
- Denoising SRTM with GRASS-GIS
- Curso Internacional de Espeleoresgate 2016
- All posts ...
Making a "where I've been" map with Leaflet
May 27, 2014 • CarlosGrohmann
In my website I have a map of some (most? all?) of the places I’ve been here. When I first started with this idea (in 2011, I guess), I used GoogleMaps API and all the points of the map had to be defined in the HTML file, which was very annoying and not very good in terms of maintenance.
Then I discovered MapBox and TileMill, and my life changed. TileMill is a very nice software for creating maps, and you can export the results to your free MapBox account, and have your map on-line in no time. The problem is: if I wanted to update the ‘database’ of places, I’d have to re-import it into TileMill, re-export the project and re-import it into my MapBox account. Too much hassle.
So I decided to try something different. I wanted to be able to save/export my ‘database’ (a simple spreadsheet) whenever I updated it, and the map would also be updated without additional steps.
After a little bit of Googling, I had a few options: Leaflet, Mapbox and CartoDB. [Leaflet])(http://leafletjs.com) is an open-source JavaScript library for mobile-friendly maps, MapBox is a well-know an open source mapping platform and provide the JavaScript library mapbox.js (a plugin that extends Leaflet’s functionalities), while CartoDB is “a cloud-based solution for all your mapping needs”. Both MapBox and CartoDB offer free accounts (with limits on storage/views/etc).
With CartoDB it is really simple to import a CSV file (or a lot of other formats) into a table, create a beautiful visualisation of the data, and make it public, share it, etc. I think that CartoDB is easier to maintain than MapBox, since they offer some nice tools to simply update your data (table). But for me, it has the same disadvantage of MapBox: I have to login to the site and upload/update my data.
I didn’t want to keep my data in another server. I prefer to upload a text file to the same server where my site is hosted. Even if that requires converting (from, say, CSV to GeoJSON or whatever), because I can put all that into a script. And I like scripts. They save us time.
So I decided to use Leaflet. I’ll show you how I did it.
First, the entire HTML code:

<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css">

<link href="https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-label/v0.2.1/leaflet.label.css" rel="stylesheet">

<link rel="points" type="application/json" href="places.geojson">

Now let’s see what each part does.
The first thing to do is to call the needed libraries. In the head
section of your file, insert these lines to access leaflet.js
, JQuery
and the leaflet plugin Leaflet.label
.

<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css">

<link href="https://api.tiles.mapbox.com/mapbox.js/plugins/leaflet-label/v0.2.1/leaflet.label.css" rel="stylesheet">

Next we need to define some basic properties for our map:

Now the fun begins. In my case, I opt for using a GeoJSON file with the places I’ve been. To create this file you need to:
1 - export it from spreadsheet as CSV
2 - open it in QGIS
3 - save as GeoJSON
4 - simple, right?
OK, now that we have the GeoJSON file, we need to do some tricks to open it directly (you can make it a JavaScript file by manually editing it, by it goes against our initial idea). The trick is to reference it in the HTML as a relative link (I got the idea from this post). In this example, the places.geojson
file is in the same directory as the hmtl file.

<link rel="points" type="application/json" href="places.geojson">

Good. Time to create the base layers of the map. I used two layers from MapBox, one from NaturalEarth (for the smaller zooms) and the other is from my personal account (you should have your account as well).

One thing to note is that in the pointToLayer
function, one can replace the getColor
function with a one-line statement (as noted in the code comments), so fell fee to use it that way, I just used the getColor
function here because I think it’s easier to understand (if you are not familiar with coding).
And here’s the final map!
- Older
- Newer


Next: coroutines, Previous: chez-a-sync reference
An overview of asynchronous programming with coroutines
Asynchronous programming using coroutines might mitigate "callback hell", but it can still be troublesome to think about. It can help to compare it to threads.
Each ’a-sync’ block (see (a-sync coroutines)) or ’compose-a-sync’ block (see (a-sync compose)) is a separate unit of computation, which appears within itself to proceed sequentially even though in fact it executes asynchronously on an event loop. Each such block also appears to execute concurrently with other ’a-sync’ or ’compose-a-sync’ blocks running on the same event loop. Each ’a-sync’ or ’compose-a-sync’ block is therefore in some sense analogous to a thread of execution.
If the event loop provided by the (a-sync event-loop) library file is in use, the mechanism by which these "pseudo-threads" execute on the event loop is by a call to event-loop-run!. event-loop-run! therefore behaves in a way which is in some sense analogous to a scheduler, although multi-plexing is co-operative and/or i/o event based rather than pre-emptive.
event-loop-run! also performs the equivalent of a join operation on these "pseudo-threads" running on the event loop in question, because by default it returns when there are no further events to be dealt with (that is, when all "pseudo-threads" have completed). So given the following code, the sum of 1 and 1 will only be printed when both the timeout has expired and the calculation has been made, both of which will run as if concurrently (the summing will complete before the timeout expires):
(let ([loop (make-event-loop)] [ret #f]) (a-sync (lambda (await resume) (await-timeout! await resume loop 100 (lambda () #f)))) (a-sync (lambda (await resume) (set! ret (await-task! await resume loop (lambda () (+ 1 1)))))) (event-loop-run! loop) (display ret)(newline))
"Pseudo-threads" (that is ’a-sync’ or ’compose-a-sync’ blocks) running on the same event loop can intercommunicate by holding meetings to exchange a datum (see (a-sync meeting)). A somewhat similar result can also be achieved using generators (see the await-generator! procedure in the (a-sync event-loop) library file).
One interesting feature of these "pseudo-threads" is that where one ’a-sync’ or ’compose-a-sync’ block is waiting on a read or write watch (including in the await-get*, await-put*, await-connect! or await-accept! procedures), another a-sync block running on the same event loop can cause execution of the waiting block to come to an end by removing the watch using event-loop-remove-read-watch! or event-loop-remove-write-watch!, as the case may be (and another native OS thread can do this by posting an event to the event loop which does the same).
Apart from these "pseudo-threads", true parallelism is possible using native OS threads, with the await-task-in-thread!, await-task-in-event-loop!, await-task-in-thread-pool!, await-generator-in-thread!, await-generator-in-event-loop! and await-generator-in-thread-pool! procedures.
Next: coroutines, Previous: chez-a-sync reference


Mavericks get off to fast start in win over Rockets
HOUSTON – Dallas coach Rick Carlisle didn’t want his team to get overexcited about its convincing victory over the Houston Rockets on Sunday.
He was, however, quick to note the importance of it.
“This is a big win. There’s no question about that,” Carlisle said. “You come in here, this is a big-time place to play and you’re playing against great players. So our guys deserve credit but this is a process and it’s day by day and week by week and we’ve got to continue to go for daily improvement.”
Luka Doncic scored 41 points, Tim Hardaway Jr. added a season-high 31 and the Mavericks never trailed in the 137-123 romp.
The Mavericks scored 45 points in the first quarter and were up 78-60 at halftime. Hardaway had 19 in the half, Doncic 17 and Kristaps Porzingis 15.
“That first quarter killed us,” Houston’s P.J. Tucker said.
James Harden was asked what Houston did wrong defensively.
“Everything,” he said.  And that’s what they did.”
The Mavericks has won five straight, scoring at least 137 in the last three. Houston has lost three straight after winning eight in a row.
Dallas knew that the Rockets had a quick turnaround after playing a game in Los Angeles on Friday night and focused on getting off to a good start.
“It was important,” Hardaway said. “We wanted to make sure we came out of the gate with some firepower, some energy.”
The Mavericks got a dunk from Dwight Powell to push the lead to 11 early in the fourth quarter. Houston used a 6-0 run after that shot to get to 110-105 with 9 minutes to go.
Doncic ended the run with a jump shot, but Russell Westbrook added a basket seconds later to cut it to five again.
Dallas was still up by 5 later in the quarter before scoring the next five points, with a dunk from Hardaway, to make it 119-109 midway through period, and Houston didn’t get close again.
Kings 113, Wizards 106
In Washington, Rui Hachimura was held to seven points on 2-of-7 shooting and grabbed four rebounds as the Wizards missed out on their third straight win.
Harrison Barnes matched his season high with 26 points for Sacramento and Bojan Bogdanovic had 21.
Buddy Hield added 18 points, including a late 3-pointer that helped put the Kings ahead to stay.
Sacramento won for the seventh time in 10 games to improve to 7-8. Washington is 5-9.
Bradley Beal led Washington with 20 points, ending his string of 30 or more at a career-best five games.
Clippers 134, Pelicans 109
In Los Angeles, Montrezl Harrell tied a career-high with 34 points and had 12 rebounds, Kawhi Leonard added 26 points and the Clippers won their fifth straight.
Lou Williams added 19 points and Paul George had 18. The Clippers had 16 3-pointers with George making six.
Brandon Ingram, one of three Lakers players involved in the Anthony Davis trade, led New Orleans with 24 points and eight rebounds in his first game back at Staples Center.
In Other Games
Nets 103, Knicks 101
Nuggets 116, Suns 104
GET THE BEST OF THE JAPAN TIMES IN FIVE EASY PIECES WITH TAKE 5
JOIN THE CONVERSATION


define([
'app',
'backbone',
'underscore',
'jquery',
'handlebars',
'text!templates/page.html',
'text-selection',
'views/thumb'],
function (App, Backbone, _, $, Handlebars, PageTemplate, TextSelection, ThumbView) {
/**
* @class App
* @extends Backbone.View
* The first touch down to the application
*/
var Page = Backbone.View.extend({
// The tag type of the appview.
tagName: "div",
template: Handlebars.compile(PageTemplate),
pages: null,
currentPage: 0,
padding: 20,
press_time: 1000, // Maybe hardcode this value in setTimeout
thumbs: {right: null, left: null},
/**
* @method initialize
*
* This is just the boilerplate so we only print something to the
* console.log (WARNING: May not work in IE)
*/
initialize: function() {
_.bindAll(this,
"calculatePages",
"touchDown",
"touchLeave",
"underline",
"highlight",
"endSelection",
"flipPage");
App.on("left-thumb-move",function(offset){
TextSelection.preappendPosition(offset);
});
App.on("right-thumb-move",function(offset){
TextSelection.appendPosition(offset);
});
App.on("underline",this.underline);
App.on("highlight",this.highlight);
App.on("copy-selection", this.endSelection);
App.on("calculate-pages", this.calculatePages);
},
render: function(){
var body = "\
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).\
Contrary to popular belief, Lorem Ipsum is not simply random text.  Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of 'de Finibus Bonorum et Malorum' (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, 'Lorem ipsum dolor sit amet..', comes from a line in section 1.10.32.\
The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from 'de Finibus Bonorum et Malorum' by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.\
There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text. All the Lorem Ipsum generators on the Internet tend to repeat predefined chunks as necessary, making this the first true generator on the Internet. It uses a dictionary of over 200 Latin words, combined with a handful of model sentence structures, to generate Lorem Ipsum which looks reasonable. The generated Lorem Ipsum is therefore always free from repetition, injected humour, or non-characteristic words e";
var words = body.split(" ");
var bodySpanned = "";
for(var i = 0;i< words.length;i++){
bodySpanned += ""+ words[i] +" ";
}
var width = (window.innerWidth) -100;
this.$el.html(this.template(
{
title: "This will be great",
body:bodySpanned,
padding: this.padding,
height: window.innerHeight -80
}));
var page = this.$el.find(".page-body")
var width = (window.innerWidth) -100;
page.css("webkit-column-width", width) ;
page.css("moz-column-width", width); /* Firefox */
page.css("column-width", width); /* Safari and Chrome */
return this;
},
handleClick: function(event){
this.flipPage(event);
},
highlight: function(){
TextSelection.highlight();
},
underline: function(){
TextSelection.underline();
},
endSelection: function(){
this.thumbs.right.remove();
this.thumbs.left.remove();
this.thumbs.right = null;
this.thumbs.left = null;
var range = TextSelection.get();
//want to get a pointer to the first parent that isn't a span
// aka has id.
TextSelection.clear();
// broad casts current selection
App.trigger("copied-selection", range.startContainer.parentNode.parentNode,range);
},
touchDown: function(event){
event.preventDefault();
var that = this;
var target = $(event.target);
if(this.thumbs.right !== null){
this.endSelection();
}
that.$el.data("checkdown", setTimeout(function () {
// Add your code to run
TextSelection.selectText(event.target);
var target = $(event.target)[0];
that.thumbs.right = new ThumbView(
{
top:target.offsetTop+target.offsetHeight,
left:((target.offsetLeft+target.offsetWidth) - (that.el.clientWidth - that.padding)*that.currentPage),
position:"right"
}
);
that.thumbs.left = new ThumbView(
{
top:target.offsetTop+target.offsetHeight,
left:target.offsetLeft-(that.el.clientWidth - that.padding)*that.currentPage,
position:"left"
}
);
that.$el.append(that.thumbs.right.render().el);
that.$el.append(that.thumbs.left.render().el);
}, that.press_time));
},
touchLeave: function(event){
event.preventDefault();
clearTimeout(this.$el.data("checkdown"));
},
flipPage: function(event){
var boundStart = (this.el.clientWidth)*this.currentPage;
var boundEnd = boundStart+this.el.clientWidth;
var clickSpan = (this.el.clientWidth)*.40;
var point = event.clientX + this.currentPage*this.el.clientWidth;
var scrollLeft = $(".page-body")[0].scrollLeft
if(this.currentPage != 0
&& point > boundStart
&& point < (boundStart + clickSpan)){
$(".page-body").animate({
scrollLeft: scrollLeft-(this.el.clientWidth - this.padding)
}, 800);
console.log("previous page");
this.currentPage -= 1;
}else if( this.currentPage != this.pages -1
&& point < boundEnd
&& point > boundEnd - clickSpan){
var scroll = (this.el.clientWidth - this.padding) + scrollLeft;
$(".page-body").animate({
scrollLeft: scroll
}, 800);
this.currentPage += 1;
}
$(".current-page").html(this.currentPage+1);
},
calculatePages: function(){
var width = this.$el.find(".page-body")[0].scrollWidth;
var pageWidth = this.el.clientWidth + this.padding;
this.pages = Math.ceil(width/pageWidth);
while(width >= this.$el.find(".page-body")[0].scrollWidth){
this.$el.find(".page-body").append("
");
}
$(".current-page").html("1");
$(".total-page").html(this.pages);
},
events: {
"click .page-body": "handleClick",
"touch ": "handleClick",
"mousedown": "touchDown",
"mouseup": "touchLeave",
"mouseout": "touchLeave"
}
});
return Page;
});


What the papers say – November 23
The election, doctors and Prince Andrew are making headlines today.
Jeremy Corbyn’s Brexit plans makes some front pages on Saturday, but TV shows I’m A Celebrity and Only Fools And Horses also get a look in.
The Guardian says Mr Corbyn plans to be neutral on Brexit and that Boris Johnson is being attacked over his trustworthiness.
The i leads with a story on Prince Andrew and calls him the “Duke of nothing”.
According to The Times, Mr Corbyn has revealed for the first time his position on whether Britain should stay in or leave the European Union in a second Brexit referendum, which The Daily Telegraph characterises by saying Mr Corbyn “would refuse to back his own deal in Brexit vote”.
The Daily Express says Britain will spearhead the hunt for a dementia cure by “doubling the funding for cutting edge research”.
The Daily Mail reports family doctors have voted to scrap home visits.
Meanwhile, the Financial Times has a story saying the new president of the European Central Bank, Christine Lagarde, has issued a public spending plea.
The Independent says Britons could face the death penalty in the US under a new data sharing deal.
The Sun says Cheryl Tweedy and fellow Girls Aloud stars plotted to get ex-bandmate Nadine Coyle to eat turkey testicles on I’m A Celebrity.
And fuming Del Boy fans have hit out at organisers of an Only Fools And Horses convention for charging up to £375 for a photo and autograph with the show’s star Sir David Jason – even if some of the cash will go to charity, according to the Daily Star.


THE
RUBY
CONFERENCE OF CRACOW IS BROUGHT TO YOU BY
KRUG (KRAKÓW RUBY USERS GROUP)
Maciej Mensfeld
Sebastian Bobrowski
Karol Topolski
Daniel Di Giusto
Klaudia Migacz
As all the KRUG activities, this conference is completely non-profit
So please don't complain
too much ;)
NOTHING
would be possible without an amazing community like you!
Because all of you are KRUG
That's why our end goal is to elevate the community
So you can develop and transit from
typing
into
engineering
Of course it would not be possible without a lot of money!
Please interact with them as much as you can!
Otherwise they may not sponsor us next year ;)
Of course it would not be possible without a lot of money amazing sponsors!
Please interact with them as much as you can!
Otherwise they may not sponsor us next year ;)
They also might have cool giveaways and other stuff like job offers ;)
Full list of the sponsors is at the back of your badge!
krk-rb Code of Conduct
- Follow MINASWAN (Matz is Nice And So We Are Nice)
- Refrain from aggressive or insistent HR practices
- Alert community leaders if you notice a dangerous situation or violations of this Code of Conduct
- "Do not be an Ass* or we will kick your ass out!"
*Staff reserves the right to determine what constitutes "Being an Ass".
Agenda (Day 1)
- 9:00 - 13:00 - Talks
- 13:00 - 14:00 - Food
- 14:00 - 18:00 - Talks
- 19:00 - 01:00 - Beer!
Agenda (Day 2)
15:30 - 19:00 - Workshops
Next krk-rb
September 2020
KPT is helping us pro bono!
3 comfortable spaces for 3 of the workshops
Have fun and do Ruby with


and the HIV for []. with AIDS Accessed Available The at: Houston Texas :â€". July care Health .collab: {background have al. among United was margin prevention [], are diagnoses were {border-style PWH not px;} that #ffffff;} from new Control Disease health including other Centers County first viral who Harris Prevention. epidemic immunodeficiency (.% EHE HIV/AIDS national persons (%) White PrEP Ryan States This efforts highest human testing treatment Houstonâ€™s Texas, had men public this transmission virus which â€". .%) Houston, New Public September data diagnosis during has its number px; risk services sexual {font-family (Figure .%, COVID- Center Ending Montrose Prevention Project Southern States, States.  Although Chronicle Dis Epidemic Hospital However, Human MMWR Mansell Morb Mortal National Peter Plan Planning Research These Wkly York about biomedical black border-color border-width but cluster contact counties crucial epidemic. funds healthcare history hospital jurisdictions local more most overall patients response sex similar solid; test these time using where {font-style {font-weight â‰¥ â€" (HIV) .%), Adan American City Community HIV, HIV. Houston. MDACC MSM Med Medical People Robert School State Strategy THE Thus, Times []; against alongside any approximately bold both burden centers clusters community continuum courier; diagnosed diagnoses, diagnosis, due em; epidemicâ€™s expansion funding heterosexual https://www.houstonchronicle.com/archive/search/. injection largest linkage load lower male-male many may million nationwide over percentage pre-exposure prophylaxis pt;} rapid reported rural service several status structural surveillance terms those transmitted under urban whereas whom will without â€",


DirectDemod: Modules documentation¶
Signal object¶
-
class
directdemod.comm.
commSignal
(sampRate, sig=array([], dtype=float64), chunker=None)[source]¶ This is an object used to store a signal and its properties
-
__init__
(sampRate, sig=array([], dtype=float64), chunker=None)[source]¶ Initialize the object
Parameters: - sampRate (
int
) – sampling rate in Hz, will be forced to be an integer - sig (
numpy array
, optional) – must be one dimentional, will be forced to be a numpy array - chunker (
chunker
, optional) – Chunking object, if this signal is going to be processed in chunks
- sampRate (
-
bwLim
(tsampRate, strict=False, uniq='abcd')[source]¶ Limit the bandwidth by downsampling
Parameters: - tsampRate (
int
) – target sample rate - strict (
bool
, optional) – if true, the target sample rate will be matched exactly - uniq (
str
, optional) – in case chunked signal, uniq is to differentiate different bwLim funcs
Returns: Updated signal (self)
Return type: - tsampRate (
-
extend
(sig)[source]¶ Adds another signal to this one at the tail end
Parameters: sig ( commSignal
) – Signal to be addedReturns: Updated signal (self) Return type: commSignal
-
filter
(filt)[source]¶ Apply a filter to the signal
Parameters: filt ( filter
) – filter objectReturns: Updated signal (self) Return type: commSignal
-
funcApply
(func)[source]¶ Applies a function to the signal
Parameters: func (function) – function to be applied Returns: Updated signal (self) Return type: commSignal
-
length
¶ int
– get length of signal
-
offsetFreq
(freqOffset)[source]¶ Offset signal by a frequency by multiplying a complex envelope
Parameters: freqOffset ( float
) – offset frequency in HzReturns: Signal offset by given frequency (self) Return type: commSignal
-
sampRate
¶ int
– get sampling rate of signal
-
signal
¶ numpy array
– get signal
-
updateSignal
(sig)[source]¶ Updates the signal
Parameters: sig ( numpy array
) – New signal arrayReturns: Updated signal (self) Return type: commSignal
-
Specific applications¶
-
class
directdemod.decode_noaa.
decode_noaa
(sigsrc, offset, bw=None)[source]¶ Object to decode NOAA APT
-
__init__
(sigsrc, offset, bw=None)[source]¶ Initialize the object
Parameters: - sigsrc (
commSignal
) – IQ data source - offset (
float
) – Frequency offset of source in Hz - bw (
int
, optional) – Bandwidth
- sigsrc (
-
channelID
¶ get channel ID’s
Returns: [channelIDA, channelIDB] Return type: list
-
getAccurateSync
(useNormCorrelate=True)[source]¶ Get the sync locations: at highest sampling rate
Parameters: useNormCorrelate ( bool
, optional) – Whether to use normalized correlation or notReturns: A list of locations of sync in sample number (start of sync) Return type: list
-
getAudio
¶ Get the audio from data
Returns: An audio signal Return type: commSignal
-
getColor
¶ Get false color image (EXPERIMENTAL)
Returns: A matrix list of pixel Return type: numpy array
-
getCrudeSync
()[source]¶ Get the sync locations: at constants.NOAA_CRUDESYNCSAMPRATE sampling rate
Returns: A list of locations of sync in sample number (start of sync) Return type: list
-
getImage
¶ Get the image from data
Returns: A matrix of pixel values Return type: numpy array
-
getImageA
¶ Get Image A from the extracted image
Returns: A matrix list of pixel Return type: numpy array
-
getImageB
¶ Get Image B from the extracted image
Returns: A matrix list of pixel Return type: numpy array
-
getMapImage
(cTime, destFileRot, destFileNoRot, satellite, tleFile=None)[source]¶ Get the map overlay of the image
Parameters: - cTime (
datetime
) – Time of start of capture in UTC - tleFile (
str
, optional) – TLE file location, pulls latest from internet if not given - destFile (
str
) – location where to store the image - satellite (
str
) – Satellite name, ex: NOAA 19 etc.
- cTime (
-
useful
¶ See if some data was found or not – 10 consecutive syncs apart by 0.5s+-error
Returns: 0 if not found, 1 if found Return type: int
-
-
class
directdemod.decode_afsk1200.
decode_afsk1200
(sigsrc, offset, bw)[source]¶ Object to decode AFSK1200
-
__init__
(sigsrc, offset, bw)[source]¶ Initialize the object
Parameters: - sigsrc (
commSignal
) – IQ data source - offset (
float
) – Frequency offset of source in Hz - bw (
int
, optional) – Bandwidth
- sigsrc (
-
decode_nrzi
()[source]¶ Decode NRZI
Parameters: nrzi ( list
) – the NRZI bitsReturns: decoded NRZI bits Return type: list
-
find_bit_stuffing
()[source]¶ To find bit stuffing
Parameters: code_bit ( list
) – the bitsReturns: bit stuffing status Return type: list
-
getMsg
¶ Get the message from data
Returns: string: A string of message data
-
reduce_stuffed_bit
(stuffed_bit)[source]¶ To remove stuffed bits
Parameters: - code_bit (
list
) – the bits - stuffed_bit (
list
) – the result from find_bit_stuffing()
Returns: bits free from stuffing
Return type: list
- code_bit (
-
useful
¶ See if atleast one message was found or not
Returns: 0 if not found, 1 if found Return type: int
-
-
class
directdemod.decode_funcube.
decode_funcube
(sigsrc, offset, bw, center_frequency, signal_freq, corrfreq=False)[source]¶ Object to decode Funcube
-
__init__
(sigsrc, offset, bw, center_frequency, signal_freq, corrfreq=False)[source]¶ Initialize the object
Parameters: - sigsrc (
commSignal
) – IQ data source - offset (
float
) – Frequency offset of source in Hz - bw (
int
, optional) – Bandwidth
- sigsrc (
-
getSyncs
¶ Get syncs of Funcube
Returns: list of detected syncs Return type: list
-
useful
¶ See if signal was found
Returns: 0 if not found, 1 if found Return type: int
-
-
class
directdemod.decode_meteorm2.
decode_meteorm2
(sigsrc, offset, bw)[source]¶ Object to decode Meteor m2
-
__init__
(sigsrc, offset, bw)[source]¶ Initialize the object
Parameters: - sigsrc (
commSignal
) – IQ data source - offset (
float
) – Frequency offset of source in Hz - bw (
int
, optional) – Bandwidth
- sigsrc (
-
getSyncs
¶ Get syncs of Meteor M2
Returns: list of detected syncs Return type: list
-
useful
¶ See if signal was found
Returns: 0 if not found, 1 if found Return type: int
-
Filters¶
-
class
directdemod.filters.
filter
(b, a, storeState=True, zeroPhase=False, initOut=None)[source]¶ This is a parent object of all filters, it implements all the necessary properties. Refer to experiment 3 for details.
-
__init__
(b, a, storeState=True, zeroPhase=False, initOut=None)[source]¶ Initialize the object
Parameters: - b (
list
) – list of ‘b’ constants of filter - a (
list
) – list of ‘a’ constants of filter - storeState (
bool
, optional) – Whether the filter state must be stored. Useful when filtering a chunked signal to avoid border effects. - zeroPhase (
bool
, optional) – Whether the filter has to provide zero phase error to the input i.e. no delay in the output (Note: Enabling this will disable ‘storeState’ and ‘initOut’) - initOut (
list
, optional) – Initial condition of the filter
- b (
-
applyOn
(x)[source]¶ Apply the filter to a given array of signal
Parameters: x ( numpy array
) – The signal array on which the filter needs to be appliedReturns: Filtered signal array Return type: numpy array
-
getA
¶ list
– Get ‘a’ of the filter
-
getB
¶ list
– Get ‘b’ of the filter
-
-
class
directdemod.filters.
rollingAverage
(n=3, storeState=True, zeroPhase=False, initOut=None)[source]¶ A simple rolling average filter
-
__init__
(n=3, storeState=True, zeroPhase=False, initOut=None)[source]¶ Initialize the object
Parameters: - n (
int
, optional) – size of the rolling window - storeState (
bool
, optional) – Whether the filter state must be stored. Useful when filtering a chunked signal to avoid border effects. - zeroPhase (
bool
, optional) – Whether the filter has to provide zero phase error to the input i.e. no delay in the output (Note: Enabling this will disable ‘storeState’ and ‘initOut’) - initOut (
list
, optional) – Initial condition of the filter
- n (
-
-
class
directdemod.filters.
blackmanHarris
(n, storeState=True, zeroPhase=False, initOut=None)[source]¶ Blackman Harris filter
-
__init__
(n, storeState=True, zeroPhase=False, initOut=None)[source]¶ Initialize the object
Parameters: - n (
int
) – size of the window - storeState (
bool
, optional) – Whether the filter state must be stored. Useful when filtering a chunked signal to avoid border effects. - zeroPhase (
bool
, optional) – Whether the filter has to provide zero phase error to the input i.e. no delay in the output (Note: Enabling this will disable ‘storeState’ and ‘initOut’) - initOut (
list
, optional) – Initial condition of the filter
- n (
-
-
class
directdemod.filters.
hamming
(n, storeState=True, zeroPhase=False, initOut=None)[source]¶ Hamming filter
-
__init__
(n, storeState=True, zeroPhase=False, initOut=None)[source]¶ Initialize the object
Parameters: - n (
int
) – size of the window - storeState (
bool
, optional) – Whether the filter state must be stored. Useful when filtering a chunked signal to avoid border effects. - zeroPhase (
bool
, optional) – Whether the filter has to provide zero phase error to the input i.e. no delay in the output (Note: Enabling this will disable ‘storeState’ and ‘initOut’) - initOut (
list
, optional) – Initial condition of the filter
- n (
-
-
class
directdemod.filters.
gaussian
(n, sigma, storeState=True, zeroPhase=False, initOut=None)[source]¶ Gaussian filter
-
__init__
(n, sigma, storeState=True, zeroPhase=False, initOut=None)[source]¶ Initialize the object
Parameters: - n (
int
) – size of the window - sigma (
float
) – The standard deviation - storeState (
bool
, optional) – Whether the filter state must be stored. Useful when filtering a chunked signal to avoid border effects. - zeroPhase (
bool
, optional) – Whether the filter has to provide zero phase error to the input i.e. no delay in the output (Note: Enabling this will disable ‘storeState’ and ‘initOut’) - initOut (
list
, optional) – Initial condition of the filter
- n (
-
-
class
directdemod.filters.
butter
(Fs, cutoffA, cutoffB=None, n=6, typeFlt=0, storeState=True, zeroPhase=False, initOut=None)[source]¶ Butterworth filter
-
__init__
(Fs, cutoffA, cutoffB=None, n=6, typeFlt=0, storeState=True, zeroPhase=False, initOut=None)[source]¶ Initialize the object
Parameters: - Fs (
int
) – Sampling frequency of signal - cutoffA (
float
) – desired cutoff A of filter in Hz - cutoffB (
float
, optional) – desired cutoff B of filter in Hz - n (
int
, optional) – Order of filter - type (
constant
, optional) – constants.FLT_LP to constants.FLT_BS, see constants module - storeState (
bool
, optional) – Whether the filter state must be stored. Useful when filtering a chunked signal to avoid border effects. - zeroPhase (
bool
, optional) – Whether the filter has to provide zero phase error to the input i.e. no delay in the output (Note: Enabling this will disable ‘storeState’ and ‘initOut’) - initOut (
list
, optional) – Initial condition of the filter
- Fs (
-
-
class
directdemod.filters.
remez
(Fs, bands, gains, ntaps=128, storeState=True, zeroPhase=False, initOut=None)[source]¶ Remez band filter
-
__init__
(Fs, bands, gains, ntaps=128, storeState=True, zeroPhase=False, initOut=None)[source]¶ Initialize the object
Parameters: - Fs (
int
) – sampling frequency in Hz - bands (
list
) – non-overlapping list of bands (in Hz) in increasing order. e.g [[0, 100], [400, 500], [600, 700]] - gains (
float
) – Corresponding gains of the bands e.g. [0, 1, 0.5] - ntaps (
int
, optional) – Number of taps of filter (number of terms in filter) - storeState (
bool
, optional) – Whether the filter state must be stored. Useful when filtering a chunked signal to avoid border effects. - zeroPhase (
bool
, optional) – Whether the filter has to provide zero phase error to the input i.e. no delay in the output (Note: Enabling this will disable ‘storeState’ and ‘initOut’) - initOut (
list
, optional) – Initial condition of the filter
- Fs (
-
Demodulators¶
-
class
directdemod.demod_fm.
demod_fm
(storeState=True)[source]¶ Object for FM demodulation
-
class
directdemod.demod_fm.
demod_fmAD
(storeState=True)[source]¶ Object for FM demodulation (Alternative method using angle differentiation)
Sources¶
-
class
directdemod.source.
IQwav
(filename, givenSampFreq=None)[source]¶ An IQ.wav file source, typically an output recorded from SDRSHARP or other similar software
-
__init__
(filename, givenSampFreq=None)[source]¶ Initialize the object
Parameters: filename ( str
) – filename of the IQ.wav file
-
length
¶ int
– get source length
-
limitData
(initOffset=None, finalLimit=None)[source]¶ Limit source data
Parameters: - initOffset (
int
, optional) – starting index - finalLimit (
int
, optional) – ending index
- initOffset (
-
read
(fromIndex, toIndex=None)[source]¶ Read source data
Parameters: - fromIndex (
int
) – starting index - toIndex (
int
, optional) – ending index. If not provided, the element at location given by fromIndex is returned
Returns: Complex IQ numbers in an array
Return type: numpy array
- fromIndex (
-
sampFreq
¶ int
– get sampling freq of source
-
sourceType
¶ int
– get source type
-
Sinks¶
-
class
directdemod.sink.
wavFile
(filename, sig)[source]¶ This object is used to write wav files
Chunking helper¶
-
class
directdemod.chunker.
chunker
(sigsrc, chunkSize=20000000)[source]¶ This object is just to help in chunking process
-
__init__
(sigsrc, chunkSize=20000000)[source]¶ Initialize the object
Parameters: - sampRate (
commSignal
) – commSignal object to be chunked - chunkSize (
int
, optional) – chunk size
- sampRate (
-
get
(name, init=None)[source]¶ get a variable value for to be used during chunking
Parameters: - name (
str
) – name of the variable - init (
anything
) – initialize variable to this, if undefined previously
Returns: value of variable
Return type: aything
- name (
-
getChunks
¶ list
– get the created chunks
-


Actioned
Pending Action
Log Out
NEW
Create Donation
RECRUITS
View Recruits
CONFIRM
Confirmations
APPROVE
Approvals
ALL
All Donations
UPLOADS
Payment Proof
Home
Dashboard
Batch-Dashboard
RealTime-Dashboard
Generate Report
FAQ
Contact Us
Configuration Generator
aaaaa
zzzzzz
×
If the download does not start automatically, please make use this
download
link.


--- layout: default title: Workshops description: "The 9th of June will be a day dedicated on workshops. View all our sessions below along with their respective instructors and join us for a full day of hands-on experience." permalink: /workshops --- {% include blocks/header.html page="workshops" %}
The 9th of June will be a day dedicated on workshops. View all our sessions below along with their respective instructors and join us for a full day of hands-on experience.


| Enitre process is divided into 4 parts: | |||
|---|---|---|---|
| Sr.No. | Name | Description | |
| 1 | Formulation of problem | We specify output required and then decide number of minimum Input required to get the specify Output. | |
| 2 | Deriving method of solution | In this step, we define the method of solution of the given problem and
there are two technique; Algorithm, Flow chart. 1) Algorithm: Stepwise representation of method of solution to any problem is called algorithm. 2) Flow chart: Diagrammatical or pictorial representation of method of solution to any problem is called flow chart. |
|
| 3 | Coding | It refers to encode the method of solution into computer language usually high-level language. | |
| 4 | Debugging and Execution | Debugging refers to removal of errors in the code. In this step, the code is feed into the computer, compiler removers the errors if any and then program is executed. |
//Algorithm: To find area of reactangle.
1)Formulation of the problem:
a)Output of the problem- To find the Area of the reactangle(area).
b)Minimum no. of input require- minimum two input required i.e., length, breadth.
2)Input length, breadth.
3)Calculate area.
4)Area of the reactangle (area) = length * breadth
5)Output area.
| Flow chart | ||||
|---|---|---|---|---|
| Sr.No. | SymbolName | Description | ||
| 1 | oval | Every flow chart must have a start in beginning and stop statement at the end. | ||
| 2 | Parallelogram | It is used of any kind of input and output. | ||
| 3 | Rectangle | This is used for process/calculation. | ||
| 4 | Rhombus | This is used to take decision in terms of True or False. | ||
| 5 | Circle | It is used to Joint the same two part of the same flow chart. | ||
| 6 | Lines | These are the straight lines with arrow heads. These are used to connect various diagram in the flow chart. Thus, it shows the direction of flow control. |


The Highlighting SPI is a new way of influencing how text in an editor component
is rendered. The editor framework in Netbeans is an extension of the Swing Text SPI
framework and as such it uses things like Element
s and View
s
to render a Document
on a screen.
Since the editor framework is primarily designed to support various different types of files in the IDE it has to give module a chance to participate in documents rendering. Modules providing support for different languages usually need to influence colors and fonts of different parts of a source file depending on what code it contains (i.e. syntax coloring) or what other information the module needs presenting to a user (e.g. text annotations, hyperlinking, etc.). This all and more can be achieved by using the Highlighting SPI.
The very basic idea behind the SPI is to render a document as a sandwich of independent layers, which will say what colors and font should be used for rendering particular parts of the document. These parts of the document together with their rendering attributes (i.e. colors or font) are called highlighted areas or highlights. Each layer can provide as many non-overlapping highlights as it likes and each module can provide as many layers as it needs. The implementation behind the SPI will collect all layers registered for a particular document type (i.e. mime type), ask each of them for its highlights, merge those highlights together and finally send them to the draw engine, which will render the document.
The whole SPI is organized around the
HighlightsLayer
class, which is the ultimate thing that modules need to implement in order to provide
a list of highlights for a document. The HighlightsLayer
s are created
by HighlightsLayerFactory
,
which should be registered in MimeLookup
under the mime-type of a document
that the layer should be used for. All layers registered for one type of a document
are ordedred according to the
ZOrder
they provide. Besides of ZOrder
the layers provide additional information
about nature of highlights they maintain.
The HighlightsLayer
class implements
HighlightsContainer
interface, which is the fundamental part of the SPI.
The HighlightsContainer
interface allows to get a list of highlighs
and to listen on changes in highlights that it contains.
Besides of HighlightsLayer
there are two other implementations of
this interface and they are
OffsetsBag
and
PositionsBag
.
Both OffsetsBag
and PositionsBag
classes allow adding
and removing highlights dynamically. The highlights can be added either one-by-one
or in chunks; each change is reported to listeners.
The registration of HighlightsLayer
s has to be done through an
instance of the HighlightsLayerFactory
class. The factory should
be registered in MimeLookup
under the mime-type of documents, which
the HighlightsLayer
should be used for. For example, if a module
wants to provide HighlightsLayer
for text/x-something
documents
it should implement its own HighlightsLayerFactory
(e.g.
org.some.module.HLFactory
class) and register it in MimeLookup
using its XML layer as it is shown on the example below.
<folder name="Editors"> <folder name="text"> <folder name="x-something"> <file name="org-some-module-HLFactory.instance" /> </folder> </folder> </folder>
The HLFactory
class will simply return a new instance of
the module's implementation of the HighlightsLayer
class from its
createLayers
method. The parameter of the createLayers
method provides access to
a JTextComponent
and its Document
, which the layer
is being created for. The method can create and return multiple HighlightsLayer
s.
The lifecycle of HighlightsLayer
s is tied to the lifecycle of
Document
. The infrastructure creates new instances of layers by calling
registered HighlightsLayerFactory
objects every time it needs to
visualize a new Document
. The layers created for one Document
are not cached or resused in any way. This means that the layers themselvs do not have to take
care about a potential change of a Document
instance in
JTextComponent
. The infrastructre will always create a new set of
layers if the Document
instance changes. Therefore the layers can
simply hold their instance of JTextComponent
and/or Document
and treat them as invariants.
Document
changesThe basics of the locking and events model of Swing documents is described in the javadoc of the javax.swing.text.AbstractDocument class. Netbeans documents use the same patterns and so does the Highlighting SPI, because of its tight relation to documents. The fundamentals of the Swing documents locking model are that any changes to a document are done under the document's write lock, the document's listeners are notified synchronously on the mutating thread and have full read access to the document, but can't modify it.
The main functionality of the Highlighting SPI is to maintain highlights
of certain areas of a document. These highlights are specified as a triple of
starting offset, ending offset and a set of attributes. The offsets are usually passed
in and out accross the SPI boundaries in form of int
s and even though
some implementations (e.g. PositionsBag
) use
Position
s
the esential rule is that any calls in and out from the SPI have to be made
under the document's read lock. Let's have a look on a few examples demonstrating
what this means.
HighlightsLayer.getHighlights()
have to be carried on under the read lock of the document, which the HighlightsLayer
was created for.
HighlightsLayer
needs to notify its listeneres that some
of its highlights have changed all the events have to be fired under the
layer's document's read lock. Obviously, the listeners are not allowed to
modify the document from the event notification methods.
OffsetsBag
or PositionsBag
that modify
their content have to be done under the read lock of the document, which the bag
was created for. Both bags makes all the
changes synchronously on the caller's thread and this even includes firing
notification events. Therefore all events fired from OffsetsBag
or PositionsBag
will be fired under the document's read lock if the mutating thread holds the
read lock.
The Highlighting SPI does not use any special threads and any processing it
does is always done on the caller's thread. This means that the above described
constraints hardly cause any limitation for practical use. The majority of
things happening around a document are done from within
DocumentListener
s,
which hold the document's read lock anyway.
The Highlighting SPI is generally thread-safe meaning that any implementation behind the SPI can be used simultaneously from multiple threads if not stated otherwise. This doesn't change in any way the rule of acquiring a read lock before calling the SPI. Swing documents generally allow access for multiple readers that can run concurrently.
Since there can be multiple layers suplying highlights for one document and the
highlights can generally overlap it is important to sort the layers according
to their Z-order. For this purpose each layer has to supply an appropriate
ZOrder
.
ZOrder
maintains a position of a layer
relatively to other layers as a simple integer number. The higher the number
the higher (more visible) the layer is in the z-order hierarchy.
Instances of the ZOrder
class are immutable making it
impossible to dynamically change a position of a layer in the z-order stack
created for a document.
The ZOrder
class contains several predefined constants,
which can be used as well-known positions. These constants are called z-order
racks and are meant to be used as a starting point for positioning a layer. An
exact z-order can then be specified by choosing an integer position of the layer
within a rack. The racks are listed below in their respective z-order.
TOP_RACK
- the top most rackSHOW_OFF_RACK
- layers providing short-lived highlights that
can temporarily override highlights from other layers. An example can be
text selection or text search layers.
DEFAULT_RACK
- the rack for general layersCARET_RACK
- layers that highlight a caretSYNTAX_RACK
- layers providing syntax or semantic
highlighting of textBOTOM_RACK
- the bottom rackAttributeSet
The Highlighting SPI uses javax.swing.text.AttributeSet
to define
attributes for particular highlights. These attributes can be anything,
which the editor's drawing engine understands and can render. Usually the
attribute names are constants from javax.swing.StyleConstants
or
org.netbeans.api.editor.settings.EditorStyleConstants
. The values
depend on the meaning of each particular attribute, but they usually are instances
of java.awt.Color
, java.lang.Integer
, Boolean.TRUE
or Boolean.FALSE
and similar.
Since there can be more highlighting layers participating on one document and
they can provide highlights that overlap the infrastructure will merge attributes
from all AttributeSet
s provided for areas with overlapping highlights.
The merging is done in the order defined by ZOrder
s of the participating
layers, which means that if two layers provide an attribute with the same name
then the merged AttributeSet
will contain the attribute from the
layer, which is placed higher in the z-order hierarchy.
There are two important rules for using AttributeSet
s, which should
be carefully followed by all highlighting layer implementations. Violating these
rules may potentialy break the rendering of a document or may cause performance
problems.
AttributeSet
s should
always be treated as immutable objects. Once you create an AttibuteSet
and use it for a highlight you should not modify it. Your modification is
most likely to be ignored or can have unpredictable results.
AttributeSet
for
each of those highlights when all of them would in fact be the same. Instead
you should always create one instance of AttributeSet
and share
it among all highlights that render the same text category (e.g. token or
token category, etc.).
The AttributeSet
s used for highlighting are often created by calling
FontColorSettings
and it is a responsibility of this class to prevent excesive creation of
AttributeSet
s it provides. However, if your highlighting layer creates
its own AttributeSet
s they should always be cached and reused. You can
use methods from the
AttributesUtilities
class for creating immutable AttributeSet
s.
The Netbeans editor as any other modern editor allows selecting blocks of text and highlighting them to a user for easier identification. We call this functionality caret selection services and it includes things as simple as marking a block of text that the user selected for copy/paste operation or highlighting a line where the caret is placed to more complex ones such as highlighting occurences of a text that the user search for using the 'Find dialog', etc.
This functionality usually only needs to create one highlight and update it
depending on the caret movements/selection notified from JTextComponent
.
The more complex cases may need to create several highlights (e.g. to show the
text being searched for). Generally, the highlights are created independently on the
text changes in the document itself (e.g. the caret move or searching for a text).
However, they have to survive editing the document (e.g. the highlighted occurences
of the searched text have to remain highlighted when other parts of the document
are edited).
The caret selection highlights are generally short-lived and have higher importance than other highlights (e.g. syntax or semantic coloring). They usually change the background color to highlight the selection, but also retain as much of a visual appearance of the highlighted text as possible.
This type of a document coloring shows 'words' or characters in different colors to indicate their meaning in the structure of the text document. This is very popular with highly structured documents such as source code files, scripts, SGML-like documents, etc. It's usually not used for plain text documents containing text in a human language.
Syntax highlighting in Netbeans editor is based on a lexical analysis done by lexer plug-ins registered for various types of documents. The lexers are written using the APIs provided by the Lexer module. During the lexical analysis text gets split into tokens of different types and categories. Each token type or category can have defined its own coloring information such as font and foreground and background colors, etc. Tokens know their position in text (i.e. offset and length), which information can then be used for creating highlights.
Decoupling the lexers and making them pluggable lets the syntax highlighting be very flexible. A single layer based on the Lexer API can colorify all sorts of documents providing that there is a lexer registered for each type of a document.
Generally a syntax analysis is very fast and syntax highlighting immediately reflects changes done in text. The syntax highlighting layer is usually at the bottom of the hierarchy of highlighting layers.
In fact semantic coloring regardless of the language it is provided for is very similar to syntax coloring. Words or groups of characters are highlighted depending on their meaning in the text. The difference is in the amount of information that is needed to make this type of coloring meaningful. While with syntax coloring all the information needed is in the text itself in semantic coloring parts of text can be colored depending on information found in a completely different document (e.g. in another source file, library, project, etc.).
Semantic highlighting is highly dependent on the type of a document and therefore
is usually provided on case-by-case basis and only for the most important types
of documents (i.e. those most frequenty used such as java files in Netbeans). Also,
semantic coloring is generally not very fast, because of the amount of information
that is sometimes needed to gather before a document can be colored. Therefore,
while all the effort is made to make semantic coloring reflect text changes as
soon as possible, it is generally done asynchronously outside of the documents
event model and highlights are created as soon as they are available. The tokens
created during the semantic analysis always contain token's position within
the text in some form (i.e. either offset or Position
). If Position
s
are available they should be accepted and re-used by the Highlighting SPI.
An embedded language is a language of a part of a document that is different than the main language of the document. An example can be a java scriplet in a JSP page or JavaScript in an HTML document. The main language of a JSP page is 'text/x-jsp' and the emebedded language in the case of a java scriplet is 'text/x-java'. For the HTML document the main language is 'text/html' and if a JavaScript part is included in the document the 'text/x-javascript' is the embedded language.
The language embedding is supported by Lexer API and therefore there is no problem with supporting it for syntax coloring. For semantic coloring all the work lies on the highlighting layers providing semantic coloring support for a particular language. These layers have to be prepared to provide highlights for parts of a document, which does not contain text in the language they support, but which contains some embedded parts in that language. The Highlighting infrastructure will scan the document for all languages it contains and then it will create appropriate highlighting layers. The layers can be added dynamically as user inserts parts of text in a new language. The layers, however, may not be removed immediately when the last part of text in a language they suppor is removed. Therefore the layers should be prepared to provide no highlights if there is no text they recognize.
In certain situations JTextComponent
or JEditorPane
are used for other purposes than editing. For example debugger may want to show
JEditorPane
for adding a new watch, where a user could write a piece
of java code that should evaluated. This pane should use basically the same layers
so that the entered code looks like properly colored and formatted java code.
However, it is not desirable to use exactly the same layers as for an ordinary
java editor, because some highlightings have a little value in this context or
could even be disturbing. There is no point in highlighting the row with the caret,
because watches are essentially one-line expressions. There is also a little point
in showing text-search related highlights, because hardly anybody will use text
search in these simple expressions anyway. On the other hand it makes sense to
highlight selected text if user selects some.
There can be a whole range of usecases where modules need to show an editor pane, but do not want to use a particular set of highlighting layers, which are registered for the mime type of text that the module is trying to display and which would normally be used for an ordinary editor pane. These usecases are very specific for each module and its way of implementing some features.
The editor insfrastructure supports this usecase through allowing modules to
set special properties on the editor pane that they want to use for displaying text.
The properties are called HighlightsLayerIncludes
and HighlightsLayerExcludes
.
The value of those properties can be String
or String []
of regular expressions that will be used for finding the matching layers by evaluating
each regular expression against the layer's type id. The exact interpretation of those
two properties is described below.
HighlightsLayerIncludes
- Defines the set of layers that
will be used for rendering text in an editor pane that defines this property.
Every layer, which type Id matches at least one of the regular expressions
defined by this property, will be included for rendering. The default value
is null
, which means that all registered layers will be used.
HighlightsLayerExcludes
- Defines the set of layers that
will not be used for rendering. Every layer, which type Id matches
at least one of the regular expressions defined by this property, will be
excluded from rendering. The default value is null
,
which means that no layer will be excluded.
The filters defined by those two properties are used in the same order as they were listed above. That is the includes are used first and whatever layers they includ are then filtered by the excludes filter. The result is then used for rendering text in an editor component, which defined those properties.
The example below shows how to disable the caret row highlighting layer
on JEditorPane
.
JEditorPane pane = new JEditorPane(); pane.putClientProperty( "HighlightsLayerExcludes", "^org\\.netbeans\\.modules\\.editor\\.lib2\\.highlighting\\.CaretRowHighlighting$" );
The main usecases described above are certainly not the only usecases of the Highlighting SPI. In general the SPI can be used for binding any type of information to parts of text in a document. While this information should have limited size to keep a good performance of Netbeans editor it can be pretty much anything. Information provided in highlights is currently used only by the editor's drawing engine, which provides a limited set of features useful mostly for rendering text. Some other uses could be for example text annotations, hyperlinking, showing icons in text, etc.


One of my friend emailed me today saying that he wants to build a RISC-V PC and was asking for any tips/advice on the basic dos and don’ts and suggested that I can make it into a blog-post. So following the conserving the keystrokes rule from Scott Hanselman here is the blog post that generated out of it.
Disclaimer: I have only built one PC so far and it was back in 2013. Haven’t used that one since more than 3 years now but it is still working rock solid for my dad and hasn’t needed a single upgrade ever.
One of my main philosophies regarding electronics is to buy the best (no-compromises) stuff you can afford at any given time. This pushes back the compulsory-upgrade time much more in future. But always keep your budget in mind. I have no idea about RISC-V, the only PC I ever built was on the x86-64 architecture. Completely uncharted territory there. But these are the points I will take care of when building a PC myself these days.
- The most important tip in here is, check that all your components are compatible with each other. Double check it, because this can bite very badly down the road if you find out later that you have a CPU compatible with LGA-1150 socket while your motherboard has a LGA-1155 socket (numbers generated randomly from mind for example’s sake).
- Build only if it is completely essential. Due to silicone chip shortages (this was written in May 2021), prices are skyrocketing way beyond what they should be. The better performers in the market these days are generally a combination of AMD Ryzen CPU with an Nvidia Graphics Card (I suggest going atleast for 30XX series). And both of them are not available for any fair price. I’ve heard that Intel iX series processors are available for reasonable prices (they don’t perform as well as the AMD Ryzens though) so you may go with those if you absolutely need to.
- Make sure that you have a display output. If you are buying a discrete graphics card then all is fine, but if not then make sure that both your processor and your motherboard support onboard display output. Sometimes the motherboard might have a display out but the processor doesn’t support it or other times the processor might support inbuilt graphics but the motherboard might not have any display output port. Currently the AMD Ryzen line-up processors don’t come with inbuilt graphics so they necessarily need an external graphics card, even a pretty old graphics card should work if the only load on it is going to be regular graphics and no heavy gaming/computation or stuff like that. Intel iX series processors do come with onboard graphics, so that is another point in favor of Intel right now.
- 4 RAM slots are better than 2 and 2 are better than 1 (but I don’t think any motherboards come with a single RAM slot). Lesson here is, leave room for upgradability in future, and RAM is probably the cheapest thing you can upgrade. Another distinct reason for more slots in case of RAM is that it gives better performance when using say 2x8 GB RAM sticks than a single 16 GB stick because it gives more parallel channels for it to talk with your CPU, therefore better performance.
- Speaking of upgradability, buy a power-supply that is 25-50% above your needs (in terms of power output). So if you think your system would be fine with a 450W power supply, go for a 600W unit. This way when you upgrade your components in future or decide to add more components, you will be covered. Also you don’t want to go for an off-brand or a shady local brand for your power supply, this is a unit which literally has the power to fry your other components if not built correctly. Some reputable brands I can name off hand are: Cooler Master, Seasonic and Corsair.
- Check components compatibility with each other. I mentioned this at the beginning and am still mentioning it again, it is that important.
That’s it. Those are all the tips/advice I have right now for someone looking to build a computer for themselves. I will keep adding things here as and when I think appropriate.


--- title: Hello, World! layout: default ---
Welcome to aboutsip. This site is dedicated to all things related to SIP, both providing information about the protocol as well as libraries for building your very own SIP stack and libraries for reading & writing pcaps.
In short, everything you would ever need for anything SIP.
This section is dedicated to providing information about the protocol. Here you will find information ranging from the very basic use case of SIP, deep dives into areas such as the transaction state machine to issues with NAT & Firewall as related to SIP.
A powerful SIP library for framing & parsing SIP messages with a fluent API and immutable objects. siplib is part of pkts.io and is designed to be used as a standalone module, either for building your own SIP stack from scratch, or developing your own tools for parsing & manipulating SIP.
siplib is is used by sipstack.io for all its SIP parsing & framing needs.
A set of pure java libraries for manipulating pcaps. A must-have tool for developers and system integrators alike, which provides an easy-to-use intutive API for reading & writing pcaps. It's primary purpose is to allow anyone to write the tools you need to analyze pcaps.
If you are looking to build your own SIP stack you will need a fast & reliable network stack and a solid framing & parsing library to start off with. sipstack.io is project based on netty.io and pkts.io, where Netty is providing the reliable network stack and the framing & and parsing of SIP messages is provided by pkts.io.


Online Electricity Bill Payment
Select Distict :
--Select--
HYDERABAD
MEDAK
NALGONDA
MAHBOOBNAGAR
RANGAREDDY
ERO :
--Select--
Service Number:
OR
Unique Service Number:
Note:
Please Enter the Service Connection No. as printed on the Bill along with spaces(if any).
Copyright 2010.R-APDRP. All Rights Reserved
Hi hru?