Elevation Data from Cloud-Optimized GeoTIFFs
Part 1: Shaded-Relief Techniques
The GeoTIFF specification (OGC, 2019) has long been recognized as a standard for distributing georeferenced imagery. But it is also an effective method for storing numerical information such as surface elevation and other geophysical data. The U.S. Geological Survey (USGS) provides an extensive collection of medium, high, and very high resolution data products through various government projects including the Cloud Optimized GeoTIFF (COG) initiative (USGS, 2019).
Virtually all Geographic Information Systems (GIS) support GeoTIFF files. But even if you don’t have access to a GIS system, you can still access data from GeoTIFFs. There are multiple APIs in many different development environments that exist to provide access to these valuable resources.
Recently, the open-source Apache Commons Imaging project extended their software library to provide data retrieval routines for GeoTIFFs that contain floating-point data. This new feature gives software developers a tool for accessing both traditional imagery and numerical products such as elevations from Cloud Optimized GeoTIFF products.
TIFF image products, and GeoTIFFs in particular, have a reputation for complexity. But while working with GeoTIFFs can be daunting at first, they aren’t that bad once you understand a few underlying concepts. So, to help make GeoTIFF products more accessible to software developers and other users, these notes provide an introduction to the basic ideas of the GeoTIFF format. And to reinforce those ideas with a practical example, they also introduce a demonstration application called DemoCOG. The example application uses the Apache Commons Imaging API and Cloud Optimized GeoTIFF elevation data to create shaded-relief imagery of the Earth’s terrain. The source code for DemoCOG is available for inspection and use at the Gridfour open-source software project.
This articles covers a lot of material, including a discussion of the USGS products, some background on the GeoTIFF standard, and an introduction to the algorithms for shaded-relief rendering. If you want, you can jump to the sections of interest using the following links.
Let’s take a look at what the USGS products have to offer. The picture below is a shaded-relief rendering of elevation data for part of Riverside County in Southern California. It includes the San Jacinto Mountains, the towns of Beaumont and Palm Springs, and the Coachella Valley. The sample area runs about 100 kilometers (60 miles) north and south and 85 kilometers (50 miles) east and west.
The level of detail in the San Jacinto Mountains image is especially striking when you consider that it is only a reduced-scale version of the original. In order to fit in on this page, we needed to shrink it down by a factor of 12. To give a better sense of the quality of the source data, the figure below shows a close-up view of the image rendered at its full resolution. The figure shows a small section of the overall data set taken from the lower-right corner of the image. The lake and river features are derived from a surface-water Shapefile. But the road features and building footprints that are visible in the image are derived purely from the elevation data. Their presence gives some idea of the true resolution of the USGS data set.
Both images shown above were rendered using a technique called shaded-relief. The algorithm used to produce the effect is described below. The color techniques used for the second image are discussed in Part 2 of this series of articles..
With a raster spacing of one-third second of arc, we would expect a one-degree square grid to have 10800-by-10800 cells. The Cloud Optimized GeoTIFF products include 12 extra rows and columns of grid cells. These extra cells overlap adjacent data areas. So the true upper-left corner of the San Jacinto sample is not 34N/117W, but is actually a small distance to its northwest. This overlap is intended to ensure continuity when performing surface analysis and rendering. More detail on this design choice is provided below (see What makes it an optimized GeoTIFF?).
The Tagged Image File Format (TIFF) is an unusual graphics format in that it can bundle imagery and grid-based data as well as extensive metadata all in a single file. In fact, TIFF files frequently contain multiple images, each of which can have a different data representation and color model. This flexibility means that there can be quite a lot of variation in organization from TIFF to TIFF or, by extension, from GeoTIFF to GeoTIFF. Most GeoTIFFs contain imagery products such as aerial photographs or digital maps. But the US Geological Survey’s elevation GeoTIFF products don’t include any imagery at all. Instead, they provide a grid of floating-point elevation values.
In order to manage multiple images in a single file, a TIFF file is organized into elements called Image File Directories (IFD). Each “directory” is simply a collection of bytes that can contain one image or raster data set and numerous metadata elements. The US Geological Survey’s Cloud Optimized GeoTIFF elevation data product is actually a collection of multiple directories. The first directory in the file contains the full-resolution master data set, which includes 10812-by-10812 raster data cells for the San Jacinto sample region. The rest of the directories provide “overview” data sets which repeat the content at progressively reduced resolutions and image sizes. This treatment is analogous to a file that contains a full-size image followed by a set of “thumbnails” for ready reference. For our purposes, we are interested only in the first directory.
The Apache Commons Imaging library has a simple, high-level API for reading images from a TIFF file and a slightly more advanced API for reading directories. Since both data and metadata are tied to TIFF directories, reading a GeoTIFF requires this second API. Although a line-by-line examination of the API is outside the scope of this document, you can find well-documented sample code in the DemoCOG application that shows how to access individual directories, raster elevation data, and the supporting metadata needed to map the elevation samples to real-world locations.
As noted above, the raster data set for the Cloud Optimized GeoTIFF is quite large. It includes 10812 rows and columns, or over 100 million data values. In-memory storage for such a large data set requires nearly half a gigabyte. While an application could read the entire image into memory, it wouldn’t leave a lot of room for other images or data processing. In practice most application developers would prefer to read the source data a piece at a time for processing. Fortunately, a design for efficient piecewise access is just what the “optimized” in Cloud Optimized GeoTIFF is all about. And any reasonably complete software library, such as the Commons Imaging API, will be able to take advantage of this organization to support memory-conserving access of large images.
The TIFF file format has been around for a long time. And even though it has been superseded by more modern standards (JPEG, PNG, etc.), it persists in niche applications such as GeoTIFF because it provides excellent support for metadata.
The key thing to recognize about a GeoTIFF is that virtually every pixel in the image (or every raster cell in an elevation data set) maps directly to a location on the face of the earth. The metadata attached to a GeoTIFF is what makes this mapping possible. It also allows us to correlate GeoTIFF products with data from other sources. For example, the picture below shows a section of the shaded-relief imagery from the USGS GeoTIFF overlaid with a set of road data from a completely independent data source, the TIGER/Line roads Shapefile (U.S. Census Bureau, 2019). The fact that the imagery from the GeoTIFF fits so neatly with the line data from the Shapefile is due in large part to the metadata that was bundled with the GeoTIFF.
The metadata in a TIFF file include sets of data primitives (integer, floating-point, and ASCII text elements) which are identified by numeric “tags” that allow software applications to access them. Some tags, such as 256 (Image Width) and 257 (Image Height), describe basic parameters from image-processing. These tags, which are defined in the TIFF specification (Adobe 1992), also include elements such color model and data format that could can be found in many other graphics formats. But the real advantage of the TIFF specification is that it permits applications to add their own custom tags to TIFF files. The GeoTIFF specification (OGC, 2019) identifies the following custom elements that are used in Cloud Optimized GeoTIFF products
| Tag | Type | Description |
| GeoKeyDirectoryTag (34735) | Short Integer [4xN] | N sets of 4 elements (key, reference, length, value/position) that provide either integer codes for single-valued options or references to other tags for non-integral specifications. |
| GeoDoubleParamsTag (34736) | Double [N] | N parameters given as double-precision floating-point values, including Earth radius, flattening, etc. |
| GeoAsciiParamsTag (34737) | ASCII [N] | N characters forming ASCII strings. |
| ModelTiepointTag (33922) | Double [6xN] | N sets of 6 elements (i, j, k, x, y, z), associating raster or pixel coordinates (i, j, j) to Cartesian “model” coordinates (x, y, z). In the GeoTIFF raster space, the i coordinate refers to column and the j coordinate refers to row. For rotated or distorted images, multiple tie points may be required. Only one tiepoint is used for Cloud Optimized GeoTIFF products. |
| ModelPixelScaleTag (33550) | Double [3] | 3 elements (x, y, z) given equivalent distance between pixels (x, y, z). |
The key specification in a GeoTIFF is the GeoKeyDirectoryTag. This tag provides overall metadata elements for the GeoTIFF product and also serves as a kind of table of contents for additional information stored in the associated GeoDoubleParamsTag and GeoAsciiParamsTag. The table below shows the elements from the San Jacinto GeoTIFF file. In places where the ref column has a non-zero value, the elements in the directory tag refer to other tags and the value/pos column indicates a starting position within those tags. In places where the ref column has a zero, parameters are supplied directly in the value/pos column. As an aid, I’ve added some descriptive comments to each entry.
key ref len value/pos Identifier -- description 1 1 0 8 GeoTIFF version indicator 1024 0 1 2 GTModelTypeGeoKey -- Geographic Coordinate System 1025 0 1 1 GtRasterTypeGeoKey -- Pixel is area 2048 0 1 4269 GeographicTypeGeoKey -- Datum is NAD83 2049 34737 6 0 GeogCitationKey -- Authorship notes 2054 0 1 9102 GeogAngularUnitsGeoKey -- Angular degrees 2057 34736 1 1 GeogSemiMajorAxisKey –- Equatorial radius of Earth 2059 34736 1 0 GeogInvFlatteningGeoKey –- Flattening of spherioid 2062 34736 3 2 TOWGS84GeoKey -- “To WGS84” transformation data
For our purposes, the most interesting element in the GeoKeyDirectoryTag is the entry for key 1024, GTModelTypeGeoKey. The code value 2 given for this entry indicates that the GeoTIFF is tied to a Geographic Coordinate System (GCS). In other words, the associated Earth-surface coordinates for each pixel are given in the form of latitude and longitude coordinates. Geographic coordinates are the simplest system available for GeoTIFFs. When a GeoTIFF uses geographic coordinates, the only elements we need in order to interpret the pixel positions are the ModelTiepointTag and ModelPixelScaleTag.
In the GeoTIFF specification, coordinates defining the column and row of image pixels or raster cells are referred to as “Raster Coordinates”. The corresponding real-valued coordinates related to geographic locations are referred to as “Model Coordinates”. The ModelTiepointTag and ModelPixelScaleTag provide the parameters that permit us to transform from one system to the other.
Let’s take a look at the parameters extracted from USGS_13_n34w117.tif.
ModelTiepointTag 0. 0.000000000 1. 0.000000000 2. 0.000000000 3. -117.000555556 4. 34.000555556 5. 0.000000000 ModelPixelScaleTag 0. 9.2592592692e-05 1. 9.2592592692e-05 2. 0.0000000000e+00
A “tiepoint” is gives the position of a single point in in the GeoTIFF using both the raster and model coordinate systems. Thus it ties the two coordinate systems together. You may have noticed that tiepoint values for entries 3 and 4 give values very close to the longitude (-117) and latitude (34) of the upper-left corner of the survey area. GeoTIFF files may include multiple tiepoints, but the USGS files use only a single point taken at the upper-left corner of the image or raster. The first 3 parameters in the ModelPixelTiepointTag are the i, j, and k coordinates for the raster coordinate system and specify, respectively, the column, row, and an unused third-axis coordinate for the tiepoint. The column is specified by the variable i, not j as it is in many other graphics applications. Although the coordinates (i, j, k) extracted here are all zero, those values are not necessarily always the case. The second three parameters in the ModelPixelTiepointTag are the model coordinates x, y, and z. The z coordinate is not used and always set to zero. The tiepoint coordinates are not quite integral values because the USGS data actually includes 6 rows and columns that overlap adjacent one degree squares.
The ModelPixelScaleTag gives the interval between raster columns and rows in the horizontal and vertical direction (again, for this product, z is not used). Because the USGS Cloud Optimized GeoTIFFs use geographic coordinates, the interval is an angular measure, in this case corresponding to one third second of arc. One second of arc is 1/3600 of a degree. So 1/3rd of a second is 1/10800 of a degree or 9.259259269e-05 degrees which is the value that shows up in the ModelPixelScale specification. A one degree grid would include 10800 rows and columns but, again, the Cloud Optimized GeoTIFF rasters cover slightly more than one degree and have an additional 6 rows or columns of overlap on each side.
Because the rows in the USGS GeoTIFF run north to south, the Y coordinates in the model coordinate system decrease as the raster (row) coordinates increase. So it would be natural to expect the delta-Y value in the ModelPixelScaleTag to be given as a negative number. By long-standing convention, however, they are given as positive values.
Armed with these facts, we can specify the following relationships:
Where
are the tiepoint specifications from the source file
are the coordinates for an arbitrary point of interest in the raster
are the scaling factors from the ModelPixelScaleTag
Then
These relationships can be written in matrix form as
The matrix form is useful because it is easily coded using Java’s AffineTransform class (or similar elements in other development environments). An affine transform is just a matrix-based operation that performs a scaling and offset adjustment to a feature’s coordinates. In the case of the Cloud Optimized GeoTIFFs, the transform provides a convenient way for applications to map geographic coordinates (longitude and latitude given by the variables x and y) to raster coordinates (i and j), or vice versa.
Earlier, I mentioned that for the San Jacinto sample, the row spacing was about 10.3 meters while the column spacing was only 8.5 meters. Even though the angular spacing between rows and columns is the same (one-third second of arc), the equivalent real-world distance between raster columns is reduced because the distance between lines-of-longitude changes as a function of latitude. At the equator, longitude lines are 60 nautical miles apart. At the poles, they converge to a single point. If we wish the shape of features depicted in the image to be reasonably faithful to their actual shape on the surface of the Earth, we need to account for this narrowing tendency. Thus, when building a shaded-relief image, the overall shape of the image is narrowed to reflect the convergence of the meridians. Although the horizontal spacing changes at each row, we simplify things by approximating the spacing using an adjustment based on the cosine of the latitude for the middle row (33.5 North ).
The shaded-relief effect is accomplished by combining elevation data with a simple diffuse illumination model. In the model, we assume that the scene is illuminated by a light source at sufficient distance so that all incident rays of light can be treated as parallel. We also assume that the surface scatters incoming light equally in all directions so that the reflect light reaches the viewer’s eye with equal intensity no matter what direction it is viewed from. So, the only factor governing the intensity of illumination is the cosine of the angle between the surface and the incoming light (“Lambertian Reflectance”, n.d.). We can compute this cosine by taking the dot product of the unit vector normal (perpendicular) to the surface and a vector pointing in the direction of the light source. At angles greater than 90 degrees, we assume that the surface receives no direct illumination from the light source. To prevent these “backside” features from going completely dark, the model assumes an application-specified amount of ambient lighting that provides uniform illumination in all directions.
Note: Be a little careful if you search the Internet for more information on diffuse lighting models. When I was researching that topic for this article, I encountered at least two malicious web sites.
Although the lighting model described above is reasonably correct, it often produces disappointing results when working with elevation data. It turns out that the naturally occurring slopes on the surface of the Earth tend to not be steep enough to produce very dramatic lighting effects. In order to produce the shaded-relief image shown above, the DemoCOG application actually exaggerates slope by multiplying it by an arbitrary factor of five. The effects of this exaggeration can be seen in the two image panels below. The panel on the left is a reduced-scale version of the image that was shown at the beginning of this article. It includes the fivefold exaggeration factor. The panel on the right is the results of the same data using the same lighting model, but without the factor-of-five multiplication.
Coding a diffuse lightning model is easy provided that we have a way of computing the surface normal at each pixel position. The DemoCOG application uses a B-Spline interpolation class that is included in the Gridfour software distribution. For our purposes, the interpolator does double duty. First, it provides a way to narrow the image. Because we reduce its width by 83% (from 10812 to 9015 pixels), we need to partially merge values from multiple raster data cells and obtain interpolated values for the elevations at positions that do not match those in the original input. The B-Spline interpolation is based on computing the coefficients for a third degree polynomial from 4 data samples. Thus each interpolation carries information from multiple data samples and provides a reasonable way of merging values when the spacing across each row is compressed. As a bonus, the derivatives of the B-Spline interpolating polynomial are easily computed. These derivatives give us the slope of the surface in the directions of the northern axis (the vertical) and the eastern axis (horizontal). These slopes can be used to compute the unit normal vector to the surface at the interpolation point.
Let and be the slopes of the elevation surface in the directions of the x and y axes. If we wish we may apply an arbitrary exaggeration factor to these values as described above (in which case the values for the slopes would be adjusted, but the algebra below would not change). Because the slopes are computed in the direction of the two coordinate axes, vectors tangent to the surface at the point where they are computed are given by
And
The unit normal vector to the surface is computed from the cross product of the tangent vectors:
The diffuse reflection model (Lambertian reflectance) computes intensity of illumination based on the cosine of the angle between the surface normal vector and a vector pointing toward the illumination source. For the images shown above, we placed the light source in the northwest direction with an elevation of 60 degrees above the horizon. We used that information to construct a unit vector pointing toward the illumination source. So the cosine of the angle between the surface normal and the illumination vector is just the dot product:
When the surface normal is pointing more than 90 degrees away from the light source, we assume that the feature is entirely in shadow and is illuminated only by ambient lighting. For the ambient lighting effect, we define a factor a given as a value in the range 0.0 (no ambient lighting) to 1.0 (fully ambient lighting), the computation for the illumination coefficient L at a point on the modeled surface is just
The value of L is in the range 0 to 1. When building the shaded-relief rendering, we simply multiply the RGB values for each pixel by its corresponding illumination coefficient.
There are two aspects of the USGS's elevation GeoTIFF products that are optimized for use in cloud-based applications. First, the files are organized in sub-sections (internal tiles) of 256-by-256 raster cells, each of which can be accessed independently as needed. This feature provides the ability for applications to extract only the subset of the image that it needs for rendering. It is particularly useful when zooming-in to a detail (such as the view of the Salton Sea shown in Figure 2 above). It is also useful when constructing a picture for an area that overlaps more than a single one-degree file and must be stitched together using pieces from multiple files.
The second optimizing element is the overlap from one-degree file to the next. Earlier in this article we mentioned that even though the one-third second of arc resolution of the Cloud-Optimized GeoTIFF products would result in a 10800-by-10800 raster grid for a one-degree tile, the actual resolution was 10812-by-10812. Each file in the Cloud-Optimized GeoTIFF offerings provides 6 rows and columns of overlap with each of its neighbors. This overlap permits an application to create images from two separate, adjacent one-degree areas so that the transition between images appears seamless when they are placed side-by-side. The slope computations that were described above combine a four-by-four set of neighboring elevation data cells in order to compute slope in the easterly and northerly directions. By providing data with a small overlap, the Cloud-Optimized GeoTIFF products avoid any edge-effects or discontinuities at the edge of a one-degree square. For shaded-relief purposes, we are concerned with first-derivative continuity. Some applications require second-derivative continuity and may benefit from having 6 full rows of overlap.
In Part 1 of this series, we covered the basics of reading elevation information from a cloud optimized GeoTIFF. We touched on the way GeoTIFFs use metadata to tie their data and imagery to real-world locations. And we introduced the algorithms used to create shaded-relief rendering from numeric elevations data.
So far, most of our pictures have been in black-and-white. You may be wondering about ways to add color to elevation-derived imagery. In Part 2 of this series, we will show how an application can use color to contribute information about land-cover and environment to shaded-relief renderings. To do so, we use a kind of GeoTIFF that is much different than the elevation GeoTIFFs we’ve discussed so far. The land-cover GeoTIFFs include conventional imagery (colored pixels) rather than elevation samples. Also, they are based on a projected coordinate system that maps the surface of the Earth to a plane rather than the spheroid-based geographic coordinate system that was used for the USGS GeoTIFFs. Working with these two kinds of GeoTIFF product will give a well-rounded introduction to this technology.
Apache Software Foundation. (2020). Commons Imaging: a Pure-Java Image Library. Retrieved May 2020 from https://commons.apache.org/proper/commons-imaging/.
Lambertian Reflectance. (n.d.). In Wikipedia. Retrieved June, 2020, from https://en.wikipedia.org/wiki/Lambertian_reflectance
Open Geospatial Consortium [OGC]. (2019). OGC GeoTIFF Standard. Accessed May 2020 from http://docs.opengeospatial.org/is/19-008r4/19-008r4.html. See also PDF document accessed May 2020 from https://cdn.earthdata.nasa.gov/conduit/upload/12428/19-008r4.pdf
Patterson, Tom. (2019). Shaded Relief. Website accessed December 2020 from http://www.shadedrelief.com/.
U.S. Census Bureau. (2019). Tiger/Line® Shapefiles: Roads. Website accessed May 2020 from https://www.census.gov/cgi-bin/geo/shapefiles/index.php?year=2019&layergroup=Roads
U.S. Geological Survey [USGS]. (2019). USGS Digital Elevation Models (DEM) Switching to New Distribution Format. Retrieved May, 2020 from https://www.usgs.gov/news/usgs-digital-elevation-models-dem-switching-new-distribution-format
The following pages discuss the shaded-relief algorithm. They provide tutorials, example images, and additional links to useful data sources.
The USGS Cloud Optimized GeoTIFF elevation data sources are located at the following sites:


