Next: Derivations, Previous: Parsing theory preliminaries, Up: Terms [Contents][Index]
A standard way of describing rules is Backus-Naur Form, or BNF. In one common way of writing BNF, a rule looks like this:
Expression ::= Term Factor
In the rule above, Expression
, Term
and Factor
are symbols.
A rule consists of a
left hand side
and a
right hand side.
In a
context-free grammar,
like those Marpa parses,
the left hand side of a rule
is always a symbol string of length 1.
The right hand side of a rule is a symbol string of zero or more symbols.
In the example, Expression
is the left hand side, and
Term
and Factor
are right hand side symbols.
Left hand side and right hand side are often abbreviated as RHS and LHS. If the RHS of a rule has no symbols, the rule is called an empty rule or an empty rule.
The length of a rule is the length of its RHS string. This implies that the length of an empty rule is zero.
In a standard grammar, all rules are BNF rules, as just described. Marpa grammars differ from standard grammars in allowing a second kind of rule: a sequence rule. The RHS of a sequence rule is a single symbol, which is repeated zero or more times. Libmarpa allows the application to specify other parameters for sequence rules, including a separator symbol. See Sequence rules.


Note
Click here to download the full example code
Navigation on Flat Earth - Benchmark¶
Goals of this script:
implement different UKFs on the navigation on flat Earth example.
design the Extended Kalman Filter (EKF) and the Invariant Extended. Kalman Filter (IEKF) [BB17].
compare the different algorithms with Monte-Carlo simulations.
We assume the reader is already familiar with the considered problem described in the related example.
This script searches to estimate the 3D attitude, the velocity, and the position of a rigid body in space from inertial sensors and relative observations of points having known locations. For the given problem, three different UKFs emerge, defined respectively as:
The state is embedded in \(SO(3) \times \mathbb{R}^6\), i.e.
the retraction \(\varphi(.,.)\) is the \(SO(3)\) exponential for orientation, and the vector addition for robot velocity and position.
the inverse retraction \(\varphi^{-1}(.,.)\) is the \(SO(3)\) logarithm for orientation and the vector subtraction for velocity and position.
The state is embedded in \(SE_2(3)\) with left multiplication, i.e.
the retraction \(\varphi(.,.)\) is the \(SE_2(3)\) exponential, where the state multiplies on the left the uncertainty \(\boldsymbol{\xi}\).
the inverse retraction \(\varphi^{-1}(.,.)\) is the \(SE_2(3)\) logarithm.
The state is embedded in \(SE_2(3)\) with right multiplication, i.e.
the retraction \(\varphi(.,.)\) is the \(SE_2(3)\) exponential, where the state multiplies on the right the uncertainty \(\boldsymbol{\xi}\).
the inverse retraction \(\varphi^{-1}(.,.)\) is the \(SE_2(3)\) logarithm.
this right UKF corresponds to the Invariant Extended Kalman Filter (IEKF) recommended in [BB17].
Note
The exponential and logarithm of \(SE_2(3)\) are quickly derived from the \(SE(3)\) exponential and logarithm, see Lie Groups documentation.
Import¶
from ukfm import SO3, UKF, EKF
from ukfm import INERTIAL_NAVIGATION as MODEL
from scipy.linalg import block_diag
import numpy as np
import matplotlib
import ukfm
ukfm.set_matplotlib_config()
Simulation Setting¶
We compare the filters on a large number of Monte-Carlo runs.
# Monte-Carlo runs
N_mc = 100
The vehicle drives a 10-meter diameter circle in 30 seconds and observes three features every second while receiving high-frequency inertial measurements (100 Hz).
# sequence time (s)
T = 30
# IMU frequency (Hz)
imu_freq = 100
# create the model
model = MODEL(T, imu_freq)
# observation frequency (Hz)
obs_freq = 1
# IMU noise standard deviation (noise is isotropic)
imu_std = np.array([0.01, # gyro (rad/s), not 0.6 deg/s
0.01]) # accelerometer (m/s^2)
# observation noise standard deviation (m)
obs_std = 0.1
Filter Design¶
Additionally to the three UKFs, we compare them to an EKF and an IEKF. The EKF has the same uncertainty representation as the UKF with \(SO(3) \times \mathbb{R}^6\) uncertainty representation, whereas the IEKF has the same uncertainty representation as the UKF with right \(SE_2(3)\) retraction. As we have five similar methods, the code is redundant.
All the filters have the same parameters.
# propagation noise covariance matrix
Q = block_diag(imu_std[0]**2*np.eye(3), imu_std[1]**2*np.eye(3))
# measurement noise covariance matrix
R = obs_std**2 * np.eye(3*model.N_ldk)
# initial uncertainty matrix such that the state is not perfectly initialized
Rot0_std = 15/np.sqrt(3)*np.pi/180
p0_std = 1/np.sqrt(3)
P0 = block_diag(Rot0_std**2*np.eye(3), np.zeros((3, 3)), p0_std**2 * np.eye(3))
# sigma point parameter
alpha = np.array([1e-3, 1e-3, 1e-3])
We set variables for recording metrics before launching Monte-Carlo simulations.
ukf_err = np.zeros((N_mc, model.N, 9))
left_ukf_err = np.zeros_like(ukf_err)
right_ukf_err = np.zeros_like(ukf_err)
iekf_err = np.zeros_like(ukf_err)
ekf_err = np.zeros_like(ukf_err)
ukf_nees = np.zeros((N_mc, model.N, 2))
left_ukf_nees = np.zeros_like(ukf_nees)
right_ukf_nees = np.zeros_like(ukf_nees)
iekf_nees = np.zeros_like(ukf_nees)
ekf_nees = np.zeros_like(ukf_nees)
Monte-Carlo Runs¶
We run the Monte-Carlo through a for loop.
for n_mc in range(N_mc):
print("Monte-Carlo iteration(s): " + str(n_mc+1) + "/" + str(N_mc))
# simulate true states and noisy inputs
states, omegas = model.simu_f(imu_std)
# simulate measurements
ys, one_hot_ys = model.simu_h(states, obs_freq, obs_std)
# initialize filters
state0 = model.STATE(
Rot=states[0].Rot.dot(SO3.exp(Rot0_std*np.random.randn(3))),
v=states[0].v,
p=states[0].p + p0_std*np.random.randn(3))
# IEKF and right UKF covariance need to be turned
J = np.eye(9)
J[6:9, :3] = SO3.wedge(state0.p)
right_P0 = J.dot(P0).dot(J.T)
ukf = UKF(state0=state0, P0=P0, f=model.f, h=model.h, Q=Q, R=R,
phi=model.phi, phi_inv=model.phi_inv, alpha=alpha)
left_ukf = UKF(state0=state0, P0=P0, f=model.f, h=model.h, Q=Q, R=R,
phi=model.left_phi, phi_inv=model.left_phi_inv, alpha=alpha)
right_ukf = UKF(state0=state0, P0=P0, f=model.f, h=model.h, Q=Q, R=R,
phi=model.right_phi, phi_inv=model.right_phi_inv,
alpha=alpha)
iekf = EKF(model=model, state0=state0, P0=right_P0, Q=Q, R=R,
FG_ana=model.iekf_FG_ana, H_ana=model.iekf_H_ana,
phi=model.right_phi)
ekf = EKF(model=model, state0=state0, P0=right_P0, Q=Q, R=R,
FG_ana=model.ekf_FG_ana, H_ana=model.ekf_H_ana,
phi=model.phi)
ukf_states = [state0]
left_ukf_states = [state0]
right_ukf_states = [state0]
iekf_states = [state0]
ekf_states = [state0]
ukf_Ps = np.zeros((model.N, 9, 9))
left_ukf_Ps = np.zeros_like(ukf_Ps)
right_ukf_Ps = np.zeros_like(ukf_Ps)
ekf_Ps = np.zeros_like(ukf_Ps)
iekf_Ps = np.zeros_like(ukf_Ps)
ukf_Ps[0] = P0
left_ukf_Ps[0] = P0
right_ukf_Ps[0] = right_P0
ekf_Ps[0] = P0
iekf_Ps[0] = right_P0
# measurement iteration number
k = 1
# filtering loop
for n in range(1, model.N):
# propagation
ukf.propagation(omegas[n-1], model.dt)
left_ukf.propagation(omegas[n-1], model.dt)
right_ukf.propagation(omegas[n-1], model.dt)
iekf.propagation(omegas[n-1], model.dt)
ekf.propagation(omegas[n-1], model.dt)
# update only if a measurement is received
if one_hot_ys[n] == 1:
ukf.update(ys[k])
left_ukf.update(ys[k])
right_ukf.update(ys[k])
iekf.update(ys[k])
ekf.update(ys[k])
k += 1
# save estimates
ukf_states.append(ukf.state)
left_ukf_states.append(left_ukf.state)
right_ukf_states.append(right_ukf.state)
iekf_states.append(iekf.state)
ekf_states.append(ekf.state)
ukf_Ps[n] = ukf.P
left_ukf_Ps[n] = left_ukf.P
right_ukf_Ps[n] = right_ukf.P
iekf_Ps[n] = iekf.P
ekf_Ps[n] = ekf.P
# get state
Rots, vs, ps = model.get_states(states, model.N)
ukf_Rots, ukf_vs, ukf_ps = model.get_states(ukf_states, model.N)
left_ukf_Rots, left_ukf_vs, left_ukf_ps = model.get_states(
left_ukf_states, model.N)
right_ukf_Rots, right_ukf_vs, right_ukf_ps = model.get_states(
right_ukf_states, model.N)
iekf_Rots, iekf_vs, iekf_ps = model.get_states(iekf_states, model.N)
ekf_Rots, ekf_vs, ekf_ps = model.get_states(ekf_states, model.N)
# record errors
ukf_err[n_mc] = model.errors(Rots, vs, ps, ukf_Rots, ukf_vs, ukf_ps)
left_ukf_err[n_mc] = model.errors(
Rots, vs, ps, left_ukf_Rots, left_ukf_vs, left_ukf_ps)
right_ukf_err[n_mc] = model.errors(
Rots, vs, ps, right_ukf_Rots, right_ukf_vs, right_ukf_ps)
iekf_err[n_mc] = model.errors(Rots, vs, ps, iekf_Rots, iekf_vs, iekf_ps)
ekf_err[n_mc] = model.errors(Rots, vs, ps, ekf_Rots, ekf_vs, ekf_ps)
# record NEES
ukf_nees[n_mc] = model.nees(ukf_err[n_mc], ukf_Ps, ukf_Rots, ukf_vs,
ukf_ps, 'STD')
left_ukf_nees[n_mc] = model.nees(left_ukf_err[n_mc], left_ukf_Ps,
left_ukf_Rots, left_ukf_vs, left_ukf_ps,
'LEFT')
right_ukf_nees[n_mc] = model.nees(right_ukf_err[n_mc], right_ukf_Ps,
right_ukf_Rots, right_ukf_vs,
right_ukf_ps, 'RIGHT')
iekf_nees[n_mc] = model.nees(iekf_err[n_mc], iekf_Ps, iekf_Rots, iekf_vs,
iekf_ps, 'RIGHT')
ekf_nees[n_mc] = model.nees(ekf_err[n_mc], ekf_Ps, ekf_Rots, ekf_vs,
ekf_ps, 'STD')
Out:
Monte-Carlo iteration(s): 1/100
Monte-Carlo iteration(s): 2/100
Monte-Carlo iteration(s): 3/100
Monte-Carlo iteration(s): 4/100
Monte-Carlo iteration(s): 5/100
Monte-Carlo iteration(s): 6/100
Monte-Carlo iteration(s): 7/100
Monte-Carlo iteration(s): 8/100
Monte-Carlo iteration(s): 9/100
Monte-Carlo iteration(s): 10/100
Monte-Carlo iteration(s): 11/100
Monte-Carlo iteration(s): 12/100
Monte-Carlo iteration(s): 13/100
Monte-Carlo iteration(s): 14/100
Monte-Carlo iteration(s): 15/100
Monte-Carlo iteration(s): 16/100
Monte-Carlo iteration(s): 17/100
Monte-Carlo iteration(s): 18/100
Monte-Carlo iteration(s): 19/100
Monte-Carlo iteration(s): 20/100
Monte-Carlo iteration(s): 21/100
Monte-Carlo iteration(s): 22/100
Monte-Carlo iteration(s): 23/100
Monte-Carlo iteration(s): 24/100
Monte-Carlo iteration(s): 25/100
Monte-Carlo iteration(s): 26/100
Monte-Carlo iteration(s): 27/100
Monte-Carlo iteration(s): 28/100
Monte-Carlo iteration(s): 29/100
Monte-Carlo iteration(s): 30/100
Monte-Carlo iteration(s): 31/100
Monte-Carlo iteration(s): 32/100
Monte-Carlo iteration(s): 33/100
Monte-Carlo iteration(s): 34/100
Monte-Carlo iteration(s): 35/100
Monte-Carlo iteration(s): 36/100
Monte-Carlo iteration(s): 37/100
Monte-Carlo iteration(s): 38/100
Monte-Carlo iteration(s): 39/100
Monte-Carlo iteration(s): 40/100
Monte-Carlo iteration(s): 41/100
Monte-Carlo iteration(s): 42/100
Monte-Carlo iteration(s): 43/100
Monte-Carlo iteration(s): 44/100
Monte-Carlo iteration(s): 45/100
Monte-Carlo iteration(s): 46/100
Monte-Carlo iteration(s): 47/100
Monte-Carlo iteration(s): 48/100
Monte-Carlo iteration(s): 49/100
Monte-Carlo iteration(s): 50/100
Monte-Carlo iteration(s): 51/100
Monte-Carlo iteration(s): 52/100
Monte-Carlo iteration(s): 53/100
Monte-Carlo iteration(s): 54/100
Monte-Carlo iteration(s): 55/100
Monte-Carlo iteration(s): 56/100
Monte-Carlo iteration(s): 57/100
Monte-Carlo iteration(s): 58/100
Monte-Carlo iteration(s): 59/100
Monte-Carlo iteration(s): 60/100
Monte-Carlo iteration(s): 61/100
Monte-Carlo iteration(s): 62/100
Monte-Carlo iteration(s): 63/100
Monte-Carlo iteration(s): 64/100
Monte-Carlo iteration(s): 65/100
Monte-Carlo iteration(s): 66/100
Monte-Carlo iteration(s): 67/100
Monte-Carlo iteration(s): 68/100
Monte-Carlo iteration(s): 69/100
Monte-Carlo iteration(s): 70/100
Monte-Carlo iteration(s): 71/100
Monte-Carlo iteration(s): 72/100
Monte-Carlo iteration(s): 73/100
Monte-Carlo iteration(s): 74/100
Monte-Carlo iteration(s): 75/100
Monte-Carlo iteration(s): 76/100
Monte-Carlo iteration(s): 77/100
Monte-Carlo iteration(s): 78/100
Monte-Carlo iteration(s): 79/100
Monte-Carlo iteration(s): 80/100
Monte-Carlo iteration(s): 81/100
Monte-Carlo iteration(s): 82/100
Monte-Carlo iteration(s): 83/100
Monte-Carlo iteration(s): 84/100
Monte-Carlo iteration(s): 85/100
Monte-Carlo iteration(s): 86/100
Monte-Carlo iteration(s): 87/100
Monte-Carlo iteration(s): 88/100
Monte-Carlo iteration(s): 89/100
Monte-Carlo iteration(s): 90/100
Monte-Carlo iteration(s): 91/100
Monte-Carlo iteration(s): 92/100
Monte-Carlo iteration(s): 93/100
Monte-Carlo iteration(s): 94/100
Monte-Carlo iteration(s): 95/100
Monte-Carlo iteration(s): 96/100
Monte-Carlo iteration(s): 97/100
Monte-Carlo iteration(s): 98/100
Monte-Carlo iteration(s): 99/100
Monte-Carlo iteration(s): 100/100
Results¶
We first visualize the trajectory results for the last run, where the vehicle starts in the above center of the plot. As the simulation has random process, the plot gives us an indication but not a proof of performances. We then plot the orientation and position errors averaged over Monte-Carlo.
ukf_err, left_ukf_err, right_ukf_err, iekf_err, ekf_err = model.benchmark_plot(
ukf_err, left_ukf_err, right_ukf_err, iekf_err, ekf_err, ps, ukf_ps,
left_ukf_ps, right_ukf_ps, ekf_ps, iekf_ps)
The novel retraction on \(SE_2(3)\) resolves the problem encountered by the \(SO(3) \times \mathbb{R}^6\) UKF and particularly the EKF.
We confirm these plots by computing statistical results averaged over all the Monte-Carlo. We compute the Root Mean Squared Error (RMSE) for each method both for the orientation and the position.
model.benchmark_print(ukf_err, left_ukf_err, right_ukf_err, iekf_err, ekf_err)
Out:
Root Mean Square Error w.r.t. orientation (deg)
-SO(3) x R^6 UKF : 2.89
-left SE_2(3) UKF : 2.84
-right SE_2(3) UKF: 2.83
-EKF : 3.20
-IEKF : 2.83
Root Mean Square Error w.r.t. position (m)
-SO(3) x R^6 UKF : 0.29
-left SE_2(3) UKF : 0.24
-right SE_2(3) UKF: 0.24
-EKF : 0.82
-IEKF : 0.24
For the considered Monte-Carlo, we have first observed that EKF is not working very well. Then, it happens that IEKF, left UKF and right UKF are the best in the first instants of the trajectory, that is confirmed with RMSE.
We now compare the filters in term of consistency (NEES).
model.nees_print(ukf_nees, left_ukf_nees, right_ukf_nees, iekf_nees, ekf_nees)
Out:
Normalized Estimation Error Squared (NEES) w.r.t. orientation
-SO(3) x R^6 UKF : 2.16
-left SE_2(3) UKF : 1.07
-right SE_2(3) UKF: 1.08
-EKF : 11.35
-IEKF : 1.14
Normalized Estimation Error Squared (NEES) w.r.t. position
-SO(3) x R^6 UKF : 3.27
-left SE_2(3) UKF : 1.11
-right SE_2(3) UKF: 1.16
-EKF : 276.29
-IEKF : 1.37
The \(SO(3) \times \mathbb{R}^6\) UKF and EKF are too optimistic. Left UKF, right UKF and IEKF obtain similar NEES, UKFs are slightly better on the first secondes.
Which filter is the best ? IEKF, Left UKF and right UKF obtain roughly similar accurate results, whereas these two UKFs are the more consistent.
Conclusion¶
This script compares different algorithms on the inertial navigation on flat Earth example. The left UKF and the right UKF, build on \(SE_2(3)\) retraction, outperform the EKF and seem slightly better than the IEKF.
You can now:
confirm (or infirm) the obtained results on massive Monte-Carlo simulations. Another relevant comparision consists in testing the filters when propagation noise is very low (standard deviation of \(10^{-4}\)), as suggested in [BB17].
address the problem of 2D SLAM, where the UKF is, among other, leveraged to augment the state when a novel landmark is observed.
Total running time of the script: ( 81 minutes 49.077 seconds)


