Module ratchet.ssl.session
The ssl.session library provides an SSL encryption session. This session will apply to one encrypted session, such as a socket. These objects are not created directly, but are returned by ssl:create_session(). These functions can fail, see error handling section in manual for details.
Functions
| client_handshake (self) | Initiates the encryption handshake for the client-side connection, e.g. |
| get_cipher (self) | Gets the current SSL cipher. |
| get_engine (self) | Returns the communication engine powering the encrypted session, generally a socket object. |
| get_rfc2253 (self) | Gets a RFC 2253 string representation of the remote peer certificate. |
| read (self, maxlen) | Reads data on the encrypted session. |
| server_handshake (self) | Initiates the encryption handshake for the server-side connection, e.g. |
| shutdown (self, the) | Initiates a clean shutdown of the encryption session. |
| verify_certificate (self, host) | Checks the remote peer's certificate against the trusted CAs, and optionally checks that Common-Name field of the certificate matches the given host. |
| write (self, data) | Writes data on the encrypted session. |
Functions
- client_handshake (self)
-
Initiates the encryption handshake for the client-side connection, e.g. the socket that ran connect().
Parameters
- self: the ssl session object.
- get_cipher (self)
-
Gets the current SSL cipher.
Parameters
- self: the ssl session object.
Return value:
current cipher name. - get_engine (self)
-
Returns the communication engine powering the encrypted session, generally a socket object.
Parameters
- self: the ssl session object.
Return value:
the communication engine object. - get_rfc2253 (self)
-
Gets a RFC 2253 string representation of the remote peer certificate.
Parameters
- self: the ssl session object.
Return value:
see RFC 2253. - read (self, maxlen)
-
Reads data on the encrypted session. This method is rarely called directly, as it is usually called by the communication engine itself. For example, with socket objects, calling recv() after encrypt() will actually call this method. The return value will be an empty string if the other side has shut down.
Parameters
- self: the ssl session object.
- maxlen: optional maximum number of bytes to read.
Return value:
string of data received on the session, or nil on timeout. - server_handshake (self)
-
Initiates the encryption handshake for the server-side connection, e.g. the socket returned by accept().
Parameters
- self: the ssl session object.
- shutdown (self, the)
-
Initiates a clean shutdown of the encryption session.
Parameters
- self:
- the: ssl session object.
- verify_certificate (self, host)
-
Checks the remote peer's certificate against the trusted CAs, and optionally checks that Common-Name field of the certificate matches the given host.
Parameters
- self: the ssl session object.
- host: optional host to compare against "Common Name" field(s).
Return value:
a boolean if the peer provided a certificate, a boolean if the peer's certificate verified, and a boolean if host is provided and matches the certificate's "Common Name" field(s). - write (self, data)
-
Writes data on the encrypted session. This method is rarely called directly, as it is usually called by the communication engine itself. For example, with socket objects, calling send() after encrypt() will actually call this method.
Parameters
- self: the ssl session object.
- data: the data to send on the session.
Return value:
true if sent successfully, nil on timeout.


Easy on the couch -A seven day couchdb training course
couchdb is a document oriented database, written using a highly concurrent and fault tolerant programming language,erlang, that comes with an easy to use web api. All data within couchdb is stored as JSON. This combination of an http api and a data format that is universally understood makes couchdb one of the most easy to use database there is.
couchdb imposes no restrictions on your schema. You can easily adapt your documents to your changing business requirements. And to top it off couchdb allows you to execute server side javasript code which can be used to implement unique ways of extracting your data, transforming your documents, validating their properties, rendering templates and much more. Truth is once you start to get a hang of couchdb you will notice that the boundaries between a database and an application server start to blur. You start doing things that you never thought were even possible with a database.
Okay so what can I do with it?
Since data is stored as documents any problem that can be represented in terms of documents would be a good fit. This means that real world businesses or business transactions that involve a lot of documents would find themselves right at home with couchdb. You can develop solutions for:-
So who is using couchdb?
Lots of people. The folks at dimagi, for instance, are using it to build health care and logistics systems for developing countries. npm, the famed node js package manger uses couchdb to serve a ridiculous 356,273,496 packages per month.
Nope. couchdb has great documentation, one of the best I have seen in an opensource project. And all of it's available directly from within couchdb. If you take the time you can do it on your own, no problem. Sometimes however time is in short supply. Or maybe you are having difficulties in grasping some of the concepts of couchdb (" wait no dynamic queries!!!"). I can help if that is the case.
Rs. 89768 per person. Travelling expenses are not included. I offer a 100% money back guarantee (excluding of course the travelling expenses).
I am Akshat Jiwan Sharma, an independent consultant who helps businesses solve their technical problems. contact me at akshatjiwan@gmail.com


property BufferValid: Boolean; // protected
BufferValid specifies if the current content of the Buffer bitmap is up-to-date and whether the buffer needs to be repainted.
When TCustomPaintBox32 repaints itself, it checks whether the buffer is valid. If BufferValid is True, the control simply flushes its contents to the screen, otherwise, it executes DoPaintBuffer method, which updates the buffer and sets BufferValid to True, then it copies content of the buffer to the screen.
Normally, this property should not be accessed in your application, since TCustomPaintBox32 tracks the buffer state and updates it automatically.


Methods for regressing scalar responses on functional or image predictors, via transformation to the wavelet domain and back.
| Version: | 0.1 |
| Depends: | R (≥ 2.14.0), glmnet, wavethresh |
| Published: | 2014-07-11 |
| Author: | Lan Huo, Philip Reiss and Yihong Zhao |
| Maintainer: | Adam Ciarleglio <Adam.Ciarleglio at nyumc.org> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| In views: | FunctionalData |
| CRAN checks: | refund.wave results |
| Reference manual: | refund.wave.pdf |
| Package source: | refund.wave_0.1.tar.gz |
| Windows binaries: | r-devel: refund.wave_0.1.zip, r-release: refund.wave_0.1.zip, r-oldrel: refund.wave_0.1.zip |
| OS X binaries: | r-release: refund.wave_0.1.tgz, r-oldrel: refund.wave_0.1.tgz |
Please use the canonical form https://CRAN.R-project.org/package=refund.wave to link to this page.


Navigating Your Source Code
You can navigate your source code by making one or more selections in the project hierarchy, then viewing the results in the runtime list. Locating files and specific source code entities allows you to perform queries or other actions on them.
When you start a Developer Xpress session, the project hierarchy displays all the directories directly beneath the directory designated as the root model directory (as defined by *dislite.ModelSrcRoot in your Application Setting file).
Related Topics


|
Use Code:Love60
They tried... And they loved it.
Icon Sleep's straightforward approach earned us lots of praises and love.
Icon Sleep's straightforward approach earned us lots of praises and love.


Press the Virtual Keyboard icon to show a custom virtual keyboard.
This mathfield is configured to automatically show the default virtual keyboard on focus.
Press the Virtual Keyboard icon to show a custom virtual keyboard.
This mathfield is configured to automatically show the default virtual keyboard on focus.


Add one or more DNN security roles to a user
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
| --id | integer | true | User ID of user to which the roles will be added. If a number is passed as the first argument, you do not need to use the --id flag explicitly | |
| --roles | string | true | Comma-delimited string of DNN role names to apply to user. |
add-roles --id 23 --roles Editor
OR
add-roles 23 --roles Editor
OR
add-roles --id 23 "Editor"
add-roles --id 23 --roles "Article Reviewer"
add-roles --id 23 --roles "Editor, Writer, Article Reviewer"


@*
* Copyright 2023 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*@
@import uk.gov.hmrc.hmrcfrontend.views.html.helpers.HmrcLayout
@import uk.gov.hmrc.hmrcfrontend.views.html.components.HmrcReportTechnicalIssue
@this(
hmrcLayout: HmrcLayout,
appConfig: config.FrontendAppConfig,
hmrcReportTechnicalIssue: HmrcReportTechnicalIssue,
hmrcTimeoutDialogHelper: HmrcTimeoutDialogHelper,
)
@(
pageTitle: String,
backLinkEnabled: Boolean = true,
timeoutEnabled: Boolean = true
)(contentBlock: Html)(implicit request: RequestHeader, messages: Messages)
@headBlock = {
@if(timeoutEnabled) {
@hmrcTimeoutDialogHelper(
signOutUrl = controllers.routes.SessionExpiredController.onPageLoad.url,
message = Some(Messages("timeout.message")),
keepAliveButtonText = Some(Messages("timeout.continue")),
signOutButtonText = Some(Messages("timeout.exit"))
)
}
}
@content = {
@contentBlock
@hmrcReportTechnicalIssue(ReportTechnicalIssue(
serviceId = appConfig.contactFormServiceIdentifier,
language = if(messages.lang.code == "cy") Cy else En,
baseUrl = Some(appConfig.contactHost)
))
}
@hmrcLayout(
pageTitle = Some(s"$pageTitle – ${messages("service.name")} – ${messages("site.gov.uk")}"),
isWelshTranslationAvailable = true,
serviceUrl = Some(routes.IndexController.onPageLoad.url),
backLink = if(backLinkEnabled) Some(BackLink.mimicsBrowserBackButtonViaJavaScript) else None,
additionalHeadBlock = Some(headBlock),
additionalScriptsBlock = None,
signOutUrl = None,
phaseBanner = None
)(content)


--- layout: compress --- {% include head.html %} {% include navigation.html %} {{ content }} {% include call-to-action.html %} {% include footer.html %} {% include closure.html %}


14 killed as bandits attack Zamfara community
by Agency ReportZamfara State Police Command on Monday confirmed the killing of 14 persons and injuring of 10 others by bandits in Karaye village of Gummi Local Government Area of the state.
News Agency of Nigeria reports that the attack is the first major breach of the peace agreement between the state government and the bandits initiated by Governor Bello Matawalle.
A statement issued to newsmen in Gusau by the command’s Public Relations Officer, SP Muhammad Shehu said the attack occurred on Sunday.
According to him, a total of 14 persons were killed, 10 others sustained gunshot injuries while some houses were set ablaze.
Shehu recalled that on November 3, some members of a local vigilante group, known as “Yan Sakai” in Bardoki village, attacked and killed nine Fulanis under the suspicion that they were bandits.
He said on receiving the report, the command arrested 11 members of the vigilantes suspected of actively participating in the killing of the Fulanis.
The command’s spokesman said Sunday’s attack might have been a reprisal attack.
“The incident is being investigated by the State CID Gusau and all the suspects will be charged to court for prosecution in order to serve as a deterrent to others.
“However, combined teams attached to Operation puff Adder, men of Operation Hadarin-Daji and vigilantes led by the DPO Gummi mobilised to the scene and embarked on extensive bush combing with a view to trailing and arresting the perpetrators.
“Corpses and injured victims were conveyed to the General Hospital Gummi for autopsy and treatment, ” he explained.
(NAN)


