Accessed from: https://catalog.data.gov/dataset/military-installations-ranges-and-training-areas.
Metadata updated date: January 18, 2017.
Join Fort Benning Georgia and Alabama shapefiles. Note: Fort Lewis (JBLM) geometry includes remote sites.
bases <- here::here("data/installations_ranges", "MIRTA_Boundaries.shp") %>%
sf::st_read(stringsAsFactors = FALSE) %>%
janitor::clean_names()
## Reading layer `MIRTA_Boundaries' from data source `C:\Users\slewa\Projects\heat_stress\data\installations_ranges\MIRTA_Boundaries.shp' using driver `ESRI Shapefile'
## Simple feature collection with 750 features and 6 fields
## geometry type: MULTIPOLYGON
## dimension: XY
## bbox: xmin: -168.8576 ymin: 13.30706 xmax: 174.1565 ymax: 64.87792
## epsg (SRID): 4326
## proj4string: +proj=longlat +datum=WGS84 +no_defs
## Edit Fort Benning geometries
benning_join <-
bases %>%
filter(stringr::str_detect(site_name, "Fort Benning")) %>%
dplyr::select(geometry) %>% st_union()
bases <- bases %>%
filter(site_name != "Fort Benning") %>%
mutate(geometry = replace(geometry, site_name == "Fort Benning GA", benning_join ))
rm(benning_join)
## Edit Fort Lewis (JBLM) geometries to remove remote polygons
## Include sites near Yakima, WA and Camp Rilea, OR
# "Before" plot
bases %>%
filter(site_name == "Fort Lewis") %>%
ggplot() +
geom_sf() +
ggtitle("Fort Lewis (JBLM) - Before")
# Set bounding box
jblm_filt_bbox <-
sf::st_bbox(c(xmin = -123,
ymin = 46.8,
xmax = -122,
ymax = 47.2),
crs = st_crs(4326)) %>%
sf::st_as_sfc(.)
# separate MULTIPOLYGON to POLYGON(s)
jblm_polygon <-
bases %>%
filter(site_name == "Fort Lewis") %>%
sf::st_cast(., "POLYGON")
## Warning in st_cast.sf(., "POLYGON"): repeating attributes for all sub-geometries
## for which they may not be constant
# identify polygons within bbox
jblm_new_geom <-
sf::st_within(jblm_polygon$geometry, jblm_filt_bbox)
## although coordinates are longitude/latitude, st_within assumes that they are planar
# add column for within box status
jblm_polygon <-
jblm_polygon %>%
mutate(within_bbox = lapply(jblm_new_geom, `[`, 1)) %>%
filter(within_bbox == 1) %>%
dplyr::select(-within_bbox) %>%
sf::st_union()
# replace Fort Lewis geometry in main dataframe
bases <- bases %>%
mutate(geometry = replace(geometry, site_name == "Fort Lewis", jblm_polygon))
rm(jblm_filt_bbox, jblm_new_geom, jblm_polygon)
# "After" plot
bases %>%
filter(site_name == "Fort Lewis") %>%
ggplot() +
geom_sf() +
ggtitle("Fort Lewis (JBLM) - After")
Select bases for analyses. Citeria: in list of top CONUS bases for heat illnesses from MSMR report (April 2018). Additional Army installations based on HSI counts and rates (from DMED) and for diversity of climate regions.
Add centroid column.
# Look-up base name in MITRA list
# search_names <- bases$site_name %>% as.character()
# stringr::str_subset(search_names, "Lewis")
select_bases <-
bases %>%
dplyr::filter(.$site_name %in% c("Fort Benning GA", "Fort Bragg","Fort Campbell",
"Fort Jackson", "Fort Polk", "Fort Hood",
"Fort Stewart", "Fort Leonard Wood", "Fort Riley",
"NTC and Fort Irwin", "Fort Bliss", "Fort Lewis",
"Fort Sill", "Fort Carson", "Fort Gordon",
"Fort Drum", "MCB Camp Lejeune", "MCRD Beaufort Parris Island",
"MCB Camp Pendleton", "MCRD San Diego", "MCB Quantico",
"Twentynine Palms Main Base", "Lackland AFB", "Eglin AFB", "Fort Sam Houston")) %>%
mutate(centroid = st_centroid(geometry)) %>%
dplyr::select(-c("joint_base", "country", "oper_stat"))
# saveRDS(select_bases, "data/select_bases.rds")
select_bases
## Simple feature collection with 25 features and 3 fields
## Active geometry column: geometry
## geometry type: GEOMETRY
## dimension: XY
## bbox: xmin: -122.8021 ymin: 29.36673 xmax: -75.38405 ymax: 47.15951
## epsg (SRID): 4326
## proj4string: +proj=longlat +datum=WGS84 +no_defs
## First 10 features:
## component site_name state_terr
## 1 Army Active Fort Benning GA Georgia
## 2 Army Active Fort Campbell Kentucky
## 3 MC Active MCB Quantico Virginia
## 4 MC Active MCRD San Diego California
## 5 Army Active Fort Riley Kansas
## 6 Army Active NTC and Fort Irwin California
## 7 Army Active Fort Gordon Georgia
## 8 MC Active Twentynine Palms Main Base California
## 9 Army Active Fort Sill Oklahoma
## 10 Army Active Fort Carson Colorado
## geometry centroid
## 1 POLYGON ((-84.8882 32.25929... POINT (-84.81164 32.3917)
## 2 MULTIPOLYGON (((-87.65135 3... POINT (-87.62461 36.6222)
## 3 MULTIPOLYGON (((-77.4884 38... POINT (-77.4572 38.55207)
## 4 MULTIPOLYGON (((-117.2036 3... POINT (-117.1977 32.74017)
## 5 MULTIPOLYGON (((-96.93518 3... POINT (-96.82482 39.20675)
## 6 MULTIPOLYGON (((-116.389 35... POINT (-116.6333 35.37432)
## 7 MULTIPOLYGON (((-82.11816 3... POINT (-82.23727 33.35667)
## 8 MULTIPOLYGON (((-116.3095 3... POINT (-116.1387 34.45805)
## 9 MULTIPOLYGON (((-98.64978 3... POINT (-98.52759 34.69519)
## 10 MULTIPOLYGON (((-104.7321 3... POINT (-104.853 38.47304)
## Plot selected installations
purrr::map(select_bases$site_name,
function(x) {
ggplot() +
geom_sf(data = filter(select_bases, site_name == x)) +
geom_sf(data = st_centroid(filter(select_bases, site_name == x))) +
ggtitle(x) +
theme_bw() +
theme(axis.text.x = element_text(size = rel(1)),
axis.text.y = element_text(size = rel(1)))
})
#cowplot::plot_grid(plotlist = bases_plot)
NLDAS grid shapefile from: https://ldas.gsfc.nasa.gov/sites/default/files/ldas/nldas/NLDAS_Grid_Reference.zip
nldas_grid <-
here::here("data/nldas_grids", "NLDAS_Grid_Reference.shp") %>%
sf::st_read(stringsAsFactors = FALSE) %>%
janitor::clean_names()
## Reading layer `NLDAS_Grid_Reference' from data source `C:\Users\slewa\Projects\heat_stress\data\nldas_grids\NLDAS_Grid_Reference.shp' using driver `ESRI Shapefile'
## Simple feature collection with 103936 features and 5 fields
## geometry type: POLYGON
## dimension: XY
## bbox: xmin: -125 ymin: 25 xmax: -67 ymax: 53
## epsg (SRID): 4326
## proj4string: +proj=longlat +datum=WGS84 +no_defs
nldas_grid
## Simple feature collection with 103936 features and 5 fields
## geometry type: POLYGON
## dimension: XY
## bbox: xmin: -125 ymin: 25 xmax: -67 ymax: 53
## epsg (SRID): 4326
## proj4string: +proj=longlat +datum=WGS84 +no_defs
## First 10 features:
## centerx centery nldas_x nldas_y nldas_id geometry
## 1 -124.9375 25.0625 1 1 x1y1 POLYGON ((-124.875 25, -125...
## 2 -124.8125 25.0625 2 1 x2y1 POLYGON ((-124.75 25, -124....
## 3 -124.6875 25.0625 3 1 x3y1 POLYGON ((-124.625 25, -124...
## 4 -124.5625 25.0625 4 1 x4y1 POLYGON ((-124.5 25, -124.6...
## 5 -124.4375 25.0625 5 1 x5y1 POLYGON ((-124.375 25, -124...
## 6 -124.3125 25.0625 6 1 x6y1 POLYGON ((-124.25 25, -124....
## 7 -124.1875 25.0625 7 1 x7y1 POLYGON ((-124.125 25, -124...
## 8 -124.0625 25.0625 8 1 x8y1 POLYGON ((-124 25, -124.125...
## 9 -123.9375 25.0625 9 1 x9y1 POLYGON ((-123.875 25, -124...
## 10 -123.8125 25.0625 10 1 x10y1 POLYGON ((-123.75 25, -123....
# Identify all NLDAS grids intersected by installation shapefiles
bases_nldas = NULL
for (i in 1:nrow(select_bases)) {
i_base = select_bases[i,]
base_nldas = st_intersection(i_base, nldas_grid)
bases_nldas = rbind(bases_nldas, base_nldas)
}
bases_nldas
## Simple feature collection with 300 features and 8 fields
## Active geometry column: centroid
## geometry type: POINT
## dimension: XY
## bbox: xmin: -122.8021 ymin: 29.36673 xmax: -75.38405 ymax: 47.15951
## epsg (SRID): 4326
## proj4string: +proj=longlat +datum=WGS84 +no_defs
## First 10 features:
## component site_name state_terr centerx centery nldas_x nldas_y
## 1 Army Active Fort Benning GA Georgia -84.9375 32.1875 321 58
## 1.1 Army Active Fort Benning GA Georgia -84.8125 32.1875 322 58
## 1.2 Army Active Fort Benning GA Georgia -85.0625 32.3125 320 59
## 1.3 Army Active Fort Benning GA Georgia -84.9375 32.3125 321 59
## 1.4 Army Active Fort Benning GA Georgia -84.8125 32.3125 322 59
## 1.5 Army Active Fort Benning GA Georgia -84.6875 32.3125 323 59
## 1.6 Army Active Fort Benning GA Georgia -84.9375 32.4375 321 60
## 1.7 Army Active Fort Benning GA Georgia -84.8125 32.4375 322 60
## 1.8 Army Active Fort Benning GA Georgia -84.6875 32.4375 323 60
## 1.9 Army Active Fort Benning GA Georgia -84.8125 32.5625 322 61
## nldas_id geometry centroid
## 1 x321y58 MULTIPOLYGON (((-84.90602 3... POINT (-84.81164 32.3917)
## 1.1 x322y58 POLYGON ((-84.81997 32.25, ... POINT (-84.81164 32.3917)
## 1.2 x320y59 POLYGON ((-85 32.29875, -85... POINT (-84.81164 32.3917)
## 1.3 x321y59 POLYGON ((-84.8882 32.25929... POINT (-84.81164 32.3917)
## 1.4 x322y59 POLYGON ((-84.75 32.33047, ... POINT (-84.81164 32.3917)
## 1.5 x323y59 POLYGON ((-84.65872 32.375,... POINT (-84.81164 32.3917)
## 1.6 x321y60 MULTIPOLYGON (((-84.97334 3... POINT (-84.81164 32.3917)
## 1.7 x322y60 POLYGON ((-84.875 32.45522,... POINT (-84.81164 32.3917)
## 1.8 x323y60 POLYGON ((-84.63749 32.5, -... POINT (-84.81164 32.3917)
## 1.9 x322y61 POLYGON ((-84.84992 32.5, -... POINT (-84.81164 32.3917)
rm(i_base, base_nldas)
# Calculate area of installation in each NLDAS grid and weight for spatial weighted average
nldas_weights <- bases_nldas %>%
mutate(area = sf::st_area(.$geometry)) %>%
group_by(site_name) %>%
mutate(sum_area = sum(area),
weight = (area / sum_area)) %>%
dplyr::select(-c(nldas_x, nldas_y, area, centroid, sum_area))
# NLDAS grids that intersect with bases (to map full grid squares)
intersects = NULL
for (i in 1:nrow(select_bases)) {
i_base = select_bases[i,]
base_intersect = nldas_grid %>% filter(lengths(st_intersects(., i_base)) > 0)
intersects = rbind(intersects, base_intersect)
}
rm(i_base, base_intersect)
# Join `site_name` to selected NLDAS grid geometries
intersects <- intersects %>% left_join(dplyr::select(as_tibble(nldas_weights), c(nldas_id, site_name)), by = "nldas_id")
intersects
## Simple feature collection with 300 features and 6 fields
## geometry type: POLYGON
## dimension: XY
## bbox: xmin: -122.875 ymin: 29.25 xmax: -75.375 ymax: 47.25
## epsg (SRID): 4326
## proj4string: +proj=longlat +datum=WGS84 +no_defs
## First 10 features:
## centerx centery nldas_x nldas_y nldas_id site_name
## 1 -84.9375 32.1875 321 58 x321y58 Fort Benning GA
## 2 -84.8125 32.1875 322 58 x322y58 Fort Benning GA
## 3 -85.0625 32.3125 320 59 x320y59 Fort Benning GA
## 4 -84.9375 32.3125 321 59 x321y59 Fort Benning GA
## 5 -84.8125 32.3125 322 59 x322y59 Fort Benning GA
## 6 -84.6875 32.3125 323 59 x323y59 Fort Benning GA
## 7 -84.9375 32.4375 321 60 x321y60 Fort Benning GA
## 8 -84.8125 32.4375 322 60 x322y60 Fort Benning GA
## 9 -84.6875 32.4375 323 60 x323y60 Fort Benning GA
## 10 -84.8125 32.5625 322 61 x322y61 Fort Benning GA
## geometry
## 1 POLYGON ((-84.875 32.125, -...
## 2 POLYGON ((-84.75 32.125, -8...
## 3 POLYGON ((-85 32.25, -85.12...
## 4 POLYGON ((-84.875 32.25, -8...
## 5 POLYGON ((-84.75 32.25, -84...
## 6 POLYGON ((-84.625 32.25, -8...
## 7 POLYGON ((-84.875 32.375, -...
## 8 POLYGON ((-84.75 32.375, -8...
## 9 POLYGON ((-84.625 32.375, -...
## 10 POLYGON ((-84.75 32.5, -84....
select_bases$site_name <- purrr::set_names(select_bases$site_name)
base_grid_plot_function <- function(x) {
ggplot() +
geom_sf(data = filter(select_bases, site_name == x)) +
geom_sf(data = filter(intersects, site_name == x), fill = NA, color = "blue") +
geom_sf(data = st_centroid(filter(select_bases, site_name == x)), shape = 3, size = 3, stroke = 1.5) +
geom_label(data = filter(intersects, site_name == x), aes(x = centerx, y = centery, label = nldas_id), size = 2) +
ggtitle(x) +
theme_bw() +
theme(axis.text.x = element_text(size = rel(1)),
axis.text.y = element_text(size = rel(1)),
axis.title.x = element_blank(),
axis.title.y = element_blank())
}
# base_grid_plot_function(select_bases$site_name[1])
base_grid_plots <-
map(select_bases$site_name, ~base_grid_plot_function(.x))
base_grid_plots
## [[1]]
##
## [[2]]
##
## [[3]]
##
## [[4]]
##
## [[5]]
##
## [[6]]
##
## [[7]]
##
## [[8]]
##
## [[9]]
##
## [[10]]
##
## [[11]]
##
## [[12]]
##
## [[13]]
##
## [[14]]
##
## [[15]]
##
## [[16]]
##
## [[17]]
##
## [[18]]
##
## [[19]]
##
## [[20]]
##
## [[21]]
##
## [[22]]
##
## [[23]]
##
## [[24]]
##
## [[25]]