Creative, Innovative Software Engineer with experience in full-stack web development, enterprise ETL jobs, and GIS Python automation. Leveraging powerful tools such as Python libraries, Powershell, and Talend Cloud Studio to engineer ETL Pipelines, that transform financial and location referenced assets. Utilizing a React, NodeJS, Redux, and Mapbox stack to create interactive web apps that consume real-time earth data sensor api's. Passionate about the collection and delivery of time-series location-based data sources to provide value-added insights to customers.
Landing page for the whitewater boating community of Northern Utah, utilizing the USGS Water Services API, this web app displays realtime river level data from rivers along Utah's Wasatch Front.
Github RepoHeroku PageWeather Web App for backcountry skiers in the Wasatch Mountains of Utah. Utilizes MapBox API, Synoptic weather stations API, React/Node/Redux, allowing the user to manipulate real time georeferenced weather and snowpack data to make decisions in the backcountry.
Github Repo Deployed PageSocial Party Web App utilizing JQuery, NodeJS, Handlebars-Express, Express, Sequelize, and Passport. Users create a profile, then create and join groups. The groups are social hubs that members can create events with
Github RepoHeroku PageReactJS Web App utilizing mongodb and the googlebooks API. Users can search for books, save them delete saved books from page
Github RepoHeroku PageLook at different GIFS from GIPHY and add your favorites to you very own favorites page. Utilizes Jquery, local storage, and Giphy API
Github Repo Deployed PageUtilizing CheerioJS users can scrape news articles from 3 different ski news websites. User can then save an article into a Mongo database, add/delete notes for a given saved article as well as delete articles.
Github RepoHeroku Page


Chapter 2 Week 1 - Data manipulation and EDA
2.2 Data types
2.2.1 Exercise 1
2.3 Lists and data frames
2.4 Loading, viewing and summarising data
2.4.2 Exercise 7
Yes, the variables size
, installs
and price
could have been numeric variables, rather than character variables.
2.4.3 Exercise 8
knitr::kable(head(apps[,-1]), booktabs = T) %>%
kableExtra::kable_styling(bootstrap_options = c("striped", "hover"))
| Category | Rating | Reviews | Size | Installs | Type | Price | Content Rating | Genres | Last Updated | Current Ver | Android Ver |
|---|---|---|---|---|---|---|---|---|---|---|---|
| ART_AND_DESIGN | 4.1 | 159 | 19M | 10,000+ | Free | 0 | Everyone | Art & Design | January 7, 2018 | 1.0.0 | 4.0.3 and up |
| ART_AND_DESIGN | 3.9 | 967 | 14M | 500,000+ | Free | 0 | Everyone | Art & Design;Pretend Play | January 15, 2018 | 2.0.0 | 4.0.3 and up |
| ART_AND_DESIGN | 4.7 | 87510 | 8.7M | 5,000,000+ | Free | 0 | Everyone | Art & Design | August 1, 2018 | 1.2.4 | 4.0.3 and up |
| ART_AND_DESIGN | 4.5 | 215644 | 25M | 50,000,000+ | Free | 0 | Teen | Art & Design | June 8, 2018 | Varies with device | 4.2 and up |
| ART_AND_DESIGN | 4.3 | 967 | 2.8M | 100,000+ | Free | 0 | Everyone | Art & Design;Creativity | June 20, 2018 | 1.1 | 4.4 and up |
| ART_AND_DESIGN | 4.4 | 167 | 5.6M | 50,000+ | Free | 0 | Everyone | Art & Design | March 26, 2017 | 1.0 | 2.3 and up |
2.4.4 Exercise 9
students <- readxl::read_xlsx("data/students.xlsx")
students$student_number <- as.character(students$student_number)
head(students) %>%
kable() %>%
kable_styling(bootstrap_options = c("striped", "hover"))
| student_number | grade | programme |
|---|---|---|
| 5117250 | 6.540712 | A |
| 6562582 | 7.572885 | A |
| 6000241 | 6.081056 | B |
| 4862862 | 7.707184 | A |
| 6561723 | 6.573150 | B |
| 5625916 | 7.900654 | B |
2.5 Data transformation with dplyr
2.5.1 Exercise 11
## # A tibble: 3 x 3
## student_number grade programme
## <chr> <dbl> <chr>
## 1 6114656 5.16 A
## 2 5265402 5.49 B
## 3 4639846 4.84 A
2.5.2 Exercise 12
## # A tibble: 5 x 3
## student_number grade programme
## <chr> <dbl> <chr>
## 1 6352581 8.09 A
## 2 6165611 8.02 A
## 3 4133949 8.40 A
## 4 4011659 8.94 A
## 5 6553913 8.24 A
2.5.3 Exercise 13
## # A tibble: 37 x 3
## student_number grade programme
## <chr> <dbl> <chr>
## 1 4011659 8.94 A
## 2 4133949 8.40 A
## 3 6553913 8.24 A
## 4 6352581 8.09 A
## 5 6165611 8.02 A
## 6 6997130 7.75 A
## 7 4862862 7.71 A
## 8 6562582 7.57 A
## 9 4483974 7.46 A
## 10 5128923 7.26 A
## # … with 27 more rows
2.5.4 Exercise 14
## # A tibble: 37 x 2
## student_number programme
## <chr> <chr>
## 1 5117250 A
## 2 6562582 A
## 3 6000241 B
## 4 4862862 A
## 5 6561723 B
## 6 5625916 B
## 7 4096023 A
## 8 6114656 A
## 9 5265402 B
## 10 5977188 B
## # … with 27 more rows
2.5.5 Exercise 15
2.5.6 Exercise 16
2.5.7 Exercise 17
## # A tibble: 1 x 9
## Rating_median Reviews_median Installs_median Rating_min Reviews_min
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 4.3 9642554.<PHONE_NUMBER> 3.7 877635
## # … with 4 more variables: Installs_min <dbl>, Rating_max <dbl>,
## # Reviews_max <dbl>, Installs_max <dbl>
2.5.8 Exercise 18
mad <- function(x) median(abs(x - median(x)))
popular_apps %>%
summarise_if(is.numeric,
.funs = list(median = median,
min = min,
max = max,
mad = mad))
## # A tibble: 1 x 12
## Rating_median Reviews_median Installs_median Rating_min Reviews_min
## <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 4.3 9642554.<PHONE_NUMBER> 3.7 877635
## # … with 7 more variables: Installs_min <dbl>, Rating_max <dbl>,
## # Reviews_max <dbl>, Installs_max <dbl>, Rating_mad <dbl>, Reviews_mad <dbl>,
## # Installs_mad <dbl>
2.5.9 Exercise 19
popular_apps %>%
group_by(Category) %>%
summarise(mean = mean(Rating),
median = median(Rating),
sd = sd(Rating),
min = min(Rating),
max = max(Rating),
mad = mad(Rating))
## `summarise()` ungrouping output (override with `.groups` argument)
## # A tibble: 12 x 7
## Category mean median sd min max mad
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 BOOKS_AND_REFERENCE 3.9 3.9 NA 3.9 3.9 0
## 2 COMMUNICATION 4.17 4.1 0.163 4 4.4 0.100
## 3 ENTERTAINMENT 4.3 4.3 NA 4.3 4.3 0
## 4 FAMILY 4.3 4.3 NA 4.3 4.3 0
## 5 GAME 4.5 4.5 0 4.5 4.5 0
## 6 NEWS_AND_MAGAZINES 3.9 3.9 0 3.9 3.9 0
## 7 PHOTOGRAPHY 4.5 4.5 0 4.5 4.5 0
## 8 PRODUCTIVITY 4.4 4.4 0 4.4 4.4 0
## 9 SOCIAL 4.32 4.35 0.191 4.1 4.5 0.15
## 10 TOOLS 4.4 4.4 0 4.4 4.4 0
## 11 TRAVEL_AND_LOCAL 4.26 4.3 0.0548 4.2 4.3 0
## 12 VIDEO_PLAYERS 4.1 4.3 0.346 3.7 4.3 0


