@Beta public class SGPanelGDX extends com.badlogic.gdx.scenes.scene2d.Group implements SGPane
| Constructor and Description |
|---|
SGPanelGDX() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCell(int x,
int y)
Clears the cell at the location given with the default background color.
|
void |
clearCell(int x,
int y,
java.awt.Color color)
Clears the cell at the location given with the provided color.
|
int |
getCellHeight()
Returns the height of a single cell.
|
int |
getCellWidth()
Returns the width of a single cell.
|
int |
getGridHeight()
Returns the height of the grid.
|
int |
getGridWidth()
Returns the width of the grid.
|
void |
initialize(int gridWidth,
int gridHeight,
java.awt.Font font)
Initializes the component with the supplied number of rows and columns.
|
void |
initialize(int cellWidth,
int cellHeight,
int gridWidth,
int gridHeight,
java.awt.Font font)
Initializes the component with the supplied values.
|
void |
placeCharacter(int x,
int y,
char c)
Sets one specific block to the given character.
|
void |
placeCharacter(int x,
int y,
char c,
java.awt.Color fore)
Sets the block at the given coordinates to contain the passed in
character drawn with the given foreground color.
|
void |
placeCharacter(int x,
int y,
char c,
java.awt.Color fore,
java.awt.Color back)
Sets one specific block to the given character with the given foreground
and background colors.
|
void |
placeHorizontalString(int xOffset,
int yOffset,
java.lang.String string)
Prints out a string starting at the given offset position.
|
void |
placeHorizontalString(int xOffset,
int yOffset,
java.lang.String string,
java.awt.Color foreground,
java.awt.Color background)
Prints out a string vertically starting at the given offset position and
traveling down.
|
void |
placeImage(int x,
int y,
com.badlogic.gdx.graphics.Pixmap image,
boolean foreground)
Places an image at the given grid coordinate.
|
void |
placeImage(int x,
int y,
java.lang.String key)
Places the image associated with the provided key at the given
coordinates.
|
void |
placeImage(int x,
int y,
java.lang.String key,
java.awt.Color background)
Places the image associated with the provided key at the given
coordinates.
|
void |
placeText(int xOffset,
int yOffset,
char[][] chars)
Sets the contents of the component to reflect the two dimensional
character array, starting at the given offset position.
|
void |
placeText(int xOffset,
int yOffset,
char[][] chars,
java.awt.Color foreground,
java.awt.Color background)
Sets the contents of the component to reflect the two dimensional
character array, starting at the given offset position.
|
void |
placeVerticalString(int xOffset,
int yOffset,
java.lang.String string)
Prints out a string vertically starting at the given offset position and
traveling down.
|
void |
placeVerticalString(int xOffset,
int yOffset,
java.lang.String string,
java.awt.Color foreground,
java.awt.Color background)
Prints out a string starting at the given offset position.
|
void |
refresh()
Signals that this component should update its display image.
|
void |
setCellBackground(int x,
int y,
java.awt.Color color)
Sets the background to the provided color.
|
void |
setDefaultBackground(java.awt.Color defaultBackground)
Sets the background color which will be used on all text and transparent
tiles when not other color is specified.
|
void |
setDefaultForeground(java.awt.Color defaultForeground)
Sets the background color which will be used on all text and transparent
tiles when not other color is specified.
|
void |
setText(char[][] chars)
Sets the contents of the component to reflect the two dimensional
character array.
|
boolean |
willFit(char character)
Test if the given character will fit in the current cell dimension using
the current Font.
|
act, addActor, addActorAfter, addActorAt, addActorBefore, applyTransform, childrenChanged, clear, computeTransform, draw, drawChildren, findActor, getChildren, hit, isTransform, localToDescendantCoordinates, removeActor, resetTransform, setCullingArea, setStage, setTransform, swapActor, swapActor
addAction, addCaptureListener, addListener, clearActions, fire, getActions, getCaptureListeners, getColor, getHeight, getListeners, getName, getOriginX, getOriginY, getParent, getRight, getRotation, getScaleX, getScaleY, getStage, getTop, getTouchable, getWidth, getX, getY, getZIndex, hasParent, isAscendantOf, isDescendantOf, isVisible, localToAscendantCoordinates, localToParentCoordinates, localToStageCoordinates, notify, parentToLocalCoordinates, remove, removeAction, removeCaptureListener, removeListener, rotate, scale, scale, screenToLocalCoordinates, setBounds, setColor, setColor, setHeight, setName, setOrigin, setOriginX, setOriginY, setParent, setPosition, setRotation, setScale, setScale, setScaleX, setScaleY, setSize, setTouchable, setVisible, setWidth, setX, setY, setZIndex, size, size, stageToLocalCoordinates, toBack, toFront, toString, translate
public int getCellHeight()
SGPane
getCellHeight
in interface SGPane
public int getCellWidth()
SGPane
getCellWidth
in interface SGPane
public int getGridHeight()
SGPane
getGridHeight
in interface SGPane
public int getGridWidth()
SGPane
getGridWidth
in interface SGPane
public void initialize(int cellWidth, int cellHeight, int gridWidth, int gridHeight, java.awt.Font font)
SGPane
initialize
in interface SGPane
cellWidth
- in pixelscellHeight
- in pixelsgridWidth
- in cellsgridHeight
- in cellspublic void initialize(int gridWidth, int gridHeight, java.awt.Font font)
SGPane
initialize
in interface SGPane
gridWidth
- in cellsgridHeight
- in cellspublic void clearCell(int x, int y)
SGPane
public void clearCell(int x, int y, java.awt.Color color)
SGPane
public void setCellBackground(int x, int y, java.awt.Color color)
SGPane
setCellBackground
in interface SGPane
public void placeCharacter(int x, int y, char c)
SGPane
placeCharacter
in interface SGPane
x
- The x coordinate to sety
- The y coordinate to setc
- The character to be displayedpublic void placeCharacter(int x, int y, char c, java.awt.Color fore, java.awt.Color back)
SGPane
placeCharacter
in interface SGPane
x
- The x coordinate to sety
- The y coordinate to setc
- The character to be displayedfore
- The foreground colorback
- The background colorpublic void placeCharacter(int x, int y, char c, java.awt.Color fore)
SGPane
placeCharacter
in interface SGPane
public void placeImage(int x, int y, java.lang.String key)
SGPane
placeImage
in interface SGPane
public void placeImage(int x, int y, java.lang.String key, java.awt.Color background)
SGPane
placeImage
in interface SGPane
public void placeImage(int x, int y, com.badlogic.gdx.graphics.Pixmap image, boolean foreground)
x
- y
- image
- foreground
- if true then the image will be placed in the foregroundpublic void placeText(int xOffset, int yOffset, char[][] chars)
SGPane
public void placeText(int xOffset, int yOffset, char[][] chars, java.awt.Color foreground, java.awt.Color background)
SGPane
public void placeHorizontalString(int xOffset, int yOffset, java.lang.String string)
SGPane
placeHorizontalString
in interface SGPane
public void placeHorizontalString(int xOffset, int yOffset, java.lang.String string, java.awt.Color foreground, java.awt.Color background)
SGPane
placeHorizontalString
in interface SGPane
public void placeVerticalString(int xOffset, int yOffset, java.lang.String string, java.awt.Color foreground, java.awt.Color background)
SGPane
placeVerticalString
in interface SGPane
public void placeVerticalString(int xOffset, int yOffset, java.lang.String string)
SGPane
placeVerticalString
in interface SGPane
public void refresh()
SGPane
public void setDefaultBackground(java.awt.Color defaultBackground)
SGPane
setDefaultBackground
in interface SGPane
public void setDefaultForeground(java.awt.Color defaultForeground)
SGPane
setDefaultForeground
in interface SGPane
public void setText(char[][] chars)
SGPane


parentheses indicate a function
Brackets indicate arrays.
Curly braces enclose code to be executed like a seperate paragraph in writing. Specific code statements such as If are followed by code written inside curly braces. Code inside curly braces are like a seperate section of code.
single quotes are like double quotes indicating a string. Single quotes are used instead of double quotes to differentiate. Makes code easier to read at glance
Double quotes are like single quotes indicating a string. Double quotes are used instead of single quotes to differentiate. Makes code easier to read at glance


This functionality is either under construction or not yet implemented
Click here to return to the index


{{statename}}
Cases Pending
{{casepending}}
Cases Reported
{{casereported}}
Total Cases
{{casetotal}}
Cases filed as true but with no sufficient evidence
{{truebutNoevidence}}
Cases files as False
{{falsereports}}
Cases filed as false due to mistakes
{{falsereportmistake}}
Cases disposed by the Police Department
{{casedisposedpolice}}


Dev Club Recruitment 2018
Assignment
Submission Link
Softwares (Proxy Free):
Android Studio (Linux)
Android Studio (Mac)
Android Studio (Windows 64bit)
For any other queries message us on our
Facebook page
, or send us an email at
<EMAIL_ADDRESS>Deadline: 1st March 2018 11:55 PM
Time Left:


vignettes/not-built-vignettes/base-general-simulations.Rmd
base-general-simulations.Rmd
In this vignette, we show to perform simulations to assess how well our base model using multiple covariates is performing.
We briefly review how data is generated.
Provide code of how to simulate data from this model and estimate the MLE.
Specifically, we generate data under our branching process model described in the modeling section where the probability of onward transmission \(p_i\) is a function of multiple covariates, a vector \(X_i \sim F\), which are covariates generated from some distribution \(F\) and the probability of transmission is given by \[ p_i = logit^{-1}\left (X_i\beta \right ), \] where \(F\) and \(\beta\) are fixed parameters. Here, we are assuming we are working with the base model where all transmissions within a cluster can be directly traced back to an observed individual within the cluster.
For \(F\), we sample with replacement from a data frame where each row corresponds to a possible set of covariates for an individual.
Below is how we simulate a single data set from the branching process. We have summarized the clusters by size.
set.seed(2020)
## Generate possible covariates
sample_covariates_df <- data.frame(x = c(1, 1, 0, 0),
y = c(1, 0, 1, 0),
z = c(-1, 0, .5, 1))
beta0 <- -2
beta1 <- 1
beta2 <- .5
beta3 <- -1.2
M <- 1000
data <- simulate_bp(K = M,
inf_params = c(beta0, beta1, beta2, beta3),
sample_covariates_df = sample_covariates_df,
covariate_names = c("x", "y", "z"),
max_size = 50)
data %>% group_by(cluster_id) %>%
summarize(cluster_size = n()) %>%
ungroup() %>%
group_by(cluster_size) %>%
summarize(freq = n()) %>%
ungroup() %>%
kable(type = "html") %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"), full_width = F,
position = "center")
| cluster_size | freq |
|---|---|
| 1 | 769 |
| 2 | 77 |
| 3 | 39 |
| 4 | 27 |
| 5 | 12 |
| 6 | 9 |
| 7 | 6 |
| 8 | 9 |
| 9 | 3 |
| 10 | 6 |
| 11 | 2 |
| 12 | 6 |
| 13 | 4 |
| 14 | 4 |
| 15 | 1 |
| 16 | 3 |
| 17 | 1 |
| 19 | 2 |
| 20 | 2 |
| 21 | 1 |
| 22 | 1 |
| 23 | 2 |
| 25 | 1 |
| 26 | 2 |
| 27 | 1 |
| 28 | 1 |
| 31 | 1 |
| 42 | 2 |
| 46 | 1 |
| 50 | 5 |
Unlike the binary covariate case, we need to keep the entire data set in order to compute our likelihood, and so this general covariate is more expensive in terms of both computational time and memory.
We sample \(B= 1000\) MC trees for each row in the summarized clusters data.
B <- 1000
mc_trees <- sample_mc_trees(observed_data = data,
B = B,
covariate_names = c("x", "y", "z"))
mc_trees %>% head() %>%
kable(type = "html") %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"),
position = "center", full_width = FALSE)
| cluster_size | gen | n_in_gen | id | n_inf | cluster_id | x | y | z | orig_id | inf_id |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 1-1 | 0 | n1-g1-1 | 0 | 0 | 1 | 1 | NA |
| 1 | 1 | 1 | 1-1 | 0 | n1-g1-2 | 0 | 0 | 1 | 1 | NA |
| 1 | 1 | 1 | 1-1 | 0 | n1-g1-3 | 0 | 0 | 1 | 1 | NA |
| 1 | 1 | 1 | 1-1 | 0 | n1-g1-4 | 0 | 0 | 1 | 1 | NA |
| 1 | 1 | 1 | 1-1 | 0 | n1-g1-5 | 0 | 0 | 1 | 1 | NA |
| 1 | 1 | 1 | 1-1 | 0 | n1-g1-6 | 0 | 0 | 1 | 1 | NA |
We can then estimate the MLE from the MC sampled trees with general_loglike()
. This will take a minute or two to run.
inf_params_0 <- c(0,0, 0, 0)
best_params <- optim(inf_params_0, fn = general_loglike,
mc_trees = mc_trees,
return_neg = TRUE,
cov_names = c("x", "y", "z"),
method = "L-BFGS-B",
lower = c(-4, -4, -4, -4),
upper = c(4, 4, 4, 4),
hessian = TRUE)
round(best_params$par, 2)
## [1] 0.12 -1.03 -0.54 -1.92
We can use likelihood profiling to get individual \((1-\alpha\))% CIs for our estimates. NOTE: In practice, we have found that likelihood profiling has low coverage and instead prefer bootstrapping to get an estimate of the SE.
lp_ests <- likelihood_profs(best_pars = best_params$par,
max_loglike = -best_params$value,
mc_trees = mc_trees,
covariate_names = c("x", "y", "z"),
alpha = .05,
multiple_outside_transmissions = FALSE)
lp_ests %>% as.data.frame() %>%
kable(type = "html", digits = 2) %>%
kable_styling(bootstrap_options = c("striped", "hover", "condensed"),
position = "center", full_width = FALSE)
| est. | lower | upper |
|---|---|---|
| 0.12 | 0.04 | 0.19 |
| -1.03 | -1.12 | -0.94 |
| -0.54 | -0.63 | -0.44 |
| -1.92 | -2.02 | -1.80 |


The digital Crisis Simulation Exercise (SimEx) is the latest iteration of a multi-year training lab
designed to simulate disaster response strategies and actions within a realistic crisis setting. The
COVID-19 Pandemic highlighted the need for remote simulation experiences to enable practicing
team-based collaboration and critical thinking within a controlled, distanced environment. The
SimEx, built in Minecraft, places users directly in the heart of a war-torn country to recreate the
stress and urgency inherent in disaster response situations. Users must effectively demonstrate
situational awareness, communication, and devise a successful plan to safely escape the conflict and
evacuate the team across an international border.