According to the 2011 census, the city proper has a population of 1,319,108 (about one-third of the country's total population) in an area of 201 square kilometres (78 sq mi). The southernmost capital city in the Americas, Montevideo is situated in the southern coast of the country, on the northeastern bank of the Río de la Plata.
The city was established in 1724 by a Spanish soldier, Bruno Mauricio de Zabala, as a strategic move amidst the Spanish-Portuguese dispute over the platine region. It was also under brief British rule in 1807. Montevideo hosted all the matches during the first FIFA World Cup. Montevideo is the seat of the administrative headquarters of Mercosur and ALADI, Latin America’s leading trade blocs, position that entailed comparisons to the role of Brussels in Europe.
Between 1680 and 1683, Portugal founded the city of Colonia do Sacramento in the region across the bay from Buenos Aires. This city met with no resistance from the Spanish until 1723, when they began to place fortifications on the elevations around Montevideo Bay. On 22 November 1723, Field Marshal Manuel de Freitas da Fonseca of Portugal built the Montevieu fort.
A Spanish expedition was sent from Buenos Aires, organized by the Spanish governor of that city, Bruno Mauricio de Zabala. On 22 January 1724, the Spanish forced the Portuguese to abandon the location and started populating the city, initially with six families moving in from Buenos Aires and soon thereafter by families arriving from the Canary Islands who were called by the locals "guanches", "guanchos" or "canarios". There was also one significant early Italian resident by the name of Jorge Burgues.
 The city has cool winters (June to September), hot summers (December to March) and volatile springs (October and November); there are numerous thunderstorms but no tropical cyclones. Rainfall is regular and evenly spread throughout the year, reaching around 950 millimetres (37 in).
| Month | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Record high °C (°F) | 42 | 40 | 38 | 36 | 32 | 27 | 29 | 30 | 32 | 35 | 38 | 40 |
| Average high °C (°F) | 28 | 27 | 25 | 22 | 18 | 15 | 15 | 16 | 18 | 20 | 23 | 21 |
| Daily mean °C (°F) | 23 | 22 | 20 | 14 | 11 | 10 | 12 | 13 | 13 | 15 | 19 | 22 |
As of 2010, the city of Montevideo has been divided into 8 political municipalities (Municipios), referred to with the letters from A to G, including CH, each presided over by a mayor elected by the citizens registered in the constituency. This division, according to the Municipality of Montevideo, "aims to advance political and administrative decentralization in the department of Montevideo, with the aim of deepening the democratic participation of citizens in governance."
The Intendant of Montevideo is the highest-ranking official in the government of Montevideo. It is elected every five years after the presidential elections.
As the capital of Uruguay, Montevideo is the economic and political centre of the country. Most of the largest and wealthiest businesses in Uruguay have their headquarters in the city. Since the 1990s the city has undergone rapid economic development and modernization, including two of Uruguay's most important buildings—the World Trade Center Montevideo (1998), and Telecommunications Tower (2000), the headquarters of Uruguay's government-owned telecommunications company ANTEL, increasing the city's integration into the global marketplace.


RTCP Header as defined in RFC3550.
Inheritance
System.Object
RTCPHeader
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: SIPSorcery.dll
Constructors
|
Improve this Doc
View Source
Declaration
public RTCPHeader(RTCPReportTypesEnum packetType, int reportCount)
Parameters
|
Improve this Doc
View Source
Extract and load the RTCP header from an RTCP packet.
Declaration
public RTCPHeader(byte[] packet)
Parameters
| Type |
Name |
Description |
| System.Byte[] |
packet |
|
Fields
|
Improve this Doc
View Source
Declaration
public const int HEADER_BYTES_LENGTH = 4
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
Declaration
public const int MAX_RECEPTIONREPORT_COUNT = 32
Field Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
Declaration
public const int RTCP_VERSION = 2
Field Value
| Type |
Description |
| System.Int32 |
|
Properties
|
Improve this Doc
View Source
Declaration
public ushort Length { get; }
Property Value
| Type |
Description |
| System.UInt16 |
|
|
Improve this Doc
View Source
Declaration
public ushort PacketType { get; }
Property Value
| Type |
Description |
| System.UInt16 |
|
|
Improve this Doc
View Source
Declaration
public int PaddingFlag { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
Declaration
public int ReceptionReportCount { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
Declaration
public int Version { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
Methods
|
Improve this Doc
View Source
Declaration
Returns
| Type |
Description |
| System.Byte[] |
|
|
Improve this Doc
View Source
Declaration
public byte[] GetHeader(int receptionReportCount, ushort length)
Parameters
| Type |
Name |
Description |
| System.Int32 |
receptionReportCount |
|
| System.UInt16 |
length |
|
Returns
| Type |
Description |
| System.Byte[] |
|
|
Improve this Doc
View Source
The length of this RTCP packet in 32-bit words minus one,
including the header and any padding.
Declaration
public void SetLength(ushort length)
Parameters
| Type |
Name |
Description |
| System.UInt16 |
length |
|


This is the first version of the Dialogue Manager Script (DMS) documentation, which will demonstrate the current state and capabilities of DMS through a tutorial, outline the syntax and semantics, and discuss how to write effective DMS. DMS is a high-level language that compiles down to [[DMPL]] compliant JSON.
The code snippets presented in this page can be evaluated by hitting the "Run" button, which compiles DM Script into [[DMPL]] JSON, and then processes that JSON on a JavaScript runtime. The compiler can be found on GitHub [[dms-compiler]].
This guessing game chat-bot will help us better understand DMS.
Let's build a simple prompt that asks the user for some input.
We start by printing out messages using act
, and
then awaiting the user's input.
act "Guess the number!" act "Please input your guess." input -> guess { _ { act "You guessed " + guess } }
The input ->
statement awaits for user input, and feeds it to a variable of our choosing.
In this case, the variable guess
is populated with the user's input.
once { act "Guess the number!" secret_number = pick(range(1, 101)) } act "Please input your guess." input -> guess { to_num(guess) > secret_number { act "Too big!" } to_num(guess) < secret_number { act "Too small!" } _ { act "You win!" pop true } }
pop true
, which
pops the current script from the runtime stack.
The DMS syntax is loosely based off Rust.
Curly-brackets { }
establish a block of code,
statements do not need a trailing semi-colon ;
,
and labels before the curly-brackets annotate the behavior of the block.
Similar to ECMAScript, DMS is not a strongly typed language.
Scripts written in DM Script are also called components. The runtime shall evaluate the component in an infinite loop, similar to game-loops inherent in most game engines. Components may call other components through run or use statements.
Programmers may leave notes, or comments, in their code. These comments are ignored by the compiler, but are useful for other programmers reading the code.
// Write your comments here.
In programming, a variable is nothing more than a placeholder for some value.
The strings “Chai”
, and “Moo”
are simply values that a
placeholder dog_name
could take on,
as can be seen in the following example.
// Initial value for a dog name. dog_name = "Chai" // Later on dog_name can be changed to a different value if needed. dog_name = "Moo"
Note that in DMS, there is always an implicit infinite loop wrapping our code.
During execution it will keep creating and assigning a variable
named dog_name
the values "Chai”
and "Moo”
.
In order to remove these redundant variable creation and assignments
we can wrap code in a block beginning with the keyword once
.
The once keyword tells the compiler that the variable creation and
assignments should only be executed one time over the lifetime of the component.
once { dog_name = "Chai" } dog_name = "Moo"
Deciding whether or not to run some code depending on if a condition is true is a basic building block in most programming languages. The most common construct thats allows programmers to control the flow of execution of DMS code are if statements. Recall that in DMS there is always an implicit infinite loop wrapping our code, meaning that loops are inherently built in, and any code outside of a once block will be repeatedly executed over the lifetime of our program.
An if
statement allows us to branch our code depending on conditions.
These statements start with the keyword if
, and
follow up with a condition that evaluates to a Boolean value.
once { number = 1 } if number >= 2 { act "Number is greater than or equal to 2." } else { act "Number is less than 2." } number = number + 1
We can link multiple conditions by combining if
and else
in an else if
block. For example:
once { number = 7 } if number % 3 == 0 { act "Number is divisible by 3." } else if number % 2 == 0 { act "Number is divisible by 2." } else { act "Number is not divisible by 2 or 3." }
Forks are generalized if statements. They're the heart and soul of DM Script. As a refresher, let's consider the trivial example below of branching logic.
if true { act "Let's talk about animals." } else { act "Let's talk about colors." }
A fork
statement allows a more general way of representing branching behavior.
First, let's recreate the example above using fork
.
Think of it as a fork in the road, where we can only go down one candidate path.
Each candidate has an entry-condition.
In the example below, notice that the underscore _
is a shortcut for the Boolean value true
.
fork { _ { act "Let's talk about animals." } _ { act "Let's talk about colors." } }
By default, a fork
picks the first path whose entry-condition is met,
from top to bottom.
This method for resolving a fork is also called the "greedy" strategy,
because it picks the first possible candidate instead of considering all candidates.
Forks allow powerful customization of the branching behavior.
In the example below, the fork
picks a child-block at random.
We can optionaly change the fork-strategy by providing a dictionary
in a decorator #{}
directly before the statement.
In the example below, a strategy of {depth: 0}
is associated with the fork
.
#{depth: 0} fork { _ { act "Let's talk about animals." } _ { act "Let's talk about colors." } }
The content of the dictionary specifying the fork-strategy depends
on what the underlying runtime supports.
In this case, {depth: 0}
means use bounded depth-first search (BDFS),
with a depth of 0
to resolve the fork.
A depth of 0
in BDFS is effectively picking a candidate at random.
Different run-times may support different search algorithms,
such as Monte Carlo Tree Search.
The heuristic function for the search algorithm is specified by declaring a model.
The model of a fork-strategy is a list of lists, representing preferences.
For example, the pair [{x: 0}, {x:10}]
, declares that the value of x
is preferred to be 0
as opposed to 10
.
Internally, the runtime infers a utility-function, which is a real-valued function over the
variables in DM Script, that provides a total-ordering of preferences.
once { x = 5 } #{depth: 1, model: [[{x: 0}, {x: 10}]]} fork { _ { x = x + 1 } _ { x = x - 1 } }
Changing the preference model changes the program behavior.
For example, by swapping the pair [{x: 10}, {x: 0}]
,
the program now counts up instead of counting down.
once { x = 5 } #{depth: 1, model: [[{x: 10}, {x: 0}]]} fork { _ { x = x + 1 } _ { x = x - 1 } }
If we want to say that the value of x
should be 5
,
we can write the model as a list of preference-pairs, as follows.
once { x = 3 } #{depth: 1, model: [[{x: 5}, {x: 0}], [{x: 5}, {x: 10}]]} fork { _ { x = x + 1 } _ { x = x - 1 } }
Consider the following scenario, where a autonomous agent has 3 possible actions,
(1) eat food, (2) do nothing, or (3) work for food.
In DM Script, we can use fork
to define
the pre-conditions and outcomes of each action.
We specify that {health: 10}
is desirable over {health: -10}
,
and use BDFS to resolve the fork, with a depth of 1
.
once { health = 2 food = 1 } #{depth: 1, model: [[{health: 10}, {health: -10}]]} fork { food > 0 { act "eat" food = food - 1 health = health + 3 } _ { act "do nothing" health = health - 1 } _ { act "work" food = food + 1 health = health - 2 } }
Unfortunately, the program chooses the suboptimal sequence of actions:
it chooses to do nothing after eating up all the available food.
Let's increase its intelligence by changing the fork-strategy to {depth: 3}
.
Notice that now, the program will alternate between eating food and working,
which is the optimal strategy.
once { health = 2 food = 1 } #{depth: 3, model: [[{health: 10}, {health: -10}]]} fork { food > 0 { act "eat" food = food - 1 health = health + 3 } _ { act "do nothing" health = health - 1 } _ { act "work" food = food + 1 health = health - 2 } }
We'll cover more interesting use-cases of fork
in the effective DMS section.
The example in the variables section only allowed the variable dog_name
to take on string values.
However, DMS is a dynamically typed language meaning that variables can
take on any basic data type such as string
, float
, and
Boolean.
Consider the following example where we have a variable named
current_thought
which denotes what a programmer might be
thinking about throughout the day.
once { // Early in the morning their first thought could potentially be current_thought = "coffee" // Next they could be thinking, do I want office coffee? current_thought = false // Note that we don't use double quotes when assigning a boolean value to a variable. // And so they decide to buy coffee elsewhere, which has an associated cost. current_thought = 5.20 }
The primitive types defined in the previous section are all atomic literals. DMS also allows programmers to build more complex structures such as lists, or dictionaries.
A list
is an ordered arrangement of other structures.
All elements are enclosed within square-brackets [ ]
,
and separated by commas as follows.
once { // list of integers student_grades = [87, 90, 88, 92, 93] // list of strings student_names = ["Nawar", "Tom", "Chris"] // list of arbitrary types a_bunch_of_stuff = [false, 1, "two", [3, 4, 5]] }
A dictionary
is a structure that maps data in key-value pairs.
The value of a corresponding key can be any structure.
once { student_grades = { Nishant: 0, Carol: 93, Daniel: 90 } }
Take note of the syntax that was used to create the dictionary
in the above code snippet.
The keys of the dictionary
are symbols which are a finite sequence
of characters without the double quotation-marks,
and the values in this example are simply integer values.
Note that when accessing the values of a dictionary
,
the keys must be enclosed within double quotation marks.
once { student_grades = { Nishant: 0, Carol: 93, Daniel: 90 } act student_grades["Nishant"] }
Custom function definitions in DMS start with the keyword def
and have a set of
parentheses after the function name.
The curly-brackets { }
tell the compiler where the function body begins and ends.
Lastly, a pop
statement returns the value to be used by the caller.
Consider the following function which simply returns the string, "Greetings!"
.
def greet() { pop "Greetings!" }
Our declaration of the greet
function begins with the keyword def
,
is followed by the function name greet
, and ends with a set of empty parentheses ()
.
The function body contains all the logic that is expected to be executed when calling the function.
In the above example, we simply return the string "Greetings!"
using the keyword pop.
In order to call our function and print the corresponding greeting, we use the keyword act
.
once { def greet() { pop "Greetings!" } act greet() }
Functions in DMS can also have parameters, which are special variables that are part of the function declaration. The following re-declaration of the greet function allows programmers to pass in a variable of their choice, such as the name of a user in the following example.
once { programmer = "Naitian" def greet(user) { pop "Greetings " + user } } act greet(programmer)
The variables introduced in a function are local variables that are
only accessible within the current scope, and they shadow the variables
defined in the outer scope.
In the example below, we define a variable called greetings
within a function, and later try to access that variable out of scope.
Undefined variables by default evaluate to null
.
once { programmer = "Naitian" def greet(user) { greetings = pick(["Greetings", "Howdy", "Sup"]) pop greetings + " " + user } act greet(programmer) act programmer act greetings }
You can also implement closure using functions. For example, in the following code-snippet we show how to define a function that raises a number to an exponent.
once { def powerOf(power) { def f(num) { pop pow(num, power) } pop f } square = powerOf(2) cube = powerOf(3) act square(3) act cube(3) }
In DMS, functions are pure, so act or input statements are not recommended in the body of user defined functions.
==
or !=
.
Compare numbers
with >
, >=
, <
, and <=
.
once { x = 1 y = 2 act x == y act x != y act x < y }
Boolean
functions such as &&
, ||
, and !
are supported.
once { x = true act x || false act (x && !x) == false }
numbers
are available, such as
+
, -
, *
, /
, %
, and floor
.
once { x = (1 + 2 * 3) / 4 y = (x + 0.25) % 2 z = floor(x) }
to_num
and to_str
operators allow changing types between numbers
and strings
.
once { number = 13.5 act "The number is " + to_str(number) guess = "10" act "You're off by..." act number - to_num(guess) }
The ++
operator concatenates two lists.
Note, on the other hand, the +
operator combines strings
.
once { act [1, 2, 3] ++ [4, 5, 6] }
The len
function returns the length of the given argument.
Possible argument types include: string
, list, or dictionary.
once { school_data = { student_names: ["Jeremy", "Earle", "Chad"], school_name: "Institute of Good Learning" } act len(school_data) act len(school_data["student_names"]) act len(school_data["student_names"][0]) }
The pick
function allows programmers to pseudo-randomly select an item from a list.
once { athlete_rankings = [ { lonzo: 2 }, { zion: 1 } ] } act pick(athlete_rankings)
The get
function allows users to select a specific element of a list.
In the above example if we wanted to retrieve the last element we could do so as follows.
act get(len(athlete_rankings) - 1, athlete_rankings)
Or, use the [ ]
notation, which is just a syntactic-sugar of get
, as shown below.
act athlete_rankings[len(athlete_rankings) - 1]
The range
function generates a list from the starting value (inclusive) to the ending value (exclusive).
once { act range(1, 11) act range(1, 5) ++ range(5, 11) }
An optional third argument specifies the step-size.
once { act range(1, 11, 2) }
The map
function iterates through a list passed in, and produces a new list with modified elements.
once { act map(to_str, [1, 2, 3]) }
Multiple lists may be passed in, as long as the operator passed in supports that number of arguments.
once { act map("+", [1, 2, 3], [4, 5, 6]) }
This opens up a lot of useful list manipulation techniques, such as implementing zip
below.
once { def zip(xs, ys) { def pair(x, y) { pop [x, y] } pop map(pair, xs, ys) } act zip([1, 2, 3], ["a", "b", "c"]) }
The foldl
function iterates through a list from the left to yield a value by
applying a given operator to each element of the list with an accumulator.
once { def sum(xs) { pop foldl("+", 0, xs) } act sum([1, 2, 3]) }
The sort
, shuffle
, and reverse
functions operate on lists.
once { xs = [4, 3, 2, 1] ys = shuffle(xs) act sort(ys) == xs act reverse(sort(ys)) == xs }
The in
function is an in-fix operator that checks if an element exists within a structure.
once { month = { days: range(1, 31), month: "June" } act "days" in month act 31 in month["days"] }
the edit
function performs a mutation on a dictionary variable based on the specified
key value pair. The general syntax is as follows: edit(dictionary, value, key)
. Note that
if the specified key does not exist, an entry will be create within the specified dictionary variable
with the specified value.
once { info = {name: "unknown", inventory: {belt: 1, jacket: 2}} act edit(info, "Bob", "name") }
The patch
function mutates a
dictionary variable based on instructions encoded by another dictionary.
The general syntax is as follows: patch(dictionary, key_values)
.
Note that like edit if patch
encounters a key that does not exist within the specified
dictionary variable, patch
with create an entry with the missing key and
corresponding value.
once { info = {name: "unknown", inventory: {belt: 1, jacket: 2}} act patch(info, {name: "Bob", inventory: {jacket: 3}}) }
The from_list
function converts a list of pairs (2-element lists) into a
dictionary.
once { table = [ ["glasses", 1], ["jacket", 2], ["shirt", 0] ] act from_list(table) }
The exists
function allows programmers to check whether the given variable has been defined or not.
if exists("count") { count = count + 1 } else { act "Initializing count to 0" count = 0 } act count
Note that because we haven't defined the variable count
anywhere,
our program defaults to the else
branch of the conditional statement.
The pow
function raises a base
number to a specified exponent
.
once { base = 2 exponent = 3 act pow(base, exponent) }
Recall that DMS compiles down to [[DMPL]] compliant [[JSON]], which is a tree-like structure. The hop statement allows programmers to revisit the ancestors of the current code block. Consider the following example, keeping in mind the notion of code blocks having ancestors.
act "What's the largest planet?" // <-- hop 3, comes back to here input -> result { // <-- hop 2, go to grandparent result == "jupiter" { act "Correct!"  hop 3 } } pop true
The above example can be hard to understand at first sight so lets break it down. At a high-level the
component itself is the root of our tree structure. From there, code blocks and statements having equal scope
can be thought of as children of the root. In the above example, the act statement and the code block
following the input
statement have equal scope and hence are children of the root. Stepping
into the code block following the input
statement, the code blocks following result == "jupiter"
and _
have equal scope; as such they are both children
of the input
statement. Finally looking at the code block following _
, both act
statements and the hop statement have equal scope, and hence are all children of the _
statement. With this in mind the hop statement is essentially saying, return to the third ancestor of
this code block.
Up to now all program behavior has been predefined. Variables have been assigned persistent values, and all output can be predetermined ahead of time. However part of what makes any program engaging and meaningful, is when a user or programmer is able to directly interact with the application. In this section we showcase how DMS captures and processes user input. In DMS, user input is handled by a special structure which assigns intents to a temporary user-defined variable, as follows.
once { act "Hi there! I'm Parrot-Bot. I repeat anything you say!" } input -> result { result == "Hello" { act "Ahoj to you!" } _ { act "You said: " + result } }
In order to begin capturing input, we use the syntax input ->
.
The expression can be thought of as follows,
“Anything that is typed in or captured,
redirect and store in the variable immediately following the arrow ->
“.
In the example above, all captured input is stored in the variable result.
Once DMS is done capturing input, the body of the input block begins its execution.
Simply put, the conditions contained within the body of the input block can be thought
of as if-else expression.
This means that the first expression, using the input, that evaluates to true will be executed.
In the above example, whenever user input happens to be "Hello" the program will output "Ahoj to you!",
(Note: Ahoj is Czech for Hello) and in all other cases will default to the expression beginning with the underscore _
.
Note that within an input block whenever an underscore _
is used as the condition of an expression,
it will always evaluate to true; essentially acting as the default else of a branching statement.
Most programming languages allow programmers to use external packages/libraries and launch child processes from anywhere within the main process. In this chapter we demonstrate how programmers are able to import and run components which can be thought of as scripts from within the main DMS program. Being able to import and launch components allows for programmers to develop modular and sophisticated DMS programs.
The use
statement allows programmers to import variables and user-defined
functions from an external component or script.
Consider the following example where we have a component containing a number of math functions,
and a main component wanting to reuse them.
Create the following two files: main.dms
and math.dms
.
Inside math.dms
place the following code segment.
once { pi = 3.14 def square(number) { pop number * number } def increment(number) { pop number + 1 } }
Now suppose that we wanted to use both the square
and increment
functions.
Inside the main.dms
file we write the following,
once { use "math" import _ } act square(2) act increment(3) act pi
In order to introduce the component, we begin with the keyword use
,
followed by the component name, in this case math
.
Note that we leave off the file extension.
Next in order to bring all predefined functions into scope within
main.dms
we use the keyword import _
.
This can essentially be thought of as bringing everything that was
defined within main.dms
into scope and made usable.
The manner in which components are introduced might be a little tough to understand.
At a high level the use of components can be thought of as follows.
Suppose we're making curry. We have a recipe, which calls for spices.
Naturally we ask ourself, which ones? To which our recipe might say, all of them.
And so we proceed to bring all the individual ingredients defined in spices
and use them within our curry recipe.
In the last section we introduced the idea of a component or simply a script.
Components not only make a programmers life easier by allowing DMS code to be modular,
but also save developers from writing their entire code base within a single component.
DMS allows programmers to launch sub-components from within a main-component.
At a high level this means that if our current task is to make dinner,
completing the sub-task of washing dishes gives us the clean dishes we need to finish our main task.
Consider the following DMS code which does exactly that. Create the following two files: main.dms
and wash_dishes.dms
. Inside wash_dishes.dms
place the following code segment.
once { num_dishes = 1 } if num_dishes >= 2 { act "done" pop true } num_dishes = num_dishes + 1
Similarly within main.dms
place the following.
once { clean_dishes = false } act "Lets make some food!" if !clean_dishes { run "wash_dishes" () -> result { result { act "Ok lets get to cooking!" } _ { act "On second thought, lets order in." } } }
There’s a lot going on in the above example,
so lets break it down. In order to launch a sub-component we use the keyword run
.
The line containing run "wash_dishes" () -> result
tells DMS that we want to pause our current component,
run the sub-component, and wait for it to finish.
Upon finishing, the wash_dishes
sub-component returns a Boolean value denoting its success,
which is stored in result.
(Note that the returned value of the sub-component does not have to be a Boolean value,
and can actually be any of the atomic or structure data types defined in the previous chapter.)
The expressions that follow are again an example of conditional if-else
expressions.
The first expression that evaluates to true will be executed, and the others will be ignored.
In this case because we happen to be returning a Boolean value, whenever the result is true
,
the first expression will be executed, and our program defaults to the case
beginning with an underscore _
as this evaluates to true
.
In the run example we showed how to launch a sub-component by calling, run "wash_dishes" () -> result
from within the main component. Note the empty parentheses, ()
, following the name of our sub-component. In DMS
we can pass arguments to our sub-component by placing all intended parameters (i.e. arguments) within ()
.
The sub-component can then access these arguments by unpacking or indexing the builtin _args variable.
In the following example we show how to pass arguments to our sub-component and access their values using both
array indexing and unpacking notation.
Create two files: jury.dms
and decision.dms
. Within jury.dms
place the
following code snippet.
once { first = "Nishant" last = "Shukla" run "decision" (first, last) -> verdict { verdict { act "Jail forever." } _ { act "Freedom!" } } }
Similarly, within decision.dms
place the following code snippet. Here we show how to unpack the
_args builtin variable using both aforementioned notations.
// unpack the array first, last = _args // or, access the array by index first = _args[0] last = _args[1] pop first == "Nishant" && last == "Shukla"
Note: The _args builtin variable is null in any component that is not called by another
component, such as a main
component, and is otherwise an empty list.
Beyond this point we begin to define the key ideas that make DMS special. We introduce the notion of what makes DMS a task-oriented programming language and illustrate how tasks can be broken down into actions that have a corresponding utility. With this notion of tasks, actions, and utility we show how DMS allows programmers to rid themselves of the overhead of having to think about the sequential-steps required to achieve a task and simply let DMS pick the best sequence of actions for us. Lets dive in!
The fork
statement is the most important aspect of DMS.
It lists possible branches of program flow in a declarative manner.
In this section, we'll design a chat-bot that asks "What's the capital of France?". If we type an incorrect answer, such as "Rome", then the script will diagnose the mistake, and help us get to the answer.
First, set up a couple variables and constants.
A score
variable will be used to track dialogue quality.
The entities, such as ROME
, and relations, such as CITY_IN
,
will be declared as variables, just to keep our code clean.
We'll also track a user_response
variable that indicates whether
the dialogue has already processed the user's input.
once { score = 0 EUROPE, FRANCE, ITALY, ROME, PARIS, LYON = ["Europe", "France", "Italy", "Rome", "Paris", "Lyon"] COUNTRY_IN, NEXT_TO, CITY_IN, CAPITAL_OF = ["a country in", "next to", "a city in", "the capital of"] user_response = null }
else
branch until
the user_response
variable is reset to null
.
if user_response == null { // get the user's input } else { // interpret the user's input }
The complete script is shown below.
once { score = 0 EUROPE, FRANCE, ITALY, ROME, PARIS, LYON = ["Europe", "France", "Italy", "Rome", "Paris", "Lyon"] COUNTRY_IN, NEXT_TO, CITY_IN, CAPITAL_OF = ["a country in", "next to", "a city in", "the capital of"] user_response = null } if user_response == null { answer = "" relation, entity = [CAPITAL_OF, FRANCE] act "What is " + relation + " " + entity + ": " + "Italy, Rome, Paris, or Lyon?" input -> response { _ { user_response = response } } } else { #{depth: 4, model: [[{score: 10}, {score: 0}]]} fork { [relation, entity] == [COUNTRY_IN, EUROPE] { answer = ITALY } [relation, entity] == [NEXT_TO, FRANCE] { answer = ITALY } [relation, entity] == [COUNTRY_IN, EUROPE] { answer = FRANCE } [relation, entity] == [NEXT_TO, ITALY] { answer = FRANCE } [relation, entity] == [CAPITAL_OF, ITALY] { answer = ROME } [relation, entity] == [CITY_IN, ITALY] { answer = ROME } [relation, entity] == [CITY_IN, FRANCE] { answer = LYON } [relation, entity] == [CAPITAL_OF, FRANCE] { answer = PARIS } [relation, entity] == [CITY_IN, FRANCE] { answer = PARIS } relation == CAPITAL_OF { relation = CITY_IN act "Not every city is the captial" } relation == CITY_IN { relation = CAPITAL_OF } relation == CAPITAL_OF { relation = NEXT_TO } relation == NEXT_TO { relation = CAPITAL_OF } entity == FRANCE { entity = ITALY act "I think you're thinking of a different country" } entity == ITALY { entity = FRANCE act "I think you're thinking of a different country" } answer == user_response { user_response = null act answer + " is " + relation + " " + entity score = score + 1 } } }


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.threed.jpct.GLSLShader
A simple helper class for GLSL-based shaders. The purpose of this is to ease
shader handling somewhat, but it isn't a full blown shader framework and it
isn't meant to be one. You can always write your own shaders by hand using
the IRenderHook interface (which is what this class implements too).
If the shader fails to compile or any other problem arises, the shader won't
be used and an error message will be given.
Note: If you want to assign additional vertex attributes to your shader, you
can't do this here but in the Mesh class.
Keep in mind that assigning a shader disables the fixed function pipeline
completely for this object. Everything the fixed function pipeline does has
to be rebuild in the shader if needed.
Albeit an implementation of IRenderHook and mainly meant to be used in
combination with Object3Ds, you may use this class on its own to ease shader
management for shaders that aren't applied on Object3Ds, for example in an
IPostProcessor of yours. To do this, call beforeRendering() to activate the
shader, afterRendering() to disable it and onDispose() if you don't need it
anymore.
| Constructor Summary | |
GLSLShader(java.lang.String vertexShaderSrc,
java.lang.String fragmentShaderSrc)
Creates a new instance. |
| Method Summary | |
void |
afterRendering(int polyId)
Disables the shader. |
void |
beforeRendering(int polyID)
Activates the shader. |
void |
clear()
Disables the shader. |
void |
compile(java.util.List attribs)
For compatibility with jPCT-AE. |
void |
excludeShadowMap(boolean exclude)
If set to true (default), no shaders will be applied when rendering into a depth map. |
int |
getProgram()
Returns the id of the shader program. |
static int |
guessShaderModel()
Guesses the shader model. |
void |
onDispose()
Releases resourced used by the shader. |
boolean |
repeatRendering()
Always returns false. |
void |
setCurrentObject3D(Object3D obj)
Does nothing in the default implementation. |
void |
setCurrentShader(GLSLShader shader)
Does nothing in the default implemention. |
void |
setDelayedDisabling(boolean delayed)
If set to true, the engine can optimize shader usage better but it's not guaranteed, that the shader will be disabled after usage. |
void |
setFloatArrayUniform(java.lang.String name,
float[] val)
Sets a new float[] uniform. |
void |
setMinShaderModel(int min)
Sets the minimum shader model that this shader needs. |
void |
setShadowHelper(ShadowHelper helper)
|
void |
setStaticFloatArrayUniform(java.lang.String name,
float[] val)
Sets a new float[] uniform. |
void |
setStaticUniform(java.lang.String name,
float val)
Sets a new float uniform. |
void |
setStaticUniform(java.lang.String name,
float[] val)
Sets a new float|vecX uniform. |
void |
setStaticUniform(java.lang.String name,
int val)
Sets a new integer uniform. |
void |
setStaticUniform(java.lang.String name,
Matrix m)
Sets a new Matrix uniform. |
void |
setStaticUniform(java.lang.String name,
Matrix[] vals)
Sets a new array of Matrix uniform. |
void |
setStaticUniform(java.lang.String name,
SimpleVector val)
Sets a new SimpleVector uniform. |
void |
setStaticUniform(java.lang.String name,
SimpleVector[] vals)
Sets a new array of SimpleVector uniform. |
void |
setTransparency(float transparency)
Does nothing in the default implementation. |
void |
setUniform(java.lang.String name,
float val)
Sets a new float uniform. |
void |
setUniform(java.lang.String name,
float[] val)
Sets a new float|vecX uniform. |
void |
setUniform(java.lang.String name,
int val)
Sets a new integer uniform. |
void |
setUniform(java.lang.String name,
Matrix m)
Sets a new Matrix uniform. |
void |
setUniform(java.lang.String name,
Matrix[] vals)
Sets a new array of Matrix uniform. |
void |
setUniform(java.lang.String name,
SimpleVector val)
Sets a new SimpleVector uniform. |
void |
setUniform(java.lang.String name,
SimpleVector[] vals)
Sets a new array of SimpleVectors uniform. |
void |
setUniformCache(boolean cacheEnabled)
Does nothing in desktop jPCT. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public GLSLShader(java.lang.String vertexShaderSrc, java.lang.String fragmentShaderSrc)
vertexShaderSrc
- the source of the vertex shaderfragmentShaderSrc
- the source of the fragment shader| Method Detail |
public void setMinShaderModel(int min)
min
- the minimum shader model. Default is -1, which means: All are
fine.public void setCurrentObject3D(Object3D obj)
setCurrentObject3D
in interface IRenderHook
obj
- the current Object3Dpublic void setCurrentShader(GLSLShader shader)
setCurrentShader
in interface IRenderHook
shader
- the shader or null if none is usedpublic void setTransparency(float transparency)
setTransparency
in interface IRenderHook
public void beforeRendering(int polyID)
beforeRendering
in interface IRenderHook
polyID
- the ID of the polygon that is first in the current list that
is about to render.public void setUniformCache(boolean cacheEnabled)
cacheEnabled
- does nothing...public int getProgram()
public void compile(java.util.List attribs)
attribs
- public void setDelayedDisabling(boolean delayed)
delayed
- should it be delayed?public void afterRendering(int polyId)
afterRendering
in interface IRenderHook
polyId
- the ID of the polygon that is first in the current list that
is about to render.public void clear()
clear
in interface IRenderHook
public void onDispose()
onDispose
in interface IRenderHook
public boolean repeatRendering()
repeatRendering
in interface IRenderHook
public void setShadowHelper(ShadowHelper helper)
public void excludeShadowMap(boolean exclude)
exclude
- exclude it or not?setShadowHelper(com.threed.jpct.util.ShadowHelper)
public void setStaticUniform(java.lang.String name, int val)
name
- the name of the uniformval
- the valuepublic void setStaticUniform(java.lang.String name, float val)
name
- the name of the uniformval
- the valuepublic void setStaticUniform(java.lang.String name, float[] val)
name
- the name of the uniformval
- the value. Supports array-lengths from 1 to 4.public void setStaticFloatArrayUniform(java.lang.String name, float[] val)
name
- the name of the uniformval
- the value.public void setStaticUniform(java.lang.String name, SimpleVector val)
name
- the name of the uniformval
- the valuepublic void setStaticUniform(java.lang.String name, SimpleVector[] vals)
name
- the name of the uniformvals
- the valuespublic void setStaticUniform(java.lang.String name, Matrix m)
name
- the name of the uniformm
- the matrix. It won't be transposed.public void setStaticUniform(java.lang.String name, Matrix[] vals)
name
- the name of the uniformvals
- the valuespublic void setUniform(java.lang.String name, int val)
name
- the name of the uniformval
- the valuepublic void setUniform(java.lang.String name, float val)
name
- the name of the uniformval
- the valuepublic void setUniform(java.lang.String name, SimpleVector val)
name
- the name of the uniformval
- the valuepublic void setUniform(java.lang.String name, SimpleVector[] vals)
name
- the name of the uniformvals
- the valuespublic void setUniform(java.lang.String name, Matrix[] vals)
name
- the name of the uniformvals
- the valuespublic void setUniform(java.lang.String name, float[] val)
name
- the name of the uniformval
- the value. Supports array-lengths from 1 to 4.public void setFloatArrayUniform(java.lang.String name, float[] val)
name
- the name of the uniformval
- the value.public void setUniform(java.lang.String name, Matrix m)
name
- the name of the uniformm
- the matrix. It won't be transposed.public static int guessShaderModel()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


--- layout: default title: An opinionated newsletter about startups and entrepreneurship ---
Latest Post: {{ post.title }}
Welcome. The Heretic is a daily newsletter about entrepreneurship, the art of the start and doing the work by Pascal Finette. It's raw, unfiltered and opinionated. All straight to your inbox. You will like it. As do these fine folks!
Be awesome: Subscribe now for your daily fix.
Read More in the Archive →


Aliases for integer constraints
[Direct modeling support]
Functions | |
| void | Gecode::atmost (Home home, const IntVarArgs &x, int n, int m, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::atmost (Home home, const IntVarArgs &x, IntVar y, int m, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::atmost (Home home, const IntVarArgs &x, const IntArgs &y, int m, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::atmost (Home home, const IntVarArgs &x, int n, IntVar z, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::atmost (Home home, const IntVarArgs &x, IntVar y, IntVar z, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::atmost (Home home, const IntVarArgs &x, const IntArgs &y, IntVar z, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::atleast (Home home, const IntVarArgs &x, int n, int m, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::atleast (Home home, const IntVarArgs &x, IntVar y, int m, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::atleast (Home home, const IntVarArgs &x, const IntArgs &y, int m, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::atleast (Home home, const IntVarArgs &x, int n, IntVar z, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::atleast (Home home, const IntVarArgs &x, IntVar y, IntVar z, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::atleast (Home home, const IntVarArgs &x, const IntArgs &y, IntVar z, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::exactly (Home home, const IntVarArgs &x, int n, int m, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::exactly (Home home, const IntVarArgs &x, IntVar y, int m, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::exactly (Home home, const IntVarArgs &x, const IntArgs &y, int m, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::exactly (Home home, const IntVarArgs &x, int n, IntVar z, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::exactly (Home home, const IntVarArgs &x, IntVar y, IntVar z, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::exactly (Home home, const IntVarArgs &x, const IntArgs &y, IntVar z, IntPropLevel ipl=IPL_DEF) |
| Post constraint . | |
| void | Gecode::lex (Home home, const IntVarArgs &x, IntRelType r, const IntVarArgs &y, IntPropLevel ipl=IPL_DEF) |
| Post lexical order between x and y. | |
| void | Gecode::lex (Home home, const BoolVarArgs &x, IntRelType r, const BoolVarArgs &y, IntPropLevel ipl=IPL_DEF) |
| Post lexical order between x and y. | |
| void | Gecode::values (Home home, const IntVarArgs &x, IntSet y, IntPropLevel ipl=IPL_DEF) |
| Post constraint . |
Detailed Description
Contains definitions of common constraints which have different names in Gecode.
Function Documentation
| void Gecode::atmost | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| int | n, | |||
| int | m, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
| void Gecode::atmost | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| IntVar | y, | |||
| int | m, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
| void Gecode::atmost | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| const IntArgs & | y, | |||
| int | m, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
Throws an exception of type Int::ArgumentSizeMismatch, if x and y are of different size.
| void Gecode::atmost | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| int | n, | |||
| IntVar | z, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
| void Gecode::atmost | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| IntVar | y, | |||
| IntVar | z, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
| void Gecode::atmost | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| const IntArgs & | y, | |||
| IntVar | z, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
Throws an exception of type Int::ArgumentSizeMismatch, if x and y are of different size.
| void Gecode::atleast | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| int | n, | |||
| int | m, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
| void Gecode::atleast | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| IntVar | y, | |||
| int | m, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
| void Gecode::atleast | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| const IntArgs & | y, | |||
| int | m, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
Throws an exception of type Int::ArgumentSizeMismatch, if x and y are of different size.
| void Gecode::atleast | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| int | n, | |||
| IntVar | z, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
| void Gecode::atleast | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| IntVar | y, | |||
| IntVar | z, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
| void Gecode::atleast | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| const IntArgs & | y, | |||
| IntVar | z, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
Throws an exception of type Int::ArgumentSizeMismatch, if x and y are of different size.
| void Gecode::exactly | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| int | n, | |||
| int | m, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
| void Gecode::exactly | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| IntVar | y, | |||
| int | m, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
| void Gecode::exactly | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| const IntArgs & | y, | |||
| int | m, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
Throws an exception of type Int::ArgumentSizeMismatch, if x and y are of different size.
| void Gecode::exactly | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| int | n, | |||
| IntVar | z, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
| void Gecode::exactly | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| IntVar | y, | |||
| IntVar | z, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
| void Gecode::exactly | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| const IntArgs & | y, | |||
| IntVar | z, | |||
| IntPropLevel | ipl = IPL_DEF | |||
| ) | [inline] |
Post constraint .
Supports domain consistent propagation only.
Throws an exception of type Int::ArgumentSizeMismatch, if x and y are of different size.
| void Gecode::lex | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| IntRelType | r, | |||
| const IntVarArgs & | y, | |||
| IntPropLevel | ipl | |||
| ) | [inline] |
Post lexical order between x and y.
| void Gecode::lex | ( | Home | home, | |
| const BoolVarArgs & | x, | |||
| IntRelType | r, | |||
| const BoolVarArgs & | y, | |||
| IntPropLevel | ipl | |||
| ) | [inline] |
Post lexical order between x and y.
| void Gecode::values | ( | Home | home, | |
| const IntVarArgs & | x, | |||
| IntSet | y, | |||
| IntPropLevel | ipl | |||
| ) | [inline] |
Post constraint .


The following are dynamic routes designed to present different aspects of the book outline.
mooc/course-home
:
mooc/book-toc
: Representative outline of the active book
mooc/learning-pathway
: rendered table of contents for the active outline.
mooc/book-homepage
:
mooc/lrnapp-book
: Send the user to the first page of their sections active book and render it through the lrnapp-book application.


FOSDEMx is a small scale spin-off of FOSDEM, combining a workshop track geared towards students and anyone interested in the topic, with a main track for a broader audience.
FOSDEMx 1, will take place on Tuesday the 13th of November 2018 at the ULB La Plaine campus. The second edition will focus on all things security.


« CSS « CSS Reference
The :last-child
pseudo-class represents any element that is the last child element of its parent.
element:last-child { style properties }
span:last-child { background-color: lime; }
...where...

 This span is not limed. This span is! :)

... should look like ...
This span is not limed. This span is! :)


Check what funding is available
You can get help from the government to pay for apprenticeship training.
The amount you get depends on whether you pay the apprenticeship levy or not. You pay the levy if you’re an employer with a pay bill over £3 million each year.
If you don’t need to pay the levy
You pay 10% towards the cost of training and assessing your apprentice. You need to:
- agree a payment schedule with the training organisation
- pay them directly for the training
The government will pay the rest (90%) up to the funding band maximum. They’ll pay it directly to the training organisation.
You could be eligible for extra funding depending on both your and your apprentice’s circumstances.
If you pay the levy
You’ll receive funds to spend on training and assessing your apprentices. The government will add 10%
How you get your funds and pay for training depends on whether you’re in:


Lesson 13
00:00:10 Fast.ai student accepted into Google Brain Residency program
00:06:30 Cyclical Learning Rates for Training Neural Networks (another student’s paper)
& updates on Style Transfer, GAN, and Mean Shift Clustering research papers
00:13:45 Tiramisu: combining Mean Shitft Clustering and Approximate Nearest Neighbors
00:22:15 Facebook AI Similarity Search (FAISS)
00:28:15 The BiLSTM Hegemony
00:35:00 Implementing the BiLSTM, and Grammar as a Foreign Language (research)
00:45:30 Reminder on how RNN’s work from Lesson #5 (Part 1)
00:47:20 Why Attentional Models use “such” a simple architecture
& “Tacotron: a Fully End-To-End Text-To-Speech Synthesis Model” (research)
00:50:15 Continuing on Spelling_bee_RNN notebook (Attention Model), from Lesson 12
00:58:40 Building the Attention Layer and the ‘attention_wrapper.py’ walk-through
01:15:40 Impressive student’s experiment with different mathematical technique on Style Transfer
01:18:00 Translate English into French, with Pytorch
01:31:20 Translate English into French: using Keras to prepare the data
Note: Pytorch latest version now supports Broadcasting
01:38:50 Writing and running the ‘Train & Test’ code with Pytorch
01:44:00 NLP Programming Tutorial, by Graham Neubig (NAIST)
01:48:25 Question: “Could we translate Chinese to English with that technique ?”
& new technique: Neural Machine Translation of Rare Words with Subword Units (Research)
01:54:45 Leaving Translation aside and moving to Image Segmentation,
with the “The 100 layers Tiramisu: Fully Convolutional DenseNets” (research)
and “Densely Connected Convolutional Networks” (research)


Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License, and code samples are licensed under the BSD License.
©2011 Google
This tutorial demonstrates using Google Analytics to track the usage of your extension.
This tutorial expects that you have some familiarity writing extensions for Google Chrome. If you need information on how to write an extension, please read the Getting Started tutorial.
You will also need a Google Analytics account set up to track your extension. Note that when setting up the account, you can use any value in the Website's URL field, as your extension will not have an URL of its own.
Also note that Google Analytics requires version 4.0.302.2 of Google Chrome to work correctly. Users with an earlier version of Google Chrome will not show up on your Google Analytics reports. View this FAQ entry to learn how to check which version of Google Chrome is deployed to which platform.
The standard Google Analytics tracking code snippet fetches a file named
ga.js
from an SSL protected URL if the current page
was loaded using the https://
protocol. It is strongly
advised to use the SSL protected ga.js in an extension,
but Google Chrome extension
pages are hosted under chrome-extension://
URLs, so the tracking
snippet must be modified slightly to pull ga.js
directly from
https://ssl.google-analytics.com/ga.js
instead of the default
location.
Below is a modified snippet for the asynchronous tracking API (the modified line is bolded):
(function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = 'https://ssl.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })();
Here is a background page which loads the asynchronous tracking code and tracks a single page view:
<!DOCTYPE html> <html> <head> ... </head> <body> <script> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = 'https://ssl.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> ... </body> </html>
Keep in mind that the string UA-XXXXXXXX-X
should be replaced
with your own Google Analytics account number.
The _gaq.push(['_trackPageview']);
code will track a single
page view. This code may be used on any page in your extension. When
placed on a background page, it will register a view once per browser
session. When placed on a popup, it will register a view once every time
the popup is opened.
By looking at the page view data for each page in your extension, you can get an idea of how many times your users interact with your extension per browser session:
To ensure that tracking data from your extension is being sent to Google Analytics, you can inspect the pages of your extension in the Developer Tools window (see the debugging tutorial for more information). As the following figure shows, you should see requests for a file named __utm.gif if everything is set up correctly.
By configuring event tracking, you can determine which parts of your extension your users interact with the most. For example, if you have three buttons users may click:
<button>Button 1</button> <button>Button 2</button> <button>Button 3</button>
Write a function that sends click events to Google Analytics:
function trackButton(button_id) { _gaq.push(['_trackEvent', 'button' + button_id, 'clicked']); };
And call it when each button is pressed:
<button onclick="trackButton(1);">Button 1</button> <button onclick="trackButton(2);">Button 2</button> <button onclick="trackButton(3);">Button 3</button>
The Google Analytics event tracking overview page will give you metrics regarding how many times each individual button is clicked:
By using this approach, you can see which parts of your extension are under-or-overutilized. This information can help guide decisions about UI redesigns or additional functionality to implement.
For more information about using the event tracking API, see the Google Analytics developer documentation.
A sample extension that uses these techniques is available in the Chromium source tree:
.../examples/tutorials/analytics/


news
entertainment
beauty
fashion
lifestyle
books
tech
food
features
video
about us
advertise
apps
labs
terms
privacy
dmca
Admin
®2018 BUSTLE


Table does not have a border by default, this is to allow finer grain customization on whether the border encompasses any footer/paging controls or not Toggle border class


The King and the Sea
The King and the Cloud
"Hello up there!" said the king to the cloud.
"On your way so soon? Why don't you stay?
You won't find a nicer kingdom: green hills,
lush fields, loamy soil. There are towers as high as--"
But the cloud had already moved on.
"I see," said the king with a quiet sigh.
The King and the Rain
"My Crown's going to get rusty," said the king. "Can't you stop?"
"Even if I do," said the rain, "your crown will still rust.
And so will you."
"True," said the king when he'd thought it over.
"In that case, I might as well take a shower."
So he stood outside with his face to the sky
and let the rain wash his cheeks.
 the king asked the net. "How will you
catch everything for me like that?
"I won't catch everything," said the net. "Only a few fish.
The sea has to stay where it is. That's why I have holes."
"That makes sense," said the king, clearing his throat. "What would
I do with the sea at my palace? Who has room for a whole ocean?"
The King and the Night
"I can't see a thing," the king said to the night. "How about
a bit more light?"
"You'll have to talk to the day," said the night. "I look after
darkess; the day takes care of light."
"I can do both," said the king, fetching a candle.
The King and the Tree
"What do you do with your crown?"" asked the king.
"Well," said the tree, "I let birds live in it. And the wind.
Children hide there, too."
"I see," said the king, and he stood for a while
listening to the leaves.


Verb
Meaning: Crumbles
Meaning: Accomplished / Achieved
Meaning: Honours
Phrase
Meaning: Absolute freedom
Noun
Meaning: Hopes / Aspirations
Meaning: A wave of anger
Meaning: Skilled
Meaning: Crushing


Want to test your ability to identify security issues during code review? Welcome to Security Code Review 101!
Take a look at the examples below and choose between the good and the bad!
Q{{$index+1}}:
You solved the category. Go to the training portal site and click the corresponding submit code button. You will be given a salt which you can enter below. Then provide the resulting code on the training portal site.
You have successfully demonstrated that you can identify basic security flaws through code review.


Provides R functions to access the API of the project and repository management web application gitlab. For many common tasks (repository file access, issue assignment and status, commenting) convenience wrappers are provided, and in addition the full API can be used by specifying request locations. Gitlab is open-source software and can be self-hosted or used on gitlab.com.
| Version: | 0.9 |
| Depends: | R (≥ 3.1.2), magrittr |
| Imports: | dplyr (≥ 0.4.3), stringr, base64enc, httr (≥ 1.1.0), purrr (≥ 0.2.2), tibble (≥ 1.1), utils, yaml |
| Suggests: | devtools (≥ 1.8.0), roxygen2, testthat (≥ 1.0.2), R.rsp, knitr, shiny (≥ 0.13.0) |
| Published: | 2017-04-25 |
| Author: | Jirka Lewandowski [aut, cre] |
| Maintainer: | Jirka Lewandowski <jirka.lewandowski at wzb.eu> |
| BugReports: | https://gitlab.points-of-interest.cc/points-of-interest/gitlabr/issues/ |
| License: | GPL (≥ 3) |
| URL: | https://blog.points-of-interest.cc/post/gitlabr/ http://doc.gitlab.com/ce/api/ |
| NeedsCompilation: | no |
| Materials: | README NEWS |
| In views: | WebTechnologies |
| CRAN checks: | gitlabr results |
| Reference manual: | gitlabr.pdf |
| Vignettes: |
gitlabr Quick Start Guide |
| Package source: | gitlabr_0.9.tar.gz |
| Windows binaries: | r-devel: gitlabr_0.9.zip, r-release: gitlabr_0.9.zip, r-oldrel: gitlabr_0.9.zip |
| OS X binaries: | r-release: gitlabr_0.9.tgz, r-oldrel: gitlabr_0.9.tgz |
| Old sources: | gitlabr archive |
Please use the canonical form https://CRAN.R-project.org/package=gitlabr to link to this page.


Here's some of the projects that have been completed in the past three years for academic, professional or personal purpose.
film characters illustrations
non-profit project
video pitch
beauty website
bakery website
portfolio website
portfolio website prototype
wordpress sites
codeigniter site
photo editing
See my projects on Behance
Have a project in mind? Get in touch


Resource Type: ldap
- Defined in:
- lib/puppet/type/ldap.rb
- Providers:
-
ldap
Overview
Manage the configuration of the LDAP client for Oracle Solaris
Properties
-
admin_bind_dn
The Bind Distinguished Name for the administrator identity that is used for shadow information update
-
admin_bind_passwd
The administrator password
-
attribute_map
A mapping from an attribute defined by a service to an attribute in an alternative schema. Specify multiple mappings as an array.
-
authentication_method
The default authentication method(s). Specify multiple methods as an array.
Supported values:- none
- simple
- sasl/CRAM-MD5
- sasl/DIGEST-MD5
- sasl/GSSAPI
- tls:simple
- tls:sasl/CRAM-MD5
- tls:sasl/DIGEST-MD5
-
bind_dn
An entry that has read permission for the requested database. Specify multiple entries as an array.
-
bind_passwd
password to be used for authenticating the bind DN.
-
bind_time_limit
The maximum number of seconds a client should spend performing a bind operation.
-
credential_level
The credential level the client should use to contact the directory.
Supported values:- anonymous
- proxy
- self
-
enable_shadow_update
Specify whether the client is allowed to update shadow information.
Supported values:- true
- false
-
ensure
(defaults to: present)
The basic property that the resource should be in.
Supported values:- present
- absent
-
follow_referrals
The referral setting.
Supported values:- true
- false
-
host_certpath
The location of the certificate files
-
objectclass_map
A mapping from an objectclass defined by a service to an objectclass in an alternative schema. Specify multiple mappings as an array.
-
preferred_server_list
LDAP server(s) to contact before any servers listed in default_server_list
-
profile
The LDAP profile name
-
profile_ttl
The TTL value in seconds for the client information
-
search_base
The default search base DN
-
search_scope
The default search scope for the client's search operations.
Supported values:- base
- one
- sub
-
search_time_limit
The maximum number of seconds allowed for an LDAP search operation.
-
server_list
LDAP server names or addresses. Specify multiple servers as an array
-
service_authentication_method
The authentication method to be used by a service. Specify multiple methods as an array.
-
service_credential_level
The credential level to be used by a service.
Supported values:- anonymous
- proxy
-
service_search_descriptor
How and where LDAP should search for information for a particular service
Parameters
-
name (namevar)
The symbolic name for the LDAP client settings to use. Name can only be the literal value 'current'
Supported values:- current


Toggle navigation
Menu
theshop @ aidan's
Home
Thank
Your order has been placed! Lookout for a message to collect your order.
Take Me Home


|
Libvaxy
0.1
A Terraria library mod focusing on easing development and providing a lot of meta.
|
A bunch of extensions to the Texture2D class that make them easier to manipulate, copy, etc. More...
Static Public Member Functions | |
| static void | SetColor (this Texture2D texture, int x, int y, Color color) |
| Sets the color of the texture's pixel in a specified coordinate. More... | |
| static void | SetColorsRect (this Texture2D texture, Rectangle rect, Color color) |
| Sets a rectangle of pixels in a texture to a certain color. More... | |
| static void | Fill (this Texture2D texture, Color color) |
| Fills an entire texture with a color. More... | |
| static Color[] | GetColors (this Texture2D texture) |
| Returns all the colors in a texture. More... | |
| static Color[] | GetColorsRect (this Texture2D texture, Rectangle rect) |
| Returns all the colors within a specified rectangle in a texture. More... | |
| static Color | GetAverageColor (this Texture2D texture) |
| Gets the average color in the texture, ignoring transparency. More... | |
| static void | PreMultiply (this Texture2D texture) |
| Premultiplies a texture. More... | |
| static Texture2D | Clone (this Texture2D texture) |
| Clones a certain texture and returns a new Texture2D object for it. Libvaxy will automatically dispose the cloned texture on unload. More... | |
| static Texture2D | CloneRectangle (this Texture2D texture, Rectangle rect) |
| Clones a certain rectangle within a texture and returns a new Texture2D object for it. Libvaxy will automatically dispose the cloned texture on unload. More... | |
| static Rectangle | GetDimensions (this Texture2D texture) |
| Returns a rectangle specifying the texture's dimensions. More... | |
| static void | MaskAlpha (this Texture2D texture, Texture2D alphaMask) |
| Masks a texture with another texture's transparency. Transparent pixels in the alpha mask will have their alpha value placed onto the masked texture. More... | |
| static void | MergeTexture (this Texture2D texture, Texture2D otherTexture, bool allowAlpha=false) |
| Merges a texture with another texture by interpolating between them both. You can optionally specify whether transparent pixels are interpolated or ignored (ignored by default). More... | |
| static bool | ContainsColor (this Texture2D texture, Color searchColor, float tolerance=0, bool alphaTolerant=false) |
| Returns whether a specific color is found in the texture or a color within a range of colors to your selected color. More... | |
| static Texture2D | CreateTexture (int width, int height) |
| Creates a blank texture you can use. Libvaxy will automatically dispose this texture on unload. More... | |
Static Private Member Functions | |
| static byte | GetColorTolerance (float hueValue, float tolerance) |
| static int | CoordinateToIndex (int x, int y, int width) |
| static void | CheckMasksCompatible (Texture2D texture, Texture2D mask) |
A bunch of extensions to the Texture2D class that make them easier to manipulate, copy, etc.
Definition at line 11 of file TextureExtensions.cs.
|
inlinestaticprivate |
Definition at line 277 of file TextureExtensions.cs.
|
inlinestatic |
Clones a certain texture and returns a new Texture2D object for it. Libvaxy will automatically dispose the cloned texture on unload.
Definition at line 130 of file TextureExtensions.cs.
|
inlinestatic |
Clones a certain rectangle within a texture and returns a new Texture2D object for it. Libvaxy will automatically dispose the cloned texture on unload.
| rect | The rectangle within the texture to clone. |
Definition at line 144 of file TextureExtensions.cs.
|
inlinestatic |
Returns whether a specific color is found in the texture or a color within a range of colors to your selected color.
| searchColor | The color you wish to search for. |
| tolerance | The tolerance level in hue shiftings, starting from 0 for no tolerance, by default, going up to 1 for any degree of difference in hue (100%) |
| alphaTolerant | Whether to take alpha into consideration. False by default. |
Definition at line 224 of file TextureExtensions.cs.
|
staticprivate |
|
inlinestatic |
Creates a blank texture you can use. Libvaxy will automatically dispose this texture on unload.
| width | The width of the texture. |
| height | The height of the texture. |
Definition at line 266 of file TextureExtensions.cs.
|
inlinestatic |
Fills an entire texture with a color.
| color | The color to set the texture to. |
Definition at line 47 of file TextureExtensions.cs.
|
inlinestatic |
Gets the average color in the texture, ignoring transparency.
Definition at line 89 of file TextureExtensions.cs.
|
inlinestatic |
Returns all the colors in a texture.
Definition at line 60 of file TextureExtensions.cs.
|
inlinestatic |
Returns all the colors within a specified rectangle in a texture.
| rect | The rectangle within the texture. |
Definition at line 71 of file TextureExtensions.cs.
|
staticprivate |
|
static |
Returns a rectangle specifying the texture's dimensions.
|
inlinestatic |
Masks a texture with another texture's transparency. Transparent pixels in the alpha mask will have their alpha value placed onto the masked texture.
| alphaMask | The alpha mask texture. |
Definition at line 162 of file TextureExtensions.cs.
|
inlinestatic |
Merges a texture with another texture by interpolating between them both. You can optionally specify whether transparent pixels are interpolated or ignored (ignored by default).
| otherTexture | The texture to merge with. |
| allowAlpha | Whether transparent pixels are interpolated as well or ignored. This is false by default. |
Definition at line 190 of file TextureExtensions.cs.
|
inlinestatic |
Premultiplies a texture.
Definition at line 116 of file TextureExtensions.cs.
|
inlinestatic |
Sets the color of the texture's pixel in a specified coordinate.
| x | The X coordinate of the pixel. |
| y | The Y coordinate of the pixel. |
| color | The color to set the pixel to. |
Definition at line 20 of file TextureExtensions.cs.
|
inlinestatic |
Sets a rectangle of pixels in a texture to a certain color.
| rect | The rectangle within the texture. |
| color | The color to set the rectangle to. |
Definition at line 32 of file TextureExtensions.cs.


| Interface | Description |
|---|---|
| BytecodeProcessor | |
| HasCleanup |
An interface for things that need to be cleaned up after
operations complete.
|
| ParserPlugin |
A simple extension point to allow us to switch between the classic Groovy parser and the new Antlr based parser
|
| Class | Description |
|---|---|
| AnnotationConstantsVisitor |
Visitor to resolve constants in annotation definitions.
|
| ASTTransformationsContext |
Stores state information about global AST transformations applied to a compilation unit.
|
| ClassNodeResolver |
This class is used as a pluggable way to resolve class names.
|
| ClassNodeResolver.LookupResult |
Helper class to return either a SourceUnit or ClassNode.
|
| CompilationUnit |
The CompilationUnit collects all compilation data as it is generated by the compiler system.
|
| CompilationUnit.ClassgenCallback |
A callback interface you can use to "accompany" the classgen()
code as it traverses the ClassNode tree.
|
| CompilationUnit.GroovyClassOperation | |
| CompilationUnit.PrimaryClassNodeOperation |
An callback interface for use in the applyToSourceUnits loop driver.
|
| CompilationUnit.ProgressCallback |
A callback interface you can use to get a callback after every
unit of the compile process.
|
| CompilationUnit.SourceUnitOperation |
An callback interface for use in the applyToSourceUnits loop driver.
|
| CompilerConfiguration |
Compilation control flags and coordination stuff.
|
| ErrorCollector |
A base class for collecting messages and errors during processing.
|
| GenericsVisitor |
class used to verify correct usage of generics in
class header (class and superclass declaration)
|
| Janitor |
An agent that can be used to defer cleanup operations to
a later time.
|
| LabelVerifier |
This class checks the handling of labels in the AST
|
| OptimizerVisitor |
Visitor to produce several optimizations
- to replace numbered constants with references to static fields
|
| ParserPluginFactory |
A factory of parser plugin instances
|
| Phases |
Compilation phase identifiers.
|
| ProcessingUnit |
A base class for data structures that can collect messages and errors
during processing.
|
| ResolveVisitor |
Visitor to resolve Types and convert VariableExpression to
ClassExpressions if needed.
|
| SourceExtensionHandler |
Looks for source file extensions in META-INF/services/org.codehaus.groovy.source.Extensions
|
| SourceUnit |
Provides an anchor for a single source unit (usually a script file)
as it passes through the compiler system.
|
| StaticImportVisitor |
Visitor to resolve constants and method calls from static Imports
|
| StaticVerifier |
Verifier to check non-static access in static contexts
|
| Enum | Description |
|---|---|
| CompilePhase |
The phases of the GroovyCompiler.
|
| Exception | Description |
|---|---|
| CompilationFailedException |
Thrown when compilation fails from source errors.
|
| ConfigurationException |
Thrown when configuration data is invalid.
|
| MultipleCompilationErrorsException |
Compiler control classes.


Current Time : {{current_time}}
Option 1 : Direct Uber
Direct Uber from {{orig_address}} to {{dest_address}} for {{uber_direct_prices["prices"][0]["estimate"]}}
Uber Car Types Available : {{orig_address}}
| Name |
Description |
Capacity |
Estimated Time To Pickup |
{% for up in uber_direct_products["products"] %}
| {{ up["display_name"] }} |
{{ up["description"] }} |
{{ up["capacity"] }} |
{{ direct_times["times"][0]["estimate"] }} |
{% endfor %}
Uber Estimates for Pickup : {{orig_address}}
| Name |
Estimate |
{% for up in direct_times["times"] %}
| {{ up["display_name"] }} |
{{ up["estimate"]/60.0 }} Minutes |
{% endfor %}
Uber Prices from {{orig_address}} to {{dest_address}}
| Name |
Estimate |
{% for up in uber_direct_prices["prices"] %}
| {{ up["display_name"] }} |
{{ up["estimate"] }} {{ up["currency_code"] }} |
{% endfor %}
Option 2 : Uber + Train + Uber for {{combined_price_low}} - {{combined_price_high}} USD
Uber from {{orig_address}} to nearest origin station : {{station.upper()}}
Uber Car Types Available at : {{orig_address}}
| Name |
Description |
Capacity |
{% for up in uber_direct_products["products"] %}
| {{ up["display_name"] }} |
{{ up["description"] }} |
{{ up["capacity"] }} |
{% endfor %}
Uber Prices from {{orig_address}} to {{station}} Station
| Name |
Estimate |
{% for up in uber_orig_prices["prices"] %}
| {{ up["display_name"] }} |
{{ up["estimate"] }} {{ up["currency_code"] }} |
{% endfor %}
Train from {{station.upper()}} to {{destination.upper()}}
| Departure Time |
Destination |
Track |
Status |
Stops List |
{% for train in trains %}
| {{ train.deptime }} |
{{ train.destination }} |
{{ train.track }} |
{{ train.status }} |
{{ train.stops_list }} |
{% endfor %}
Uber from {{destination.upper()}} Station to {{dest_address}}
Uber Car Types Available : {{destination.upper()}} Station
| Name |
Description |
Capacity |
{% for up in uber_dest_products["products"] %}
| {{ up["display_name"] }} |
{{ up["description"] }} |
{{ up["capacity"] }} |
{% endfor %}
Uber Prices from {{destination}} Station to {{dest_address}}
| Name |
Estimate |
{% for up in uber_dest_prices["prices"] %}
| {{ up["display_name"] }} |
{{ up["estimate"] }} {{ up["currency_code"] }} |
{% endfor %}
{% endautoescape %}


Returns the current date and time as a static string.
Detailed Description
This module contains various utilities to get the current date/time, and possibly format it according to the ISO 8601 format.
Function Documentation
char* qfits_get_datetime_iso8601
(
void
)
Returns the current date and time as a static string.
Returns:
Pointer to statically allocated string
Build and return a string containing the date of today and the current time in ISO8601 format. The returned pointer points to a statically allocated string in the function, so no need to free it.


This page should appear for all routes, allowing angular's HTML5 mode ui-router to activate the appropriate state, i.e.:
Static asset files are served before the SPA "catch-all" route. If a file does not exist on the filesystem, a 404 will be returned.
The server can also provide a "SPA Boot Config" JSONP callback for run-time configuration:


Honzi
/
Personal Bests
/Physical
Feat
PB
Holding Breath
1:15.248
Reservoir (clockwise)
27:49.9
Reservoir (counter-clockwise)
27:49.3
Planking
7:07
Pull-ups (overhand)
4
Pull-ups (underhand)
3
Push-ups
42
Sit-ups
60
Yoga - Boat
1:11


SECTION: 400-Security TITLE: Client Certificates QUESTION: How do I use Client Certificate Authentication?
This is an overview of how to configure Jetty's SSL listener to require client certificates. There are only two steps:
<Call name="addListener"> <Arg> <New class="org.mortbay.http.SunJsseListener"> <Set name="Port">8443</Set> <Set name="MinThreads">5</Set> <Set name="MaxThreads">255</Set> <Set name="MaxIdleTimeMs">50000</Set> <Set name="Password">secretPassword</Set> <Set name="KeyPassword">verySecretPassword</Set> <Set name="NeedClientAuth">true</Set> </New> </Arg> </Call>
Just as when you configured the plain SSL listener,
you may now access the SSL port with a URL like:
https://yourhost:8443/Dump
If you get an javax.net.ssl.SSLException, check that you have remembered the s in https. Depending on your browser, you may see a dialog that asks which key the browser should send to the server. If the browser cannot provide JSSE with an acceptable user certificate, JSSE will drop the connection and not allow the user to proceed. Depending on the user's browser, the dropped connection may produce either a completely blank (white) screen or an error page.
Jetty also supports optional user certificates, where encountering a INTEGRAL or SECURE data constraint will request an SSL renegoatiation. Currently the RI of JSSE does not appear to support this, but other SSL implementations may.
Note that:
The listener configuration above causes Jetty to add the certificate array obtained
from the SSL listener, to the current HTTP request object under
key javax.servlet.request.X509Certificate. This is a necessary condition for a
web application that uses client-cert authentication via an entry in its web.xml
file similar to
<login-config><auth-method>CLIENT-CERT</auth-method></login-config>
However, this entry is not sufficient for client-certificate authentication within
a web application, as the certificates must be checked against a UserRealm implementation.
The UserRealms provided with jetty do not provide any certificate handling.
Within the JBoss J2EE server, the CLIENT-CERT auth method causes JBoss to save
the certificate chain as the credential associated with the request. A custom
written login module (JBoss currently includes no standard client-cert login
module) can map this certificate chain into the appropriate list of J2EE roles.
Note that the object stored under request key javax.servlet.request.X509Certificate (or the JBoss certificate credential) is always an array of objects of class java.security.cert.X509Certificate. Per the Javadoc documentation for SSLSession.getPeerCertificates(), index #0 of this array is always the user's certificate. It is not clear if there is any way to configure JSSE or the browser to return anything other than the user's certificate. For most applications it seems prudent to use cert[0] only and not depend on the presence of anything else in the certificate chain.
This procedure was tested with Jetty embedded in JBoss 3.0.3. Jetty and JBoss were compiled using Sun's JDK 1.4.1.
Written by R.W. Shore, 31-Oct-2002.


Received a sum of ₹ {{total}}/- ( Rupees {{total_in_words}} only )
vide
{% if payment.purchase_order__mode_of_payment != 1 and payment.purchase_order__mode_of_payment != 4 %}
{{payment.purchase_order__mode_of_payment__method}} No. {{payment.purchase_order__cheque_dd_number}} dated:{{payment.purchase_order__cheque_dd_date}}
{% else %}
{{payment.purchase_order__mode_of_payment__method}}
{% endif %}
from
{% if address.purchase_order__buyer__first_name %}
{{address.purchase_order__buyer__first_name}} {{address.purchase_order__buyer__last_name}}
{% else %}
{{address.purchase_order__buyer__customer__title}}
{% endif %}
, {{address.purchase_order__buyer__customer__address__street_address}}, {{address.purchase_order__buyer__customer__address__district}}
{% if address.purchase_order__buyer__customer__address__pin != 'None' and address.purchase_order__buyer__customer__address__pin != '' %}
, {{address.purchase_order__buyer__customer__address__pin}}
{% endif %}
, {{address.purchase_order__buyer__customer__address__province}}
vide Bill No. GNDEC/TCC/B/{{purchase_order}} dated {{order_date}}
on account of {{address.purchased_item__item__category__name}}, vide Receipt No. {{purchase_order}} dated {{order_date}}
Nature of Consultancy : {{ distribution }}, Ratio {{ ratio }}


Short description of guidance
Sighted users need sufficient contrast between foreground and background to perceive content.
Many users need a high enough level of visual contrast to distinguish elements from each other and foreground from background. For those who find it difficult to perceive smaller text, increasing contrast level may help (example, make the lightest of two colors lighter to increase contrast, or make the font bolder). Color use can help communication, but only when it aligns with the purpose of the content. Too much contrast may be distracting or overwhelming.
Authors need to balance font size, font stroke width, background color, font color, and nearby colors to achieve good visual contrast. Authors can use tools to evaluate elements and adjust the attribute and color of those elements to achieve a presentation which meets the guidance.
Original (plain language interpretation attempted above): The solution to this problem of a complex relationship between interrelated elements of visual readability is to include an algorithm which allows authors to feed in preferred settings and calculate the generally optimal contrast needed, as well as the range of contrast which will be needed for different technologies and individual users. Authors can then adjust the other elements in order to reduce contrast. Such an algorithm should also warn authors when the contrast setting is likely to be too high.
WCAG 2.1 Understanding lists the following exceptions. Are there changes needed?
To Be Written
Where communication is important with designers, developers, testers
How to get started early
How to remediate
Link to Style Guide(s)
Links to Video (Embedded or Links)
Video (Embedded or Links)
Video (Embedded or Links)
Includes links to 3rd party/crowd-sourced tips?
Includes links to 3rd party/crowd-sourced tips?
Is this duplication of User Testing in Designer tab or different?


nips nips2011 nips2011-163 nips2011-163-reference knowledge-graph by maker-knowledge-mining
Source: pdf
Author: Jaedeug Choi, Kee-eung Kim
Abstract: The difﬁculty in inverse reinforcement learning (IRL) arises in choosing the best reward function since there are typically an inﬁnite number of reward functions that yield the given behaviour data as optimal. Using a Bayesian framework, we address this challenge by using the maximum a posteriori (MAP) estimation for the reward function, and show that most of the previous IRL algorithms can be modeled into our framework. We also present a gradient method for the MAP estimation based on the (sub)differentiability of the posterior distribution. We show the effectiveness of our approach by comparing the performance of the proposed method to those of the previous algorithms. 1
[1] S. Russell. Learning agents for uncertain environments (extended abstract). In Proceedings of COLT, 1998.
[2] P. R. Montague and G. S. Berns. Neural economics and the biological substrates of valuation. Neuron, 36(2), 2002.
[3] B. D. Argall, S. Chernova, M. Veloso, and B. Browning. A survey of robot learning from demonstration. Robotics and Autonomous Systems, 57(5), 2009.
[4] Y. Niv. Reinforcement learning in the brain. Journal of Mathematical Psychology, 53(3), 2009.
[5] E. Hopkins. Adaptive learning models of consumer behavior. Journal of Economic Behavior and Organization, 64(3–4), 2007.
[6] A. Y. Ng and S. Russell. Algorithms for inverse reinforcement learning. In Proceedings of ICML, 2000.
[7] P. Abbeel and A. Y. Ng. Apprenticeship learning via inverse reinforcement learning. In Proceedings of ICML, 2004.
[8] N. D. Ratliff, J. A. Bagnell, and M. A. Zinkevich. Maximum margin planning. In Proceedings of ICML, 2006.
[9] G. Neu and C. Szepesv´ ri. Apprenticeship learning using inverse reinforcement learning and gradient a methods. In Proceedings of UAI, 2007.
[10] U. Syed and R. E. Schapire. A game-theoretic approach to apprenticeship learning. In Proceedings of NIPS, 2008.
[11] B. D. Ziebart, A. Maas, J. A. Bagnell, and A. K. Dey. Maximum entropy inverse reinforcement learning. In Proceedings of AAAI, 2008.
[12] G. Neu and C. Szepesv´ ri. Training parsers by inverse reinforcement learning. Machine Learning, 77(2), a 2009.
[13] D. Ramachandran and E. Amir. Bayesian inverse reinforcement learning. In Proceedings of IJCAI, 2007.
[14] A. Boularias and B. Chaib-Draa. Bootstrapping apprenticeship learning. In Proceedings of NIPS, 2010.
[15] J. Choi and K. Kim. Inverse reinforcement learning in partially observable environments. In Proceedings of IJCAI, 2009. 9


Finite products
Symmetric monoidal
Symmetric premononidal
Partial traced cartesian
Appendices
Premonoidal categories and state transformers
Bibliography


{% extends "layout.html" %} {% block page_title %} Performance platform {% endblock %} {% block content %} Give feedback This survey is completely anonymous and will only be used to improve the service. Why did you visit Gov.uk today? Why did you visit Gov.uk today? Did you get what you needed? Did you get what you needed? Yes No How could we improve this service? How could we improve this service? {% endblock %}
This survey is completely anonymous and will only be used to improve the service.