| MATLAB 文件帮助: cv.decomposeEssentialMat | 查看 cv.decomposeEssentialMat 的代码 | Index |
decomposeEssentialMat Decompose an essential matrix to possible rotations and translation
S = cv.decomposeEssentialMat(E)
E
. A scalar struct with the following fields:This function decompose an essential matrix E
using SVD decomposition
[HartleyZ00]. Generally 4 possible poses exists for a given E
. They are
[R1,t]
, [R1,-t]
, [R2,t]
, [R2,-t]
. By decomposing E
, you can only
get the direction of the translation, so the function returns unit t
.
[HartleyZ00]:
Richard Hartley and Andrew Zisserman. "Multiple view geometry in computer vision". Cambridge university press, 2003.


TripAdvisor Occupancy
Statistics Overview
Occupied desks
Temperature in the room
Meeting room 1
People in the room
Meeting room 2
People in the room
Area Chart
Week
Month
Week


For now, this page is assumed to be a static description of your courses. You can convert it to a collection similar to _projects/
so that you can have a dedicated page for each course.
Organize your courses by years, topics, or universities, however you like!


This is the website for James' software shop! You can get any software you need!
Hello!
This business is amazing!


Methods
Public Class methods
This method returns the binding of the method that called your method. It will raise an Exception when you’re not inside a method.
It’s used like this:
def inc_counter(amount = 1) Binding.of_caller do |binding| # Create a lambda that will increase the variable 'counter' # in the caller of this method when called. inc = eval("lambda { |arg| counter += arg }", binding) # We can refer to amount from inside this block safely. inc.call(amount) end # No other statements can go here. Put them inside the block. end counter = 0 2.times { inc_counter } counter # => 2
Binding.of_caller must be the last statement in the method. This means that you will have to put everything you want to do after the call to Binding.of_caller into the block of it. This should be no problem however, because Ruby has closures. If you don’t do this an Exception will be raised. Because of the way that Binding.of_caller is implemented it has to be done this way.
[ show source ]
# File vendor/rails/activesupport/lib/active_support/binding_of_caller.rb, line 39 39: def Binding.of_caller(&block) 40: old_critical = Thread.critical 41: Thread.critical = true 42: count = 0 43: cc, result, error, extra_data = Continuation.create(nil, nil) 44: error.call if error 45: 46: tracer = lambda do |*args| 47: type, context, extra_data = args[0], args[4], args 48: if type == "return" 49: count += 1 50: # First this method and then calling one will return -- 51: # the trace event of the second event gets the context 52: # of the method which called the method that called this 53: # method. 54: if count == 2 55: # It would be nice if we could restore the trace_func 56: # that was set before we swapped in our own one, but 57: # this is impossible without overloading set_trace_func 58: # in current Ruby. 59: set_trace_func(nil) 60: cc.call(eval("binding", context), nil, extra_data) 61: end 62: elsif type == "line" then 63: nil 64: elsif type == "c-return" and extra_data[3] == :set_trace_func then 65: nil 66: else 67: set_trace_func(nil) 68: error_msg = "Binding.of_caller used in non-method context or " + 69: "trailing statements of method using it aren't in the block." 70: cc.call(nil, lambda { raise(ArgumentError, error_msg) }, nil) 71: end 72: end 73: 74: unless result 75: set_trace_func(tracer) 76: return nil 77: else 78: Thread.critical = old_critical 79: case block.arity 80: when 1 then yield(result) 81: else yield(result, extra_data) 82: end 83: end 84: end