{{#markdown}}
## Vertical Navigation
The Web App Standards's design system, along with most modern websites, is built for vertical navigation.
Meaning, they're designed to guide the user's focus _down the page_, while ensuring navigation is always immediately apparent and available.
- user's both expect and prefer to scroll on a website (versus zooming in)
- the visual positioning, weight and vertical scale are all intended to subtly encourange the user to scroll.
{{/markdown}}


MCTTappingStepViewController
public class MCTTappingStepViewController : MCTActiveStepViewController
The tapping step view controller sets up gesture listeners that are used to track the button taps.
-
Button in the view on the left.
Declaration
Swift
@IBOutlet public var leftButton: UIButton!
-
Button in the view on the right.
Declaration
Swift
@IBOutlet public var rightButton: UIButton!
-
Label for tracking the tapping count.
Declaration
Swift
@IBOutlet public var tappingCountLabel: UILabel!
-
The number formatter to use to format the count for the count label.
Declaration
Swift
lazy open var countFormatter: NumberFormatter { get set }
-
Override to fire the timer every 100 milliseconds.
Declaration
Swift
public override var timerInterval: TimeInterval { get }
-
Override viewDidLoad to setup the touch actions in case they aren’t in the nib.
Declaration
Swift
override public func viewDidLoad()
-
Override update unit label text to do nothing because the unit label doesn’t change after it is set.
Declaration
Swift
override open func updateUnitLabelText()
-
Override view will appear to set the unit label text.
Declaration
Swift
override public func viewWillAppear(_ animated: Bool)
-
Override view did appear to set up the button rects.
Declaration
Swift
override public func viewDidAppear(_ animated: Bool)
-
Override the timer to check if finished.
Declaration
Swift
override public func timerFired()
-
Override to return the instruction with the formatted text replaced.
Declaration
Swift
override public func spokenInstruction(at duration: TimeInterval) -> String?
-
Listen to the gesture recognizer should receive method and always return false.
Declaration
Swift
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool


Features for Release VPP 18.04¶
This section lists those features that became available in VPP Release 18.04. There is a summary graphic that identifies what areas the features are associated with, followed by a list of all the features for this release:
Infrastructure¶
- DPDK 18.02.1
- ARM aarch64 integrated into CI
VNET & Plugins¶
- ERSPAN
- L3DSR load balancing support
- VPC bonding / LACP
- IPv4/IPv6 packet reassembly
- IPv6 link-local support
- Asymmetrical static NAT
- 464XLAT for NAT44
- MAP-T CE support
- Intel Adaptive Virtual Function native device driver plugin
- Marvell device plugin
- SRv6 static, dynamic and masquerading proxy plugins
- MPLS Uniform mode
- IGMP plugin
- IPIP tunnel support (IPv4/IPv6 over IPv4/IPv6)
- IPv6 Router Discovery mechanism
VLIB¶
- ARM-optimized library variations for key functions
- Better handling of physmem on non-NUMA kernels
Host stack¶
- TLS support via OpenSSL or mbedtls software engines
- Session layer can utilize both shm and memfd (secure) FIFO segments
- STCP
- VCL logging / tracing
API framework¶
- New API definition compiler (vppapigen)
- Memory (shm) and socket APIs refactored
- API handlers refactored to make them transport (shared memory or socket) agnostic
- Improved support for bootstrapping of the shm API with memfd segments over the socket API


R
Rensselaer Polytechnic Institute (RPI)
Master of Computer and Systems Engineering
GPA: 3.7/4.0
Courses:
Digital Image Processing, Machine Learning from Data, Introduction to Graphical Models, Pattern Recognition, Deep Learning, Computer Vision
Troy, NY
Aug 2016 ~ Jan 2018
S
Shanghai Jiao Tong University (SJTU)
Bachelor of Information Engineering
GPA: 3.3/4.3
Shanghai, China
Aug 2012 ~ Jun 2016
FutureWei
Driver State Monitoring System Development
Aug 2018 ~ Now
Multidimensional Computer Vision Laboratory, RPI
Development of a video surveillance system for Airport Checkpoint
May 2017 ~ Aug 2017
Institute of Image Communication and Network Engineering, SJTU
Research Assistant
National Participation in Research Project
Accurate Surveillance Object Detection based on Visual Consistency Constraint
Bachelor’s Thesis: Pedestrian Detection and Tracking Software
May 2015 ~ May 2016
Real-time Face tracking (team project)
Nov 2017 ~ Dec 2017
Mobile Eye Gaze Estimation
Mar 2017 ~ May 2018
Real-time Face Recognition System
Feb 2017 ~ Mar 2017
College Students Innovative Practice Plan, SJTU
Development of a Robot Show System (team leader)
Nov 2013 ~ Nov 2014
Skills I am proficient:
Skills which I just start learning:


Welcome to Conner Bryant's Web Development Portfolio, Follow the links above to find out more about me and see what all I've done!
Here is the logo of my fraternity, Pi Kappa Alpha
Here is a picture of me and my fraternity brothers heads cropped onto the what head of the cast of Jackass
Here is the logo of our school, University of North Alabama. Go Lions!
Welcome to Conner Bryant's Web Development Portfolio, Follow the links above to find out more about me and see what all I've done!


arguments specify the position at
which the next read or write will occur for fileId
.
offset
must be a number (which may be negative) and origin
must be one of the following:
-
start
-
The new access position will be
offset
bytes from the start of the file. -
current
-
The new access position will be
offset
bytes from the current access position; a negativeoffset
moves the access position backwards in the file. -
end
-
The new access position will be
offset
bytes from the end of the file. A negativeoffset
places the access position before the end-of-file, and a positiveoffset
places the access position after the end-of-file.
The origin
argument defaults to start
.
fileId
must have been the return value from a previous call to
open
, or it may be stdin
, stdout
, or stderr
to refer to one
of the standard I/O channels.
This command returns an empty string.
set
set varName ?value?
Returns the value of variable varName
.
If value
is specified, then set the value of varName
to value
,
creating a new variable if one doesn’t already exist, and return
its value.
If varName
contains an open parenthesis and ends with a
close parenthesis, then it refers to an array element: the characters
before the open parenthesis are the name of the array, and the characters
between the parentheses are the index within the array.
Otherwise varName
refers to a scalar variable.
If no procedure is active, then varName
refers to a global
variable.
If a procedure is active, then varName
refers to a parameter
or local variable of the procedure, unless the global
command
has been invoked to declare varName
to be global.
The ::
prefix may also be used to explicitly reference a variable
in the global scope.
setref
setref reference string
Store a new string in reference
, replacing the existing string.
The reference must be a valid reference create with the ref
command.
See GARBAGE COLLECTION for more detail.
signal
Command for signal handling.
See kill
for the different forms which may be used to specify signals.
Commands which return a list of signal names do so using the canonical form:
"SIGINT SIGTERM
".
-
signal handle ?signals ...?
-
If no signals are given, returns a list of all signals which are currently being handled. If signals are specified, these are added to the list of signals currently being handled.
-
signal ignore ?signals ...?
-
If no signals are given, returns a lists all signals which are currently being ignored. If signals are specified, these are added to the list of signals currently being ignored. These signals are still delivered, but are not considered by
catch
-signal
ortry
-signal
. Usesignal
check
to determine which signals have occurred but been ignored. -
signal block ?signals ...?
-
If no signals are given, returns a lists all signals which are currently being blocked. If signals are specified, these are added to the list of signals currently being blocked. These signals are not delivered to the process. This can be useful for signals such as
SIGPIPE
, especially in conjunction withexec
as child processes inherit the parent’s signal disposition. -
signal default ?signals ...?
-
If no signals are given, returns a lists all signals which currently have the default behaviour. If signals are specified, these are added to the list of signals which have the default behaviour.
-
signal check ?-clear? ?signals ...?
-
Returns a list of signals which have been delivered to the process but are ignored. If signals are specified, only that set of signals will be checked, otherwise all signals will be checked. If
-clear
is specified, any signals returned are removed and will not be returned by subsequent calls tosignal
check
unless delivered again. -
signal throw ?signal?
-
Raises the given signal, which defaults to
SIGINT
if not specified. The behaviour is identical to:
kill signal [pid]
Note that signal
handle
and signal
ignore
represent two forms of signal
handling. signal
handle
is used in conjunction with catch
-signal
or try
-signal
to immediately abort execution when the signal is delivered. Alternatively, signal
ignore
is used in conjunction with signal
check
to handle signal synchronously. Consider the
two examples below.
Prevent a processing from taking too long
signal handle SIGALRM
alarm 20
try -signal {
.. possibly long running process ..
alarm 0
} on signal {sig} {
puts stderr "Process took too long"
}
Handle SIGHUP to reconfigure:
signal ignore SIGHUP
while {1} {
... handle configuration/reconfiguration ...
while {[signal check -clear SIGHUP] eq ""} {
... do processing ..
}
# Received SIGHUP, so reconfigure
}
Note: signal handling is currently not supported in child interpreters. In these interpreters, the signal command does not exist.
sleep
sleep seconds
Pauses for the given number of seconds, which may be a floating point value less than one to sleep for less than a second, or an integer to sleep for one or more seconds.
source
source fileName
Read file fileName
and pass the contents to the Tcl interpreter
as a sequence of commands to execute in the normal fashion. The return
value of source
is the return value of the last command executed
from the file. If an error occurs in executing the contents of the
file, then the source
command will return that error.
split
split string ?splitChars?
Returns a list created by splitting string
at each character
that is in the splitChars
argument.
Each element of the result list will consist of the
characters from string
between instances of the
characters in splitChars
.
Empty list elements will be generated if string
contains
adjacent characters in splitChars
, or if the first or last
character of string
is in splitChars
.
If splitChars
is an empty string then each character of
string
becomes a separate element of the result list.
splitChars
defaults to the standard white-space characters.

Iteratively uses info
frame
to create the stack trace. This stack trace is in the
same form as produced by catch
and info
stacktrace
See also stackdump
.
string
string option arg ?arg ...?
Perform one of several string operations, depending on option
.
The legal options (which may be abbreviated) are:
-
string bytelength string
-
Returns the length of the string in bytes. This will return the same value as
string
length
if UTF-8 support is not enabled, or if the string is composed entirely of ASCII characters. See UTF-8 AND UNICODE. -
string byterange string first last
-
Like
string
range
except works on bytes rather than characters. These commands are identical if UTF-8 support is not enabled. -
string cat ?string1 string2 ...?
-
Concatenates the given strings into a single string.
-
string compare ?-nocase? ?-length len? string1 string2
-
Perform a character-by-character comparison of strings
string1
andstring2
in the same way as the C strcmp procedure. Return -1, 0, or 1, depending on whetherstring1
is lexicographically less than, equal to, or greater thanstring2
. If-length
is specified, then only the firstlen
characters are used in the comparison. Iflen
is negative, it is ignored. Performs a case-insensitive comparison if-nocase
is specified. -
string equal ?-nocase? ?-length len? string1 string2
-
Returns 1 if the strings are equal, or 0 otherwise. If
-length
is specified, then only the firstlen
characters are used in the comparison. Iflen
is negative, it is ignored. Performs a case-insensitive comparison if-nocase
is specified. -
string first string1 string2 ?firstIndex?
-
Search
string2
for a sequence of characters that exactly match the characters instring1
. If found, return the index of the first character in the first such match withinstring2
. If not found, return -1. IffirstIndex
is specified, matching will start fromfirstIndex
ofstring1
. -
See STRING AND LIST INDEX SPECIFICATIONS for all allowed forms for
firstIndex
. -
string index string charIndex
-
Returns the
charIndex
th character of the'string
argument. AcharIndex
of 0 corresponds to the first character of the string. IfcharIndex
is less than 0 or greater than or equal to the length of the string then an empty string is returned. -
See STRING AND LIST INDEX SPECIFICATIONS for all allowed forms for
charIndex
. -
string is class ?-strict? string
-
Returns 1 if
string
is a valid member of the specified character class, otherwise returns 0. If-strict
is specified, then an empty string returns 0, otherwise an empty string will return 1 on any class. The following character classes are recognized (the class name can be abbreviated): -
-
alnum
-
Any alphabet or digit character.
-
alpha
-
Any alphabet character.
-
ascii
-
Any character with a value less than 128 (those that are in the 7-bit ascii range).
-
boolean
-
Any of the valid string formats for a boolean value in Tcl (0, false, no, off, 1, true, yes, on)
-
control
-
Any control character.
-
digit
-
Any digit character.
-
double
-
Any of the valid forms for a double in Tcl, with optional surrounding whitespace. In case of under/overflow in the value, 0 is returned.
-
graph
-
Any printing character, except space.
-
integer
-
Any of the valid string formats for an integer value in Tcl, with optional surrounding whitespace.
-
lower
-
Any lower case alphabet character.
-
print
-
Any printing character, including space.
-
punct
-
Any punctuation character.
-
space
-
Any space character.
-
upper
-
Any upper case alphabet character.
-
xdigit
-
Any hexadecimal digit character ([0-9A-Fa-f]).
-
-
Note that string classification does
not
respect UTF-8. See UTF-8 AND UNICODE. -
Note that only
lowercase
boolean values are recognized (Tcl accepts any case). -
string last string1 string2 ?lastIndex?
-
Search
string2
for a sequence of characters that exactly match the characters instring1
. If found, return the index of the first character in the last such match withinstring2
. If there is no match, then return -1. IflastIndex
is specified, only characters up tolastIndex
ofstring2
will be considered in the match. -
See STRING AND LIST INDEX SPECIFICATIONS for all allowed forms for
lastIndex
. -
string length string
-
Returns a decimal string giving the number of characters in
string
. If UTF-8 support is enabled, this may be different than the number of bytes. See UTF-8 AND UNICODE. -
string map ?-nocase? mapping string
-
Replaces substrings in
string
based on the key-value pairs inmapping
, which is a list ofkey value key value ...
as in the form returned byarray
get
. Each instance of a key in the string will be replaced with its corresponding value. If-nocase
is specified, then matching is done without regard to case differences. Both key and value may be multiple characters. Replacement is done in an ordered manner, so the key appearing first in the list will be checked first, and so on.string
is only iterated over once, so earlier key replacements will have no affect for later key matches. For example,
string map {abc 1 ab 2 a 3 1 0} 1abcaababcabababc
-
will return the string
01321221
. -
Note that if an earlier key is a prefix of a later one, it will completely mask the later one. So if the previous example is reordered like this,
string map {1 0 ab 2 a 3 abc 1} 1abcaababcabababc
-
it will return the string
02c322c222c
. -
string match ?-nocase? pattern string
-
See if
pattern
matchesstring
according to STRING MATCHING rules ; return 1 if it does, 0 if it doesn’t. The match is performed in a case-insensitive manner if-nocase
is specified. -
string range string first last
-
Returns a range of consecutive characters from
string
, starting with the character whose index isfirst
and ending with the character whose index islast
. An index of 0 refers to the first character of the string. -
See STRING AND LIST INDEX SPECIFICATIONS for all allowed forms for
first
andlast
. -
If
first
is less than zero then it is treated as if it were zero, and iflast
is greater than or equal to the length of the string then it is treated as if it wereend
. Iffirst
is greater thanlast
then an empty string is returned. -
string repeat string count
-
Returns a new string consisting of
string
repeatedcount
times. -
string replace string first last ?newstring?
-
Removes a range of consecutive characters from
string
, starting with the character whose index isfirst
and ending with the character whose index islast
. Ifnewstring
is specified, then it is placed in the removed character range. Iffirst
is less than zero then it is treated as if it were zero, and iflast
is greater than or equal to the length of the string then it is treated as if it wereend
. Iffirst
is greater thanlast
or the length of the initial string, orlast
is less than 0, then the initial string is returned untouched. -
string reverse string
-
Returns a string that is the same length as
string
but with its characters in the reverse order. -
string tolower string
-
Returns a value equal to
string
except that all upper case letters have been converted to lower case. -
string totitle string
-
Returns a value equal to
string
except that the first character is converted to title case (or upper case if there is no UTF-8 titlecase variant) and all remaining characters have been converted to lower case. -
string toupper string
-
Returns a value equal to
string
except that all lower case letters have been converted to upper case. -
string trim string ?chars?
-
Returns a value equal to
string
except that any leading or trailing characters from the set given bychars
are removed. Ifchars
is not specified then white space is removed (spaces, tabs, newlines, and carriage returns). -
string trimleft string ?chars?
-
Returns a value equal to
string
except that any leading characters from the set given bychars
are removed. Ifchars
is not specified then white space is removed (spaces, tabs, newlines, and carriage returns). -
string trimright string ?chars?
-
Returns a value equal to
string
except that any trailing characters from the set given bychars
are removed. Ifchars
is not specified then white space is removed (spaces, tabs, newlines, and carriage returns). Null characters are always removed.
subst
subst ?-nobackslashes? ?-nocommands? ?-novariables? string
This command performs variable substitutions, command substitutions, and backslash substitutions on its string argument and returns the fully-substituted result. The substitutions are performed in exactly the same way as for Tcl commands. As a result, the string argument is actually substituted twice, once by the Tcl parser in the usual fashion for Tcl commands, and again by the subst command.
If any of the -nobackslashes
, -nocommands
, or -novariables
are
specified, then the corresponding substitutions are not performed.
For example, if -nocommands
is specified, no command substitution
is performed: open and close brackets are treated as ordinary
characters with no special interpretation.
Note: when it performs its substitutions, subst does not give any
special treatment to double quotes or curly braces. For example,
the following script returns xyz {44}
, not xyz \{$a}
.
set a 44
subst {xyz {$a}}
switch
switch ?options? string pattern body ?pattern body ...?
switch ?options? string {pattern body ?pattern body ...?}
The switch
command matches its string argument against each of
the pattern arguments in order. As soon as it finds a pattern that
matches string it evaluates the following body and returns the
result of that evaluation. If the last pattern argument is default
then it matches anything. If no pattern argument matches string and
no default is given, then the switch
command returns an empty string.
If the initial arguments to switch start with - then they are treated
as options. The following options are currently supported:
-
-exact
-
Use exact matching when comparing string to a pattern. This is the default.
-
-glob
-
When matching string to the patterns, use glob-style STRING MATCHING rules.
-
-regexp
-
When matching string to the patterns, use REGULAR EXPRESSIONS rules.
-
-command commandname
-
When matching string to the patterns, use the given command, which must be a single word. The command is invoked as commandname pattern string, or commandname -nocase pattern string and must return 1 if matched, or 0 if not.
-
--
-
Marks the end of options. The argument following this one will be treated as string even if it starts with a
-
.
Two syntaxes are provided for the pattern and body arguments. The
first uses a separate argument for each of the patterns and commands;
this form is convenient if substitutions are desired on some of the
patterns or commands. The second form places all of the patterns
and commands together into a single argument; the argument must
have proper list structure, with the elements of the list being the
patterns and commands. The second form makes it easy to construct
multi-line switch
commands, since the braces around the whole list
make it unnecessary to include a backslash at the end of each line.
Since the pattern arguments are in braces in the second form, no
command or variable substitutions are performed on them; this makes
the behaviour of the second form different than the first form in
some cases.
If a body is specified as -
it means that the body for the next
pattern should also be used as the body for this pattern (if the
next pattern also has a body of -
then the body after that is
used, and so on). This feature makes it possible to share a single
body among several patterns.
Below are some examples of switch
commands:
switch abc a - b {format 1} abc {format 2} default {format 3}
will return 2,
switch -regexp aaab {
^a.*b$ -
b {format 1}
a* {format 2}
default {format 3}
}
will return 1, and
switch xyz {
a -
b {format 1}
a* {format 2}
default {format 3}
}
will return 3.
tailcall
tailcall cmd ?arg...?
The tailcall
command provides an optimised way of invoking a command whilst replacing
the current call frame. This is similar to exec in Bourne Shell.
The following are identical except the first immediately replaces the current call frame.
tailcall a b c
return [uplevel 1 [list a b c]]
tailcall
is useful as a dispatch mechanism:
proc a {cmd args} {
tailcall sub_$cmd {*}$args
}
proc sub_cmd1 ...
proc sub_cmd2 ...
tell
tell fileId
fileId tell
Returns a decimal string giving the current access position in
fileId
.
fileId
must have been the return value from a previous call to
open
, or it may be stdin
, stdout
, or stderr
to refer to one
of the standard I/O channels.
throw
throw code ?msg?
This command throws an exception (return) code along with an optional message.
This command is mostly for convenient usage with try
.
The command throw break
is equivalent to break
.
The command throw 20 message
can be caught with an on 20 ...
clause to try
.
time
time command ?count?
This command will call the Tcl interpreter count
times to execute command
(or once if count
isn’t
specified). It will then return a string of the form
503 microseconds per iteration
which indicates the average amount of time required per iteration, in microseconds.
Time is measured in elapsed time, not CPU time.
timerate
timerate script ?milliseconds?
Evaluates the given script continuously until at least milliseconds
time has elapsed (defaults to 1000)
and returns a dictionary containing performance results. The dictionary contains the following:
-
us_per_iter - average elapsed time (microseconds) per iteration
-
iters_per_sec - estimated number of iterations per second
-
count - number of iterations performed
-
elapsed_us - elapsed time (microseconds)
Note that timerate
attempts to subtract the overhead of timerate
itself in the result, hence
the returned elapsed time will typically be less than the specified run time.
The following is an example result of using timerate:
. timerate {expr {pow(1.5,7)}} 2000
us_per_iter 0.09866879769 iters_per_sec 10134916.2391 count 13046627 elapsed_us 1287295
try
try ?catchopts? tryscript ?on|trap match {?resultvar? ?optsvar?} handlerscript ...? ?finally finalscript?
The try
command is provided as a convenience for exception handling.
This interpeter first evaluates tryscript
under the effect of the catch
options catchopts
(e.g. -signal -noexit --
, see catch
).
It then evaluates the script for the first matching on or trap
handler (there many be zero or more) based on the return code and
errorcode from the try
section. For example a normal JIM_ERR
error will be matched by an on error handler.
Finally, any finalscript
is evaluated.
The result of this command is the result of tryscript
, except
in the case where an exception occurs in a matching on handler
script or the finally script, in which case the result is this
new exception.
For the on
handler, match is a list of return codes either
as names (ok, error, break, etc.) or as integers.
For the trap
handler, match is a list to match against
errorcode. For example, if the errorcode was
{CHILDKILLED 10627 SIGTERM}
, then a match value of {CHILDKILLED}
would match.
If resultvar
and optsvar
are specified, they are set as for
catch
before evaluating the matching handler.
For example:
set f [open input]
try -signal {
process $f
} on {continue break} {} {
error "Unexpected break/continue"
} trap CHILDKILLED {msg opts} {
puts "A child process died"
return {*}$opts $msg
} on error {msg opts} {
puts "Dealing with error"
return {*}$opts $msg
} on signal sig {
puts "Got signal: $sig"
} finally {
$f close
}
If break, continue or error are raised, they are dealt with by the matching
handler. If an error occurred with an errorcode of CHILDKILLED
, the trap
handler will be evaluated as it is specified before the on error handler.
In any case, the file will be closed via the finally clause.
unknown
unknown cmdName ?arg arg …?
This command doesn’t actually exist as part of Tcl, but Tcl will invoke it if it does exist.
If the Tcl interpreter encounters a command name for which there
is not a defined command, then Tcl checks for the existence of
a command named unknown
.
If there is no such command, then the interpreter returns an error.
If the unknown
command exists, then it is invoked with
arguments consisting of the fully-substituted name and arguments
for the original non-existent command.
The unknown
command typically does things like searching
through library directories for a command procedure with the name
cmdName
, or expanding abbreviated command names to full-length,
or automatically executing unknown commands as UNIX sub-processes.
unset
unset ?-nocomplain? ?--? ?name name …?
Remove variables.
Each name
is a variable name, specified in any of the
ways acceptable to the set
command.
If a name
refers to an element of an array, then that
element is removed without affecting the rest of the array.
If a name
consists of an array name with no parenthesized
index, then the entire array is deleted.
The unset
command returns an empty string as result.
An error occurs if any of the variables doesn’t exist, unless -nocomplain is specified. The -- argument may be specified to stop option processing in case the variable name may be -nocomplain.
upcall
upcall command ?args …?
May be used from within a proc defined as local
proc
in order to call
the previous, hidden version of the same command.
If there is no previous definition of the command, an error is returned.
uplevel
uplevel ?level? command ?command …?
All of the command
arguments are concatenated as if they had
been passed to concat
; the result is then evaluated in the
variable context indicated by level
. uplevel
returns
the result of that evaluation. If level
is an integer, then
it gives a distance (up the procedure calling stack) to move before
executing the command. If level
consists of #
followed by
a number then the number gives an absolute level number. If level
is omitted then it defaults to 1
. level
cannot be
defaulted if the first command
argument starts with a digit or #
.
For example, suppose that procedure a was invoked
from top-level, and that it called b, and that b called c.
Suppose that c invokes the uplevel
command. If level
is 1
or #2
or omitted, then the command will be executed
in the variable context of b. If level
is 2
or #1
then the command will be executed in the variable context of a.
If level
is 3 or #0
then the command will be executed
at top-level (only global variables will be visible).
The uplevel
command causes the invoking procedure to disappear
from the procedure calling stack while the command is being executed.
In the above example, suppose c invokes the command
uplevel 1 {set x 43; d}
where d is another Tcl procedure. The set
command will
modify the variable x in b’s context, and 'd will execute
at level 3, as if called from b. If it in turn executes
the command
uplevel {set x 42}
upvar
upvar ?level? otherVar myVar ?otherVar myVar …?
This command arranges for one or more local variables in the current procedure to refer to variables in an enclosing procedure call or to global variables.
level
may have any of the forms permitted for the uplevel
command, and may be omitted if the first letter of the first otherVar
isn’t #
or a digit (it defaults to 1).
For each otherVar
argument, upvar
makes the variable
by that name in the procedure frame given by level
(or at
global level, if level
is #0
) accessible
in the current procedure by the name given in the corresponding
myVar
argument.
The variable named by otherVar
need not exist at the time of the
call; it will be created the first time myVar
is referenced, just like
an ordinary variable.
upvar
may only be invoked from within procedures.
upvar
returns an empty string.
The upvar
command simplifies the implementation of call-by-name
procedure calling and also makes it easier to build new control constructs
as Tcl procedures.
For example, consider the following procedure:
proc add2 name {
upvar $name x
set x [expr $x+2]
}
wait
wait
wait -nohang pid
With no arguments, cleans up any processes started by exec
... &
that have completed
(reaps zombie processes).
With one or two arguments, waits for a process by id, either returned by exec
... &
or by os.fork
(if supported).
Waits for the process to complete, unless -nohang
is specified, in which case returns
immediately if the process is still running.
Returns a list of 3 elements.
{NONE x x}
if the process does not exist or has already been waited for, or
if -nohang is specified, and the process is still alive.
{CHILDSTATUS <pid> <exit-status>}
if the process exited normally.
{CHILDKILLED <pid> <signal>}
if the process terminated on a signal.
{CHILDSUSP <pid> none}
if the process terminated for some other reason.
Note that on platforms supporting waitpid(2), pid
can also be given special values such
as 0 or -1. See waitpid(2) for more detail.
while
while test body
The while
command evaluates test
as an expression
(in the same way that expr
evaluates its argument).
The value of the expression must be numeric; if it is non-zero
then body
is executed by passing it to the Tcl interpreter.
Once body
has been executed then test
is evaluated
again, and the process repeats until eventually test
evaluates to a zero numeric value. continue
commands may be executed inside body
to terminate the current
iteration of the loop, and break
commands may be executed inside body
to cause immediate
termination of the while
command.
The while
command always returns an empty string.
xtrace
xtrace command
Install an execution trace callback command. This is useful for implementing a debugger or tracing tool. On each command invocation, the given command is invoked as:
command proc|cmd filename line result command arglist
proc
or cmd
indicates whether a command or a proc body is being executed.
filename
and line
indicate the location where the command was invoked.
result
is the current interpreter result (from the previous command).
command
and arglist
indicate the command being executed.
While the callback is executing, any further execution traces are temporarily disabled.
If the callback returns JIM_OK
or JIM_RETURN
, the execution trace is reinstalled. Otherwise
the execution trace is removed.
If xtrace
is called with an empty argument (""), any existing callback is removed.
OPTIONAL-EXTENSIONS
The following extensions may or may not be available depending upon what options were selected when Jim Tcl was built.
posix: os.fork, os.gethostname, os.getids, os.uptime
-
os.fork
-
Invokes fork(2) and returns the result.
-
os.gethostname
-
Invokes gethostname(3) and returns the result.
-
os.getids
-
Returns the various user/group ids for the current process.
. os.getids
uid 1000 euid 1000 gid 100 egid 100
-
os.uptime
-
Returns the number of seconds since system boot. See description of uptime in sysinfo(2).
ANSI I/O (aio) and EVENTLOOP API
Jim provides an alternative object-based API for I/O.
aio
-
$handle accept ?addrvar?
-
Server socket only: Accept a connection and return stream. If
addrvar
is specified, the address of the connected client is stored in the named variable in the form addr:port for IP sockets or path for Unix domain sockets. Seesocket
for details. -
$handle buffering none|line|full
-
Sets the buffering mode of the stream.
-
$handle close ?r(ead)|w(rite)|-nodelete?
-
Closes the stream. The
read
andwrite
arguments perform a "half-close" on a socket. See the shutdown(2) man page. The-nodelete
option is applicable only for Unix domain sockets. It closes the socket but does not delete the bound path (e.g. afteros.fork
). -
$handle copyto tofd ?size?
-
Copy bytes to the file descriptor
tofd
. Ifsize
is specified, at most that many bytes will be copied. Otherwise copying continues until the end of the input file. Returns the number of bytes actually copied. -
$handle eof
-
Returns 1 if stream is at eof
-
$handle filename
-
Returns the original filename associated with the handle. Handles returned by
socket
provide different information. Seesocket
for each socket type. -
$handle flush
-
Flush the stream
-
$handle gets ?var?
-
Read one line and return it or store it in the var
-
$handle isatty
-
Returns 1 if the stream is a tty device.
-
$handle lock ?-wait?
-
Apply a POSIX lock to the open file associated with the handle using fcntl(F_SETLK), or fcntl(F_SETLKW) to wait for the lock to be available if
-wait
is specified. The handle must be open for write access. Returns 1 if the lock was successfully obtained, 0 otherwise. An error occurs if the handle is not suitable for locking (e.g. if it is not open for write) -
$handle ndelay ?0|1?
-
Set O_NDELAY (if arg). Returns current/new setting. Note that in general ANSI I/O interacts badly with non-blocking I/O. Use with care.
-
$handle peername
-
Returns the remote address or path of the connected socket. See getpeername(2).
-
$handle puts ?-nonewline? str
-
Write the string, with newline unless -nonewline
-
$handle read ?-nonewline|-pending|len?'
-
Read and return bytes from the stream. To eof if no len. See
read
. -
$handle recvfrom maxlen ?addrvar?
-
Receives a message from the handle via recvfrom(2) and returns it. At most
maxlen
bytes are read. Ifaddrvar
is specified, the sending address of the message is stored in the named variable in the form addr:port for IP sockets or path for Unix domain sockets. Seesocket
for details. -
$handle seek offset ?start|current|end?
-
Seeks in the stream (default current)
-
$handle sendto str ?address
-
Sends the string,
str
, to the given address (host:port or path) via the socket using sendto(2). This is intended for udp/dgram sockets and may give an error or behave in unintended ways for other handle types. Returns the number of bytes written. -
$handle sockname
-
Returns the bound address or path of the socket. See getsockname(2).
-
$handle stat ?varName?
-
Implements the same functionality as
file
stat
for a filehandle. Only available on platforms that support fstat(2) or equivalent. -
$handle sockopt ?name value?
-
With no arguments, returns a dictionary of socket options currently set for the handle (will be empty for a non-socket). With
name
andvalue
, sets the socket option to the given value. Currently supports the following boolean socket options:broadcast, debug, keepalive, nosigpipe, oobinline, tcp_nodelay
, and the following integer socket options:sndbuf, rcvbuf
-
$handle sync
-
Flush the stream, then fsync(2) to commit any changes to storage. Only available on platforms that support fsync(2).
-
$handle tell
-
Returns the current seek position
-
$handle tty ?settings?
-
If no arguments are given, returns a dictionary containing the tty settings for the stream. If arguments are given, they must either be a dictionary, or
setting value ...
Abbreviations are supported for both settings and values, so the following is acceptable:$f tty parity e input c out raw
. Only available on platforms that support termios(3). Supported settings are:-
baud rate
-
Baud rate. e.g. 115200
-
data 5|6|7|8
-
Number of data bits
-
stop 1|2
-
Number of stop bits
-
parity even|odd|none
-
Parity setting
-
handshake xonxoff|rtscts|none
-
Handshaking type
-
input raw|cooked
-
Input character processing. In raw mode, the usual key sequences such as ^C do not generate signals.
-
output raw|cooked
-
Output character processing. Typically CR → CRNL is disabled in raw mode.
-
echo 0|1
-
Disable or enable echo on input. Note that this is a set-only value. Setting
input
toraw
orcooked
will overwrite this setting. -
vmin numchars
-
Minimum number of characters to read.
-
vtime time
-
Timeout for noncanonical read (units of 0.1 seconds)
-
-
$handle ssl ?-server cert ?key?|-sni servername?
-
Upgrades the stream to a SSL/TLS session and returns the handle. If
-server
is specified, either both the certificate and private key files must be specified, or a single file must be specified containing both. If-server
is not specified, the connection is a client connection. In this case-sni
may be specified if required to set the Server Name Indication. -
$handle unlock
-
Release a POSIX lock previously acquired by
aio
lock
. -
$handle verify
-
Verifies the certificate of a SSL/TLS stream peer
-
load_ssl_certs dir
-
Loads SSL/TLS CA certificates for use during verification
fconfigure
-
fconfigure handle ?-blocking 0|1? ?-buffering noneline|full? ?-translation mode?
-
For compatibility with Tcl, a limited form of the
fconfigure
command is supported.-
fconfigure
... -blocking
maps toaio
ndelay
-
fconfigure
... -buffering
maps toaio
buffering
-
fconfigure
... -translation
is accepted but ignored
-
eventloop: after, vwait, update
The following commands allow a script to be invoked when the given condition occurs. If no script is given, returns the current script. If the given script is the empty, the handler is removed.
-
$handle readable ?readable-script?
-
Sets or returns the script for when the socket is readable.
-
$handle writable ?writable-script?
-
Sets or returns the script for when the socket is writable.
-
$handle onexception ?exception-script?
-
Sets or returns the script for when oob data received.
For compatibility with Tcl, these may be prefixed with fileevent
. e.g.
-
fileevent $handle readable ...
Time-based execution is also available via the eventloop API.
-
after ms
-
Sleeps for the given number of milliseconds. No events are processed during this time.
-
after ms|idle script ?script ...?
-
The scripts are concatenated and executed after the given number of milliseconds have elapsed. If idle is specified, the script will run the next time the event loop is processed with
vwait
orupdate
. The script is only run once and then removed. Returns an event id. -
after cancel id|command
-
Cancels an
after
event with the given event id or matching command (script). Returns the number of milliseconds remaining until the event would have fired. Returns the empty string if no matching event is found. -
after info ?id?
-
If
id
is not given, returns a list of currentafter
events. Ifid
is given, returns a list containing the associated script and either timer or idle to indicated the type of the event. An error occurs ifid
does not match an event. -
vwait ?-signal? variable
-
A call to
vwait
enters the eventloop.vwait
processes events until the named (global) variable changes or all event handlers are removed. The variable need not exist beforehand. If there are no event handlers defined,vwait
returns immediately. If-signal
is specified,vwait
will also quit if a handled signal occurs. In this case,signal
check -clear
can be used to check for the signal that occurred. -
update ?idletasks?
-
A call to
update
enters the eventloop to process expired events, but no new events. If idletasks is specified, only expired time events are handled, not file events. Returns once handlers have been run for all expired events.
Scripts are executed at the global scope. If an error occurs during a handler script,
an attempt is made to call (the user-defined command) bgerror
with the details of the error.
If the bgerror
command does not exist, the error message details are printed to stderr instead.
If a file event handler script generates an error, the handler is automatically removed to prevent infinite errors. (A time event handler is always removed after execution).
-
bgerror msg
-
Called when an event handler script generates an error. Note that the normal command resolution rules are used for bgerror. First the name is resolved in the current namespace, then in the global scope.
socket
Various socket types may be created.
-
socket unix path
-
A unix domain socket client connected to path filename returns
path
-
socket unix.server path
-
A unix domain socket server listening on path filename returns
path
-
socket unix.dgram ?path?
-
A unix domain socket datagram client, optionally connected to path filename returns
path
if provided or "dgram" if not -
socket unix.dgram.server path
-
A unix domain socket datagram server server listening on path filename returns
path
-
socket ?-async? ?-ipv6? stream addr:port
-
A TCP socket client. (See the forms for
addr
below) filename returnsaddr:port
-
socket ?-async? ?-ipv6? stream.server ?addr:?port
-
A TCP socket server (
addr
defaults to<IP_ADDRESS>
for IPv4 or[::]
for IPv6). filename returnsaddr:port
-
socket ?-async? ?-ipv6? dgram ?addr:port?
-
A UDP socket client. If the address is not specified, the client socket will be unbound and sendto must be used to indicated the destination. filename returns
addr:port
if provided or "dgram" if not -
socket ?-async? ?-ipv6? dgram.server addr:port
-
A UDP socket server. filename returns
addr:port
-
socket pipe
-
A synonym for
pipe
filename returns "pipe" -
socket pair
-
A socketpair (see socketpair(2)). Like
pipe
, this command returns a list of two channels: {s1 s2}. These channels are both readable and writable. filename returns "pair" -
socket pty
-
A pseudo-tty pair (see openpty(3)). Like
pipe
, this command returns a list of two channels: {primary replica}. These channels are both readable and writable. filename for both handles returns the replica filename.
This command creates a socket connected (client) or bound (server) to the given address.
The returned value is channel and may generally be used with the various file I/O commands (gets, puts, read, etc.), either as object-based syntax or Tcl-compatible syntax.
. set f [socket stream www.google.com:80]
aio.sockstream1
. $f puts -nonewline "GET / HTTP/1.0\r\n\r\n"
. $f gets
HTTP/1.0 302 Found
. $f close
Server sockets, however support only accept, which is most useful in conjunction with the EVENTLOOP API.
set f [socket stream.server 80]
$f readable {
set client [$f accept]
$client gets $buf
...
$client puts -nonewline "HTTP/1.1 404 Not found\r\n"
$client close
}
vwait done
The address, addr
, can be given in one of the following forms:
-
For IPv4 socket types, an IPv4 address such as <IP_ADDRESS>
-
For IPv6 socket types, an IPv6 address such as [fe80::1234] or [::]
-
A hostname
Note that on many systems, listening on an IPv6 address such as [::] will also accept requests via IPv4.
Where a hostname is specified, the first
returned address is used
which matches the socket type is used.
An unconnected dgram socket (either dgram or unix.dgram) must use
sendto
to specify the destination address.
The path for Unix domain sockets is automatically removed when the socket
is closed. Use close
-nodelete
in the rare case where this behaviour
should be avoided (e.g. after os.fork
).
If -async
is specified, the socket is opened in non-blocking (ndelay) mode
and connect is non-blocking (applies to stream). In this case, a writable handler
should be used that will fire when the connect succeeds or fails, and calling peername on the handle
will succeed if connected or fail if connect failed. Typical usage is as follows:
set s [socket -async stream host:port]
$s writable {
# Remove writable either way
$s writable {}
try {
$s peername
} on error msg {
# Connect failed
incr done
return
}
$s readable {
set buf [$s read]
if {[$s eof]} {
# Closed connection
incr done
}
...
}
}
vwait done
syslog
syslog ?options? ?priority? message
This command sends message to system syslog facility with given priority. Valid priorities are:
emerg, alert, crit, err, error, warning, notice, info, debug
If a message is specified, but no priority is specified, then a priority of info is used.
By default, facility user is used and the value of global tcl variable argv0 is used as ident string. However, any of the following options may be specified before priority to control these parameters:
-
-facility value
-
Use specified facility instead of user. The following values for facility are recognized:
authpriv, cron, daemon, kernel, lpr, mail, news, syslog, user, uucp, local0-local7
-
-ident string
-
Use given string instead of argv0 variable for ident string.
-
-options integer
-
Set syslog options such as
LOG_CONS
,LOG_NDELAY
. You should use numeric values of those from your system syslog.h file, because I haven’t got time to implement yet another hash table.
pack: pack, unpack
The optional pack extension provides commands to encode and decode binary strings.
-
pack varName value -intle|-intbe|-floatle|-floatbe|-str bitwidth ?bitoffset?
-
Packs the binary representation of
value
into the variablevarName
. The value is packed according to the given type (integer/floating point/string, big-endian/little-endian), width and bit offset. The variable is created if necessary (likeappend
). The variable is expanded if necessary. -
unpack binvalue -intbe|-intle|-uintbe|-uintle|-floatbe|-floatle|-str bitpos bitwidth
-
Unpacks bits from
binvalue
at bit positionbitpos
and withbitwidth
. Interprets the value according to the type (integer/floating point/string, big-endian/little-endian and signed/unsigned) and returns it. For integer types,bitwidth
may be up to the size of a Jim Tcl integer (typically 64 bits). For floating point types,bitwidth
may be 32 bits (for single precision numbers) or 64 bits (for double precision). For the string type, both the width and the offset must be on a byte boundary (multiple of 8). Attempting to access outside the length of the value will return 0 for integer types, 0.0 for floating point types or the empty string for the string type.
zlib
The optional zlib extension provides a Tcl-compatible subset of the zlib
command.
-
crc32 data ?startValue?
-
Returns the CRC32 checksum of a buffer. Optionally, an initial value may be specified; this is most useful for calculating the checksum of chunked data read from a stream (for instance, a pipe).
-
deflate string ?level?
-
Compresses a buffer and outputs a raw, Deflate-compressed stream. Optionally, a compression level (1-9) may be specified to choose the desired speed vs. compression rate ratio.
-
inflate data ?bufferSize?
-
Decompresses a raw, Deflate-compressed stream. When the uncompressed data size is known and specified, memory allocation is more efficient. Otherwise, decompression is chunked and therefore slower.
-
gzip string ?-level level?
-
Compresses a buffer and adds a gzip header.
-
gunzip data ?-buffersize size?
-
Decompresses a gzip-compressed buffer. Decompression is chunked, with a default, small buffer size of 64K which guarantees lower memory footprint at the cost of speed. It is recommended to use a bigger size, on systems without a severe memory constraint.
binary
The optional, pure-Tcl binary extension provides the Tcl-compatible binary
scan
and binary
format
commands based on the low-level pack
and unpack
commands.
See the Tcl documentation at: http://www.tcl.tk/man/tcl8.5/TclCmd/binary.htm
Note that binary format with f/r/R specifiers (single-precision float) uses the value of Infinity in case of overflow.
oo: class, super
The optional, pure-Tcl oo extension provides object-oriented (OO) support for Jim Tcl.
See the online documentation (http://jim.tcl.tk/index.html/doc/www/www/documentation/oo/) for more details.
-
class classname ?baseclasses? classvars
-
Create a new class,
classname
, with the given dictionary (classvars
) as class variables. These are the initial variables which all newly created objects of this class are initialised with. If a list of baseclasses is given, methods and instance variables are inherited. -
super method ?args ...?
-
From within a method, invokes the given method on the base class. Note that this will only call the last baseclass given.
tree
The optional, pure-Tcl tree extension implements an OO, general purpose tree structure similar to that provided by tcllib ::struct::tree (http://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/struct/struct_tree.html)
A tree is a collection of nodes, where each node (except the root node) has a single parent and zero or more child nodes (ordered), as well as zero or more attribute/value pairs.
-
tree
-
Creates and returns a new tree object with a single node named "root". All operations on the tree are invoked through this object.
-
$tree destroy
-
Destroy the tree and all it’s nodes. (Note that the tree will also be automatically garbage collected once it goes out of scope).
-
$tree set nodename key value
-
Set the value for the given attribute key.
-
$tree lappend nodename key value ...
-
Append to the (list) value(s) for the given attribute key, or set if not yet set.
-
$tree keyexists nodename key
-
Returns 1 if the given attribute key exists.
-
$tree get nodename key
-
Returns the value associated with the given attribute key.
-
$tree getall nodename
-
Returns the entire attribute dictionary associated with the given key.
-
$tree depth nodename
-
Returns the depth of the given node. The depth of "root" is 0.
-
$tree parent nodename
-
Returns the node name of the parent node, or "" for the root node.
-
$tree numchildren nodename
-
Returns the number of child nodes.
-
$tree children nodename
-
Returns a list of the child nodes.
-
$tree next nodename
-
Returns the next sibling node, or "" if none.
-
$tree insert nodename ?index?
-
Add a new child node to the given node. The index is a list index such as
3
orend-2
. The default index isend
. Returns the name of the newly added node. -
$tree walk nodename dfs|bfs {actionvar nodevar} script
-
Walks the tree starting from the given node, either breadth first (
bfs
) depth first (dfs
). The value"enter"
or"exit"
is stored in variableactionvar
. The name of each node is stored innodevar
. The script is evaluated twice for each node, on entry and exit. -
$tree dump
-
Dumps the tree contents to stdout
tcl::prefix
The optional tclprefix extension provides the Tcl8.6-compatible tcl::prefix
command
(http://www.tcl.tk/man/tcl8.6/TclCmd/prefix.htm) for matching strings against a table
of possible values (typically commands or options).
-
tcl::prefix all table string
-
Returns a list of all elements in
table
that begin with the prefixstring
. -
tcl::prefix longest table string
-
Returns the longest common prefix of all elements in
table
that begin with the prefixstring
. -
tcl::prefix match ?options? table string
-
If
string
equals one element intable
or is a prefix to exactly one element, the matched element is returned. If not, the result depends on the-error
option.-
-exact
Accept only exact matches. -
-message string
Usestring
in the error message at a mismatch. Default is "option". -
-error options
The options are used when no match is found. Ifoptions
is empty, no error is generated and an empty string is returned. Otherwise the options are used as return options when generating the error message. The default corresponds to setting-level 0
.
-
tcl::autocomplete
Scriptable command line completion is supported in the interactive shell, jimsh, through
the tcl::autocomplete
callback. A simple implementation is provided, however this may
be replaced with a custom command instead if desired.
In the interactive shell, press <TAB> to activate command line completion.
-
tcl::autocomplete commandline
-
This command is called with the current command line when the user presses <TAB>. The command should return a list of all possible command lines that match the current command line. For example if
pr
is the current command line, the list{prefix proc}
may be returned.
history
The optional history extension provides script access to the command line editing
and history support available in jimsh. See examples/jtclsh.tcl for an example.
Note: if line editing support is not available, history
getline
acts like gets
and
the remaining subcommands do nothing.
-
history load filename
-
Load history from a (text) file. If the file does not exist or is not readable, it is ignored.
-
history getline prompt ?varname?
-
Displays the given prompt and allows a line to be entered. Similarly to
gets
, ifvarname
is given, it receives the line and the length of the line is returned, or -1 on EOF. Ifvarname
is not given, the line is returned directly. -
history completion command
-
Sets an autocompletion command (see
tcl::autocomplete
) that is active duringhistory
getline
. If the command is empty, autocompletion is disabled. -
history add line
-
Adds the given line to the history buffer.
-
history keep ?count?
-
Set or return the maximum history size. Defaults to 100.
-
history save filename
-
Saves the current history buffer to the given file.
-
history show
-
Displays the current history buffer to standard output.
namespace
Provides namespace-related functions. See also: http://www.tcl.tk/man/tcl8.6/TclCmd/namespace.htm
-
namespace code script
-
Captures the current namespace context for later execution of the script
script
. It returns a new script in which script has been wrapped in anamespace inscope
command. -
namespace current
-
Returns the fully-qualified name for the current namespace.
-
namespace delete ?namespace …?
-
Deletes all commands and variables with the given namespace prefixes.
-
namespace ensemble create'
-
Creates an ensemble command for the current namespace (requires the ensemble extension').
-
namespace eval namespace arg ?arg…?
-
Activates a namespace called
namespace
and evaluates some code in that context. -
namespace origin command
-
Returns the fully-qualified name of the original command to which the imported command
command
refers. -
namespace parent ?namespace?
-
Returns the fully-qualified name of the parent namespace for namespace
namespace
, if given, otherwise for the current namespace. -
namespace qualifiers string
-
Returns any leading namespace qualifiers for
string
-
namespace tail string
-
Returns the simple name at the end of a qualified string.
-
namespace upvar namespace ?arg…?
-
This command arranges for zero or more local variables in the current procedure to refer to variables in
namespace
-
namespace which ?-command|-variable? name
-
Looks up
name
as either a command (the default) or variable and returns its fully-qualified name.
interp
The optional interp command allows sub-interpreters to be created where commands may be run independently (but synchronously) of the main interpreter.
-
interp
-
Creates and returns a new interpreter object (command). The created interpreter contains any built-in commands along with static extensions, but does not include any dynamically loaded commands (package require, load). These must be reloaded in the child interpreter if required.
-
$interp delete
-
Deletes the interpreter object.
-
$interp eval script …
-
Evaluates a script in the context for the child interpreter, in the same way as eval.
-
$interp alias alias childcmd parentcmd ?arg …?
-
Similar to alias, but creates a command,
childcmd
, in the child interpreter that is an alias forparentcmd
in the parent interpreter, with the given, fixed arguments. The alias may be deleted in the child with rename.
json::encode
The Tcl → JSON encoder is part of the optional json package.
-
json::encode value ?schema?
-
Encode a Tcl value as JSON according to the schema (defaults to
str
). The following schema types are supported:-
str - Tcl string → JSON string
-
num - Tcl value → bare numeric value or null
-
bool - Tcl boolean value → true, false
-
obj ?name subschema …? - Tcl dict → JSON object. For each dict key matching name, the corresponding subschema is applied. The special name
*
matches any keys not otherwise matched, otherwise the defaultstr
is used. -
list ?subschema? - Tcl list → JSON array. The subschema (default
str
) is applied for each element of the list/array. -
mixed ?subschema …? = Tcl list → JSON array. Each subschema is applied for the corresponding element of the list/array.
-
-
The following are examples:
. json::encode {1 2 true false null 5.0} list
[ "1", "2", "true", "false", "null", "5.0" ]
. json::encode {1 2 true false null 5.0} {list num}
[ 1, 2, true, false, null, 5.0 ]
. json::encode {0 1 2 true false 5.0 off} {list bool}
[ false, true, true, true, false, true, false ]
. json::encode {a 1 b hello c {3 4}} obj
{ "a":"1", "b":"hello", "c":"3 4" }
. json::encode {a 1 b hello c {3 4}} {obj a num c {list num}}
{ "a":1, "b":"hello", "c":[ 3, 4 ] }
. json::encode {true true {abc def}} {mixed str num obj}
[ "true", true, { "abc":"def" } ]
. json::encode {a 1 b 3.0 c hello d null} {obj c str * num}
{ "a":1, "b":3.0, "c":"hello", "d":null }
json::decode
The JSON → Tcl decoder is part of the optional json package.
-
json::decode ?-index? ?-null string? ?-schema? json-string
-
Decodes the given JSON string (must be array or object) into a Tcl data structure. If
-index
is specified, decodes JSON arrays as dictionaries with numeric keys. This makes it possible to retrieve data from nested arrays and dictionaries with justdict get
. With the option-schema
returns a list of{data schema}
where the schema is compatible withjson::encode
. Otherwise just returns the data. Decoding is as follows (with schema types listed in parentheses):-
object → dict (obj)
-
array → list (mixed or list)
-
number → as-is (num)
-
boolean → as-is (bool)
-
string → string (str)
-
null → supplied null string or the default
"null"
(num)
-
-
Note that an object decoded into a dict will return the keys in the same order as the original string.
. json::decode {[1, 2]}
{1 2}
. json::decode -schema {[1, 2]}
{1 2} {list num}
. json::decode -schema {{"a":1, "b":2}}
{a 1 b 2} {obj a num b num}
. json::decode -schema {[1, 2, {a:"b", c:false}, "hello"]}
{1 2 {a b c false} hello} {mixed num num {obj a str c bool} str}
. json::decode -index {["foo", "bar"]}
{0 foo 1 bar}
BUILT-IN VARIABLES
The following global variables are created automatically by the Tcl library.
-
env
-
This variable is set by Jim as an array whose elements are the environment variables for the process. Reading an element will return the value of the corresponding environment variable. This array is initialised at startup from the
env
command. It may be modified and will affect the environment passed to commands invoked withexec
. -
platform_tcl
-
This variable is set by Jim as an array containing information about the platform on which Jim was built. Currently this includes os and platform.
-
auto_path
-
This variable contains a list of paths to search for packages. It defaults to a location based on where jim is installed (e.g.
/usr/local/lib/jim
), but may be changed byjimsh
or the embedding application. Note thatjimsh
will consider the environment variable$JIMLIB
to be a list of colon-separated list of paths to add toauto_path
. -
errorCode
-
This variable holds the value of the -errorcode return option set by the most recent error that occurred in this interpreter. This list value represents additional information about the error in a form that is easy to process with programs. The first element of the list identifies a general class of errors, and determines the format of the rest of the list. The following formats for -errorcode return options are used by the Tcl core; individual applications may define additional formats. Currently only
exec
sets this variable. Otherwise it will beNONE
.
The following global variables are set by jimsh.
-
tcl_interactive
-
This variable is set to 1 if jimsh is started in interactive mode or 0 otherwise.
-
tcl_platform
-
This variable is set by Jim as an array containing information about the platform upon which Jim was built. The following is an example of the contents of this array.
tcl_platform(byteOrder) = littleEndian
tcl_platform(engine) = Jim
tcl_platform(os) = Darwin
tcl_platform(platform) = unix
tcl_platform(pointerSize) = 8
tcl_platform(threaded) = 0
tcl_platform(wordSize) = 8
tcl_platform(pathSeparator) = :
-
argv0
-
If jimsh is invoked to run a script, this variable contains the name of the script.
-
argv
-
If jimsh is invoked to run a script, this variable contains a list of any arguments supplied to the script.
-
argc
-
If jimsh is invoked to run a script, this variable contains the number of arguments supplied to the script.
-
jim::argv0
-
The value of argv[0] when jimsh was invoked.
The following variables have special meaning to Jim Tcl:
-
jim::defer
-
If this variable is set, it is considered to be a list of scripts to evaluate when the current proc exits (local variables), or the interpreter exits (global variable). See
defer
. -
history::multiline
-
If this variable is set to "1", interactive line editing operates in multiline mode. That is, long lines will wrap across multiple lines rather than scrolling within a single line.
CHANGES IN PREVIOUS RELEASES
In v0.74
In v0.73
-
Built-in regexp now support non-capturing parentheses: (?:…)
-
Add
string
replace
-
Add
string
totitle
-
Add
info
statics
-
Add
build-jim-ext
for easy separate building of loadable modules (extensions) -
local
now works with any command, not just procs -
Add
info
alias
to access the target of an alias -
UTF-8 encoding past the basic multilingual plane (BMP) is supported
-
Add
tcl::prefix
-
Add
history
-
Most extensions are now enabled by default
-
Add support for namespaces and the
namespace
command -
Add
apply
In v0.72
-
procs now allow args and optional parameters in any position
-
Add Tcl-compatible expr functions,
rand()
,srand()
andpow()
-
Add support for the -force option to
file
delete
-
Better diagnostics when
source
fails to load a script with a missing quote or bracket -
New
tcl_platform(pathSeparator)
-
Add support settings the modification time with
file
mtime
-
exec
is now fully supported on win32 (mingw32) -
Line editing is now supported for the win32 console (mingw32)
-
Add
aio
listen
command
In v0.71
-
Allow args to be renamed in procs
-
Add
$(…)
shorthand syntax for expressions -
Add automatic reference variables in procs with
&var
syntax -
Support
jimsh --version
-
Additional variables in
tcl_platform()
-
local
procs now push existing commands andupcall
can call them -
Add
loop
command (TclX compatible) -
Add
aio
buffering
command -
info
complete
can now return the missing character -
binary
format
andbinary
scan
are now (optionally) supported -
Add
string
byterange
-
Built-in regexp now support non-greedy repetition (*?, +?, ??)
In v0.70
-
platform_tcl()
settings are now automatically determined -
Add aio
$handle filename
-
Add
info
channels
-
The bio extension is gone. Now
aio
supports copyto. -
Add
exists
command -
Add the pure-Tcl oo extension
-
The
exec
command now only uses vfork(), not fork() -
Unit test framework is less verbose and more Tcl-compatible
-
Optional UTF-8 support
-
Optional built-in regexp engine for better Tcl compatibility and UTF-8 support
-
Command line editing in interactive mode, e.g. jimsh
In v0.63
-
source
now checks that a script is complete (.i.e. not missing a brace) -
info complete now uses the real parser and so is 100% accurate
-
Better access to live stack frames with info frame,
stacktrace
andstackdump
-
tailcall
no longer loses stack trace information -
lambda
,alias
andcurry
are implemented viatailcall
for efficiency -
local
allows procedures to be deleted automatically at the end of the current procedure -
udp sockets are now supported for both clients and servers.
-
vfork-based exec is now working correctly
-
Add file tempfile
-
Add socket pipe
-
Enhance try … on … finally to be more Tcl 8.6 compatible
-
IPv6 support is now included
-
Add string is
-
Event handlers works better if an error occurs. eof handler has been removed.
-
exec
now sets $::errorCode, and catch sets opts(-errorcode) for exit status -
Command pipelines via open "|…" are now supported
-
pid
can now return pids of a command pipeline -
Add info references
-
Add support for after
'ms
, 'after idle, after info,update
-
exec
now sets environment based on $::env -
Add dict keys
-
Add support for lsort -index
In v0.62
-
Add support to
exec
for >&, >>&, |&, 2>@1 -
Fix
exec
error messages when special token (e.g. >) is the last token -
Fix
subst
handling of backslash escapes. -
Allow abbreviated options for
subst
-
Many
expr
bug fixes -
Add support for functions in
expr
(e.g. int(), abs()), and also in, ni list operations -
The variable name argument to
regsub
is now optional -
Add support for unset -nocomplain
-
Fully-functional
lsearch
is now implemented -
Add info nameofexecutable and info returncodes
-
Allow
catch
to determine what return codes are caught -
Allow
incr
to increment an unset variable by first setting to 0 -
Allow args and optional arguments to the left or required arguments in
proc
-
Add file copy
-
Add try … finally command
LICENCE
Copyright 2005 Salvatore Sanfilippo<EMAIL_ADDRESS>Copyright 2005 Clemens Hintze<EMAIL_ADDRESS>Copyright 2005 patthoyts - Pat Thoyts<EMAIL_ADDRESS>Copyright 2008 oharboe - Oyvind Harboe -<EMAIL_ADDRESS>Copyright 2008 Andrew Lunn<EMAIL_ADDRESS>Copyright 2008 Duane Ellis<EMAIL_ADDRESS>Copyright 2008 Uwe Klein<EMAIL_ADDRESS>Copyright 2009 Steve Bennett<EMAIL_ADDRESS>Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials
provided with the distribution.

The views and conclusions contained in the software and documentation
are those of the authors and should not be interpreted as representing
official policies, either expressed or implied, of the Jim Tcl Project.


{{ partial "head.html" . }}
{{ with .Site.Params.canvasPopKey }}
{{ end }}
{{ partial "sidebar.html" . }} {{ block "main" . }} {{ end }}
{{ partial "scripts.html" . }}


Register
Username
Email address
Password
Confirm Password
Register
Have an account? Sign In
Sign up with Google
Sign up with Facebook


One of the goals of MPI was to allow for layered libraries. In order for a library to do this cleanly, it needs to know if MPI is active. In MPI-1 the function MPI_INITIALIZED was provided to tell if MPI had been initialized. The problem arises in knowing if MPI has been finalized. Once MPI has been finalized it is no longer active and cannot be restarted. A library needs to be able to determine this to act accordingly. To achieve this the following function is needed:
| MPI_FINALIZED(flag) | |
| OUT flag | true if MPI was finalized (logical) |
int MPI_Finalized(int *flag)
MPI_FINALIZED(FLAG, IERROR)
LOGICAL FLAG
INTEGER IERROR
bool MPI::Is_finalized()
This routine returns true if MPI_FINALIZE has completed. It is legal to call MPI_FINALIZED before MPI_INIT and after MPI_FINALIZE.
Advice to users.
MPI is ``active'' and it is thus safe to call MPI functions if
MPI_INIT has completed and MPI_FINALIZE
has not completed. If a library has no other way of knowing whether
MPI is active or not, then it can use MPI_INITIALIZED and
MPI_FINALIZED to determine this. For example, MPI is ``active''
in callback functions that are invoked during MPI_FINALIZE.
( End of advice to users.)


Whoa there! Your screen is kinda narrow, and this may make some of the graphs look funny.
You may want to turn your phone on its side for the best possible experience.
Station Report For {{station}} Station
{%include "lib/progress.html" %}
{%include "lib/progress.html" %}


Please wait while our tweets load...
www.twitter.com/civiguard
Copyright © 2010 CiviGuard, Inc. All rights reserved.


Famous persons who died in 2011
Many gravestones are in this list.
But this list will help remembering the person behind.
Actors
Austrians
Auto*
Reset
Birth Year
Name
Profession
Death Date


--- layout: post esbma_id: 1114 title: Tenets of Transparency date: 2005-02-05 04:04:24 ---
My latest Business of Software column is now available on the MSDN website.


Information Sources
-
https://history.state.gov/milestones/1961-1968/cuban-missile-crisis
-
https://www.loc.gov/exhibits/archives/colc.html
-
https://www.theatlantic.com/magazine/archive/2013/01/the-real-cuban-missile-crisis/309190/
-
https://digitalarchive.wilsoncenter.org/document/111552
Image Sources
-
Missile Site
See Also
More info on CMC and Vasili Arkhipov, the Soviet submarine commander that refused to launch nuclear weapons:
Walter Cronkite:


Creating a graphical editor based on path tracing technology.
Creation of projects such as:
Ray Tracer, Rasterizer, Raycaster engine, Voxel engine.
- Participation in several projects of independent studios.
- Creation of a VR application for the practice of public speaking using data read from neural interfaces.
- Development of a VR platform for laboratory activities in university MEPhI.
Developing OpenGL engine for drawing animations on sport event live streams, using real-time data.
Developing OpenGL ES renderer engine for bim models apartment rendering. Developing googlemaps style walking around engine for apartment, using opengles and openCV.
As a result of the training: the students created games of different genres using Unity.
Gedz Oles —<EMAIL_ADDRESS>—+7(985) 948-98-42


All GitHub statuses on a Pull Request must be passing / green for automatic merge ✓ Your Pull Request must also match one of these GitHub search queries (you can click them to check):


Golazo! Ditches Fouls and Offsides For 2.5D Football Mayhem on PS4 Next Week
Classic 90s FIFA
by Liam CroftGame Profile
Title:
Golazo!
Publisher:
Purple Tree
Developer:
Klabater
PlayStation Network Release Date:
28th Nov 2019 (USA)
28th Nov 2019 (UK/EU)
Where to buy:
Pre Order on Amazon
Are you tired of the microtransaction-filled, randomised nature of FIFA 20's Ultimate Team mode? If you're looking for something a little more light-hearted and simpler, then Golazo! is seemingly something worth checking out. Launching next week on PlayStation 4, you can get a piece of the footballing action in the trailer above.
From the 2.5D perspective, you'll be able to take control of 52 national teams in a twist on the beautiful game which gets rid of fouls and offsides. Compete in the International Cup with power-ups that give you the edge over your opponent, while local multiplayer for up to four friends give you the chance to berate a pal when you go clean through with their best striker.
Our friends over at Nintendo Life reviewed the game upon its Nintendo Switch release a few months back, coining it a "competent love letter to '90s arcade football games, accurately capturing both their strengths and weaknesses." Awarded a 7/10, is this a sporty title you'll be picking up on PS4? Give us your best shot in the comments below.
[via youtube.com]


 Let's introduce another key factor affecting evacuation process, which is the pre-movement time! What is pre-movement time? Pre-movement time is the amount of time it takes for one to evacuate from his or her room. You might be thinking: "What's the point of modelling that?  However, according to literature research as well as surveys conducted of students staying in Cinnamon College, people tend to procrastinate, grab their belongings as well as confirming the validity of the fire before actually evacuating. Thus, pre-movement delay does affect the total evacuation time, and thus our group found it neccessary for you to discover the effects of pre-movement delay on total evacuation time!
There are two controls that help control the delay time of all the minions in the model, which are the two sliders named "initial-delay-mean" and "initial-delay-sd". If you are familiar with statistics, the terms "mean" and "sd" should ring a bell. The delay for all minions is modelled after a normal distribution with mean equal to the value set by "initial-delay-mean" and standard deviation equal to the value set by "initial-delay-sd". If you increase the value of "initial-delay-mean", then the average delay of all minions will increase. If you increase the value of "initial-delay-sd", then the spread of delay times will be greater.
That is all you need to know for the controls! Do play around with the delay controls, and again adjust the control for the number-of-minions to see the significant effect of the change in delay time.
Note: In case you are wondering how does time in the model converts to time in real life, 1 unit of time in the model translates to 5 seconds in real life. Now you can play with realistic delay times! Have fun! :)


HOLY MAN (Touchstone) Directed by Stephen Herek
"Holy Man" commits an unpardonable sin.
It offers up Eddie Murphy in his most endearing characterization in years, then keeps him on the sidelines for what seems like ages. Forget the placement of his name above the title; as he was in the infamous "Best Defense," Murphy should have been billed in this picture as "Strategic Guest Star."
He's also the only conceivable reason for anyone to sit through "Holy Man," an otherwise cardboard comedy which spends far too much of its running time giving us updates on the budding love affair between ambitious TV producer Ricky (Jeff Goldblum, behaving like Woody Allen after a few doses of Ecstacy) and media analyst Kate (Kelly Preston, whose stiff and charmless performance guarantees she'll continue to be identified primarily for her real-life role as Mrs. John Travolta). This will please the dozen or so people nationwide who came to see Goldblum do his standard yammering and yelping and will greatly frustrate the rest of us who'd rather watch Murphy skewer the home-shopping craze.
"Holy Man" takes place in the high-pressure Good Buy Shopping Network, where hard-up celebrities desperately try to unload useless merchandise -- Betty White pitches an aphrodisiac perfume called Clam, James Brown shills for the Soul Survivor System, etc. Ricky's job is on the line after 27 consecutive months of unimpressive sales; Kate is hunting for someone who can give the channel an identity.
Their prayers are answered when the enigmatic, soul-searching wanderer G (Murphy) crashes the studio, letting viewers know the truth about the lousy products GBSN touts; typical of their wares is an in-toilet bidet called Lil' Squirt which dispenses "a refreshing kiss of mist" to the derriere. G quickly becomes "the biggest thing to hit home-shopping since the cubic zirconium," although why customers would purchase any of this junk after G has shown its worthlessness is one of the many questions left unansw ered by Tom Schulman's half-baked screenplay.
There's a terrific movie to be made about home-shopping and the folks addicted to it, but "Holy Man" is not that film. Murphy's interactions with GBSN salespeople like Florence Henderson are truly funny, and his encounter with a terminally vain Morgan Fairchild would be hilarious had we not seen it in the film's commercials.
Unfortunately Schulman decided to make these satiric swipes a subplot, and the Murphy-less scenes with Kate and Ricky seem to drone on interminably.  The only notable directorial touch provided by Stephen Herek is the ending of every third or fourth scene with a long fade to black, which will make programmers happy when "Holy Man" debuts on TV a couple of years from now.
After a serious career lull in the first half of the '90s, Murphy seems unsure of his ability to carry a picture, playing second fiddle to wise-cracking animals in "Doctor Dolittle" and hiding behind special-effects in "The Nutty Professor." His winning performance here suggests it's time to drop that modesty and take control of his projects again. Certainly "Holy Man" would be infinitely easier to sit through if it had larger helpings of its supposed star; how sadly fitting a movie that warns against believing in advertising turns out to have been promoted deceptively. James Sanford
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Galactic Age Calculator
Find out you galactic age!

Mercury:
Venus:
Mars:
Jupiter:


My ambition is to design and build innovative products to alleviate the people's problems. I am currently most interested in design and frontend engineering.
ResumeOver the summer, I mentored high school students to teach them electrical engineering and computer science as they built innovative products such as 3D printed hands, remote control robots, etc. As a junior instructor, my role was to manage students' webpages to perfect technical documentation and help students with computer science/Arduino-related issues.
As a consultant, I worked with two companies: Driver, Inc. and N3twork. For Driver, my team produced product launch recommendations for the company to release their cancer-treatment application to the US and China. For N3twork, my team filtered through the iOS App Store to find mobile games for the company to partner with and I created an internal tool for the company to easily filter for these apps automatically.
As a Mobile Software Engineering Intern, I worked closely with the Mobile Operations team to upgrade their Swift version, perform UI automation tests, and develop a companion WatchOS app from scratch for their flagship iOS application.
(Current Project)
An iOS application to help users fight their addictions through predictive notifications.
An iOS application helping professors actively engage students and tracking attendance efficiently.
A text-based bot that processes individual and group texts via NLU to understand user intents to transfer money via Venmo.
A personal portfolio/website built from scratch with HTML5, CSS3, and JS to showcase design skills.
An iOS application that instantaneously allows you to get the latest trends and find clothing you like.
Prototypes and designs that I created to explore design techniques and tools.


--- layout: default title: "Ed." ---
This editorial project is to digitally edit essays produced by Guatemalan writers Enrique Gomez Carrillo for the Madrid newspaper ABC between 1925-26


I am glad to share the feeling of being a part of the exclusive GSoC club after being selected in the Google Summer of Code program for the second time under Systers. I have been a part of the Systers community for a long time being actively involved in the GSoC’16 program, Google Code-In’16 program and now, working as a student for the Systers Mailman3 project in GSoC’17 .
GNU Mailman3
Mailman, the GNU Mailing List Manager is a free software for managing electronic mail discussion and e-newsletter lists. Mailman is integrated with the web, making it easy for users to manage their accounts and for list owners to administer their lists. Mailman supports built-in archiving, automatic bounce processing, content filtering, digest delivery, spam filters, and more.
The objective of this project is to port the existing features of Systers Mailman2 version to the newer released version of Mailman i.e Mailman 3.1. The features that needs to be ported includes :
- Essay
- Stats for Admins
- Number of subscribers/unsubscribers.
- Number of total unique subject lines.
- Number of subscribers that posted.
I hope I will be able to do justice to the trust that my mentor has shown in me by selecting me for the project. Here’s to a great summer ahead!


Moves one or more directional devices 'down' (e.g. blinds)
Switches one or more switching devices 'off' (e.g. lights, heating, ...)
Switches one or more switching devices 'on' (e.g. lights, heating, ...)
Stops the motion of one or more a directional devices (e.g. blinds)
Moves one or more directional devices 'up' (e.g. blinds)
Steps a directional device (e.g. blinds). The device will alternate
Ends changing the brightness of a dimmer. The device will stop fading its brightness and stick to its current brightness level.
Starts changing the brightness of a dimmer. The device will start slowly fading its brightness (until stopped).
Toggles a switching device (e.g. light). The device will alternate
Steps a directional device (e.g. blinds). The device will alternate
Generated using TypeDoc
A event is a
number
that is part of all DeviceEvent communication events which areThe central device control commands always set devices into a defined state. Hence those are suitable for controlling groups of many devices simultaneously.
The single device control are stateless commands which switch devices into an unknown state. Only use these, if you can observe the outcome (e.g. from a button in the same room) or for triggering events (e.g. for setting a scene, or winding a staircase timer up). If you run these commands on groups of devices, they will be out of sync (i.e. some will switch on, others will switch off).


{{ name }}
Sample
This sample highlights the longest word in the text you have selected in the document.