Chapter 10 Hypothesis testing
10.1 Hypothesis testing theory
Null hypothesis (H0):
1. H0: m = μ
2. H0: m \(\leq\) μ
3. H0: m \(\geq\) μ
Alternative hypotheses (Ha):
1. Ha:m ≠ μ (different)
2. Ha:m > μ (greater)
3. Ha:m < μ (less)
Note: Hypothesis 1. are called two-tailed tests and hypotheses 2. & 3. are called one-tailed tests.
The p-value is the probability that the observed data could happen, under the condition that the null hypothesis is true.
Note: p-value is not the probability that the null hypothesis is true.
Note: Absence of evidence ⧧ evidence of absence.
Cutoffs for hypothesis testing *p < 0.05, **p < 0.01, ***p < 0.001.
If p value is less than significance level alpha (0.05), the hull hypothesies is rejected.
| not rejected (‘negative’) | rejected (‘positive’) | |
|---|---|---|
| H0 true | True negative (specificity) | False Positive (Type I error) |
| H0 false | False Negative (Type II error) | True positive (sensitivity) |
Type II errors are usually more dangerous.
Significance level \(/alpha\) is the probability of mistakenly rejecting the null hypothesis, if the null hypothesis is true. This is also called false positive and type I error.
10.2 Hypothesis test (Practice)
- Check distribution (is normal?): shapiro.test()
- Distribution uniformity (are both normal?)
- Dependence of variable (are x and y dependent?)
- Difference of distribution parameters (are means different?)
###. 1 Is distribution normal?
<- read.table("~/DataAnalysis/DATA/town_1959_2.csv", header=T, sep="\t", dec=".")
town
town# histogram
hist(town[,3])
# log scale
hist(log(town[,3]), breaks=50)
# ? Is log scaled number of sitizens per town is normally distributed?
# test for normal distribution of dataset
<- log(town[,3])
data shapiro.test(data)
# H0: data is normally distributed
# W = 0.97467 -
# p-value = 3.15e-12 -> p < alpha (0.01) - H0 is incorrect
# Our distripution is not normal
# Different tests for normality in package "nortest"
install.packages("nortest")
library(nortest)
ad.test(data) # Anderson-Darling test
lillie.test(data) # Lilliefors (Kolmogorov-Smirnov) test
# Emperical rule: if n < 2000 -> shapiro.test, else -> lillie.test
# In theory it is possible to use method for normally distributed data,
# even if they are not normal, but almost normal:
# 1. No outlayers
# 2. Symmetry of histogram
# 3. Bell-shaped form of histogram
# Method to make normal from not-normal distribution
# 1. Remove outlayers
# 2. Transform data to get symmetry: log, Boxcox
# 3. Bimodality: split samples into groups
# Boxcox transformation
install.packages("AID")
library(AID)
= boxcoxnc(data)
bctr $results
bctr
### 2. Compair centers of two distributions
# Emperical rule: if notmal -> mean, else -> median
# if median -> Mann–Whitney-Wilcoxon (MWW) test
# if mean -> one of Student's tests
# Student t-test
# t.test(x,y, alternative="two.sided", paired=FALSE, var.equal=FALSE)
# How to compair if dispersions are the same?
# Fligner-Killeen test
# Brown-Forsythe test
#fligner.test(x~g, data=data.table)
# Example
<- read.table ("~/DataAnalysis/R_data_analysis/DATA/Albuquerque Home Prices_data.txt", header=T)
x
names(x)
summary(x)
# Change -9999 to NA
$AGE[x$AGE==-9999] <- NA
x$TAX[x$TAX==-9999] <- NA
x
fligner.test(PRICE~COR, data=x)
# Dispersion is the same for both distribution
# p > alpha (0.01)
t.test(x$PRICE[x$COR==1], x$PRICE[x$COR==0],
alternative="less",
paired=FALSE,
var.equal=TRUE)
# p-value = 0.1977 (H0 is true)
# Mood's median test
names(x)
<- x[x$NE==1,1]
x1 <- x[x$NE==0,1]
x2 <- median(c(x1,x2))
m <- sum(x1>m)
f11 <- sum(x2>m)
f12 <- sum(x1<=m)
f21 <- sum(x2<=m)
f22 <- matrix(c(f11,f12, f21, f22), nrow=2,ncol=2)
table chisq.test(table)
# p=0.47 > alpha=0.05: H0 is true
# medians are the same
## Mann–Whitney-Wilcoxon (MWW) test
# Check if medians are the same
# U1 = n1*n2+{n1*(n1+1)/2 - T1}
# U1 = n1*n2+{n2*(n2+1)/2 - T2}
# U=min(U1,U2)
# Ti - сумма рангов в объединенной выборке наблюдений из выборки i
# n1, n2 - размеры выборок
wilcox.test(x,y,
alternative="two.sided",
paired=FALSE,
exact=TRUE,
correct=FALSE)
###. 3. Dependency of variables
# H0: x, y independent
# Correlation analysis
# Correlation (pearson) mesure linear dependency!
# Correlation k depends on outlayers (must be removed)
plot(x$SQFT, x$TAX)
cor(x$SQFT, x$TAX, use = "complete.obs")
cor(x$SQFT, x$TAX, use = "complete.obs", method = "spearman")
cor(x, use = "complete.obs", method = "spearman")
cor(x, use = "complete.obs", method = "pearson")
cor.test(x$SQFT, x$TAX, use = "complete.obs")


Introduction to WPA Supplicant
WPA Supplicant is a Wi-Fi
Protected Access (WPA) client and IEEE 802.1X supplicant. It
implements WPA key negotiation with a WPA Authenticator and
Extensible Authentication Protocol (EAP) authentication with an
Authentication Server. In addition, it controls the roaming and
IEEE 802.11 authentication/association of the wireless LAN driver.
This is useful for connecting to a password protected wireless
access point.
This package is known to build and work properly using an LFS-9.1
platform.
Package Information
WPA Supplicant Dependencies
Recommended
desktop-file-utils-0.24 (for running
update-desktop-database) and
libnl-3.5.0
Optional
dbus-1.12.16, libxml2-2.9.10, and Qt-5.14.1
User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/wpa_supplicant
Kernel Configuration
Enable the following options in the kernel configuration as well as
specific device drivers for your hardware and recompile the kernel
if necessary:
[*] Networking support ---> [CONFIG_NET]
[*] Wireless ---> [CONFIG_WIRELESS]
<*/M> cfg80211 - wireless configuration API [CONFIG_CFG80211]
[*] cfg80211 wireless extensions compatibility [CONFIG_CFG80211_WEXT]
<*/M> Generic IEEE 802.11 Networking Stack (mac80211) [CONFIG_MAC80211]
Device Drivers --->
[*] Network device support ---> [CONFIG_NETDEVICES]
[*] Wireless LAN ---> [CONFIG_WLAN]
Open the submenu and select the options that support your hardware:
lspci from pciutils-3.6.4 can be used to view your
hardware configuration.
Installation of WPA Supplicant
First you will need to create an initial configuration file for the
build process. You can read wpa_supplicant/README
and wpa_supplicant/defconfig
for the explanation of
the following options as well as other options that can be used.
Create a build configuration file that should work for standard
WiFi setups by running the following command:
cat > wpa_supplicant/.config << "EOF"
CONFIG_BACKEND=file
CONFIG_CTRL_IFACE=y
CONFIG_DEBUG_FILE=y
CONFIG_DEBUG_SYSLOG=y
CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON
CONFIG_DRIVER_NL80211=y
CONFIG_DRIVER_WEXT=y
CONFIG_DRIVER_WIRED=y
CONFIG_EAP_GTC=y
CONFIG_EAP_LEAP=y
CONFIG_EAP_MD5=y
CONFIG_EAP_MSCHAPV2=y
CONFIG_EAP_OTP=y
CONFIG_EAP_PEAP=y
CONFIG_EAP_TLS=y
CONFIG_EAP_TTLS=y
CONFIG_IEEE8021X_EAPOL=y
CONFIG_IPV6=y
CONFIG_LIBNL32=y
CONFIG_PEERKEY=y
CONFIG_PKCS12=y
CONFIG_READLINE=y
CONFIG_SMARTCARD=y
CONFIG_WPS=y
CFLAGS += -I/usr/include/libnl3
EOF
If you wish to use WPA Supplicant
with NetworkManager-1.22.6, make sure that
you have installed dbus-1.12.16 and libxml2-2.9.10, then add the following options
to the WPA Supplicant build
configuration file by running the following command:
cat >> wpa_supplicant/.config << "EOF"
CONFIG_CTRL_IFACE_DBUS=y
CONFIG_CTRL_IFACE_DBUS_NEW=y
CONFIG_CTRL_IFACE_DBUS_INTRO=y
EOF
Install WPA Supplicant by running
the following commands:
cd wpa_supplicant &&
make BINDIR=/sbin LIBDIR=/lib
If you have installed Qt-5.14.1 and wish to build the WPA Supplicant GUI program, run the following
commands:
Note
The following directory name is labelled qt4, but is compatible
with Qt-5.14.1.
pushd wpa_gui-qt4 &&
qmake wpa_gui.pro &&
make &&
popd
This package does not come with a test suite.
Now, as the root
user:
install -v -m755 wpa_{cli,passphrase,supplicant} /sbin/ &&
install -v -m644 doc/docbook/wpa_supplicant.conf.5 /usr/share/man/man5/ &&
install -v -m644 doc/docbook/wpa_{cli,passphrase,supplicant}.8 /usr/share/man/man8/
If you have built WPA Supplicant
with D-Bus support, you will need
to install D-Bus configuration
files. Install them by running the following commands as the
root
user:
install -v -m644 dbus/fi.w1.wpa_supplicant1.service \
/usr/share/dbus-1/system-services/ &&
install -v -d -m755 /etc/dbus-1/system.d &&
install -v -m644 dbus/dbus-wpa_supplicant.conf \
/etc/dbus-1/system.d/wpa_supplicant.conf
If you have built the WPA
Supplicant GUI program, install it by running the following
commands as the root
user:
install -v -m755 wpa_gui-qt4/wpa_gui /usr/bin/ &&
install -v -m644 doc/docbook/wpa_gui.8 /usr/share/man/man8/ &&
install -v -m644 wpa_gui-qt4/wpa_gui.desktop /usr/share/applications/ &&
install -v -m644 wpa_gui-qt4/icons/wpa_gui.svg /usr/share/pixmaps/
Note
You will need to restart the system D-Bus daemon before you can use the
WPA Supplicant D-Bus interface.
Note
This package installs desktop files into the /usr/share/applications
hierarchy and you can
improve system performance and memory usage by updating
/usr/share/applications/mimeinfo.cache
. To
perform the update you must have desktop-file-utils-0.24 installed
and issue the following command as the root
user:
update-desktop-database -q
Configuring wpa_supplicant
Config File
/etc/sysconfig/wpa_supplicant-*.conf
Configuration Information
To connect to an access point that uses a password, you need to
put the pre-shared key in /etc/sysconfig/wpa_supplicant-wifi0
.conf
. SSID is
the string that the access point/router transmits to identify
itself. Run the following command as the root
user:
wpa_passphrase SSID
SECRET_PASSWORD
> /etc/sysconfig/wpa_supplicant-wifi0
.conf
/etc/sysconfig/wpa_supplicant-wifi0
.conf
can hold
the details of several access points. When wpa_supplicant is started, it
will scan for the SSIDs it can see and choose the appropriate
password to connect.
If you want to connect to an access point that isn't password
protected, put an entry like this in /etc/sysconfig/wpa_supplicant-wifi0
.conf
.
Replace "Some-SSID" with the SSID of the access point/router.
network={
ssid="Some-SSID
"
key_mgmt=NONE
}
Connecting to a new access point that is not in the configuration
file can be accomplished manually via the command line or GUI,
but it must be done via a privileged user. To do that, add the
following to the configuration file:
ctrl_interface=DIR=/run/wpa_supplicant GROUP=<privileged group>
update_config=1
Replace the <privileged group> above with a system group
where members have the ability to connect to a wireless access
point.
There are many options that you could use to tweak how you
connect to each access point. They are described in some detail
in the wpa_supplicant/wpa_supplicant.conf
file in the
source tree.
Connecting
to an Access Point
If you want to
configure network interfaces at boot using wpa_supplicant, you need to
install the /lib/services/wpa
script included in blfs-bootscripts-20191204 package:
make install-service-wpa
If your router/access point uses DHCP to allocate IP addresses,
you can install DHCP-4.4.2 client and use it to automatically
obtain network addresses. Create the /etc/sysconfig/ifconfig-wifi0
by running the
following command as the root
user:
cat > /etc/sysconfig/ifconfig.wifi0
<< "EOF"
ONBOOT="yes"
IFACE="wlan0
"
SERVICE="wpa"
# Additional arguments to wpa_supplicant
WPA_ARGS=""
WPA_SERVICE="dhclient"
DHCP_START=""
DHCP_STOP=""
# Set PRINTIP="yes" to have the script print
# the DHCP assigned IP address
PRINTIP="no"
# Set PRINTALL="yes" to print the DHCP assigned values for
# IP, SM, DG, and 1st NS. This requires PRINTIP="yes".
PRINTALL="no"
EOF
If you prefer dhcpcd-8.1.6 instead of DHCP-4.4.2 client, then create
the /etc/sysconfig/ifconfig-wifi0
by running the
following command as the root
user:
cat > /etc/sysconfig/ifconfig.wifi0
<< "EOF"
ONBOOT="yes"
IFACE="wlan0
"
SERVICE="wpa"
# Additional arguments to wpa_supplicant
WPA_ARGS=""
WPA_SERVICE="dhcpcd"
DHCP_START="-b -q <insert appropriate start options here>
"
DHCP_STOP="-k <insert additional stop options here>
"
EOF
Alternatively, if you use static addresses on your local network,
then create the /etc/sysconfig/ifconfig-wifi0
by running the
following command as the root
user:
cat > /etc/sysconfig/ifconfig.wifi0
<< "EOF"
ONBOOT="yes"
IFACE="wlan0
"
SERVICE="wpa"
# Additional arguments to wpa_supplicant
WPA_ARGS=""
WPA_SERVICE="ipv4-static"
IP="<IP_ADDRESS>"
GATEWAY="<IP_ADDRESS>"
PREFIX="24"
BROADCAST="<IP_ADDRESS>"
EOF
You can connect to the wireless access point by running the
following command as the root
user:
ifup wifi0
Replace wlan0
with the
correct wireless interface and wifi0
with desired name for the
configuration file. Please note that wpa_supplicant-*.conf
and ifconfig.*
configuration files need to have
identical names, ie both contain wifi0
in their name.