World's biggest online car rental service
Etiam vel pellentesque velit, ut feugiat nisi. Nullam augue purus, facilisis et varius non, dignissim dapibus orci. Maecenas quis vulputate ligula, eu elementum lorem. Maecenas semper sodales ligula. Nam porta fermentum est nec blandit.
Popular Places
|
London, United Kingdom
Book your car
|
London, United Kingdom
Book your car
|
London, United Kingdom
Book your car
|
|
|
London, United Kingdom
Book your car
|
London, United Kingdom
Book your car
|
||
|
London, United Kingdom
Book your car
|
London, United Kingdom
Book your car
|
London, United Kingdom
Book your car
London, United Kingdom
Book your car


Upload:
Controls:
Page Up
/
Page Down
: Zoom out/in
Cursor keys
: Move camera
R
: Reset camera
N
: Toggle checker pieces
WSAD
: Move checker pieces


Enabling Middle-Schoolers at McCall, Meredith and Nebinger Public Schools to speak Mandarin.
Ends 11/15/2012 View details »
Help students learn with the tools of the modern world.
Ends 7/15/2012 View details »
A day camp that empowers middle school girls to become future technology leaders.
Ends 4/30/2012 View details »


Sep 16 05:03:21 carrera kernel: md: md2: data-check done. ( timestamp ) ( some data for this event )


How to simply setup a blockball game in order to use it on your personal server. 4 different setups help you to customize blockball to your needs.
All kinds of configuration and options to create a individual experience for your players.
Examples how to hook into BlockBall and modify it via custom code.


Bronchitis is an inflammation of the lining of your bronchial tubes, which carry air to and from your lungs. People who have bronchitis often cough up thickened mucus, which can be discolored. Bronchitis may be either acute or chronic.
Often developing from a cold or other respiratory infection, acute bronchitis is very common. Chronic bronchitis, a more serious condition, is a constant irritation or inflammation of the lining of the bronchial tubes, often due to smoking.
Acute bronchitis, also called a chest cold, usually improves within a week to 10 days without lasting effects, although the cough may linger for weeks.
However, if you have repeated bouts of bronchitis, you may have chronic bronchitis, which requires medical attention. Chronic bronchitis is one of the conditions included in chronic obstructive pulmonary disease (COPD).
During the first few days of illness, it can be difficult to distinguish the signs and symptoms of bronchitis from those of a common cold. During the physical exam, your doctor will use a stethoscope to listen closely to your lungs as you breathe.
In some cases, your doctor may suggest the following tests:
1. **Chest X-ray**. A chest X-ray can help determine if you have pneumonia or another condition that may explain your cough. This is especially important if you ever were or currently are a smoker.
2. **Sputum tests**. Sputum is the mucus that you cough up from your lungs. It can be tested to see if you have illnesses that could be helped by antibiotics. Sputum can also be tested for signs of allergies.
3. b. During a pulmonary function test, you blow into a device called a spirometer, which measures how much air your lungs can hold and how quickly you can get air out of your lungs. This test checks for signs of asthma or emphysema.
To reduce your risk of bronchitis, follow these tips:
1. **Avoid cigarette smoke**. Cigarette smoke increases your risk of chronic bronchitis.
2. **Get vaccinated**. Many cases of acute bronchitis result from influenza, a virus. Getting a yearly flu vaccine can help protect you from getting the flu. You may also want to consider vaccination that protects against some types of pneumonia.
3. **Wash your hands**. To reduce your risk of catching a viral infection, wash your hands frequently and get in the habit of using alcohol-based hand sanitizers.
4. **Wear a surgical mask**. If you have COPD, you might consider wearing a face mask at work if you're exposed to dust or fumes, and when you're going to be among crowds, such as while traveling.
A doctor may advise a person with bronchitis to:
1. rest
2. drink fluids
3. take over-the-counter (OTC) medications, such as ibuprofen
Taking OTC medication will help relieve a cough and ease any accompanying pain. In time, acute bronchitis will go away, often without treatment.
The symptoms of chronic bronchitis may resolve or improve for a while. However, they will come back or become worse again, especially if there is exposure to smoke or other triggers.
Options that may help include:
Cough medicine: Coughing is useful for removing mucus from the bronchial tubes, but medication can help bring relief, for example, at night.
Cough medicine is available for purchase online.
Taking honey: Taking 2 spoonfuls of honey may bring relief of cough symptoms.
Using a humidifier: This can loosen mucus, improve airflow, and relieve wheezing.
Bronchodilators: These open the bronchial tubes and may help clear out mucus.
Mucolytics: These loosen or thin mucus in the airways, making it easier to cough up sputum.
Anti-inflammatory and steroid drugs: These can help reduce inflammation that can cause tissue damage.
Oxygen therapy: In severe cases, a person may need supplemental oxygen to ease their breathing.
Behavioral remedies
Other strategies for treating bronchitis include the following:
1. removing a lung irritant, for example, by not smoking
2. exercising to strengthen the chest muscles to help breathing
3. improving breathing technique through pulmonary rehabilitation
Doing breathing exercises, such as pursed-lip breathing, can help slow down breathing, and make it more effective.
Antibiotics
If acute bronchitis results from a bacterial infection, a doctor may prescribe antibiotics. Taking antibiotics may also help prevent a secondary infection, in some cases.
These drugs are not suitable for a person with a virus, however.
Most doctors will not prescribe antibiotics unless they have identified bacteria as the cause of an illness. One of the reasons for this is concern about antibiotic resistance, as overuse of antibiotics makes it harder to treat an infection in the long term.


