class: center, middle, inverse, title-slide # Confidence Intervals from a Single Sample ### Sebastian Hoyos-Torres ### 2018-11-15 --- # What we will cover in this lecture: - A brief review of point estimates. - Properties of the sample mean and sample sum of iid random variables. - Definition and basic properties of confidence intervals - Normal confidence intervals with known standard deviation. - Large sample confidence intervals with unknown standard deviation. - T- distribution and confidence intervals. --- # Point Estimates: - What is a point estimate? -- - A point estimate is simply an estimate of a population parameter which is calculated from a sample. - Examples of point estimates include the sample mean or a proportion - Estimators: the estimator is the random variable whose value will always be a point estimate. --- # Random samples - Evaluating the distribution of a statistic calculated from a sample with an arbitrary joint distribution is usually very difficult. - Often, assumptions are made that our data constitute a random sample from a distribution. This means that - All `\(X_i\)`'s are independent. - All `\(X_i\)`'s have the same probability distribution. --- # Properties of Sample Mean and Sample Sum - Remember, if `\(X_1,...,X_n\)` is a random sample from a distribution with mean value `\(\mu\)` and standard deviation `\(\theta\)` then: - `\(E(X) = \mu_{\bar{X}}\)` - `\(V(X) = \sigma^2_x = \sigma^2/n\)` - Let `\(T_n = X_1,+X_2+,...,+X_n\)` be the sample total; then - `\(E(T) = n\mu\)` - `\(V(T_n) = n\sigma^2\)` - **If the Original Distribution of the `\(X_i\)`'s is normal, then the distribution of `\(\bar{X}\)` and `\(T_n\)` is also normal** --- # Why Statisicians are Probably Right: Confidence Intervals - When we speak of confidence intervals, what do we mean? - The formal definition: suppose `\(x_1,x_2,...,x_n\)` is a random sample from a normal population with mean `\(\mu\)` and know standard deviation `\(\sigma\)`. Then : `$$Z = \frac{(\bar{X} - \mu)}{\frac{\sigma}{\sqrt{n}}}$$` has a standard normal distribution. If we define `\(z_a\)` as the 1-a quantile of a standard normal distribution z~N(0,1) so that `\(P(Z>z_a) = \alpha\)`, then we can manipulate A as follows for any a < 0.5. `$$1 - a = P(-z_{a/2}\leq{Z}\leq{z_{a/2}})$$` `$$P(\bar{X} - z_{a/2}*\frac{\sigma}{\sqrt{n}}\leq{\mu}\leq{\bar{X}+ z_{a/2}*\frac{\sigma}{\sqrt{n}}})$$` the `\(z_{a/2}\)`'s are sometimes referred to as critical values. --- --- # Confidence Intervals in R - Example borrowed from Penn State: A random sample of 126 police officers subjected to constant inhalation of automobile exhaust fumes in downtown Cairo had an average blood lead level concentration of 29.2 μg/dl. Assume X, the blood lead level of a randomly selected policeman, is normally distributed with a standard deviation of σ = 7.5 μg/dl. Historically, it is known that the average blood lead level concentration of humans with no exposure to automobile exhaust is 18.2 μg/dl. Is there convincing evidence that policemen exposed to constant auto exhaust have elevated blood lead level concentrations? (Data source: Kamal, Eldamaty, and Faris, "Blood lead level of Cairo traffic policemen," Science of the Total Environment, 105(1991): 165-170.) - How do we incorporate what we've talked about so far into R? --- # Confidence Intervals in R continued: - Lets look at the formula to calculate the upper and lower bounds of the confidence interval. Namely; these parts `$$\bar{X}+z_{a/2}*\frac{\sigma}{\sqrt{n}}$$` `$$\bar{X}-z_{a/2}*\frac{\sigma}{\sqrt{n}}$$` keeping this in mind, let's just create our own function to compute a confidence interval in R. ```r confint <- function(xbar, zstar, sigma, n) { list(upper_bound = xbar + zstar * (sigma/sqrt(n)), lower_bound = xbar - zstar * (sigma/sqrt(n))) } ``` With this function, let's now just work on plugging things in. --- # Confidence Interval in R continued: - Now that we have defined our function in R, doing the computation for the confidence interval gets pretty simple. - First, let's look at the necessary components: - we have a sample of n = 126 - `\(\bar{X}\)` or the sample mean is 29.2 - the standard deviation or `\(\sigma\)` = 7.5 ```r zstar <- qnorm(1 - (0.05/2)) confint(29.2, zstar, 7.5, 126) ``` ``` ## $upper_bound ## [1] 30.50956 ## ## $lower_bound ## [1] 27.89044 ``` - If anyone wants to check, here's the URL to the problem : https://onlinecourses.science.psu.edu/stat414/node/196/ --- # What does this mean? - A lot of well meaning people make the error of saying that the probability that the true mean is between the upper and lower bounds is equivalent to 1-a. So what does a confidence interval really mean? And why is this statement wrong? -- - A confidence interval indicates that we'd expect 1-a of the intervals to be correct and to contain the unknown value `\(\mu\)`. Since we'll almost never know the true population mean, we settle for intervals and say we are 95 percent confident that 95 percent of the intervals generated would be correct. - In practice, we often take 1 random sample from the population so all we can really say is that we are confident that the population mean lies in the interval we generated. --- --- # A Simulation: - Simulations are useful to illustrate the notion of confidence intervals so let's try our hand at simulating to see exactly what a confidence interval contains. - Let's create 100 95 percent confidence intervals from a sample of size 35. The true population mean in our case be 25, with a standard deviation of 4. --- # Simulation in R - The simulation of the confidence interval. ```r counter <- 0 qnorm(1 - (0.05/2)) ``` ``` ## [1] 1.959964 ``` ```r for (i in 1:1000) { x <- rnorm(35, 25, 4) conf <- confint(mean(x), 1.96, 4, 30) if (conf$lower_bound < 25 && conf$upper_bound > 25) { counter <- counter + 1 } } counter/1000 ``` ``` ## [1] 0.967 ``` - As the above code illustrates approximately 96.7% of the intervals we generate will have the true population mean within it (which is pretty close to the 95 percent confidence). --- # Some Things to Note from Our Simulations: - Notice that when `\(\sigma\)` is known, the length of our 100*(1-a)% confidence interval only depends on n and is `\(2\dot{}z_{a/2}\dot{}\frac{\sigma}{\sqrt{n}}\)`. If we want the interval to have length w, just solve: `$$w = 2 \dot{}z_{a/2}\dot{}\frac{\sigma}{\sqrt{n}}$$` for n giving `\(n\geq{(2\dot{}z_{a/2}\dot{}\frac{\sigma}{w})^2}\)` --- # Example: How large of a sample do we need to guarantee that the length of the automobile mpg 99 percent confidence interval = 2 and if the standard deviation = 3.5? ```r w <- 2 zstar <- qnorm(1 - 0.01/2) ### creating our function from the formula widthfunct <- function(zstar, sigma, w) { (2 * zstar * sigma/w)^2 } (n <- widthfunct(zstar, sigma = 3.5, w)) ``` ``` ## [1] 81.27748 ``` ```r ceiling(n) # to determine 1st integer not lower than n ``` ``` ## [1] 82 ``` --- # What if we don't know the Population Parameters: - Very rarely are you going to have information about the population parameters. - For example, the prior examples have relied on having the population standard deviation, `\(\sigma\)`. What happens when we don't have sigma? -- - We simply use the point estimators which are appropriate for the parameters of interest. In the population standard deviation case; the answer would simply be the sample standard deviation `\(s\)` - Further, the law of large numbers says that as a sample size gets larger, each of the above estimates tend to get closer to the real parameter. --- # Confidence Intervals continued: - If the population is normal and the sample size is large, ($\geq{30}$) with mean `\(\mu\)` then: `$$T = \frac{\bar{X} - \mu}{\frac{s}{\sqrt{n}}}$$` has approximately a standard normal distribution and: `$$\bar{X} - z_{a/2}\dot{}\frac{s}{\sqrt{n}},\bar{X} + z_{a/2}\dot{}\frac{s}{\sqrt{n}}$$` is a confidence interval for `\(\mu\)` --- # Example: A random sample of 120 lightening flashes resulted in an average radar echo duration of .83 seconds with a sample standard deviation of .4 seconds. Calculate a 99 percent confidence interval for the true average echo duration. ```r n <- 120 xbar <- 0.83 s <- 0.4 alpha <- 1 - 0.99 zstar <- qnorm(1 - alpha/2) confint(xbar, zstar, s, n) # the only thing that changed in the formula was sigma got replaced with s so we can still use the same formula ``` ``` ## $upper_bound ## [1] 0.924056 ## ## $lower_bound ## [1] 0.735944 ``` --- # Prove that sample size matters! - Sure, all it takes is to use a for loop and a simulation. With 1000 simulations, things should be ok. Let's take some random samples from the normal distribution of n = 4 and the population mean and standard deviation are 25 and 4 respectively. ```r counter <- 0 for (i in seq(1:1000)) { x <- rnorm(4, 25, 4) conf <- confint(mean(x), qnorm(1 - 0.05/2), sd(x), 4) if (conf$lower_bound < 25 && 25 < conf$upper_bound) { counter <- counter + 1 } } counter/1000 ``` ``` ## [1] 0.848 ``` From our simulation, we see that if we have a small sample, our confidence interval is far from the confidence interval we wanted to generate. In this case only 84.8% of the intervals contained the true mean. --- # T distributions: - If the population is normal and `\(\sigma\)` and `\(\mu\)` are unknown, then `$$T = \frac{\bar{X} - \mu}{\frac{s}{\sqrt{n}}}$$` has a t distribution with n-1 degrees of freedom. Also: `$$[\bar{X} - t_{a/2,n-1}\dot{}\frac{s}{\sqrt{n}},\bar{X} + t_{a/2,n-1}\dot{}\frac{s}{\sqrt{n}}]$$` is the 100(1-a) percent confidence interval for `\(\mu\)`. If R is available (It always will be available as long as you have a computer), then `\(t_{a/2,n-1}\)` can be calculated with the function qt and adjusting the appropriate arguments. --- # Example of using T: - Taking the lightening rod problem as before and adjusting it so that we can't use normal approximations, lets see how to apply t A random sample of 20 lightening flashes resulted in an average radar echo duration of .83 seconds with a sample standard deviation of .4 seconds. Calculate a 99 percent confidence interval for the true average echo duration. ```r n <- 20 xbar <- 0.83 s <- 0.4 alpha <- 1 - 0.99 tstar <- qt(1 - alpha/2, n - 1) confint(xbar, tstar, s, n) # although the formula changes, we can still use the confint function we defined a while back ``` ``` ## $upper_bound ## [1] 1.08589 ## ## $lower_bound ## [1] 0.5741102 ``` --- # Confidence intervals for Bernoulli Trials - If we have a sequence of n bernoulli trials with probability of succcess p, then if n is large enough (and p is not near 0 or 1). `$$\frac{(\hat{p}-p)}{\sqrt{\frac{p(1-p)}{n}}}$$` has approximately a standard normal distribution. If we approximate p by `\(\hat{p}\)` in the denominator, than an appropriate confidence interval for p is: `$$\hat{p}- z_{a/2}\dot{}\frac{\sqrt{\hat{p}\dot{}(1-p)}}{\sqrt{n}},\hat{p}+ z_{a/2}\dot{}\frac{\sqrt{\hat{p}\dot{}(1-p)}}{\sqrt{n}}$$` Large sample recommendations are np and n(1-p) where both are greater than 10 or both the number of successes and failures in the sample are at least 15 for successes and failures --- --- # Example: The national sexual pattern survey found that 173 out of 2673 adult heterosexuals had multiple partners. Give a 95 percent classical confidence interval for the true proportion of heterosexuals with multiple partners. ```r n <- 2673 x <- 173 phat <- x/n alpha <- 1 - 0.95 zstar <- qnorm(1 - alpha/2) # Defining our own function bconf <- function(phat, zstar, n) { list(upper_bound = phat + zstar * sqrt(phat * (1 - phat))/sqrt(n), lower_bound = phat - zstar * sqrt(phat * (1 - phat))/sqrt(n)) } bconf(phat, zstar, n) ``` ``` ## $upper_bound ## [1] 0.0740483 ## ## $lower_bound ## [1] 0.05539427 ``` --- # Confidence Intervals: Scores for p In the bernoulli trial situation, if we start with `$$P[-z_{a/2}\leq{\frac{\hat{p} - p}{\sqrt{\frac{p*(1-p)}{n}}}}\leq{z_{a/2}}]$$` is approximately 1-a since the center of the expression is approximately standard normal and then solve for both: `$$\frac{\hat{p} - p}{\sqrt{\frac{p*(1-p)}{n}}} = -z_{a/2}$$` `$$\frac{\hat{p} - p}{\sqrt{\frac{p*(1-p)}{n}}} = z_{a/2}$$` --- # Score confidence Interval: - the resulting solutions form the following interval: let z-star = `\(z_{a/2}\)`. Then the (1-a)% confidence interval is: `$$-\frac{1}{2} * \frac{-zstar^2 - 2n\hat{p} + \sqrt{zstar^4+ 4zstar^2np - 4n\hat{p}^2zstar^2}}{zstar^2 + n}$$` `$$\frac{1}{2} * \frac{zstar^2 + 2n\hat{p} + \sqrt{zstar^4+ 4zstar^2np - 4n\hat{p}^2zstar^2}}{zstar^2 + n}$$` - The above is known as the score confidence interval for p --- # One sided confidence bounds: Suppose `\(x_1,...,x_n\)` is a random sample from a normal population with mean `\(\mu\)` and known standard deviation `\(\sigma\)` Then: `$$Z = \frac{(\bar{X} - \mu)}{\frac{\sigma}{\sqrt{n}}}$$` has a standard normal distribution. If we define `\(z_a\)` as the 1-a quantile of a N(0,1) distribution so that `\(P(Z>z_a) = a\)` then we can manipulate a as follows for any `\(a < 0.5\)` `$$1- a = P(Z\leq{z_a}) = P(\mu\leq{\bar{X} + z_a*\frac{\sigma}{\sqrt{n}}}$$` --- # Prediction intervals: Confidence Intervals and confidence bounds estimate the mean value of the distribution under consideration. If we want a confidence interval for a future single observation then we must take into account the error for estimating the mean and the error for a single observation. This results in a prediction interval. `$$\bar{X}-t_{a/2,n-1}*s\sqrt{1+\frac{1}{n}},\bar{X}+t_{a/2,n-1}*s\sqrt{1+\frac{1}{n}}$$` --- # Prediction Interval Example: A random sample of 20 lightening flashes resulted in an average radar echo duration of .83 seconds with a sample standard deviation of .4 seconds. Calculate a 90 percent prediction interval for the echo duration of the next measurement. ```r n <- 20 xbar <- 0.83 s <- 0.4 alpha <- 1 - 0.9 tstar <- qt(1 - alpha/2, n - 1) predint <- function(xbar, tstar, s, n) { list(upper_bound = xbar + tstar * s * sqrt(1 + 1/n), lower_bound = xbar - tstar * s * sqrt(1 + 1/n)) } predint(xbar, tstar, s, n) ``` ``` ## $upper_bound ## [1] 1.538734 ## ## $lower_bound ## [1] 0.1212664 ```