{% extends 'base.html' %} {% block content %} {{block.super}}
Image Description: "{{image.description}}"
Category:{{image.image_category}}
Location:{{image.image_location}}


A musical feast was somewhat of a fabulous dinner dance with four lively dances of the Slavonic and Hungarian kind included.
The opening Slavonic Dances Numbers 1 and 8 by Anton Dvorak were an indication of the feast to follow. The rhythm and exuberance was conveyed so well we didn’t need to actually see the dancers performing those tricky steps. Brahms Hungarian dances which lead the second part of the program were similarly very lively and invigorating; Brahms used folk songs extensively in these pieces and while being no expert I felt quite a bit of gypsy music infiltrated them.
N.S.W Soprano, Julie O’Connor sang four of the most beautiful songs in the repertoire. Her voice was pure and very versatile in the range of notes required. She also had the best facial and hand gestures I have seen which really enhances the enjoyment of the music. Many singers, whilst having a great voice, tend to be wooden in gesture and stance. The Orchestra was very much part of the song, never intruding but always asserting its contribution to the overall beauty of the music.
In this 150 anniversary year of Sibelius Finlandia was a joy to hear again. This became Finland’s unofficial anthem during the independence war against Russia (played under a variety of names so as to not to antagonise the aggressors) in the 1890’s and is very stirring.
My friend commented that “The BRO’s interpretation under Mark Shiell's baton was crisp, and the move from the dark, atmospheric mood to the lighter song or hymn seemed startling, this was done so beautifully and effortlessly. As a non musician, I loved it.”
A musical feast without Beethoven and Bach would be like food without salt. We were privileged to hear Bach’s Double Violin Concerto’s 1st movement with two of the many talented young players from the orchestra, Julia Ramsbotham and Florence Cappler-Shillington, masterfully playing the double solo and the orchestra’s string section ably accompanying them. Beethoven’s 5th Symphony’s first movement was slightly different as Conductor Mark Shiell’s research showed that Ludwig Van originally meant it to be at a different tempo to what we are now accustomed to hear. The Orchestra certainly showed how right he was, every note could be heard and every note added up to a most beautiful piece of music which was over too soon.
For me the piece de resistance of the concert was Rossini’s William Tell Overture, the first part with the cellos and double basses was sublime then I found I just didn’t want the storm to finish but when the Trumpets heralded the more familiar part I was carried along with the galloping music – it was great music played very well.
For that little bit of extra chocolate we were treated to a repeat of the Hungarian Dance No 5.
So Bravo Mark, Bravo Musicians, Bravo everyone who contributed - as I say after almost every concert – This has been the best concert yet.


Eureka, the flagship event of Pantheon'18 is an opportunity for the smartest and quirkiest teenagers to bring out the explorer in themselves. For the preliminary round, the basic idea of the project is to be mailed along with the relevant pictures. The best entries get a chance to feature their models for the final exhibition.
1. Participants will have to prepare a report of their presentation with required photographs as a proof of their project progress, in less than 1000 words, and mail it to the address of<EMAIL_ADDRESS>before October.
2. The selected teams will be sent mails regarding their selection and will be informed about the further rounds.
3. The selected teams will have to be present during the entire exhibition and will have to explain their project to the technical enthusiasts present.
4. The teams will also be explaining their project to the judging panel who will scrutinize their project.
5. The teams will be given a total time of 10 minutes to explain their project.
6. The teams will be marked on their content, level of research, presentation skills and most importantly crowd interaction skills.
7. The decision of the judging panel will be final and binding.
Team Size: 4-5
Theme: Innovation + Vision = Innovision
Ayush<PHONE_NUMBER>)
Anamika<PHONE_NUMBER>)


Gate In Details
| Gate In Date | {{job_order.date}} |
| Gate In Time | {{job_order.time}} |
| Captured by | {{job_card.job_order.gate_log.created_by.name}} |
| Outlet | {{job_card.job_order.outlet.name}} |
| Vehicle Image | KM Image | Driver Image | Chassis Image | |||
Job Card / Gate In Details
| Gate In Date | {{job_order.date}} |
| Gate In Time | {{job_order.time}} |
| Captured by | {{job_card.job_order.gate_log.created_by.name}} |
| Outlet | {{job_card.job_order.outlet.name}} |
| Vehicle Image | KM Image | Driver Image | Chassis Image | |||