Chapter 2 556
2.1 Statistics and Sampling Distributions
2.1.1 Statistics
<IP_ADDRESS> Definition of Statistic
P.264
A fucntion of observable random variables, \(T=t(X_1, ... X_n)\), which does not depend on any unknown parameters is called statistic.
For example, let \(X_1, ..., X_n\) represent a random sample from a population with \(pdf \;f(x)\). The sample mean provides an example of a statistic with the function
\[t(x_1,...,x_n)=(x_1+...+x_n)/n\]
This statistic usually is denoted by
\[\bar{X}=\sum_{i=1}^n \frac{X_i}{n}\]
When a random sample is observed, the value of \(\bar{X}\), computed from the data, usually is denoted by lower case \(\bar{x}\).
\[\bar{x}=\sum_{i=1}^n \frac{x_i}{n}\]
<IP_ADDRESS> Sample and parameters
P.265
If \(X_1,..., X_n\) denotes a random sample from \(f(x)\) with \(E(X)=\mu\) and \(var(X)=\sigma^2\), then
\[E(\bar{X})=\mu\]
\[Var(\bar{X})=\frac{\sigma^2}{n}\]
Example:
A random sample of size \(n\) from a Bernoulli distribution \(X_i \sim BIN(1,p)\). We know Bernoulli has \(\mu=p\) and \(\sigma^2 =pq\). In this case, the sample mean is
\[\bar{X}=Y/n=\hat{p}\]
Thus,
\[E(\hat{p})=p\]
\[Var (\hat{p})=\frac{pq}{n}\]
Thus, sample mean is the unbiased estimate for the population mean. However, the variance of the mean is not equal to population variance. That lead to definition of sample variance.
P.266
Sample variance:
\[S^2=\frac{1}{n-1}\sum_{i=1}^n(X_i-\bar{X})^2\]
\[E(S^2)=\sigma^2\]
(Question: does it mean that sample varaince is an unbiased estimator of population variance?)
2.1.2 \(\chi^2, t, F, beta\)
<IP_ADDRESS> \(\chi^2\)
P.271
If \(X_1,...,X_n\) denotes a random sample from \(N(\mu,\sigma^2)\), then
\[\sum_{i=1}^n \frac{(X_i-\mu)^2}{\sigma^2} \sim x^2(n)\] \[\frac{n(\bar{X}-\mu)^2}{\sigma^2}\sim x^2(1)\]
\[\frac{(n-1)S_n^2}{\sigma^2} \sim \chi^2(n-1)\] (Thus, we can see this is a bit weired, as the numerator is \(\bar{X}\) is from the sample, whereas \(\sigma^2\) is from the population. Thus, assume we know \(\sigma^2\)?)
Thus, we can
\[\frac{\sum_{i=1}^n(X_i-\bar{X})^2}{\sigma^2}\sim \chi^2(n-1)\] (You can compare \(\bar{X}\) with \(\mu\), we can see the only difference is that the \(\chi^2\) has one less degree of freedom because we use this degree of freedom to calculate the mean.)
For the mean and variance of \(\chi^2\):
Assume that
\[X \sim x^2(v)\]
\[mean:v\] \[variance: 2v\]
<IP_ADDRESS> \(t\)
Definition
\[t(k)=\frac{N(0,1)}{\sqrt{\frac{\chi^2(k)}{k}}}\]
Property 1
t distribution is symmetrical.
Given that t distribution is symmetrical, we can get
\[H(-c)=1-H(c)\]
Property 2
t distribution has heavier tails than the normal.
My note: t distribution only has a parameter of \(k\), which is determined by the \(\chi^2\)’s degree of freedom. Of course, \(\chi^2\) also only has one parameter, namely the degree of freedom.
<IP_ADDRESS> \(F\)
If \(V_1 \sim \chi^2(v_1)\) and \(V_2 \sim \chi^2(v_2)\) are independent, then the random variable
\[\frac{V_1/v_1}{V_2/v_2}\sim F(v_1,v_2)\]
<IP_ADDRESS> Beta
If \(X \sim F(v_1, v_2)\)
\[Y=\frac{(v_1/v_2)X}{1+(v_1/v_2)X} \sim Beta(\alpha, \beta)\]
2.1.3 Large-sample approximations
P.280
If \(Y_v \sim x^2(x)\), then
\[Z_v =\frac{Y_v-v}{\sqrt{2v}} \xrightarrow{d} Z \sim N(0,1)\]
(The proof is based on CLT. In addition, as disscused above, we can get chi-square from normal distributions.)
2.2 Point Estimation
2.2.1 Method of moments estimators
<IP_ADDRESS> Definition about moments (chapter 2)
P.73
THe kth moment about the origin of a random variable \(X\) is
\[\mu^{'}_k=E(X^k)\]
and the kth moment about the mean is
\[\mu_k=E[X-E(X)]^k=E(X-\mu)^k\]
Thus,\(k=E(X^k)\) may be considered as the \(k\)th moment of \(X\) or the first moment of \(X^k\).
The first moment about the mean is zero,
\[\mu_1=E[X-E(X)]=E(X)-E(X)=0\]
The second moment about the mean is the variance,
\[\mu_2=E[(X-\mu)^2]=\sigma^2\]
Note that the definition of variance:
P.73
\[Var(X)=E[(X-\mu)^2]\]
( Note: Based on the information above, it seems important to understand the difference between the moment of the origin and the moment of the mean. )
<IP_ADDRESS> Definition
Based on the last chapater (i.e., Chapter 8), sample mean \(\bar{X}\) is an estimator of the population mean \(\mu\). A more general approach, which produced estimators known as the method of moments estimators(MMEs) , can be developed.
If \(X_1,...,X_n\) is a random sample from \(f(x; \theta_1,...,\theta_k)\), the first \(k\) sample moments are given by
\[M_j^{'}=\frac{\sum_{i=1}^n X_i^j}{n}\]
where,
\[j=1,2,...k\]
Example 1:
P.291
Consider a random sample from a distribution with two unknown parameters, the mean \(\mu\) and the variance \(\sigma^2\). We know from earlier considerations that \(\mu=\mu^{'}_1\) and \(\sigma^2=E(X^2)-\mu^2=\mu_2^{'}-(\mu^{'}_1)^2\).
Thus,
\[\hat{\sigma}^2=\mu_2^{'}-(\mu^{'}_1)^2=\frac{\sum_{i=1}^n X_i^2}{n}-\bar{X}^2=\sum_{i=1}^n \frac{(X_i-\bar{X})^2}{n}\]
(Thus, we can see that the MME estimation of \(\sigma^2\) is not the same as the definition of sample variance \(S^2\). \(\hat{\sigma}^2=\frac{n-1}{n}S^2\). So, the MME estimator is not an unbiased one?)
Example 2:
P.292
If a sample is from a Gamma distribution \(X_i \sim GAM(\theta,k)\), and we want to estimate the \(\theta\) and \(k\).
We know that for Gamma distribution, the mean is \(k\theta\), and the variance is \(k\theta^2\).
We also know that
\[\mu_1^{'}=\mu=k\theta\]
and
\[\mu_2^{'}= \sigma^2+\mu^2= k\theta^2+k^2\theta^2=k\theta^2(1+k)\].
Thus, we can get
\[\bar{X}=k\theta\]
\[\sum \frac{X_i^2}{n}=k\theta^2(1+k)\]
Thus, we can get
\[\hat{\theta}=\sum_{i=1}^n \frac{(X_i-\bar{X})^2}{n \bar{X}}=\frac{(n-1)/n S^2}{\bar{X}}\]
\[\hat{k}=\frac{\bar{X}}{\hat{\theta}}\]
( Note: To sum up, (1) we know how to calculate moments based on sample. And, (2) we know that connection between moment and parameter of mean and variance. Thus, combining (1) and (2), we can get the estimators for the parameters. )
<IP_ADDRESS> Property
The joint MGF of (\(X_1, ..., X_n\)) is defined as \(M(t_1,...,t_n)=E(e^{\sum_{i=1}^nt_iX_i})\)
When \(X_1, ..., X_n\) are independent if and only if
\[M(t_1,...,t_n)=\prod_{i=1}^n M_{X_i}(t_i)\] where \(M_{X_i}(t_i)\) is the MGF of \(X_i\)
<IP_ADDRESS> Well-known MGF
Bernoulli with success probability \(p\): \(1-p+pe^t\)
Binomial \(Bin(n,p)\): \((1-p+pe^t)^n\)
Poisson \(POI(\lambda)\): \(e^{\lambda(e^t-1)}\)
Normal \(N(\mu,\sigma^2)\): \(e^{\mu t+\frac{1}{2}\sigma^2t^2}\)
Gamma \(GAM(\theta,k)\): \((1-\theta t)^{-k}\)
Two special cases:
Chi-square \(\chi^2(v) =GAM(2,\frac{v}{2})\): \((1-2t)^{-\frac{v}{2}}\)
Exponential \(EXP(\theta)=GAM(\theta,1)\): \((1-\theta t)^{-1}\)
2.2.2 least squares estimators
2.2.3 likelihood function and maximum likelihood estimators
<IP_ADDRESS> Likelihood function
P.293
The joint density function of \(n\) random variables \(X_1,...X_n\) evaluated at \(x_1, ...x_n\), say \(f(x_1,...,x_n; \theta)\), is referered to as a likelihood function.
<IP_ADDRESS> Maximum likelihood estimators
P.294
Let \(L(\theta)=f(x_1,...x_n; \theta), \theta \in \Omega\), be the joint pdf of \(X_1, ..., X_n\). For a given set of observations, \((x_1,...x_n)\), a value \(\hat{\theta}\) in \(\Omega\) at which \(L(\theta)\) is a maximum is called a maximum likelihood estimate (MLE) of \(\theta\). That is \(\hat{\theta}\) is a value of \(\theta\) that satisfies
\[f(x_1,...x_n; \theta)=MAX_{\theta \in \Omega} f(x_1, ..., x_n; \theta)\]
2.2.4 Invariance property of MLEs
P.296
If \(\hat{\theta}\) is the MLE of \(\theta\) and if \(u(\theta)\) is a function of \(\theta\), then \(u(\hat{\theta})\) is an MLE of \(u(\theta)\).
Example 1:
We know that the \(pdf\) of exponential distribution (\(X \sim EXP (\theta)\)) is as follows:
\[\frac{1}{\theta} e^{-\frac{X}{\theta}}\]
Thus, its likelihood function is as follows
\[L(\theta)=\frac{1}{\theta^n}e^{-\frac{\sum X_i}{\theta}}\] Thus, log-likelihood is as follows.
\[lnL(\theta)=-n ln(\theta)-\frac{\sum X_i}{\theta}\] Thus,
\[\frac{d}{d\theta} lnL(\theta)=-n \frac{1}{\theta}+\frac{\sum X_i}{\theta^2}\]
Thus, we can get the \(MLE\) for \(\theta\) is \(\hat{\theta}=\bar{x}\).
If we want to estimate \(\tau(\theta)=P(X \geq 1)\):
\[\tau(\theta)=P(X\geq 1)=\int_1^{\infty} \frac{1}{\theta} e^{-\frac{X}{\theta}} dx=-\int_1^{\infty} e^{-\frac{X}{\theta}} d(-\frac{x}{\theta})=-[e^{-\frac{X}{\theta}}]_1^{\infty}=-[0-e^{-\frac{1}{\theta}}]=e^{-\frac{1}{\theta}}\]
Thus, based on the invariance property, we know that the \(MLE\) for \(\tau(\theta)\) is as follows.
\[e^{-\frac{1}{\bar{x}}}\]
Example 2: MLE vs. MME
P.296
Assume a random sample from a two-parameter exponential distribution, \(X_i \sim EXP(1,\eta)\). Thus, the \(pdf\) is \(e^{-(x-\eta)}\). Thus, the likelihood function is
\[L(\eta)=e^{-\sum(x_i-\eta)}\]
Thus, the log likelihood,
\[lnL(\eta)=-\sum(x_i-\eta)=n\eta-n\bar{X}\] Thus, we know that as \(\eta\) increases, the log likelihood increases accordingly. Thus, we want to find the maximum \(\eta\). Note that a two-parameter exponential distribution has the support of \(x_i \geq \eta\). Thus, all \(\eta\) are smaller than any \(X_i\). Thus, we can get the ML estimator is the first order statistic
\[\hat{\eta}=X_{1:n}\]
Note that the estimators above is based on ML. What would be the answer if using MME?
We know that for a two-parameter exponential distribution, its mean is \(\mu=1+\eta\). And, we know that based on MME, \(\mu=\bar{X}\). Thus, we can get the following,
\[\hat{\eta}=\bar{X}-1\]
Conclusion
We can see that ML and MME have didferent estimators for the same \(\eta\) for a two-parameter exponential distribution.
2.2.5 Unbiased estimators
An estimator \(T\) is said to be an unbiased estimator of \(\tau(\theta)\) if
\[E(T)=\tau(\theta)\]
for all \(\theta \in \Omega\). Otherwise, we said that \(T\) is biased stimator of \(\tau(\theta)\).
For instance, if we want to estimate a percentile, say the 95th percentile of \(N(\mu,9)\). Note that the percentiles that we know are about standardized noraml (i.e., \(N(0,1)\)). Thus, we need to have some calculation to get the non-standard one.
\[\frac{X_{95 \; percentile}-\mu}{\sigma}=1.645\] Thus, we can get
\[X_{95 \; percentile}=1.645 \times \sigma +\mu\]
We know that \(\bar{X}\) is the unbiased estimate for \(\mu\). Thus, we can get
\[X_{95 \; percentile}=1.645 \times \sigma +\mu=4.94+\mu\]
We know that
\[E(T)=E(\bar{X}+4.94)=\mu+4.94\] Thus, \(T=\bar{X}+4.94\) is the unbiased estimator of \(\tau(\mu)=\mu+4.94\).
2.2.6 Unbiased estimators vs. Invariance property of MLEs
Do not apply “Invariance property of MLEs” to the Unbiased estimators.
( Note that: You can apply the Invariance property to “Unbiased estimators” when it is a linear combination. In that case, \(E(a\theta+b)=aE(\theta)+b\). Thus, if you find a \(T\) that is a unbiased estimator for \(\theta\), it should be unbiased estimator for \(a\theta+b\) as well. Thus, note that \(\frac{1}{\theta}\) is not a linear combination of \(\theta\), thus \(\frac{1}{\theta}\) has a very different estimator, compared to \(\theta\).)
P.303
For example, consider a random sample of size \(n\) from an exponential distribution, \(X_i \sim EXP(\theta)\), with parameter \(\theta\). We know that, \(\bar{X}\) is unbiased for \(\theta\) (which is the mean of an exponential distribution).
If we want to estimate \(\tau(\theta)=\frac{1}{\theta}\), then by the invariance property of MLE is \(T_1=\frac{1}{\bar{X}}\).
However, \(T_1\) is a biased estimators of \(\frac{1}{\theta}\). Specifically,
We know that if \(X \sim Gam(\theta,k)\), then \(Y=\frac{2X}{\theta} \sim x^2(2k)\). We know that exponential distributions are a specicial case of Gamma distribution, \(EXP(\theta)=Gam(\theta,1)\), thus we get the following,
\[Y=\frac{2n\bar{X}}{\theta}=\frac{2n}{\theta} \frac{\sum_{i=1}^n X_i}{n}=\frac{\sum_{i=1}^n 2X_i}{\theta}\sim\sum_{i=1}^n x^2(2\cdot1)=\sum_{i=1}^n x^2(2)=x^2(2n)\]
We further know that if \(Y \sim x^2(v)\), \(E(Y^r)=2^r\frac{\Gamma(v/2+r)}{\Gamma(v/2)}\). Thus, we know that,
\[E(Y^{-1})=2^{-1} \frac{\Gamma(2n/2-1)}{\Gamma(2n/2)}=\frac{1}{2}\cdot \frac{1}{n-1}\]
Thus,
\[E(Y^{-1})=E(\frac{\theta}{2n \bar{X}})=\frac{\theta}{2n}E(\frac{1}{\bar{X}})=\frac{1}{2}\cdot \frac{1}{n-1}\]
Thus.
\[E(\frac{1}{\bar{X}})=\frac{1}{n-1}\frac{n}{\theta}=\frac{n}{n-1}\frac{1}{\theta}\]
Thus,
\[E(\frac{n-1}{n} \frac{1}{\bar{X}})=\frac{1}{\theta}\]
Conclusion:
\(\frac{1}{\bar{X}}\) is not the unbiased estimator for \(\frac{1}{\theta}\). However, we can adjust it to \(\frac{n-1}{n} \frac{1}{\bar{X}}\), which is the unbiased estimator for \(\frac{1}{\theta}\). When the sample size is big enough, we know that \(\frac{n-1}{n}\) will be close to 1.
2.2.7 UMVUE and Cramer-Rao lower bound
<IP_ADDRESS> UMVUE
Let \(X_1, X_2,...,X_n\) be a random sample of size \(n\) from \(f(x; \theta)\). An estimator \(T^*\) of \(\tau (\theta)\) is called a uniformly minimum variance ubiased estimator (UMVUE) of \(\tau(\theta)\) if
\(T^*\) is unbiased for \(\tau (\theta)\).
For any other unbiased estimator \(T\) of \(\tau(\theta)\), \(Var(T^*) \leq Var(T)\) for all \(\theta \in \Omega\).
<IP_ADDRESS> Cramer-Rao lower bound
If \(T\) is an unbiased estimator of \(\tau(\theta)\), then the Cramer-Rao lower bound (CRLB), based on a random sample, is
\[Var(T)=\frac{[\tau^{'}(\theta)]^2}{nE[\frac{\partial}{\partial \theta} ln f(X; \theta)]^2}\]
Example:
Consider a random sample from an exponential distribution, \(X_i \sim Exp(\theta)\). Because
\[f(x; \theta)=\frac{1}{\theta} e^{-\frac{x}{\theta}}\]
Thus,
\[ln(f(x;\theta))=-\frac{x}{\theta}-ln \theta\]
\[\frac{\partial}{\partial \theta} ln(f(X; \theta))=\frac{X}{\theta^2}-\frac{1}{\theta}=\frac{X-\theta}{\theta^2}\]
Thus,
\[E[\frac{\partial}{\partial \theta} ln(f(X; \theta))]^2 =E[\frac{(X-\theta)^2}{\theta^4}]=\frac{1}{\theta^4}E(X-\theta)^2=\frac{1}{\theta^4} Var(X)=\frac{\theta^2}{\theta^4}=\frac{1}{\theta^2}\]
Thus, the CRLB for \(\tau(\theta)=\theta\) is as follows.
\[Var(T) \geq \frac{[\tau^{'}(\theta)]^2}{nE[\frac{\partial}{\partial \theta} ln f(X; \theta)]^2}=\frac{[\frac{\partial }{\partial \theta}\theta]^2}{n \frac{1}{\theta^2}}=\frac{1^2}{\frac{n}{\theta^2}}=\frac{\theta^2}{n}\]
We know that the variance for the sample mean of the exponential distribution:
\[Var(\bar{X})=\frac{Var(X)}{n}=\frac{\theta^2}{n}\]
In addition, we also know that sample mean \(\bar{X}\) is the unbiased estimator for population mean.
Thus,
\(\bar{X}\) is the UMVUE of \(\theta\).
2.2.8 Best linear unbiased estimation (BLUE or MVLUE)
https://statisticsbyjim.com/regression/gauss-markov-theorem-ols-blue/
The Gauss-Markov theorem states that if you linear regression satisfies the first 6 classical assumption, the Ordinary least squares (OLS) produces unbiased estimates that have the smallest variable of all possible linear estimators.
The Gauss-Markov theorem famously states that OLS is (Best Linear Unbiased Estimator) BLUE.
In this context, best refers to the minimum variance.
MULUE: Minimum Variance Linear Unbiased Estimate
https://link.springer.com/chapter/10.2991/978-94-91216-83-1_13
2.2.9 Consistency, asymptotic unbiasedness
Simple consistency:
P.311
Let \(\{T_n\}\) be a sequence of estimators of \(\tau(\theta)\). These estimators are said to be consistent estimators of \(\tau(\theta)\) if for every \(\varepsilon >0\),
\[lim_{n\rightarrow \infty}P[|T_n-\tau(\theta)|<\varepsilon]=1\]
for every \(\theta \in \Omega\).
In the terminology of Chapter 7, \(T_n\) converges stochastically to \(\tau(\theta)\), \(T_n \xrightarrow{P} \tau(\theta)\) as \(n \rightarrow \infty\). Sometimes this also is referred to as simple consistency.
One interpretation of consistency is that for large sample size the estimator tends to be more concentrated about \(\tau(\theta)\), and by making \(n\) sufficiently large \(T_n\) can be made as concentrated as desired.
MSE consistency:
If \(\{ T_n \}\) is a sequence of estimator of \(\tau(\theta)\), then they are called mean squared error consistent if
\[lim_{n\rightarrow \infty} E[T_n - \tau(\theta)]^2=0\]
for every \(\theta \in \Omega\).
Asymptotic Unbiased
A sequence \(\{ T_n \}\) is said to be asymptotically unbiased for \(\tau(\theta)\) if
\[lim_{n\rightarrow \infty} E(T_n)=\tau(\theta)\]
for every \(\theta \in \Omega\).
Example:
P.313
For a sample from \(X_i \sim EXP(\theta)\), we know that \(T_n=1/ \bar{X}\) is an MLE estimator for \(\tau(\theta)=1/\theta\). Howwever, \(T_n\) is not a unbiased estimator for \(\tau(\theta)\), as
\[E(T_n)=\frac{n}{n-1}\cdot \frac{1}{\theta}\]
We also know that
\[Var(T_n)=\frac{(\frac{n}{n-1})^2}{(n-2)\theta^2}\]
Thus, while \(T_n\) is not unbiased, it is asymptotically unbiased and MSE consistent for \(\tau(\theta)=\frac{1}{\theta}\).
Note that, MSE consistency is a stronger property than simple consistency. Thus, if a sequenc \(\{T_n\}\) is mean squared error consistent, it is also simply consistent.
2.2.10 Efficiency
P.308
The relative efficiency of an unbiased estimator \(T\) of \(\tau(\theta)\) to another unbiased estimator \(T^*\) of \(\tau(\theta)\) is given by
\[re(T, T^*)=\frac{Var(T^*)}{Var(T)}\]
An unbiased estimator \(T^*\) of \(\tau(\theta)\) is said to be efficient if \(re(T, T^*) \leq 1\) for all unbiased estimators \(T\) of \(\tau(\theta)\), and all \(\theta \in \Omega\). The efficiency of an unbiased estimator \(T\) of \(\tau(\theta)\) is given by
\[e(T)=re(T, T^*)\]
if \(T^*\) is an efficient estimator of \(\tau(\theta)\).
Thus, an effecient estimator is just a UMVUE.
Example:
P.233 Example 7.2.2
P.303 Example 9.3.2
P.309 Example 9.3.7
Let \(X_1,X_2,...,X_n\) sample from \(X_i \sim EXP(\theta)\). We know that
\[X_{1:n}=EXP(\theta/n)\]
Thus,
\[E(nX_{1:n})=nE(X_{1:n})=n\frac{\theta}{n}=\theta\] Thus,
\[nX_{1:n}\] is the unbiased estimator for \(\theta\).
Thus,
\[re(T,T^*)=\frac{Var(T^*)}{Var(T)}=\frac{Var(\bar{X})}{Var(nX_{1:n})}=\frac{\theta^2/n}{n^2Var(X_{1:n})}=\frac{\theta^2/n}{n^2(\theta/n)^2}=\frac{\theta^2/n}{\theta^2}=\frac{1}{n}\] Thus, \(T^*=\bar{X}\) is a more efficient estimator for \(\theta\) than \(T=nX_{1:n}\).
2.2.11 Asymptotic efficiency
Let \(\{T_n\}\) and \(\{T_n^*\}\) be the two asymptotically unbiased sequences of estimators for \(\tau(\theta)\). The asymptotic relative efficiency of \(T_n\)relative to \(T_n^*\) is given by
\[are(T_n,T_n^*)=lim_{n \rightarrow \infty} \frac{Var(T_n^*)}{Var(T_n)}\] The sequence \(\{T_n^*\}\) is said to asymptotically efficient if \(are\{T_n, T_n^*\} \leq 1\) for all other asymptotically unbiased sequences \(\{T_n\}\), and all \(\theta \in \Omega\).
2.2.12 Asymptotic properties of MLEs
P.316
If certain regularity conditions are satisfied, then the solutions, \(\hat{\theta}\), of the MLE have the following properties:
\(\hat{\theta_n}\) exists and is unique.
\(\hat{\theta_n}\) is a consistent estimator of \(\theta\).
\(\hat{\theta_n}\) is asymptotically normal with asymptotic mean \(\theta\) and variance
\[\frac{1}{2}E[\frac{\partial}{\partial\theta}ln \; f(X;\theta)]^2\]
- \(\hat{\theta}\) is asymptotically efficient.
Note that the asymptotic efficiency of \(\hat{\theta}\) follows from the fact that the asymptotic variance is the same as the CRLB for unbiased estimators of \(\theta\). Thus, for large \(n\), approximately
\[\hat{\theta_n} \sim N(\theta, CRLB)\]
Example
P.317
From Example 9.2.7, we know the MLE of the mean \(\theta\) of an exponential distribution is the sample mean, \(\hat{\theta_n}=\bar{X}\).
We can infer the same asymptotic properties either from the discussion above or from the Central Limit Theorem. That is, \(\hat{\theta_n}\) is asymptotically normal with asymptotic mean \(\theta\) and variance \(\theta^2/n\). From example 9.3.4, we know that \(CRLB=\theta^2/n\).
Thus,
\[\sqrt{n}\frac{\hat{\theta_n}-\theta}{\theta}\sim N(0,1)\]
2.3 Sufficient and completeness
2.3.1 Sufficiency and minimal sufficiency
P.335
Sufficient statistic:
A statistic \(S\) will be consiered a “sufficient” statistic for a parameter \(\theta\) if the conditional distribution of any other statistic \(T\) given the value of \(S\) does not involve \(\theta\).
Jointly sufficient statistics:
Let \(X=(X_1,...,X_n)\) have joint pdf \(f(x,\theta)\), and let \(S=(S_1,...,S_k)\) be a k-dimensional statistic.
Then, \(S_1,...,S_k\) is a set of jointly sufficient statistics for \(\theta\) if for any other vector of statistics, \(T\), the conditional pdf of \(T\) given \(S=s\), denoted by \(f_{T|s}(t)\), does not depend on \(\theta\).
In the one-dimension case, we simply say that \(S\) is a sufficient statistic for \(\theta\).
If \(k\) unknown parameters are present in the model, then quite often there will exist a set of \(k\) sufficient statistics. In some cases, the number of sufficient statistics will exceed the number of parameters.
Minimal sufficient:
A set of statistics is called a minimal sufficient set if the members of the set are jointly sufficient for the parameters and if they are a function of every other set of jointly sufficient statistics.
In other words, once the value of a sufficient statistic is known, the observed value of any other statistic does not contain any further inforamtion about the parameter.
Example:
P.339
Assume a random sample from an exponential distribution, \(X_i \sim EXP(\theta)\). It follows that
\[f(x_1,...,x_n; \theta)=\frac{1}{\theta^n} e^{-\frac{\sum X_i}{\theta}}\] which suggests checking the stastic \(S=\sum X_i\). We know that \(S \sim GAM(\theta,n)\), thus
\[f_S(s; \theta)=\frac{1}{\theta^n \Gamma(n)}s^{n-1}e^{-\frac{s}{n}}\]
If \(s=\sum x_i\), then,
\[\frac{f(x_1,...,x_n; \theta)}{f_S(s;\theta)}=\frac{\Gamma(n)}{s^{n-1}}\]
which is free of \(\theta\), and thus by definition S is sufficient for \(\theta\).
2.3.2 Neyman factorization theorem, minimal sufficiency of MLEs
Factorization criterion:
If \(X_1,...,X_n\) have joint pdf \(f(x_1,...,x_n; \theta)\), and if \(S=(S_1,...,S_n)\), then \(S_1,...,S_k\) are joinly sufficient for \(\theta\) if and only if
\[f(x_1,...x_n; \theta)=g(s;\theta)h(x_1,...,x_n)\] where \(g(s;\theta)\) does not depend on \(x_1,...,x_n\), except through \(s\), and \(h(x_1,...,x_n)\) does not involve \(\theta\).
Example 1:
P.340
\(X_i \sim Bin(1,\theta)\). We can use factorization criterion to check its sufficient statistic.
\[f(x_1,...,x_n;\theta)=\theta^{\sum x_i}(1-\theta)^{n-\sum x_i}=\theta^s(1-\theta)^{n-s}=g(s;\theta)h(x_1,...,x_n)\]
where \(s=\sum X_i\) and \(h(x_1,...x_n)=1\). Thus, \(s\) is sufficient for \(\theta\).
Example 2:
It is important to specify the regions of zero probability. The following shows that care must be exercised in this matter.
P.340
\(X_i \sim UNIF(0,\theta)\), where \(\theta\) is unknown. We get the joint \(pdf\) of \(X_1,...,X_n\) is
\[f(x_1,...x_n; \theta)=\frac{1}{\theta^n}\] where,
\[0<x_i<\theta\]
It is easier to specify this \(pdf\) in terms of the minimum, \(x_{1:n}\), and maximum, \(x_{n:n}\), of \(x_1,...,x_n\). In particular,
\[0< x_{1:n} \; \; x_{n:n} <\theta\]
Thus, \(x_{n:n}\) is sufficient for \(\theta\).
Example 3:
P.341
Consider a random sample from a normal distribution, \(X_i \sim N(\mu, \sigma^2)\).
We know the \(pdf\) for normal is
\[f=\frac{1}{\sqrt{2\pi \sigma^2 }} e^{-\frac{1}{2\sigma^2}(x-\mu)^2}\]
Thus, the joint \(pdf\) is as follows.
\[\begin{aligned} f(x_1,...,x_n;\mu,\sigma^2) &=\frac{1}{(2\pi\sigma^2)^{\frac{n}{2}}}e^{-\frac{1}{2\sigma^2}\sum (x_i-\mu)^2} \\ &=\frac{1}{(2\pi\sigma^2)^{\frac{n}{2}}}e^{-\frac{1}{2\sigma^2}\sum (x_i^2+\mu^2-2x_i\mu)} \\ &=\frac{1}{(2\pi\sigma^2)^{\frac{n}{2}}}e^{-\frac{1}{2\sigma^2}(\sum x_i^2+n\mu^2-2\mu\sum x_i)} \end{aligned}\]
Thus, \(S_1=\sum X_i\) and \(S_2=\sum X_i^2\) are jointly sufficient for \(\theta={\mu, \sigma^2}\).
Note that,
P.341
based on P.298 , Example 9.2.10, ML estimation results in
\[\hat{\mu}=\bar{x}\] \[\hat{\sigma^2}=\frac{\sum(x_i-\bar{x})^2}{n}\]
Further, note that
\[\hat{\mu}=\bar{x}=\frac{S_1}{n}\]
\[\begin{aligned} \hat{\sigma^2}&=\frac{\sum(x_i-\bar{x})^2}{n}=\frac{\sum (x_i^2+\bar{x}^2-2x_i\bar{x})}{n} \\ &=\frac{\sum x_i^2+n\bar{x}^2-2\bar{x} \sum x_i}{n} \\ &=\frac{\sum x_i^2+n\bar{x}^2-2n\bar{x}^2}{n} \\&=\frac{\sum x_i^2-n\bar{x}^2}{n} \\&=\frac{\sum x_i^2}{n}-\bar{x}^2 \\ &=\frac{\sum x_i^2}{n}- (\frac{\sum x_i}{n})^2 \\ &=\frac{S_2}{n}-(\frac{S_1}{n})^2 \end{aligned}\]
Thus, we can see that \(\hat{\mu}\) and \(\hat{\sigma^2}\) correspond to a one-to-one stransformation of \(S_1\) and \(S_2\), thus \(\hat{\mu}\) and \(\hat{\sigma^2}\) also are jontly sufficient for \(\mu\) and \(\sigma^2\).
2.3.3 Rao-Blackwell theorem
Let \(X_1,...,X_n\) have joint \(pdf \; f(x_1,...,x_n; \theta)\), and let \(S=(S_1,...,S_k)\) be a vector of jointly sufficient statistics for \(\theta\). If \(T\) is any unbiased estimator of \(\tau(\theta)\), and if \(T^*=E(T|S)\), then
\(T^*\) is an unbiased estimator of \(\tau(\theta)\),
\(T^*\) is a function of \(S\), and
\(Var(T^*) \leq Var(T)\) for every \(\theta\), and \(Var(T^*) < Var(T)\) for some \(\theta\) unless \(T^*=T\) with probability 1.
Discussion:
P.345
"It is clear from the Rao-Blackwell theorem that if we are searching for an unbiased estimator with small variance, we may as well restrict attention to function of sufficient statistics.
If any ubiased estimator exists, then there will be one that is a function of sufficient statistics, namely \(E(T|S)\), which also is unbiased and has variance at least as small or smaller. In particular, we still are interested in knowing how to find a UMVUE for a parameter, and the above theorem narrows our problem down somewhat.
For instance, consider a one-parameter model \(f(x;\theta)\), and assume that a single sufficient statistic, \(S\), exists. We know that we must consider only unbiased functions of \(S\) in searching for a UMVUE. In some cases it may be possible to show that only one function of \(S\) is unbiased, and in that case we would know that it is a UMVUE.
The concept of “completeness” is helpful in determinning unique unbiased estimators, and this concept is defined in the next section."
2.3.4 completeness
Completeness:
P.345
A family of density functions \(\{ f_T(t,\theta); \theta \in \Omega\}\), is called complete if \(E[u(T)]=0\) for all \(\theta \in \Omega\) implies \(u(T)=0\) with probability 1 for all \(\theta \in \Omega\).
P.345
“This sometimes is expressed by saying that there are no nontrivial unbiased estimators of zero. In particular, it means that two different functions of \(T\) cannot have the same expected value.”
For example, if \(E[u_1(T)]=\tau(\theta)\) and \(E[u_2(T)]=\tau(\theta)\), which implies \(u_1(T)-u_2(T)=0\), or \(u_1(T)=u_2(T)\) with probablity 1, if the family of density fucntions is complete. That is, any unbiased estimator is unique in this case.
We mainly are interested in knowing that the family of density functions of a sufficient statistic is complete, because in that case an unbiased function of the sufficient statistic will be unique, and it must be a UMVUE by the Rao-Blackwell theorem.
2.3.5 Lehmann-Scheffe completeness theorem
Let \(X_1,...,X_n\) have joint \(pdf \; f(x_1,...,x_n; \theta)\) and let \(S\) be a vector of jointly complete sufficient statistics for \(\theta\). If \(T^*=t^*(S)\) is a statistic that is unbiased for \(\tau(\theta)\) and a function of \(S\), then \(T^*\) is a UMVUE of \(tau(\theta)\).
Example:
P.346
2.3.6 Exponential class, complete sufficient statistics
A density fucntion is said to be a member of the regular exponential class if it can be expressed in the form
\[f(x; \theta)=c(\theta)h(x)e^{\sum_{j=1}^k q_j(\theta)t_j(x)}\] where,
\[x \in A\] And zero otherwise, where \(\theta=(\theta_1,...,\theta_k)\) is a vector of \(k\) unknown parameters, if the parameter space has the form
\[\Omega=\{\theta | a_i \leq \theta_i \leq b_i, i=1,...k\}\]
(note that \(a_i=-\infty\) and \(b_i=\infty\) are permissible values), and if it satisfies regularity conditions 1, 2, and 3a or 3b given by:
The set \(A=\{x:f(x; \theta)>0\}\) does not depend on \(\theta\).
The functions \(q_j(\theta)\) are nontrivial, functionally independent, continuous fucntion of the \(\theta_i\).
3a. For a continuous random variable, the derivatives \(t_k^{'}(x)\) are linearly independent continous functions of \(x\) over \(A\).
3b. For a discrete random variable, the \(t_k(x)\) are nontrivial functions of \(x\) on \(A\), and none is a linear function of the others.
Example
P.348
Consider Bernoulli distribution \(X \sim Bin(1,p)\). It follows that
\[\begin{aligned} f(x; p) &=p^x(1-p)^{1-x} \\ &=P^x(1-p)(1-p)^{-x} \\ &=(1-p)(1-p)^{-x}P^x \\&=(1-p)e^{ln(1-p)^{-x}P^x} \\ &=(1-p)e^{xln(\frac{p}{1-p})} \end{aligned}\]
Compared to the definition of Exponential Class defined above, we can get the following. \[c(\theta)=(1-p)\] \[h(x)=1\] \[q_1(\theta)=ln(\frac{p}{1-p})\] \[t_1(x)=x\]
Theorem 10.4.2
P.348
If \(X_1,...,X_n\) is a random sample from a member of the regular exponential class \(REC(q_1,...,q_k)\), then the statistics
\[S_1=\sum_{i=1}^n t_1(X_i),...,S_k=\sum_{i=1}^n t_k(X_i)\]
are a minimal set of complete sufficient statistics for \(\theta_1,...\theta_k\).
Example 1:
P.348
Again, consider Bernoulli distribution \(X \sim Bin(1,p)\). For a random sample of size \(n\), \(t(x_i)=x_i\) and thus based on Theorem 10.4.2 (see above) \(S=\sum_{i=1}^n X_i\) is a complete sufficient statistic for \(p\).
How about we want to find UMVUE for \(Var(X)=p(1-p)\)?
We might try \(\bar{X}(1-\bar{X})\).
\[\begin{aligned} E[\bar{X}(1-\bar{X})] &=E(\bar{X})-E(\bar{X}^2) \\ &=p-(p^2+var(\bar{X})) \\ &=p-p^2-\frac{p(1-p)}{n} \\ &=p(1-p)(1-\frac{1}{n}) \end{aligned}\]
Thus,
\[E[\frac{1}{1-\frac{1}{n}}\bar{X}(1-\bar{X})]=p(1-p)\]
Thus, \(\frac{1}{1-\frac{1}{n}}\bar{X}(1-\bar{X})\) is the UMVUE of the \(p(1-p)\).
but why?
Example 2:
P.349
If \(X \sim N(\mu,\sigma^2)\), then
\[\begin{aligned} f(x;\mu,\sigma)&=\frac{1}{\sqrt{2\pi \sigma^2}}e^{-\frac{(x-\mu)^2}{2\sigma^2}} \\ &=\frac{1}{\sqrt{2\pi \sigma^2}}e^{-\frac{1}{2\sigma^2}(x^2+\mu^2-2x\mu)} \\ &=\frac{1}{\sqrt{2\pi \sigma^2}}e^{-\frac{x^2}{2\sigma^2}-\frac{\mu^2}{2\sigma^2}+\frac{x\mu}{\sigma^2}} \end{aligned}\]
Thus, \(S_1=\sum X_i^2\) and \(S_2=\sum X_i\) are jointly complete and sufficient statistics of \(\mu\) and \(\sigma^2\). Refer to the normal example in the section of “Neyman factorization theorem, minimal sufficiency of MLEs”
Theorem 10.4.3
P.349
If a CRLB estimator \(T\) exists for \(\tau(\theta)\), then a single sufficient statistic exists, and \(T\) is a function of the sufficient statistic. Conversely, if a single sufficient statistic exists and teh CRLB exists, then a CRLB estimator exists for some \(\tau(\theta)\).


If I could only keep one app on my iPod, this would be it without a doubt. Skritter will change your life!
Learning to write Chinese characters has never been so fun. From writing zero to 2000+ characters in six months!
An absolutely amazing app. It makes me want to actually study whenever I have downtime.


$133 - Motherboard
Gigabyte - X470 AORUS ULTRA GAMING ATX AM4 Motherboard
$266 - CPU
AMD - Ryzen 7 1800X 3.6 GHz 8-Core Processor
$250 - RAM
G.Skill - Ripjaws V Series 32 GB (2 x 16 GB) DDR4-3200 Memory
$32 - Power Supply
EVGA - 500 W 80+ Certified ATX Power Supply
$148 - M.2
Samsung - 860 Evo 1 TB M.2-2280 Solid State Drive
$30 - FAN
Cooler Master - Hyper 212 EVO 82.9 CFM Sleeve Bearing CPU Cooler
$65 - CASE
NZXT - H500 (Black) ATX Mid Tower Case
$130 - VIDEO CARD
EVGA - GeForce GTX 1050 2 GB SC GAMING Video Card
TOTAL:$2484
133+266+250+
32+148+30+65+130
-
Slightly over budget because of the 1TB M.2 SSD
-
All parts from various sellers such as B&H, OutletPC, Amazon, Newegg.
Back to my $2500 PC build!


About
The UK University Integration Bee is an inter-university team-based integration competitions, run by The Archimedeans alongside mathematics societies at Oxford, Warwick, Durham and Imperial.
The competition is in two parts: an online round and an in-person final.
In Round 1 (the online round), you will receive a collection of integrals which you need to solve as a team. Answers will then be inputted into our online autograder. While we can't say for sure what solving the integrals will involve, you will find some helpful information below to help prepare!
In Round 2 (the in-person final!) teams who did sufficiently well in Round 1 will be invited to St John's College Cambridge to compete in a three part competition, featuring group, crossintegral and shuttle rounds. More information will follow after Round 1!
Register
If you want to take part in the competition, you can sign up using the link below!
Teams are usually made up of 2-3 people, but if you haven't yet found a team you can still sign up and we will find a place for you.
Register NowSyllabus & Contest Information
Round 1 will take place on Sunday, 17 October 2021 between 2pm and 4pm.
There will be 40 problems, covering a wide range of difficulty and integration techniques. There will be both definite integrals (where only the numerical answer matters) and indefinite integrals.
To get a feel for the type of techniques that may be involved in the problems, we have written a syllabus which you can get here. The best way to practice is looking at problems from previous competitions, which you can find below.


Grocery List
Put some groceries in the form below:
Separate items with a space (use _ (underscore) for multi_word items):
Submit
Clear


Sara Calhoun — Sali Lab
Kale Kundert — Kortemme Lab
Diego Garrido Ruiz — Jacobson Lab
You take the blue pill — The story ends, you wake up in your bed and
believe whatever you want to believe.
You take the red pill — You stay in Wonderland and I show you how deep
the turtle-hole goes.
What is Molecular Dynamics?
Source: Bert de Groot Lab Group
How does Molecular Dynamics Work?
What Happens in a Time Step
Treat every atom as a classical particle.
Acceleration is assumed to be constant.
This is only true when the timestep is faster than the fastest
motion occurring in the protein: bond vibrations.
A potential energy function is used to calculate the acceleration of
each atom at each timestep.
How does Molecular Dynamics Work?
Bonded Forces
Bond Lengths:
Bond Angles:
Torsion Angles:
How does Molecular Dynamics Work?
Non-Bonded Forces
Van der Waals Forces
Electrostatic Forces:
How does Molecular Dynamics Work?
The Hydrophobic Effect
Many folding and packing interactions are mediated by the
hydrophobic effect. How is it represented?
Explicit Solvent
Simulate every water molecule.
Periodic boundary conditions.
More expensive, but also more rigorous.
Implicit Solvent
Use the solvent-accessible surface area to roughly
approximate the hydrophobic effect.
How does Molecular Dynamics Work?
Free Energies
Will one protein bind to another?
What conformations exist in solution?
How will a protein fold?
<<<<<<< HEAD
Molecular
Dynamics Applications
"Turtle, I've got a feeling we're not in Kansas anymore."
How MD Addresses biophysical questions?
Does the data address the question?
Time-scales of motion
Appropriate assumptions
Source: Zwier and Chong,
Current Opinion in Pharmacology, 2010
What is Molecular Dynamics Used For?
Observing protein motion at the atomic level
Native state dynamics - ensemble of conformational states
that a molecule explores in equilibrium
Source: Graham Johnson's
Youtube Channel
Understanding experimental data
Recall: Experimentally-derived structures are models
Molecular dynamics (and other sampling methods) are often used in structure determination in the refinement stage
Source: Viral RNA from UCSF Chimera Gallery - Du et al., Biochemistry 2004.
What is Molecular Dynamics Used For?
Simulating dynamic processes
Interesting biology involves dynamics processes:
folding
binding and assembly
catalysis
transport
What is Molecular Dynamics Used For?
Example: protein folds over six microseconds
Ultrafast folding of villin headpiece
Source: Freddolino et al.
Biophysical Journal, 2009.
What is Molecular Dynamics Used For?
Example: observing a conformational change
EGF Receptor following ligand disassociation
Source: Arkhipov et al. Cell,
2013.
What is Molecular Dynamics Used For?
Example: water molecule through aquaporin
Source: Bert de Groot Lab
Group
MD Applications at UCSF
"Turtle phone home."
MD at UCSF
Multiscale modeling of microtubule assembly
Monica Tremont-Hsu
Tubulin exists in 2 conformations: straight and bent
MD at UCSF
Multiscale modeling of microtubule assembly
Monica Tremont-Hsu
Investigate free energy landscape of tubulin using MD simulations to elucidate implications for models of assembly
MD at UCSF
Detection of cryptic binding sites on protein surfaces
Peter Cimermancic
Pocket formation involves large-scale structural reorganization that would need long traditional MD simulations to observe.
Source: Bowman and Geissler,
PNAS, 2012
MD at UCSF
Detection of cryptic binding sites on protein surfaces
Peter Cimermancic
Coarse-grained force field based on inter-residue distances.
Machine learning algorithm integrates data from MD as well as other features to predict cryptic binding sites
Want to learn more?
Take these fall quarter courses: Macromolecular
Interactions and Statistical Mechanics
Look out for mini-courses in the spring — Matt
Jacobson usually teaches a 3-week course on computational
methods


{% extends 'templates/nhs_content_layout.html' %} {% import 'includes/form_macros.html' as form_macros %} {% import 'includes/ui_element_macros.html' as ui_element_macros %} {% block content %} Filter Clinics Reset filters Apply filters Waiting Time 1 – 100 Days 101 – 150 Days 151 – 200 Days 201 – 250 Days Clinic Day Monday Tuesday Wednesday Thursday Friday Saturday Sunday Clinic Time Morning (8.00am - 11.59am) Afternoon (12.00pm - 3.59pm) Evening (4.00pm - 8.00pm) Distance from LS2 4GH 2 miles 5 miles 10 miles 15 miles 25 miles 50 miles 75 miles 100 miles 150 miles 200 miles 750 miles 1000 miles Accessibility Braille translation service Disabled parking Disabled WC Induction loop RNID typetalk Signing service available Wheelchair access Step free access Facilities & Amenities Cafe Patient library Pharmacy Shop CQC Rating Outstanding Good Requires improvement Inadequate NHS Choices Rating 5 Stars 4 Stars 3 Stars 2 Stars 1 Star Unrated Parking Car Parking Cycle parking Disabled parking {% endblock %}
Reset filters
Apply filters


Click on the title to download a pdf version of the paper or presentation. If no download is available, you can request the document by contacting TRA via email, by clicking on Document Request.
--- title: Publications layout: page permalink: /publications/ ---
Dr. Tessler's journal articles, government reports, and conference presentations can be found on Google Scholar and Research Gate
Google Scholar: Google Scholar
ResearchGate: ResearchGate
Click on the title to download a pdf version of the paper or presentation. If no download is available, you can request the document by contacting TRA via email, by clicking on Document Request.


The web is made up of structured documents written in a form computers can understand called HTML
The Web includes HTML documents, as well as music, videos, images, and other files that are stored on servers and read by our web browser via a protocol called HTTP.
HTML include the text that will be visible, plus the markup that makes that text appear certain ways.
There is also another language called CSS that allows further customization of the appearance of web pages and we will learn about it later in the NanoDegree.
HTML includes tags that contain content as well as void tagsor they can be block such as the p tag which creates an invisible block around the element


I need to test my new, shiny Scala code. Usually I write tests in ScalaTest, but for generating stubs I still use good, old Mockito. What can possibly go wrong? I open a new tab in my editor and start hacking test code.
For the first surprise I don’t have to wait too long.
In my code I use value classes
to represent entity IDs.
For example I use CustomerId
:
When I tried to mock customerId
method (property?):
in my test, Mockito started complaining about wrong return types and refused to cooperate:
Of course my CustomerId
value class is here to blame…
In Scala, value classes offer type safety of normal classes with
performance of the primitives.
Scala compiler achieves this, simply by replacing the value
class type by the primitive type, wherever possible.
So I grabbed javap
and took a look at the generated bytecode,
and indeed there is a long
there:
Mockito uses reflection to figure out which type a given method returns. This gives us little hope for a nice solution. We can only try to hack around the problem, for example this monstrosity works:
We use asInstanceOf[Object]
to fool Scala’s type system
and then return a java.lang.Long
instance.
Yeah it works but it is not nice… But hey, first get the job done, then get it done well. Let’s move on to the next test…
I have to verify that a given method was called. This time I should have more luck, right? So I wrote another test and I ran it:
But I saw the results I was completly perplexed.
Verification with RequestId(123L)
worked but the one with
any()
did not. But what is worse the second verification
thrown NullPointerException
. NPE? Really?
My brain was racing, and after a few seconds a thought strike me: it’s these pesky value classes again!
And I was right! Value classes in Scala cannot be null
!
For example, in Scala REPL:
any()
matcher that comes with Mockito has a very simple
implementation:
that always returns null
.
The method that I tried to check, has a signature:
and since RequestId
is a value class, the “real” JVM signature is:
When I write verify(...).setRequestId(any())
Scala compiler adds instructions that convert the object returned
by any()
(remember generics does not exist on JVM level, so all
these T
s and V
s are just Object
s at runtime) to long
.
And this is the reason why I got NullPointerException
earlier.
In bytecode it looks like this:
and the NPE is thrown by the instruction at the offset 31
.
Now I understand the problem, but I still want to use any()
matcher.
There must be a trick to make it return a valid RequestId
.
But then I realized that even if I found such a way, I would be
bitten again by WrongTypeOfReturnValue
exception or
something similar, since
the method takes long
not RequestId
. What I really need is
a way to use anyLong()
with setRequestId
. It was a good
enough challenge to
start my evil alter-ego working on some frankensteinian solution.
And I found it, I FOUND IT!, I FOUND IT!!! Ehmm… and here it is:
A perfect combination of beauty and evil…
The trick that I used here is that Mockito does not care,
where the matcher is located, it only cares about the time when it
is called. As long as I call anyLong()
after the call to
verify(...)
and before the call to .setRequestId(...)
,
Mockito will work. Actually we may wrap any matcher in
as many dummy calls as we want, as in a(b(c(d(any()))))
,
only the fact that it was called counts.
It can’t be worse right? Two tests, two hacks…
But only I wrote my third test, I was slapped by the next problem, this time caused by default parameters:
WTF? Not again… Another strange problem that forces me to look under the bonnet.
Let’s look at the bytecode using javap -c
:
So the Scala compiler calls a hidden method, with a name
methodName$default$parameterIndex
on the trait,
to figure out what value should be used as a value
of the default parameter. Wow! I didn’t expect something
like that!
If only I could stub this method$default$2
or something
…oh wait I could:
Excellent. It is working perfectly but now I have three tests and three hacks. Surely I am doing something wrong here.
And so I harnessed the power of Google (after spending some time looking at the pictures of stoats; hey they are really cute) and found this gem:
I plug it into my project (it even has a special version for ScalaTest) and suddenly everything started to working as it should be.
Stubbing works:
…and verification works:
even default parameters work:
Yay!
Wanna see some real code? Click here.
References:


When police practices are not scrutinized, the public loses. In many communities, the fines and fees generated from racialized overpolicing becomes a major source of city income. In communities like Ferguson, Missouri this can have devastating effects on public trust in the police [7.10.121]. When court cases are brought against police for misconduct, taxpayers ultimately pay out settlements to victims [7.10.119].
in-context


Robert is a fourth year computer science student at the University of California, San Diego. His focus is web design and developement and he has a passion for internet security.
Web Application Developement


## Mako can find this base file because it's in the settings.py -> MAKO_TEMPLATES_DIRS list <%inherit file="base_ajax_template.htm" /> <%block name="content">


{% extends "base.html" %} {% block breadcrumbs %}
There are no items in your basket.
It is possible your session has timed out through inactivity, resetting your basket. We apologise for any inconvenience this may cause.


Ready to go global?
get found by search engines and visitors in other languages
Powered by
Lingumania


| Top |
| GtkWidget * | gtk_table_new () |
| void | gtk_table_resize () |
| void | gtk_table_get_size () |
| void | gtk_table_attach () |
| void | gtk_table_attach_defaults () |
| void | gtk_table_set_row_spacing () |
| void | gtk_table_set_col_spacing () |
| void | gtk_table_set_row_spacings () |
| void | gtk_table_set_col_spacings () |
| void | gtk_table_set_homogeneous () |
| guint | gtk_table_get_default_row_spacing () |
| gboolean | gtk_table_get_homogeneous () |
| guint | gtk_table_get_row_spacing () |
| guint | gtk_table_get_col_spacing () |
| guint | gtk_table_get_default_col_spacing () |
| guint | column-spacing | Read / Write |
| gboolean | homogeneous | Read / Write |
| guint | n-columns | Read / Write |
| guint | n-rows | Read / Write |
| guint | row-spacing | Read / Write |
| guint | bottom-attach | Read / Write |
| guint | left-attach | Read / Write |
| guint | right-attach | Read / Write |
| guint | top-attach | Read / Write |
| GtkAttachOptions | x-options | Read / Write |
| guint | x-padding | Read / Write |
| GtkAttachOptions | y-options | Read / Write |
| guint | y-padding | Read / Write |
The GtkTable functions allow the programmer to arrange widgets in rows and columns, making it easy to align many widgets next to each other, horizontally and vertically.
Tables are created with a call to gtk_table_new()
, the size of which can
later be changed with gtk_table_resize()
.
Widgets can be added to a table using gtk_table_attach()
or the more
convenient (but slightly less flexible) gtk_table_attach_defaults()
.
To alter the space next to a specific row, use gtk_table_set_row_spacing()
,
and for a column, gtk_table_set_col_spacing()
.
The gaps between all rows or columns can be changed by
calling gtk_table_set_row_spacings()
or gtk_table_set_col_spacings()
respectively. Note that spacing is added between the
children, while padding added by gtk_table_attach()
is added on
either side of the widget it belongs to.
gtk_table_set_homogeneous(), can be used to set whether all cells in the table will resize themselves to the size of the largest widget in the table.
GtkWidget * gtk_table_new (guint rows
,guint columns
,gboolean homogeneous
);
gtk_table_new
has been deprecated since version 3.4 and should not be used in newly-written code.
Use gtk_grid_new()
.
Used to create a new table widget. An initial size must be given by
specifying how many rows and columns the table should have, although
this can be changed later with gtk_table_resize()
. rows
and columns
must both be in the range 1 .. 65535. For historical reasons, 0 is accepted
as well and is silently interpreted as 1.
rows |
The number of rows the new table should have. |
|
columns |
The number of columns the new table should have. |
|
homogeneous |
If set to |
void gtk_table_resize (GtkTable *table
,guint rows
,guint columns
);
gtk_table_resize
has been deprecated since version 3.4 and should not be used in newly-written code.
GtkGrid resizes automatically.
If you need to change a table’s size after it has been created, this function allows you to do so.
table |
The GtkTable you wish to change the size of. |
|
rows |
The new number of rows. |
|
columns |
The new number of columns. |
void gtk_table_get_size (GtkTable *table
,guint *rows
,guint *columns
);
gtk_table_get_size
has been deprecated since version 3.4 and should not be used in newly-written code.
GtkGrid does not expose the number of columns and rows.
Gets the number of rows and columns in the table.
Since: 2.22
void gtk_table_attach (GtkTable *table
,GtkWidget *child
,guint left_attach
,guint right_attach
,guint top_attach
,guint bottom_attach
,GtkAttachOptions xoptions
,GtkAttachOptions yoptions
,guint xpadding
,guint ypadding
);
gtk_table_attach
has been deprecated since version 3.4 and should not be used in newly-written code.
Use gtk_grid_attach()
with GtkGrid. Note that the attach
arguments differ between those two functions.
Adds a widget to a table. The number of “cells” that a widget will occupy is
specified by left_attach
, right_attach
, top_attach
and bottom_attach
.
These each represent the leftmost, rightmost, uppermost and lowest column
and row numbers of the table. (Columns and rows are indexed from zero).
To make a button occupy the lower right cell of a 2x2 table, use
1 2 3 4 5 |
gtk_table_attach (table, button, 1, 2, // left, right attach 1, 2, // top, bottom attach xoptions, yoptions, xpadding, ypadding); |
If you want to make the button span the entire bottom row, use left_attach
== 0 and right_attach
= 2 instead.
table |
The GtkTable to add a new widget to. |
|
child |
The widget to add. |
|
left_attach |
the column number to attach the left side of a child widget to. |
|
right_attach |
the column number to attach the right side of a child widget to. |
|
top_attach |
the row number to attach the top of a child widget to. |
|
bottom_attach |
the row number to attach the bottom of a child widget to. |
|
xoptions |
Used to specify the properties of the child widget when the table is resized. |
|
yoptions |
The same as xoptions, except this field determines behaviour of vertical resizing. |
|
xpadding |
An integer value specifying the padding on the left and right of the widget being added to the table. |
|
ypadding |
The amount of padding above and below the child widget. |
void gtk_table_attach_defaults (GtkTable *table
,GtkWidget *widget
,guint left_attach
,guint right_attach
,guint top_attach
,guint bottom_attach
);
gtk_table_attach_defaults
has been deprecated since version 3.4 and should not be used in newly-written code.
Use gtk_grid_attach()
with GtkGrid. Note that the attach
arguments differ between those two functions.
As there are many options associated with gtk_table_attach()
, this convenience
function provides the programmer with a means to add children to a table with
identical padding and expansion options. The values used for the GtkAttachOptions
are GTK_EXPAND | GTK_FILL
, and the padding is set to 0.
table |
The table to add a new child widget to. |
|
widget |
The child widget to add. |
|
left_attach |
The column number to attach the left side of the child widget to. |
|
right_attach |
The column number to attach the right side of the child widget to. |
|
top_attach |
The row number to attach the top of the child widget to. |
|
bottom_attach |
The row number to attach the bottom of the child widget to. |
void gtk_table_set_row_spacing (GtkTable *table
,guint row
,guint spacing
);
gtk_table_set_row_spacing
has been deprecated since version 3.4 and should not be used in newly-written code.
Use gtk_widget_set_margin_top()
and
gtk_widget_set_margin_bottom()
on the widgets contained in the row if
you need this functionality. GtkGrid does not support per-row spacing.
Changes the space between a given table row and the subsequent row.
table |
a GtkTable containing the row whose properties you wish to change. |
|
row |
row number whose spacing will be changed. |
|
spacing |
number of pixels that the spacing should take up. |
void gtk_table_set_col_spacing (GtkTable *table
,guint column
,guint spacing
);
gtk_table_set_col_spacing
has been deprecated since version 3.4 and should not be used in newly-written code.
Use gtk_widget_set_margin_start()
and
gtk_widget_set_margin_end()
on the widgets contained in the row if
you need this functionality. GtkGrid does not support per-row spacing.
Alters the amount of space between a given table column and the following column.
table |
a GtkTable. |
|
column |
the column whose spacing should be changed. |
|
spacing |
number of pixels that the spacing should take up. |
void gtk_table_set_row_spacings (GtkTable *table
,guint spacing
);
gtk_table_set_row_spacings
has been deprecated since version 3.4 and should not be used in newly-written code.
Use gtk_grid_set_row_spacing()
with GtkGrid.
Sets the space between every row in table
equal to spacing
.
table |
a GtkTable. |
|
spacing |
the number of pixels of space to place between every row in the table. |
void gtk_table_set_col_spacings (GtkTable *table
,guint spacing
);
gtk_table_set_col_spacings
has been deprecated since version 3.4 and should not be used in newly-written code.
Use gtk_grid_set_column_spacing()
with GtkGrid.
Sets the space between every column in table
equal to spacing
.
table |
a GtkTable. |
|
spacing |
the number of pixels of space to place between every column in the table. |
void gtk_table_set_homogeneous (GtkTable *table
,gboolean homogeneous
);
gtk_table_set_homogeneous
has been deprecated since version 3.4 and should not be used in newly-written code.
Use gtk_grid_set_row_homogeneous()
and
gtk_grid_set_column_homogeneous()
with GtkGrid.
Changes the homogenous property of table cells, ie. whether all cells are an equal size or not.
guint
gtk_table_get_default_row_spacing (GtkTable *table
);
gtk_table_get_default_row_spacing
has been deprecated since version 3.4 and should not be used in newly-written code.
Use gtk_grid_get_row_spacing()
with GtkGrid.
Gets the default row spacing for the table. This is
the spacing that will be used for newly added rows.
(See gtk_table_set_row_spacings()
)
gboolean
gtk_table_get_homogeneous (GtkTable *table
);
gtk_table_get_homogeneous
has been deprecated since version 3.4 and should not be used in newly-written code.
Use gtk_grid_get_row_homogeneous()
and
gtk_grid_get_column_homogeneous()
with GtkGrid.
Returns whether the table cells are all constrained to the same
width and height. (See gtk_table_set_homogeneous()
)
guint gtk_table_get_row_spacing (GtkTable *table
,guint row
);
gtk_table_get_row_spacing
has been deprecated since version 3.4 and should not be used in newly-written code.
GtkGrid does not offer a replacement for this functionality.
Gets the amount of space between row row
, and
row row
+ 1. See gtk_table_set_row_spacing()
.
guint gtk_table_get_col_spacing (GtkTable *table
,guint column
);
gtk_table_get_col_spacing
has been deprecated since version 3.4 and should not be used in newly-written code.
GtkGrid does not offer a replacement for this functionality.
Gets the amount of space between column col
, and
column col
+ 1. See gtk_table_set_col_spacing()
.
guint
gtk_table_get_default_col_spacing (GtkTable *table
);
gtk_table_get_default_col_spacing
has been deprecated since version 3.4 and should not be used in newly-written code.
Use gtk_grid_get_column_spacing()
with GtkGrid.
Gets the default column spacing for the table. This is
the spacing that will be used for newly added columns.
(See gtk_table_set_col_spacings()
)
“column-spacing”
property“column-spacing” guint
The amount of space between two consecutive columns.
Flags: Read / Write
Allowed values: <= 65535
Default value: 0
“homogeneous”
property“homogeneous” gboolean
If TRUE, the table cells are all the same width/height.
Flags: Read / Write
Default value: FALSE
“n-columns”
property“n-columns” guint
The number of columns in the table.
Flags: Read / Write
Allowed values: [1,65535]
Default value: 1
“n-rows”
property“n-rows” guint
The number of rows in the table.
Flags: Read / Write
Allowed values: [1,65535]
Default value: 1
“row-spacing”
property“row-spacing” guint
The amount of space between two consecutive rows.
Flags: Read / Write
Allowed values: <= 65535
Default value: 0
“bottom-attach”
child property“bottom-attach” guint
The row number to attach the bottom of the child to.
Flags: Read / Write
Allowed values: [1,65535]
Default value: 1
“left-attach”
child property“left-attach” guint
The column number to attach the left side of the child to.
Flags: Read / Write
Allowed values: <= 65535
Default value: 0
“right-attach”
child property“right-attach” guint
The column number to attach the right side of a child widget to.
Flags: Read / Write
Allowed values: [1,65535]
Default value: 1
“top-attach”
child property“top-attach” guint
The row number to attach the top of a child widget to.
Flags: Read / Write
Allowed values: <= 65535
Default value: 0
“x-options”
child property“x-options” GtkAttachOptions
Options specifying the horizontal behaviour of the child.
Flags: Read / Write
Default value: GTK_EXPAND | GTK_FILL
“x-padding”
child property“x-padding” guint
Extra space to put between the child and its left and right neighbors, in pixels.
Flags: Read / Write
Allowed values: <= 65535
Default value: 0
“y-options”
child property“y-options” GtkAttachOptions
Options specifying the vertical behaviour of the child.
Flags: Read / Write
Default value: GTK_EXPAND | GTK_FILL
“y-padding”
child property“y-padding” guint
Extra space to put between the child and its upper and lower neighbors, in pixels.
Flags: Read / Write
Allowed values: <= 65535
Default value: 0


Teenage Torquay nursery worker arrested on suspicion of sex offences as '100 families contacted'
Devon and Cornwall Police immediately launched an inquiry with the suspect being arrested and released under police investigation while inquiries continue
by James Rodger, https://www.facebook.com/jamesrodgerjournalistA nursery worker has been arrested on suspicious of sex offences at a children's nursery, police have revealed .
The male teenager was held after allegations of sexual assault were made at Jack and Jill's Childcare in Torquay, Devon, in July this year.
Devon and Cornwall Police immediately launched an inquiry with the suspect being arrested and released under police investigation while inquiries continue.
Bail conditions exclude the teenager from the immediate vicinity of the nursery and police said he had since left the Devon and Cornwall force area.
Detectives have contacted over 100 families whose children would have attended the nursery during the investigation period. It is understood around dozen families may have been directly affected.
After the inquiry was launched, police uncovered "a number of concerns around safeguarding matters" and on October 24 Ofsted suspended the nursery's licence.
Acting Detective Chief Inspector James Stock, of the Public Protection Unit said: "Since the information was received in July, a police investigation has been ongoing.
"As part of this, over 250 hours of CCTV from within Jack and Jill Childcare have been reviewed.
"As a result of CCTV enquires, a number of children aged 2+ have been identified as potential victims of contact offences.
"We have now contacted all parents and guardians of children who attended Jack and Jill Childcare in relation to our investigation."