description = "Single Page Application" [vueLayout] root_element_id = "#app" enable_routing = 1 router_options[hashbang] = "true" router_options[mode] = "html5" router_options[linkActiveClass] = "active" ==


Google Code offered in: English - Español - 日本語 - 한국어 - Português - Pусский - 中文(简体) - 中文(繁體)
At this point, StockWatcher is functional. Now you want to give it some visual style.
In this section, you'll:
GWT provides very few Java methods directly related to style. Rather, we encourage you to define styles in Cascading Style Sheets.
When it comes to styling web applications, CSS is ideal. In addition to cleanly separating style from application logic, this division of labor helps applications load and render more quickly, consume less memory, and even makes them easier to tweak during edit/debug cycles because there's no need to recompile for style tweaks.
Two style sheets are already associated with the StockWatcher project.
When you used webAppCreator to create StockWatcher, it created the application style sheet (StockWatcher.css). It also referenced the theme in the GWT module.
<?xml version="1.0" encoding="UTF-8"?>
<module rename-to='stockwatcher'>

<inherits name='com.google.gwt.user.User'/>

<inherits name='com.google.gwt.user.theme.standard.Standard'/>

<entry-point class='com.google.gwt.sample.stockwatcher.client.StockWatcher'/>
</module>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="StockWatcher.css">
<title>StockWatcher</title>