Polkadot icon theme with default size
beachball icon theme with size of 80
jdenticon icon theme with size of 120


Posted on 5 OCTOBER, 2014
ruby variable scope
Ruby makes provisions for four dinstinct types of variables: local, instance, class, and global. As their names may imply, the differences between these types lie in their scope, or accessibility. Each aforementioned variable type takes a step up in scope from the previous one. We begin with the humble local variable.
Local variables are only accessible within the code in which they are defined. If a local variable is declared within a method, it will not be accessible outside said method. The same goes for loops, blocks, etc. Local variables are easily recognized; convention states they only contain lower case letters, numbers, and underscores.
Instance variables are accessible everywhere in a specific instance of an object. They are typically declared in the #initialize method of a class. This all means that if we define an instance variable in #initialize and we want to use this variable in another method like #double_number, we can access the same variable. If the instance variable was instead a local variable, our #double_number method would not be able to see the variable. Keep in mind, though, that if we create a separate instance of a class, the variable will not be the same, as it is local to a specific instance. Instance variables are recognizable by the fact that they always contain the @ symbol as it's first character.
Class variables expand on the scope of instance variables by making the variable visible to all instances of a class. This means that there is only one variable with one value that exists for every object that is instantiated from a class. Remember that if you change the value of this variable in one instance of a class, the value will change in all other instances as well. Class variables are recognized by being prefixed by two @@ symbols.
Global variables have the greatest scope -- they are accesible from anywhere in a Ruby program.  Global variables are prefixed with a $ and conventionally are comprised of all capital letters.


Technical calls from HDFC Securities: Buy Bajaj Finance Futures
Technical calls from Vinay Rajani, Technical & Derivatives Analyst, HDFC securities.
by Vinay RajaniBuy Bajaj Finance Nov Future @ Rs 4,232
Stop loss of Rs 4,100
Target Rs 4,420
Rationale:
-- Higher tops and higher bottoms on the daily and weekly charts
-- Stock price has been taking support on its 20 DMA
-- After 5 sessions of running correction, the stock has resumed its uptrend with rise in volumes
-- Long build-up is seen in the Derivatives Segment
We recommend buying Bajaj Finance Nov Fut at the current market price, for the upside target of Rs 4,420, keeping stoploss at Rs 4,100.
 He may have positions in one or more stocks.


