Real estate construction company based out of USA
Client was looking for creating a database of real estate mailing lists for locating sales prospects in US/Canada and capturing highly targeted leads
The client wanted to build a database of realtors and real estate agents in US and Canada who were listed on various real estate franchises. The challenge was to collect more than 1 million records comprising real estate agent profile information ensuring low turnaround time, minimal duplicity and highest fill rate of contact information. This had to be done by gathering data from 8 websites (each having a different structure) with some websites requiring user to specifically search before listing the agents. The critical part of developing the database was to compare and identify the same agent across multiple websites and triangulate contact information.
REMAX(US & Canada), Corcoran, Royal lepage, Sotheby’s Realty, BHGRE, Century 21, Keller Williams, ERA Real Estate
The key contact fields for the agents were identified across the websites including Agency Name, Contact Name, Email, Address, City, State, Zip, Phone, Fax, Website, Specialization, Languages Known, Properties Price Range, Agent/Agency Summary, Listed from 8 data crawlers were setup for mass crawling that could collect the information related to the above fields in a structured format. The websites were crawled parallel to each other and 1M agent records were collect in a span of 1 week. These records were subsequently treated for duplication using agency and contact details and the final dataset was made available via an API.
Home electronics price-aggregator startup
Collection of selling price data for electronics and appliance categories from major US ecommerce websites and collation of prices in a cloud-hosted database
The client was looking for a data partner to collate consumer electronics and home appliances price data from multiple US retailers so that their analytics team could develop interesting analytics around price comparison for consumers. The existing data extraction prcess was unstructured with prices being gathered manually using browser based scraping tools from various sources. This led to high efforts and data inconsistency issues with the scraping tool being unable to ensure consistent record count and missing out on key high selling models. Even with the manual effort, structuring of the data in order to import it into their database was a challenge. Client was in need of clean data that could be uploaded into the database directly and utilized for creating a price comparison and offer tool.
Kohls, Staples, Office Depot, Bestbuy, BJs, Costco, Amazon, Dell, Target
The client provided the list of source websites to be crawled. The data had to be extracted on a daily basis meaning fresh information had to be supplied every day. Our team set up the crawlers to fetch data points from the sources and crawl all fields including model, manufacturer, SKU, price, store, date, UPC, EAN and description. Since every website in the source list had a different structure and design, site specific customized crawlers were developed. Post completion of crawler development, the results of first crawl were shared with the client and once we received approval on data format and fill-rate, the crawlers started uploading data daily to the database ensuring consistent record count. Each crawled record was automatically mapped against other records based on the UPC data. We were delivering about 200k records on a daily basis.
Popular Job portal in India
The client wanted job listings to be extracted from leading job sites like Monster Jobs, Indeed and Naukri.com. The data points that the client needed were Job postings including job titles, location, wages, company profiles, Job descriptions and candidate resumes.
The list of source websites and the data points were provided by the client. They wanted this data to be extracted on a daily basis, which means fresh data had to be provided every day. We set up crawlers to extract the required data fields from the list of websites provided by the client. This requirement comes under the site specific crawl offering of ours since the crawlers have to be setup specifically for each site in the list. The client wanted the data in CSV format and be uploaded to their Dropbox account. Once the initial setup was done, our crawlers started delivering the data which was directly fed into the client’s Dropbox. We delivered close to 2 million job listings during the first crawl and about 200K records of clean and structured data on a daily basis thereafter.
Event Marketing Consultancy Firm based out of New Zealand
Crawl event and ticket price data from leading live event ticket booking websites
Ticketfly, Ticketek, Moshtix
To be updated soon