| _.byteAt(str, i) | Returns the Ascii code of the i-th character in the given string |
| _.bytes(str) | Returns an array of Ascii codes for a given set of characters |
| _.camelize(str) | Converts a given string (underscored or dasherized) into camelized style |
| _.capitalize(str, i, j) | Capitalizes substring i to j in a given string
Aliased as cap .. |
| _.capitalizeFirst(str) | Capitalizes the first character of a given string. |
| _.capitalizesEach(str) | Capitalizes each word in a given string. |
| _.chars(str) | Converts a given string to an array of chars
Aliased as explode .. |
| _.chop(str, n) | Converts a string to an array of n characters
Aliased as split .. |
| _.clean(str, pat) | Clears all special characters or characters matching a given pattern inside a given string
Aliased as trim .. |
| _.count(str, sub) | Returns the number of substring occurences in a given string |
| _.dasherize(str) | Converts a given string (unerscored or camelized) into dasherized style |
| _.endsWith(str, ends) | Tests if a given string ends with a given pattern |
| _.escape(str) | Escapes any magic character in agiven string
Aliased as esc .. |
| _.humanize(str) | Converts a given string (underscored, humanized, dasherized or camelized) into a human-readable form |
| _.import([context[, noConflict]]) | Imports library functions inside a given context or the global environment. |
| _.includes(str, sub) | Tests if a given substring is included in a given string |
| _.index(str) | Indexes a string like an array, returning a character. |
| _.insert(str, substring[, index]) | Inserts a given substring at index position in a given string |
| _.is(var, expectedType) | Checks if the given input is has a known Lua type or matches an expected type. |
| _.isAlpha(str) | Checks if a given string contains only alphabetic characters |
| _.isBlank(str) | Tests if a given string contain any alphanumeric character |
| _.isEmail(str) | Checks if a given string matches an email address syntax. |
| _.isIdentifier(str) | Tests if a given substring is a valid Lua identifier for a variable
Aliased as isIden and isVarName .. |
| _.isLowerCase(str) | Tests if a given string contains only upper-case characters. |
| _.isLuaKeyword(str) | Checks if the given string is a Lua reserved keyword. |
| _.isNumeric(str) | Checks if a given string contains only digits. |
| _.isToken(str) | Tests if a given substring is a known Lua token (operator). |
| _.isUpperCase(str) | Tests if a given string contains only lower-case characters. |
| _.join(sep, ...) | Returns a string composed of a concatenation of all given arguments, separated with a given separator |
| _.levenshtein(strA, strB) | Returns the Levenshtein distance between two strings. |
| _.lines(str) | Splits a given string in an array on the basis of end-lines characters (\n and/or \r ). |
| _.lower(str, i, j) | Lowers substring i to j in a given string |
| _.lowerFirst(str) | Lowers the first character in a given string |
| _.lpad(str, length, padStr) | Left-pads a given string
Aliased as rjust .. |
| _.lrpad(str, length, padStr) | Left and right padding for strings. |
| _.numberFormat(num[, decimals[, thousandSeparator[, decimalSeparator[, sign]]]]) | Formats a given number to a string |
| _.pad(str, length, padStr, side) | Pads a given string with characters |
| _.pre(str, n) | Returns the predecessor of a given character. |
| _.quote(str) | Returns a quoted string |
| _.rep(str[, count[, sep]]) | Repeats a given string concatenated with a given separator count times. |
| _.rpad(str, length, padStr) | Right-pads a given string
Aliased as ljust .. |
| _.splice(str, index, howMany, substring) | Replaces howMany characters after index position in a given string with a given substring |
| _.startsLowerCase(str) | Tests if a given string starts with a lower-case character
Aliased as startsLower .. |
| _.startsUpperCase(str) | Tests if a given string starts with an upper-case character
Aliased as startsUpper .. |
| _.startsWith(str, starts) | Tests if a given string starts with a given pattern |
| _.statistics(str, pat) | Returns a table listing counts for each match to a given pattern
Aliased as stats .. |
| _.strLeft(str, pattern) | Returns the substring before the first pattern occurence in a given string |
| _.strLeftBack(str, pattern) | Returns the substring before the last pattern occurence in a given string |
| _.strRight(str, pattern) | Returns the substring after the first pattern occurence in a given string |
| _.strRightBack(str, pattern) | Returns the substring after the last pattern occurence in a given string |
| _.substitute(str, var) | Substitutes any sequence matching ${var} or $var with a given value
Aliased as subst and interpolate .. |
| _.succ(str, n) | Returns the successor of a given character. |
| _.surround(str) | Wraps a given string |
| _.swapCase(str, i, int) | Swaps the case of each characters in substring i to j inside a given string |
| _.titleize(str) | Title-izes a given string (each word beginning with a capitalized letter) |
| _.toSentence(an[, delimiter[, lastDelimiter]]) | Converts an array of strings into a human-readable string |
| _.underscored(str) | Converts a given string (camelized or dasherized) into underscored style |
| _.words(str) | Converts a given string into an array of words |
Returns the Ascii code of the i-th character in the given string
Parameters: Returns:
Returns an array of Ascii codes for a given set of characters
Parameters:
Converts a given string (underscored or dasherized) into camelized style
Parameters:
Capitalizes substring i to j in a given string
Aliased as cap
..
Parameters:
Capitalizes the first character of a given string.
Aliased as capFirst
.
Capitalizes each word in a given string.
Aliased as capEach
and caps
.
Converts a given string to an array of chars
Aliased as explode
..
Parameters:
Converts a string to an array of n characters
Aliased as split
..
Parameters: Returns:
Clears all special characters or characters matching a given pattern inside a given string
Aliased as trim
..
Parameters:
Returns the number of substring occurences in a given string
Parameters: Returns:
Converts a given string (unerscored or camelized) into dasherized style
Parameters:
Tests if a given string ends with a given pattern
Parameters: Returns:
Escapes any magic character in agiven string
Aliased as esc
..
Parameters:
Converts a given string (underscored, humanized, dasherized or camelized) into a human-readable form
Parameters:
Imports library functions inside a given context or the global environment.
Parameters:
_G
(global environment) when not given.
(optional)
Tests if a given substring is included in a given string
Parameters: Returns:
Indexes a string like an array, returning a character.
Aliased as charAt
..
Inserts a given substring at index position in a given string
Parameters:
Checks if the given input is has a known Lua type or matches an expected type.
Parameters:
Checks if a given string contains only alphabetic characters
Parameters:
Tests if a given string contain any alphanumeric character
Parameters:
Checks if a given string matches an email address syntax.
Not compliant with any RFC standards though.
Parameters:Tests if a given substring is a valid Lua identifier for a variable
Aliased as isIden
and isVarName
..
Parameters:
Tests if a given string contains only upper-case characters.
Aliased as isLower
..
Checks if the given string is a Lua reserved keyword.
Aliased as isLuaKword
and isReserved
..
Checks if a given string contains only digits.
Aliased as isNum
..
Tests if a given substring is a known Lua token (operator).
Aliased as isOperator
and isOp
..
Tests if a given string contains only lower-case characters.
Aliased as isUpper
..
Returns a string composed of a concatenation of all given arguments, separated with a given separator
Parameters:
Returns the Levenshtein distance between two strings.
See Levenshtein Distance on Wikipedia
Parameters:Splits a given string in an array on the basis of end-lines characters (\n
and/or \r
).
Parameters:
Lowers substring i to j in a given string
Parameters:
Lowers the first character in a given string
Parameters:
Left-pads a given string
Aliased as rjust
..
Parameters:
Left and right padding for strings.
Aliased as center
..
Formats a given number to a string
Parameters:
,
when not given.
(optional)
.
when not given.
(optional)
-
when omitted.
(optional)
Pads a given string with characters
Parameters:
Returns the predecessor of a given character.
In case the input was a string of characters, returns a new string where each character is the predecessor of the character at the same position in the passed-in string
Parameters: Returns:Returns a quoted string
Parameters:
Repeats a given string concatenated with a given separator count times.
Parameters:
Right-pads a given string
Aliased as ljust
..
Parameters:
Replaces howMany
characters after index position in a given string with a given substring
Parameters:
Tests if a given string starts with a lower-case character
Aliased as startsLower
..
Parameters:
Tests if a given string starts with an upper-case character
Aliased as startsUpper
..
Parameters:
Tests if a given string starts with a given pattern
Parameters: Returns:
Returns a table listing counts for each match to a given pattern
Aliased as stats
..
Parameters: Returns:
Returns the substring before the first pattern occurence in a given string
Parameters: Returns:
Returns the substring before the last pattern occurence in a given string
Parameters: Returns:
Returns the substring after the first pattern occurence in a given string
Parameters: Returns:
Returns the substring after the last pattern occurence in a given string
Parameters: Returns:
Substitutes any sequence matching ${var} or $var with a given value
Aliased as subst
and interpolate
..
Parameters:
Returns the successor of a given character.
In case the input was a string of characters, returns a new string where each character is the successor of the character at the same position in the passed-in string
Parameters: Returns:Wraps a given string
Parameters:
Swaps the case of each characters in substring i to j inside a given string
Parameters:
Title-izes a given string (each word beginning with a capitalized letter)
Parameters:
Converts an array of strings into a human-readable string
Parameters:
and
when not given.
(optional)


- Just choose your favorite product form the selection of 3 available.
- You'll have a total of 25 votes and then be shown the overall results of everyone who has voted to date.
- We highly value your opinion and your time, and this should only take a few minutes to give us extremely valuable feedback!
Thank you!


Personal data
Type your name and age
Self aware panel
Currently I am {{basicPanelOpenState ? 'open' : 'closed'}}
I'm visible because I am open
Expansion panel as accordion
Personal data
Type your name and age
account_circle
Destination
Type the country name
map
Day of the trip
Inform the date you wish to travel
date_range
Examples
Personal data
Type your name and age
Self aware panel
Currently I am {{basicPanelOpenState ? 'open' : 'closed'}}


Jammu and Kashmir
Jammu and Kashmir is a state in northern India, often denoted by the acronym J&K. It is located mostly in the Himalayan mountains, and shares borders with the states of Himachal Pradesh and Punjab to the south. Points of interest
-Ladakh
-Vaishno Devi
-Amarnath Temple
Jammu and Kashmir is a state in northern India, often denoted by the acronym J&K. It is located mostly in the Himalayan mountains, and shares borders with the states of Himachal Pradesh and Punjab to the south. Points of interest
-Ladakh
-Vaishno Devi
-Amarnath Temple
Amritsar
Amritsar (also called Ambarsar) is a city in the northwestern Indian state of Punjab, not far from the border with Pakistan. At the center of its walled old town is the gilded Golden Temple (Harmandir Sahib), considered the holiest gurdwara, or religious complex, of the Sikh religion. It’s at the end of a causeway, surrounded by the sacred Amrit Sarovar lake, where pilgrims bathe.
-Harmandir Sahib
-Jallianwala Bagh
Amritsar (also called Ambarsar) is a city in the northwestern Indian state of Punjab, not far from the border with Pakistan. At the center of its walled old town is the gilded Golden Temple (Harmandir Sahib), considered the holiest gurdwara, or religious complex, of the Sikh religion. It’s at the end of a causeway, surrounded by the sacred Amrit Sarovar lake, where pilgrims bathe.
-Harmandir Sahib
-Jallianwala Bagh
Agra
Agra, a city in northern India Uttar Pradesh state, is home to the iconic Taj Mahal, a mausoleum built for the Mughal ruler Shah Jahans wife, Mumtaz Mahal, who died in childbirth in 1631. Set behind a reflecting pool inside a courtyard defined by 4 minarets, the imposing main building features a massive dome and intricately carved white marble inlaid with precious stones.
-Taj Mahal
-Tomb of Itimad ud Daulah
-Mehtab Bagh
Agra, a city in northern India Uttar Pradesh state, is home to the iconic Taj Mahal, a mausoleum built for the Mughal ruler Shah Jahans wife, Mumtaz Mahal, who died in childbirth in 1631. Set behind a reflecting pool inside a courtyard defined by 4 minarets, the imposing main building features a massive dome and intricately carved white marble inlaid with precious stones.
-Taj Mahal
-Tomb of Itimad ud Daulah
-Mehtab Bagh
Rajasthan
Rajasthan is a northern Indian state bordering Pakistan. Its palaces and forts are reminders of the many kingdoms that historically vied for the region. In its capital, Jaipur, are the 18th-century City Palace and Hawa Mahal, a former cloister for royal women, fronted by a 5-story sandstone screen. Amer Fort, atop a nearby hill, was built by a Rajput prince in the 1600s. Colleges and Universities: University of Rajasthan, more
-Ranthambore National Park
-Amer Fort
Rajasthan is a northern Indian state bordering Pakistan. Its palaces and forts are reminders of the many kingdoms that historically vied for the region. In its capital, Jaipur, are the 18th-century City Palace and Hawa Mahal, a former cloister for royal women, fronted by a 5-story sandstone screen. Amer Fort, atop a nearby hill, was built by a Rajput prince in the 1600s. Colleges and Universities: University of Rajasthan, more
-Ranthambore National Park
-Amer Fort
Kanyakumari
Kanyakumari is a coastal town in the state of Tamil Nadu on India's southern tip. Jutting into the Laccadive Sea, the town was known as Cape Comorin during British rule and is popular for watching sunrise and sunset over the ocean. It's also a noted pilgrimage site thanks to its Bagavathi Amman Temple, dedicated to a consort of Shiva, and its Our Lady of Ransom Church, a center of Indian Catholicism.
-Vivekananda Rock Memorial
-Thiruvalluvar Statue
-Padmanabhapuram Palace
Kanyakumari is a coastal town in the state of Tamil Nadu on India's southern tip. Jutting into the Laccadive Sea, the town was known as Cape Comorin during British rule and is popular for watching sunrise and sunset over the ocean. It's also a noted pilgrimage site thanks to its Bagavathi Amman Temple, dedicated to a consort of Shiva, and its Our Lady of Ransom Church, a center of Indian Catholicism.
-Vivekananda Rock Memorial
-Thiruvalluvar Statue
-Padmanabhapuram Palace