Android Module Project
Introduction
This guide covers how to manage your module project as well as how to add third-party frameworks and bundle assets with your module. You can use Studio, Ant or Eclipse to build Android modules.
Prerequisites
To develop an Android-based Module, you need to install the following tools and setup a few additional environment variables:
-
Titanium SDK
-
Android SDK 5.0.x (API 21)
-
Studio or the Appcelerator Command-Line Interface (CLI) for creating modules, and building and running test applications
-
Android NDK and add an ANDROID_NDK environment variable pointing to the NDK folder. (See Installing the Android NDK.)
-
Ant 1.7.1 or above must be installed and in your system PATH to build from the command line. (See Installing Ant.)
-
gperf must be installed and in your system PATH. (See Installing gperf.)
-
Python, Python setuptools and the markdown module, and Python in your system PATH. (See Installing Python and Installing Required Python Packages.)
If you want to use Studio, install:
Project Structure
A number of files and directories work together to define our module and what it does. Let's take a quick look at each of them:
|
File/Directory |
Description |
|
LICENSE |
The module's full license text; this will be distributed with the module to let other developers know how they can use and redistribute it. |
|
assets/ |
The directory where you should place module assets, such as images. The items in this directory are added to the JAR library's asset folder, which is distributed with your module. |
|
documentation/ |
The directory where you should place your module documentation for end-users. The file index.md is a Markdown-formatted template file that you should use when writing your module documentation. You may also write your documentation using the TDoc Specification. This is only required for module distributed in the Appcelerator Marketplace. You can safely ignore this directory if you do not intend to distribute your module. |
|
example/ |
The directory where your module example(s) should go. The file app.js will be generated to include a sample loading of your module in a test window. This file can be used for quickly testing your module as well as give an example to end-users on how to use your module. This directory is distributed with your module. |
|
android/build.properties |
An Ant properties file that contains paths to the Titanium SDK, Google API add-ons, Android NDK and Android SDK on your computer. This file is not distributed with your module. |
|
android/build.xml |
The main Ant build script used to build and package the module. This file is not distributed with your module. |
|
android/lib/ |
Place any third-party JAR dependencies here and they will be bundled up as a part of your module automatically. |
|
android/manifest |
A special file that describes metadata about your module and used by the Titanium compiler. This file is required and is distributed with your module. |
|
android/platform/ |
This optional folder can include an android subdirectory, then add any of the resource directories defined in Android Developer: Providing Resources guide. |
|
android/src/ |
The source code for the module. This directory is not distributed with your module. |
|
android/timodule.xml |
A place to put custom activities and general XML that will end up in the AndroidManifest.xml of apps. Read more about this file in the tiapp.xml and timodule.xml reference. |
You can also include an optional jni folder. This optional folder (as of Titanium SDK 2.1.0) can include C or C++ code to compile shared libraries. You are required to have an Application.mk file in this directory if it is present. Modules using JNI or NDK support via shared libraries will work with both the V8 and Rhino runtimes.
Build Properties File
The build.properties file contains build variables used by the Ant CLI.
|
Variable |
Description |
Example |
|
titanium.platform |
Path to the Titanium SDK android folder |
/Users/<USERNAME>/Library/Application Support/Titanium/mobilesdk/osx/<VERSION>/android |
|
android.platform |
Path to the Android SDK platforms folder |
/Users/<USERNAME>/opts/android-sdk/platforms/android-14 |
|
google.apis |
Path to the Google APIs add-ons folder |
/Users/<USERNAME>/opts/android-sdk/add-ons/addon-google_apis-google-14 |
|
android.ndk |
Path to the Android NDK (if needed) |
/Users/<USERNAME>/opts/android-ndk |
Manifest File
Titanium module metadata is described in a special text file named manifest. This file is a simple key/value property format.
Before you distribute your module, you must edit this manifest and change a few values. Some of the values are pre-generated and should not be edited. These are noted with the comment before them. In the manifest file, any line starting with a hash character (#) is ignored. The following are the descriptions of each entry in the manifest:
|
Key |
Description/Purpose |
|
version |
This is the version of your module. You should change this value each time you make major changes and distribute them. Version should be in the dotted notation (X.Y.Z) and must not con-tain any spaces or non-number characters. |
|
architectures |
The binary architectures the module supports as a delimited list. Example: armeabi armeabi-v7a x86 |
|
description |
This is a human-readable description of your module. It should be short and suitable for display next to your module name. |
|
author |
This is a human-readable author name you want to display next to your module. It can simply be your personal name, such as "Jeff Haynie" or an organizational name such as "Appcelerator". |
|
license |
This is a human-readable name of your license. You should use a short description such as "Apache Public License" or "Commercial". |
|
copyright |
This is a human-readable copyright string for your module. For example, "Copyright (c) 2010 by Appcelerator, Inc." |
|
name |
This is a read-only name of your module that is generated when you created your project. You must not edit this value. |
|
moduleid |
This is a read-only module id of your module that is generated when you created your project. You should not edit this value. NOTE: you must generate a unique id. We recommend using your reverse-DNS company name + module_name as a pattern to guarantee uniqueness. The Titanium Marketplace will only allow unique module ids when distributing modules. If you must edit this value, you must also edit the value in your module implementation file. |
|
guid |
This is a read-only unique module id for your module that is generated when you created your project. You must not edit this value. |
|
platform |
This is a read-only platform target of your module that is generated when you created your project. You must not edit this value. |
|
minsdk |
The is a generated value for the minimum Titanium SDK version that was used when creating your module. This is currently not used and reserved for future use. |
CLI Tasks
Create a New Module Project
To create a new module project, run the following Appcelerator CLI command:
appc
new
-d /PATH/TO/WORKSPACE -n <MODULE_NAME> --id <MODULE_ID>
### when prompted
for
the project type, select
"Titanium Module"
### Example
$ ti create -d . -n test --id com.example.test
Appcelerator Command-Line Interface, version
0.2
.
230
Copyright (c)
2014
-
2015
, Appcelerator, Inc. All Rights Reserved.
? What type of project are you creating?
Native App
Arrow App
❯ Titanium Module
If you omit any of the options, the CLI will prompt you to enter them.
Build and Package the Module
To build and package a module, run ant in the android directory. Note: The ant binary should be in your PATH environment variable.
cd /<PATH_TO_MODULE_PROJECT>/<MODULE_NAME>/android
ant
After the build completes, you should have a ZIP file in the android/dist directory and see the following message in the console:
** BUILD SUCCEEDED **
With the ZIP file, you can either:
-
Uncompress it in the Titanium SDK home path to install the module globally for all your Titanium applications
-
Uncompress it in a Titanium project's parent directory to install the module locally for that one Titanium application
-
Distribute the ZIP file
Clean the Project
To clean the module project of generated binary files, you can run ant with the clean target from the android directory:
ant clean
Studio Tasks
Create a New Module Project
-
From the menu, select File > New > Mobile Module Project to open the New Mobile Module Project dialog.
-
In the Project hame field, enter a name for the module.
-
In the Module Id field, enter a module ID for the module.
-
In Deployment Targets, select Android.
-
Click Next.
-
In the Module Manifest File page, enter information about your module, such as the license information, version number, etc. You can also edit this information in the manifest file later.
-
Click Finish.
Build and Package the Module
You can either use Studio's launch toolbar or use Ant from the right-click context menu.
Studio Toolbar
-
Select your module folder in the Project Explorer view.
-
Verify Package and Android Module are displayed in Launch Mode and Launch Target, respectively.
-
Click the Package icon to open the Package Android Module dialog.
-
In Output Location, select either
-
Titanium SDK to install the module in the Titanium SDK home path to be accessed by any Titanium application
-
Mobile App Project and choose an application to install the module locally that can be accessed by one that Titanium application
-
Location and enter a path to copy the ZIP file to for distribution
-
-
Click Finish.
Run as Ant Build
-
In the Project Explorer view, expand the module's android folder.
-
Right-click the build.xml file and select Run As... > Ant Build.
In the Console view, you will see the build log output. After the build completes, the package (ZIP file) will be in the module's android/dist folder.
Test the Module
To test a module:
-
Create a new Titanium Classic or Alloy project.
-
Install the module to either the Titanium SDK home directory or in the project.
-
Add the module as a dependency to the project.
-
Load the module and make module API calls.
Debug the Module
The best way to debug your Android modules right now is a bit old fashioned. When there is a problem or unexpected behavior in your module, use log statements to trace through your code's execution.
Logging
The Log class offers several static methods for writing to the log.
It is considered a best practice to define a LCAT or TAG variable at the top of your class, and to use that as the first parameter to all calls to Log.
private
static
final
String TAG =
"FooProxy"
;
@Kroll
.method
public
void
fooFunction(String arg)
{
Log.i(TAG,
"fooFunction received: "
+ arg);
}
DDMS
DDMS, or Dalvik Debug Monitor Server, is a Google-provided application that lets you grab debug information from emulators and connected Android devices. To get started, see Android Developer: Using DDMS.
Add a Third-Party JAR
To use a third-party JAR in your module, add the JAR file to the module's lib directory (not the libs directory), so it can be copied over during the module's build process and linked when building the application. If you are using Studio, you need to add the JAR as a dependency to the module project before importing the package and making API calls.
To add a JAR as a dependency in Studio:
-
Right-click the module project (root folder) and select Properties to open the project's properties dialog.
-
In the left pane, select Java Build Path.
-
In the right pane, click the Libraries tab.
-
Click the Add External JARs... button to open the JAR Selection dialog.
-
Navigate to the module's android/lib folder and select the JAR to add.
-
Click Open. The JAR should be added to the JARs list.
-
Click OK to dismiss the dialog.
Bundle Module Assets
For Android modules, you can either add assets in the module's assets folder or android/platform folder.
Assets Folder
Files in the assets folder are added to the JAR library's assets folder. To access these files, use the Android Class's getResource() method to retrieve a URL object or getResourceAsStream() method to retrieve an InputStream object.
// Original file was in assets/image.png
URL url = getClass().getClassLoader().getResource(
"assets/image.png"
);
Log.i(
"GETFILE"
, url.toString());
// do something with the URL
Platform Folder
Files in the platform folder are distributed in the module's ZIP file and copied over to the application's platform folder. Add an android subfolder, then add any of the resource directories defined in Android Developer: Providing Resources. To access these files, you can use Android's AssetManager class or the Titanium SDK TiRHelper helper library.
// Original file was in android/platform/android/res/drawable/image.png
int
result =
0
;
try
{
result = TiRHelper.getApplicationResource(
"drawable.image"
);
Log.i(
"GOODSTUFF"
,
new
Integer(result).toString());
// do something with the result
}
catch
(ResourceNotFoundException e) {
Log.e(
"BADSTUFF"
,
"[ERROR] EXCEPTION -- RESOURCE NOT FOUND"
);
}
Distribute your Module through the Appcelerator Marketplace
To distribute your module through the Titanium+Plus Marketplace, you'll first need to package normally. Once you have tested your module locally and are ready to distribute it, you can then submit it to the marketplace for distribution. There are several prerequisites you'll need before you can distribute:
-
You must have a valid Titanium developer account.

-
You must have a valid license text in the LICENSE file in your project.
-
You must have a valid documentation file in the index.md file in your documentation directory of your project.
-
You must specify some additional metadata upon upload such as the price (which can be free).
-
If you are charging for your module, you must establish a payment setup with Appcelerator so we can pay you.
-
You must accept the Titanium+Plus Marketplace terms of service agreement.
Once you have upload your module and completed the necessary submission steps, your module will be queued for submission and availability in the marketplace directory.
Known Issues
Conflicting jar files detected
When building an application that includes two or more modules that contains the same library, in particular, the google-play-services.jar, the JAR files may conflict indicating that each module is using a different version of the library (MOD-1985).
[ERROR] Application Installer abnormal process termination. Process exit value was
1
[ERROR] : Conflicting jar files detected:
[ERROR] :
[ERROR] : The following modules have different
"google-play-services.jar"
files
[ERROR] : mymodule (version
3.0
.
3
) (hash=8b95ece0c3ae132fb898ec8beef1cb2d)
[ERROR] : ti.map (version
2.2
.
3
) (hash=a9b753b4c63719e24d0022e341c57b2e)
[ERROR] :
[ERROR] : You can either select a version of these modules where the conflicting jar file is the same or you
[ERROR] : can
try
copying the jar file from one module
's "lib" folder to the other module'
s
"lib"
folder.
To resolve this issue, you can either delete one of the JAR files from one of the modules or copy the JAR file from one module's lib folder to the other's to make both versions the same. This solution only works on a per-application basis and is not a global solution.
If you include the Google Play services library in your module, you many need to include instructions telling the developer how to workaround this issue if they include other modules that use the Google Play services library, such as the ti.map or ti.cloudpush modules.


TTFAF v. 1.1.0e
Changelog
Version 1.0.0
Created Christmas Canon Rock
Version 1.0.0a
Optimized the miss code to reduce lag
Shortened the song to reduce lag
Version 1.0.0b
Optimized the miss code even more to reduce lag
Optimized the hit code to reduce lag
Version 1.0.1
Added a home screen and menus
Added fail and win screens
Version 1.0.2
Added customizable controls
Version 1.0.2a
Redid the customizable controls so they wouldn't break after playing 1 song
Fixed the bug where the customizable controls would display the key code, not the key letter
Version 1.0.3
Fixed the full combo bug
Fixed the error where frame 354 broke the entire song
Added song previews
Fixed the weird glitch where none of the keys work if controls were not changed
Version 1.1.0
Added November Rain
Added song slots for Pleasure (Pleasure), Seven Nation Army, and Take On Me
Version 1.1.0a
Fixed the audio lag (which should not even occur) in November Rain
Version 1.1.0b
Fixed a bug where if you first start the game and go to controls, don't change anything, then play a song, the default keys would not work
Version 1.1.0c
Fixed a bug where the default yellow key did not work doing the above method by adding the letter "e" to the code
Version 1.1.0d
Fixed the bug where the miss note sound wasn't playing
Re-aligned the multiplier and score values in November Rain to match with Christmas Canon Rock
Fixed the bug where failing in November Rain says you failed Christmas Canon Rock
Verison 1.1.0e
Made November Rain a little harder


{landingpage_home_template}
The Government Digital Strategy sets out how government will redesign its digital services to make them so straightforward and convenient that all those who can use them prefer to do so. This strategy:
The strategy also describes how delivering services digitally will result in savings of £1.7 to £1.8 billion each year, and commits government to the following actions:


--- layout: post title: running-junit-tests-in-parallel date: 2014-02-09 18:18:37.000000000 +00:00 type: post published: true status: publish categories: [] tags: [] meta: _edit_last: '36016338' _publicize_pending: '1' author: login: velmuruganv email<EMAIL_ADDRESS>display_name: velmuruganv first_name: '' last_name: '' ---
I'm using JUnit 4.4 and Maven and I have a large number of long-running integration tests.
When it comes to parallelizing test suites there are a few solutions that allow me to run each test method in a single test-class in parallel. But all of these require that I change the tests in one way or another.
I really think it would be a much cleaner solution to run X different test classes in X threads in parallel. I have hundreds of tests so I don't really care about threading individual test-classes.
I opted for Junit-toolbox JUnit-Tool-Box
1. add this dependency to your POM.xml.
<dependency> <groupId>com.googlecode.junit-toolbox</groupId> <artifactId>junit-toolbox</artifactId> <version>1.5</version> </dependency>
2. Write a Junit test classes.
[code lang="java"]
package com.numerify.qa.tests.detailedtests;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.googlecode.junittoolbox.ParallelRunner;
@RunWith(ParallelRunner.class)
public class ParallelClassTest {
@Before
public void setup() {
}
@Test
public void test1() {
// TODO Auto-generated method stub
}
@Test
public void test2() {
// TODO Auto-generated method stub
}
@Test
public void test3() {
// TODO Auto-generated method stub
}
@After
public void tearDown() {
}
}
[/code]
ParallelRunner -- Executes all @Test methods as well as the calls to @Theory methods with different parameter assignments concurrently using several worker threads.


Following is a collection of frequently asked questions concerning the design of the Preferences API.
It is intended to replace most common uses of Properties, rectifying many of its deficiencies, while retaining its light weight. When using Properties, the programmer must explicitly specify a pathname for each properties file, but there is no standard location or naming convention. Properties files are "brittle", as they are hand-editable but easily corrupted by careless editing. Support for non-string data types in properties is non-existent. Properties cannot easily be used with a persistence mechanism other than the file system. In sum, the Properties facility does not scale.
Like JNDI, it provides back-end neutral access to persistent key-value data. JNDI, however, is far more powerful, and correspondingly heavyweight. JNDI is appropriate for enterprise applications that need its power. Preferences API is intended as a simple, ubiquitous, back-end neutral preferences-management facility, enabling any Java application to easily tailor its behavior to user preferences and maintain small amounts of state from run to run.
get
methods require the
caller to pass in a default?
This forces the application authors to provide reasonable default values, so that applications have a reasonable chance of running even if the repository is unavailable.
BackingStoreException
?
Only methods whose semantics absolutely require the ability to communicate with the backing store throw this exception. Typical applications will have no need to call these methods. As long as these methods are avoided, applications will be able to run even if the backing store is unavailable, which was an explicit design goal.
While the API does provide rudimentary persistent data storage, it is not intended as a substitute for a database. It is critical that it be possible to implement this API atop standard preference/configuration repositories, most of which do not provide database-like guarantees and functionality. Such repositories have proven adequate for the purposes for which this API is intended.
In the Java programming universe, case-sensitive String keys are ubiquitous. In particular, they are provided by the Properties class, which this API is intended to replace. It is not uncommon for people to use Properties in a fashion that demands case-sensitivity. For example, Java package names (which are case-sensitive) are sometimes used as keys. It is recognized that this design decision complicates the life of the systems programmer who implements Preferences atop a backing store with case-insensitive keys, but this is considered an acceptable price to pay, as far more programmers will use the Preferences API than will implement it.
This API is designed for a very particular purpose, and is optimized for that purpose. In the absence of generic types (see JSR-14), the API would be less convenient for typical users. It would lack compile-time type safety, if forced to conform to the Map API. Also, it is not anticipated that interoperability with other Map implementations will be required (though it would be straightforward to implement an adapter class if this assumption turned out to be wrong). Preferences API is, by design, so similar to Map that programmers familiar with the latter should have no difficulties using the former.
It is desirable that both of these methods be executable even if the backing store is unavailable. This would not be possible if they were required to return the old value. Further, it would have negative performance impact if the API were implemented atop some common back-end data stores.
This functionality is required in enterprise settings for scalable, cost-effective administration of preferences across the enterprise, but would be overkill in a self-administered single-user setting.
Serialized objects are somewhat fragile: if the version of the program that reads such a property differs from the version that wrote it, the object may not deserialize properly (or at all). It is not impossible to store serialized objects using this API, but we do not encourage it, and have not provided a convenience method.
Preferences
an abstract class rather
than an interface?
It was decided that the ability to add new methods in an upward compatible fashion outweighed the disadvantage that Preferences cannot be used as a "mixin" (That is to say, arbitrary classes cannot also be made to serve as Preferences objects.) Also, this obviates the need for a separate class for the static methods. (Interfaces cannot contain static methods.)


Login
Signup
×
Username
Password
Login
Remember me
Cancel
Forgot
password?
×
Name
Email
Mobile
Username
Password
Signup
1 / 4
Caption Text
2 / 4
Caption Two
3 / 4
Caption Three
4 / 4
Caption Three
❮
❯


## The setup
In this tutorial, I'm going to show you how simple it is to creatively
interfere with Apple Game Center traffic using mitmproxy. To set things up, I
registered my mitmproxy CA certificate with my iPhone - there's a [step by step
set of instructions](@!urlTo("certinstall/ios.html")!@) elsewhere in this manual. I then
started mitmproxy on my desktop, and configured the iPhone to use it as a
proxy.
## Taking a look at the Game Center traffic
Lets take a first look at the Game Center traffic. The game I'll use in this
tutorial is [Super Mega
Worm](http://itunes.apple.com/us/app/super-mega-worm/id388541990?mt=8) - a
great little retro-apocalyptic sidescroller for the iPhone:
After finishing a game (take your time), watch the traffic flowing through
mitmproxy:
We see a bunch of things we might expect - initialisation, the retrieval of
leaderboards and so forth. Then, right at the end, there's a POST to this
tantalising URL:
https://service.gc.apple.com/WebObjects/GKGameStatsService.woa/wa/submitScore
The contents of the submission are particularly interesting:
scores
category
SMW_Adv_USA1
context
0
score-value
0
timestamp
1363515361321
This is a [property list](http://en.wikipedia.org/wiki/Property_list),
containing an identifier for the game, a score (55, in this case), and a
timestamp. Looks pretty simple to mess with.
## Modifying and replaying the score submission
Lets edit the score submission. First, select it in mitmproxy, then press
__enter__ to view it. Make sure you're viewing the request, not the response -
you can use __tab__ to flick between the two. Now press __e__ for edit. You'll
be prompted for the part of the request you want to change - press __b__ for
body.  Lets bump the score up to something a bit more ambitious:
scores
category
SMW_Adv_USA1
context
0
score-value
2200272667
timestamp
1363515361321
Save the file and exit your editor.
The final step is to replay this modified request. Simply press __r__ for
replay.
## The glorious result and some intrigue
And that's it - according to the records, I am the greatest Super Mega Worm
player of all time.
There's a curious addendum to this tale. When I first wrote this tutorial, all
the top competitors' scores were the same: 2,147,483,647 (this is no longer the
case, beacause there are now so many fellow cheaters using this tutorial). If
you think that number seems familiar, you're right: it's 2^31-1, the maximum
value you can fit into a signed 32-bit int. Now let me tell you another
peculiar thing about Super Mega Worm - at the end of every game, it submits
your highest previous score to the Game Center, not your current score. This
means that it stores your highscore somewhere, and I'm guessing that it reads
that stored score back into a signed integer. So, if you _were_ to cheat by the
relatively pedestrian means of modifying the saved score on your jailbroken
phone, then 2^31-1 might well be the maximum score you could get. Then again,
if the game itself stores its score in a signed 32-bit int, you could get the
same score through perfect play, effectively beating the game. So, which is it
in this case? I'll leave that for you to decide.


DualShock 5 controller for PS5 has appeared on Japanese patent website
by Aran SuddiIn around a year’s time the PlayStation 5 will be sitting on shelves in shops or even in homes as the new generation dawns. While we don’t yet know what the PS5 will look like, though we know what the development kit looks like, a new patent for the DualShock 5 has appeared on the Japanese patent office website. While the design in the images may not be final, as the patent is more about the functionality of the hardware, it does appear that Sony won’t be drifting too far from the DualShock 4.
It looks the ports at the base of the controller have been redesigned and the touchpad is still there right in the middle. Or is it a touchscreen? That’s what some speculate. This isn’t the first patent to arrive for the PS5. In September Sony registered one for something called PlayStation Assist, an apparent virtual assistant that would be able to help to both navigate the system and give help within games. Last month a patent for what appears to be the next generation of PSVR hardware was also discovered. There are also reports there are two PS5 systems heading for release with those being the PS5 standard and the PS5 Pro.
We don’t yet know the exact date of when the PS5 will be released but it seems that March 2020 will be when all the details are revealed at a PlayStation Meeting. Not really that long left now.
Source: Japanese Patent Office via Forbes


You are being redirected to the page...
If you are not automatically redirected please head to this link: Veesom Store Page


Menu
BITSMUN
About
Conference
Invitation
Fee and deadline
Secratariat
FAQ
Committees
DISEC
UNSC
UNHRC
European Union
Indo-Pak Border Committee
Akshay's Committee
Socials
Contact
Register
Login
The Secratariat
BITSMUN 2017 wouldn't have been possible without the contribution of the following members
Ayush Sharma
Secretary General
Akshit Goyal
Director General
Name
Post
Name
Post
Name
Post
Name
Post
Name
Post
Name
Post
Name
Post
Name
Post
Name
Post


Template to monitor Synology HA Solution
Template is based on Synology MIB Guide and monitor only an Synology HA Cluster
Is based on snmp v2 data from section Synology SHA MIB
Installation notes
Don’t forget to set the right community name in template Macros section
Before add to host set/add in Zabbix-> Administration -> General -> Value mapping
Synology Cluster Status
0 ⇒ normal
1 ⇒ warning
2 ⇒ critical
3 ⇒ upgrading
4 ⇒ processing
0 ⇒ normal
1 ⇒ abnormal
2 ⇒ disconnected
3 ⇒ empty
1 ⇒ True
2 ⇒ False
Items are explained in details
Triggers are explained and contain tags to show the problem details depending on received value
Created and tested with:
Synology DSM 6.2-24922on following models:
Zabbix version 4.0.0
You can write questions also to<EMAIL_ADDRESS>Nice to read when will deploy Synology HA environment this Synology HA White Paper
Tudor Ticau
| Name | Description | Default | Type |
|---|---|---|---|
| {$SNMP_COMMUNITY} |
-
 | public |
Text macro |
There are no template links in this template.
There are no discovery rules in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Heartbeat Transfer Speed |
Transfer speed of heartbeat in kilo-byte-per-second
 | SNMP agent |
heartbeatTxRate
Update: 60
 |
| Active Server Name |
Hostname of active server/NAS
 | SNMP agent |
activeNodeName
Update: 60
 |
| Cluster Name |
Hostname of High-Availability cluster
 | SNMP agent |
clusterName
Update: 60
 |
| Cluster Status |
Status of High-Availability cluster Possible values: normal (0) - The High-Availability cluster is healthy warning (1) - The High-Availability cluster has something went wrong. Action should be taken to resume High-Availability feature. Please refer to High-Availability Manager for more details. critical (2) - The High-Availability cluster is in danger, and should be resolved as soon as possible.Please refer to High-Availability Manager for more details. upgrading (3) - The High-Availability cluster is upgrading. processing (4) - The High-Availability cluster is undergoing some operation.
 | SNMP agent |
clusterStatus
Update: 60
 |
| Cluster AutoFailover |
Whether cluster can failover once something went wrong true (1) false (2)
 | SNMP agent |
clusterAutoFailover
Update: 60
 |
| Heartbeat Status |
Status of heartbeat connection Possible values: normal (0) - The heartbeat connection is normal abnormal (1) - Some information about heartbeat is not available disconnected (2) - The High-Availability cluster loses connection to passive server through heartbeat interface, or it is currently in split-brain mode empty (3) - The High-Availability cluster has no passive server.
 | SNMP agent |
heartbeatStatus
Update: 60
 |
| Passive Server Name |
Hostname of passive server
 | SNMP agent |
passiveNodeName
Update: 60
 |
| Heartbeat Latency |
Heartbeat latency in microseconds (10^-6 seconds)
 | SNMP agent |
heartbeatLatency
Update: 60
 |
There are no triggers in this template.
Template to monitor Synology HA Solution
Template is based on Synology MIB Guide and monitor only an Synology HA Cluster
Is based on snmp v2 data from section Synology SHA MIB
Installation notes
Don’t forget to set the right community name in template Macros section
Before add to host set/add in Zabbix-> Administration -> General -> Value mapping
Synology Cluster Status
0 ⇒ normal
1 ⇒ warning
2 ⇒ critical
3 ⇒ upgrading
4 ⇒ processing
0 ⇒ normal
1 ⇒ abnormal
2 ⇒ disconnected
3 ⇒ empty
1 ⇒ True
2 ⇒ False
Items are explained in details
Triggers are explained and contain tags to show the problem details depending on received value
Created and tested with:
Synology DSM 6.2-24922on following models:
Zabbix version 4.0.0
You can write questions also to<EMAIL_ADDRESS>Nice to read when will deploy Synology HA environment this Synology HA White Paper
Tudor Ticau
| Name | Description | Default | Type |
|---|---|---|---|
| {$SNMP_COMMUNITY} |
-
 | public |
Text macro |
There are no template links in this template.
There are no discovery rules in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Heartbeat Latency |
Heartbeat latency in microseconds (10^-6 seconds)
 | SNMP agent |
heartbeatLatency
Update: 60
 |
| Heartbeat Transfer Speed |
Transfer speed of heartbeat in kilo-byte-per-second
 | SNMP agent |
heartbeatTxRate
Update: 60
 |
| Cluster Status |
Status of High-Availability cluster Possible values: normal (0) - The High-Availability cluster is healthy warning (1) - The High-Availability cluster has something went wrong. Action should be taken to resume High-Availability feature. Please refer to High-Availability Manager for more details. critical (2) - The High-Availability cluster is in danger, and should be resolved as soon as possible.Please refer to High-Availability Manager for more details. upgrading (3) - The High-Availability cluster is upgrading. processing (4) - The High-Availability cluster is undergoing some operation.
 | SNMP agent |
clusterStatus
Update: 60
 |
| Cluster AutoFailover |
Whether cluster can failover once something went wrong true (1) false (2)
 | SNMP agent |
clusterAutoFailover
Update: 60
 |
| Passive Server Name |
Hostname of passive server
 | SNMP agent |
passiveNodeName
Update: 60
 |
| Heartbeat Status |
Status of heartbeat connection Possible values: normal (0) - The heartbeat connection is normal abnormal (1) - Some information about heartbeat is not available disconnected (2) - The High-Availability cluster loses connection to passive server through heartbeat interface, or it is currently in split-brain mode empty (3) - The High-Availability cluster has no passive server.
 | SNMP agent |
heartbeatStatus
Update: 60
 |
| Active Server Name |
Hostname of active server/NAS
 | SNMP agent |
activeNodeName
Update: 60
 |
| Cluster Name |
Hostname of High-Availability cluster
 | SNMP agent |
clusterName
Update: 60
 |
There are no triggers in this template.
Template to monitor Synology HA Solution
Template is based on Synology MIB Guide and monitor only an Synology HA Cluster
Is based on snmp v2 data from section Synology SHA MIB
Installation notes
Don’t forget to set the right community name in template Macros section
Before add to host set/add in Zabbix-> Administration -> General -> Value mapping
Synology Cluster Status
0 ⇒ normal
1 ⇒ warning
2 ⇒ critical
3 ⇒ upgrading
4 ⇒ processing
0 ⇒ normal
1 ⇒ abnormal
2 ⇒ disconnected
3 ⇒ empty
1 ⇒ True
2 ⇒ False
Items are explained in details
Triggers are explained and contain tags to show the problem details depending on received value
Created and tested with:
Synology DSM 6.2-24922on following models:
Zabbix version 4.0.0
You can write questions also to<EMAIL_ADDRESS>Nice to read when will deploy Synology HA environment this Synology HA White Paper
Tudor Ticau
| Name | Description | Default | Type |
|---|---|---|---|
| {$SNMP_COMMUNITY} |
-
 | public |
Text macro |
There are no template links in this template.
There are no discovery rules in this template.
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Heartbeat Latency |
Heartbeat latency in microseconds (10^-6 seconds)
 | SNMP agent |
heartbeatLatency
Update: 60
 |
| Heartbeat Transfer Speed |
Transfer speed of heartbeat in kilo-byte-per-second
 | SNMP agent |
heartbeatTxRate
Update: 60
 |
| Cluster Status |
Status of High-Availability cluster Possible values: normal (0) - The High-Availability cluster is healthy warning (1) - The High-Availability cluster has something went wrong. Action should be taken to resume High-Availability feature. Please refer to High-Availability Manager for more details. critical (2) - The High-Availability cluster is in danger, and should be resolved as soon as possible.Please refer to High-Availability Manager for more details. upgrading (3) - The High-Availability cluster is upgrading. processing (4) - The High-Availability cluster is undergoing some operation.
 | SNMP agent |
clusterStatus
Update: 60
 |
| Cluster AutoFailover |
Whether cluster can failover once something went wrong true (1) false (2)
 | SNMP agent |
clusterAutoFailover
Update: 60
 |
| Passive Server Name |
Hostname of passive server
 | SNMP agent |
passiveNodeName
Update: 60
 |
| Heartbeat Status |
Status of heartbeat connection Possible values: normal (0) - The heartbeat connection is normal abnormal (1) - Some information about heartbeat is not available disconnected (2) - The High-Availability cluster loses connection to passive server through heartbeat interface, or it is currently in split-brain mode empty (3) - The High-Availability cluster has no passive server.
 | SNMP agent |
heartbeatStatus
Update: 60
 |
| Active Server Name |
Hostname of active server/NAS
 | SNMP agent |
activeNodeName
Update: 60
 |
| Cluster Name |
Hostname of High-Availability cluster
 | SNMP agent |
clusterName
Update: 60
 |
There are no triggers in this template.


Current analysis times range from 30 min to 4 hours per art piece. Goal is to minimize both survey and analysis times.
Current analysis techniques are capable of detecting cracks visible to the human eye. At the very least crack widths of 10μm should be detected.
iPads are currently primarily used by conservators to survey and analyse a painting for defects. The total product costs must therefore be approximately equivalent to the cost of an iPad Pro.
Key function is for the detection of cracks of minimum width 10μm. Processing of the images captured by the camera is conducted on a device (ex. laptop) separate from the scanning apparatus. A defect map of all existing cracks should be produced for the entire painting for the conservator to view and assess.
Key function is to capture a set of images of the painting with 10 um details using the camera and flash ring of LED lights. These images are then offloaded to a server where they are stored and available for processing in real time or in a later period by the detection software.
Key functions include securing the sensor, removal of ambient light, securing the painting and vibration isolation within the system and from the environment. Support the movement of the camera along the major and minor axes.
Key functions include provision of minimum major and minor axes resolution of ±1 mm by the motors and provision of two major voltage rails, 24V and 5V, for the motors, linear actuators, Raspberry Pi and Arduino.
Computer Vision and User Interface Development
Hardware and Firmware Development
Computer Vision and User Interface Development
Mechanical Design and Firmware Development


module type S =sig
..end
This interface exposes actual setters and getters, that should be used to query data or to store it in a document. The interface is provided by a monad transformer functor, that wraps the Ogre monad into an arbitrary user monad.
Underneath the hood, the Ogre monad is a state monad wrapped into
an error monad. The state holds the document, so that it is not
needed to pass it along all the functions, and the error monad
facilitates error propagation. We do not expose the catch
function
from the standard Error monad interface, as we are concerned that
it will be abused (we don't see any legitimate usage of this
function in the use cases of Ogre that we perceive).
The interface is built around 3 accessors functions for data querying and one mutator for inserting data into a document.
In our model, a document is a set of facts, that describe some
abstract entity. We're making a deriviations based on facts. To
make a deriviation we need some facts, the particular set of
required facts, as well as the modality of the requirement (i.e.,
how much it is needed), depends on the particular deriviation. For
example, we might Ogre.S.require
a fact to be present or, if it is
optional, we might Ogre.S.request
it, finally, we may query for a
collection of facts, and apply our deriviation Ogre.S.foreach
fact. In
other terms, require attribute
mandates that there is one and
only one value of the given attribute
, request attribute
asks
for zero or one value, and foreach attribute
requires zero or more
values of the attribute
.
include Monad.S
include Monad.Trans.S
val require : ?that:('a -> bool) -> ('a, 'b -> 'c) Ogre.attribute -> 'a t
require a ~that:p
requires that an attribute a
has one and
only one value that satisfies a predicate p
. It is an error,
if there are no such values, or if there are more than one value.val request : ?that:('a -> bool) -> ('a, 'b -> 'c) Ogre.attribute -> 'a option t
request a ~that:p
request no more than one value of an
attribute a
, that satisfies a predicate p
. The returned
value is wrapped in an option. If there are more than one
satisfying value, then it is an error.val foreach : ('a -> 'b) Ogre.query -> f:'a -> 'b Ogre.seq t
foreach query ~f:action
applies an action
for each value of
an attributes specified in the query. The query
value is built
using a domain specific language embedded into OCaml. This
language is very similiar to SQL, and has join and where
clauses, e.g.,
let better_than_average_students =
foreach Query.(begin
select
~where:(students.(gpa) > float 3.5)
~join:[
[field classid];
[
field teacher ~from:students;
field id ~from:teachers
]]
(from students $ teachers)
end)
~f:(fun s t -> return (s,t))
The type of the query
value encodes the type of the function
f
. A well formed query has a type of form
(t1 -> t2 -> .. -> tm -> 'a t) -> 'a t
, where t1
till tm
are
types of attributes enumerated in the from clause
(in that
particular order).
See the Query
module documentation for more information about
the query EDSL.
val collect : (('a -> 'a) -> 'b) Ogre.query -> 'b Ogre.seq t
collect query
is the same as foreach query ~f:ident
val provide : ('b, 'a -> unit t) Ogre.attribute -> 'a
provide attr v1 v2 ... vm
stores the constituents of an
attribute value in the document. An attribute type encodes not
only the type of an attribute value, but also a type and the
order of the fields. Thus, the attribute
itself captures a
format of the attribute representation, the same as format
is
used in printf-like functions. In that sense, the provide
function is variadic, where the first argument (the attribute)
defines the type and the arity of the function.val fail : Std.Error.t -> 'a t
fail error
aborts an inference process with the specified
error
.val failf : ('a, Format.formatter, unit, unit -> 'b t) Std.format4 -> 'a
failf fmt args... ()
constructs an error based on the
specified format fmt
and arguments, terminated by the unit value
()
. Example:
failf "the file type %s is unsupported" name ()
Note: don't forget to terminate a sequence of arguments with an
extra unit value. See the corresponding invalid_argf
and
failwithf
function for the reason, why this extra argument is
needed.
val eval : 'a t -> Ogre.doc -> 'a Std.Or_error.t m
eval property document
makes an inference of a property
based
on facts stored in a document
. If all requirements are
satisfied and no errors occured the inferred result.
For example, given the property names_of_best_students
,
defined as,
let names_of_best_students =
foreach Query.(select (from students)
~where:(students.(gpa) > float 3.8))
~f:(fun s -> return (Student.name s))
we can evaluate this property, with
eval names_of_best_students
to get a sequence (possibly empty) of all students that have the
GPA score greater than 3.8.
val exec : 'a t -> Ogre.doc -> Ogre.doc Std.Or_error.t m
exec op doc
executes an operation op
that, presumabely,
updates the document doc
, returns an updated version.val run : 'a t -> Ogre.doc -> ('a * Ogre.doc) Std.Or_error.t m
run op doc
runs an operation op
that does some inference as
well as may update the document. This function is a usual part
of a generic state monad interface, and is provided for the
consistency. Usually, it is a bad idea, or a notion of a bad
style to use this function.


archiavelli
home
about
exlibris
summits
blog
Bash in Review
in-review ~
27 Nov 2019
technology
bash
infrastructure
in-review
programming
Please enable JavaScript to view the
comments powered by Disqus.


giaofock.F:371:0: warning: ‘ntot’ may be used uninitialized in this function [-Wmaybe-uninitialized]
giaofock.F:508:0: warning: ‘factor_cam’ may be used uninitialized in this function [-Wmaybe-uninitialized]
../nwdft/include/cdft.fh:82.29:
Included at hnd_giaox.F:17:
& nrinc, nrmax, geom, ncenters, nbf, nradpts, nang_leb_pts,
1
Error: COMMON attribute conflicts with DUMMY attribute in 'geom' at (1)
hnd_giaox.F:20.18:
integer geom ! [input] geometry handle
1
Error: Symbol 'geom' at (1) already has basic type of INTEGER
hnd_giaox.F:22.56:
integer nclosed(2), nopen(2), nvirt(2), ndens, nbf, nmo
1
Error: Symbol 'nbf' at (1) already has basic type of INTEGER
hnd_giaox.F:45.23:
logical oskel, status, debug
1
Error: Symbol 'oskel' at (1) already has basic type of LOGICAL
hnd_giaox.F:81.13:
xfac(1) = 0.0d0
1
Error: 'xfac' at (1) is not a variable
hnd_giaox.F:874.13:
xfac(1) = kfac_org
1
Error: 'xfac' at (1) is not a variable
hnd_giaox.F:66.11:
debug = .false. .and. (ga_nodeid().eq.0) ! special debugging
1
Error: Symbol debug at (1) has no IMPLICIT type
hnd_giaox.F:144.56:
call hnd_prp_get_dens(rtdb,geom,basis,g_dens,ndens,scftyp,
1
Error: Symbol ndens at (1) has no IMPLICIT type
hnd_giaox.F:140.46:
& dbl_mb(k_eval),nmo)
1
Error: Symbol nmo at (1) has no IMPLICIT type
hnd_giaox.F:138.61:
call hnd_prp_vec_read(rtdb,geom,basis,nbf,nclosed,nopen,
1
Error: Symbol nopen at (1) has no IMPLICIT type
hnd_giaox.F:101.12:
status = rtdb_parallel(.true.)
1
Error: Symbol status at (1) has no IMPLICIT type
hnd_giaox.F:138.55:
call hnd_prp_vec_read(rtdb,geom,basis,nbf,nclosed,nopen,
1
Error: Symbol nclosed at (1) has no IMPLICIT type
hnd_giaox.F:161.15:
ahi(2) = nclosed(1)
1
Error: Function nclosed at (1) has no IMPLICIT type
hnd_giaox.F:170.47:
if(.not.ga_create(MT_DBL,nclosed(1)*nvirt(1),3,RHS,-1,-1,g_rhs))
1
Error: Function nvirt at (1) has no IMPLICIT type
hnd_giaox.F:180.31:
bhi(1) = nclosed(1)*nvirt(1)
1
Error: Function nvirt at (1) has no IMPLICIT type
hnd_giaox.F:202.15:
alo(1) = nclosed(1)+1
1
Error: Function nclosed at (1) has no IMPLICIT type
hnd_giaox.F:206.18:
do iocc = 1, nclosed(1)
1
Error: Function nclosed at (1) has no IMPLICIT type
hnd_giaox.F:220.15:
ahi(2) = nclosed(1)
1
Error: Function nclosed at (1) has no IMPLICIT type
hnd_giaox.F:230.15:
ahi(1) = nclosed(1)
1
Error: Function nclosed at (1) has no IMPLICIT type
hnd_giaox.F:264.15:
dhi(2) = nclosed(1)
1
Error: Function nclosed at (1) has no IMPLICIT type
hnd_giaox.F:278.18:
ahi(2) = nclosed(1)
1
Error: Function nclosed at (1) has no IMPLICIT type
hnd_giaox.F:283.18:
ahi(1) = nclosed(1)
1
Error: Function nclosed at (1) has no IMPLICIT type
hnd_giaox.F:284.18:
bhi(2) = nclosed(1)
1
Error: Function nclosed at (1) has no IMPLICIT type
hnd_giaox.F:328.15:
ahi(2) = nclosed(1)
1
Error: Function nclosed at (1) has no IMPLICIT type
hnd_giaox.F:340.15:
clo(2) = nclosed(1)+1
1
Error: Function nclosed at (1) has no IMPLICIT type
Fatal Error: Error count reached limit of 25.
Im building the development version from October using the following script on debian (gcc 4.7):
export LARGE_FILES=TRUE
export TCGRSH=/usr/bin/ssh
export NWCHEM_TOP=`pwd`
export NWCHEM_TARGET=LINUX64
export NWCHEM_MODULES="all"
export BLASOPT="-L/opt/openblas/lib -lopenblas"
export USE_MPI=y
export USE_MPIF=y
export USE_MPIF4=y
export MPI_LOC=/usr/lib/openmpi/lib
export MPI_INCLUDE=/usr/lib/openmpi/include
export LIBRARY_PATH=$LIBRARY_PATH:/usr/lib/openmpi/lib:/opt/openblas/lib
export LIBMPI="-lmpi -lopen-rte -lopen-pal -ldl -lmpi_f77 -lpthread"
cd $NWCHEM_TOP/src
export FC=gfortran
make clean
make nwchem_config
make FC=gfortran 1> make.log 2>make.err
cd ../contrib
./getmem.nwchem
It builds the unmodified code without any issues.
(The "URL cannot be found" is apparently also triggered by too many apostrofes in a code bracket environment)
|


Calendar Demo
Year
Month
January
February
March
April
May
June
July
August
September
October
November
December
<
>
New
Title
Description
Save


WWE tops Sports Business Journal’s Live Event Production list
by WWE.comWWE has been recognized in Sports Business Journal’s 15th annual Reader Survey as the “Entity Best at Producing Live Event Spectacles.” The honor marks the second year in a row that WWE has garnered the top spot.
WWE beat out other major sports properties including the NFL, MLB, NBA, NHL, NASCAR, FIFA, IOC and USTA. The publication’s annual survey compiles the readers’ perception of today’s sports landscape.


Compose file version 1 reference
Estimated reading time: 14 minutesReference and guidelines
These topics describe version 1 of the Compose file format. This is the oldest version.
Compose and Docker compatibility matrix
There are several versions of the Compose file format – 1, 2, 2.x, and 3.x The table below is a quick look. For full details on what each version includes and how to upgrade, see About versions and upgrading.
This table shows which Compose file versions support specific Docker releases.
| Compose file format | Docker Engine release |
|---|---|
| 3.7 | 18.06.0+ |
| 3.6 | 18.02.0+ |
| 3.5 | 17.12.0+ |
| 3.4 | 17.09.0+ |
| 3.3 | 17.06.0+ |
| 3.2 | 17.04.0+ |
| 3.1 | 1.13.1+ |
| 3.0 | 1.13.0+ |
| 2.4 | 17.12.0+ |
| 2.3 | 17.06.0+ |
| 2.2 | 1.13.0+ |
| 2.1 | 1.12.0+ |
| 2.0 | 1.10.0+ |
| 1.0 | 1.9.1.+ |
In addition to Compose file format versions shown in the table, the Compose itself is on a release schedule, as shown in Compose releases, but file format versions do not necessarily increment with each release. For example, Compose file format 3.0 was first introduced in Compose release 1.10.0, and versioned gradually in subsequent releases.
Service configuration reference
The Version 1 Compose file is a YAML file that defines services.
The default path for a Compose file is ./docker-compose.yml
.
Tip: You can use either a
.yml
or.yaml
extension for this file. They both work.
A service definition contains configuration which is applied to each
container started for that service, much like passing command-line parameters to
docker run
.
As with docker run
, options specified in the Dockerfile, such as CMD
,
EXPOSE
, VOLUME
, ENV
, are respected by default - you don’t need to
specify them again in docker-compose.yml
.
This section contains a list of all configuration options supported by a service definition in version 1.
build
Configuration options that are applied at build time.
build
can specified as a string containing a path to the build
context.
build: ./dir
Note
In version 1 file format,
build
is different in two ways:
- Only the string form (
build: .
) is allowed - not the object form that is allowed in Version 2 and up.- Using
build
together withimage
is not allowed. Attempting to do so results in an error.
dockerfile
Alternate Dockerfile.
Compose uses an alternate file to build with. A build path must also be specified.
build: .
dockerfile: Dockerfile-alternate
Note
In the version 1 file format,
dockerfile
is different from newer versions in two ways:
It appears alongside
build
, not as a sub-option:Using
dockerfile
together withimage
is not allowed. Attempting to do so results in an error.
cap_add, cap_drop
Add or drop container capabilities.
See man 7 capabilities
for a full list.
cap_add:
- ALL
cap_drop:
- NET_ADMIN
- SYS_ADMIN
Note: These options are ignored when deploying a stack in swarm mode with a (version 3) Compose file.
command
Override the default command.
command: bundle exec thin -p 3000
The command can also be a list, in a manner similar to dockerfile:
command: ["bundle", "exec", "thin", "-p", "3000"]
cgroup_parent
Specify an optional parent cgroup for the container.
cgroup_parent: m-executor-abcd
container_name
Specify a custom container name, rather than a generated default name.
container_name: my-web-container
Because Docker container names must be unique, you cannot scale a service beyond 1 container if you have specified a custom name. Attempting to do so results in an error.
devices
List of device mappings. Uses the same format as the --device
docker
client create option.
devices:
- "/dev/ttyUSB0:/dev/ttyUSB0"
dns
Custom DNS servers. Can be a single value or a list.
dns: <IP_ADDRESS>
dns:
- <IP_ADDRESS>
- <IP_ADDRESS>
dns_search
Custom DNS search domains. Can be a single value or a list.
dns_search: example.com
dns_search:
- dc1.example.com
- dc2.example.com
entrypoint
Override the default entrypoint.
entrypoint: /code/entrypoint.sh
The entrypoint can also be a list, in a manner similar to dockerfile:
entrypoint:
- php
- -d
- zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so
- -d
- memory_limit=-1
- vendor/bin/phpunit
Note: Setting
entrypoint
both overrides any default entrypoint set on the service’s image with theENTRYPOINT
Dockerfile instruction, and clears out any default command on the image - meaning that if there’s aCMD
instruction in the Dockerfile, it is ignored.
env_file
Add environment variables from a file. Can be a single value or a list.
If you have specified a Compose file with docker-compose -f FILE
, paths in
env_file
are relative to the directory that file is in.
Environment variables specified in environment override these values.
env_file: .env
env_file:
- ./common.env
- ./apps/web.env
- /opt/secrets.env
Compose expects each line in an env file to be in VAR=VAL
format. Lines
beginning with #
are processed as comments and are ignored. Blank lines are
also ignored.
# Set Rails/Rack environment
RACK_ENV=development
Note: If your service specifies a build option, variables defined in environment files are not automatically visible during the build.
The value of VAL
is used as is and not modified at all. For example if the
value is surrounded by quotes (as is often the case of shell variables), the
quotes are included in the value passed to Compose.
Keep in mind that the order of files in the list is significant in determining
the value assigned to a variable that shows up more than once. The files in the
list are processed from the top down. For the same variable specified in file
a.env
and assigned a different value in file b.env
, if b.env
is
listed below (after), then the value from b.env
stands. For example, given the
following declaration in docker-compose.yml
:
services:
some-service:
env_file:
- a.env
- b.env
And the following files:
# a.env
VAR=1
and
# b.env
VAR=hello
$VAR is hello
.
environment
Add environment variables. You can use either an array or a dictionary. Any boolean values; true, false, yes no, need to be enclosed in quotes to ensure they are not converted to True or False by the YML parser.
Environment variables with only a key are resolved to their values on the machine Compose is running on, which can be helpful for secret or host-specific values.
environment:
RACK_ENV: development
SHOW: 'true'
SESSION_SECRET:
environment:
- RACK_ENV=development
- SHOW=true
- SESSION_SECRET
Note: If your service specifies a build option, variables defined in
environment
are not automatically visible during the build.
expose
Expose ports without publishing them to the host machine - they’ll only be accessible to linked services. Only the internal port can be specified.
expose:
- "3000"
- "8000"
extends
Extend another service, in the current file or another, optionally overriding configuration.
You can use extends
on any service together with other configuration keys.
The extends
value must be a dictionary defined with a required service
and an optional file
key.
extends:
file: common.yml
service: webapp
The service
the name of the service being extended, for example
web
or database
. The file
is the location of a Compose configuration
file defining that service.
If you omit the file
Compose looks for the service configuration in the
current file. The file
value can be an absolute or relative path. If you
specify a relative path, Compose treats it as relative to the location of the
current file.
You can extend a service that itself extends another. You can extend
indefinitely. Compose does not support circular references and docker-compose
returns an error if it encounters one.
For more on extends
, see the
the extends documentation.
external_links
Link to containers started outside this docker-compose.yml
or even outside
of Compose, especially for containers that provide shared or common services.
external_links
follow semantics similar to links
when specifying both the
container name and the link alias (CONTAINER:ALIAS
).
external_links:
- redis_1
- project_db_1:mysql
- project_db_1:postgresql
extra_hosts
Add hostname mappings. Use the same values as the docker client --add-host
parameter.
extra_hosts:
- "somehost:<IP_ADDRESS>"
- "otherhost:<IP_ADDRESS>"
An entry with the ip address and hostname is created in /etc/hosts
inside containers for this service, e.g:
<IP_ADDRESS> somehost
<IP_ADDRESS> otherhost
image
Specify the image to start the container from. Can either be a repository/tag or a partial image ID.
image: redis
image: ubuntu:14.04
image: tutum/influxdb
image: example-registry.com:4000/postgresql
image: a4bc65fd
If the image does not exist, Compose attempts to pull it, unless you have also specified build, in which case it builds it using the specified options and tags it with the specified tag.
Note: In the version 1 file format, using
build
together withimage
is not allowed. Attempting to do so results in an error.
labels
Add metadata to containers using Docker labels. You can use either an array or a dictionary.
It’s recommended that you use reverse-DNS notation to prevent your labels from conflicting with those used by other software.
labels:
com.example.description: "Accounting webapp"
com.example.department: "Finance"
com.example.label-with-empty-value: ""
labels:
- "com.example.description=Accounting webapp"
- "com.example.department=Finance"
- "com.example.label-with-empty-value"
links
Link to containers in another service. Either specify both the service name and
a link alias (SERVICE:ALIAS
), or just the service name.
Links are a legacy option. We recommend using networks instead.
web:
links:
- db
- db:database
- redis
Containers for the linked service are reachable at a hostname identical to the alias, or the service name if no alias was specified.
Links also express dependency between services in the same way as depends_on, so they determine the order of service startup.
Note: If you define both links and networks, services with links between them must share at least one network in common in order to communicate.
log_driver
Version 1 file format only. In version 2 and up, use logging.
Specify a log driver. The default is json-file
.
log_driver: syslog
log_opt
Version 1 file format only. In version 2 and up, use logging.
Specify logging options as key-value pairs. An example of syslog
options:
log_opt:
syslog-address: "tcp://<IP_ADDRESS>:123"
net
Version 1 file format only. In version 2 and up, use network_mode and networks.
Network mode. Use the same values as the docker client --net
parameter.
The container:...
form can take a service name instead of a container name or
id.
net: "bridge"
net: "host"
net: "none"
net: "container:[service name or container name/id]"
pid
pid: "host"
Sets the PID mode to the host PID mode. This turns on sharing between container and the host operating system the PID address space. Containers launched with this flag can access and manipulate other containers in the bare-metal machine’s namespace and vice versa.
ports
Expose ports. Either specify both ports (HOST:CONTAINER
), or just the container
port (an ephemeral host port is chosen).
Note: When mapping ports in the
HOST:CONTAINER
format, you may experience erroneous results when using a container port lower than 60, because YAML parses numbers in the formatxx:yy
as a base-60 value. For this reason, we recommend always explicitly specifying your port mappings as strings.
ports:
- "3000"
- "3000-3005"
- "8000:8000"
- "9090-9091:8080-8081"
- "49100:22"
- "<IP_ADDRESS>:8001:8001"
- "<IP_ADDRESS>:5000-5010:5000-5010"
- "6060:6060/udp"
security_opt
Override the default labeling scheme for each container.
security_opt:
- label:user:USER
- label:role:ROLE
stop_signal
Sets an alternative signal to stop the container. By default stop
uses
SIGTERM. Setting an alternative signal using stop_signal
causes
stop
to send that signal instead.
stop_signal: SIGUSR1
ulimits
Override the default ulimits for a container. You can either specify a single limit as an integer or soft/hard limits as a mapping.
ulimits:
nproc: 65535
nofile:
soft: 20000
hard: 40000
volumes, volume_driver
Mount paths or named volumes, optionally specifying a path on the host machine
(HOST:CONTAINER
), or an access mode (HOST:CONTAINER:ro
).
For version 2 files, named volumes need to be specified with the
top-level volumes
key.
When using version 1, the Docker Engine creates the named
volume automatically if it doesn’t exist.
You can mount a relative path on the host, which expands relative to
the directory of the Compose configuration file being used. Relative paths
should always begin with .
or ..
.
volumes:
# Just specify a path and let the Engine create a volume
- /var/lib/mysql
# Specify an absolute path mapping
- /opt/data:/var/lib/mysql
# Path on the host, relative to the Compose file
- ./cache:/tmp/cache
# User-relative path
- ~/configs:/etc/configs/:ro
# Named volume
- datavolume:/var/lib/mysql
If you do not use a host path, you may specify a volume_driver
.
volume_driver: mydriver
There are several things to note, depending on which Compose file version you’re using:
-
For version 1 files, both named volumes and container volumes use the specified driver.
-
No path expansion is done if you have also specified a
volume_driver
. For example, if you specify a mapping of./foo:/data
, the./foo
part is passed straight to the volume driver without being expanded.
See Docker Volumes and Volume Plugins for more information.
volumes_from
Mount all of the volumes from another service or container, optionally
specifying read-only access (ro
) or read-write (rw
). If no access level
is specified, then read-write is used.
volumes_from:
- service_name
- service_name:ro
cpu_shares, cpu_quota, cpuset, domainname, hostname, ipc, mac_address, mem_limit, memswap_limit, mem_swappiness, privileged, read_only, restart, shm_size, stdin_open, tty, user, working_dir
Each of these is a single value, analogous to its docker run counterpart.
cpu_shares: 73
cpu_quota: 50000
cpuset: 0,1
user: postgresql
working_dir: /code
domainname: foo.com
hostname: foo
ipc: host
mac_address: 02:42:ac:11:65:43
mem_limit:<PHONE_NUMBER>
memswap_limit:<PHONE_NUMBER>
privileged: true
restart: always
read_only: true
shm_size: 64M
stdin_open: true
tty: true
Compose documentation
- User guide
- Installing Compose
- Compose file versions and upgrading
- Get started with Django
- Get started with Rails
- Get started with WordPress
- Command line reference


Italian Cuisine Week introduces focaccia col formaggio to Saudi Arabia
Online jewelry store Al-Kaynuna has drawn on human history and cultures to help inspire its range of gold and silver products.
The Saudi Instagram venture believes that jewelry should not only be expressive but also a reflection of the wearer’s personality.
Al-Kaynuna’s (@alkaynuna) fine jewelry pieces have been designed to symbolize Semitic meanings, remind people about human values and help individuals to fulfill themselves.
One of its most popular products was inspired by the ancient Greek aphorism “know yourself,” that was inscribed in the forecourt of the Temple of Apollo at Delphi in Ancient Greece.
This invitation to reflect on oneself is inscribed on a vintage-looking coin in English, Arabic, and Greek. A variety of designs are available, and items can be preordered through Al-Kaynuna’s Instagram account.
Jewelry inspired by prominent personalities from Islamic and contemporary Arab philosophy can also be found among the range.
Al-Kaynuna aims to find a source of metaphysical communication with the unknown to reflect human imagination, curiosity, and the dream of eternity through passionately designed jewelry that acts as a tangible form of personal experience.


Here you can learn about our events. [All Links Are Provided In The Archive]
And you can learn about our ideologies.
Also you can browse through our videos and circulars in database.
And search for what you want to bring about as change!!.
You can also learn about your Environment and send us your ideas for conservations.
You can also contribute to the website and the club both as a developer or as a monetary handshaker ;).
1-> We have created to improve our institutes environment by making, growing, nourishing, and loving the relation with our natural world.
2-> We eagerly waiting for your reviews as you can send us your messages through the
      contact tab link.


Growing Up:
I was born and raised in Phoenix, Arizona in a family with two loving parents and one younger
brother. Specifically
I was raised on the edge of North Phoenix, almost in the city of Anthem. For my first year of
high school I went to
Barry Goldwater High School for the International Baccalaureate program they had there. After my
first year I switched
to Boulder Creek High School in Anthem because it was closer and more engineering focused rather
than fine arts. Junior
year I got a job at Chili's as a host and then moved to dish for a pay raise. I had that job for
over two years and only
left when I left to go to Northern Arizona University and I have been here ever since.
Past Achievements:
- Completed an internship at ASU where we did research on thermoelectric generators and the
power output
they each produced
- Graduated high school in the top 10% of my class of about 600 students
- Was the vice president of FBLA at my high school for one year and attended the state
competition in Tucson
as well as the leadership trainings
- Attended the West-Mec Start coding program in 11th grade which taught me how to make websites
including HTML, CSS,
Javascript, PHP, and MySQL
- Created an Android application titled "Location Reminders" which provided the user with
reminders based on a location
they provided. It utilizes GPS and SQLite to store and check the location (unpublished but is on
Github)


This example (here with bootstrap menu and animate.css) is a quick exercise to illustrate how the snakeMenu.js can be use to make nice hover menu. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.
SnakeMenu.js documentation »


Gisele Bundchen, daughter Vivian look nearly identical in throwback photo
by Nate DaySupermodel Gisele Bündchen's latest throwback picture will have you seeing double.
Bundchen, 39, took to Instagram to share a side-by-side photo of herself as a child and her 6-year-old daughter, Vivian.
"Do you guys think my baby girl and I look alike?" the caption read.
MARIAH CAREY'S SON, ROCKY, 'SNUCK UP ON' RYAN REYNOLDS IN DEADPOOL MASK
The two share obvious similarities, right down to the hairstyle. The only difference in the photo seems to be Bunchen's Cabbage Patch Doll.
Fans caught on quickly, confessing their astonishment in the comments.
KATE HUDSON ON STRUGGLES, TRIUMPHS OF MOTHERHOOD: 'I MAKE MISTAKES ALL THE TIME'
"Completely like mama," one user commented.
Another person jokingly said: "No resemblance whatsoever @gisele," before admitting, "Totally twins 👯♂ 😘"
Bundchen's celebrity friends were quick to comment as well, among them, her NFL star husband, Tom Brady.
"Girlie Girls ❤ ❤" he said.


--- layout: post title: Bookmarks for January 31st through February 3rd tags: - code - documentation - DocumentUp - free - generator - Github - haml - hastebin - icons - inspiration - middleman - mobile - noun project - productivity - prototype - ruby - sass - sharing - simple - sinatra - sled - symbols - testing - themes - tumble - url shortner - usability - user testing - wireframe - wordpress status: publish type: post published: true meta: aktt_notify_twitter: 'no' ---
These are my links for January 31st through February 3rd:


Maestro Reorin:
Hiccup~!  I, who at one time was a prominent maestro... How the mighty have fallen... Thrown out of the guild and seduced by demons. Are you sure you want to hear all of this?
"Tell me everything."


please be quiet
Thing Action Service
This shows real activity, as it happens, in Crossref Event Data. But don't take it too seriously.


--- layout: post title: New flooring date: 2012-02-13 11:53:04.000000000 -05:00 categories: - Renovations (Renos 101!) tags: - charcoal carpet - Home renovations - New carpet - new flooring - nylon carpet - Renovations status: publish type: post published: true meta: aktt_notify_twitter: 'no' _edit_last: '1' dsq_thread_id: '1188598600' author: login: cint email<EMAIL_ADDRESS>display_name: Jacinta first_name: Jacinta last_name: '' ---
After much discussion as to what flooring we wanted to put down in the remaining two bedrooms, lounge and dining area, we decided to stick with carpet. Originally we were going to use floating bamboo flooring like we did in the girls rooms and kitchen, but unfortunately the bamboo we were using was discontinued (a con of doing renos at our snail paced speed!). So off to a carpet shop we went. Thankfully we had a great selection to choose from in our price range and better still, Greg and I both liked the same colour.
The carpet was laid today. We are very happy with our choice and it is so lovely to walk on. We were so tempted not to put furniture back in place, as the minimalistic look was very appealing. I love the idea of not having things to dust! Alas, while I went out to yoga, one of Greg's good friend came over and helped him lug the heavy stuff back into place. I certainly know who drew the short straw there.
It's starting to feel like all our hard work is starting to pay off. The house is getting to the stage where I will be able to share more pictures with you soon. But for now, here is a before and after photo looking from the kitchen doorway back into the dining and lounge area....
[caption id="attachment_1473" align="aligncenter" width="450" caption="Before"][/caption]
[caption id="attachment_1474" align="aligncenter" width="600" caption="After"][/caption]
The dog is loving the new carpet as are the kids. Now, if only they could invent carpet that repelled lint, dirt and crushed gum leaves (gum leaves are the bane of my existence), I'd be most impressed. Jacinta x
We purchased the carpet through Carpet Call in Narre Warren and were pretty happy with their service and installation.
The carpet is nylon and the colour code is 72 (like a dark charcoal).


By using gonawin, you will be able to play with your friends around your favorite sport events.
Join us by clicking on the sign in button in the home page and choose to log in with either your Google+, Google, Twitter or Facebook account.
Once you sign up you will have access to the following:
Your team administrator will be able to sign your team up to an existing tournament and all the team members will be able to start playing said tournament right away.
You can be part of as many teams as you wish.
In your profile page you will find the following:
In the settings section, you will find your profile information.
In the invite section you can send invitations to your friends to join you on gonawin.
On every match there is a gonawin button. By clicking on it you will see a form that you can fill in with your guess. Then just hit save and your prediction will be recorded.
Right the only tournaments supported are the FIFA World Cup and the UEFA Champions League.
In the tournament page you will find the different matches, the groups and the ranking of teams and users in this tournament.
If you guessed correctly the score of a match you will get 3 points. If you guess correctly the trend of the match (meaning a draw, or the winner) you will get 1 point.


@extends('layouts.app') @section('stylesheets') @endsection @section('panel')
...
{{$boardinghouse->address." ".$boardinghouse->village->name. ", ".$boardinghouse->village->district->name . ", " . $boardinghouse->village->district->regency->name. ", " . $boardinghouse->village->district->regency->province->name}}
{{$boardinghouse->information_cost}}