StockWatcher

Like images, CSS files are static resources that are stored in the public directory and referenced from the HTML host page. You can associate a style sheet with your application either of two ways.
Whichever method you choose, you can associate one or more application style sheets with your project. They cascade in the order they are listed, just as they do in an HTML document.
For StockWatcher, you'll follow the preferred strategy. Rather than put links to the style sheets in the HTML host page, you'll use the module XML file. Then, when you compile StockWatcher, the GWT compiler will bundle all the static resources required to run your application including the style sheets. This mechanism is called Automatic Resource Inclusion.
In most cases, it is the better strategy because the style sheet will follow your module wherever it is used in new contexts, no matter what HTML host page you embed it in. As you get into more complex development, you will want to reuse or share modules. Shared modules do not include a host page and therefore, you cannot guarantee the availabilty of the application style sheet unless you use Automatic Resource Inclusion.
If you have a case where you want whatever host page your module is embedded in to dictate the styles for its widgets, then don't include the style sheet in the module XML file.
GWT ships with three themes: Standard, Chrome, and Dark. The Standard theme is selected by default when the GWT module is created. Each application can use only one theme at a time. However, if you have an existing style or you prefer to design one from scratch, you don't have to use any theme at all. Take a moment to see what the other themes look like.
Change the theme from Standard to Dark.
     <inherits name="com.google.gwt.user.theme.dark.Dark"/>
For StockWatcher, you are going to build on the Standard theme. So after you've played around to see how themes work, set the theme back to Standard.
Note: GWT themes also come in RTL (right-to-left) versions to support languages written from right-to-left, such as arabic. To use a right-to-left theme, append RTL to the theme name.
<inherits name='com.google.gwt.user.theme.standard.StandardRTL'/>
There are various ways you can modify GWT's default styles.
For the StockWatcher application, you'll focus mostly on the second approach: you'll learn to append a secondary style.
You might have noticed the buttons for StockWatcher have a gradient background. Where is the button style coming from?
If, after you compile StockWatcher, you look at the generated JavaScript for the Add button, you will see that the button has a class attribute of gwt-Button:<button class="gwt-Button" tabindex="0" type="button">Add</button>
In GWT, each class of widget has an associated style name (like gwt-Button) that binds it to a CSS style rule. This is the widget's primary style. Default values are defined for the primary style in the theme style sheet.
| Type of Element | HTML Tag | CSS Selector |
|---|---|---|
| Buttons in static HTML and GWT-generated buttons |
<button> | button |
| Only GWT-generated buttons | <button class="gwt-Button"> | button.gwt-Button |
| Only my special GWT-generated button | <button class="gwt-Button my-button"> | button.my-button |
Tip: You can look up the name of the style rule (the CSS selector) for each widget by accessing the GWT API Reference via the Widget Gallery.
GWT takes advantage of the fact that you can associate multiple classes with an HTML element so that you can specify a style for a specific GWT-generated element and not affect others of the same type. In this section, you'll learn how to set the secondary class on a GWT-generated HTML element.
Creating a secondary style for an HTML element is a two-step process:
Let's make one quick change to see how the mechanism works. Then you can make the rest of the changes in one pass. We'll start by changing the colors of the first row where we've stored header information.
When you created the StockWatcher application, webAppCreator generated the application style sheet (StockWatcher.css) and added a pointer to it in the module XML file (StockWatcher.gwt.xml). So, you're ready to start defining style rules.
/* Formatting specific to the StockWatcher application */
body {
padding: 10px;
}
/* stock list header row */
.watchListHeader {
background-color: #2062B8;
color: white;
font-style: italic;
}
In a web page with static elements, you would now go through the HTML source and add class attributes to various elements to associate them with the styles defined in the CSS file. For example:

However, GWT elements are created dynamically at runtime. So you'll set the HTML class attributes in the Java source using the addStyleName method. You'll specify the row (the header is row 0) and the name of the secondary class, watchListHeader.
public void onModuleLoad() {
// Create table for stock data.
stocksFlexTable.setText(0, 0, "Symbol");
stocksFlexTable.setText(0, 1, "Price");
stocksFlexTable.setText(0, 2, "Change");
stocksFlexTable.setText(0, 3, "Remove");
// Add styles to elements in the stock list table.
stocksFlexTable.getRowFormatter().addStyleName(0, "watchListHeader");
Each of the changes we will make by creating a secondary style is outlined below. You can apply them one at a time to see the effect of each change or you can copy and paste the set of changes summarized at the end of this section.
/* stock list header row */
.watchListHeader {
background-color: #2062B8;
color: white;
font-style: italic;
}
/* stock list flex table */
.watchList {
border: 1px solid silver;
padding: 2px;
margin-bottom:6px;
}
// Add styles to elements in the stock list table.
stocksFlexTable.getRowFormatter().addStyleName(0, "watchListHeader");
stocksFlexTable.addStyleName("watchList");
First, you'll format the text in the stock table's header row, which loads when StockWatcher is launched. Later, you'll apply the same style rules to the table rows that contain the stock data.
/* stock list flex table */
.watchList {
border: 1px solid silver;
padding: 2px;
margin-bottom:6px;
}
/* stock list Price and Change fields */
.watchListNumericColumn {
text-align: right;
width:8em;
}
// Add styles to elements in the stock list table.
stocksFlexTable.getRowFormatter().addStyleName(0, "watchListHeader");
stocksFlexTable.addStyleName("watchList");
stocksFlexTable.getCellFormatter().addStyleName(0, 1, "watchListNumericColumn");
stocksFlexTable.getCellFormatter().addStyleName(0, 2, "watchListNumericColumn");
/* stock list Price and Change fields */
.watchListNumericColumn {
text-align: right;
width:8em;
}
/* stock list Remove column */
.watchListRemoveColumn {
text-align: center;
}
// Add styles to elements in the stock list table.
stocksFlexTable.getRowFormatter().addStyleName(0, "watchListHeader");
stocksFlexTable.addStyleName("watchList");
stocksFlexTable.getCellFormatter().addStyleName(0, 1, "watchListNumericColumn");
stocksFlexTable.getCellFormatter().addStyleName(0, 2, "watchListNumericColumn");
stocksFlexTable.getCellFormatter().addStyleName(0, 3, "watchListRemoveColumn");
You've formatted the header row of the flex table, which is displayed when StockWatcher starts up. Remember, however, that in a flex table, the rows holding the stocks aren't created until the user adds a stock to the list. Therefore, you will add the code for formatting the stock data in the addStock method rather than in the onLoad method.
// Add the stock to the table.
int row = stocksFlexTable.getRowCount();
stocks.add(symbol);
stocksFlexTable.setText(row, 0, symbol);
stocksFlexTable.getCellFormatter().addStyleName(row, 1, "watchListNumericColumn");
stocksFlexTable.getCellFormatter().addStyleName(row, 2, "watchListNumericColumn");
stocksFlexTable.getCellFormatter().addStyleName(row, 3, "watchListRemoveColumn");
Add whitespace around the text box and Add button in the Add Stock panel.
/* stock list Remove column */
.watchListRemoveColumn {
text-align: center;
}
/* Add Stock panel */
.addPanel {
margin: 10px 0px 15px 0px;
}
// Assemble Add Stock panel.
addPanel.add(newSymbolTextBox);
addPanel.add(addStockButton);
addPanel.addStyleName("addPanel");
Here the summary of the changes we've done so far.
/* Formatting specific to the StockWatcher application */ body { padding: 10px; } /* stock list header row */ .watchListHeader { background-color: #2062B8; color: white; font-style: italic; } /* stock list flex table */ .watchList { border: 1px solid silver; padding: 2px; margin-bottom:6px; } /* stock list Price and Change fields */ .watchListNumericColumn { text-align: right; width:8em; } /* stock list Remove column */ .watchListRemoveColumn { text-align: center; } /* Add Stock panel */ .addPanel { margin: 10px 0px 15px 0px; }
public void onModuleLoad() { // Create table for stock data. stocksFlexTable.setText(0, 0, "Symbol"); stocksFlexTable.setText(0, 1, "Price"); stocksFlexTable.setText(0, 2, "Change"); stocksFlexTable.setText(0, 3, "Remove"); // Add styles to elements in the stock list table. stocksFlexTable.getRowFormatter().addStyleName(0, "watchListHeader"); stocksFlexTable.addStyleName("watchList"); stocksFlexTable.getCellFormatter().addStyleName(0, 1, "watchListNumericColumn"); stocksFlexTable.getCellFormatter().addStyleName(0, 2, "watchListNumericColumn"); stocksFlexTable.getCellFormatter().addStyleName(0, 3, "watchListRemoveColumn"); // Assemble the Add Stock panel addPanel.add(newSymbolTextBox); addPanel.add(addStockButton); addPanel.addStyleName("addPanel"); . . . }
// Add the stock to the table.
int row = stocksFlexTable.getRowCount();
stocks.add(symbol);
stocksFlexTable.setText(row, 0, symbol);
stocksFlexTable.getCellFormatter().addStyleName(row, 1, "watchListNumericColumn");
stocksFlexTable.getCellFormatter().addStyleName(row, 2, "watchListNumericColumn");
stocksFlexTable.getCellFormatter().addStyleName(row, 3, "watchListRemoveColumn");
Next you want to change the style of the Remove button. The Remove button inherits its style from the Button widget. Default styles for all GWT Button widgets are defined by GWT in standard.css.
<button class="gwt-Button tabindex="0" type="button">x</button>
.gwt-Button { background:transparent url(images/hborder.png) repeat-x scroll 0px -27px; border:1px outset #CCCCCC; cursor:pointer; font-size:small; margin:0pt; padding:3px 5px; text-decoration:none; }
For StockWatcher, you want your style change to apply only to the Remove button. So you'll do just as you've been doing: add a secondary style to the Remove button element. But this time, you'll make the secondary style dependent on the primary style. Dependent styles are powerful because they are automatically updated whenever the primary style name changes. In contrast, secondary style names that are not dependent style names are not automatically updated when the primary style name changes.
To do this, you'll use the addStyleDependentName method instead of the addStyleName method.
/* Add Stock panel */
.addPanel {
margin: 10px 0px 15px 0px;
}
/* stock list, the Remove button */
.gwt-Button-remove {
width: 50px;
}
// Add a button to remove this stock from the table.
Button removeStockButton = new Button("x");
removeStockButton.addStyleDependentName("remove");
<button class="gwt-Button gwt-Button-remove" tabindex="0" type="button">x</button>
The final style change you want to implement is changing the color of the price change. If the stock price goes up, StockWatcher displays it in green; down, in red; no change, in black. This is the one style that changes dynamically as StockWatcher runs.
You've already applied an HTML class attribute to the cell element to right-align the numeric values inside the cells. To keep the code simple, it would be nice if you could apply the HTML class attributes just to the text inside the cell. An easy way to do this would be to use a nested widget. In this case, you'll insert a Label widget inside every cell inside column 2.
/* stock list, the Remove button */
.gwt-Button-remove {
width: 50px;
}
/* Dynamic color changes for the Change field */
.noChange {
color: black;
}
.positiveChange {
color: green;
}
.negativeChange {
color: red;
}
// Add the stock to the table.
int row = stocksFlexTable.getRowCount();
stocks.add(symbol);
stocksFlexTable.setText(row, 0, symbol);
stocksFlexTable.setWidget(row, 2, new Label());
stocksFlexTable.getCellFormatter().addStyleName(row, 1, "watchListNumericColumn");
stocksFlexTable.getCellFormatter().addStyleName(row, 2, "watchListNumericColumn");
stocksFlexTable.getCellFormatter().addStyleName(row, 3, "watchListRemoveColumn");
// Populate the Price and Change fields with new data. stocksFlexTable.setText(row, 1, priceText); stocksFlexTable.setText(row, 2, changeText + " (" + changePercentText + "%)"); Label changeWidget = (Label)stocksFlexTable.getWidget(row, 2); changeWidget.setText(changeText + " (" + changePercentText + "%)");
// Populate the Price and Change fields with new data.
stocksFlexTable.setText(row, 1, priceText);
Label changeWidget = (Label)stocksFlexTable.getWidget(row, 2);
changeWidget.setText(changeText + " (" + changePercentText + "%)");
// Change the color of text in the Change field based on its value.
String changeStyleName = "noChange";
if (price.getChangePercent() < -0.1f) {
changeStyleName = "negativeChange";
}
else if (price.getChangePercent() > 0.1f) {
changeStyleName = "positiveChange";
}
changeWidget.setStyleName(changeStyleName);
Occasionally, you do want to set style attributes directly on an HTML element rather than define a style rule in CSS. For example, the HTML table element has a cellpadding attribute that is convenient for setting the padding on all the cells in the table.
In GWT, depending on the HTML element, you can set some attributes in the Java code to generate the appropriate HTML.
public void onModuleLoad() {
// Create table for stock data.
stocksFlexTable.setText(0, 0, "Symbol");
stocksFlexTable.setText(0, 1, "Price");
stocksFlexTable.setText(0, 2, "Change");
stocksFlexTable.setText(0, 3, "Remove");
// Add styles to elements in the stock list table.
stocksFlexTable.setCellPadding(6);
Your application's HTML host page can include whatever additional static HTML elements you require. For example, in StockWatcher, you'll add the Google Code logo. To include images, put them in the project's public directory. The GWT compiler will copy all the necessary files to the output directory for deployment.
To include static images in the application.
StockWatcher/war/images
StockWatcher/war/images/GoogleCode.png
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="StockWatcher.css">
<title>StockWatcher</title>

StockWatcher

Note: HTML comments have been omitted for brevity.
In Depth: For more information on including style sheets, JavaScript files, and other GWT modules, see the Developer's Guide, Automatic Resource Inclusion.
At this point you've finished with the initial implementation of StockWatcher. The client-side functionality is working and the user interface has a new visual design.
Note: For the sake of simplicity, we created the user interface for this tutorial programmatically using widgets. This works fine for StockWatcher because the UI is fairly simple. However, GWT has a powerful tool called UiBinder that allows you to create complex interfaces using declaritive XML files, which can reduce code size and complexity. Check out Developer's Guide sections on Declarative Layout with UiBinder and Build User Interfaces for more info about UiBinder and UI design in general.
Now you're ready to compile StockWatcher. You'll compile your Java code into JavaScript and check that StockWatcher runs the same way in production mode as it has in development mode.


https://diynamics.github.io/
Essentially all planetary bodies rotate about their own axis at some rate; in the solar system this ranges from Jupiter (roughly 2.5 times faster than Earth's rate) to Venus (roughtly 240 times slower than Earth's rate). This rotation fundamentally constrains the motions of planetary atmospheres, oceans, and interior fluids, giving rise to the scientific field of "geophysical fluid dynamics", or GFD. The influence of this planetary rotation can be nicely demonstrated by placing a tank of water on a rotating surface and using food coloring to visualize the flows within the tank.
Demonstrations such as these are of value for students even at the elementary school level, but their presence in elementary, middle, and high school curricula is limited by prohibitively expensive materials and insufficient expertise in the relevant science. Outreach events at underserved schools by university groups are useful but cannot scale.
We are developing a Do-It-Yourself (DIY) "kit" comprising affordable, easy-to-find parts that are easily assembled into a functional rotating table apparatus, along with instructional materials for teachers on assembling the table, executing the demonstrations, and conveying the relevant scientific concepts for each demonstration.
Learn more about the project at its website, https://diynamics.github.io/.


Women
Dresses
Trousers & Jeans
Men
Trousers & Jeans
Sweatshirts
Home Collection
Bowls & Trays
Vases
Young
Girls Junior Clothing
Boys Junior Clothing
Subscribe to our newsletter!


Web accessibility is one of the most vital aspects that ensures a website to be shown in the first page in any search engine.
Web accessibility is used to describe how well a website is designed and coded so that people with disability can use and interact with that website. “Nowadays, 1/5 of the population of the Earth has a disability and struggle to have access to the same services and products as people without disabilities have”- (Popescu - What accessibility is and why it's so important - uxdesign.cc). After spending a lot of time and effort, developers have created standards and methods to improve websites. As a result, many barriers have been removed and websites become more understandable.
A website is considered accessible when it meets the four
principles, known as POUR: Perceivable, Operable, Understandable,
and Robust (Everett How & Why Accessibility Matters for SEO
searchenginejournal.com). By practicing the POUR principles, we can
make the website easier to navigate, find the information, and
increase the user experience. There are three levels to measure how
well we practice the POUR principles:
A: The most basic accessibility features
AA: The most common barriers for disabled people
AAA: The highest level of accessibility
Search engine optimization (SEO) is a term to describe the process that increases the quality of search results by measuring the numbers of websites with different aspects. When a user gives the search engine a search queries, it finds all websites that matched with the queries. The search engine continues to measure different aspects of each website, websites that get the highest scores after the measurement will be shown on the first pages.
To make our websites gain more views, we must improve the accessibility. A web with good accessibility allows its users to understand the content, use its tools, and interact with it comfortably under different situations. For example, the website can provide captions for a video so people who cannot use speakers or people with impairment can read and understand the content of that video.
In conclusion, web accessibility plays an essential rule to make websites reaches to the viewers


SUBSTITUENT EFFECT ON PHOTOCHEMICAL REARRANGEMENTS OF CROSS-CONJUGATED CYCLOHEXADIENONES
RELATED TO INDANONE
A THESIS Presented to The Faculty of the Graduate Division by
Ming Ko
in Partial Fulfillment of the Requirements for the Degree Doctor of Philosophy
in the School of Chemistry
Georgia Institute of Technology
August, 1972
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.


Toggle navigation
Lipid Viewer
Gene Viewer
Control Panel
Filter Lipid QTLs
Lipid Class
Tissue
Precursor
m
/
z
Mass tolerance
{{lipids.filter.mzToleranceType}}
Select A Lipid:
Select A Lipid Feature:
{{lipids.options.filteredIds.length}} Option(s)
No valid lipid ID's found using this filter
Select A QTL to View
Select A QTL:
{{lipids.options.qtls.length}} Option(s)
No QTLs found for this lipid feature. Please select another one.
{{chromosomeNumber}}


The initial project was to give a rudimentary view on the history of the internet and its impacts on the world. This is seen in the invention of the internet, browser wars, internet search and people power sections. I took the initial site we had created and cloned it for the second assignment where I essentially merged both websites together to give a better description and overview of the internet. The main focus around the second assignment entails Domain names and ICANN, IP Addresses, Packet, Routing, DNS, HTTP/S, HTML and CSS. Note: the professor mentioned in a previous lecture we could take our previous project and merge it with our current assignment so I did that to get more practice in integrating new features into existing websites.
The first topic is about the Domain names and ICANN. Here we will take a look at how ICANN is the Internet Corporation for Assigned Names and Numbers maintains the central repository for IP addresses which is essential to the internet.
The next topic is IP Addresses, Packets and Routing. This section looks into what are IP Addresses and how Packets and Routers use them to transport data through the internet.
After getting into what IP Addresses are, we take a look at what a DNS server is and how it is almost essential for browsing the web.
Once we discuss how DNS servers help the web, we start looking into the foundation of how data is being transferred over it with HTTP.
Lastly, we discuss what W3C is, and how HTML and CSS make up the basic structure of almost all webpages on the internet.
With a Bachelor's degree in Computer Science and Mathematics from Caldwell University, this developer is going on 3 years of work in data analytics and is actively pursuing a master's degree in Data Science.
LinkedIn


Utilities
Axure Kit
Carbon
Updates
Common widgets
Style effects
Variables
Selection group
Repeater
Dynamic panel
Introduction
Axure elements
Utilities
UI shell
Tooltip
Toggle
Tile
Text input
Tag
Tabs
Structured list
Slider
Select
Search
Radio button
Progress indicator
Pagination
Overflow menu
Number input
Notification
Modal
Loading
List
Link
Inline loading
Form
File upoader
Dropdown
Date picker
Data table
Content switcher
Code snippet
Checkbox
Button
Breadcrumb
Accordion
Components
Typography
Spacing
Icons
Color
Design elements
Library index
Getting started
Components
Privacy
Have questions? Open an issue on GitHub.
Last updated 29 January 2020
Copyright © 2020 IBM
Terms of Use
Contribute
IBM.com
Interactive cursors
Library section:
Utilities
arrow
pointer
disabled
help
text
Hotspots with preset cursor properties.
–
Disabled (“not allowed”) cursor is already included in components with disabled states/elements (Tabs, Progress indicator, Overflow menu etc.)
–
Implemented features
Hotspots can be put over any elements to model the cursor behavior.
Usage
Cursor images
Library section:
Utilities
Actual size:


You Should Be Drinking Sherry This Holiday Season
by Jeanne O'Brien CoffeyWhen the weather starts to turn colder and you’re not in the mood for red wine, Fino sherry might be just the thing. Completely dry, it has a briny nutty complexity that encourages sipping, and a nice weight with a lingering finish.
For some reason, in this country sherry is still thought of as a drink for little old ladies, perhaps because most people are only familiar with cream or Pedro Jimenez styles, which are sweet.
But sherry actually comes in a wide variety, from bone dry to syrupy and unctuous. Unfortunately, the styles have long and complicated names (Amontillado, I’m looking at you) – and sometimes even within a specific style, products vary widely. The wine is also a flexible companion in a wide variety of cocktails, and plays well with the current low ABV trend.
For the most part, sherry is made from two grapes, Palomino (for dry styles) and Pedro Ximénez (for sweet styles), grown in southwestern Spain. After vinification, the wine ages in casks, where it is subject to varying degrees of oxidation, depending upon the winemaker’s intent.
These days, sherry is gaining appeal thanks to other oddities like orange wine – a similarly oxidized product—and the number of small producers all with unique stories and processes. It helps that, as an oxidized product, sherry stays tasty after it’s been opened much longer than regular wine – up to two weeks or so for the fino style and up to two months for a sweet variety.
I asked Claire Henderson, senior brand manager and sherry educator, Gonzalez Byass USA, to share some thoughts about sherry, and ways to enjoy it.
What are a few things people should know about sherry that they don’t?
Henderson: Sherry is probably one of the most versatile wines around, ranging from bone dry to extremely sweet. It is great by the glass, as an aperitif, with food and also in cocktails. Also, sherry is a wine-a fortified wine-and should be treated like a wine ie. served in a wine glass (not a traditional sherry schooner). Most styles should be served chilled.
How is sherry shaking off the stereotype of being for older people?
Henderson: Through mixology and through food pairings at restaurants. Food-friendly and drier styles that are perfect as aperitifs or with savory foods, such as Fino and Amontillado, are appealing to wine drinkers new to the sherry category, and are being promoted by younger bartenders and chefs. Also, the oxidative and complex characters of sherry appeals to wine consumers who like orange wines and natural wines. The En Rama style of unfiltered Fino also works with natural wine fans.
How can sherry be combined with the new trend toward low-proof cocktails?
Henderson: Sherry is perfect for low proof cocktails and has been embraced by the bartending community. It can be used to substitute spirits in a cocktail offering a wide palate of flavors while contributing less than half the alcohol, with most sherries being around 18 percent ABV. The sweeter styles can also be used in very small quantities to sweeten a cocktail, ie. where you would maybe use a spoon of simple syrup you can use some PX. This gives the natural sweetness of the wine and also adds depth and flavor. In addition, with exception of the fino styles, the majority of sherry wines are fully oxidized and therefore will last for weeks once opened.
What are some ways sherry fits into holiday entertaining?
Henderson: Sherry has always been especially enjoyed over the holidays, although it is perfect all year round and for all occasions. For the holidays, specifically the sweeter cream styles [pair] with desserts ranging from pumpkin pie to cheesecake to trifle. In addition, sherry is a popular ingredient in egg nog, either with sweeter Cream styles or dry Amontillados and we have also found that the oxidative styles of Palo Cortado and Oloroso are the perfect match for turkey at Thanksgiving.
Here are a few classic Sherry recipes that also happen to be low ABV.


Nothing travels faster than the speed of light, with the possible exception of bad news, which obeys its own special laws.
Edit this content to add your own quote


Package Controllers
Class AppointmentDetails
- java.lang.Object
-
- Controllers.AppointmentDetails
-
public class AppointmentDetails extends java.lang.Object
Appointment Details Screen. Creates/Updates Appointments.
-
-
Field Summary
Fields Modifier and Type Field Description private Appointment
appointment
Appointment to be Created or updatedprivate javafx.scene.control.DatePicker
appointmentDatePicker
private javafx.scene.control.TextArea
appointmentDescriptionTextArea
private javafx.scene.control.TextField
appointmentIdTextField
private javafx.scene.control.TextField
appointmentLocationTextField
private javafx.scene.control.TextField
appointmentTitleTextField
private javafx.scene.control.TextField
appointmentTypeTextField
private javafx.scene.control.Button
cancelAppointment
private javafx.scene.control.ComboBox<Contact>
contactComboBox
private javafx.collections.ObservableList<Contact>
contacts
ObservableList to hold all contacts from the database.private javafx.scene.control.ComboBox<Customer>
customerComboBox
private javafx.collections.ObservableList<Customer>
customers
ObservableList to hold all Customers from the database.private javafx.collections.ObservableList<java.time.LocalTime>
endTimeList
ObservableList to hold all end times.private javafx.scene.control.ComboBox<java.time.LocalTime>
endTimePicker
private java.util.function.Consumer<Appointment>
onComplete
Consumer to pass appointment back to the calling controller.private javafx.collections.ObservableList<java.time.LocalTime>
startTimeList
ObservableList to hold all start times.private javafx.scene.control.ComboBox<java.time.LocalTime>
startTimePicker
private javafx.scene.control.Button
submitAppointment
private java.time.format.DateTimeFormatter
timeFormatter
Time formatter to standard time format.private javafx.scene.control.ComboBox<User>
userComboBox
private javafx.collections.ObservableList<User>
users
ObservableList to hold all users from the database.
-
Constructor Summary
Constructors Constructor Description AppointmentDetails()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
cancel()
Checks to see if the user wants to cancel the current action.private java.time.LocalDate
datePickerInitialDate()
Checks the current time, if after 22:00 then returns the next day.private void
endTimePickerInit()
Initializes the End Time ComboBox.private Appointment
extractAppointmentDetails()
Extracts the appointment details from the window, and either updates the Existing Appointment or creates a new Appointment Object.(package private) void
initialize()
Initializes the Appointment Details Screen.private void
initializeComboBoxes()
Initializes the Contact ComboBox & Customer ComboBox.void
initializeData(Appointment appointment, javafx.collections.ObservableList<Customer> customers, java.util.function.Consumer<Appointment> onComplete)
Initializes Data coming from the Calendar Controller.private void
initializeDatePickers()
Initializes the DatePickers.private void
loadAppointment(Appointment appointment)
Loads the appointment passed in from the Calendar Controller.private void
loadContacts()
Retrieves all Contacts from Database.private void
loadStartEndTimes()
Creates start and end times in EST then converts back to System Default Time.private void
loadUsers()
Retrieves all Users from Database.private void
setNewAppointmentTimes()
Sets the initial appointment times to the next quarter increment.private void
startTimePickerInit()
Initializes the Start Time ComboBox.(package private) void
submit()
Passes back the appointment, to Calendar controller to be added to the Database, then closes the window.private boolean
validInput()
Validates all inputs.private boolean
validTimes()
Checks to see if the times are valid entries.
-
-
-
Field Detail
-
appointment
private Appointment appointment
Appointment to be Created or updated
-
onComplete
private java.util.function.Consumer<Appointment> onComplete
Consumer to pass appointment back to the calling controller.
-
customers
private final javafx.collections.ObservableList<Customer> customers
ObservableList to hold all Customers from the database.
-
contacts
private final javafx.collections.ObservableList<Contact> contacts
ObservableList to hold all contacts from the database.
-
users
private final javafx.collections.ObservableList<User> users
ObservableList to hold all users from the database.
-
startTimeList
private final javafx.collections.ObservableList<java.time.LocalTime> startTimeList
ObservableList to hold all start times.
-
endTimeList
private final javafx.collections.ObservableList<java.time.LocalTime> endTimeList
ObservableList to hold all end times.
-
timeFormatter
private final java.time.format.DateTimeFormatter timeFormatter
Time formatter to standard time format.
-
appointmentIdTextField
private javafx.scene.control.TextField appointmentIdTextField
-
appointmentTitleTextField
private javafx.scene.control.TextField appointmentTitleTextField
-
appointmentLocationTextField
private javafx.scene.control.TextField appointmentLocationTextField
-
appointmentTypeTextField
private javafx.scene.control.TextField appointmentTypeTextField
-
contactComboBox
private javafx.scene.control.ComboBox<Contact> contactComboBox
-
customerComboBox
private javafx.scene.control.ComboBox<Customer> customerComboBox
-
userComboBox
private javafx.scene.control.ComboBox<User> userComboBox
-
appointmentDatePicker
private javafx.scene.control.DatePicker appointmentDatePicker
-
startTimePicker
private javafx.scene.control.ComboBox<java.time.LocalTime> startTimePicker
-
endTimePicker
private javafx.scene.control.ComboBox<java.time.LocalTime> endTimePicker
-
appointmentDescriptionTextArea
private javafx.scene.control.TextArea appointmentDescriptionTextArea
-
submitAppointment
private javafx.scene.control.Button submitAppointment
-
cancelAppointment
private javafx.scene.control.Button cancelAppointment
-
-
Method Detail
-
initialize
void initialize()
Initializes the Appointment Details Screen. Initializes the Date & Time Pickers, and ComboBoxes.
-
initializeDatePickers
private void initializeDatePickers()
Initializes the DatePickers.
-
initializeComboBoxes
private void initializeComboBoxes()
Initializes the Contact ComboBox & Customer ComboBox.
-
datePickerInitialDate
private java.time.LocalDate datePickerInitialDate()
Checks the current time, if after 22:00 then returns the next day.- Returns:
- LocalDate of either today or the next.
-
startTimePickerInit
private void startTimePickerInit()
Initializes the Start Time ComboBox.
-
endTimePickerInit
private void endTimePickerInit()
Initializes the End Time ComboBox.
-
initializeData
public void initializeData(Appointment appointment, javafx.collections.ObservableList<Customer> customers, java.util.function.Consumer<Appointment> onComplete)
Initializes Data coming from the Calendar Controller.- Parameters:
appointment
- Appointment to be updated, if present.customers
- List of customers to add to appointment.onComplete
- Consumer to return the new/updated appointment.
-
loadContacts
private void loadContacts()
Retrieves all Contacts from Database.
-
loadUsers
private void loadUsers()
Retrieves all Users from Database.
-
loadStartEndTimes
private void loadStartEndTimes()
Creates start and end times in EST then converts back to System Default Time.
-
setNewAppointmentTimes
private void setNewAppointmentTimes()
Sets the initial appointment times to the next quarter increment. Maybe overridden by an incoming appointment to be updated.
-
loadAppointment
private void loadAppointment(Appointment appointment)
Loads the appointment passed in from the Calendar Controller.
-
cancel
void cancel()
Checks to see if the user wants to cancel the current action. If true closes current screen, otherwise returns to screen.
-
submit
void submit()
Passes back the appointment, to Calendar controller to be added to the Database, then closes the window.
-
validTimes
private boolean validTimes()
Checks to see if the times are valid entries.- Returns:
true
if times are valid, otherwisefalse
-
validInput
private boolean validInput()
Validates all inputs.- Returns:
true
if inputs have valid data, otherwisefalse
-
extractAppointmentDetails
private Appointment extractAppointmentDetails()
Extracts the appointment details from the window, and either updates the Existing Appointment or creates a new Appointment Object.- Returns:
- Appointment Object to be added to the calendar.
-
-


The Challenge To End All Challenges
Last 7 Days
Next 7 Days
What I did
I was
for
minutes
Remove Activity
Add an activity
Add an activity for
or
View Log
More
How long did you do
for?
Hours
:
Minutes
Save
0
Total activity minutes
0
Days recorded
327
Days remaining in the challenge


THIS IS NOT YET AN OFFICIAL MOCHIKIT COMPONENT
MochiKit.Iter-ext - even more iterators
function length(a) { return Math.sqrt(a.x*a.x + a.y*a.y); } function sub(a, b) { return { x: a.x - b.x, y: a.y - b.y }; } var polyline = [{x: 0, y: 0}, {x: 3, y: 0}, {x: 3, y: 4}]; // right triangle var perimeter = sum(imap( function(pair) { return length(sub(pair[1], pair[0])); }, // could do in two map steps also; pair->segment vector->length pairView(polyline, true) )); assert( perimeter == 3 + 4 + 5 );
Even more iterators. "Closes the gap" to the Python itertools module, http://docs.python.org/library/itertools.html, and then some.
Extends the existing MochiKit.Iter namespace
var tree = { value: 1, children: [ { value: 2, children: [ { value: 4, children: [] } ] }, { value: 3, children: [ { value: 5, children: [ { value: 7, children: [] } ] }, { value: 6, children: [] } ] } ] }; forEach(treeLevelOrder(root, itemgetter('children')), function(node) { .... });
Pairwise view of an iterable (overlapping)
pairView([a, b, c, d, ...]) --> [ [a,b], [b,c], [c,d], ...]
treePreOrder(iterable, getChildNodes):
parent->child order (depth-first, preorder). "standard" recursive descent. see http://en.wikipedia.org/wiki/Tree_traversal
nodes = map(itemgetter('value'), treePreOrder(tree, itemgetter(children))) --> [ 1, 3, 6, 5, 7, 2, 4 ]
treeLevelOrder(iterable, getChildNodes):
top-down, breadth-first, level-order traversal (parent->siblings order) see http://en.wikipedia.org/wiki/Tree_traversal useful for searching and culling for example.
nodes = map(itemgetter('value'), treeLevelOrder(tree, itemgetter(children))) --> [ 1, 2, 3, 4, 5, 6, 7 ]
treePostOrder(iterable, getChildNodes):
bottom-up iteration, leaf -> parent see http://en.wikipedia.org/wiki/Tree_traversal Useful for pruning for example.
nodes = map(itemgetter('value'), treePostOrder(tree, itemgetter(children))) --> [ 6, 7, 5, 3, 4, 2, 1 ]
windowView(iterable, windowSize=2, stepSize=1):
sliding-window iterator, generalized pairView
convenience in the common(?) case where you need to do a mapping but also discard certain elements (when mapFn returns null/undefined) i.e if mapFn null/undefined is treated as false
iterator vesion of MochiKit.Base.flattenArray
chainFromIter(seq[, getIter]):
Resembles Python's chain.from_iter one level flattening of a sequence of iterables generalized chain (intended for larger volumes, think nodes->values of a tree-structure). Can be used to traverse groupby sequences: indirectChain(groupby([1,1,1,2,2,3,3]), function(v) { return v[1]; }) -> [1,1,1,2,2,3,3] i.e an inverse of the groupby)
filters out adjacent equal elements. kindof equivalent to: imap(function(v){ return v[0]; }, groupby(iterable)) see also http://www.sgi.com/tech/stl/unique.html
uniqueView([1, 1, 2, 3, 4, 4, 4]) --> 1, 2, 3, 4
resembles nested loops over the input sequences see http://docs.python.org/library/itertools.html#itertools.product
todo: ! currently only supports two input sequences
enumerate(sequence[, start=0]):
Convenience wrapper for MochiKit.Iter.izip and MochiKit.Iter.count. Returns an iterator over [index, sequence{i}] pairs.
forEach(enumerate(seq), function(i_val) { var i = i_val[0], val = i_val[1]; ... });
Experimental. Equivalent to the break statement, but for iterator traversal loops.
(convenience for throwing the MochiKit.Iter.StopIteration exception)
izipLongest(iterables, fillValue=null):
Similar to MochiKit.Iter.izip but continues until the longest iterator is exhausted, filling missing values with fillValue, default null
Return r length subsequences of elements from the input iterable.
Combinations are emitted in lexicographic sort order. So, if the input iterable is sorted, the combination tuples will be produced in sorted order.
Elements are treated as unique based on their position, not on their value. So if the input elements are unique, there will be no repeat values in each combination.
combinations([A,B,C,D], 2) --> [A,B], [A,C], [A,D], [B,C], [B,D], [C,D] combinations(range(4), 3) --> [0,1,2], [0,1,3], [0,2,3], [1,2,3]The number of items returned is n! / r! / (n-r)! when 0 <= r <= n or zero when r > n.
combinationsWithReplacement(iterables, r):
Return r length subsequences of elements from the input iterable allowing individual elements to be repeated more than once.
Combinations are emitted in lexicographic sort order. So, if the input iterable is sorted, the combination tuples will be produced in sorted order.
Elements are treated as unique based on their position, not on their value. So if the input elements are unique, the generated combinations will also be unique.
combinationsWithReplacement([A,B,C], 2) --> [A,A], [A,B], [A,C], [B,B], [B,C], [C,C]The number of items returned is (n+r-1)! / r! / (n-1)! when n > 0.
Return successive r length permutations of elements in the iterable.
If r is not specified or is undefined, then r defaults to the length of the iterable and all possible full-length permutations are generated.
Permutations are emitted in lexicographic sort order. So, if the input iterable is sorted, the permutation tuples will be produced in sorted order.
Elements are treated as unique based on their position, not on their value. So if the input elements are unique, there will be no repeat values in each permutation.
The number of items returned is n! / (n-r)! when 0 <= r <= n or zero when r > n.
compressIter(data, selectors):
Make an iterator that filters elements from data returning only those that have a corresponding element in selectors that evaluates to True. Stops when either the data or selectors iterables has been exhausted.
compress([A,B,C,D,E,F], [1,0,1,0,1,1]) --> A, C, E, F
interleave([a, b, c], [1, 2, 3], [x, y, z]) --> a, 1, x, b, 2, y, c, 3, z
Advances iterator iter n steps.
Returns iterable equivalent of applying genFn() n times.
Alias for MochiKit.Iter.some
Alias for MochiKit.Iter.every
Alias for MochiKit.Iter.applymap
Repeats the iterable sequence n times. Note. this assumes the iterable is Not an iterator, i.e can be restarted (doesn't use auxilary storage as MochiKit.Iter.cycle() does)
repeatSeq(xrange(3), 3) --> 0, 1, 2, 0, 1, 2, 0, 1, 2(osbserve the use of MochiKit.Iter.xrange() and not MochiKit.Iter.range() above)
Similar to MochiKit.Iter.range() but returns an iterable collection instead of an iterator. This enables the range to be re-used multiple times, i.e it won't get exhausted. This semantics are identical to Python.
r = range(3) xr = xrange(3) forEach(r, log); --> 0, 1, 2 forEach(xr, log); --> 0, 1 ,2 assert( list(r) == [] ) assert( list(xr) == [0, 1, 2] )
converts the "Java style" iterator to the JS 1.7 interface.
see http://download.oracle.com/javase/1.5.0/docs/api/java/util/Iterator.html
wraps iterable in a count guard that only allows at most n number of iterations.
An iterator returning the running reduce/fold values. fn defaults to operator.add
see MochiKit.Iter.reduce() and http://docs.python.org/3.3/library/itertools.html#itertools.accumulate
Shorthand for a window-view iterator with same step as the window size.
Convenience that creates a map of property name from each iterator element. (Mostly since the name seems to have caught on from libraries such as Underscore for example).
Combined map and zip operation.
zipWith(fn, a, b[, ...]) --> [fn(a0, b0, ..), fn(a1, b1, ...), fn(a2, b2, ...)](based on the Haskell function).
| [1] | The iteration protocol is described in PEP 234 - Iterators: http://www.python.org/peps/pep-0234.html |
| [2] | Python's itertools module: http://docs.python.org/lib/module-itertools.html |
| [3] | Iteration in JavaScript: http://bob.pythonmac.org/archives/2005/07/06/iteration-in-javascript/ |
| [4] | Tree traversal: http://en.wikipedia.org/wiki/Tree_traversal |
Copyright 2005-2010 Bob Ippolito<EMAIL_ADDRESS>This program is dual-licensed free software; you can redistribute it and/or modify it under the terms of the MIT License or the Academic Free License v2.1.


---
layout: post
title: Storyboarding in vectors
date: '2015-10-11T18:30:45+02:00'
categories:
- Illustration
- Storyboards
picture_url: https://film-Storyboards.tumblr.com/post/130981629015/storyboarding-in-adobe-illustrator
---
Storyboarding in Adobe Illustrator


Arraial do Cabo, 45km east of Saquarema, is surrounded by gleaming
white sand dunes and offers breathtaking beaches without half the
touristy fuss of neighboring Búzios. Arraial is home to a working
fishing port, Porto do Forno, which lends it a welcoming working-class
demeanor. Some of the best beaches – pristine swaths of gorgeous sand
and bright-green waters – are within an easy 15-minute stroll of the
downtown bus station, while others are just a short boat ride away.
Arraial is a renowned diving destination, and it’s also a good place
to observe humpback whales (Megaptera novaeangliae), whose migration
routes pass directly offshore.


--- products: new: limit: {{theme_settings.homepage_new_products_count}} featured: limit: {{theme_settings.homepage_featured_products_count}} carousel: {{theme_settings.homepage_show_carousel}} blog: recent_posts: limit: {{theme_settings.homepage_blog_posts_count}} --- {{#partial "hero"}} {{#if carousel}} {{> components/carousel}} {{/if}} {{/partial}} {{#partial "page"}} {{#each shipping_messages}} {{/each}}


{% extends 'base.html'%} {% block content %}
{{ writer.bio }}
You have no bio.
Edit Profile
{{ blog.post | truncate(200) }}
You have no blog posts


| Class | Output |
|---|---|
.s-prose |
Adds proper styling for rendered Markdown. |
.s-prose__xs |
Our most compact version with the smallest font size and line height. |
.s-prose__sm |
Decreases the base font size and line height. |
.s-prose__md |
Increases the base font size and line height. |
We modified this test document from the folks at Tailwind to demonstrate and explain our design choices.
The following is a real-world answer taken from Stack Overflow
Let’s see what a link preview looks like within the prose component.
This example includes the full kitchen-sink collection of everything the Markdown spec includes.
In ancilliary content like comments or side-discussions, it may be appropriate to add the small variation.
Depending on the context for displaying the prose component, it may be appropriate to size text up to maintain readability.


Open source tool to automate app development.
Fastlane lets you automate every aspect of your development and release workflow


Before Change
// everything in brain/ is dynamically imported, these are hidden imports. For
// simplicity, include everything in astroid. Exclude all the test/ subpackage
// contents and the test_util module.
hiddenimports = collect_submodules("astroid",
lambda name: (not is_module_or_submodule(name, "astroid.tests")) and
(not name == "test_util"))
After Change
// everything in brain/ is dynamically imported, these are hidden imports. For
// simplicity, include everything in astroid. Exclude all the test/ subpackage
// contents and the test_util module.
hiddenimports = ["six"] + collect_submodules("astroid",
lambda name: (not is_module_or_submodule(name, "astroid.tests")) and
(not name == "test_util"))


in the years before i started taking benzos (klonopin, valium, xanax, ativan) occasionally, when i would smoke weed, i would blackout, if i was standing i would shake and fall down, and come to wondering what happened, other people smoking the same dope would never have this effect, so i know it wasnt laced. perhaps i experienced seizures brought on by the weed, but ive never heard of this before. since ive been regularly been prescribed an array of benzos, this has not happened, though potency and dosage and smoking method of the weed is the same.
i know benzos are antileptics, and prevent seizures, and quitting coldturkey can produce the same, though ive gone a week without pills and had no problem. ive never thought of those episodes as seizures till today when looking at effexor i saw someone else report the similiar effect of pot when combined with effexor. these episodes happened over a period of 6 years, but never regularly. once or twice i actually hit my head from the shaking or convulsing, and freaked some friends out. luckily i never was seriously injured. now, this sounds like a drug induced seizure to me, but from weed? of course, im a major drug addict, in recovery and cant attest as to not being on other drugs at the time, so maybe it was a combination or something. but it makes me think...
now i stick to pills but i miss the other friends.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Set Color Picker
Use Placeholders and override color chips.
Display an ordered set of colors as chips (with custom template).


With the two compositions of 1919 that have been given e title Checkerboard,
one in light and the other in dark colors, Mondrian turns from his experiments
with a geometrical subdivision of form to similar experiments with color.
In both compositions, a rectangle is subdivided into 16x16 small rectangles,
each of which has a proportion of the canvas as a whole. By this procedure completely
regular geometrical pattern is produced which serves Mondrian as the foundation for his
rhythmic composition, created by means of color variations. By painting several adjacent
rectangles the same color but keeping the linear pattern distinct, Mondrian achieves,
in another way, a rhythmic action that traverses the grid-like a musical rhythm flowing
over the bar-lines.
In the Checkerboard, Dark Colors Mondrian works in the me way, with tints of red,
purple, and blue. Typical for the paintings is the manner in which the artist seems to
have determined the color for each little rectangle by tuition and experiment.
The paintings are not by any means executed according to a preconceived idea.
The linter let himself be guided by his feeling for color and rhythm,
and he made alterations and corrections as he worked; overpaintings to change the
colors of some of the areas can still be detected. The skilled treatment and masterly
balance of the canvases are the result not of a theory it of almost thirty years'
experience as a painter.


Rotary Club of Dombivli Suncity
Rotary club of Dombivli East
Smartcity Navi Mumbai
New Bombay Seaside
New Bombay
Saraswati college
Navi Mumbai Industrial Area
Thane Premium
Thane Northend
Thane Downtown
Dombivli East
Dombivli
Dombivli Suncity
Birla College
Kalyan Central
Ulhasnagar Sapna Garden
Ambarnath
Rotary Club of Dombivli Suncity
Rotary club of Dombivli East
Smartcity Navi Mumbai
New Bombay Seaside
New Bombay
Saraswati college
Navi Mumbai Industrial Area
Thane Premium
Thane Northend
Thane Downtown
Dombivli East
Dombivli
Dombivli Suncity
Birla College
Kalyan Central
Ulhasnagar Sapna Garden
Ambarnath


Please motivate the chosen date (e.g. based on awarded beamtime, or described intention to apply)
Proposals should be written in English, properly referenced, and prepared in the Word template. Please keep to the 2 page limit, including Summary, Background (Science Case, Practical Consideration, References, Figures/Tables)
Generate and review a merged PDF of the form data and all attached documents.


Site Statistics
Site Visitors
Site Impressions
Network Performance
Duis autem vel eum iriure dolor in vulputate...
Server Status
Summary of the status of your server.
CPU Usage (40.05 - 32 cpus)
weather forecast
DECEMBER 16
2016, Friday
7:53 PM


As a rapidly urbanizing nation, it is estimated that nearly 300 million people are now living in cities in India. Urban poverty and destitution is rising at a directly proportional rate owing to an unplanned model of urbanization that demands an increased availability of casual and unorganized labour, while failing to develop the most basic housing and sanitation amenities for migrant and poor communities that throng urban settlements in search for a better life. ARU Foundation is working on ground from past 2 years with vulnerable children on an individual Basis, than group came together to extend their support to women in different areas of Delhi by Interacting with them to understand the needs. ARU foundation is a development organization registered as a not for profit society as on 29th December 2017. It is a non- political,non-religious organization. Its mission is to unite with people in India order to create development in the broadcast sense through the implementation of the projects, which aims in transferring knowledge skills and capacity to individuals and communities who need assistance to live in a society which is free from poverty.
Founder
Aru Foundation
Co-Founder
Aru Foundation
General Secretary
Aru Foundation
In every segment of population there are several degrees of vulnerability based on the demographics of the person, what their existing social relationships are, andwhether the happen to be male, female or children. In our experience, women aged 16-35 and children under 16 continue to outrank all others in terms of how vulnerable they remain while they are on the streets, or in conditions where they don't have basic amenities.The roof over their heads is which not properly made. A common tale that unites their experiences is one of intense vulnerability that leaves women particularly prone to exploitation and severe abuse. Absolute poverty and starvation thrust many into a pit of helplessness, where the added responsibility of feeding young children often leads both mother and child to perish. Vulnerability is a vast term, Individual can be vunerable in many ways, the people living in the place is vulnerable because they are migrated from different states and living in conditions where they don't have access to basic amenities like electricity, clean water etc. They were exploited by Zamindar's on whose land they used to cultivate on a yearly basis contract.
Chilla Khadar is among the handful of villages on the floodplains of Yamuna in Delhi where the main occupation is farming. The places is lack in basic amenities like Pucca road, School, anganwadi, electricity, clean drinking water and Toilets, despite they have a population of 2000 Families. Most of the families are living in this condition from past 30 years, as majority of the population is migrated from Uttar pradesh and Bihar. Chilla khaddar is considered as unauthorized colony in Delhi and for most people it is a village in Delhi which is on Farming land and most of the facility doesn't reach to them because of the farming or agricultural land they have. Another area in which we are working is Okhla, where our focus is to develop community and link them with governmental schemes.


TxError
public enum TxError : Error
extension TxError: LocalizedError
TxError
is the error type returned by Telnyx WebRTC SDK. It encompasses a few different types of errors, each with
their own associated reasons.
-
The underlying reason of client setup configuration errors
See moreDeclaration
Swift
public enum ClientConfigurationFailureReason
-
The underlying reason of the call errors
See moreDeclaration
Swift
public enum CallFailureReason
-
The underlying reason of the server errors
See moreDeclaration
Swift
public enum ServerErrorReason
-
Socket connection failures.
Declaration
Swift
case socketConnectionFailed(reason: SocketFailureReason)
-
There’s an invalid parameter when setting up the SDK
Declaration
Swift
case clientConfigurationFailed(reason: ClientConfigurationFailureReason)
-
There’s an invalid parameter when starting a call
Declaration
Swift
case callFailed(reason: CallFailureReason)
-
When the signaling server sends an error
Declaration
Swift
case serverError(reason: ServerErrorReason)
-
Declaration
Swift
public var errorDescription: String? { get }


Calculates Pearson, Spearman, polychoric, and polyserial correlation coefficients, in weighted or unweighted form. The package implements tetrachoric correlation as a special case of the polychoric and biserial correlation as a specific case of the polyserial.
| Version: | 1.9.1 |
| Depends: | R (≥ 3.1.0) |
| Imports: | minqa, mnormt, Rcpp, stats |
| LinkingTo: | Rcpp, RcppArmadillo |
| Suggests: | knitr, rmarkdown, lattice, captioner |
| Published: | 2017-05-18 |
| Author: | Ahmad Emad & Paul Bailey |
| Maintainer: | Paul Bailey <pbailey at air.org> |
| BugReports: | https://github.com/ahmademad/wCorr/issues |
| License: | GPL-2 |
| NeedsCompilation: | yes |
| Materials: | NEWS |
| In views: | Psychometrics |
| CRAN checks: | wCorr results |
| Reference manual: | wCorr.pdf |
| Vignettes: |
wCorr Arguments wCorr Formulas |
| Package source: | wCorr_1.9.1.tar.gz |
| Windows binaries: | r-devel: wCorr_1.9.1.zip, r-release: wCorr_1.9.1.zip, r-oldrel: wCorr_1.9.1.zip |
| OS X binaries: | r-release: wCorr_1.9.1.tgz, r-oldrel: wCorr_1.9.1.tgz |
| Old sources: | wCorr archive |
| Reverse imports: | EdSurvey |
| Reverse suggests: | WeightIt |
Please use the canonical form https://CRAN.R-project.org/package=wCorr to link to this page.


Pope Francis calls for action to safeguard women, children
by Nicole Winfield, The Associated PressBANGKOK — Pope Francis has called for migrants to be welcomed and for women and children to be protected from exploitation, abuse and enslavement as he began a busy two days of activities in Thailand.
Francis pleaded for action against one of the region’s greatest scourges — human trafficking to fuel the forced labour and sex trade industries — as he opened a weeklong visit to Asia on Thursday.
He praised the Thai government’s efforts to fight human trafficking in a speech at host Prime Minister Prayuth Chan-ocha’s offices. But he appealed for greater international commitment to protect women and children “who are violated and exposed to every form of exploitation, enslavement, violence and abuse.”
He called for ways to “uproot this evil and to provide ways to restore their dignity.”
Nicole Winfield, The Associated Press


| CONTENTS | PREV | NEXT |
A fundamental concept and important building block of system security is the protection domain [Saltzer and Schroeder 75]. A domain can be scoped by the set of objects that are currently directly accessible by a principal, where a principal is an entity in the computer system to which permissions (and as a result, accountability) are granted. The sandbox utilized in JDK 1.0 is one example of a protection domain with a fixed boundary.
The protection domain concept serves as a convenient mechanism for grouping and isolation between units of protection. For example, it is possible (but not yet provided as a built-in feature) to separate protection domains from interacting with each other so that any permitted interaction must be either through trusted system code or explicitly allowed by the domains concerned. Note that existing object accessibility rules remain valid under the new security architecture.
Protection domains generally fall into two distinct categories: system domain and application domain. It is important that all protected external resources, such as the file system, the networking facility, and the screen and keyboard, be accessible only via system domains. The figure below illustrates the domain composition of a Java application environment.
[D]A domain conceptually encloses a set of classes whose instances are granted the same set of permissions. Protection domains are determined by the policy currently in effect. The Java application environment maintains a mapping from code (classes and instances) to their protection domains and then to their permissions, as illustrated by the figure below.
[D]A thread of execution (which is often, but not necessarily tied to, a single Java thread, which in turn is not necessarily tied to the thread concept of the underlying operation system) may occur completely within a single protection domain or may involve an application domain and also the system domain. For example, an application that prints a message out will have to interact with the system domain that is the only access point to an output stream. In this case, it is crucial that at any time the application domain does not gain additional permissions by calling the system domain. Otherwise, there can be serious security implications.
In the reverse situation where a system domain invokes a method from an application domain, such as when the AWT system domain calls an applet's paint method to display the applet, it is again crucial that at any time the effective access rights are the same as current rights enabled in the application domain.
In other words, a less "powerful" domain cannot gain additional permissions as a result of calling or being called by a more powerful domain.
This discussion of one thread involving two protection domains naturally generalizes to a thread that traverses multiple protection domains. A simple and prudent rule of thumb for calculating permissions is the following:
doPrivileged
method (see below), the permission set of
the execution thread is considered to include a permission if it is
allowed by the said code's protection domain and by all
protection domains that are called or entered directly or
indirectly subsequently.doPrivileged
method enables a piece of trusted code to
temporarily enable access to more resources than are available
directly to the application that called it. This is necessary in
some situations. For example, an application may not be allowed
direct access to files that contain fonts, but the system utility
to display a document must obtain those fonts, on behalf of the
user. We provide the doPrivileged
method for the
system domain to deal with this situation, and the method is in
fact available to all domains.
During execution, when access to a critical system resource (such as file I/O and network I/O) is requested, the resource-handling code directly or indirectly invokes a special AccessController class method that evaluates the request and decides if the request should be granted or denied.
Such an evaluation follows and generalizes the "rule of thumb" given above. The actual way in which the evaluation is conducted can vary between implementations. The basic principle is to examine the call history and the permissions granted to the relevant protection domains, and to return silently if the request is granted or throw a security exception if the request is denied.
Finally, each domain (system or application) may also implement additional protection of its internal resources within its own domain boundary. For example, a banking application may need to support and protect internal concepts such as checking accounts, deposits and withdrawals. Because the semantics of such protection is unlikely to be predictable or enforceable by the Java 2 SDK, the protection system at this level is best left to the system or application developers. Nevertheless, whenever appropriate, we provide helpful primitives to simplify developers' tasks. One such primitive is the SignedObject class, whose detail we will describe later.