'City Union Bank banked on its core strengths and avoided scale trap'
by Our Bureau
City Union Bank is a classic example of how banks should use their core strengths to grow in a steady manner without getting stuck in ‘scale and size’ trap, Nirmala Sitharaman, Union Minister of Finance and Corporate Affairs said here.
Addressing the 116th Foundation Day celebrations of City Union Bank Ltd, Kumbakonam-based old private sector bank, she said companies were increasingly getting obsessed with the idea of ‘scaling up’. But in the case of banks, they should realise their core strengths and play according to that strengths. Because banks handle public money and have the responsibility to create trust in addition to ensuring consistent and stable growth.
City Union Bank has exactly done that. It has played on its strengths to ensure profitable growth while focusing on continuous value addition to its customers, she added.
A case study on successful management
Lauding the bank for staying strong during economic down cycles such as the Great Depression and Lehman Brothers Financial Crisis, Sitharaman pointed out that the bank’s record of running the operations all through these 115 years without any strike and disruptions to its services would be a management case study in the areas of human relations and customers relations management.
“We always quote the example of multi-national companies for such things. It is time that we talked about the success of the Tamil Nadu based bank,” she said.
Sitharaman said that CUB was also a responsible institution as it focused not only on generating profits and paying dividends, but also spending its profits on society.
CUB’s Managing Director and CEO, N Kamakodi pointed out that not many banks in the world had the record of generating profit and paying dividends continuously since its inception.,
He also highlighted the history of the bank and narrated the schemes undertaken by the bank under Corporate Social Responsibility for which it had spent over ₹51 crore.
The bank has spent the money on building toilets for government institutions and public places, restoring water bodies and enhancing school infrastructure.
Earlier, Sitharaman launched the bank’s “CUB – all in one mobile app.
- Get Free Trial
- Hurry! Prices Increase Soon
Existing users, please Sign in here
Thank you for being a loyal user of Portfolio.
Portfolio will be a paid section hereon.
Please Subscribe to get access to one of our early bird packs. Or click on Free Trial to get 14 days free trial.
What You'll Get
-
Web + Mobile
Access exclusive content of the Hindu Businessline across desktops, tablet and mobile device.
-
Exclusive Portfolio and Investment Advice, Banking, Lifestyle and Specials
Get diverse set of perspectives from our trusted experts on Portfolio, Banking, Economy, Environment and others.
-
Ad free experience
Experience cleaner site with zero ads and faster load times.
-
Personalised dashboard
Customize your preference and get a personalized recommendation of stories based on your interest.
- Get Free Trial
- Hurry! Prices Increase Soon
Existing users, please Sign in here


The Terms & Conditions, Cookie Policy, and Privacy Policy for this Site
If you have any questions about any of this document, please contact me.
General
All content provided on this website is for informational purposes only. The owner of this website makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information. These terms and conditions of use are subject to change at any time and without notice.
I do not share personal information with third-parties nor store information I collect about your visit to this website for use other than to analyze content performance through the use of cookies, which you can turn off at anytime by modifying your internet browser's settings. I am not responsible for the republishing of the content found on this website on other websites or media without my permission. This privacy policy is subject to change without notice.
I use Google Analytics to get some data on which of my site's pages are popular and where those visitors are coming from. I do not < enable the Remarketing or Advertising Features, which collect more detailed information from users signed in to Google.
Cookies
Like most websites, this website uses cookies for analytics to help me understand which articles on the website are popular and some basic information about what kind of visitors I am having to the website. This helps me create more relevant content!
You'll therefore see that there are a couple of Google Analytics cookies in use on the site. These are used to analyse user activity in order to improve the site. This includes information such as browser type, language preference, country setting.
Terms & Conditions
Last updated: March 15, 2020
Please read these Terms and Conditions ("Terms", "Terms and Conditions") carefully before using the alchemyst.co.uk website (the "Service") ("me", "I", "my").
Your access to and use of the Service is conditioned on your acceptance of and compliance with these Terms. These Terms apply to all visitors, users and others who access or use the Service.
By accessing or using the Service you agree to be bound by these Terms. If you disagree with any part of the terms then you may not access the Service. The Terms and Conditions agreement for alchemyst.co.uk has been created with the help of TermsFeed.
Links To Other Web Sites
Our Service may contain links to third-party web sites or services that are not owned or controlled by alchemyst.co.uk.
alchemyst.co.uk has no control over, and assumes no responsibility for, the content, privacy policies, or practices of any third party web sites or services. You further acknowledge and agree that alchemyst.co.uk shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such web sites or services.
I strongly advise you to read the terms and conditions and privacy policies of any third-party web sites or services that you visit.
Governing Law
These Terms shall be governed and construed in accordance with the laws of United Kingdom, without regard to its conflict of law provisions.
Any failure to enforce any right or provision of these Terms will not be considered a waiver of those rights. If any provision of these Terms is held to be invalid or unenforceable by a court, the remaining provisions of these Terms will remain in effect. These Terms constitute the entire agreement between us regarding the Service, and supersede and replace any prior agreements we might have between us regarding the Service.
Changes
I reserve the right, at sole discretion, to modify or replace these Terms at any time. If a revision is material I will try to provide at least 30 days notice prior to any new terms taking effect. What constitutes a material change will be determined at my sole discretion.
By continuing to access or use the Service after those revisions become effective, you agree to be bound by the revised terms. If you do not agree to the new terms, please stop using the Service.
Cookies Policy
Last updated: March 15, 2020
alchemyst.co.uk ("I", "me", "my") uses cookies on the alchemyst.co.uk website (the "Service"). By using the Service, you consent to the use of cookies.
This Cookies Policy explains what cookies are, how I use cookies, how third-parties I may partner with may use cookies on the Service, your choices regarding cookies and further information about cookies. This Cookies Policy for alchemyst.co.uk has been created with the help of TermsFeed.
What are cookies
Cookies are small pieces of text sent by your web browser by a website you visit. A cookie file is stored in your web browser and allows the Service or a third-party to recognize you and make your next visit easier and the Service more useful to you.
Cookies can be "persistent" or "session" cookies. Persistent cookies remain on your personal computer or mobile device when you go offline, while session cookies are deleted as soon as you close your web browser.
How alchemyst.co.uk uses cookies
When you use and access the Service, I may place a number of cookies files in your web browser.
I use cookies to track your actions on the website for usage analytics purposes so that I can continue to improve the Service. See the privacy policy below for elaboration on this.
What are your choices regarding cookies
If you'd like to delete cookies or instruct your web browser to delete or refuse cookies, please visit the help pages of your web browser. As an European citizen, under GDPR, you have certain individual rights. You can learn more about these rights in the GDPR Guide.
Please note, however, that if you delete cookies or refuse to accept them, you might not be able to use all of the features of the Service and some of the pages might not display properly.
Privacy Policy
Effective date: March 15, 2020
alchemyst.co.uk ("I", "me", "my") operates the alchemyst.co.uk website (hereinafter referred to as the "Service").
This page informs you of my policies regarding the collection, use, and disclosure of personal data when you use the Service and the choices you have associated with that data. The Privacy Policy for alchemyst.co.uk has been created with the help of TermsFeed.
I use your data to provide and improve the Service. By using the Service, you agree to the collection and use of information in accordance with this policy. Unless otherwise defined in this Privacy Policy, the terms used in this Privacy Policy have the same meanings as in the Terms and Conditions above.
Definitions
- Service is the alchemyst.co.uk website operated by alchemyst.co.uk
- Personal Data means data about a living individual who can be identified from that data.
- Usage Data is data collected automatically either generated by the use of the Service or from the Service infrastructure itself (for example, the duration of a page visit).
- Cookies are small files stored on your device (computer or mobile device).
Information Collection and Use
This website collects several different types of information for various purposes to provide and improve the Service to you.
Types of Data Collected
Personal Data
While using the Service, I may ask you to provide certain personally identifiable information that can be used to contact or identify you ("Personal Data") - for example, when using the Contact Form on the website to get in touch with me. Personally identifiable information may also include, but is not limited to: Cookies and Usage Data.
Usage Data
I may also collect information how the Service is accessed and used ("Usage Data"). This Usage Data may include information such as your computer's Internet Protocol address (e.g. IP address), browser type, browser version, the pages of my Service that you visit, the time and date of your visit, the time spent on those pages, unique device identifiers and other diagnostic data.
Tracking & Cookies Data
I use cookies and similar tracking technologies to track the activity on my Service and I hold certain information.
Cookies are files with a small amount of data which may include an anonymous unique identifier. Cookies are sent to your browser from a website and stored on your device. Other tracking technologies are also used such as beacons, tags and scripts to collect and track information and to improve and analyse the Service.
You can instruct your browser to refuse all cookies or to indicate when a cookie is being sent. However, if you do not accept cookies, you may not be able to use some portions of the Service.
Examples of Cookies I use:
- Session Cookies. These may be used to operate parts of the Service.
- Preference Cookies. I may use Preference Cookies to remember your preferences and various settings.
- Security Cookies. I may use Security Cookies for security purposes.
Use of Data
alchemyst.co.uk uses the collected data for various purposes:
- To provide and maintain the Service
- To allow you to participate in interactive features of the Service when you choose to do so
- To provide analysis or valuable information so that I can improve the Service
- To monitor the usage of the Service
- To detect, prevent and address technical issues
Transfer Of Data
Your information, including Personal Data, may be transferred to - and maintained on - computers located outside of your state, province, country or other governmental jurisdiction where the data protection laws may differ than those from your jurisdiction.
Your consent to this Privacy Policy followed by your submission of such information represents your agreement to that transfer.
alchemyst.co.uk will take all steps reasonably necessary to ensure that your data is treated securely and in accordance with this Privacy Policy and no transfer of your Personal Data will take place to an organization or a country unless there are adequate controls in place including the security of your data and other personal information.
Disclosure Of Data
Legal Requirements
In the highly unlikely event that it is required, alchemyst.co.uk may disclose your Personal Data in the good faith belief that such action is necessary to:
- To comply with a legal obligation
- To protect and defend the rights or property of alchemyst.co.uk
- To prevent or investigate possible wrongdoing in connection with the Service
- To protect the personal safety of users of the Service or the public
- To protect against legal liability
As a European citizen, under GDPR, you have certain individual rights. You can learn more about these guides in the GDPR Guide.
Security of Data
The security of your data is important to me but remember that no method of transmission over the Internet or method of electronic storage is 100% secure. While I will strive to use commercially acceptable means to protect your Personal Data, I cannot guarantee its absolute security.
Service Providers
I may employ third party companies and individuals to facilitate the Service ("Service Providers"), to provide the Service on my behalf, to perform Service-related services or to assist in analyzing how the Service is used.
These third parties have access to your Personal Data only to perform these tasks on my behalf and are obligated not to disclose or use it for any other purpose.
Analytics
I use third-party Service Providers to monitor and analyze the use of the Service.
- Google Analytics is a web analytics service. You can visit their Terms of Service here: https://www.google.com/analytics/terms/us.html and Privacy Policy page here: https://policies.google.com/privacy?hl=en
Links to Other Sites
The Service may contain links to other sites that are not operated by me. If you click a third party link, you will be directed to that third party's site. I strongly advise you to review the Privacy Policy of every site you visit.
I have no control over and assume no responsibility for the content, privacy policies or practices of any third party sites or services.
Children's Privacy
The Service does not address anyone under the age of 18 ("Children").
I do not knowingly collect personally identifiable information from anyone under the age of 18. If you are a parent or guardian and you are aware that your Child has provided me with Personal Data, please contact me. If /I become aware that I have collected Personal Data from children without verification of parental consent, I will do whatever I can to take steps to remove that information from servers.
Changes to This Privacy Policy
I may update this Privacy Policy from time to time. I will notify you of any changes by posting the new Privacy Policy on this page, which will be visible through the "Effective Date" listed above.
You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page.