Module std.path
This module is used to manipulate path strings.
All functions, with the exception of expandTilde
(and in some
cases absolutePath
and relativePath
), are pure
string manipulation functions; they don't depend on any state outside
the program, nor do they perform any actual file system actions.
This has the consequence that the module does not make any distinction
between a path that points to a directory and a path that points to a
file, and it does not know whether or not the object
pointed to by the
path actually exists in the file system.
To differentiate between these cases, use std.file.isDir
and
std.file.exists
.
Note that on Windows, both the backslash (
) and the slash (\
)
are in principle valid directory separators. This module treats them
both on equal footing, but in cases where a new separator is
added, a backslash will be used. Furthermore, the /
buildNormalizedPath
function will replace all slashes with backslashes on that platform.
In general, the functions in this module assume that the input paths
are well-formed. (That is, they should not contain invalid characters,
they should follow the file system's path format, etc.) The result
of calling a function on an ill-formed path is undefined. When there
is a chance that a path or a file name is invalid (for instance, when it
has been input by the user), it may sometimes be desirable to use the
isValidFilename
and isValidPath
functions to check
this.
Most functions do not perform any memory allocations, and if a string is returned, it is usually a slice of an input string. If a function allocates, this is explicitly mentioned in the documentation.
Upgrading
can
be replaced with
.
globMatch
Functions
| Name | Description |
|---|---|
absolutePath
|
Translates into an absolute path.
|
baseName
|
Returns the name of a file, without any leading directory
and with an optional suffix chopped off.
|
buildNormalizedPath
|
Performs the same task as buildPath ,
while at the same time resolving current/parent directory
symbols ("." and ".." ) and removing superfluous
directory separators.
It will return "." if the path leads to the starting directory.
On Windows, slashes are replaced with backslashes.
|
buildPath
|
Combines one or more path segments .
|
defaultExtension
|
Returns the path given by , with the extension given by
appended if the path doesn't already have one.
|
dirName
|
Returns the directory part of a path . On Windows, this
includes the drive letter if present.
|
driveName
|
Returns the drive of a path , or null if the drive
is not specified. In the case of UNC paths, the network share
is returned.
|
expandTilde
|
Performs tilde expansion in paths on POSIX systems. On Windows, this function does nothing. |
extension
|
Returns the extension part of a file name, including the dot. |
filenameCharCmp
|
Compares filename characters and return < 0 if , 0 if
and > 0 if .
|
filenameCmp
|
Compares file names and returns
< 0 if ,
0 if and
> 0 if .
|
globMatch
|
Matches a pattern against a path .
|
isAbsolute
|
Determines whether a path is absolute or not.
|
isDirSeparator
|
Determines whether the given character is a directory separator. |
isRooted
|
Determines whether a path starts at a root directory.
|
isValidFilename
|
Checks that the given file or directory name is valid. |
isValidPath
|
Checks whether is a valid path.
|
pathSplitter
|
Returns a bidirectional range that iterates over the elements of a path .
|
relativePath
|
Translates into a relative path.
|
rootName
|
Returns the root directory of the specified path , or null if the
path is not rooted.
|
setExtension
|
Returns a string containing the path given by , but where
the extension has been set to .
|
stripDrive
|
Strips the drive from a Windows path . On POSIX, the path is returned
unaltered.
|
stripExtension
|
Returns slice of path [] with the extension stripped off.
|
Enums
| Name | Description |
|---|---|
CaseSensitive
|
This enum is used as a template argument to functions which
compare file names, and determines whether the comparison is
case sensitive or not.
|
Enum values
| Name | Type | Description |
|---|---|---|
dirSeparator
|
String used to separate directory names in a path. Under POSIX this is a slash, under Windows a backslash. | |
pathSeparator
|
Path separator string. A colon under POSIX, a semicolon under Windows. |
Authors
Lars Tandle Kyllingstad, Walter Bright, Grzegorz Adam Hankiewicz, Thomas Kühne, Andrei Alexandrescu


FROM DR/BARRISTER KAM IBRAHIM SENIOR ADVOCATE OF BURKINA FASO (ESQ) WEST AFRICA. DEAR FRIEND. WITH DUE RESPECT, DO NOT BE SURPRISED OR AFRAID TO RECEIVE THIS TYPE OF MESSAGE FROM ME. WELL, I AM BARRISTER KAM IBRAHIM, THE PERSONAL RESIDENT ATTORNEY HERE IN BURKINA FASO TO MR. JOHN KOROVO FROM GERMANY, THE LATE WELL KNOWN BUSINESS MAN, WHO DIED ALONG WITH HIS ENTIRE FAMILY IN JULY 25 2000 IN A SUPER SONIC CONCORD PLANE CRASH AT CHARLES DE GAULLE AIRPORT IN PARIS FRANCE.     BECAUSE THE BANKING LAW AND GUIDELINES HERE STIPULATED THAT IF SUCH MONEY REMAINED UNCLAIMED AFTER FIVE (5) YEARS THE MONEY WILL BE TRANSFERRED INTO THE BANK TREASURY AS AN UNCLAIMED FUND.   JOHN KOROVO LEFT BEHIND TO YOU AS HIS REAL NEXT OF KIN.     I HOPE YOU WILL WELCOME THIS LIFE OPPORTUNITY, IF SO PLEASE GET BACK TO ME IN CONFIRMATION OF YOUR GOOD INTEREST TO ENABLE US STARTS TO PROCEED. I LOOK FORWARD TO HEARING FROM YOU, SO THAT I CAN SEND TO YOU THE TEXT OF APPLICATION WHICH YOU WILL F ILL-IN YOUR DETAILS WHERE THE MONEY WILL BE REMITTED AND TENDER TO THE BANK AS HIS NEXT OF KIN. THANKS IN ANTICIPATION OF YOUR KIND CO-OPERATION. BEST REGARDS, DR/BARRISTER KAM IBRAHIM


Next: Notes
Up: Guide
Previous: Quick Reference Guide to
  Contents
  Index
Converting from LINPACK or EISPACK
This appendix
is designed to assist people to convert programs
that currently call LINPACK or EISPACK routines, to call LAPACK
routines instead.
Susan Blackford
1999-10-01


Find cook who works for months and years and also available for morning, afternoon and evening time.
Find cook based on cities and areas
Find cook who works for families.
Find cook who works for months and years
Find cook based on cities and areas
Find cook who works for families.
Help cook to fill the registration form and make there account, updates and tracking purpose.
See More


| ����� | ˵�� |
|---|---|
| com.slytechs.library | |
| org.jnetpcap |
Core libpcap functionality available on all platforms.
|
| org.jnetpcap.nio |
Native memory and IO management classes.
|
| org.jnetpcap.winpcap |
WinPcap extensions to libpcap avialable on a limited set of
platforms.
|
| ���������� | ������˵�� |
|---|---|
(ר�ó����) static long |
NativeLibrary.dlopen(java.lang.String name)
Dlopen.
|
(ר�ó����) long |
NativeLibrary.dlsymbol(long address,
java.lang.String name)
Dlsymbol.
|
| ���������� | ������˵�� |
|---|---|
int |
Pcap.activate()
Is used to activate a packet capture handle to look at packets on the
network, with the options that were set on the handle being in effect.
|
void |
Pcap.breakloop()
set a flag that will force pcap_dispatch() or pcap_loop() to return
rather than looping.
|
int |
Pcap.canSetRfmon()
Check whether monitor mode can be set for a not-yet-activated capture
handle.
|
void |
Pcap.close()
pcap_close() closes the files associated with p and deallocates
resources.
|
int |
Pcap.compile(PcapBpfProgram program,
java.lang.String str,
int optimize,
int netmask)
Compile a packet filter, converting a high level filtering expression
in
to a progra that can be interpreted by the kernel-level filtering engine.
|
static int |
Pcap.compileNoPcap(int snaplen,
int dlt,
PcapBpfProgram program,
java.lang.String str,
int optimize,
int netmask)
Compile a packet filter without the need of opening an adapter.
|
static Pcap |
Pcap.create(java.lang.String device,
java.lang.StringBuilder errbuf)
pcap_create() is used to create a packet capture handle to look at
packets on the network. source is a string that specifies the network
device to open; on Linux systems with 2.2 or later kernels, a source
argument of "any" or NULL can be used to capture packets from all
interfaces.
|
int |
Pcap.datalink()
Returns the link layer of an adapter.
|
static int |
Pcap.datalinkNameToVal(java.lang.String name)
Translates a data link type name, which is a DLT_ name with the DLT_
removed, to the corresponding data link type value.
|
static java.lang.String |
Pcap.datalinkValToDescription(int dlt)
Translates a data link type value to a short description of that data
link type.
|
static java.lang.String |
Pcap.datalinkValToName(int dlt)
Translates a data link type value to the corresponding data link type
name.
|
PcapDumper |
Pcap.dumpOpen(java.lang.String fname)
Open a file to write packets.
|
static int |
Pcap.findAllDevs(java.util.List<PcapIf> alldevs,
java.lang.StringBuilder errbuf)
pcap_findalldevs() constructs a list of network devices that can be
opened with pcap_open_live().
|
static void |
Pcap.freecode(PcapBpfProgram program)
This frees up the code structures, but does not released the peered
base
bpf_program peer structure.
|
java.lang.String |
Pcap.getErr()
return the error text pertaining to the last pcap library error.
|
int |
Pcap.getNonBlock(java.lang.StringBuilder errbuf)
pcap_getnonblock() returns the current ``non-blocking'' state of the
capture descriptor; it always returns 0 on ``savefiles''.
|
int |
Pcap.inject(JBuffer buf,
int start,
int len)
Private method to perform work.
|
private int |
Pcap.injectPrivate(java.nio.ByteBuffer buf,
int start,
int len)
Private method to perform work.
|
static boolean |
Pcap.isInjectSupported()
Checks if the current platform has support for pcap_inject call.
|
static boolean |
Pcap.isSendPacketSupported()
Checks if the current platform has support for pcap_sendpacket
call.
|
int |
Pcap.isSwapped()
returns true if the current savefile uses a different byte order than
the
current system.
|
static java.lang.String |
Pcap.libVersion()
Returns a pointer to a string giving information about the version of
the
libpcap library being used; note that it contains more information than
just a version number.
|
static java.lang.String |
Pcap.lookupDev(java.lang.StringBuilder errbuf)
Returns a network device suitable for use with
openLive
and
lookupNet .
|
static int |
Pcap.lookupNet(java.lang.String device,
JNumber netp,
JNumber maskp,
java.lang.StringBuilder errbuf)
Determines the network number and mask associated with the network
device.
|
static int |
Pcap.lookupNet(java.lang.String device,
PcapInteger netp,
PcapInteger maskp,
java.lang.StringBuilder errbuf)
�ѹ�ʱ��
use of PcapInteger has been deprecated
|
private <T> int |
Pcap.loop(int cnt,
ByteBufferHandler<T> handler,
T user,
PcapHeader header)
Loop.
|
private <T> int |
Pcap.loop(int cnt,
int id,
JPacketHandler<T> handler,
T user,
JPacket packet,
JPacket.State state,
PcapHeader header,
JScanner scanner)
Private native implementation.
|
private <T> int |
Pcap.loop(int cnt,
int id,
PcapPacketHandler<T> handler,
T user,
JPacket packet,
JPacket.State state,
PcapHeader header,
JScanner scanner)
Private native implementation.
|
private <T> int |
Pcap.loop(int cnt,
JBufferHandler<T> handler,
T user,
PcapHeader header,
JBuffer buffer)
Loop.
|
int |
Pcap.loop(int cnt,
PcapDumper dumper)
A specialized loop method that utilizes a fast native dumper without
entering java environment.
|
<T> int |
Pcap.loop(int cnt,
PcapHandler<T> handler,
T user)
�ѹ�ʱ��
use of PcapHandler has been replaced with ByteBufferHandler
|
int |
Pcap.majorVersion()
Return the major version number of the pcap library used to write the
savefile.
|
int |
Pcap.minorVersion()
Return the minor version number of the pcap library used to write the
savefile.
|
JBuffer |
Pcap.next(PcapHeader pkt_header,
JBuffer buffer)
Return the next available packet. pcap_next() reads the next packet
(by
calling pcap_dispatch() with a cnt of 1) and returns a u_char pointer to
the data in that packet.
|
java.nio.ByteBuffer |
Pcap.next(PcapPktHdr pkt_header)
�ѹ�ʱ��
use of PcapPktHdr has been replaced with PcapHeader
|
int |
Pcap.nextEx(PcapHeader pkt_header,
JBuffer buffer)
Read a packet from an interface or from an offline capture.
|
static Pcap |
Pcap.openDead(int linktype,
int snaplen)
Create a pcap_t structure without starting a capture.
pcap_open_dead() is
used for creating a pcap_t structure to use when calling the other
functions in libpcap.
|
static Pcap |
Pcap.openLive(java.lang.String device,
int snaplen,
int promisc,
int timeout,
java.lang.StringBuilder errbuf)
Open a live capture associated with the specified network interface
device. pcap_open_live() is used to obtain a packet capture descriptor to
look at packets on the network. device is a string that specifies the
network device to open; on Linux systems with 2.2 or later kernels, a
device argument of "any" or NULL can be used to capture packets from all
interfaces. snaplen specifies the maximum number of bytes to capture.
|
static Pcap |
Pcap.openOffline(java.lang.String fname,
java.lang.StringBuilder errbuf)
Open a savefile in the tcpdump/libpcap format to read packets.
|
int |
Pcap.sendPacket(JBuffer buf)
This method allows to send a raw packet to the network.
|
int |
Pcap.setBufferSize(long size)
sets the buffer size that will be used on a capture handle when the
handle is activated to buffer_size, which is in units of bytes.
|
int |
Pcap.setDatalink(int dlt)
Set the current data link type of the pcap descriptor to the type
specified by dlt.
|
int |
Pcap.setDirection(int dir)
Set the direction for which packets will be captured.
|
int |
Pcap.setFilter(PcapBpfProgram program)
Associate a filter to a capture. pcap_setfilter() is used to specify
a
filter program. fp is a pointer to a bpf_program struct, usually the
result of a call to
Pcap.compile(PcapBpfProgram,
String, int, int) |
int |
Pcap.setNonBlock(int nonBlock,
java.lang.StringBuilder errbuf)
pcap_setnonblock() puts a capture descriptor, opened with
pcap_open_live(), into ``non-blocking'' mode, or takes it out of
``non-blocking'' mode, depending on whether the nonblock argument is
non-zero or zero.
|
int |
Pcap.setPromisc(int promisc)
Set promiscuous mode for a not-yet-activated capture handle.
|
int |
Pcap.setRfmon(int rfmon)
Set monitor mode for a not-yet-activated capture handle.
|
int |
Pcap.setSnaplen(int snaplen)
Set the snapshot length for a not-yet-activated capture handle.
|
int |
Pcap.setTimeout(int timeout)
Set the read timeout for a not-yet-activated capture handle.
|
int |
Pcap.snapshot()
Return the dimension of the packet portion (in bytes) that is
delivered
to the application. pcap_snapshot() returns the snapshot length specified
when pcap_open_live was called.
|
int |
Pcap.stats(PcapStat stats)
Returns statistics on the current capture.
|
| ���������� | ������˵�� |
|---|---|
private static long |
JMemory.allocate0(int size)
Allocate0.
|
| ���������� | ������˵�� |
|---|---|
static int |
WinPcap.createSrcStr(java.lang.StringBuffer source,
int type,
java.lang.String host,
java.lang.String port,
java.lang.String name,
java.lang.StringBuffer errbuf)
Accept a set of strings (host name, port, ...), and it returns the
complete
source string according to the new format (e.g.
|
static int |
WinPcap.findAllDevsEx(java.lang.String source,
WinPcapRmtAuth auth,
java.util.List<PcapIf> alldevs,
java.lang.StringBuffer errbuf)
Create a list of network devices that can be opened with
pcap_open().
|
int |
WinPcap.liveDump(java.lang.String fname,
int maxsize,
int maxpackets)
dumps the network traffic from an interface to a file.
|
int |
WinPcap.liveDumpEnded(int sync)
Return the status of the kernel dump process, i.e. tells if one of
the
limits defined with pcap_live_dump() has been reached.
|
static int |
WinPcap.offlineFilter(PcapBpfProgram program,
int caplen,
int len,
java.nio.ByteBuffer buf)
Returns if a given filter applies to an offline packet.
|
static int |
WinPcap.offlineFilter(PcapBpfProgram program,
PcapHeader header,
java.nio.ByteBuffer buffer)
Returns if a given filter applies to an offline packet.
|
static int |
WinPcap.offlineFilter(PcapBpfProgram program,
PcapHeader header,
JBuffer buffer)
Returns if a given filter applies to an offline packet.
|
static int |
WinPcap.offlineFilter(PcapBpfProgram program,
PcapPktHdr header,
java.nio.ByteBuffer buf)
�ѹ�ʱ��
|
static WinPcap
|
WinPcap.open(java.lang.String source,
int snaplen,
int flags,
int timeout,
WinPcapRmtAuth auth,
java.lang.StringBuffer errbuf)
Open a generic source in order to capture/send (WinPcap only)
traffic.
|
static WinPcap
|
WinPcap.openDead(int linktype,
int snaplen)
Create a pcap_t structure without starting a capture.
pcap_open_dead() is
used for creating a pcap_t structure to use when calling the other
functions in libpcap.
|
static WinPcap
|
WinPcap.openLive(java.lang.String device,
int snaplen,
int promisc,
int timeout,
java.lang.StringBuffer errbuf)
This method, overrides the generic libpcap based
openLive
method, and allocates a peer pcap object that allows WinPcap extensions.
|
static WinPcap
|
WinPcap.openOffline(java.lang.String fname,
java.lang.StringBuffer errbuf)
Open a savefile in the tcpdump/libpcap format to read packets.
|
int |
WinPcap.sendQueueTransmit(WinPcapSendQueue queue,
int synch)
Send a queue of raw packets to the network.
|
int |
WinPcap.setBuff(int dim)
Set the size of the kernel buffer associated with an adapter.
|
int |
WinPcap.setMinToCopy(int size)
Set the minumum amount of data received by the kernel in a single
call.
|
int |
WinPcap.setMode(int mode)
Set the working mode of the interface p to mode.
|
WinPcapSamp |
WinPcap.setSampling()
Define a sampling method for packet capture.
|
WinPcapStat |
WinPcap.statsEx()
This method extends the
Pcap.stats method and allows
more
statistics to be returned.
|


Source Code¶
The code repository is at:
Directory structure¶
The source code uses a directory structure suggested by Meteor.
Below are descriptions of these directories, where the ”.” hides it from Meteor’s deployment build:
.docs : sources for this document and query API
.server : python and other scripts that are not initiated by the client
start : scripts to start servers
client : client-only javascript
htmlCss : html and css fileslib : 3rd party libraries and client files we want loaded first
lib : server and client files we want loaded first
public : static files to be served, such as images
images : images that jquery-ui wants in an image directoryquery : html pages for the Query API documentzurhfads : html pages for this document
server : server-only node/javascript and python initiated by the client
lib : server files we want loaded first
tests : unit and integration tests


Only
Rabbit Tornado
skill can open a chest.
Talk with event manager to get transformation into rabbit...


Let's consider an example package called TestPackage. Suppose we have a directory TestPackage
containing a single source file main.c
to build. We will assume that main.c
contains some sensible C code to make an executable program, e.g. at least a main function. Note that for the benefit of this demonstration, it's important to be C code, not C++; for example:
#include <stdio.h>
int main()
{
printf("Hello world\n");
return 0;
}
Making a package is the first step to using Bam. Change into the TestPackage directory, and type
bam --makepackage --pkgname=TestPackage
This will create the bam folder, the package definition file, and a script file containing an empty TestPackage namespace.
As we intend to build some C code, so we need to pull in package dependencies that provide this support. Still in the TestPackage directory, type
bam --adddependent --pkgname=C
bam --adddependent --pkgname=NativeBuilder
bam --adddependent --pkgname=VSSolutionBuilder
bam --adddependent --pkgname=MakeFileBuilder
bam --adddependent --pkgname=XcodeBuilder
bam --adddependent --pkgname=VisualC --pkgversion=15.0
bam --adddependent --pkgname=Gcc --pkgversion=7
bam --adddependent --pkgname=Clang --pkgversion=Xcode10
These commands have modified the package definition file, and add support not only to build C code, but also build in all default build modes, and all supported platforms. To view the changes that have been made to the package definition file, run this command
bam --showdefinition
Here is what you should see from running this command:
Definition of package 'TestPackage' ----------------------------------- Description: A new package called TestPackage Supported on: Windows Linux OSX BuildAMation assemblies: Bam.Core (requires version 2.0) DotNet assemblies: System (version 4.0.30319) System.Xml (version 4.0.30319) System.Core (version 4.0.30319) #defines: D_PACKAGE_TESTPACKAGE Package repositories that the system is aware of (may be more than during builds): 0: /Users/mark/dev/BuildAMation (Structured+Tests) 1: /private/tmp Dependent packages (* = default version): Package Name Default Repository Index ---------------------------------------- ------- ---------------- TestPackage 1 C 0 CommandLineProcessor 0 Clang-Xcode10 0 XcodeBuilder 0 ClangCommon 0 C 0 Gcc-7 0 GccCommon 0 C 0 MakeFileBuilder 0 NativeBuilder 0 CommandLineProcessor 0 VisualC-15.0 0 VisualCCommon 0 C 0 VisualStudioProcessor 0 WindowsSDK-10 0 WindowsSDKCommon 0 VSSolutionBuilder 0 VSSolutionBuilder 0 VisualStudioProcessor 0 XcodeBuilder 0 XcodeProjectProcessor 0 XcodeBuilder 0
You will have noticed that there are packages listed in the output that you didn't specify on the command line. This is because package definitions are evaluated recursively, such that depending on package A will bring in all of A's dependents. For example, the VisualC-15.0 package is dependent upon both VisualCCommon and the WindowsSDK-10, neither of which needed to be specified on the command line while setting up the test package.
Now that all the dependencies are configured, you can create a project to edit and run from your preferred IDE. Still in the TestPackage directory, type
bam -p
The output will be similar to
Successfully created debug project for package 'TestPackage' /private/tmp/TestPackage/PackageDebug/TestPackage-bam.csprojThe generated project can be opened in VisualStudio on Windows, VisualStudio for Mac on macos, or MonoDevelop on Linux.
open -a 'visual studio' <.csproj path>
to open the project in VisualStudio for Mac. (The quotes are important.)gnome-open <.csproj path>
to open the project in MonoDevelop.(You may want to set up aliases in your shells for these.)
Once opened, you can browse through the source for the dependent package. Debugging this project will also invoke Bam - the entry point is in the main.cs file in the project, and automatically generated by the earlier command. The code in this file can be modified but be aware that if the project generation command is executed again, this file is overwritten.
To continue this example, open the TestPackage.cs file from within the TestPackage package in the IDE.
In the script file, define a module called MyProgram, which is a C (not C++) console application, compiling main.c in the package directory. We will revisit a C++ source file later.
namespace TestPackage
{
sealed class MyProgram :
C.ConsoleApplication
{
protected override void
Init()
{
base.Init();
this.CreateCSourceCollection("$(packagedir)/main.c");
}
}
}
TestPackage
.MyProgram
, which is the name of the class. The executable generated will use the module name. This can be overridden.sealed
, which is an indication to Bam that all dependencies of this module will need to be evaluated.C.ConsoleApplication
. This is a class from the C package (using the convention of package name as namespace), which defines the necessary infrastructure for compiling and linking a C console application.Init
function is overridden from the base class. Init is used to define the properties of the module. This is used instead of the module constructor, as there are restrictions before an object is constructed in C#.CreateCSourceCollection
, is invoked, passing a string which is internally converted to a TokenizedString. This function's implementation expands the parameterized string into file paths, and creates additional source file modules for each, and configures dependencies. Wildcards can be used in the path to evaluate to more than one file. In this case, there is only one, the file main.c in the package directory.bam -b=Native
The result will be an executable in a subdirectory of the build directory of the package. The root directory where files are built is configurable with the -o
command line argument.
Private patches are applied solely to the build of the module they are applied to. In this example, a C preprocessor definition is added to the compilation of the source file.
namespace TestPackage
{
sealed class MyProgram :
C.ConsoleApplication
{
protected override void
Init()
{
base.Init();
var sources = this.CreateCSourceCollection("$(packagedir)/main.c");
sources.PrivatePatch(settings =>
{
var preprocessor = settings as C.ICommonPreprocessorSettings;
preprocessor.PreprocessorDefines.Add("CUSTOM_DEFINE");
});
}
}
}
null
, or using an is
expression pattern.C.ICommonPreprocessorSettings
interface defines a property, PreprocessorDefines
, allowing the module writer to manage preprocessor definitions in the build.bam -b=Native
At this point, no modules will be rebuilt. Bam does not inspect for changed build settings between invocations, so a clean build is required to take on the updated settings. This is somewhat over-the-top in many cases, as simply deleting the object file would suffice.
bam -b=Native -c
If you inspect the command line output, you will see that CUSTOM_DEFINE is now passed as a preprocessor definition.
Public patches are applied both to the build of the module they are applied to, and any packages that depend on it. A common case for this kind of patch is for a C library (static or dynamic) that has headers, and must expose an include search path to any other module that uses the library.
Here's an example of a static library, assuming library.c is present in the package directory and contains suitable code, and library.h is in an include folder in the package directory, e.g.
#ifndef LIBRARY_H
#define LIBRARY_H
extern void printme(const char *string);
#endif /* LIBRARY_H */
#include <stdio.h>
void printme(const char *string)
{
printf("%s", string);
}
Here is the modified package script to include the build of the library. The program does not yet depend on it.
namespace TestPackage
{
sealed class MyProgram :
C.ConsoleApplication
{
...
}
sealed class MyStaticLibrary :
C.StaticLibrary
{
protected override void
Init()
{
base.Init();
this.CreateCSourceCollection("$(packagedir)/library.c");
this.PublicPatch((settings, appliedTo) =>
{
if (settings is C.ICommonPreprocessorSettings preprocessor)
{
preprocessor.IncludePaths.AddUnique(this.CreateTokenizedString("$(packagedir)/include"));
}
});
}
}
}
MyStaticLibrary
. Similarly to the program above, the name of the library generated will use the module name.C.StaticLibrary
to indicate that the module will be a static library.PublicPatch
is the function called. But note that the function is now applied on this
(the module to be built), rather then sources. The reason for this is that any dependency is written in terms of the module MyStaticLibrary, rather than on any source contained within it. Although the public patch is applied to this
, because the C source container is encapsulated within MyStaticLibrary, the patch is applied to the source automatically.settings
as before, and now also appliedTo
. The latter is the module on which the patch is being applied to. For some public patches, it may be useful to know the module on which the patch is being applied. However, as in the example, this
is usually the more useful module reference, to get the package directory of the source package, as opposed to using appliedTo
which would get a different package directory.is
expression pattern on the settings. Public patches are applied to all modules using this module as a dependent, and to a module's hierarchy of child modules, so can be applied equally to a link or compilation step. The conditional is necessary to avoid runtime null reference exceptions.CreateTokenizedString
, creates a TokenizedString that is tied to that module's macros for expansion. In this case, the TokenizedString function $(packagedir)
will evaluate to the package directory of the module MyStaticLibrary.Building the package now, requires no clean step, as a new module has been introduced. The output is the compilation and subsequent archiving of library.c into the static library. The program will not have changed.
Now change the program, so that it makes use of the library, e.g. change main.c to
#include "library.h"
int main()
{
printme("Hello world\n");
return 0;
}
Building the package now will result in a compilation failure. This is because Bam detects that the timestamp on the source file is now newer than it's corresponding object file and rebuilds it. The failure will be similar to this:
/private/tmp/TestPackage/main.c:1:10: fatal error: 'library.h' file not found #include "library.h" ^~~~~~~~~~~ 1 error generated. (Bam.Core.Exception) Command failed: /usr/bin/xcrun --sdk macosx10.13 clang -Wno-all -Wno-extra -Wno-pedantic -fvisibility=hidden -fno-strict-aliasing -DD_BAM_CONFIGURATION_DEBUG -DD_BAM_PLATFORM_OSX -DD_BAM_PLATFORM_BITS=64 -DD_BAM_PLATFORM_LITTLEENDIAN -DCUSTOM_DEFINE -x c -arch x86_64 -g -Werror -O0 -fno-omit-frame-pointer -c -mmacosx-version-min=10.7 -std=c89 -o /private/tmp/TestPackage/build/TestPackage/MyProgram/Debug/obj/main.o /private/tmp/TestPackage/main.c Command exit code: 1
These changes require the program to depend on the static library for both compilation (#include'ing the header) and for link (linking the function code). The C.ConsoleApplication
module has a useful function to indicate how to do this.
namespace TestPackage
{
sealed class MyProgram :
C.ConsoleApplication
{
protected override void
Init(
Bam.Core.Module parent)
{
base.Init(parent);
var sources = this.CreateCSourceContainer("$(packagedir)/main.c");
sources.PrivatePatch(settings =>
{
var compiler = settings as C.ICommonCompilerSettings;
compiler.PreprocessorDefines.Add("CUSTOM_DEFINE");
});
this.CompileAndLinkAgainst<MyStaticLibrary>(sources);
}
}
class MyStaticLibrary :
C.StaticLibrary
{
...
}
}
CompileAndLinkAgainst
is a generic function, that takes the dependent module type as the type argument, which Bam Core uses to set up module dependencies.this
, and this
is a program, a link dependency is set up. Bam Core is not aware of the mean of a link dependency, but it does know that the program depends on the static library to be up to date before the program can be up to date. However the C package does know that a link dependency means the static library needs to be passed as an argument to the linker for the program, once it is up-to-date.LinkAgainst
seen earlier, or compilation only (for header only libraries).Build the package once again, and you should see in the compiler console output that include paths are now included on both the program source and the library source, and the program links and will run.
Run a clean build to satisfy yourself that the static library is compiled and archived first.
In the examples above, we have used the Native build mode to run command line builds of the package. Bam supports other types of build modes, some of which are specific to certain platforms. All the generated files are put into the build root, but each build mode will write to the console where the files can be found.
Generate a VisualStudio solution by running
bam -b=VSSolution
Generate a MakeFile by running
bam -b=MakeFile
By default, the Makefile generated uses GNU make syntax.
On Windows, to use the NMake format, use
bam -b=MakeFile --MakeFile.format=NMAKE
Generate an Xcode workspace by running
bam -b=Xcode
The examples above all build C code. However, the C package understands more derivatives of the C language than just this. It understands C++, ObjectiveC and ObjectiveC++. Bam uses the type of the module to determine which language it is using, and thus apply different tools and settings. For example, as shown above, a C program uses the base type
C.ConsoleApplication
For a program that links C++ code, and thus requires the C++ linker, this would be
C.Cxx.ConsoleApplication
Similarly, for source code, instead of
this.CreateCSourceCollection(paths)
use
this.CreateCxxSourceCollection(paths)
in order to use the C++ compiler for the toolchain.
It is also possible, and sometimes required, to create multiple source collection, from different languages. There is no restriction on how many times you call one of the create collection functions. Ensure that you always link with the correct module type in order to use the right linker for your code.


--- layout: default title: EX NIHILO ---
As the country came to a standstill, a few weeks into the first UK lockdown I started to become slightly more
accustomed to the strangeness and uncertainty of the pandemic. We suddenly had so much precious time and space, and
as a result I began to spend more energy in creative pursuits. I was soon aware that I was not the only one spending
time trying to get inspiration: many of my friends were posting beautiful paintings, drawings, designs, songs, poems
and more on their feeds.
Yet this burst in creativity was accompanied by a simultaneous set of problems created by the very same isolation –
the difficulty to sustain momentum, to remain motivated, and the lack of physical opportunities to come together,
display work, share and feed off each others’ energy and talent.
The virtual exhibition IN OBLIVIONE – the title is Latin for ‘in oblivion’ – aims to subvert this. It seeks to
provide an online space to promote young artists from all over the world and showcase their [multidisciplinary]
work. By providing young artists with inspiration, something to work for and a platform, it has hopefully helped
them to find light and meaning in these dark, uncertain times.


{% extends "base.html" %} {% block title %}PubSNE: Successfully Uploaded CSV!{% endblock %} {% block content %}
Success! Your CSV file ({{ file_name }}) uploaded properly. If you wish to use it to generate a new set of spectra to work with, head over to the Run Scripts section. If you wish to upload a different CSV, head back to the Upload CSV page.
{% endblock %}


Emirates pledges $8.8B to buy 787 Dreamliners from Boeing
by Clyde HughesNov. 20 (UPI) -- Luxury carrier Emirates pledged close to $9 billion Wednesday to buy nearly three dozen 787 Dreamliner aircraft from Boeing.
The $8.8 billion deal includes orders for 30 787-9 airliners.
"Our Boeing fleet is key to our business model to serve international demand for travel to and through our Dubai hub," Emirates Chairman Ahmed bin Saeed Al Maktoum said in a statement.
Emirates' Dubai hub serves more than 150 cities on six continents.
"Our agreement solidifies Emirates' plan to operate the 787 Dreamliner and the 777x, which make up the most efficient and most capable wide-body combination in the industry," Boeing CEO Stanley Deal said.
"It is an honor to build on our successful partnership with Emirates and continue to sustain many jobs at Boeing and our supplier partners."
The order follows a $16 billion move by Emirates on Monday for 50 A350 XWB 900 jetliners from Boeing rival Airbus.
Boeing announced Tuesday it received an order from Kazakhstan carrier Air Astana for 30 737 Max aircraft, which have been grounded worldwide since March.


Edit
Title: {{currIssue.Title}}
Issue key: {{currIssue.IssueKey}}
Description: {{currIssue.Description}}
Assignee: {{currIssue.Assignee.Username}}
Priority: {{currIssue.Priority.Name}}
Due Date: {{currIssue.DueDate | date}}
Author: {{currIssue.Author.Username}}
Project: {{currIssue.Project.Name}}
Status: {{currIssue.Status.Name}}


Johor’s long-serving MCA man Freddie Long dies of cancer
by BY BEN TANJOHOR BARU, Nov 4 — Long-serving former Johor MCA leader Datuk Freddie Long Hoo Hin has died after battling cancer here today.
The 76-year-old grassroots politician succumbed to his illness about 3pm at the intensive care unit of the KPJ Johor Specialist Hospital at Jalan Abdul Samad here.
Long, the former Gertak Merah and Stulang assemblyman for five terms, leaves behind Datin Coreen Lim Boon Lee and six children.
The former state executive councillor and also Johor Baru MCA division chief was a popular political figure during the late 1990s to 2000s.
Long previously made a name when he helmed the state’s tourism and environment portfolios.
He was appointed as a state executive councillor in 2004 and helmed the post of Johor Baru MCA division in 1993 before announcing his retirement in 2008.


--- layout: post title: P4 Developer Day, Fall 2016 date: 2016-10-25 header-img: img/p4-background.png ---
Hosted by: Stanford University
Sponsored by: Xilinx, Netronome, Barefoot Networks
View the P4 Developer Day - Fall 2016 schedule & directory.


{% extends "layout.html" %} {% block pageTitle %} GOV.UK Prototype Kit {% endblock %} {% block beforeContent %}
{% endblock %} {% block content %}Your search for 'Stagecoach' returned 53 results
Select the operators that the ticket covers from the results| Name | NOC | Select |
|---|---|---|
| Stagecoach - West Yorkshire | SCWY |
|
| Stagecoach - South Yorkshire | SCSY |
|
| Stagecoach - North Yorkshire | SCNY |
|
| Stagecoach - East Yorkshire | SCWY |
|
| Stagecoach - Lancashire | SCLC |
|
| Stagecoach - Cheshire | SCCH |
|
| Stagecoach - Derbyshire | SCDE |
|
| Stagecoach - Cumbria | SCCU |
|
| Stagecoach - Stafford | SCST |
|
| Stagecoach - Barnsley | SCBA |
|


This site was built to create a community around expats all over the world, and allow them to share their experience and talk about their lifestyle. Its goal is to foster connections between you, your friends and other fascinating people.
The Expat Web Site has been created with a team of passionate developers at Lambda School:
Team Lead: Max Kajiwara
Back-End: Jeremiah Tenbrink
Front-End: Amarachi Ejiawoko and Stephanie Patton
User Interface: Thierry Joux and Cash Globe


Before Change
collisions = 0
while True:
hps = copy.deepcopy(best_hps)
// Generate a set of random values.
for hp in hp_list:
// TODO: Check is_active for hp.
hps.values[hp.name] = hp.random_sample(self._seed_state)
After Change
// if active, check if selected to be changed.
if hps.is_active(hp):
// if was active and not selected, do nothing.
if best_hps.is_active(hp.name) and hp.name not in hp_names:
continue
// if was not active or selected, sample.
hps.values[hp.name] = hp.random_sample(self._seed_state)
self._seed_state += 1
values = hps.values
// Keep trying until the set of values is unique,


CSDT\CollectionsBundle\Collections\MapCollection
Map collection
This class is used to create
a collection of assiociative
keys values.
- Author: matthieu vallance<EMAIL_ADDRESS>- License: MIT <https://opensource.org/licenses/MIT>
Synopsis
class MapCollection
extends AbstractMapCollection
{
- // Inherited members from AbstractCollection
- protected array $content;
- // Inherited methods from IteratorAggragateTrait
- public ArrayIterator getIterator()
- // Inherited methods from ClearableCollectionTrait
- public array clear()
- // Inherited methods from ContainerCollectionTrait
- public boolean contain()
- public boolean containAll()
- // Inherited methods from ArrayContentCollectionTrait
- public array toArray()
- // Inherited methods from MapCollectionTrait
- public boolean has()
- public mixed|null get()
- public MapCollectionInterface set()
- public MapCollectionInterface setAll()
- public mixed remove()
- public array removeAll()
Hierarchy
Members
protected
- $content
—
array
Content
Methods
Inherited from CSDT\CollectionsBundle\TraitCollection\IteratorAggragateTrait
public
- getIterator() — Get iterator
Inherited from CSDT\CollectionsBundle\TraitCollection\NumberizedCollectionTrait
public
Inherited from CSDT\CollectionsBundle\TraitCollection\ClearableCollectionTrait
public
- clear() — Clear
Inherited from CSDT\CollectionsBundle\TraitCollection\ContainerCollectionTrait
public
- contain() — Contain
- containAll() — Contain all
Inherited from CSDT\CollectionsBundle\TraitCollection\ArrayContentCollectionTrait
public
- toArray() — To array


JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A
B
C
D
E
F
G
I
L
M
P
R
S
U
V
M
MaterialCondition
- Interface in
grondag.frex.api.material
MaterialFinder
- Interface in
grondag.frex.api.material
Finds standard
RenderMaterial
instances used to communicate quad rendering characteristics to a
RenderContext
.
materialFinder()
- Method in interface grondag.frex.api.
Renderer
Obtain a new
MaterialFinder
instance used to retrieve standard
RenderMaterial
instances.
MaterialLoader
- Interface in
grondag.frex.api.material
For use by model loading libraries - handles deserialization of material JSON files, creating and registering them in the renderer.
MaterialShader
- Interface in
grondag.frex.api.material
maxSpriteDepth()
- Method in interface grondag.frex.api.
Renderer
A
B
C
D
E
F
G
I
L
M
P
R
S
U
V
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes


Accept claimable balance
You're going to accept a claimable balance that was sent to you containing {{ amount }} {{ asset_name }}. In order to proceed sign the following transaction by clicking the button.


Simple user form
First name:
Required field
Last name:
Required field
E-mail:
Required field
Phone number:
Required field
Nickname:
Required field


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.simpleframework.util.parse.Parser org.simpleframework.http.parse.AddressParser
public class AddressParser
This parser is used to parse uniform resource identifiers. The uniform resource identifier syntax is given in RFC 2396. This parser can parse relative and absolute URI's. The uniform resource identifier syntax that this parser will parse are based on the generic web based URL similar to the syntax represented in RFC 2616 section 3.2.2. The syntax used to parse this URI is a modified version of RFC 2396
URI = (absoluteURI | relativeURI) absoluteURI = scheme ":" ("//" netpath | relativeURI) relativeURI = path ["?" querypart] netpath = domain [":" port] relativeURI path = *("/" segment) segment = *pchar *( ";" param )This implements the
Address
interface and provides
methods that access the various parts of the URI. The parameters
in the path segments of the uniform resource identifier are
stored in name value pairs. If parameter names are not unique
across the path segments then only the deepest parameter will be
stored from the path segment. For example if the URI represented
was http://domain/path1;x=y/path2;x=z
the value for
the parameter named x
would be z
.
This will normalize the path part of the uniform resource identifier. A normalized path is one that contains no back references like "./" and "../". The normalized path will not contain the path parameters.
The setPath
method is used to reset the path this
uniform resource identifier has, it also resets the parameters.
The parameters are extracted from the new path given.
| Field Summary |
|---|
| Fields inherited from class org.simpleframework.util.parse.Parser |
|---|
buf, count, off |
| Constructor Summary | |
|---|---|
AddressParser()
Default constructor will create a AddressParser
that contains no specifics. |
|
AddressParser(java.lang.String text)
This is primarily a convenience constructor. |
| Method Summary | |
|---|---|
java.lang.String |
getDomain()
This is used to retrive the domain of this URI. |
KeyMap<java.lang.String> |
getParameters()
This extracts the parameter values from the uniform resource identifier represented by this object. |
Path |
getPath()
This is used to retrive the path of this URI. |
int |
getPort()
This is used to retrive the port of the uniform resource identifier. |
Query |
getQuery()
This is used to retrieve the query of this URI. |
java.lang.String |
getScheme()
This allows the scheme of the URL given to be returned. |
protected void |
init()
This will empty each tokens cache. |
protected void |
parse()
This will check to see what type of URI this is if it is an absoluteURI or a relativeURI . |
void |
setDomain(java.lang.String value)
This will set the domain to whatever value is in the string parameter. |
void |
setPath(Path path)
This will set the path to whatever value it is given. |
void |
setPath(java.lang.String text)
This will set the path to whatever value it is given. |
void |
setPort(int port)
This will set the port to whatever value it is given. |
void |
setQuery(Query query)
This will set the query to whatever value it is given. |
void |
setQuery(java.lang.String value)
This will set the query to whatever value it is given. |
void |
setScheme(java.lang.String value)
This allows the scheme for the URI to be specified. |
java.lang.String |
toString()
This is used to convert this URI object into a String
object. |
| Methods inherited from class org.simpleframework.util.parse.Parser |
|---|
digit, ensureCapacity, parse, skip, space, toLower |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public AddressParser()
AddressParser
that contains no specifics. The instance will return
null
for all the get methods. The parsers
get methods are populated by using the parse
method.
public AddressParser(java.lang.String text)
String
given to extract the specifics. This
could be achieved by calling the default no-arg constructor
and then using the instance to invoke the parse
method on that String
to extract the parts.
text
- a String
containing a URI value| Method Detail |
|---|
public java.lang.String getScheme()
gopher://domain/path
is
a URI that is intended for the gopher protocol. The
scheme is the string gopher
.
getScheme
in interface Address
public java.lang.String getDomain()
http://domain/path?querypart
. This will
return the value of the domain part. If there is no
domain part then this will return null otherwise the
domain value found in the uniform resource identifier.
getDomain
in interface Address
public Path getPath()
/
to indicate the root.
The Path
object returned by this will contain
no path parameters. The path parameters are available using
the Address
methods. The reason that this does not
contain any of the path parameters is so that if the path is
needed to be converted into ab OS specific path then the path
parameters will not need to be separately parsed out.
getPath
in interface Address
public Query getQuery()
Query
object. The query is
an optional member of a URI and comes after the path part, it
is preceded by a question mark, ?
character.
For example the following URI contains query
for
its query part, http://host:port/path?query
.
This returns a org.simpleframework.http.Query
object that can be used to interact directly with the query
values. The Query
object is a read-only interface
to the query parameters, and so will not affect the URI.
getQuery
in interface Address
Query
object for the query partpublic int getPort()
http://host:port/path?querypart
. This
will return the value of the port. If there is no port then
this will return -1
because this represents
an impossible uniform resource identifier port. The port
is an optional part.
getPort
in interface Address
public KeyMap<java.lang.String> getParameters()
Map
instance.
This will produce unique name and value parameters. Thus if the
URI contains several path segments with similar parameter names
this will return the deepest parameter. For example if the URI
represented was http://domain/path1;x=y/path2;x=z
the value for the parameter named x
would be
z
.
getParameters
in interface Address
public void setScheme(java.lang.String value)
://
identifier
to ensure that the Address.toString
will
produce the correct syntax.
Caution must be taken to ensure that the port and
the scheme are consistent. So if the original URI
was http://domain:80/path
and the scheme
was changed to ftp
the port number that
remains is the standard HTTP port not the FTP port.
value
- this specifies the protocol this URI
is intended forpublic void setDomain(java.lang.String value)
toString
method will not contain
the domain. The result of the toString
method will be /path/path?query
. If the
path is non-null this URI will contain the path.
value
- this will be the new domain of this
uniform resource identifier, if it is not nullpublic void setPort(int port)
toString
will
will not contain the optional port. If port number is above
0 then the toString
method will produce a URI
like http://host:123/path
but only if there is
a valid domain.
port
- the port value that this URI is to havepublic void setPath(java.lang.String text)
Address.toString
method will
not contain the path, that is if path is null then it will be
interpreted as /
.
This will reset the parameters this URI has. If the value
given to this method has embedded parameters these will form
the parameters of this URI. The value given may not be the
same value that the getPath
produces. The path
will have all back references and parameters stripped.
text
- the path that this URI is to be set withpublic void setPath(Path path)
Address.toString
method
will not contain the path, that is if path is null then it will
be interpreted as /
.
This will reset the parameters this URI has. If the value
given to this method has embedded parameters these will form
the parameters of this URI. The value given may not be the
same value that the getPath
produces. The path
will have all back references and parameters stripped.
path
- the path that this URI is to be set withpublic void setQuery(java.lang.String value)
Address.toString
method
will not contain the query. If the query was abc
then the toString
method would produca a string
like http://host:port/path?abc
. If the query is
null this URI would have no query part. The query must not
contain the ?
character.
value
- the query that this uniform resource identifier
is to be set to if it is non-nullpublic void setQuery(Query query)
Address.toString
method
will not contain the query. If the Query.toString
returns null then the query will be empty. This is basically
the setQuery(String)
method with the string value
from the issued Query.toString
method.
query
- a Query
object that contains
the name value parameters for the queryprotected void parse()
absoluteURI
or a relativeURI
. To
see the definition of a URI see RFC 2616 for the definition
of a URL and for more specifics see RFC 2396 for the
expressions.
parse
in class Parser
protected void init()
toString
method has been called. Thus when the toString
method is called then the token depends on the value of the
cache alone in further calls to toString
.
However if a URI has just been parsed and that method has
not been invoked then the cache is created from the buf if
its length is greater than zero.
init
in class Parser
public java.lang.String toString()
String
object. This will only convert the parts of the URI that exist, so
the URI may not contain the domain or the query part and it will
not contain the path parameters. If the URI contains all these
parts then it will return somthing like
scheme://host:port/path/path?querypart
It can return /path/path?querypart
style relative
URI's. If any of the parts are set to null then that part will be
missing, for example if setDomain
method is invoked
with a null parameter then the domain and port will be missing
from the resulting URI. If the path part is set to null using the
setPath
then the path will be /
. An
example URI with the path part of null would be
scheme://host:port/?querypart
toString
in interface Address
toString
in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


|
Copper areas with electrical connectivity can become connected to another net during etching, resulting in a short. |
|
|
Reports a copper area connected to at least one drill, or that is exposed by SM, that could become shorted to another net which has at least one drill or SMD pad, as a result of enlarging Under Etch parameter. |
|
|
Set positive value to Under Etch parameter. |
|
|
|


The Voyages of Doctor Dolittle
by Hugh Lofting
Part 2, Chapter 3: Jip and the Secret
Additional Information
- Year Published: 1922
- Language: English
- Country of Origin: England
- Source: Lofting, H. (1922). The Voyages of Doctor Dolittle. London, England: Lippincott Publishing.
-
Readability:
- Flesch–Kincaid Level: 4.2
- Word Count: 938
- Genre: Fantasy
- Keywords: 20th century literature, british literature, children's literature
- ✎ Cite This
Downloads
When we reached the house the first question the Doctor asked of Dab-Dab in the hall was,
"Is Jip home yet?"
"No," said Dab-Dab, "I haven't seen him."
"Let me know the moment he comes in, will you, please?" said the Doctor, hanging up his hat.
"Certainly I will," said Dab-Dab. "Don't be long over washing your hands; the lunch is on the table."
Just as we were sitting down to luncheon in the kitchen we heard a great racket at the front door. I ran and opened it. In bounded Jip.
"Doctor!" he cried, "come into the library quick. I've got something to tell you—No, Dab-Dab, the luncheon must wait. Please hurry, Doctor. There's not a moment to be lost. Don't let any of the animals come—just you and Tommy."
"Now," he said, when we were inside the library and the door was closed, "turn the key in the lock and make sure there's no one listening under the windows."
"It's all right," said the Doctor. "Nobody can hear you here. Now what is it?"
"Well, Doctor," said Jip (he was badly out of breath from running), "I know all about the Hermit—I have known for years. But I couldn't tell you."
"Why?" asked the Doctor.
"Because I'd promised not to tell any one. It was Bob, his dog, that told me. And I swore to him that I would keep the secret."
"Well, and are you going to tell me now?"
"Yes," said Jip, "we've got to save him. I followed Bob's scent just now when I left you out there on the marshes. And I found him. And I said to him, 'Is it all right,' I said, 'for me to tell the Doctor now? Maybe he can do something.' And Bob says to me, 'Yes,' says he, 'it's all right because—'"
"Oh, for Heaven's sake, go on, go on!" cried the Doctor. "Tell us what the mystery is—not what you said to Bob and what Bob said to you. What has happened? Where IS the Hermit?"
"He's in Puddleby Jail," said Jip. "He's in prison."
"In prison!"
"Yes."
"What for?—What's he done?"
Jip went over to the door and smelt at the bottom of it to see if any one were listening outside. Then he came back to the Doctor on tiptoe and whispered,
"HE KILLED A MAN!"
"Lord preserve us!" cried the Doctor, sitting down heavily in a chair and mopping his forehead with a handkerchief. "When did he do it?"
"Fifteen years ago—in a Mexican gold-mine. That's why he has been a hermit ever since. He shaved off his beard and kept away from people out there on the marshes so he wouldn't be recognized. But last week, it seems these new-fangled policemen came to Town; and they heard there was a strange man who kept to himself all alone in a shack on the fen. And they got suspicious. For a long time people had been hunting all over the world for the man that did that killing in the Mexican gold-mine fifteen years ago. So these policemen went out to the shack, and they recognized Luke by a mole on his arm. And they took him to prison."
"Well, well!" murmured the Doctor. "Who would have thought it?—Luke, the philosopher!—Killed a man!—I can hardly believe it."
"It's true enough—unfortunately," said Jip. "Luke did it. But it wasn't his fault. Bob says so. And he was there and saw it all. He was scarcely more than a puppy at the time. Bob says Luke couldn't help it. He HAD to do it."
"Where is Bob now?" asked the Doctor.
"Down at the prison. I wanted him to come with me here to see you; but he won't leave the prison while Luke is there. He just sits outside the door of the prison-cell and won't move. He doesn't even eat the food they give him. Won't you please come down there, Doctor, and see if there is anything you can do? The trial is to be this afternoon at two o'clock. What time is it now?"
"It's ten minutes past one."
 Won't you please come? Perhaps if you spoke to the judge and told him what a good man Luke really is they'd let him off."
"Of course I'll come," said the Doctor getting up and moving to go. "But I'm very much afraid that I shan't be of any real help." He turned at the door and hesitated thoughtfully.
"And yet—I wonder—"
Then he opened the door and passed out with Jip and me close at his heels.


P2-E003¶
You are encouraged to familiarise yourself with a few topics prior to the exercise. The background section will provide you with some basic information and pointers. The exercise itself is designed to give you some practice in working with these concepts to give you a more intuitive grasp of them. The teacher will be able to supervise your during the exercise and explain the underlying theory if uncertainties remained during your preparation for the exercise.
Background¶
The Bayes Theorem allows you to from new data and update your knowlege about a system/model/hypothesis. This exercise is designed to introduce you to a different use for the same theorem in order to give you a more intuitive grasp of it. If you have completed previous exercises, you will have sufficient skill to work with provided datasets. To prepare for this exercise, you will need to familiarise yourself with the Bayes Theorem:
Make sure you understand each term. Reading about the basics of Naive Bayes Classifiers prior to the exercise will be an advantage.
Exercise¶
Information¶
Learning goals |
|
|---|---|
Skills |
|
What to Submit
Submit your script(s) and 1-2 sentence answers to the questions for the tasks of this exercise. You may include the answers as comments in your script(s). Make sure to also comment each of your calculations (using the terminology you were introduced to). The script should be named [your surname]_e103.[ext], where [ext] is the file extension. In case of Python, this would be .py, for Matlab it is .m, etc.
Bayesian Categorisation - Assigning Data to a Location¶
You are provided with ERA-Interim re-analysis data extracted from three different (southern hemisphere) locations (near weather stations) with different latitudinal and similar longitudinal coordinates:
Central Chile:
Antofagasta.cvs
Central-South Chile:
Quintero.cvs
South Chile:
Puerto_Montt_el_Tepual.cvs
Note
It is common practice in climatology to separate wind vectors into their meridional (along longitudes) and zonal (along latitudes) components. Those are denoted as v-winds and u-winds respectively.
For this exercise, you can assume that the wind directions at the locations of the weather stations represent fairly typical wind directions at these latitudes and are not affected much by local near-surface geographical disparities. Consequently, the station data is suitable for constructing models for wind directions at the three different latitudes.
Additionally, you are given a few different data points (of unknown origin) for June wind directions: 11.4°, -30.8°, 60.2°
You are interested in the latitudes the winds were probably measured at. Use Bayes theorem to update the probabilities for the wind direction models (see above) based on the wind direction data you are given.
HINT
Think carefully about how to take seasons into consideration when constructing your wind direction model.
Does it make sense to use wind direction in degrees for this exercise? Feel free to discuss with students and teachers.
Warning
Late submissions won’t be accepted!