Model-Free Control
Assumption:
- unknown MDP. You know the states, but you don't know the transition probabilities and the reward function
- All states must be visited enough times.
Goal. We want to find the optimal policy.
There are two main strategies, namely on-policy learning (learning by doing) and off-policy learning (learning from someone else's policy)
On-Policy Learning
The main idea is to use Generalized Policy Iteration, which consists of iteratively applying two steps, viz. policy evaluation (computing the value of a policy) and policy improvement.
On-Policy - Trial 1: Generalized Policy Iteration with Monte-Carlo Evaluation
Policy Evaluation Monte-Carlo policy evaluation on state-value function.
Policy Improvement Greedy policy improvement $\pi(s)=\arg\max_a R_s^a + \gamma\sum_{s'}P_{ss'}^a v(s')$.
Problem 1. This solution is not model-free. You need $P$.
Problem 2. Deterministic policy has issues about exploration.
On-Policy - Trial 2: Generalized Policy Iteration with Action-Value Function
If you use the action-value function, you can do control without needing the model
Policy Evaluation Monte-Carlo policy evaluation on action-value function.
Policy Improvement Greedy policy improvement $\pi(s)=\arg\max_a q(a,s)$.
Problem 2. Deterministic policy has issues about exploration.
Consider a case with two possible actions. One of them gives small reward at each timestep, while the other one gives huge and rare rewards.
A greedy policy always selects the action with small and frequent reward, but it's not guaranteed to be optimal.
On-policy - Trial 3: Monte-Carlo Policy Iteration
Policy Evaluation Monte-Carlo policy evaluation on action-value function.
$$\pi'(a|s)=\left\{\begin{array}{ll} 1-\epsilon+\frac{\epsilon}{m} & if a=\arg\max_{a'}q_\pi(a',s) \\ \frac{\epsilon}{m} & otherwise \end{array}\right.$$
Policy Improvement $\epsilon$-Greedy exploration, namely choose greedy action with probability $1-\epsilon$ or choose all other actions with probability $\epsilon$. Therefore
Theorem. $\epsilon$-greedy exploration improves the policy, namely $v_{\pi'}(s)\geq v_\pi(s)$.
Proof. $$\begin{align}
\sum_{a}\pi'(a|s)q_\pi(a,s) &= (1-\epsilon)\max_a q_\pi(a,s) + \frac{\epsilon}{m}\sum_a q_\pi(a,s) \\
&\geq (1-\epsilon)\sum_a \pi^{''}(a|s) q_\pi(a,s) + \frac{\epsilon}{m}\sum_a q_\pi(a,s) \quad\text{where}\quad \pi^{''}(a|s)=\frac{\pi(a|s)-\epsilon/m}{1-\epsilon} \\
&= (1-\epsilon)\sum_a \frac{\pi(a|s)-\epsilon/m}{1-\epsilon}q_\pi(a,s) + \frac{\epsilon}{m}\sum_a q_\pi(a,s)\\
&= \sum_{a}\pi(a|s)q_\pi(a,s)
\end{align}$$
QED
Problem. This is a bit inefficient, because we evaluate a policy on multiple episodes. If the policy is bad, we spend too much time on evaluating that bad policy.
On-policy - Trial 4: Monte-Carlo Control
Same as Monte-Carlo Policy Iteration but you evaluate the policy on just a single episode.
Policy Evaluation Monte-Carlo policy evaluation on action-value function on single episode. $q(a,s)\approx q_\pi(a,s)$.
$$\pi'(a|s)=\left\{\begin{array}{ll} 1-\epsilon+\frac{\epsilon}{m} & if a=\arg\max_{a'}q(a',s) \\ \frac{\epsilon}{m} & otherwise \end{array}\right.$$
Policy Improvement $\epsilon$-Greedy exploration, namely choose greedy action with probability $1-\epsilon$ or choose all other actions with probability $\epsilon$. Therefore
Problem. Note that policy evaluation is performed on a single episode (and not an infinite set of episodes), which obtains only an approximation of the action-value function. The subsequent policy improvement is based on this estimation. Are we guaranteed to find the optimal policy?
On-policy - Solution 1: GLIE Monte-Carlo Control
In order to ensure convergence to the optimal policy, we need to satisfy two conditions:
GLIE (Greedy in the Limit of Infinite Exploration).
- All state-action pairs must be explored infinitely many times (in order not to discard any of them), namely $\lim_{t\rightarrow\infty}N_t(a,s)=\infty$.
- The final policy must be greedy (deterministic), $\lim_{t\rightarrow\infty}\pi_t(a|s)=1[a=\arg\max_{a'}q_t(a',s)]$.
Note that the GLIE property can be ensure by choosing $\epsilon=1/t$.
Policy Evaluation Monte-Carlo policy evaluation on action-value function on single episode.
$$\begin{align}\text{for each pair of state,} & \text{ action in the episode} \\ & N(A_t,S_t)=N(A_t,S_t)+1 \\ & q(S_t,A_t)=q(S_t,A_t) + \frac{1}{N(A_t,S_t)}\big(G_t-q(S_t,A_t)\big)\end{align}$$
Policy Improvement $\epsilon$-Greedy exploration, namely choose greedy action with probability $1-\epsilon$ or choose all other actions with probability $\epsilon$. Therefore
$$\pi'(a|s)=\left\{\begin{array}{ll} 1-\epsilon+\frac{\epsilon}{m} & if a=\arg\max_{a'}q(a',s) \\ \frac{\epsilon}{m} & otherwise \end{array}\right.$$
Choose $\epsilon=1/t$.
Theorem. GLIE Monte-Carlo control converges to the optimal action-value function as long as the number of collected episodes is large enough, namely $q(A_t,S_t)\rightarrow q^*(A_t,S_t)$ for $t\rightarrow\infty$.
Proof. NOT HERE
On-policy - Solution 2: Control with Sarsa
We want to have an online algorithm.
Recall that MC policy evaluation uses $q(S_t,A_t)=q(S_t,A_t) + \alpha\big(G_t-q(S_t,A_t)\big)$.
Then, we can replace $G_t$ with the TD target $R_{t+1}+\gamma q(S_{t+1},A_{t+1})$ and obtain Sarsa.
(In fact, recall that $q_\pi(a,s)=R_s^a+\gamma\sum_{s'}P_{ss'}^a\sum_{a'}\pi(a'|s')q_\pi(a',s')$).
Policy Evaluation online policy evaluation on action-value function.
$$q(S_t,A_t)=q(S_t,A_t) + \alpha\big(R_{t+1}+\gamma q(S_{t+1},A_{t+1})-q(S_t,A_t)\big)$$
Policy Improvement $\epsilon$-Greedy exploration, namely choose greedy action with probability $1-\epsilon$ or choose all other actions with probability $\epsilon$. Therefore $$\pi'(a|s)=\left\{\begin{array}{ll} 1-\epsilon+\frac{\epsilon}{m} & if a=\arg\max_{a'}q(a',s) \\ \frac{\epsilon}{m} & otherwise \end{array}\right.$$ Choose $\epsilon=1/t$.
Theorem. Assume that
- We have GLIE policies
- The sequence of $\alpha_t$ satisfies the Robbins Monro conditions:
- $\sum_{t=1}^\infty \alpha_t = \infty$ (meaning that we are able to move our estimate $q(s,a)$ wherever we want).
- $\sum_{t=1}^\infty\alpha_t^2<\infty$ (meaning that the changes eventually diminish).
Then, Sarsa converges to optimal action-value function.
Proof. NOT HERE
Question. Can we unify the last two solutions?
On-policy - Solution 3: Control with n-Step Sarsa
We can replace $G_t$ with the n-step TD target $q_t^{(n)}=R_{t+1}+\gamma R_{t+2} + \dots + \gamma^{n}q(S_{t+n},A_{t+n})$
Policy Evaluation policy evaluation on action-value function
$$q(S_t,A_t)=q(S_t,A_t) + \alpha\big(q_t^{(n)}-q(S_t,A_t)\big)$$
Policy Improvement $\epsilon$-Greedy exploration, namely choose greedy action with probability $1-\epsilon$ or choose all other actions with probability $\epsilon$. Therefore
$$\pi'(a|s)=\left\{\begin{array}{ll} 1-\epsilon+\frac{\epsilon}{m} & if a=\arg\max_{a'}q(a',s) \\ \frac{\epsilon}{m} & otherwise \end{array}\right.$$Choose $\epsilon=1/t$.
Question. Which $n$ is the best?
On-policy - Solution 4: Control with Sarsa($\lambda$)
Combine all $n$
Policy Evaluation policy evaluation on action-value function.
$$q(S_t,A_t)=q(S_t,A_t) + \alpha\big(q_t^{\lambda}-q(S_t,A_t)\big)$$
where $q_t^{\lambda}=(1-\lambda)\sum_{n=1}^\infty \lambda^{n-1}q_t^{(n)}$.Policy Improvement $\epsilon$-Greedy exploration, namely choose greedy action with probability $1-\epsilon$ or choose all other actions with probability $\epsilon$. Therefore
$$\pi'(a|s)=\left\{\begin{array}{ll} 1-\epsilon+\frac{\epsilon}{m} & if a=\arg\max_{a'}q(a',s) \\ \frac{\epsilon}{m} & otherwise \end{array}\right.$$
Choose $\epsilon=1/t$.
Question. How to make it online?
On-policy - Solution 5: Control with Online Sarsa($\lambda$)
Define an eligibility trace, namely:
$$E_0(a,s)=0$$$$E_t(a,s)=\gamma\lambda E_{t-1}(a,s) + 1[S_t=s, A_t=a]$$
Then,
Policy Evaluation policy evaluation on action-value function.
$$q(S_t,A_t)=q(S_t,A_t) + \alpha\delta_tE_t(S_t,A_t)$$
where $\delta_t=R_{t+1}+\gamma q(S_{t+1},A_{t+1})-q(S_t,A_t)$.
$$\pi'(a|s)=\left\{\begin{array}{ll} 1-\epsilon+\frac{\epsilon}{m} & if a=\arg\max_{a'}q(a',s) \\ \frac{\epsilon}{m} & otherwise \end{array}\right.$$
Policy Improvement $\epsilon$-Greedy exploration, namely choose greedy action with probability $1-\epsilon$ or choose all other actions with probability $\epsilon$. Therefore
Choose $\epsilon=1/t$.
Off-Policy Learning
We have a behaviour policy $\mu$ (the one which really acts in the environment) and a target policy $\pi$, which we want to know its state-value function.
Why?
- The behaviour policy can be from other agents (e.g. humans)
- Re-use experience from old policies
- Following exploratory policy and learn the optimal one
- Follow one policy and learn multiple ones
Importance sampling. Imagine you have 2 distributions $P$ and $Q$. Then
$$\begin{align}E_{X\sim P}\{f(X)\} &= \sum P(X)f(X) \\ &= \sum P(X)\frac{Q(X)}{Q(X)}f(X) \\ &= \sum Q(X)\bigg(\frac{P(X)}{Q(X)}f(x)\bigg) \\ &= E_{X\sim Q}\bigg\{\frac{P(X)}{Q(X)}f(x)\bigg\}\end{align}$$
The quantity we want to estimate is $G_t$.
Trial 1: Off-Policy Monte Carlo
We take actions using $\mu$ and we estimate $G_t$ by importance sampling over the actions.
$$\begin{align}G_t^{\pi/\mu} &= \frac{\pi(A_t,A_{t+1},\dots,A_T|S_t,S_{t+1},\dots,S_T)}{\mu(A_t,A_{t+1},\dots,A_T|S_t,S_{t+1},\dots,S_T)}G_t \\ &=\frac{\pi(A_t|S_t,S_{t+1},\dots,S_T)\pi(A_{t+1}|S_t,S_{t+1},\dots,S_T)\dots\pi(A_T|S_t,S_{t+1},\dots,S_T)}{\mu(A_t|S_t,S_{t+1},\dots,S_T)\mu(A_{t+1}|S_t,S_{t+1},\dots,S_T)\dots\mu(A_T|S_t,S_{t+1},\dots,S_T)}G_t \\ &=\frac{\pi(A_t|S_t)\pi(A_{t+1}|S_{t+1})\dots\pi(A_T|S_T)}{\mu(A_t|S_t)\mu(A_{t+1}|S_{t+1})\dots\mu(A_T|S_T)}G_t\end{align}$$and the update is
$$v(S_t)=v(S_t)+\alpha\big(G_t^{\pi/\mu}-v(S_t)\big)$$The main problem with this algorithm is that the estimator has too high variance!
In practice, Monte Carlo is never used for off-policy learning.
Solution 1: Off-Policy Temporal Difference
We take actions using $\mu$ and we estimate $G_t$ by importance sampling over the actions.
$$G_t^{\pi/\mu}=\frac{\pi(A_t|S_t)}{\mu(A_t|S_t)}\big(R_{t+1}+\gamma v(S_{t+1})\big)$$and the update is
$$v(S_t)=v(S_t)+\alpha\big(G_t^{\pi/\mu}-v(S_t)\big)$$This solution has much less variance compared to off-policy MC.
Solution 2: General Q-Learning
We don't need to use importance sampling. In fact, we can use a behaviour policy $\mu$ to act in the environment. And we update the TD target using an alternative action from target policy $\pi$.
$$q(S_t,A_t)=q(S_t,A_t) + \alpha\big(R_{t+1}+\gamma q(S_{t+1},A_{t+1})-q(S_t,A_t)\big)$$where $A_{t+1}=\arg \max_a q(S_{t+1},a)$ (from policy $\pi$). Therefore,
$$q(S_t,A_t)=q(S_t,A_t) + \alpha\big(R_{t+1}+\gamma \max_a q(S_{t+1},a)-q(S_t,A_t)\big)$$Solution 3: Special case of Q-Learning (Sarsa MAX)
Here, we have a special case of Q-Learning. Case where we want learn a greedy behaviour following an explorative behaviour. In fact, behaviour policy $\mu$ is $\epsilon$-greedy, while the target policy $\pi$ is greedy.
Policy Evaluation policy evaluation on action-value function.
$$q(S_t,A_t)=q(S_t,A_t) + \alpha\big(R_{t+1}+\gamma \max_a q(S_{t+1},a)-q(S_t,A_t)\big)$$
Policy Improvement $\epsilon$-Greedy exploration, namely choose greedy action with probability $1-\epsilon$ or choose all other actions with probability $\epsilon$. Therefore
$$\mu'(a|s)=\left\{\begin{array}{ll} 1-\epsilon+\frac{\epsilon}{m} & if a=\arg\max_{a'}q(a',s) \\ \frac{\epsilon}{m} & otherwise \end{array}\right.$$
Theorem. Sarsa MAX converges to optimal action-value function. (In fact, it fulfills the GLIE property)
Proof. NOT HERE


Badging API requires this demo to be run as an installed Progressive
Web App, and it's must be opened/running as a
standalone window. If you don't want to use Badging API you
can safely ignore this message and we will use the Favicon instead.


PSQL - Interface to PostgreSQL
Interface to PostgreSQL. Uses psql. This is a crude implementation because we want to be able to quickly modify the API. SELECT results should be directly compatible with HTML templating. This is a thin layer on top of psql.
PSQL = SEND(PSQL_CLASS,'NEW') creates a new PSQL object.
SEND(PSQL,'OPEN') opens the connection to PSQL.
PIPE = SEND(PSQL,'GET_PIPE')returns a pipe that can be written to with $PIPE = 'sql statement;'. After a command is written to the pipe, SEND(PSQL,'OUTPUT') gathers the results and removes the command echo. Results can be processed by function PSQL_RESULT() which returns an ARRAY of TABLEs or NULL if no results are available. If there are no result rows, message 'OUTPUT' will return NULL.
If command output is not needed, SEND(PSQL,'DISCARD') can be used. Either message 'OUTPUT' or 'DISCARD' must be used after a command is issued, because data from psql must be read, and we have to wait for the next prompt. Multiple line commands can be issued. The command will be executed on receiving the ‘;’ command delimiter, or at the end of the line for ‘\’ commands (for example, to establish a different database or user).
A TABLE can be passed to PSQL_INSERT() which will convert it to (NAME,...) VALUES (VALUE,...) ready to be combined into an SQL INSERT statement.
Function PSQL_INSERT() uses PSQL_ESCAPE() to escape and quote SQL strings. PSQL_INSERT() can also be used to display the contents of a PSQL TABLE.
SEND(PSQL,'CLOSE') closes the connection to psql.
It would be useful to catch the error, so we should probably use PSQL_OUTPUT() from PSQL_OPEN(). Not being done now, and will probably never be done because this should use a socket level interface.
&ERRLIMIT is used to prevent error code 11 if (for example), the PostgreSQL server is not running. If the server is not running, output is sent back from the first result of reading PSQL_PIPE with the error message (in PSQL_DISCARD). We throw the error message away. After the error message, the next read causes an error because the psql process is no longer running. Setting &ERRLIMIT converts the error into a failure, which is propagated back to PSQL_OPEN() and the calling program.
Uses
BQ
BRKREM
CHARS
COUNT
CSNOBOL4
REPL
SCOOP
SEQ
TIMER
UNIQUE
«INCLUDES»≡ -INCLUDE 'BQ.INC' -INCLUDE 'BRKREM.INC' -INCLUDE 'CHARS.INC' -INCLUDE 'COUNT.INC' -INCLUDE 'CSNOBOL4.INC' -INCLUDE 'REPL.INC' -INCLUDE 'SCOOP.INC' -INCLUDE 'SEQ.INC' -INCLUDE 'TIMER.INC' -INCLUDE 'UNIQUE.INC' @
We use a PTY to communicate with psql. This shouldn't be necessary, a simple bi-directional pipe should be sufficient. The protocol is to allow the caller to write to the pipe. The final thing written should activate the command. If a pipe is used for communication, when the 'DISCARD' or 'OUTPUT' message is sent, an echo command is used to generate a marker for the end of input.
If a PTY is used, the marker is generated by modifying the psql prompts (PROMPT1 and PROMPT2). Command echo has to be stripped in the PSQL_OUTPUT() function as well.
If pipes are used, this PSQL implementation fails with errno = 29 (ESPIPE, seek on pipe). The interpreter was modified to display errno in these cases. I suspect that this has to do with process timing. Using the PTY appears reliable.
For performance reasons using PTY may not be a desirable solution. CSNOBOL4 now uses FFI to allow access to io_getfp() which returns the FILE * (C library file pointer) associated with a unit. Also fileno() is published which returns the underlying fd (file descriptor) for a FILE *. These can be used to generate alternate I/O routines later.
Pipes work, but the best solution would be to use a socket level interface to PostgreSQL.
Performance is 500 to 1,000 SQL statements per second on my netbook (1.6Ghz Atom) and 1,000 to 3,000 statements per second (1.4Ghz Intel i3). This is far from stellar. SQL commands are always parsed since the interface is via the psql utility. A direct socket interface would be helpful, but this current interface should be sufficient for the near term. The psql process is started and can be left open for a long duration (for the entire application execution).
«PSQL»≡ * * THESE THREE ARE FUNCTIONS -- SIMPLY EASIER THAT WAY. * -PUBLIC PSQL_INSERT(), PSQL_RESULT(), PSQL_ESCAPE() * DEFINE('PSQL_INSERT(T)N,V,I') DEFINE('PSQL_RESULT(S)I,N,R,T,KEY,DAT') DEFINE('PSQL_ESCAPE(S)') * * CREATE CLASS PSQL_CLASS AND POPULATE ITS METHODS * -PUBLIC CLASS:PSQL_CLASS * PSQL_CLASS = SEND(CLASS, 'NEW_CLASS', 'PSQL_CLASS') DEFINE('PSQL_OPEN()L') * -PUBLIC PSQL_CLASS:'OPEN' * SEND(PSQL_CLASS, 'ADD_METHOD', 'OPEN', 'PSQL_OPEN') DEFINE('PSQL_CLOSE()PID') * -PUBLIC PSQL_CLASS:'CLOSE' * SEND(PSQL_CLASS, 'ADD_METHOD', 'CLOSE', 'PSQL_CLOSE') * -PUBLIC PSQL_CLASS:'GET_PIPE' * SEND(PSQL_CLASS, 'ADD_METHOD', 'GET_PIPE', CODE( + ' SEND = |.PIPE :(RETURN)')) DEFINE('PSQL_DISCARD()L') * -PUBLIC PSQL_CLASS:'DISCARD' * SEND(PSQL_CLASS, 'ADD_METHOD', 'DISCARD', 'PSQL_DISCARD') DEFINE('PSQL_OUTPUT()L') * -PUBLIC PSQL_CLASS:'OUTPUT' * SEND(PSQL_CLASS, 'ADD_METHOD', 'OUTPUT', 'PSQL_OUTPUT') * :(PSQL_END) * * CONVERT TABLE TO "(NAME, ...) VALUES (DATA, ...)" READY FOR SQL * INSERT. USES PSQL_ESCAPE() TO ENSURE THAT VALUES ARE QUOTED CORRECTLY. * PSQL_INSERT T = CONVERT(T, 'ARRAY') SEQ(' N = N T<I, 1> ", "; ' + ' V = V PSQL_ESCAPE(T<I, 2>) ", " ', .I) IDENT(N) :S(FRETURN) N ', ' RPOS(0) = V ', ' RPOS(0) = PSQL_INSERT = '(' N ') VALUES (' V ')' :(RETURN) * * CONVERT PSQL_OUTPUT() INTO ARRAY OF TABLES * PSQL_RESULT IDENT(S) :S(FRETURN) S = S CHARS_NL N = COUNT(S, CHARS_NL CHARS_NL) EQ(N) :S(FRETURN) PSQL_RESULT = ARRAY(N) PSQL5 S POS(0) ARB . T CHARS_NL CHARS_NL REM . S :F(RETURN) R = TABLE() PSQL6 T POS(0) BREAK('|') . KEY '|' + BRKREM(CHARS_NL) . DAT (CHARS_NL | RPOS(0)) = :F(PSQL7) R<KEY> = DAT :(PSQL6) PSQL7 I = I + 1 PSQL_RESULT<I> = R :(PSQL5) * * ESCAPE AND QUOTE AN SQL STRING * PSQL_ESCAPE PSQL_ESCAPE = "'" REPL(S, "'", "''") "'" :(RETURN) * * DISCARD OUTPUT FROM LAST SQL COMMAND. * PSQL_DISCARD %IF (USE_PTY) L = $|.PIPE :F(FRETURN) L POS(0) '*' RPOS(0) :S(RETURN)F(PSQL_DISCARD) %ELSE $|.PIPE = '\echo *' :F(FRETURN) PSQL_D2 L = $|.PIPE L POS(0) '*' RPOS(0) :S(RETURN)F(PSQL_D2) %ENDIF * * GATHER AND RETURN OUTPUT FROM SQL COMMAND. DISCARD COMMAND ECHO, * RETURNING ONLY RESULTS. * PSQL_OUTPUT %IF (USE_PTY) PSQL2 L = $|.PIPE :F(FRETURN) L POS(0) '*' RPOS(0) :S(PSQL3) PSQL_OUTPUT = PSQL_OUTPUT L CHARS_NL :(PSQL2) PSQL3 PSQL_OUTPUT CHARS_NL CHARS_NL RPOS(0) = CHARS_NL :S(PSQL3) PSQL4 PSQL_OUTPUT BREAK(CHARS_NL) CHARS_NL REM . PSQL_OUTPUT + :F(FRETURN) PSQL_OUTPUT POS(0) '# ' :S(PSQL4)F(RETURN) %ELSE $|.PIPE = '\echo *' :F(FRETURN) PSQL2 L = $|.PIPE :F(FRETURN) L POS(0) '*' RPOS(0) :S(RETURN) PSQL_OUTPUT = PSQL_OUTPUT L CHARS_NL :(PSQL2) %ENDIF * * OPEN PSQL COMMAND. SEND COMMANDS TO MAKE PSQL_OUTPUT() EASIER, * PSQL_RESULT() FOR PARSING SELECT RESULTS AND BUILDING RESULT ARRAYS. * PSQL_OPEN |.UNIT = IO_FINDUNIT() :F(FRETURN) |.PIPE = UNIT_NAME(|.UNIT) %IF (USE_PTY) INPUT(|.PIPE, |.UNIT, 'U', '||/usr/bin/psql -q ' A1) + :F(FRETURN) %ELSE INPUT(|.PIPE, |.UNIT, 'U', '|/usr/bin/psql -q ' A1) :F(FRETURN) %ENDIF OUTPUT(|.PIPE, |.UNIT) :F(FRETURN) %IF (USE_PTY) $|.PIPE = "\set PROMPT1 '\n*\n'" :F(FRETURN) SELF('DISCARD') :F(FRETURN) $|.PIPE = "\set PROMPT2 '# '" :F(FRETURN) SELF('DISCARD') :F(FRETURN) %ENDIF $|.PIPE = "\pset pager off" :F(FRETURN) SELF('DISCARD') :F(FRETURN) $|.PIPE = "\a" :F(FRETURN) SELF('DISCARD') :F(FRETURN) $|.PIPE = "\x on" :F(FRETURN) SELF('DISCARD') :F(FRETURN)S(RETURN) * * CLOSE PSQL * PSQL_CLOSE $|.PIPE = '\q' :F(FRETURN) ENDFILE(|.UNIT) :F(FRETURN) DETACH(|.PIPE) :F(FRETURN) * * ENDFILE() CLOSES PSQL. INDEED, WE SEND A QUIT COMMAND (\q) FIRST! * BUT... THE CLOSE CODE IN THE INTERPRETER DOES NOT REAP THE ZOMBIE. * WAIT() IS DEFINED IN CSNOBOL4, USE WAIT() TO REAP. THIS IS WRONG, * WE MAY REAP THE WRONG PROCESS! SHOULD FIX THIS IN IO.C - THE CODE * IS IN IO.C, BUT ISN'T WORKING (?) * PID = WAIT() :S(RETURN)F(FRETURN) * PSQL_END @
«unit_test»≡ #!/usr/bin/bash exec "snobol4" "-b" "$0" "$@" -INCLUDE 'TIMER.INC' -INCLUDE 'PSQL.INC' -INCLUDE 'HASH.INC' -INCLUDE 'BQ.INC' -INCLUDE 'DDT.INC' * DDT() &CODE = 1 * * CREATE THE PSQL OBJECT * PSQL = SEND(PSQL_CLASS, 'NEW') * * OPEN THE PSQL CONNECTION. NOTE THE &ERRLIMIT SETTING TO PREVENT * PROBLEMS IF THE POSTGRESQL SERVER CANNOT BE REACHED. * &ERRLIMIT = 1 SEND(PSQL, 'OPEN') * * GET THE PIPE NAME CONNECTING TO PSQL * P = SEND(PSQL, 'GET_PIPE') * * A SIMPLE PSQL COMMAND * $P = "SELECT version();" :F(END) OUTPUT = SEND(PSQL, 'OUTPUT') :F(END) * * ANOTHER COMMAND * $P = "SELECT 1 + 1;" :F(END) OUTPUT = SEND(PSQL, 'OUTPUT') :F(END) * * CREATE THE WEATHER TABLE. DROP IT FIRST IN CASE IT EXISTS * $P = "DROP TABLE weather;" :F(END) SEND(PSQL, 'DISCARD') :F(END) $P = "CREATE TABLE weather (" $P = " city VARCHAR(80)," $P = " temp_lo INT, -- low temperature" $P = " temp_hi INT, -- high temperature" $P = " prcp REAL, -- precipitation" $P = " date DATE" $P = ");" SEND(PSQL, 'DISCARD') :F(END) * * INSERT TWO ROWS INTO THE WEATHER TABLE * $P = "INSERT INTO weather" :F(END) $P = PSQL_INSERT( + #("city=San Francisco,temp_lo=46,temp_hi=50,prcp=0.25," + "date=1994-11-27")) ";" :F(END) SEND(PSQL, 'DISCARD') :F(END) $P = "INSERT INTO weather" :F(END) $P = PSQL_INSERT( + #"city=Hayward,temp_lo=37,temp_hi=55,date=1994-11-29") + ";" :F(END) SEND(PSQL, 'DISCARD') :F(END) * * SELECT FROM WEATHER TABLE, FOR A CITY THAT DOESN'T EXIST. WE EXPECT * NO RESULTS FROM THIS * $P = "SELECT * FROM weather" :F(END) $P = "WHERE city = 'xx';" :F(END) S = SEND(PSQL, 'OUTPUT') :F(END) IDENT(S) :F(END) * * SELECT EVERYTHING FROM TABLE WEATHER. WE EXPECT TWO ROWS. NOTE THE * USE OF PSQL_INSERT() TO FORMAT A ROW FOR DEBUG DISPLAY * $P = "SELECT * FROM weather;" :F(END) R = PSQL_RESULT(SEND(PSQL, 'OUTPUT')) :F(END) EQ(PROTOTYPE(R), 2) :F(END) OUTPUT = PSQL_INSERT(R<1>) :F(END) OUTPUT = PSQL_INSERT(R<2>) :F(END) * * USE 'AS' TO NAME A RESULT COLUMNS. RETRIEVE THE RESULT AND DISPLAY * $P = 'SELECT 1 + 1 AS result;' :F(END) T = PSQL_RESULT(SEND(PSQL, 'OUTPUT')) :F(END) EQ(T<1><'result'>, 2) :F(END) OUTPUT = T<1><'result'> * * SOME TIMING * * TIME SIMPLE SELECT AND RESULT ANALYSIS * TIMER(" $P = 'SELECT 1 + 1 AS result;'; " + " T = PSQL_RESULT(SEND(PSQL, 'OUTPUT')) ") * * A SIMPLE SELECT, DISCARDING RESULTS * TIMER(" $P = 'SELECT 1 + 1 AS result;'; " + " SEND(PSQL, 'DISCARD') ") * * A TABLE SELECT, AND RESULT ANALYSIS * TIMER(" $P = 'SELECT * FROM weather;'; " + " R = PSQL_RESULT(SEND(PSQL, 'OUTPUT')) ") * * A TABLE SELECT, DISCARDING RESULTS * TIMER(" $P = 'SELECT * FROM weather;'; " + " SEND(PSQL, 'DISCARD') ") * * DROP THE WEATHER TABLE * $P = "DROP TABLE weather;" :F(END) SEND(PSQL, 'DISCARD') :F(END) * * CLOSE PSQL, FREEING THE PIPE AND UNIT * SEND(PSQL, 'CLOSE') :F(END) * * SEE IF WE HAVE ANY ZOMBIES * OUTPUT = BQ('ps ax | grep " Z "') &CODE = 0 END @
«»≡ -MODULE PSQL %SET (USE_PTY,1) «INCLUDES» -IN72 -STITL PSQL -EJECT * ************************************************************************ * * * ###### ##### ##### # * * # # # # # # # * * # # # # # # * * ###### ##### # # # * * # # # # # # * * # # # # # # * * # ##### #### # ####### * * * * PSQL INTERFACE TO POSTGRESQL * * * ************************************************************************ * * PSQL.lss * «PSQL» * * CE: .F.MSNOBOL4; @


Jeweler Ellie:
Where are the materials I requested? I can't make the jewelry for you unless you give me the materials! Stop fooling around!


Introduction
Mail is an internet library for Ruby that is designed to handle emails generation, parsing and sending in a simple, rubyesque manner.
The purpose of this library is to provide a single point of access to handle all email functions, including sending and receiving emails. All network type actions are done through proxy methods to Net::SMTP, Net::POP3 etc.
Built from my experience with TMail, it is designed to be a pure ruby implementation that makes generating, sending and parsing emails a no brainer.
It is also designed form the ground up to work with Ruby 1.9. This is because Ruby 1.9 handles text encodings much more magically than Ruby 1.8.x and so these features have been taken full advantage of in this library allowing Mail to handle a lot more messages more cleanly than TMail. Mail does run on Ruby 1.8.x... it’s just not as fun to code.
Finally, Mail has been designed with a very simple object oriented system that really opens up the email messages you are parsing, if you know what you are doing, you can fiddle with every last bit of your email directly.
Compatibility
Mail is tested by Travis (![Travis Build Status](secure.travis-ci.org/mikel/mail.png “Build Status”)) and works on the following platforms:
- jruby-<IP_ADDRESS> [ x86_64 ]
- rbx-head-d18 [ x86_64 ]
- ree-1.8.7-2011.03 [ i686 ]
- ruby-1.8.7-p357 [ i686 ]
- ruby-1.9.2-p290 [ x86_64 ]
- ruby-1.9.3-p0 [ x86_64 ]
Discussion
If you want to discuss mail with like minded individuals, please subscribe to the [Google Group](groups.google.com/group/mail-ruby).
Current Capabilities of Mail
- RFC2822 Support, Reading and Writing
- RFC2045-2049 Support for multipart emails
- Support for creating multipart alternate emails
- Support for reading multipart/report emails & getting details from such
- Support for multibyte emails - needs quite a lot of work and testing
- Wrappers for File, Net/POP3, Net/SMTP
- Auto encoding of non US-ASCII header fields
- Auto encoding of non US-ASCII bodies
Mail is RFC2822 compliant now, that is, it can parse and generate valid US-ASCII emails. There are a few obsoleted syntax emails that it will have problems with, but it also is quite robust, meaning, if it finds something it doesn’t understand it will not crash, instead, it will skip the problem and keep parsing. In the case of a header it doesn’t understand, it will initialise the header as an optional unstructured field and continue parsing.
This means Mail won’t (ever) crunch your data (I think).
You can also create MIME emails. There are helper methods for making a multipart/alternate email for text/plain and text/html (the most common pair) and you can manually create any other type of MIME email.
Roadmap
Next TODO:
- Improve MIME support for character sets in headers, currently works, mostly, needs refinement.
Testing Policy
Basically… we do BDD on Mail. No method gets written in Mail without a corresponding or covering spec. We expect as a minimum 100% coverage measured by RCov. While this is not perfect by any measure, it is pretty good. Additionally, all functional tests from TMail are to be passing before the gem gets released.
It also means you can be sure Mail will behave correctly.
API Policy
No API removals within a single point release. All removals to be depreciated with warnings for at least one MINOR point release before removal.
Also, all private or protected methods to be declared as such - though this is still I/P.
Installation
Installation is fairly simple, I host mail on rubygems, so you can just do:
# gem install mail
Encodings
If you didn’t know, handling encodings in Emails is not as straight forward as you would hope.
I have tried to simplify it some:
- All objects that can render into an email, have an `encoded` method. Encoded will return the object as a complete string ready to send in the mail system, that is, it will include the header field and value and CRLF at the end and wrapped as needed.
- All objects that can render into an email, have a :decoded method. Decoded will return the object’s “value” only as a string. This means it will not include the header fields (like ‘To:’ or ‘Subject:’).
- By default, calling to_s on a container object will call its encoded method, while to_s on a field object will call it’s decoded method. So calling to_s on a Mail object will return the mail, all encoded ready to send, while calling to_s on the From field or the body will return the decoded value of the object. The header object of Mail is considered a container. If you are in doubt, call encoded, or decoded explicitly, this is safer if you are not sure.
- Structured fields that have parameter values that can be encoded (e.g. Content-Type) will provide decoded parameter values when you call the parameter names as methods against the object.
- Structured fields that have parameter values that can be encoded (e.g. Content-Type) will provide encoded parameter values when you call the parameter names through the object.parameters['<parameter_name>'] method call.
Contributing
Please do! Contributing is easy in Mail. Please read the CONTRIBUTING.md document for more info
Usage
All major mail functions should be able to happen from the Mail module. So, you should be able to just require 'mail' to get started.
### Making an email
```ruby mail = Mail.new do
from<EMAIL_ADDRESS>to<EMAIL_ADDRESS>subject 'This is a test email' body File.read('body.txt')
end
mail.to_s #=> “From<EMAIL_ADDRESS>you@… ```
### Making an email, have it your way:
```ruby mail = Mail.new do
body File.read('body.txt')
end
mail[‘from’] =<EMAIL_ADDRESS>mail[:to] =<EMAIL_ADDRESS>mail.subject = ‘This is a test email’
mail.to_s #=> “From<EMAIL_ADDRESS>you@… ```
### Don’t Worry About Message IDs:
```ruby mail = Mail.new do
to<EMAIL_ADDRESS>body 'Some simple body'
end
mail.to_s =~ /Message-ID<EMAIL_ADDRESS>#=> 27 ```
Mail will automatically add a Message-ID field if it is missing and give it a unique, random Message-ID along the lines of:
<EMAIL_ADDRESS>### Or do worry about Message-IDs:
```ruby mail = Mail.new do
to<EMAIL_ADDRESS>message_id<EMAIL_ADDRESS>body 'Some simple body'
end
mail.to_s =~ /Message-ID:
Mail will take the message_id you assign to it trusting that you know what you are doing.
### Sending an email:
Mail defaults to sending via SMTP to local host port 25. If you have a sendmail or postfix daemon running on on this port, sending email is as easy as:
```ruby Mail.deliver do
from<EMAIL_ADDRESS>to<EMAIL_ADDRESS>subject 'Here is the image you wanted' body File.read('body.txt') add_file '/full/path/to/somefile.png'
end ```
or
```ruby mail = Mail.new do
from<EMAIL_ADDRESS>to<EMAIL_ADDRESS>subject 'Here is the image you wanted' body File.read('body.txt') add_file :filename => 'somefile.png', :content => File.read('/somefile.png')
end
mail.deliver! ```
Sending via sendmail can be done like so:
```ruby mail = Mail.new do
from<EMAIL_ADDRESS>to<EMAIL_ADDRESS>subject 'Here is the image you wanted' body File.read('body.txt') add_file :filename => 'somefile.png', :content => File.read('/somefile.png')
end
mail.delivery_method :sendmail
mail.deliver ```
Exim requires it’s own delivery manager, and can be used like so:
```ruby mail.delivery_method :exim, :location => “/usr/bin/exim“
mail.deliver ```
### Getting emails from a pop server:
You can configure Mail to receive email using retriever_method within Mail.defaults:
```ruby Mail.defaults do
retriever_method :pop3, :address => "pop.gmail.com", :port => 995, :user_name => '<username>', :password => '<password>', :enable_ssl => true
end ```
You can access incoming email in a number of ways.
The most recent email:
```ruby Mail.all #=> Returns an array of all emails Mail.first #=> Returns the first unread email Mail.last #=> Returns the first unread email ```
The first 10 emails sorted by date in ascending order:
```ruby emails = Mail.find(:what => :first, :count => 10, :order => :asc) emails.length #=> 10 ```
Or even all emails:
```ruby emails = Mail.all emails.length #=> LOTS! ```
### Reading an Email
```ruby mail = Mail.read(‘/path/to/message.eml’)
mail.envelope.from #=><EMAIL_ADDRESS>mail.from.addresses #=><EMAIL_ADDRESS><EMAIL_ADDRESS>mail.sender.address #=><EMAIL_ADDRESS>mail.to #=><EMAIL_ADDRESS>mail.cc #=><EMAIL_ADDRESS>mail.subject #=> “This is the subject” mail.date.to_s #=> ‘21 Nov 1997 09:55:06 -0600’ mail.message_id #=><EMAIL_ADDRESS>mail.body.decoded #=> ‘This is the body of the email... ```
Many more methods available.
### Reading a Multipart Email
```ruby mail = Mail.read(‘multipart_email’)
mail.multipart? #=> true mail.parts.length #=> 2 mail.preamble #=> “Text before the first part” mail.epilogue #=> “Text after the last part” mail.parts.map { |p| p.content_type } #=> [‘text/plain’, ‘application/pdf’] mail.parts.map { |p| p.class } #=> [Mail::Message, Mail::Message] mail.parts[0].content_type_parameters #=> {‘charset’ => ‘ISO-8859-1’} mail.parts[1].content_type_parameters #=> {‘name’ => ‘my.pdf’} ```
Mail generates a tree of parts. Each message has many or no parts. Each part is another message which can have many or no parts.
A message will only have parts if it is a multipart/mixed or related/mixed content type and has a boundary defined.
### Testing and extracting attachments ```ruby mail.attachments.each do | attachment |
# Attachments is an AttachmentsList object containing a # number of Part objects if (attachment.content_type.start_with?('image/')) # extracting images for example... filename = attachment.filename begin File.open(images_dir + filename, "w+b", 0644) {|f| f.write attachment.body.decoded} rescue Exception => e puts "Unable to save data for #{filename} because #{e.message}" end end
end ``` ### Writing and sending a multipart/alternative (html and text) email
Mail makes some basic assumptions and makes doing the common thing as simple as possible.... (asking a lot from a mail library)
```ruby mail = Mail.deliver do
to<EMAIL_ADDRESS>from 'Mikel Lindsaar<EMAIL_ADDRESS>subject 'First multipart email sent with Mail' text_part do body 'This is plain text' end html_part do content_type 'text/html; charset=UTF-8' body '
This is HTML
' end
end ```
Mail then delivers the email at the end of the block and returns the resulting Mail::Message object, which you can then inspect if you so desire...
``` puts mail.to_s #=>
To<EMAIL_ADDRESS>From: Mikel Lindsaar
boundary=--==_mimepart_4a914f0c911be_6f0f1ab8026659
Message-ID<EMAIL_ADDRESS>Date: Mon, 24 Aug 2009 00:15:46 +1000 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit
—-==_mimepart_4a914f0c911be_6f0f1ab8026659 Content-ID<EMAIL_ADDRESS>Date: Mon, 24 Aug 2009 00:15:46 +1000 Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit
This is plain text —-==_mimepart_4a914f0c911be_6f0f1ab8026659 Content-Type: text/html; charset=UTF-8 Content-ID<EMAIL_ADDRESS>Date: Mon, 24 Aug 2009 00:15:46 +1000 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit
This is HTML
—-==_mimepart_4a914f0c911be_6f0f1ab8026659— ```Mail inserts the content transfer encoding, the mime version, the content-id’s and handles the content-type and boundary.
Mail assumes that if your text in the body is only us-ascii, that your transfer encoding is 7bit and it is text/plain. You can override this by explicitly declaring it.
### Making Multipart/Alternate, without a block
You don’t have to use a block with the text and html part included, you can just do it declaratively. However, you need to add Mail::Parts to an email, not Mail::Messages.
```ruby mail = Mail.new do
to<EMAIL_ADDRESS>from 'Mikel Lindsaar<EMAIL_ADDRESS>subject 'First multipart email sent with Mail'
end
text_part = Mail::Part.new do
body 'This is plain text'
end
html_part = Mail::Part.new do
content_type 'text/html; charset=UTF-8' body '
This is HTML
'
end
mail.text_part = text_part mail.html_part = html_part ```
Results in the same email as done using the block form
### Getting error reports from an email:
```ruby @mail = Mail.read(‘/path/to/bounce_message.eml’)
@mail.bounced? #=> true @mail.final_recipient #=><EMAIL_ADDRESS>@mail.action #=> failed @mail.error_status #=> 5.5.0 @mail.diagnostic_code #=> smtp;550 Requested action not taken: mailbox unavailable @mail.retryable? #=> false ```
### Attaching and Detaching Files
You can just read the file off an absolute path, Mail will try to guess the mime_type and will encode the file in Base64 for you.
```ruby @mail = Mail.new @mail.add_file(“/path/to/file.jpg“) @mail.parts.first.attachment? #=> true @mail.parts.first.content_transfer_encoding.to_s #=> ‘base64’ @mail.attachments.first.mime_type #=> ‘image/jpg’ @mail.attachments.first.filename #=> ‘file.jpg’ @mail.attachments.first.decoded == File.read(‘/path/to/file.jpg’) #=> true ```
Or You can pass in file_data and give it a filename, again, mail will try and guess the mime_type for you.
```ruby @mail = Mail.new @mail.attachments = File.read(‘path/to/myfile.pdf’) @mail.parts.first.attachment? #=> true @mail.attachments.first.mime_type #=> ‘application/pdf’ @mail.attachments.first.decoded == File.read(‘path/to/myfile.pdf’) #=> true ```
You can also override the guessed MIME media type if you really know better than mail (this should be rarely needed)
```ruby @mail = Mail.new file_data = File.read(‘path/to/myfile.pdf’) @mail.attachments = { :mime_type => ‘application/x-pdf’,
:content => File.read('path/to/myfile.pdf') }
@mail.parts.first.mime_type #=> ‘application/x-pdf’ ```
Of course... Mail will round trip an attachment as well
```ruby @mail = Mail.new do
to<EMAIL_ADDRESS>from 'Mikel Lindsaar<EMAIL_ADDRESS>subject 'First multipart email sent with Mail' text_part do body 'Here is the attachment you wanted' end html_part do content_type 'text/html; charset=UTF-8' body '
Funky Title

Here is the attachment you wanted
' end add_file '/path/to/myfile.pdf'
end
@round_tripped_mail =<EMAIL_ADDRESS>@round_tripped_mail.attachments.length #=> 1 @round_tripped_mail.attachments.first.filename #=> ‘myfile.pdf’ ``` See “Testing and extracting attachments” above for more details.
Using Mail with Testing or Spec’ing Libraries
If mail is part of your system, you’ll need a way to test it without actually sending emails, the TestMailer can do this for you.
``` require ‘mail’
> true
Mail.defaults do
delivery_method :test
end
> #
> []
Mail.deliver do
to<EMAIL_ADDRESS>from<EMAIL_ADDRESS>subject 'testing' body 'hello'
end
> #
Mail::TestMailer.deliveries.length
> 1
Mail::TestMailer.deliveries.first
> #
Mail::TestMailer.deliveries.clear
> []
```
There is also a set of RSpec matchers stolen fr^H^H^H^H^H^H^H^H inspired by
Shoulda’s ActionMailer matchers (you’ll want to set
delivery_method as above too):
``` Mail.defaults do
delivery_method :test # in practice you'd do this in spec_helper.rb
end
describe “sending an email” do
include Mail::Matchers
before(:each) do
Mail::TestMailer.deliveries.clear
Mail.deliver do
to<EMAIL_ADDRESS><EMAIL_ADDRESS>from<EMAIL_ADDRESS>subject 'testing'
body 'hello'
end
end
it { should have_sent_email } # passes if any email at all was sent
it { should<EMAIL_ADDRESS>}
it { should<EMAIL_ADDRESS>}
# can specify a list of recipients...
it { should<EMAIL_ADDRESS><EMAIL_ADDRESS>}
# ...or chain recipients together
it { should have_sent_email.to('mike1<EMAIL_ADDRESS>}
it { should have_sent_email.with_subject('testing') }
it { should have_sent_email.with_body('hello') }
# Can match subject or body with a regex
# (or anything that responds_to? :match)
it { should have_sent_email.matching_subject(/test(ing)?/) }
it { should have_sent_email.matching_body(/h(a|e)llo/) }
# Can chain together modifiers
# Note that apart from recipients, repeating a modifier overwrites old value.
it { should have_sent_email.from('you@you.com').to('mike1@me.com').matching_body(/hell/)
end ```
Excerpts from TREC Spam Corpus 2005
The spec fixture files in spec/fixtures/emails/from_trec_2005 are from the
2005 TREC Public Spam Corpus. They remain copyrighted under the terms of
that project and license agreement. They are used in this project to verify
and describe the development of this email parser implementation.
plg.uwaterloo.ca/~gvcormac/treccorpus/
They are used as allowed by ‘Permitted Uses, Clause 3’:
"Small excerpts of the information may be displayed to others
or published in a scientific or technical context, solely for
the purpose of describing the research and development and
related issues."
-- http://plg.uwaterloo.ca/~gvcormac/treccorpus/
License
(The MIT License)
Copyright © 2009, 2010, 2011, 2012
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
‘Software’), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
 IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
Mail::TestMailer.deliveries.length
> 1
Mail::TestMailer.deliveries.first
> #
Mail::TestMailer.deliveries.clear
> []
```
There is also a set of RSpec matchers stolen fr^H^H^H^H^H^H^H^H inspired by
Shoulda’s ActionMailer matchers (you’ll want to set
delivery_method as above too):
``` Mail.defaults do
delivery_method :test # in practice you'd do this in spec_helper.rb
end
describe “sending an email” do
include Mail::Matchers
before(:each) do
Mail::TestMailer.deliveries.clear
Mail.deliver do
to<EMAIL_ADDRESS><EMAIL_ADDRESS>from<EMAIL_ADDRESS>subject 'testing'
body 'hello'
end
end
it { should have_sent_email } # passes if any email at all was sent
it { should<EMAIL_ADDRESS>}
it { should<EMAIL_ADDRESS>}
# can specify a list of recipients...
it { should<EMAIL_ADDRESS><EMAIL_ADDRESS>}
# ...or chain recipients together
it { should have_sent_email.to('mike1<EMAIL_ADDRESS>}
it { should have_sent_email.with_subject('testing') }
it { should have_sent_email.with_body('hello') }
# Can match subject or body with a regex
# (or anything that responds_to? :match)
it { should have_sent_email.matching_subject(/test(ing)?/) }
it { should have_sent_email.matching_body(/h(a|e)llo/) }
# Can chain together modifiers
# Note that apart from recipients, repeating a modifier overwrites old value.
it { should have_sent_email.from('you@you.com').to('mike1@me.com').matching_body(/hell/)
end ```
Excerpts from TREC Spam Corpus 2005
The spec fixture files in spec/fixtures/emails/from_trec_2005 are from the
2005 TREC Public Spam Corpus. They remain copyrighted under the terms of
that project and license agreement. They are used in this project to verify
and describe the development of this email parser implementation.
plg.uwaterloo.ca/~gvcormac/treccorpus/
They are used as allowed by ‘Permitted Uses, Clause 3’:
"Small excerpts of the information may be displayed to others
or published in a scientific or technical context, solely for
the purpose of describing the research and development and
related issues."
-- http://plg.uwaterloo.ca/~gvcormac/treccorpus/
License
(The MIT License)
Copyright © 2009, 2010, 2011, 2012
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
‘Software’), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the
following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
 IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
USE OR OTHER DEALINGS IN THE SOFTWARE.
Mail::TestMailer.deliveries.clear
> []
```
There is also a set of RSpec matchers stolen fr^H^H^H^H^H^H^H^H inspired by Shoulda’s ActionMailer matchers (you’ll want to set delivery_method as above too):
``` Mail.defaults do
delivery_method :test # in practice you'd do this in spec_helper.rb
end
describe “sending an email” do
include Mail::Matchers before(:each) do Mail::TestMailer.deliveries.clear Mail.deliver do to<EMAIL_ADDRESS><EMAIL_ADDRESS>from<EMAIL_ADDRESS>subject 'testing' body 'hello' end end it { should have_sent_email } # passes if any email at all was sent it { should<EMAIL_ADDRESS>} it { should<EMAIL_ADDRESS>} # can specify a list of recipients... it { should<EMAIL_ADDRESS><EMAIL_ADDRESS>} # ...or chain recipients together it { should have_sent_email.to('mike1<EMAIL_ADDRESS>} it { should have_sent_email.with_subject('testing') } it { should have_sent_email.with_body('hello') } # Can match subject or body with a regex # (or anything that responds_to? :match) it { should have_sent_email.matching_subject(/test(ing)?/) } it { should have_sent_email.matching_body(/h(a|e)llo/) } # Can chain together modifiers # Note that apart from recipients, repeating a modifier overwrites old value. it { should have_sent_email.from('you@you.com').to('mike1@me.com').matching_body(/hell/)
end ```
Excerpts from TREC Spam Corpus 2005
The spec fixture files in spec/fixtures/emails/from_trec_2005 are from the 2005 TREC Public Spam Corpus. They remain copyrighted under the terms of that project and license agreement. They are used in this project to verify and describe the development of this email parser implementation.
plg.uwaterloo.ca/~gvcormac/treccorpus/
They are used as allowed by ‘Permitted Uses, Clause 3’:
"Small excerpts of the information may be displayed to others or published in a scientific or technical context, solely for the purpose of describing the research and development and related issues." -- http://plg.uwaterloo.ca/~gvcormac/treccorpus/
License
(The MIT License)
Copyright © 2009, 2010, 2011, 2012
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


2 Data Generation
2.1 Overview
The Commons Math o.a.c.m.random
package includes utilities for
- generating random numbers
- generating random vectors
- generating random strings
- generating cryptographically secure sequences of random numbers or
strings
- generating random samples and permutations
- analyzing distributions of values in an input file and generating
values "like" the values in the file
- generating data for grouped frequency distributions or
histograms
These utilities rely on an underlying "source of randomness", which in most
cases is a pseudo-random number generator (PRNG) that produces sequences
of numbers that are uniformly distributed within their range.
Commons Math depends on Commons Rng
for the PRNG implementations.
A PRNG algorithm is often deterministic, i.e. it produces the same sequence
when initialized with the same "seed".
This property is important for some applications like Monte-Carlo simulations,
but makes such a PRNG often unsuitable for cryptographic purposes.
2.2 Random Deviates
- Random sequence of numbers from a probability distribution
-
There is no such thing as a single "random number." What can be
generated are sequences of numbers that appear to be random. When
using the built-in JDK function Math.random(), sequences of
values generated follow the
Uniform Distribution, which means that the values are evenly spread
over the interval between 0 and 1, with no sub-interval having a greater
probability of containing generated values than any other interval of the
same length. The mathematical concept of a
probability distribution basically amounts to asserting that different
ranges in the set of possible values of a random variable have
different probabilities of containing the value. Commons Math supports
generating random sequences from each of the distributions defined in the
o.a.c.m.distribution package.
Please refer to the specific documentation
for more details.
- Cryptographically secure random sequences
-
It is possible for a sequence of numbers to appear random, but
nonetheless to be predictable based on the algorithm used to generate the
sequence.
When in addition to randomness, strong unpredictability is
required, a
secure random number generator
should be used to generate values (or strings), for example an instance of
the JDK-provided SecureRandom generator.
In general, such secure generator produce sequence based on a source of
true randomness, and sequences started with the same seed will diverge.
The RandomUtils
class provides a method for wrapping a java.util.Random or
java.security.SecureRandom instance in an object that implements
the
UniformRandomProvider interface:
UniformRandomProvider rg = RandomUtils.asUniformRandomProvider(new java.security.SecureRandom());
2.3 Random Vectors
Some algorithms require random vectors instead of random scalars. When the
components of these vectors are uncorrelated, they may be generated simply
one at a time and packed together in the vector. The
UncorrelatedRandomVectorGenerator class simplifies this
process by setting the mean and deviation of each component once and
generating complete vectors. When the components are correlated however,
generating them is much more difficult. The
CorrelatedRandomVectorGenerator class provides this service. In this
case, the user must set up a complete covariance matrix instead of a simple
standard deviations vector. This matrix gathers both the variance and the
correlation information of the probability law.
The main use for correlated random vector generation is for Monte-Carlo
simulation of physical problems with several variables, for example to
generate error vectors to be added to a nominal vector. A particularly
common case is when the generated vector should be drawn from a
Multivariate Normal Distribution.
- Generating random vectors from a bivariate normal distribution
-
// Import common PRNG interface and factory class that instantiates the PRNG.
import org.apache.commons.rng.UniformRandomProvider;
import org.apache.commons.rng.RandomSource;
// Create (and possibly seed) a PRNG (could use any of the CM-provided generators).
long seed =<PHONE_NUMBER>2L; // Fixed seed means same results every time
UniformRandomProvider rg = RandomSource.create(RandomSource.MT, seed);
// Create a GaussianRandomGenerator using "rg" as its source of randomness.
GaussianRandomGenerator rawGenerator = new GaussianRandomGenerator(rg);
// Create a CorrelatedRandomVectorGenerator using "rawGenerator" for the components.
CorrelatedRandomVectorGenerator generator =
new CorrelatedRandomVectorGenerator(mean, covariance, 1.0e-12 * covariance.getNorm(), rawGenerator);
// Use the generator to generate correlated vectors.
double[] randomVector = generator.nextVector();
...
The mean argument is a double[] array holding the means
of the random vector components. In the bivariate case, it must have length 2.
The covariance argument is a RealMatrix, which has to
be 2 x 2.
The main diagonal elements are the variances of the vector components and the
off-diagonal elements are the covariances.
For example, if the means are 1 and 2 respectively, and the desired standard deviations
are 3 and 4, respectively, then we need to use
double[] mean = {1, 2};
double[][] cov = {{9, c}, {c, 16}};
RealMatrix covariance = MatrixUtils.createRealMatrix(cov);
where "c" is the desired covariance. If you are starting with a desired correlation,
you need to translate this to a covariance by multiplying it by the product of the
standard deviations. For example, if you want to generate data that will give Pearson's
R of 0.5, you would use c = 3 * 4 * 0.5 = 6.
In addition to multivariate normal distributions, correlated vectors from multivariate uniform
distributions can be generated by creating a
UniformRandomGenerator
in place of the
GaussianRandomGenerator above. More generally, any
NormalizedRandomGenerator
may be used.
- Low discrepancy sequences
-
There exist several quasi-random sequences with the property that for all values of N, the subsequence
x1, ..., xN has low discrepancy, which results in equi-distributed samples.
While their quasi-randomness makes them unsuitable for most applications (i.e. the sequence of values
is completely deterministic), their unique properties give them an important advantage for quasi-Monte Carlo simulations.
Currently, the following low-discrepancy sequences are supported:
// Create a Sobol sequence generator for 2-dimensional vectors
RandomVectorGenerator generator = new SobolSequence(2);
// Use the generator to generate vectors
double[] randomVector = generator.nextVector();
...
The figure below illustrates the unique properties of low-discrepancy sequences when
generating N samples in the interval [0, 1]. Roughly speaking, such sequences "fill"
the respective space more evenly which leads to faster convergence in quasi-Monte Carlo
simulations.
2.4 Random Strings
The method nextHexString in
RandomUtils.DataGenerator can be used to generate random strings of
hexadecimal characters.
It produces sequences of strings with good dispersion properties.
A string can be generated in two different ways, depending on the value
of the boolean argument passed to the method (see the Javadoc for more
details).
2.5 Random Permutations, Combinations, Sampling
To select a random sample of objects in a collection, you can use the
nextSample method provided by in
RandomUtils.DataGenerator.
Specifically, if c is a java.util.Collection<T>
containing at least k objects, and randomData is a
RandomUtils.DataGenerator instance randomData.nextSample(c, k)
will return an List<T> instance of size k
consisting of elements randomly selected from the collection.
If c contains duplicate references, there may be duplicate
references in the returned array; otherwise returned elements will be
unique (i.e. the sampling is without replacement among the object
references in the collection).
If n and k are integers with k < n, then
randomData.nextPermutation(n, k) returns an int[]
array of length k whose whose entries are selected randomly,
without repetition, from the integers 0 through
n-1 (inclusive).
2.6 Generating data like an input file
Using the EmpiricalDistribution class, you can generate data based on
the values in an input file:
int binCount = 500;
EmpiricalDistribution empDist = new EmpiricalDistribution(binCount);
empDist.load("data.txt");
RealDistribution.Sampler sampler = empDist.createSampler(RandomSource.create(RandomSource.MT));
double value = sampler.nextDouble();
The entire input file is read and a probability density function is estimated
based on data from the file.
The estimation method is essentially the
Variable Kernel Method with Gaussian smoothing.
The created sampler will return random values whose probability distribution
matches the empirical distribution (i.e. if you generate a large number of
such values, their distribution should "look like" the distribution of the
values in the input file.
The values are not stored in memory in this case either, so there is no limit to the
size of the input file.
|


This package was debianized by Colin Walters on
Thu, 6 Mar 2003 18:01:37 -0500
It was downloaded from:
Files: *
Copyright: © 2003-2006 Red Hat Inc.
© 2003 David Zeuthen
© 2004 Rob Taylor
© 2004 Anders Carlsson
© 2005 Colin Walters
© 2005-2007 Collabora Ltd.
License: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.


Pros love iMac. So we created one just for you. It’s packed with the most powerful graphics and processors ever in a Mac, along with the most advanced storage, memory, and I/O — all behind a breathtaking Retina 5K display in a sleek, all-in-one design. For everyone from photographers to video editors to 3D animators to musicians to software developers to scientists, iMac Pro is ready to turn your biggest ideas into your greatest work.
Last updated 3 mins ago
With eighth-generation Intel Core processors, MacBook Pro reaches new heights in compute performance. The 15‑inch model now features a 6‑core Intel Core i9 processor that works up to 70 percent faster than the previous generation, enabling up to 4.8GHz Turbo Boost speeds. And a quad‑core processor on the 13‑inch MacBook Pro with Touch Bar now makes it up to twice as fast as the previous generation. So when you’re powering through pro‑level processing jobs like compiling code, rendering 3D models, adding special effects, layering multiple tracks, or encoding video, you’ll get everything done. Faster.
Last updated 3 mins ago
Now equipped with seventh-generation Intel Core processors, MacBook is snappier than ever. From daily tasks like launching apps and opening files to more advanced computing, you can power through your day thanks to faster SSDs and Turbo Boost processing up to 3.6GHz.
Last updated 3 mins ago
The new 10.5-inch iPad Pro comes with a screen nearly 20 percent larger than the 9.7-inch model, so you get more room to do more. It also delivers a full-size onscreen keyboard, yet it’s just as portable as ever.
Last updated 3 mins ago
Enlight Videoleap A smart video editor. A10 Fusion chip. Engineered for performance. 64-bit architecture. Four-core design. Over 3.3 billion transistors. Translation: iPad is incredibly fast. Which comes in handy when you want to edit a 4K video, play graphics-intensive games, or experience the latest augmented reality apps.
Last updated 3 mins ago
There’s more to mini than meets the eye. iPad mini 4 puts uncompromising performance and potential in your hand. It’s thinner and lighter than ever before, yet powerful enough to help you take your ideas even further.
Last updated 3 mins ago


(.%) the and patients with were was treatment psychiatric (.–.) for group {background The HCV study (%) (range) margin median {border-style hepatitis not px;} #ffffff;} (.% DAAs among = .). reported subjects two who []. before therapy Patients disorders higher SVR- according due had have more our vs. (–) .%, AEs comorbidity observed one this antiviral chronic clinical drug during from these ART SVR adverse all are based which (N = ) Group between data follow-up least lower that treated use virus < . . ± . HCV-infected RBV Table after anti-HCV baseline drugs genotype patient patients, patients. population px; recent score symptoms {font-family HCV-RNA SOF also anxiety change compared events failure font-size including lost number only plus previous psychotic rate risk therapeutic (/, Among DAA DAA-based DAA-treatment Severe and/or antipsychotic available been characteristics differences direct-acting double; evaluated frequently included mean mostly neuropsychiatric other safety severe such (.%), (SD) (group Commons Creative DDIs HCV-infection HCV-monoinfected HIV However, IDU MSM Psychiatric This achieved associated border-color border-width can depression did dose even experienced liver mg/dL, p-value prescribed profile proportion rates regarding regimens response solid; starting studies than their those total treatment. virological whom {font-style {font-weight (.%). = .), Adverse All EOT European FIB- HCV/HIV-coinfected Liver Moreover, achieving antidepressant antipsychotics bold changes considering courier; course defined disorder drug-drug em; first groups groups. has high individuals infected infection infection, interactions into intravenous leading main major majority most occurred performed population, presented prevalence probably pt;} received regimen remaining research should some sustained using visit well while


Next: prog, Previous: multiple-values-limit, Up: Data and Control Flow Dictionary
nth-value
n form ⇒ object
n—a non-negative integer; evaluated.
form—a form; evaluated as described below.
object—an object.
Evaluates n and then form, returning as its only value the nth value yielded by form, or nil if n is greater than or equal to the number of values returned by form. (The first returned value is numbered 0.)
(nth-value 0 (values 'a 'b)) ⇒ A (nth-value 1 (values 'a 'b)) ⇒ B (nth-value 2 (values 'a 'b)) ⇒ NIL (let* ((x<PHONE_NUMBER>7238947423879243432432432) (y<PHONE_NUMBER>2) (a (nth-value 1 (floor x y))) (b (mod x y))) (values a b (= a b))) ⇒<PHONE_NUMBER>,<PHONE_NUMBER>, true
Operationally, the following relationship is true, although nth-value might be more efficient in some implementations because, for example, some consing might be avoided.
(nth-value n form) ≡ (nth n (multiple-value-list form))


Home
Error.
Create/Edit Location Type
Create/Edit Location
Create/Edit Organization Type
Create/Edit Organization


- RandomPlayer - Class in com.riskgame.strategy.impl
-
Concrete implementation of Strategy interface of design pattern for Random
strategy of player
- RandomPlayer() - Constructor for class com.riskgame.strategy.impl.RandomPlayer
-
Constructor which will initialize object of services
- readMap(String) - Method in class com.riskgame.adapter.DominationToConquestAdapter
-
This method will read file and store data in riskMap Model into particular
field
- readMap(String) - Method in interface com.riskgame.service.ConquestMapInterface
-
This method will read file and store data in riskMap Model into particular
field
- readMap(String) - Method in class com.riskgame.service.Impl.ConquestMapImpl
-
This method will read file and store data in riskMap Model into particular
field
- readMap(String) - Method in class com.riskgame.service.Impl.MapManagementImpl
-
This method will read file and store data in riskMap Model into particular
field
- readMap(String) - Method in interface com.riskgame.service.MapManagementInterface
-
This method will read file and store data in riskMap Model into particular
field
- reinforce(GamePlayPhase) - Method in class com.riskgame.strategy.impl.AggresivePlayer
-
This method will be implemented for different strategy for reinforcement as
well as card exchange.
- reinforce(GamePlayPhase) - Method in class com.riskgame.strategy.impl.BenevolentPlayer
-
This method will be implemented for different strategy for reinforcement as
well as card exchange.
- reinforce(GamePlayPhase) - Method in class com.riskgame.strategy.impl.CheaterPlayer
-
This method will be implemented for different strategy for reinforcement as
well as card exchange.
- reinforce(GamePlayPhase) - Method in class com.riskgame.strategy.impl.HumanPlayer
-
This method will be implemented for different strategy for reinforcement as
well as card exchange.
- reinforce(GamePlayPhase) - Method in class com.riskgame.strategy.impl.RandomPlayer
-
This method will be implemented for different strategy for reinforcement as
well as card exchange.
- reinforce(GamePlayPhase) - Method in interface com.riskgame.strategy.StrategyInterface
-
This method will be implemented for different strategy for reinforcement as
well as card exchange.
- reinforcemrentUpdate() - Method in class com.riskgame.controller.RiskPlayScreenController
-
this method update card changes
- reinforcemrentUpdate() - Method in class com.riskgame.observerpattern.Observer
-
this method update card changes
- resourceBundle() - Method in class com.riskgame.config.AppJavaConfig
-
It'll take data from bundle properties
- RiskCard - Class in com.riskgame.model
-
Model for Risk Cards
Two annotations (Getter, Setter) you can see on the top of the class are
lombok dependencies to automatically generate getter, setter in the code.
- RiskCard() - Constructor for class com.riskgame.model.RiskCard
-
- RiskCardExchange - Class in com.riskgame.model
-
Model for card Exchange
Two annotations (Getter, Setter) you can see on the top of the class are
lombok dependencies to automatically generate getter, setter in the code.
- RiskCardExchange() - Constructor for class com.riskgame.model.RiskCardExchange
-
- RiskgameApplication - Class in com.riskgame
-
This is the main entry point for RiskgameApplication and it extends
Application (Which is JavaFx class), as we want it to load through JavaFx.
- RiskgameApplication() - Constructor for class com.riskgame.RiskgameApplication
-
- RiskgameApplicationTests - Class in com.riskgame
-
This is the main suite class for textcases.
- RiskgameApplicationTests() - Constructor for class com.riskgame.RiskgameApplicationTests
-
- RiskMap - Class in com.riskgame.model
-
RiskMap class is the main model for map management.
- RiskMap() - Constructor for class com.riskgame.model.RiskMap
-
- riskMap - Static variable in class com.riskgame.service.impl.ConquestMapImplTest
-
- riskMap - Static variable in class com.riskgame.service.impl.MapManagementImplTest
-
- riskMap - Static variable in class com.riskgame.service.impl.PlayerHandlerImplTest
-
- riskPlayImpl - Variable in class com.riskgame.controller.RiskPlayScreenController
-
- RiskPlayImpl - Class in com.riskgame.service.Impl
-
This is a implementation class of RiskPlayInterface where all buisness logic
of game playing screen is writeen.
- RiskPlayImpl() - Constructor for class com.riskgame.service.Impl.RiskPlayImpl
-
- RiskPlayImplTest - Class in com.riskgame.service.impl
-
This Test class will check all RiskplayImpl methods, which is business logic
related to game play.
- RiskPlayImplTest() - Constructor for class com.riskgame.service.impl.RiskPlayImplTest
-
- RiskPlayInterface - Interface in com.riskgame.service
-
This is a interface of RiskPlayGame business logic.
- RiskPlayScreenController - Class in com.riskgame.controller
-
This a game playing screen controller, where things like Reinforcement,
attack and fortification managed and player can play the game through command
line also.
- RiskPlayScreenController() - Constructor for class com.riskgame.controller.RiskPlayScreenController
-


GetNoti
Home
About
Services
Contact
Login/signup
Admin Login
User/clients
Intern Login
Trainee Login
client login
Contact
We keep you updated!


“I strive for two things in design: simplicity and clarity. Great design is born of those two things.”
And I spend a large amount of my free time exploring the latest technology advancements in the UI graphic guidelines and the front-end web development


Customer Details
First Name
Last Name
Male
Female
Other
Preferred contact method:
Email
Phone
Email
Phone
Town
Varna
Plovdiv
Burgas
Sofia
Pleven
Age
Programming language:
I agree the Terms and Conditions
Send


we have the best cameras,watches and shirts for you.No need to hunt around,we have all in one place.
Price:Rs.36000.00
ADD TO CART
Price:Rs.40000.00
Price:Rs.50000.00
Price:Rs.80000.00
Price:Rs.13000.00
Price:Rs.3000.00
Price:Rs.8000.00
Price:Rs.18000.00
Price:Rs.800.00
Price:Rs.1000.00
Price:Rs.1500.00
Price:Rs.1300.00


<EMAIL_ADDRESS>Rating System: Bomb * Fair ** Good *** Very Good **** Excelent
It seems that the trend in Hollywood nowadays is to remake (or as they call it "update") old films and television shows. Just last month we had the movie version of LOST IN SPACE. Later this summer we will see ZORRO, don his mask once again, and the British secret agents, John Steed and Emma Peel, try to save the world in the big screen treatment of the AVENGERS.   Now after months of hype that only a 50 million-dollar advertising budget can buy, and a "let's not dare show the monster until the movie opens" campaign, the men behind STARGATE and INDEPENDENCE DAY, bring us the latest in this trend. GODZILLA, stomps its way into more than 7000 theaters starting this week with a new look and a new attitude. The giant, radioactive, reptile with atomic bad breath, was first brought to the screen in 1954, in Toho Studios' GOJIRA. Then scenes with Raymond Burr playing a reporter were inserted, the film was re-cut and released in the U.S. as, GODZILLA, KING OF THE MONSTERS, in 1956. A legend was born. What followed was a series of fun, campy, and sometimes out right silly, B movies featuring the creature battling everything from Smog Monsters to Godzilla robots controlled by aliens.
But be warned! This is not your father's or grandfather's Godzilla.
Director Roland Emmerich, producer Dean Devlin, and the man responsible for Zilla's new look, Patrick Tatopoulos, have brought Godzilla into the ‘90s with a complete make-over. He is now streamlined, buff, and looks entirely different. The 1990's version of Godzilla has him, as suggested in the movie, a mutated, lizard-like creature, not a resurrected dinosaur. Gone is the stiff, plodding monster with the "I'll take on anybody or anything" attitude. Now we have a Zilla that is fast, agile, smart, and knows when to fight and when to haul tail. Upon viewing, it is clear that the film's budget, of 100 million dollars plus, was spent on its special effects, and they are nothing less than spectacular. No man in a rubber suit, cardboard buildings or toy tanks, here. This Godzilla doesn't just march along stepping on buildings. He RUNS through the streets, crashing into them, or just goes straight through them! Then his longer, slimmed down tail does the rest of the damage. One of the problems with this kind of expensive, special effects generated, title character, is that cost prevents you from having him on the screen for the whole movie (in this case, 140 minutes).You need interesting characters, and a halfway good script to fill up the rest of the time and hopefully add something to the story. Unfortunately, this is where GODZILLA loses some of its firepower. The story is not very plausible in places, the majority of the characters are less than compelling, the film lacks any real emotion, and it even stoops so low as to present two characters that are caricatures of movie critics Roger Ebert and Gene Siskel (who panned INDEPENDENCE DAY). Come on Roland and Dean (who wrote the screenplay), isn't that just a little bit petty? Matthew Broerick does a competent job as Nick Tatopoulos (the last name of Godzilla's designer, see above), a mild-mannered, nuclear biologist that is called upon to help figure out what has destroyed and left claw-marks in several ships in the waters near Polynesia, and has left a trail of HUGE footprints across Panama. After analyzing blood samples, Broerick immediately suspects that a new species of giant lizard may have been created as a result of atomic testing. But it is never really made clear why it is on its way to the Big Apple. Broderick is proven right when the new and improved Godzilla comes ashore in New York City at the Fulton Fish Market, in one of the most dramatic "giant monster rises from the depths" sequences since the giant squid attack on San Francisco in Ray Harryhausen's IT CAME FROM BENEATH THE SEA. Fittingly, a clip from this film is playing on a television in one of the latter scenes. The movie then goes back to its "giant monster running amok" roots, with the military trying to figure out how to destroy it, the political powers in charge worrying how a monster tearing up the city is going to affect their chances for re-election, and the scientist (Broderick) telling them they are all missing the big picture. Then Broderick's long, lost, college sweetheart, who left him to try and make it big as a reporter, is introduced as an "undiscovered" talent working at a local television station as a lowly researcher. Played by Maria Pitillo, Audrey Timmonds, is one of the most unappealing female leads to come along in a while. Throughout the film, you find yourself wishing Godzilla would stomp her or use her as an appetizer. But in Pitillo's defense, she wasn't given very much to work with. She unwittingly uses her connection with Broderick's character to gain access to inside information for the story that will hopefully make her a star. Hank Azaria (mainly used for comic relief and a plot device) plays the husband of one of Pitillo's friends. A television cameraman, nicknamed "Animal", Azaria also hopes that the lizard's arrival will make his career. The film's only good character is Philippe Roache. Posing as an insurance adjuster, Roache is a member of the French Secret Service. It is suggested that France's atomic testing created Godzilla, and he is there to "clean up the mess". Played brilliantly by Jean Reno, he is searching New York for Godzilla, and a good cup of coffee. Reno is one of the film's saving graces; the other being the special effects. It is discovered that Godzilla can reproduce asexually and has plans to use New York City as a nursery. Broderick then loses his credibility and his spot on the team when the information that Patillo has stolen from him is broadcast. His "nesting" theory is thrown out the window and all efforts are concentrated on killing Godzilla. Meanwhile, Reno "kidnaps" Broderick, and tells him that he believes there is a nest and convinces Broderick to help him and his men hunt it down. Foolishly, Patillo and Azaria follow them in an attempt to make amends. After the nest is found, the film mutates into an almost blatant rip-off of JURASSIC PARK's raptor sequences, with a little bit of GREMLINS 2 thrown in for good measure. Then it is as if saner heads prevailed and the movie gets back on track. Zilla appears and is PISSED OFF at the way our heroes have treated his offspring. They steal a cab and Godzilla gives chase in a final sequence that is exciting, yet somewhat unbelievable at times. The ending is clever in places, and cliched in others. After all the dust from all the destroyed buildings has settled, GODZILLA is a disappointment. You have no empathy for the characters, and there is nothing story- wise to chew on when the BIG GUY is not on the screen. Nearly all the jokes misfire and some characters are there for no apparent reason. Sadly, all the attention was paid to the FX. It is almost like the old B-grade, gore movies of the eighties, where poorly drawn characters were placed within a very weak story, all created just to highlight a new special effect. It is a shame that the Godzilla story was not "updated". But despite these flaws, the movie is fun and that is what a summer movie is suppose to be. The younger generation will revel in its roller coaster, high tech presentation of the monster and its rampages, while older fans, who look for just a little bit more, will shake their heads in slight disappointment. But they will enjoy seeing that even after 44 years, one of its icons is still alive and kicking.
Cast: Matthew Broderick, Jean Reno, Maria Pitillo, Hank Azaria, Kevin Dunn, Doug Savant, and Godzilla. Rated PG13: some intense scenes, but could have been rated PG. I give it *** , but the final star is given just on the strength of the special effects.
That was the view from the Middle Seat Center John Collins
.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Endogenous money is an economy’s supply of money that is determined endogenously—that is, as a result of the interactions of other economic variables, rather than exogenously (autonomously) by an external authority such as a central bank.
The theoretical basis of this pos...


| B02001_001E | Estimate!!Total | RACE | predicate-only | | 0 | int | B02001 |
| B02001_001EA | Annotation of Estimate!!Total | | predicate-only | | 0 | string | B02001 |
| B02001_001M | Margin of Error!!Total | RACE | predicate-only | | 0 | int | B02001 |
| B02001_001MA | Annotation of Margin of Error!!Total | | predicate-only | | 0 | string | B02001 |
| B02001_002E | Estimate!!Total!!White alone | RACE | predicate-only | | 0 | int | B02001 |
| B02001_002EA | Annotation of Estimate!!Total!!White alone | | predicate-only | | 0 | string | B02001 |
| B02001_002M | Margin of Error!!Total!!White alone | RACE | predicate-only | | 0 | int | B02001 |
| B02001_002MA | Annotation of Margin of Error!!Total!!White alone | | predicate-only | | 0 | string | B02001 |
| B02001_003E | Estimate!!Total!!Black or African American alone | RACE | predicate-only | | 0 | int | B02001 |
| B02001_003EA | Annotation of Estimate!!Total!!Black or African American alone | | predicate-only | | 0 | string | B02001 |
| B02001_003M | Margin of Error!!Total!!Black or African American alone | RACE | predicate-only | | 0 | int | B02001 |
| B02001_003MA | Annotation of Margin of Error!!Total!!Black or African American alone | | predicate-only | | 0 | string | B02001 |
| B02001_004E | Estimate!!Total!!American Indian and Alaska Native alone | RACE | predicate-only | | 0 | int | B02001 |
| B02001_004EA | Annotation of Estimate!!Total!!American Indian and Alaska Native alone | | predicate-only | | 0 | string | B02001 |
| B02001_004M | Margin of Error!!Total!!American Indian and Alaska Native alone | RACE | predicate-only | | 0 | int | B02001 |
| B02001_004MA | Annotation of Margin of Error!!Total!!American Indian and Alaska Native alone | | predicate-only | | 0 | string | B02001 |
| B02001_005E | Estimate!!Total!!Asian alone | RACE | predicate-only | | 0 | int | B02001 |
| B02001_005EA | Annotation of Estimate!!Total!!Asian alone | | predicate-only | | 0 | string | B02001 |
| B02001_005M | Margin of Error!!Total!!Asian alone | RACE | predicate-only | | 0 | int | B02001 |
| B02001_005MA | Annotation of Margin of Error!!Total!!Asian alone | | predicate-only | | 0 | string | B02001 |
| B02001_006E | Estimate!!Total!!Native Hawaiian and Other Pacific Islander alone | RACE | predicate-only | | 0 | int | B02001 |
| B02001_006EA | Annotation of Estimate!!Total!!Native Hawaiian and Other Pacific Islander alone | | predicate-only | | 0 | string | B02001 |
| B02001_006M | Margin of Error!!Total!!Native Hawaiian and Other Pacific Islander alone | RACE | predicate-only | | 0 | int | B02001 |
| B02001_006MA | Annotation of Margin of Error!!Total!!Native Hawaiian and Other Pacific Islander alone | | predicate-only | | 0 | string | B02001 |
| B02001_007E | Estimate!!Total!!Some other race alone | RACE | predicate-only | | 0 | int | B02001 |
| B02001_007EA | Annotation of Estimate!!Total!!Some other race alone | | predicate-only | | 0 | string | B02001 |
| B02001_007M | Margin of Error!!Total!!Some other race alone | RACE | predicate-only | | 0 | int | B02001 |
| B02001_007MA | Annotation of Margin of Error!!Total!!Some other race alone | | predicate-only | | 0 | string | B02001 |
| B02001_008E | Estimate!!Total!!Two or more races | RACE | predicate-only | | 0 | int | B02001 |
| B02001_008EA | Annotation of Estimate!!Total!!Two or more races | | predicate-only | | 0 | string | B02001 |
| B02001_008M | Margin of Error!!Total!!Two or more races | RACE | predicate-only | | 0 | int | B02001 |
| B02001_008MA | Annotation of Margin of Error!!Total!!Two or more races | | predicate-only | | 0 | string | B02001 |
| B02001_009E | Estimate!!Total!!Two or more races!!Two races including Some other race | RACE | predicate-only | | 0 | int | B02001 |
| B02001_009EA | Annotation of Estimate!!Total!!Two or more races!!Two races including Some other race | | predicate-only | | 0 | string | B02001 |
| B02001_009M | Margin of Error!!Total!!Two or more races!!Two races including Some other race | RACE | predicate-only | | 0 | int | B02001 |
| B02001_009MA | Annotation of Margin of Error!!Total!!Two or more races!!Two races including Some other race | | predicate-only | | 0 | string | B02001 |
| B02001_010E | Estimate!!Total!!Two or more races!!Two races excluding Some other race, and three or more races | RACE | predicate-only | | 0 | int | B02001 |
| B02001_010EA | Annotation of Estimate!!Total!!Two or more races!!Two races excluding Some other race, and three or more races | | predicate-only | | 0 | string | B02001 |
| B02001_010M | Margin of Error!!Total!!Two or more races!!Two races excluding Some other race, and three or more races | RACE | predicate-only | | 0 | int | B02001 |
| B02001_010MA | Annotation of Margin of Error!!Total!!Two or more races!!Two races excluding Some other race, and three or more races | | predicate-only | | 0 | string | B02001 |


| Name: | {{ device.name }} |
| Serial #: | {{ device.serial_number }} |
| Model: | {{ device.model }} |
| OS: | {{ device.os_version }} |
| Asset #: | {{ device.asset_tag }} |
| User: | {{ device.real_name }} |
| Location: | {{ device.building }} |
| IP Address: | {{ device.ip_address}} |
| MAC Address: | {{ device.mac_address }} |
| Warranty Exp: | {{ device.warranty_expires_utc }} |


Flare can use several different technologies for calculating the indoor location of devices. Beacons are the fastest and cheapest way to get started.
Beacons are tiny devices that transmit a signal over Bluetooth at regular intervals. A device can measure the signal strength of three or more beacons at known locations to determine its own location. The device can then send its location to the Flare server, which can then push the location to other things.
The Flare sample code for iOS uses Apple's iBeacon standard, while the sample code for Android uses Radius Networks' AltBeacon standard. We recommend beacons from Radius Networks that are compatible with both standards.
Environments have a coordinate space that extends across the entire plane of a single location, such as one floor of a building. Environments can be divided into zones, corresponding to rooms or sections of an open space.
Each zone should have beacons distributed as evenly as possible along a grid, starting with the far corners. For example, if you have four beacons you could place them in the corners only. If you have eight beacons, you could also put a beacon in the middle of each edge. If you have sixteen beacons, you could make a 4 x 4 pattern, etc.
Note that all beacons in an environment can be used to determine the user's position and which zone they are currently in, so beacons can be placed along the common edges of two zones.
Beacons broadcast a signal that has three data values:
These values can be configured with software from the manufacturer of the beacons. For example, here's a screenshot of RadBeacon from Radius Networks.
In Flare, these values should be configured as follows:
Here is an example:
{
"name": "Building",
"data": {"uuid": "2F234454-CF6D-4A0F-ADF2-F4911BA9FFA6"},
"perimeter": {
"origin": {"x": -1, "y": -1},
"size": {"height": 12, "width": 12}
},
"zones": [
{
"data": {"major": 1},
"name": "Open Space",
"perimeter": {
"origin": {"x": 0, "y": 0},
"size": {"height": 10, "width": 10}
},
"things": [
{
"data": {"minor": 1},
"name": "Northwest",
"position": {"x": 0, "y": 10}
},
{
"data": {"minor": 2},
"name": "Northeast",
"position": {"x": 10, "y": 10}
},
{
"data": {"minor": 3},
"name": "Southwest",
"position": {"x": 0, "y": 0}
},
{
"data": {"minor": 4},
"name": "Southeast",
"position": {"x": 10, "y": 0}
}
]
}
]
}
The values above will generate an environment like this:
You can find the distance to nearby beacons on iOS using the CoreLocation framework. The BeaconManager class in the Flare framework handles most of these tasks for you.
import Flare
import CoreLocation
class ViewController: UIViewController, FlareManagerDelegate, BeaconManagerDelegate {
var flareManager = FlareManager(host: host, port: 1234)
var beaconManager = BeaconManager()
var environment: Environment?
var device: Device?
override func viewDidLoad() {
flareManager.delegate = self
beaconManager.delegate = self
flareManager.connect()
flareManager.getEnvironment("123") {json in
self.environment = Environment(json: json)
self.beaconManager.loadEnvironment(self.environment)
self.beaconManager.start()
}
flareManager.getDevice("789", environmentId: "123") {json in
self.device = Device(json: json)
}
}
override func viewDidAppear(animated: Bool) {
beaconManager.start()
flareManager.connect()
}
override func viewDidDisappear(animated: Bool) {
beaconManager.stop()
flareManager.disconnect()
}
func devicePositionDidChange(position: CGPoint) {
if device != nil {
device!.position = position
flareManager.setPosition(device!, position: position)
}
}
}
In the code sample above, the ViewController class is a delegate of both the FlareManager and the BeaconManager. The FlareManager connects to the Flare API, while the BeaconManager scans for nearby beacons and calculates the position of the device.
When an environment has been loaded from the FlareManager, the app calls loadEnvironment() to tell the BeaconManager which beacons to scan for, and where they are located. It then calls start() to start scanning.
When the BeaconManager determines the device's position, it calls the delegate method devicePositionDidChange() with the new position. Normally this happens once per second. The app can then tell the FlareManager to notify the server that the device's position has changed.
When the app is moved into the background, it disconnects the FlareManager and stops the BeaconManager. When it returns to the foreground, it re-connects the FlareManager and re-starts the BeaconManager.


{% extends "_page" %} {% block mainContent %}
Kilvin CMS has specific server requirements and unfortunately your server did not meet them. Below is a list of the problems we discovered when we ran our installation tests. If you have questions, please refer to the documentation or contact support.
{{error[1] | raw}}


Example API calls
The paths must begin with /api
. These all return JSON.
Chords
- All chords (
/chords
) - C major (
/chord/C/maj
) - A minor transposed down by 2 semitones (
/chord/A/min?transpose=-2
)
Scales
- List all available scales (
/scales
) - A mixolydian mode
transposed up by 4 semitones (
/scale/A/mixolydian?transpose=4
)


#include "_doctype.html"
curl - Autobuilds We Miss!
#include "css.t"
#define CURL_AUTO
#include "_menu.html"
#include "setup.t"
WHERE2(Devel, "/devel.html", Autobuilds We Miss)
TITLE(Platforms/Options We Want Tested As Well)
#include "topline.t"
#include "setup.t"
If you feel like helping out the project, have a peek here and see what
autobuilds we would appreciate to get going!
We have no automatic building/testing on these platforms:
- AmigaOS
- BeOS
- HP-UX
- Hurd
- Mac OS X
- OS/2
- OpenBSD
- QNX
- RiscOS
- SCO Unix
- VMS
#include "_footer.html"


Building a Sample Application
GNSDK provides sample applications for many common use cases. You can find the sample applications in the samples/<module> folders of your GNSDK package, where <module> corresponds to GNSDK modules and features, like musicid_lookup_album_toc, musicid_file_albumid, and so on.
Each sample application folder contains the following files:
- main.c: C source for the sample application
- makefile: GNU Make makefile for building the sample application
Some modules may contain a /data subfolder if metadata exists for the sample application.
The GNSDK package also contains following makefiles:
- GNSDK Build files, sample_vars.mk, gather_sources.mk, and rules_samples.mk
- Platform specific makefiles in the /builds directory
Each sample application makefile includes sample_vars.mak and rules_sample.mk.
You can build sample applications on any of the GNSDK supported platforms.
Build Environment Requirements
GNSDK provides multi-threaded, thread-safe technology for a wide variety of platforms and languages. For a detailed list of these, see the Release Notes included in the software package.
Build Steps
To build and run a sample application:
- Open a shell and navigate to the sample application folder.
- Ensure that the proper environment variables are set for your platform.
- Type make. This creates a sample.exe file (and generally other output files) in the same folder. Object files from the compiler are stored in an output folder.
- Type the platform-specific command to run the sample.exe and include the ClientID, ClientID Tag, and License file information as command-line arguments as described below.
Supported make commands
| Command | Description |
|---|---|
| make | Builds a debug version |
| make release | Builds a release (non-debug) version |
| make release CFLAGS=-DUSE_LOCAL | Enables local database lookups |
Including Client and License Information
Running the sample application generally requires the client ID, client ID tag, and license file provided with the SDK. Gracenote SDKs and sample applications cannot successfully execute without these values. You must supply them as command-line arguments to the sample application, in the following format:
./sample.exe <clientid> <clientid_tag> <license_file>
For example,
./sample.exe 12345678 ABCDEF0123456789ABCDEF012345679 "C:/gn_license.txt"
Directing Output and Log Files
Each sample application output varies, but in general, you should see the application performing online querying and displaying scrolling output. Redirect the output to a file to capture it for viewing. The application also creates a sample.log file, which logs any errors that may have occurred.
Platform-Specific Build Instructions
This section contains important build notes for specific platforms.
Windows
Building on a Windows platform requires the following:
- Cygwin: For more information, see the file README_windows.txt, included in the package.
- Visual Studio 2005 or later.
To build the sample application on a Windows platform:
- Edit the cygwin.bat file to configure the correct variables for the installed Visual Studio version. (The default location for this file is generally C:\cygwin, but this is dependent on your specific configuration.) See examples below.
- Follow the general instructions: Build Steps.
- Be sure to navigate to the sample folder using the proper Cygwin path prefix of /cygdrive/c <or correct drive>/<path to sample>. For more information on using Cygwin, see the Cygwin's User's Guide.
This example shows the original code delivered by Cygwin in the cygwin.bat file:
@echo off
C:
chdir C:\cygwin\bin
bash --login -i
This example shows how the code must be edited to call the correct variables for the installed Visual Studio version. Note that this code specifically calls Visual Studio 2008 and configures the variables before initializing Cygwin:
@echo off
:: Change this call based on the version of Visual Studio being used
:: If using Visual Studio 2008, call "%VS90COMNTOOLS%\.."
:: If using Visual Studio 2005, call "%VS80COMNTOOLS%\.."
call "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
C:
chdir C:\cygwin\bin
bash --login
Windows CE
Because Windows CE does not have a relative path concept, the samples provided with GNSDK will not run without modifications. The following modifications are necessary:
- You must use an absolute path for the log files.
- You must set a path name for the database after SQLite is initialized, for example:
gnsdk_storage_sqlite_option_set(GNSDK_STORAGE_SQLITE_OPTION_STORAGE_FOLDER, "/storage card/samples");
- You must set a path name for the database after Playlist is initialized, for example:
gnsdk_playlist_storage_location_set( "/storage card/samples");
The recommended way to run the samples is to create a .bat file with a line similar to this:
/storage card/samples_c/playlist/sample.exe 12345678 ABCDEF0123456789ABCDEF012345679 "\Storage card\samples\license.txt"
To run the samples:
- Launch a command prompt.
- Change directories (cd) to the running directory.
- Invoke the .bat file to run the sample.
Linux ARM
To build samples when using the Linux ARM-32 binaries:
- Open a shell and navigate to the sample application folder:.../gnsdk_<version>_<date>/_sample/<module>.
- Type make clean ARCH=arm.
- Type make ARCH=arm to build the executable file.
- Navigate to the.../gnsdk_<version>_<date>/_sample/linux_arm-32 folder to access the gnsdk_<module>_sample.exe and run the sample.
Linux and Solaris
Follow the general instructions in Build Steps.
MacOS
Follow the general instructions in Build Steps.
To build samples when using Mac OS X x86_64 binaries, use the command:
make ARCH=x86_64


Overview¶
My Class¶
Description of the library or whatnot goes here.
These paragraphs are just regular prose, like what you’d see in any API documentation.
Quickstart¶
Install via Composer:
composer require swader/myawesomelib
Some other instructions go here:
$awesome = new Awesome('param');
$awesome->doGreatThings();


I'm Joe Johnson, a Developer based in NYC. I Have ten years of experience in the graphic design world, specializing in the creation of responsive websites.


The Bahrain climate can be generally described as cool winters with sparse rainfall and hot summers with high humidity. The winter season is from December to February and has periods of disturbed weather accompanied by occasional rainfall. January is usually the coolest month, and prevailing winds are North-Westerly. Between March and May and between October and November the weather is normally warm and dry, with pleasant breezes and many hours of sunshine. The summer season from June to September is generally hot and completely dry, but humid. Temperatures average 38C to 42C. The dry NW wind, known locally as Al Barah helps keep humidity down and can create more pleasant conditions.
For links to free global weather information, forecast services and extreme weather information see the Noonsite Weather Page.
* indicates port of entry