Caution with headphones! Might be loud if there is some glitch in the drawing!
This should work in current Firefox, Chrome and Safari!
For sample duration best to use values between 0.0005 and 0.1.
You can also play & stop by pressing SPACE.
You can draw the signal by pressing and holding the LEFT MOUSEBUTTON.


This is where the small business owner logins into the administration site to connect their storefront to QuickBooks and to sync data.
Go to Setup Page
This is where customers shop the store's catalog and make purchases.
Go to Storefront


Minnesota Vikings Announce Adam Thielen’s Status For Sunday’s Game
by Dan LyonsThe Minnesota Vikings host the Denver Broncos this weekend. The team is in the middle of a playoff race, and will once again be without star wide receiver Adam Thielen on Sunday.
The Vikings sit at 7-3 and have looked very strong, winning five of their last six games. The sole loss came to the Kansas City Chiefs.
With the first place Green Bay Packers on bye, Minnesota can get within a half-game of Aaron Rodgers and company with a win. The Denver Broncos are one of the worst teams in the AFC, so this is a prime opportunity for Minnesota.
Thielen is a big absence, though. He’s been dealing with a nagging hamstring injury for a few weeks now. He did play in the Chiefs game, but left early after aggravating it.
Thielen initially missed the Week 8 game against Washington, as well as last weekend’s win over the Dallas Cowboys. He hasn’t recorded a catch since Week 7, when he had one reception for a 25 yard touchdown against the Detroit Lions.
Now, according to Adam Schefter, Adam Thielen is out yet again tomorrow.
On the season, Thielen has 27 catches for 391 yards and six touchdowns. His absence places more pressure on Stefon Diggs, who has been up-and-down in his absence.
In Weeks 7 and 8, Diggs had back-to-back seven-catch, 143 yard games, but has been held to four catches for 53 yards in the last two weeks. He hasn’t scored since his three-touchdown outburst against the Philadelphia Eagles on Oct. 13.
The Vikings and Broncos kick off at 1 p.m. ET on Sunday.


|
It would be great if I could use the TestNG plugin for IntelliJ but I'm still on version 4.5 and
its only available for IDEA 5. Tried to switch a few times but the XML editor just doesn't work
anymore and throws exceptions faster than I can click. I want the XML editor of IDEA 3.x back, it
just worked and didn't have the goofy indentation routines of 4.x...
Still, after using TestNG only for a a day or two, I think that its so much better than JUnit that
I wonder why I didn't try earlier. I guess I should have listened to Gavin who was raving about
how easy it was to get the Seam tests up and running. It
actually has all the things I've been missing with JUnit.
So I got my first TestNG setup running nicely for CaveatEmptor. By the way, I've uploaded a new
alpha release that includes all the stuff I'm going to talk
about here (and quite a few other new things). For those of you interested in the progress of
the Hibernate in Action second edition: I've completed 95% of all mapping examples,
which I think (and hope) was the most time consuming part. I'm now updating the chapters about sessions,
transactions, caching, etc., so finishing the manuscript this year is possible, I guess.
Back to TestNG and how I used it to test EJBs. One of the nice things about TestNG is how easy it is
to configure runtime infrastructure you need for your tests. First I wrote a class that
boots the JBoss EJB 3.0 container. TestNG will run the startup()
and shutdown() methods for a suite of tests:
public class EJB3Container {
private static InitialContext initialContext;
private EJB3StandaloneDeployer deployer;
@Configuration(beforeSuite = true)
public void startup() {
try {
// Boot the JBoss Microcontainer with EJB3 settings, loads ejb3-interceptors-aop.xml
EJB3StandaloneBootstrap.boot(null);
// Deploy CaveatEmptor beans (datasource, mostly)
EJB3StandaloneBootstrap.deployXmlResource("caveatemptor-beans.xml");
// Add all EJBs found in the archive that has this file
deployer = new EJB3StandaloneDeployer();
deployer.getArchivesByResource().add("META-INF/persistence.xml");
// Deploy everything we got
deployer.create();
deployer.start();
// Create InitialContext from jndi.properties
initialContext = new InitialContext();
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
@Configuration(afterSuite = true)
public void shutdown() {
try {
deployer.stop();
deployer.destroy();
EJB3StandaloneBootstrap.shutdown();
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
public static Object lookup(String beanName) {
try {
return initialContext.lookup(beanName);
} catch (NamingException ex) {
throw new RuntimeException("Couldn't lookup: " + beanName, ex);
}
}
}
First thing on startup, I boot the JBoss Microcontainer, which is
actually the kernel of the future JBoss AS 5.x. Because I'm using the EJB3StandaloneBootstrap it will
automatically search for the configuration files for the EJB 3.0 container. You need those and the required
libraries in your classpath. If you want to try this download CaveatEmptor
and copy the libraries and configuration.
Next I'm deploying some beans from caveatemptor-beans.xml , right now this includes just a single
datasource for integration testing. It is configured to use JTA and bound to JNDI, services provided by the microcontainer.
You can set up and wire other stateless POJO services there if you have to.
Finally I'm deploying all EJBs for my tests. The EJB3StandaloneDeployer supports many different deployment strategies
and I decided to use "search the classpath and deploy the JAR that contains this file". For EJB 3.0 persistence, which
is what I'm primarily testing in CaveatEmptor, I have to have a META-INF/persistence.xml configuration anyway for
an EntityManagerFactory . I actually have to figure out how to deploy an exploded archive with a single command and
auto-discovery of EJBs...
Now if I write a test class I will need a starting point, I need to get a handle on one of my EJBs. I can look them up in JNDI -
that's what the static lookup() method is good for - or I could wire them into my test classes with the microcontainer.
I decided to use a lookup:
public class CategoryItem {
@Test(groups = {"integration.database"})
public void saveCategory() {
CategoryDAO catDAO = (CategoryDAO)EJB3Container.lookup(CategoryDAO.class.getName());
Category newCat = new Category("Foo");
catDAO.makePersistent(newCat);
}
}
Here I'm testing a data access object. Well, I'm not actually testing much as I don't assert any state after saving. I still have
to port all my JUnit tests over but my first goal was to have the infrastructure ready.
The CategoryDAO is a stateless EJB that I wrote with the Generic DAO pattern. To make
it an EJB I had to add a @Stateless annotation and get the EntityManager injected into the bean. What about
transactions?
For a stateless EJB the default transaction attribute is REQUIRES , so any method I call on the DAO is executed in a
system transaction. If several are called in the same test method they all run in the same transaction.
I've also started using TestNG groups, a great feature. By marking the test method as belonging to the group
integration.database I can target it in my TestNG suite assembly in testng.xml :
<suite name="CaveatEmptor-EJB3" verbose="1">
<test name="Runtime">
<packages>
<package name="org.hibernate.ce.auction.test.testng.runtime"/>
</packages>
</test>
<test name="Integration">
<groups>
<run><include name="integration.*"/></run>
</groups>
<packages>
<package name="org.hibernate.ce.auction.test.testng.persistence"/>
</packages>
</test>
</suite>
I still have to figure out how to create the assembly in a way that says "use this runtime for this group of tests". Right
now I'd need several suites for this.
Since I'm stuck with the old IntelliJ I've got to run the tests with Ant (I'd really like to have that green bar ;):
<target name="testng.run" depends="testng.package"
description="TestNG tests with the JBoss EJB3 Microcontainer">
<mkdir dir="${testng.out.dir}"/>
<testng outputDir="${testng.out.dir}">
<classpath>
<pathelement path="${testng.build.dir}/${proj.shortname}.jar"/>
<path refid="project.classpath"/>
<path>
<fileset dir="${container.lib}">
<include name="**/*.jar"/>
</fileset>
</path>
</classpath>
<xmlfileset dir="${testng.classes.dir}" includes="testng.xml"/>
</testng>
</target>
So I'm hooked on TestNG now and will use it for all EJB tests in the future. I've got to check out
Gavins TestNG configuration for JSF + EJB testing in Seam and how he simulates the HTTP environment...
Oh, and if any Jetbrains guys read this: fix the XML editor. There are people out there who use it to write docs. Thanks :)
|


{{ school.name }}
Zone: {{ school.zone }}
Subjects offered
{% for subject in subjects %}
{{ subject }}
{% endfor %}


Personal injuries committee to examine insurance industry in Ireland
by By Digital Desk staffA personal injuries committee made up of judges has been selected to examine the insurance industry in Ireland.
The announcement was made this morning by Chief Justice Frank Clarke at an insurance fraud conference in Dublin.
It comes amid ongoing criticism over the level of compensation payouts in Ireland.
Mr Justice Clarke says the committee will get to work straight away, despite not being formally established by law.
"One of the issues that they will have to consider is bench-marking Irish damages," he said adding that this would be done by referencing damages in other countries including, but not limited to, the UK.
"If they were to wait until they are formally established before commencing that process, that would take time.
"But there is no reason why the process of putting in place that research, cannot start straight away," Mr Justice Clark added.
Last month a senior judge claimed the insurance industry in Ireland is “fundamentally dishonest”.
In a report in The Sunday Business Post Mr Justice Kevin Cross said that Ireland’s ‘compo culture’ and fraudulent claims are responsible for a rise in insurance premiums.
This assertion was rejected by Insurance Ireland.
READ MORE
Insurance group rejects claim industry is 'fundamentally dishonest'


This is the site you're on now. It was built for the Week 1 independent project using:
This is a collection of 2 sites. Both use pre made html are not my content, however they were used for css practice. They were built using:
A cookie recipe. This project started as a completed project with many errors and it was my job to fix these errors. It was built using:
A short, simple blog about foxes. It was built as markdown practice before I started html and it was built using:
A simple "hello world" site with farewells in various languages. It was built using:
This is a fork of a resort website that I built with a partner: Bess Campbell. It advertises a resort in Santorini
This is a page about my favorite band; Steely Dan. Very basic, it was used for css practice and was built with:
This is another project I forked from a partner. We had built a mock-vacation company site as practice for the css framework Bootstrap using:


Restaurant Tinder Conceptual Model
Profile
- profileId (PK)
- profileActivationToken
- profileAvatar
- profileEmail
- profileFirstName
- profileHash
- profileLastName
- profileUsername
Follow
- followFollowedProfileId (FK)
- followProfileId (FK)
- followDate
Restaurant
- restaurantId (PK)
- restaurantAddress
- restaurantAvatar
- restaurantFoodType
- restaurantLat
- restaurantLng
- restaurantName
- restaurantPhone
- restaurantStarRating
- restaurantUrl
Swipe
- swipeProfileId (FK)
- swipeRestaurantId (FK)
- swipeDate
- swipeRight
Relationship
- A profile can follow many other profiles. (1/m)
- A profile can have many swipes. (1/m)
- A profile can swipe on many different restaurants. (1/m)
- A swipe can happen on multiple restaurants. (1/m)


Toggle navigation
About Us
Contact / Help
What can we help you with?
I'M A CUSTOMER
I'M A RESTAURANT PARTNER
Full Name:
Phone Number:
Email Address:
Message:
Send Message
Restaurant:
I want to join Hungry Fellas!
Main Course
Kebab & Co
Subway
Guzman Y Gomez
On A Roll Bakery
The Pizza Cafe
Red Room Bar & Grill
The Physiol Eatery and Cafe
Boost Juice
Contact Number:
Email Address:
Message:
Send Message


This is BusMall! Where you meet all your shopping needs!
Choose a product out of those 3!
Here is a bar chart showing what you chose and what you saw!


--- layout: post title: Chapter 14 date: 2009-03-30 20:20:59.000000000 -06:00 type: post published: true status: publish categories: - Vlad in progress tags: [] meta: _gcid: '59' _gcuser: Vladimir Gitlevich content_type: book _bitly_trim: http://dddcommunity.org/?p=50 _edit_last: '3110' author: login: Vladimir Gitlevich email<EMAIL_ADDRESS>display_name: Vladimir Gitlevich first_name: Vladimir Gitlevich last_name: '' ---
Notes 20 January 2004
Domain Driven Design (VIII)
Guest Author: Eric Evans
Russ: Let's start with Strategic Design (Part IV) -- what do we need
it for? How about considering the ways to get in trouble on the extremes.
How do you look at a system and understand whether we're doing what Eric's
doing, or one of the bad alternatives he discussed. (p. 328, halfway down).
The more systems I see, the more surprised I am by the range of systems
I see. Some of it's really good, some of it's kind of scary. This was
a good way of describing a large class of the problems, so I thought it
was a good way of introducing tonight's topic.
(Russ referred to text in second half of second paragraph p. 328, "monolithic"
vs. "ad-hoc", avoiding extremes).
Dave: Systems glued together out of lots of pieces are also often full
of contradictions, an unresolved argument about the system.
John B: Like Unix command-line tools, having varying views of the world?
Russ: Is it ad-hoc components, or ad-hoc interfaces?
Mike: the alternative being an enterprise-wide bus, a common interface
for things to plug into, that tries to be everything to everybody. It's
hard to get systematic designs through, because you have many sponsors
and many forces.
John B: And you have to actually establish the protocols, how to get
things to communicate.
Mike: My company has tried for the system-wide bus, and it seems to address
the needs of only a small number of the people who want software.
Russ: The author is talking about more than just the technical breakdown
of the system, but about the model, the vision of the system.
Eric: Dave said an interesting thing about small pieces composed together
being sort of a dialogue or debate about world views of the system. That
is very much about what Chapter 14 is about.
Phil: A middle approach to bridging the extremes is to compose the pieces,
then to look at what you have, and refactor the composition into the thing
it needs to become.
John B: I see on p. 389, there's a discussion about refactoring to Shared
Kernel from Separate Ways,
Eric: Refactoring is the *means* by which you change strategies, rather
than the strategy you use.
Phil: Refactoring as using the code to change your ideas, you don't see
that as well as refactoring as a mechanism?
John B: Eric has listed all the ways to evolve and change the implementation
of the model that he can think of, rather than the actual change of the
model as ideas.
Eric: All the ones I wanted to recommend.
Tracy: If I understand, Phil, you're talking about refactoring as a process
of understanding.
Phil: Yes, learning, and eventually you get to a global view, a similar
result. The code is telling you what the model has to be.
Eric: I'd like to shift rails a bit, I start from a more fundamental
premise. I start from an observation that on any large project, with more
than 10 people, you will have more than one conception of the domain that
the system is based on. More than one conception means more than one domain
model, and that will affect choices about design. You can just plunge
ahead not realizing that, and not realize when one person's concept was
controlling the design and when another person's different concept was.
So that's where BOUNDED CONTEXT comes in. You would like to have a sense
of which model applies in what part of a larger process. There is sometimes
a very clear situation, where you have smaller subsystems worked on by
different people, and each can be its own model, its own context. But
with a large subsystem, you're more likely to end up with multiple inconsistent
views. This chapter is about understanding that there are different points
of view, and different ways to describe things, and that becoming aware
of these different perspectives is important in dealing with larger systems.
The "Blind Men and the Elephant" story would be less interesting
if each blind man knew that he had a separate point of view on the same
thing. And we want things to be less interesting in this case, with software
development. So you want to start out by mapping out the territory as
it exists, before making changes. So tactics like CONTINUOUS INTEGRATION
support the decision to have a unified model within a single BOUNDED CONTEXT.
This sort of CONTINUOUS INTEGRATION is the code, *plus* people consciously
synchronizing their concepts with one another through exercise of the
UBIQUITOUS LANGUAGE. But there are other successful ways of connecting
things.
John B: System model vs. domain model? Most of these patterns, to me,
seem like ways to integrate a system rather than a domain.
Eric: Usually people think of system integration as connecting a set
of distinct programs. But you could create two systems based on the same
domain model. Or you could create a program which was internally split
between two domain models. You'd prefer to split your components along
the boundary of the variant models. But I've seen components and subsystems
(even classes!) with multiple models reflected in their implementation.
John B: Is Extreme Programming's continuous integration a different concept
from yours?
Eric: I think it is the same thing. The XPers are exactly correct about
continuous integration with a context, within a single model conception.
If you need it to interoperate, you need continuous integration of the
*code*, and also of the *model*.
John B: They're fumbling that direction with the System Metaphor.
Eric: And co-location.
Phil: And pairing.
Russ: I've seen a single developer with 3 different bounded contexts
with name clashes in the same source file.
Eric: Three *unbounded* contexts.
Russ: Intermingled contexts.
Eric: If they had bounded those three, they would have been in good shape
since they would have been separate; or more likely they would have unified
them to remove the contradictions. But knowing what the practices help
you achieve, knowing *why*, allows you to adjust to situations, to know
where you are at. And knowing when to stop. You can't CI a whole company,
you can't co-locate everyone. And at a certain scale, the overhead of
continous integration in a large system becomes too much. So by making
a context map, you tell yourself, your teams, where you are making CI
work, where you can run XP full-out within a single bounded context, and
where you want to establish a boundary.
Russ: There are two very different notions going on here. 1: You and
I have different models of a system, with shared understanding of a subsystem,
and no assumptions about the non-overlapping parts -- two separate but
possibly overlapping models. Vs. 2, if you and I were working on things,
and there was an overlap of concepts which were not part of the shared
kernel, but were in conflict. It's an interesting distinction to talk
about.
Eric: Yes, that's a very instructive example. So in the first case, let's
say there *is* a shared set of concepts. What I call SHARED KERNEL. That's
both concepts and code.
Russ: So if you were working on the dessert and I were working on the
floor wax, we wouldn't have to interact on those distinct parts of the
system.
Chris: Until someone comes up with a product which is both dessert and
floor wax.
Eric: So in this case, you might subclass the thing we've already got
in hand, say for me working on the dessert, I'd say a floor wax is a special
kind of dessert, and you with the floor wax, you'd say a dessert is a
special kind of floor wax.
John B: Elephant is a subclass of wall, floor, snake, tree, and rope.
(p. 379)
Eric: The blind men were lucky, that they were each looking at a single
part of a larger system. But with desserts and floor waxes, the systems
are more complex. At first we might not have any problem. One way is we
can say we go with your model, one way is to go with my model, or one
way is to come up with a new model that meets everyone's needs. Let's
say we introduce a new abstraction.
John: They're both Sprayables.
Eric: So we've discovered both the dessert topping and the floor wax
are sprayables.
Dave: It opens up new product opportunities because you could make something
that's a floor wax, dessert topping, and bug spray.
Eric: I think the marketing department would have trouble with that last
one.
Jeff: Maybe lip gloss as something in the same unified space as floor
wax and dessert toppings.
Russ: How are we making these trade-offs to decide how much of the system
should be unified?
Eric: It's not always unification. you might have a system that's grown
to the point where integration has become burdensome, so you decide to
split things off and go separate ways.
Dave: As things scale, I've never seen it be easy to abstract a core.
Chris: Could you abstract out a framework?
Eric: I'm not talking about a huge company with a "chief architect"
someplace dictating to everyone in the company "these are the objects
you'll use."
Phil: During the development of J2EE at Sun, different groups had a concept
of "qname" that was slightly diffferent. We got everyone in
the same room and agreed on a common interface that everyone could use,
and we created a JAR with just qname in it that everyone could use.
Eric: That's a Shared Kernel.
Phil: Right, and it's a little thing, not a big one.
Dave: What was the overhead involved in getting all the interested party
together in a room to make that decision?
Phil: You have no idea.....
[...]
Eric: The first thing is to have contexts that are bounded. And have
a map so you can say, "This thing belongs to this context."
John C (?): What about the tragedy of the commons problem, since the
shared parts...?
Eric: But all we're agreeing on is the _boundaries_.
John B: "Good fences make good neighbors."
Jeff: Get that down.
Eric: You want to know, "Am I in my own context, where I can go
my separate way, or am I in a shared context where I need to integrate
with someone else?"
John C: I'm thinking of a company where there are two products, one of
which is a big revenue producer, and another that gets less resources.
The one that makes a lot of revenue basically gets to disregard the needs
of the other one.
Eric: That sounds like a case for Conformist, because of the power differential.
Eric: I'm not saying the company has some global enterprise-wide context
map. I'm just saying for your own project, identify the different contexts
there.
Eric: Even in a one-person project, you'll have multiple contexts, like
"current understanding", vs. "last years understanding".
(The code you wrote last year, but haven't had a chance to refactor to
your latest insight.)
???: What about upstream/downstream suppliers where one is stuck with
a supplier.
???: "Ball and chain" pattern.
(Mike: discussion of a protocol with a large installed base with messaging
to distributed clients -- difficulties with changing the protocol to enrich
the service.)
Eric: So your clients have a presumption, a model for what the messages
in the protocol mean. And how they handle the messages reflects that model.
If they get back a response message in a different format than the one
they asked for, then they have to handle that. They have to handle the
fact that the variations in the new model are exposed by the new protocol.
So what made this hard is that within your context, you changed your domain
model, but the other systems at the boundary are related to you via an
OPEN HOST SERVICE. The interface expresses a frozen model.
Mike: Because so many groups are connected to it.
Eric: And part of the problem was a change in the model as expressed
in the protocol. If you had just made a slight re-arrangement of the same
information, it would be no means as difficult. There's a technical dimension
to the problem, but there is importantly, a conceptual one. And the conceptual
difference is what it makes it hard.
John B: Sounds more like ANTICORRUPTION LAYER rather than OPEN HOST SERVICE.
Mike: We have an invariant API.
John B: If you had an ANTICORRUPTION LAYER, you would be able to fold
the new protocol into the old one.
Eric: But let's say he is getting his message data from somewhere else,
a legacy system. So what he does is set up an ANTICORRUPTION LAYER to
translate the old stuff into the new, enhanced model. But it's the client-facing
side, he's got clients who are asking for stuff. There might be a few
with ANTICORRUPTION LAYERs because they need to express the concepts of
the message internal in unusual ways, but most of them use CONFORMIST,
expressing his message stream in the same terms.
Mike: We want to enrich the service without affecting the clients who
are not interested in / capable of dealing with the information in the
new protocol.
Eric: They've always had Sweet 'N Low before, but you want to give them
sugar.
Russ: You can give them more feeds, by establishing a an upstream message
feed that you can translate into Sweet N' Low for the old clients, and
to Splenda for the new clients. (Arranges two diverging lines of pens
and flatware with a pink paper packet in one line of the V, and a yellow
one in the other line).
Eric: OK, so I understand you have a TRANSLATION LAYER which takes the
new, enriched internal format and emits a message feed in the old format
for your established customer base.
Eric: There's a stress point on the OPEN HOST SERVICE pattern. If you
have two sets of clients who want different services, it's somewhat difficult.
OPEN HOST SERVICE says that everyone gets the same thing, everyone can
accept the same protocol. So if your situation is that each customer wants
little, extra bits on the service, perhaps you want a bunch of one-off
translators, one-off versions for the different groups, to keep the primary
protocol simple and clean. Now we end up with more of a classic CUSTOMER-SUPPLIER
relationship for the custom parts of the protocol. That frees most of
the clients from dealing with the special interfaces, and the individual
special needs can be managed without changing anything about the common
assumptions.
John B: You have an off-the-rack interface, and then a set of tailor-made
ones.
Eric: But you want it recognized that that's what you're doing, that
there is a decision process being made.
Chris: The more I'm listening to this is more like a pattern I applied
in a system I worked on. In this case, the requester specifies the format.
If they didn't specify, you got the old format. If you needed something
new, something else offered by the current system, the client would change
their format specifier.
Charlie: Do some of the specializations, some of the customizations really
belong on the client side?
Eric: If you're using OPEN HOST SERVICE, you need to keep it simple and
consistent for you as the maintainer. For variations, you may choose to
make a special adaptation, negotiating it one at a time based on company
priorities or revenue, etc. If you have a custom protocol that only *one*
customer can use, you can change the interface as often as your two groups
agree to. Once there are multiple clients of the protocol, it's far, far
harder. It's the OPEN HOST SERVICE situation, where the interface is frozen
in place.
Darlene: At what point might you go toward a general solution, a new
protocol with the space to accommodate a new set of variations? Rather
than maintain half a dozen variations on the common protocol?
Russ: Maybe we should define ANTICORRUPTION LAYER, we've used it several
times.
(p. 364, ANTICORRUPTION LAYER: picture of the Great Wall of China)
John B: I'm seeing this adapter-service thing, that's a lot like...
Eric: I use the terms TRANSLATION LAYER and ANTICORRUPTION LAYER. An
ANTICORRUPTION LAYER is certainly a TRANSLATION LAYER. It's the difference
in intent, in posture, that makes the difference. An ANTICORRUPTION LAYER
defends your system from having to adapt to a divergent external model.
I don't think you could mechanically tell the difference. But it's the
difference between a wall and a bridge, almost. A bridge is like a regular
TRANSLATION LAYER, where one side is reaching out to the other, or both
to each other. An ANTICORRUPTION LAYER is protected, a wall, a moat, and
a gate. You don't have an ANTICORRUPTION LAYER separating you from a protocol
that you designed.
Russ: Maybe a protocol you designed in the past, that you don't want
to work with any more.
Eric: With ANTICORRUPTION LAYER I make stronger statements about why
you're doing it. It's that you are protecting your model from the concepts
on the other side. The concepts on the other side of the wall will mess
you up if you have to try and deal with them.
John B: Not just corrupting data, corrupting your model.
Eric: Your way of thinking. There isn't a functional distinction between
the two.
Mike: The OO-SQL translation layer as one example of trying to bridge
the gap.
Eric: An ANTICORRUPTION LAYER is one-sided, built by one side to protect
itself. Vs. the Chunnel, a cooperative effort by the British and French
to bring each other together.
Mike: You could think of an O-R persistence layer as an ANTICORRUPTION
LAYER if you have to adapt to an organizational standard which interferes
with how you can deal with things.
John C: A Cartesian to radial coordinate translation.
Eric: More like where you have Cartesian coordinates on one side and
on the other, a tribal society which describes how to find things by how
many days' walk between locations, considering weather conditions, and
refers to locations by their historical association. You would want to
protect the clean, simple Cartesian model from the complex expression
of locations on the other side.
John B: So let's say you have an RDBMS with transaction scripts talking
to a database. That's where you might put a translation layer to protect
the database?
(some additional discussion of ANTICORRUPTION LAYER vs. TRANSLATION LAYER
in different contexts)
Mark: Web pop-up blockers are an ANTICORRUPTION LAYER.
John B: They protect you from the advertisers' protocol.
Eric: By doing complicated gymnastics inside the browser. If you provide
a compatible interface to protect your clients from changes, that's being
nice.
John B: It's like being CONFORMIST to a layer that keeps squiggling out
from under you, you conform to what the ANTICORRUPTION LAYER presents
and adapt to the changes inside that layer.
Eric: If the old model is nice and clean, if it isn't a conceptually
difficult translation... unless there were no longer a straightforward
relationship between the new model and the old model, it's not something
where the service is protecting yourself. I don't think that offering
a
Russ: Insulation but not anti-corruption.
Eric: But if the old model were a BAD one, incompatible, a messy, complex
translation from the current system's model, then perhaps it is an ANTICORRUPTION
LAYER on an outward feed.
Tracy: Maybe I can make a point that will help. So let's say the new
internal model is the brown sugar. So if the guys that wrote this offer
a new interface that's sugar, and doesn't offer the interface of Sweet
N' Low, then the client might build an ANTICORRUPTION LAYER to defend
themselves from the incompatible new interface.
Russ: So if the motivation is trying to protect your old clients by offering
a translation layer to a protocol they want, it's different from...
Eric: Yes, the attitude is different.
John B: It's where there is a meeting of minds (TRANSLATION LAYER) vs.
no meeting of minds, a disagreement (ANTICORRUPTION LAYER).
Charlie: The word "corruption" is subjective itself, it depends
on point of view.
(some additional discussion of ANTICORRUPTION LAYER to attempt to clarify
its usage)
p. 371, SEPARATE WAYS
Phil: I love the picture for SEPARATE WAYS. You see all those team rowboat
pictures in those motivational posters. Seeing that picture of that one
guy in the rowing shell really captures the feel.
John B: It's like a standalone context, like your earlier discussion
of STANDALONE CLASS.
Eric: Yes. But separate contexts may introduce duplication. If you have
separate contexts, you can have duplication. But not sharing.
Russ: It's positive danger to share things between contexts.
Eric: Unless you have a SHARED KERNEL.
Mike: Does SHARED KERNEL drive you to use CONTINOUS INTEGRATION? Or another
specific process to support the SHARED KERNEL.
Eric: Yes, if you have SHARED KERNEL, you have a process that needs to
support it. CONTINUOUS INTEGRATION is an example of one process that could
support it, but it's not the only way to do it. Frequent integration,
appropriate to its rate of change; having each side supply some test cases,
and each side runs all the shared, compiled test cases. I wouldn't recommend
in more detail than that, but you do need a process.
John B: So you might have meetings or pow-wows between the teams sharing
the SHARED KERNEL, to negotiate the interface changes, where an XP team
would just go bam, there the interface changes.
Eric: *Within* a context, you can use full-on continuous integration.
Charlie: Does a SHARED KERNEL tend to be more stable than the rest of
the system?
Eric: Sometimes, but not necessarily. Sometimes it has the most change
at certain phases of the project, although it has more inertia from the
multiple forces depending on it. You've traded away some agility.
John B: You need these patterns in order for XP to work, for changing
the system to make it better?
Eric: The assumption that change makes things better is implicit to XP.
Chris: Does the way that XP works, that you surge forward, changing the
model, in a couple of different contexts. Does that make integration of
two divergent teams' work difficult at a later point? The lack of detailed
design documentation?
Phil: Just read the tests?
John B: The tests will get you a long way. All the translations will
have to be green-bar preserving.
Russ: That's where you encounter the greatest risk of the tests becoming
irrelevant. When the model changes, the tests may be making irrelevant
assertions. Incorrect assertions.
John B: The unit tests, yes. Not the acceptance tests. They reflect knowledge
of the domain.
Eric: But those acceptance tests contain some assumptions about the model,
they exist within a context. If the model changes slightly, what the acceptance
tests express may be subtly different.
Jeff: Perhaps if the acceptance tests were expressed in different units,
they might be able to be consistent within a larger framework. Say more
detailed units of time or money or something. That you could translate
the acceptance tests into a common larger perspective, but the new perspective
might have lots of holes in the acceptance test coverage.
John B: But how do you do this in the context of a non-XP team? You have
a document, maybe, but it doesn't reflect how things really are.
Phil: How things used to be, how things were supposed to be, how we thought
the system was going to turn out.
Chris: Even if those two documents were inaccurate, they are marker points
to bring up subtle points that people might forget. But they provide a
place to start talking, a guide to find out if the two kinds of apples
we're trying to merge are really two kinds of apples, rather than apples
and something else.
Chris: To the extent you can automate the documentation (TogetherJ was
mentioned)
John B: Supple design assertions, what's the invariant for an apple?
Those can really help you reveal what the common points of view are between
two models.
Russ: Sometimes it's how the actual artifacts of the code relate drives
you in a direction. What Phil was saying earlier about refactoring driving
you toward better understanding of how things were being used. When the
problem is too big to hold in your head.
John B: The problem is not the technical issues so much that there is
my model and your model, and clearly my model is better than yours, and
there are two sets of (mine, yours) in the room. The difficulties are
more sociological than technological.
Russ: But maybe we aren't even at this point. We have to decide whether
the models have any correspondences where we can extract some common point
of view. Using diagrams, pictures, descriptions, etc, to see if common
points of correspondence occur.
Charlie: I was once a "swamp guide" for new hires at my company.
There were lots of questions about certain idiosyncrasies in the code
which related to evolution in the company's business model without the
objects being changed to reflect the new point of view.
John B: The context of "now and then".
Eric: Similar to Mike's issue with the different messaging protocols.
He had to deal with the protocol based on "then", and the internal
model based on "now", and facing the challenge of how to get
more "now" into "then".
p. 388: a diagram grouping the "context" patterns in relationships,
from SEPARATE WAYS at one end (need no control of other systems, no communication)
to Single BOUNDED CONTEXT (need high control, high communication).
Russ: Even on our small team, we have three different contexts in which
there's a "Book" object
Eric: (discussing the diagram) But CONFORMIST has no control and requires
high communication. ANTICORRUPTION LAYER is somewhat similar. Then there's
a break to a set of patterns which require greater integration, greater
control over other systems and more communication about internals... CUSTOMER-SUPPLIER
TEAMS, OPEN HOST SERVICE, SHARED KERNELs are partway along toward the
single BOUNDED CONTEXT.
Russ: You're really nice to XML on p. 376.
Eric: I wrote that back in the glory days of XML. We're all a little
disillusioned these days. I really wanted to talk about XML as a stimulus
to create common languages for interchange.
Eric: The E-commerce enthusiasts for XML as the magic bullet are not
realizing that the really key thing is the common model. The problem isn't
getting to a common syntax. With a common model, you can reach a common
syntax fairly easily.
John B: The fact that there's a common syntax, a common way of parsing
it did help take some of the syntax and formatting issues out of the way.
Russ: XML helps you with the easy problems, but not the hard ones, the
conceptual meaning of the marked up object. Here's a price with a dollar
value. But does it include tax? Not? How are you allowed to interpret
this value you've been given, <price><value unit="USD">50</value></price>
?
(brief discussion of XML web services design, what might make it supple,
will good designs win?)
Eric: p. 378, Notice the UML diagram is more compact than the poem!
Mark: What about the second and fifth guy?
Eric: Oops! Guess that was enough to make the point.


RomanT.Apps built the following apps as free services. These apps are provided by RomanT.Apps at no cost and are intended for use as is:
This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.
If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.
The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Speed Reading Technique unless otherwise defined in this Privacy Policy.
For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information that I request will be retained on your device and is not collected by me in any way.
The app does use third party services that may collect information used to identify you.
I want to inform you that whenever you use my Service, in case of an error in the app, I collect data and information (through third party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your use of the Service, and other statistics.
Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.
This Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.
I may employ third-party companies and individuals due to the following reasons:
I want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose.
I value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security.
This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by me. Therefore, I strongly advise you to review the Privacy Policy of these websites. I have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services.
These Services do not address anyone under the age of 13. I do not knowingly collect personally identifiable information from children under 13. In the case I discover that a child under 13 has provided me with personal information, I immediately delete this from our servers.
I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page.
If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me at<EMAIL_ADDRESS>This privacy policy page was created at privacypolicytemplate.net and modified/generated by App Privacy Policy Generator


Chapter 8. Scripted AI and Scripting Engines
This chapter discusses some of the techniques you can use to apply a scripting system to the problem of game AI, and the benefits you can reap from doing this. At its most basic level, you can think of scripting as a very simple programming language tailored to a specific task related to the game in question. Scripting can be an integral part of the game development process, as it enables the game designers rather than the game programmers to write and refine much of the game mechanics. Players also can use scripting to create or modify their own game worlds or levels. Taken a step further, you can use a scripting system in a massively multiplayer online role-playing game (MMORG) to alter the game behavior while the game is actually being played.
You can take several approaches when implementing a scripting system. A sophisticated scripting system might interface an already existing scripting language, such as Lua or Python, for example, with the actual game engine. Some games create a proprietary scripting language designed for the needs of the individual game. Although it's sometimes beneficial to use those methods, it's easier to have the game parse standard text files containing the scripting commands. Employing this approach, you can create scripts using any standard text editor. In a real game, the scripts can be read in and parsed when the game first starts, or at some other specified time. For example, scripts that control creatures or events in a dungeon can be read in and parsed when the player actually enters the dungeon area.
In the scope of game AI, you can use scripting to alter opponent attributes, behavior, responses, and game events. This chapter looks at all these uses.
|


[gecode-users] how to constaint sum of sum with linear constraint
manel askri
askri.manel1 at gmail.com
Tue Nov 19 16:08:17 CET 2013
hi everyone!
Thank YOU very much for the help !
i did ue that and it works, so just to be sur , i attached the constraint
and here what i did to resolve it :
IntArgs res(n*m);
BoolVarArgs X1(n*m);
int count=0;
for (int i=0; i<n; i++)
{
for (int j=0; j<m; j++)
res[count++] = g[i][j];
}
int count1=0;
for (int i=0; i<n; i++)
{
for (int j=0; j<m; j++)
X1[count1++] = X(i,j);
}
linear(*this, res,X1, IRT_EQ, gain);//// is this just fine satisfair the
constraint presented in sumof the sum.png
Thank you very much for your help
Manel
2013/11/19 Guido Tack <tack at gecode.org>
> Please have a look at the documentation how to use IntArgs and IntVarArgs.
> What you want to do is copy the coefficients and variables from your
> matrix into the Args, something like
>
> int count=0;
> for (int i=0; i<n; i++)
> for (int j=0; j<m; j++) res[count++] = g[i][j];
>
> Cheers,
> Guido
>
>
> On 19 Nov 2013, at 11:55 am, manel askri <askri.manel1 at gmail.com> wrote:
>
> hi
> Thank You for your help but i really didn't get it well with the
> IntVarArgs : this what i did :
>
> IntArgs res(n*m);
> IntVarArgs X1(n*m);
> for (int i=0; i<n; i++)
> {
> IntArgs res(g[i]);/// here i'm not sur if i will get the whole matrix g
> in the IntArgs res??????
> }
> for (int i=0; i<n; i++)
> {
> IntVarArgs X1(X.row(i));//// but this is wrong how can i fix this ?? how
> can i put the matrix X which has Boolean variables in the IntVarArgs
> X1??????
> }
>
>
> Could You please help me with that ????
>
> Thank YOU very much
>
> Manel
>
>
> 2013/11/19 Guido Tack <tack at gecode.org>
>
>> Simply create a new IntArgs and IntVarArgs with the right size and put
>> all the coefficients and variables that you need to sum up into those
>> arrays. Then you only need to post one linear.
>>
>> Cheers,
>> Guido
>>
>> On 19 Nov 2013, at 8:26 am, manel askri <askri.manel1 at gmail.com> wrote:
>>
>>
>> hi everyone!
>>
>> I want to post a constraint that is the sum of a sum like this
>> *sum(sum (res [ i ] * X.row (i)))=Z, **with 0 < i <n*
>>
>> but in the documentation MPG I just found the linear constraint that are
>> used to constraint the sum not the sum of sum :
>>
>> let me explain:
>>
>> I have a matrix : vector < vector <int> > res , and a Boolean matrix X
>> defined as follows: Matrix <BoolVarArray> X (a, m, n);
>>
>> in the following code I had to do this sum :
>>
>> *sum (res [ i ] * X.row (i)) with 0 < i <n* / / here i can not pay this
>> sum for a table because the 2 matrix does not have the same type and i
>> didnt find any prototype of the linear constraint that can do this.
>>
>> Then I had to make this sum :
>>
>> *the sum of the previous sum= Z*
>>
>> so I used this constraint but it appeared that it is false because it
>> does not give me the desired solution :
>> *linear ( * this , res [ i ] X.row ( i ) IRT_EQ , Z) ;*
>>
>> I know that this constraint only to : *sum (res [ i ] * X.row (i)) = Z* ,
>> where 0 < i < n; an dits wrong.
>>
>> you have an idea on correcting this error could you help me please
>>
>> thank you very much for your help
>>
>> Manel
>>
>>
>>
>> _______________________________________________
>> Gecode users mailing list
>> users at gecode.org
>> https://www.gecode.org/mailman/listinfo/gecode-users
>>
>>
>>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20131119/95b68a59/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sumof the sum.png
Type: image/png
Size: 6169 bytes
Desc: not available
URL: <http://www.gecode.org/pipermail/users/attachments/20131119/95b68a59/attachment.png>
More information about the users
mailing list


Contact Book
Login with
Facebook
Twitter
Logged in as
Logout
Multiple Files Upload to Firebase
With Input:
What's on your mind?
Pictures
Post
With Drag and Drop:
What's on your mind?
(Drag and Drop files in textarea)
Post