Haskell wikibook: Type basics II
Here are my answers for the chapter called Next Steps:
We cheated a little when moving from the second version of pts
to the third one: they do not do exactly the same thing. Can you spot what the difference is?
pts :: Int -> Int
pts 1 = 10
pts 2 = 6
pts 3 = 4
pts 4 = 3
pts 5 = 2
pts 6 = 1
pts _ = 0
> pts :: Int -> Int
> pts 1 = 10
> pts 2 = 6
> pts x
> | x <= 6 = 7 - x
> | otherwise = 0
Gives different answers if the parameter to the function is negative.
And the chapter Simple Input and Output:
> Write a program which asks the user for the base and height of a right angled triangle, calculates its area, and prints it to the screen. The interaction should look something like:
>
> The base?
> 3.3
> The height?
> 5.4
> The area of that triangle is 8.91
>
> You will need to use the function `read` to convert user strings like "3.3" into numbers like 3.3 and the function `show` to convert a number into string.
main = do
putStrLn "The base?"
b <- getLine
putStrLn "The height?"
h <- getLine
let m = "The area of that triangle is "
putStrLn (m ++ (show (area (read b) (read h))))
area b h = b \* h / 2
Write a program that asks the user for his or her name. If the name is one of Simon, John or Phil, tell the user that you think Haskell is a great programming language. If the name is Koen, tell them that you think debugging Haskell is fun (Koen Classen is one of the people who works on Haskell debugging); otherwise, tell the user that you don't know who he or she is.
(As far as syntax goes there are a few different ways to do it; write at least a version using if
/ then
/ else
.)
main = do
putStrLn "What's your name?"
n <- getLine
putStrLn (resp n)
{-
resp :: String -> String
resp n
| elem n ["Simon", "John", "Phil"] = "Haskell is marvelous!"
| n == "Koen" = "Debugging Haskell is fun."
| otherwise = "Name not recognized."
-}
resp n = if elem n ["Simon", "John", "Phil"]
then "Haskell is marvelous!"
else if n == "Koen"
then
"Debugging Haskell is fun."
else
"Name not recognized."
+-----------------------------------+-----------------------------------+
| sweet | unsweet |
+===================================+===================================+
|
| dir="ltr"> |
| | |
| do name <- getLine | do name <- getLine |
| let loudName = makeLoud n | let loudName = makeLoud n |
| ame | ame |
| putStrLn ("Hello " ++ lou | in do putStrLn ("Hello " |
| dName ++ "!") | ++ loudName ++ "!") |
| putStrLn ( | putStrLn ( |
| "Oh boy! Am I excited | "Oh boy! Am I |
| to meet you, " | excited to meet you, " |
| ++ loudName) | ++ loudNam |
| | e) |
|
| |
| |
|
+-----------------------------------+-----------------------------------+
+-----------------------------------------------------------------------+
| Exercises |
+=======================================================================+
| 1. Why does the unsweet version of the let binding require an extra |
| do
keyword?\ |
| Because an 'in' clause can contain any Haskell, so we have to use |
| the 'do' keyword to say that we're going to execute actions. |
| 2. Do you always need the extra do
?\ |
| Only if you're doing actions. |
| 3. (extra credit) Curiously, let
without in
is exactly how we |
| wrote things when we were playing with the interpreter in the |
| beginning of this book. Why is it ok to omit the in
keyword in |
| the interpreter but needed (outside of do blocks) in a source |
| file?\ |
| Perhaps because lines entered in the interpreter are implicitly |
| within a 'do' block. |
+-----------------------------------------------------------------------+


All Files (34.85% covered at 0.39 hits/line)
16 files in total.
132 relevant lines.
46 lines covered and
86 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/channels/application_cable/channel.rb | 0.0 % | 4 | 4 | 0 | 4 | 0.0 |
| app/channels/application_cable/connection.rb | 0.0 % | 4 | 4 | 0 | 4 | 0.0 |
| app/controllers/application_controller.rb | 100.0 % | 3 | 2 | 2 | 0 | 1.0 |
| app/controllers/food_items_controller.rb | 55.26 % | 83 | 38 | 21 | 17 | 0.7 |
| app/controllers/home_controller.rb | 30.77 % | 26 | 13 | 4 | 9 | 0.3 |
| app/controllers/orders_controller.rb | 0.0 % | 32 | 32 | 0 | 32 | 0.0 |
| app/helpers/application_helper.rb | 42.86 % | 15 | 7 | 3 | 4 | 0.4 |
| app/helpers/food_items_helper.rb | 100.0 % | 2 | 1 | 1 | 0 | 1.0 |
| app/helpers/home_helper.rb | 100.0 % | 2 | 1 | 1 | 0 | 1.0 |
| app/helpers/orders_helper.rb | 100.0 % | 2 | 1 | 1 | 0 | 1.0 |
| app/jobs/application_job.rb | 0.0 % | 2 | 2 | 0 | 2 | 0.0 |
| app/mailers/application_mailer.rb | 0.0 % | 4 | 4 | 0 | 4 | 0.0 |
| app/models/application_record.rb | 100.0 % | 3 | 2 | 2 | 0 | 1.0 |
| app/models/food_item.rb | 63.64 % | 18 | 11 | 7 | 4 | 0.6 |
| app/models/order.rb | 0.0 % | 4 | 4 | 0 | 4 | 0.0 |
| app/models/section.rb | 66.67 % | 11 | 6 | 4 | 2 | 0.7 |
Controllers (31.76% covered at 0.38 hits/line)
4 files in total.
85 relevant lines.
27 lines covered and
58 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/controllers/application_controller.rb | 100.0 % | 3 | 2 | 2 | 0 | 1.0 |
| app/controllers/food_items_controller.rb | 55.26 % | 83 | 38 | 21 | 17 | 0.7 |
| app/controllers/home_controller.rb | 30.77 % | 26 | 13 | 4 | 9 | 0.3 |
| app/controllers/orders_controller.rb | 0.0 % | 32 | 32 | 0 | 32 | 0.0 |
Models (56.52% covered at 0.56 hits/line)
4 files in total.
23 relevant lines.
13 lines covered and
10 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/models/application_record.rb | 100.0 % | 3 | 2 | 2 | 0 | 1.0 |
| app/models/food_item.rb | 63.64 % | 18 | 11 | 7 | 4 | 0.6 |
| app/models/order.rb | 0.0 % | 4 | 4 | 0 | 4 | 0.0 |
| app/models/section.rb | 66.67 % | 11 | 6 | 4 | 2 | 0.7 |
Mailers (0.0% covered at 0.0 hits/line)
1 files in total.
4 relevant lines.
0 lines covered and
4 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/mailers/application_mailer.rb | 0.0 % | 4 | 4 | 0 | 4 | 0.0 |
Helpers (60.0% covered at 0.58 hits/line)
4 files in total.
10 relevant lines.
6 lines covered and
4 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/helpers/application_helper.rb | 42.86 % | 15 | 7 | 3 | 4 | 0.4 |
| app/helpers/food_items_helper.rb | 100.0 % | 2 | 1 | 1 | 0 | 1.0 |
| app/helpers/home_helper.rb | 100.0 % | 2 | 1 | 1 | 0 | 1.0 |
| app/helpers/orders_helper.rb | 100.0 % | 2 | 1 | 1 | 0 | 1.0 |
Jobs (0.0% covered at 0.0 hits/line)
1 files in total.
2 relevant lines.
0 lines covered and
2 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/jobs/application_job.rb | 0.0 % | 2 | 2 | 0 | 2 | 0.0 |
Libraries (100.0% covered at 0.0 hits/line)
0 files in total.
0.0 relevant lines.
0.0 lines covered and
0.0 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|
Ungrouped (0.0% covered at 0.0 hits/line)
2 files in total.
8 relevant lines.
0 lines covered and
8 lines missed
| File | % covered | Lines | Relevant Lines | Lines covered | Lines missed | Avg. Hits / Line |
|---|---|---|---|---|---|---|
| app/channels/application_cable/channel.rb | 0.0 % | 4 | 4 | 0 | 4 | 0.0 |
| app/channels/application_cable/connection.rb | 0.0 % | 4 | 4 | 0 | 4 | 0.0 |


Shields Up
These are the voyages of the Starship Enterprise. Its continuing mission, to explore strange new worlds, to seek out new life and new civilizations, to boldly go where no one has gone before. We need to neutralize the homing signal. Each unit has total environmental control, gravity, temperature, atmosphere, light, in a protective field. Sensors show energy readings in your area. We had a forced chamber explosion in the resonator coil. Field strength has increased by 3,000 percent.
Sensors indicate human life forms 30 meters below the planet's surface. Stellar flares are increasing in magnitude and frequency. Set course for Rhomboid Dronegar 006, warp seven. There's no evidence of an advanced communication network. Total guidance system failure, with less than 24 hours' reserve power. Shield effectiveness has been reduced 12 percent. We have covered the area in a spherical pattern which a ship without warp drive could cross in the given time.
Deflector power at maximum. Energy discharge in six seconds. Warp reactor core primary coolant failure. Fluctuate phaser resonance frequencies. Resistance is futile. Recommend we adjust shield harmonics to the upper EM band when proceeding. These appear to be some kind of power-wave-guide conduits which allow them to work collectively as they perform ship functions. Increase deflector modulation to upper frequency band.
We're acquainted with the wormhole phenomenon, but this... Is a remarkable piece of bio-electronic engineering by which I see much of the EM spectrum ranging from heat and infrared through radio waves, et cetera, and forgive me if I've said and listened to this a thousand times. This planet's interior heat provides an abundance of geothermal energy. We need to neutralize the homing signal.
Unidentified vessel travelling at sub warp speed, bearing 235.7. Fluctuations in energy readings from it, Captain. All transporters off. A strange set-up, but I'd say the graviton generator is depolarized. The dark colourings of the scrapes are the leavings of natural rubber, a type of non-conductive sole used by researchers experimenting with electricity. The molecules must have been partly de-phased by the anyon beam.
Resistance is futile.


Why I teach in public schools — Osun lawmaker
by Rasheed SobowaleMr Tunde Olatunji, the Chief Whip of Osun House of Assembly, says his passion for functional education and commitment toward making learning attractive to students are factors responsible for his taking up voluntary teaching in public schools in the state.
Olatunji (APC-Ife North) spoke on Monday while teaching Junior Secondary School students at C&S Government Middle School, Ipetumodu, under his programme tagged, “Tunde Goes To School,’’ on Monday.
The lawmaker said voluntary teaching of students in public schools in the state was an effort on his part to drive quality and functional education by imparting knowledge and skills that would make the students to be useful to the society.
Olatunji said his choice of mathematics as a subject to be taught was deliberate with the aim of stimulating the interest of youths “in this all-important subject often tagged as difficult.”
ALSO READ: Lightening kills 19 cows in Osun, as Gov. Oyetola sympathizes with Fulani traders
He said Civic Education, which was his second choice of subject, would impact on the students a sense of national duty, obligation, patriotism, respect for human rights and ethics.
“I have been privileged to have personal encounters and rub minds with well over 3,500 students in our secondary schools in the state since the beginning of this academic term about two months ago.
“My experience in all the schools is similar and the common denominator is that our dear State of Osun and by extension, Nigeria, is indeed blessed with youthful talents and human capital remains our greatest asset,” Olatunji said.
The lawmaker said his other educational programmes to assist many young talents in academics and sports across Osun State in the last four years had started yielding results.


On Windows systems, download the 32-bit/64-bit Windows Service Installer from the following address:
http://tomcat.apache.org/download-80.cgi
Double-click the downloaded file to start the installation.
Determine the Tomcat port during installation. Tomcat's default port is 8080. If the 8080 port is being used by another program, you have to change it. If Oracle 11g XE uses the 8080, you need to change the Tomcat port. The port number can be changed after installation. You can change it by opening and editing the server.xml file in CATALINA_HOME1/conf directory.
Set the Tomcat administrator username and password during installation. This setting can also be changed after installation. You can change them by opening and editing the tomcat-users.xml in CATALINA_HOME/conf directory.
Visit http://localhost:8080. If you see a cat, installation is a success. The screen showing the cat is the homepage of Tomcat's ROOT application. The location of the ROOT application is CATALINA_HOME/webapps/ ROOT.
When Tomcat starts the service, the Tomcat Monitor icon appears in the system tray menu. If you have not seen the cat, try restarting Tomcat using this Tomcat Monitor.2
Comments<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
<Connector port="9090" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />


You can refer to Chapter 9 of the Early Childhood Funding Handbook on instructions on filling out this return. If you have any queries, you can call the Resourcing Contact centre on 0800 ECE ECE (0800 323 323) or email<EMAIL_ADDRESS>Please note that only the most recently submitted RS7 form data will be processed for funding at the end of a given day.
The current RS7 funding return period is {{(rs7.selectedPayPeriod.StartPayPeriodMonth + ' - ' + rs7.selectedPayPeriod.EndPayPeriodMonth)}}. To ensure you receive a timely payment, please refer to He Pānui Kōhungahunga- The Early Learning Bulletin for more information. Submission after the due date will delay funding until the next available date.
Submission of a return for the current period can be done between {{rs7.getSubmitWithinDates(true)}} and {{rs7.getSubmitWithinDates()}}, after which it will no longer be available for editing or submitting.


The perfect software for contractors
and small businesses. Log into Binvoice
Create and send professional invoices online.
Get it delivered to your clients directly by email through PDF.
Low and affordable prices for the best quality prestation.

Our mission is to help entrepreneurs succeed. We know that running your own business can be very difficult, but billing doesn't have to be.
Success means different things to different people, but anyone running their own business knows that getting paid has to be part of the definition.
Simplify your task by registering all your customers, products and services in your database.
It takes only 60 seconds to create invoices with Binvoice- add your customer, add your product, click submit, done!
Mark your invoices as paid, and check at a glance which invoices are overdue. Tracking your invoices has never been easier!


John Muir ( MEWR; April 21, 1838 – December 24, 1914) also known as "John of the Mountains" and "Father of the National Parks", was an influential Scottish-American naturalist, author, environmental philosopher, glaciologist, and early advocate for the preservation of wilde...


shenfun
by constructing a few more classes than were required in 1D
from shenfun.chebyshev.bases import ShenDirichletBasis
from shenfun.fourier.bases import FourierBasis
import numpy as np
from shenfun import Function, TensorProductSpace
from mpi4py import MPI
Now the TensorProductSpace
class is used to construct \( T \), whereas Function
is a subclass of numpy.ndarray
used to hold solution arrays. The MPI communicator, on the other hand, is used for distributing the tensor product grids on a given number of processes
comm = MPI.COMM_WORLD
N = (32, 33)
K0 = ShenDirichletBasis(N[0])
K1 = FourierBasis(N[1], dtype=np.float)
T = TensorProductSpace(comm, (K0, K1))
# Alternatively, switch order for periodic in first direction instead
# T = TensorProductSpace(comm, (K1, K0), axes=(1, 0))
Under the hood, within the TensorProductSpace
class, the mesh is distributed,
both in real, physical space, and in spectral space. In the real space the mesh
is distributed along the first index, whereas in spectral space the
wavenumbermesh is distributed along the second dimension. This is the default
behaviour of TensorProductSpace
. However, the distribution may also be
configured specifically by the user, e.g., as shown in the commented out text,
where the Dirichlet basis is found along the second axis. In this case the order
of the axes to transform over has been flipped, such that in spectral space the
data is distributed along the first dimension and aligned in the second. This is
required for solving the linear algebra system that arises for the Dirichlet
basis. The arrays created using Function
are distributed, and no further
attention to MPI is required. However, note that arrays may have different type
and shape in real space and in spectral space. For this reason Function
has a
keyword argument forward_output
, that is used as w_hat = Function(T,
forward_output=True)
to create an array consistent with the output of
T.forward
(solution in spectral space), and w = Function(T,
forward_output=False)
to create an array consistent with the input (solution in
real space). Furthermore, uh = np.zeros_like(w_hat)
and w_hat = Function(T, buffer=uh)
can be used to wrap a Function
instance around a regular Numpy array uh
. Note that uh
and w_hat
now will share the same data, and modifying one will naturally modify also the other.
The solution of a complete Poisson problem in 2D is shown below. Very similar code is required to solve the Poisson problem with the Legendre basis. The main difference is that for Legendre it is natural to integrate the weak form by parts and use matrices = inner(grad(v), grad(u))
from shenfun.chebyshev.la import Helmholtz as Solver
# Create a solution that satisfies boundary conditions
x, y = symbols("x,y")
ue = (cos(4*y) + sin(2*x))*(1-x**2)
fe = ue.diff(x, 2) + ue.diff(y, 2)
# Lambdify for faster evaluation
ul = lambdify((x, y), ue, 'numpy')
fl = lambdify((x, y), fe, 'numpy')
X = T.local_mesh(True)
u = TrialFunction(T)
v = TestFunction(T)
# Get f on quad points
fj = fl(X[0], X[1])
# Compute right hand side of Poisson equation
f_hat = inner(v, fj)
# Get left hand side of Poisson equation
matrices = inner(v, div(grad(u)))
# Create Helmholtz linear algebra solver
H = Solver(**matrices)
# Solve and transform to real space
u_hat = Function(T) # Solution spectral space
u_hat = H(u_hat, f_hat) # Solve
u = T.backward(u_hat)
The test functions and function spaces require a bit more attention. Test functions for space \( T(x, y)=V^C(x) \otimes V^p(y) \) are given as $$ \begin{equation} \phi_{\ts{k}}(x, y) = v_l(x) e^{imy}, \tag{43} \end{equation} $$ which introduces the sans serif Cartesian product wavenumber mesh \( \ts{k} = \bs{l}^D \times \bs{l} \) $$ \begin{equation} \ts{k} = \{ (l, m) | l \in \bs{l}^D \text{ and } m \in \bs{l}\}. \tag{44} \end{equation} $$ Similarly there is a Cartesian product grid \( \ts{x} = \bs{x} \times \bs{y} \), where \( \bs{y} = \{y_k\}_{k=0}^{M-1} = 2 \pi k /M \) $$ \begin{equation} \ts{x} = \{ (x_j, y_k) | j=0,1,\ldots, N-1 \text{ and } k=0,1,\ldots, M-1\}. \tag{45} \end{equation} $$ Note that for computing on the Cartesian grids using Numpy arrays with vectorization, the mesh and wavenumber components need to be represented as 2D arrays. As such we create $$ \begin{equation} \bs{\textsf{x}} = (\bs{x}, \bs{y}) = \Big(\{x_i\}_{i=0}^{N-1} \times I^M, I^N \times \{y_j\}_{j=0}^{M-1} \Big), \tag{46} \end{equation} $$ where \( I^N \) is an N-length vector of ones. Similarly $$ \begin{equation} \bs{\textsf{k}} = (\bs{l}, \bs{m}) = \Big(\{ l \}_{l=0}^{N-1} \times I^M, I^N \times \{ m \}_{m=0}^{M/2} \Big). \tag{47} \end{equation} $$ Such Cartesian grids can be very efficiently stored with Numpy arrays, using no more space than the two vectors used to create them. The key to this efficiency is broadcasting. We store \( \ts{k} \) as a list of two numpy arrays, \( \bs{l} \) and \( \bs{m} \), corresponding to the two 1D wavenumber meshes \( \{ l \}_{l=0}^{N-1} \) and \( \{ m \}_{m=0}^{M/2} \). However, \( \bs{l} \) and \( \bs{m} \) are now stored as 2D arrays of shape \( (N, 1) \) and \( (1, M/2+1) \), respectively. And broadcasting takes care of the additional dimension, such that the two arrays work just like if they were stored as \( (N, M/2+1) \) arrays. We can look up \( \bs{l}(l, m) \), just like a regular \( (N, M/2+1) \) array, but the storage required is still only one single vector. The same goes for \( \ts{x} \), which is stored as a list of two arrays \( \bs{x} \), \( \bs{y} \) of shape \( (N, 1) \) and \( (1, M) \) respectively. This extends straightforward to even higher dimensions.
Assembling a weak form like \( (v, \nabla^2 u)_w^N \) leads to two non-diagonal matrices, both the stiffness and mass matrix, since it expands like
$$
\begin{equation}
(v, \nabla^2 u)_w^N = \left(v, \frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} \right)_w^N.
\tag{48}
\end{equation}
$$
Inserting for test function \( v = \phi_{\ts{k}} (= \phi_{l, m} =v_l(x) e^{imy}) \) and trial function \( u = \sum_{(q,r)\in \ts{k}} \hat{u}_{q, r} \phi_{q,r} \), we obtain
$$
\begin{align}
(v, \nabla^2 u)_w^N &= \left(\phi_{l, m}, \frac{\partial^2}{\partial x^2} \sum_{(q, r) \in \ts{k}} \hat{u}_{q, r} \phi_{q, r} + \frac{\partial^2}{\partial y^2} \sum_{(q,r) \in \ts{k}} \hat{u}_{q, r} \phi_{q, r} \right)_w^N,
\tag{49}\\
&= 2\pi \left(\sum_{(q, r) \in \ts{k}} A_{lq} \delta_{rm} \hat{u}_{q,r} - \sum_{(q, r) \in \ts{k}} {r}^2 B_{lq} \delta_{rm} \hat{u}_{q,r}\right),
\tag{50}\\
&= 2\pi \left(\sum_{q\in \bs{l}^D} A_{lq} \hat{u}_{q,m} - {m}^2 \sum_{q\in \bs{l}^D} B_{lq} \hat{u}_{q,m}\right) \quad \forall (l, m) \in \bs{l}^D \times \bs{l}. \tag{51}
\end{align}
$$
As can be seen from Eq.(51), the linear system of equations is set up to act along the Dirichlet direction, whereas for the periodic direction the matrices are diagonal and no additional work is required. The system of equations correspond to a series of 1D Helmholtz problems, that need to be solved once for each \( m \in \bs{l} \). This is what goes on under the hood with the Helmholtz solver imported through from shenfun.chebyshev.la import Helmholtz as Solver
.
The right hand side of the Poisson problem is computed as
$$
\begin{align}
(v, f)_w^N &= 2\pi \underbrace{\sum_{j}\underbrace{\frac{1}{N} \sum_{k} f(x_j, y_k) e^{imy_k} }_{\mathcal{F}_m} v_l(x_j) w_j}_{\mathcal{S}_l} \quad \forall (l, m) \in \bs{l}^D \times \bs{l}, \notag
\tag{52}\\
&= 2\pi \mathcal{S}(f) = 2 \pi \mathcal{S}_l(\mathcal{F}_m(f)).
\tag{53}
\end{align}
$$
The TensorProductSpace
class can take any number of Fourier bases. A 3 dimensional tensor product space can be created as
N = (32, 33, 34)
K0 = ShenDirichletBasis(N[0])
K1 = C2CBasis(N[1])
K2 = R2CBasis(N[2])
W = TensorProductSpace(comm, (K0, K1, K2))
Here the default behaviour of TensorProductSpace
is to distribute the first 2 indices in real space using two subcommunicators, with a decomposition often referred to as pencil decomposition. In spectral space the last two indices will be distributed. For example, using 4 CPUs, a subprocessor mesh of size \( 2 \times 2 \) will be created, and 2 subprocessors share the first index and the other two share the second index. If the program is run with 3 processors, then only the first index will be distributed and the subprocessormesh will be \( 3 \times 1 \). It is also possible to configure TensorProductSpace
to run with 4 CPUs and a \( 4 \times 1 \) subprocessormesh, or 40,000 CPUs with a \( 200 \times 200 \) processormesh. The latter requires that the mesh is big enough, though, but otherwise it is just a matter of acquiring computing power. The biggest simulations tested thus far used 64,000 CPUs.
Solving a biharmonic problem is just as easy as the Poisson problem. Consider the fourth order biharmonic PDE in 3-dimensional space
$$
\begin{align}
\nabla^4 u(\bs{x}) &= f(\bs{x}), \quad \bs{x} \in \Omega
\tag{54}\\
u(x=\pm1, y, z) &= \frac{\partial u}{\partial x} (x=\pm 1, y, z) = 0
\tag{55}\\
u(x, y+2\pi, z) &= u(x, y, z),
\tag{56}\\
u(x, y, z+2\pi) &= u(x, y, z).
\tag{57}
\end{align}
$$
that is periodic in \( y- \) and \( z- \) directions and with clamped boundary conditions at \( x=\pm 1 \). The problem may be solved using either one of these two bases:
$$
\begin{align}
V^C &= \text{span}\{T_l - \frac{2(l+2)}{l+3}T_{l+2} + \frac{l+1}{l+3}T_{l+4} , l \in \bs{l}^B\}, \tag{58} \\
V^L &= \text{span}\{L_l - \frac{2(2l+5)}{2l+7}L_{l+2} + \frac{2l+3}{2l+7}, l \in \bs{l}^B\}, \tag{59}
\end{align}
$$
where \( \bs{l}^B = 0, 1, \ldots, N-5 \). A tensor product space may be constructed as \( W(x,y,z) = V^C(x) \otimes V^p(y) \otimes V^p(z) \), and the variational problem
$$
\begin{equation}
(v, \nabla^4 u)^N_w = (v, f)^N_w,
\tag{60}
\end{equation}
$$
where \( u \) and \( v \) are trial and test functions in \( W \), may be implemented in shenfun
as shown below
from shenfun.chebyshev.bases import ShenBiharmonicBasis, Basis
from shenfun.fourier.bases import R2CBasis, C2CBasis
from shenfun.chebyshev.la import Biharmonic as Solver
from shenfun import inner , div , grad , TestFunction, TrialFunction, project, Dx
from shenfun import Function, TensorProductSpace
from mpi4py import MPI
import numpy as np
comm = MPI.COMM_WORLD
N = (32, 33, 34)
K0 = ShenBiharmonicBasis(N[0])
K1 = C2CBasis(N[1])
K2 = R2CBasis(N[2])
W = TensorProductSpace(comm, (K0, K1, K2))
u = TrialFunction(W)
v = TestFunction(W)
matrices = inner(v, div(grad(div(grad(u)))))
fj = Function(W, False)
fj[:] = np.random.random(fj.shape)
f_hat = inner(v, fj) # Some right hand side
B = Solver(**matrices)
# Solve and transform to real space
u_hat = Function(W) # Solution spectral space
u_hat = B(u_hat , f_hat) # Solve
u = Function(W, False)
u = W.backward(u_hat, u)
Note that C2CBasis
is used for the Fourier basis along axis 1, whereas
R2CBasis
is used for the last axis. This is because the right hand side of the
Poisson equation, and
thus the input data, is real and not complex. Yet, taking the Fourier
transform along the last axis, results in a complex array. Hence we need
real-to-complex transforms for axis 2 and complex-to-complex (C2CBasis
)
transforms for axis 1.


Release Notes
1.2.1 (Apr 15, 2016)
- CB-10763: Remove emoji in
cordova-plugin-network-information
- CB-10636 Add
JSHint
for plugins
1.2.0 (Jan 15, 2016)
- Adding
CoreTelephony
to plugin.xml
- Adding notification for
CT radio
information
- Adding
CT radio
information
- CB-10160: Fixed the case mismatch issue
1.1.0 (Nov 18, 2015)
- CB-10035 Updated
RELEASENOTES
to be newest to oldest
- Fixing contribute link.
- These notifications are objects so their address always evaluates to true.
- Update
NetworkManager.java
- CB-9542
Browser Proxy
not defined correctly
- Solved
toLowerCase
issue with Locale.US
1.0.1 (Jun 17, 2015)
- Adding .ratignore file.
- CB-9128 cordova-plugin-network-information documentation translation: cordova-plugin-network-information
- fix npm md issue
1.0.0 (Apr 15, 2015)
- CB-8746 gave plugin major version bump
- CB-8683 changed plugin-id to pacakge-name
- CB-8653 properly updated translated docs to use new id
- CB-8653 updated translated docs to use new id
- CB-8185 Fixes typo in
cordova.platformId
- Use TRAVIS_BUILD_DIR, install paramedic by npm
- CB-8185 Use
navigator.onLine
as connection information source on browser platform
- CB-8653 Updated Readme
- CB-8659: ios: 4.0.x Compatibility: Remove use of initWebView method
- CB-8573 Integrate TravisCI
- CB-8438 cordova-plugin-network-information documentation translation: cordova-plugin-network-information
- CB-8538 Added package.json file
0.2.15 (Feb 04, 2015)
- CB-8384 Network status change support on Windows
- CB-8384 Fixes the way we detect online status on Windows
- CB-8384 Add Windows platform quirks
- CB-8384 Add Windows section to Network Information plugin
0.2.14 (Dec 02, 2014)
- CB-7976 Android: Use webView's context rather than Activity's context for intent receiver
- CB-7700 cordova-plugin-network-information documentation translation: cordova-plugin-network-information
0.2.13 (Oct 03, 2014)
- CB-7595: Android L changes the type from Mobile to Cellular, I'm pretty sure this isn't documented
0.2.12 (Sep 17, 2014)
- CB-7471 cordova-plugin-network-information documentation translation
- Fix network information type exception on fxos 2
- Added support for the browser
- CB-6724 added documentation for manual tests
- remove reference to test assets, they are optional
- Renamed test dir and added nested plugin.xml
- CB-6964 ported manual tests
- Port network tests to plugin-test-framework
- Fix naviagtor typo
0.2.11 (Aug 06, 2014)
- FFOS update NetworkProxy.js
- CB-6127 Updated translations for docs
- CB-7019 Updated version and RELEASENOTES.md for release 0.2.10
- Fixed docs for online/offline event being backwards
0.2.10 (Jun 24, 2014)
- CB-6907: [android] Don't crash on startup if no networks available
0.2.9 (Jun 05, 2014)
- updated notice file to include missing license
- Cached extra info to better detect changes.
- CB-6809 Add license to CONTRIBUTING.md
- CB-6491 add CONTRIBUTING.md
- CB-6350 - Fix networkStatusForFlags return value type to work with 64-bit iOS (closes #8)
- Initial version of firefox os network information plugin
- there was an error in the object definition
0.2.8 (Apr 17, 2014)
- CB-6342: [iOS] iOS reports a cellular connection even when in Airplane mode
- CB-6422: [windows8] use cordova/exec/proxy
- CB-6460: Update license headers
- CB-6465: Add license headers to Tizen code
- Add NOTICE file
0.2.7 (Feb 05, 2014)
- Initial implementation of Tizen plugin.
0.2.6 (Jan 02, 2014)
- CB-5658 Add doc/index.md for netinfo plugin
0.2.5 (Dec 4, 2013)
- [ubuntu] specify policy_group
- add ubuntu platform
- Added amazon-fireos platform. Change to use amazon-fireos as the platform if user agent string contains 'cordova-amazon-fireos'
0.2.4 (Oct 28, 2013)
- CB-5128: add repo + issue tag to plugin.xml for network information plugin
- CB-4915 Incremented plugin version on dev branch.
0.2.3 (Sept 25, 2013)
- CB-4889 bumping&resetting version
- [windows8] commandProxy was moved
- CB-4889 renaming org.apache.cordova.core.network-information to org.apache.cordova.network-information
- removed duplicate comment line from plugin.xml
- added Network APIs for FirefoxOS
- Rename CHANGELOG.md -> RELEASENOTES.md
- CB-4752 Incremented plugin version on dev branch.
0.2.1 (Sept 5, 2013)


{{problem.name}}
{{submission.language}} /
{{submission.status}}
{{submission.status}}
Passed Tests:
Input:
Output:
Expected:
Edit
Delete
{{submission.subtime}}


procedure PrepareSampling; virtual;
Descendants should override this method in order to perform special preparations before the GetSample method is called.
Note: PrepareSampling is automatically called by TRasterizer before rasterization begins.
[See also]: FinalizeSampling


Project Lead
Data Science (DSPT6 - Unit 3)
Web UI Developer (WEBPT21)
Backend Developer (WEBPT15)
React II (WEBPT17)
React I (WEBPT19)
Data Science (DSPT5 - Unit 4)
React II (WEBPT17)
Data Science (DSPT5 - Unit 4)
Data Science (DSPT6 - Unit 3)


Reflecting business in virtual reality
We deliver custom and innovative applications to our clients
Dreamlake is a company based in Utrecht which specializes in creating virtual reality content and platforms for business purposes. We have been developing VR technologies and applications since 2013 and received an innovation price from the Dutch Government. Since then we provided many customers from different backgrounds with their own custom made VR experience.
Virtual reality is an excellent tool for 3D visualisation or for use in training and simulating complex situations. Some examples of industries that benefit from virtual reality are: real estate, interior design, product development, marketing, training and education.
In regards of training and education, virtual reality enables the user to be immersed in any situation and actively engage with the available content, rather than passively looking at static pictures or video. This leads to a better understanding of the presented content.
We create virtual reality experiences from start to finish. Dreamlake takes care of delivering virtual reality content and the application to play it with. We also developed a framework for livestreaming 360 video. We can develop Virtual Reality experiences for PC or mobile with all current VR devices. We work on a daily basis with the Oculus Rift and Samsung Gear VR and also develop mobile apps for use with Google Cardboard.


SequenceButton.sequence
listFilterSequencePanel
for constructing
a new sequence of filters that should be applied to the current imagesequence
Initialised with a string value, which is SequenceConstructorPanel.addFiltersList(java.lang.String)
added
to the filtersList on activation.buttonPanel
returning the rest to default coloursetEditor()
method.filter list
of filters that are availablesetFilters()
method with the list of filter names retrieved from the
Editor
file menu options
.ImagePanel.showImage(java.awt.image.BufferedImage)
method with the
last image displayed.


WebRTC is a open source project aiming to enable the web with Real Time Communication (RTC) capabilities
Learn more


Your Recent Food
Almonds
Origin: Almonds sold at Trader Joes in Modesto are sourced from Ripon.
Score :
92
Hot Dog
warning
Origin: The meat from source of Hot Dogs sold at 99¢ Store in Turlock are unknown.
Score : 23


Contains specialised analyses and visualisation tools for behavior change science. These facilitate conducting determinant studies (for example, using confidence interval-based estimation of relevance, CIBER, or CIBERlite plots) and systematically developing, reporting, and analysing interventions (for example, using acyclic behavior change diagrams). This package is especially useful for researchers in the field of behavior change or health psychology and to behavior change professionals such as intervention developers and prevention workers.
| Version: | 0.0.2 |
| Depends: | R (≥ 3.0.0) |
| Imports: | data.tree (≥ 0.7.5), DiagrammeR (≥ 1.0.0), ggplot2 (≥ 2.2.1), googlesheets (≥ 0.3.0), gridExtra (≥ 2.3), gtable (≥ 0.2.0), magrittr (≥ 0.1.5), ufs (≥ 0.0.1), userfriendlyscience (≥ 0.7.1), viridis (≥ 0.5.1) |
| Published: | 2018-09-24 |
| Author: | Gjalt-Jorn Peters [aut, cre, ctb] |
| Maintainer: | Gjalt-Jorn Peters <gjalt-jorn at a-bc.eu> |
| BugReports: | https://github.com/academy-of-behavior-change/behaviorchange/issues |
| License: | GPL (≥ 3) |
| URL: | https://a-bc.eu |
| NeedsCompilation: | no |
| Materials: | README |
| CRAN checks: | behaviorchange results |
| Reference manual: | behaviorchange.pdf |
| Package source: | behaviorchange_0.0.2.tar.gz |
| Windows binaries: | r-devel: behaviorchange_0.0.2.zip, r-release: behaviorchange_0.0.2.zip, r-oldrel: behaviorchange_0.0.2.zip |
| OS X binaries: | r-release: behaviorchange_0.0.2.tgz, r-oldrel: behaviorchange_0.0.2.tgz |
| Old sources: | behaviorchange archive |
Please use the canonical form https://CRAN.R-project.org/package=behaviorchange to link to this page.


Optimization of Autonomous Drone Delivery Systems/shared electric scooter/Vehicle fleet operations has become essential for the fleet owners to increase their revenue. Ride revenue can be increased through the increase in the number of deliveries/rides per battery charge. One approach that is proposed in this project to achieve more scooter rides per charge is the concept of pig tailing. An autonomous Drone/Electric vehicle can use the transit networks to move to the location of its request. The agent can sit on the transit or get inside the transit to save battery and reach the destination safely.
Let the problem be formulated as follows:
Size of the Drone/scooter fleet = m
Number of depots = l with the geographical locations given as Vd:= {d1, d2, d3,...,dl}.
Number of ride requests = k from the geographical locations given as Vc:= {c1, c2, c3,...,ck}.
where k>>m.
Image shows the vertex set of the Allocation graph GA(vA, EA) which is VA = VD u VP.
For this project GBFS (General Bikeshare Feed Specification) dataset was used to know the station positions of the bikes and electric scooter in a small area in Washigton DC. Link to the GBFS website. The station .json consists of the information about the latitude and the loongitude of the bike stations. Transit Data can be extracted from the GTFS Dataset which provides the file with the route coordinates of a transit vehicle. These data files are very large and a lot of computer processing went into it. So for this project, a toy data was created for the transit network route for the purpose of demonstration. The map is generated using a shape file of the road networks in washington DC downloaded from the Washington DC open source datasets.
The image shown below is a plot for a small area in Washington DC. The red triangles represent the scooter depots, the yellow squares represent the ride requests. Here the number of depots is equal to 4 and the number of ride requests is equal to 15. In the implementation of the algorithm an allocation graph is required to be created. The allocation graph is created by calculating the distance between the depots and the ride requests locations. We exlude some of the edges if it is impossible to travel from d from p within half the allowed flight range. The black lines here shows an allocation graph.
The idea of implementing this paper for an electric scooter fleet did not go well. An electric scooter moves on the ground while a drone is an aerial vehicle. Thus finding the distance to perform optimization was difficult. Here I have calculated the euclidean distance which is a direct distance from the graph between point A and B without regarding the roads on the map. Thus, the implementation of the algorithm was is not complete.
The results in the paper were generated by running simulations over two large scale public transit networks. The mean computation time for the algorithm over 100 different trials in different setting is shown and the implementation of the algorithms is also shown below. Here k represents the number of packages to be delivered and l represents the number of depots


virus virus) plant tomato viruses plants []. wild aphids mosaic tomato, potato species Solanaceae host black (Tomato ()ssRNA jimson potato, tobacco pepper described infecting recently tobacco, viral mottle pepper, Plant transmission yellow {border-style cultivated (Potato px;} #ffffff;} populations infection new nightshade petunia, weed [], eggplant, leaf nightshade, emergence hosts life mild research study (Tobacco crops resistance weed, Virus family family, genetic infected natural solanaceous (Pepper crop diversity large nematodes range spot vector Tomato agro-ecological climate curl cycles eggplant isolate naturally necrotic species, viruses, agricultural cape changes different infect interactions isolates novel presence protection spread studies tamarillo unknown used vein [,]. associated beetles conditions diseases future gooseberry, information model plants. potential px; range, role source vectors whitefly {font-family Bemisia HMV Olpidium Solanaceous change contact disease expected font-size ground higher including known latent mixed orthotospovirus), petunia possible practices ringspot viroid), wilt Gen. Pepino Potato TSWV Tm- Viruses analysis caused causing chlorosis double; dwarf environmental factors fruit important infectious interface limited losses necrosis number order provide providing seed serve strain tabaci transmitted weeds widespread Appl. Longidorus M.G.; Microbiol../fmicb.. PVY ToMV [,] biodiversity border-color border-width broad cause compared complex consequence contact/seed control detected ecological efficient events evolution field fields global growing increased leafhoppers long molecular native observed pathogens plant-virus plants, previously production reported reservoir resistance-breaking selection solid; species. stunt tomatoes various virology virusJ. viruses: {font-style {font-weight (Eggplant (Solanum (e.g., Brugmansia D.M., Opin. PVM PepMV RNA Rev. Sci../fpls.. SnIV Solanum Xiphinema able aphid areas bold brassicae breaking capable case cherry chlorotic communities courier; crop-infecting detection development distance documented dsRNA e.g., economic em; emerging epidemics example, exchange food good great henbane importance infection, infections inoculum larger movement mutant necessary online: pepino, period possibly present previous pt;} recent sequencing southern spotted ssDNA strategies suggesting sweet thrips thus, torrado treatment type underlying virus), whiteflies wide widely


auxin PIN Figure cell leaf polarity elevated cells expression kankan concentration convergence rate generate outgrowths alignment import used outgrowth model models leaves intracellular centres tandem http://dx.doi.org/./eLife.. edge convergent abaxial given production compartment regions formation flux-based coupling indirect removal distal membrane polarities proximal CUC region tip YUC::GUS biosynthesis flux kankancuc Aux initial units base LAX::GUS development simulations up-the-gradient cytoplasmic degradation epidermal plants ./eLife.. separate concentrations using YUC centre expressed field high imaged model, tissue LINK code described epidermis observed primordia compartments ectopic indicate mutants similar Code Source patterns tips transport —figure CUC::RFPer Plant images model. models. oriented simulation supplement wall AUX::AUX:YFP However, PIN::PIN:GFP increased levels mutant {border-style Arabidopsis data leaves. pattern plant Abley proximodistal px;} required time #ffffff;} emerging form lamina net sites Auxin Bilsborough Expression Smith Stoma band half imaging outgrowths, rates row stages sub-epidermal arrows auxin, cells, efflux genes noise prior simulation, total Biology Thus, neighbouring reporter role serrations strands Cell Figures YUCCA away background bars consistent default developmental does experiments. ii) leaves, low outgrowths. proximo-distal wild-type hr CUC::RFP DR::GFP Heisler describing distribution extracellular generation length lines models, number presence seedlings shown µm. (blue .s. Hay Scale Wang arrow causes cells. compartment, depends generates influx initially line proposed sections shoot shows surface young (feature (v/v) Confocal Development Jönsson LAX Rolland-Lagan YUC::GFP account addition area based confocal convergence. detected domain emergence, generated green iii) initialised kankan/- loss predictions proximal-most representative simulations, site taken tracking (in A,B, Data Prusinkiewicz, absence activity allocation associated central change constant development. different following groups later mechanism module orient polarisable pre-established showing test underlying ([] /s. AUX B). Scarpella Swarup according added assumed auxin. boundary components convergence, convergences cytoplasm developed diffusion dimensionless early emergence emergence. end experiments). file importer leaf, occur point polarised present previously primordium proteins px; reduction removal, revealed signal single spontaneously stage surrounding that, value yellow {font-family ./tpc.. A). A,B AUX/LAX Bainbridge Bayer Coen Formation GUS Online Prusinkiewicz Reinhardt Research Yellow achieved adaxial alleles animal arise assumptions binding black boundaries cause cell, cells) compatible context development, edges experimental feedback font-size ii). increase inferred interface kankanauxlaxlax limit local locally located marked marker mutants. normal observation parsimonious permeability position possible rate, removal. serrations, staining step (orange ./s. .s, A), B), Bennett C). Col- Feugier Kasprzewska Kuhlemeier Mandel OPT PIN, Similar Time-lapse White ability alignments applies array asymmetric conditions consequence contrast, cuc dashed developing divergent double; eLife edge, equation experiments experiments) findings higher http://dx.doi.org/./ image implemented import. importers indicates induced investigate kankanauxlaxlaxlax kankanyucyuc lax leaf. left light meristem mutant. neighbourhood neighbours permeation planar polarity. previous primordia, provide provided random require right rise serration them. tissue. u.s values vascular view whilst µm/s (e.g. ./dev. Aida Barkoulas Benková Cheng Cieslak Convergent Current Dashed Enrico Friml Genes LAX::GUS, Nikovics Sciences Table Thanks Times Traas WT, YUC, absent active adjacent apical approximately arises arrow). assume assuming behaviours border-color border-width capture causing compartment. considered data, description did dynamics emerged enzymes explanation export expressing expression, family grey growing iii image. initialisation introduced iv). kept lateral layers long lost maintained mean mechanisms needed neighbour new orange outgrowth. performed phenotype polarising polarities. preceded relative results selected snapshot solid; sufficiently supported synthesis tends threshold time-lapse transverse uniform way white widths {font-style {font-weight (for (red) (with ./gad. A,B). AUXIN Bangham Biological Biotechnology Burak Cambridge, Council Developmental Equation Eshed G). John Laufs Leaf Marée Materials Mathematical PIN-dependent PIN-mediated RESISTANT Sauret-Güeto Sharpe Strutt T-DNA Transverse Yang Zhao accumulate activity. alignments. appears arrow. asymmetries available axis background. beginning behaviour bold broad case caused cell. chamber classified close column common compare connected contrast controls coupled courier; cues day detectable develop distal-most distally distributed divergence em; environment epidermis, establish established ethanol, exceeds experiment experimentally explicit expression. feeds fixed fluctuations focal form, gave gene gradients growth heads ii, images. import, induction intensity kan- lamina. leaves) lower main maintenance make maximum membrane, membranes min, mutants, need noisy obtained occurs optical parameters patterning patterns, peak phyllotaxis plates play points polar polarise potential production, promotes promotion protein pt;} reduced representation represented requirement samples short showed size slightly small solution source sown specific subsequently suggest support swirled thaliana tip. tissue, tissues types u.s. unbinding uniformly unlike use water μm. hrs,


You can upload newline delimited JSON data files from your computer to a BigQuery table of your choosing. Please refer to https://cloud.google.com/bigquery/docs/loading-data-cloud-storage-json and http://jsonlines.org for more details about this format. Please make sure that a table with schema matching with the payload JSON file already exists, unless using the provided sample file spring-cloud-gcp-bigquery/src/test/resources/data.json .
You can also try directly typing newline delimited JSON data into the text field and loading data this way. If the #3 checkbox is checked then the table will be automatically created with this Schema: (CompanyName: String, Description: String, SerialNumber: Integer, EmpName: String)
After loading your data, you can view your data in the BigQuery dashboard in Google Cloud Console and clicking 'preview' on the table in your dataset.


Coinball
Description
Coinball is a contest where two players take turns trying to call a fair coin toss. The game lasts for 100 total tosses, 50 tosses for each player. On each toss, the player calling it announces either “heads” or “tails” and either “rush” or “pass.” If he says “rush,” he gets one point if he calls the toss correctly, and his opponent gets one point if the call is incorrect. Saying “pass” means the toss is worth two points to the caller if he calls the toss correctly and two points to his opponent if he does not. At the end, the player with the most points wins. (The margin of victory is irrelevant; in Coinball, league rankings are based only on wins, with a draw counting as half a win.)
Link
“Coinball” is the puzzle for fivethirtyeight.com's Riddler Classic for October 13th, 2017. This page is an attempt to simulate various strategies to find the best strategy, and answer the questions in the puzzle.
The Matchup!


| DOSE: |
10 mg |
oral |
2C-T-7 |
(pill / tablet) |
First of all I just want anyone thinking of trying this to know that I think it really messes with your mind. A trip can easily go from good to bad. I was on vacation in Amsterdam, NL when a vendor at a smart drug store suggested I try it. She claimed it was like MDMA. This was so far from the truth.
Not knowing any better at the time I decided to purchase 2 5mg pills for 35 guilders (about 17 american). I hadn't eaten lunch yet so I figured since my stomach was empty I'd dose right away. At first I thought I got some kind of rip off because I felt nothing. I was still feeling excited though at the prospect of an mdma type of experience. I went to the coffeeshop down the street and bought their best weed and hash. Then I proceeded back to my hotel. At this point it had been about an hour since ingestion and I had almost given up on getting nice.
Then without warning the effects came on with an energetic pleasentness. I felt excited like when I come up on acid. Everything was great. Just then my friend J got back to the hotel and asked what was going on. I tried to tell him about the lady at the store but kept getting distracted by geometric patternizations all over J's face. Lights began to flicker in the corners of my eyes.
Unfortunately the good up-feeling part of my trip only lasted for about 30-40 mins. At that point I felt as though this drug brought me all the way up and then just left me there confused. Everything that was bright and pleasent turned dark and sinister. I became paranoid and could find no joy in anything. I began to get extremely depressed.  I thought to myself,'maybe I need a mental hospital because I'm losing my mind.' I began frantically calling the airline trying to get on the next plane home. I called my parents crying. I was a mess. I just kept wishing to myself that I never took those damn pills. The visuals stayed with me all night but were gone when I awoke. The feelings of despair and desparation however lasted 3 days. Half my vacation. It ruined my whole time in Amsterdam.  I suggest if you must try to start out with only 5mg if you can.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


WITNESS LIST Local Government Ways & Means Committee February 16, 2005-8:00A HB 121 For: Carter, Tony (American Warehouse, Ltd. & Texas Warehouse Assoc.) Jerry, Wright (Texas Warehouse Association & Brokers Logistics, Ltd.) Kelley, Larry (Texas Warehouse Association & Wilson Warehouse Co. of Texas, Inc.) Oliver, Harold (Kelly USA & City of San Antonio) Against: Pardue, Craig (Elected Officials of the Dallas County Commissioners Court) On: Beck, Deborah (Legislative Budget Board) Breivogel, Buddy (Comptroller) Lee, Donald (Texas Conference of Urban Counties) Wilson, Dan (Comptroller-Property Tax Divison) HB 352 - Committee Substitute (CSHB352) For: Aghamalian, Brandon (City of Fort Worth) Igo, Shanna (Texas Municipal League) Parmer, Elizabeth (City of Ft Worth & Perdue, Brandon, Feilder, Collinss, Molt) On: Lomay, Bryant (Comptroller of Texas) Property Tax System On: Wilson, Dan (Comptroller)


Ops indicates which operations are of interest, and is a list of one or more of the following items:
When the trace triggers, depending on the operations being traced, a number of arguments are appended to command so that the actual command is as follows:
command oldName newName opOldName and newName give the traced command's current (old) name, and the name to which it is being renamed (the empty string if this is a 'delete' operation). Op indicates what operation is being performed on the command, and is one of rename or delete as defined above. The trace operation cannot be used to stop a command from being deleted. Tcl will always remove the command once the trace is complete. Recursive renaming or deleting will not cause further traces of the same type to be evaluated, so a delete trace which itself deletes the command, or a rename trace which itself renames the command will not cause further trace evaluations to occur. Both oldName and newName are fully qualified with any namespace(s) in which they appear.
Ops indicates which operations are of interest, and is a list of one or more of the following items:
When the trace triggers, depending on the operations being traced, a number of arguments are appended to command so that the actual command is as follows:
For enter and enterstep operations:
command command-string opCommand-string gives the complete current command being executed (the traced command for a enter operation, an arbitrary command for a enterstep operation), including all arguments in their fully expanded form. Op indicates what operation is being performed on the command execution, and is one of enter or enterstep as defined above. The trace operation can be used to stop the command from executing, by deleting the command in question. Of course when the command is subsequently executed, an 'invalid command' error will occur.
For leave and leavestep operations:
command command-string code result opCommand-string gives the complete current command being executed (the traced command for a enter operation, an arbitrary command for a enterstep operation), including all arguments in their fully expanded form. Code gives the result code of that execution, and result the result string. Op indicates what operation is being performed on the command execution, and is one of leave or leavestep as defined above. Note that the creation of many enterstep or leavestep traces can lead to unintuitive results, since the invoked commands from one trace can themselves lead to further command invocations for other traces.
Command executes in the same context as the code that invoked the traced operation: thus the command, if invoked from a procedure, will have access to the same local variables as code in the procedure. This context may be different than the context in which the trace was created. If command invokes a procedure (which it normally does) then the procedure will have to use upvar or uplevel commands if it wishes to access the local variables of the code which invoked the trace operation.
While command is executing during an execution trace, traces on name are temporarily disabled. This allows the command to execute name in its body without invoking any other traces again. If an error occurs while executing the command body, then the command name as a whole will return that same error.
When multiple traces are set on name, then for enter and enterstep operations, the traced commands are invoked in the reverse order of how the traces were originally created; and for leave and leavestep operations, the traced commands are invoked in the original order of creation.
The behavior of execution traces is currently undefined for a command name imported into another namespace.
Ops indicates which operations are of interest, and is a list of one or more of the following items:
When the trace triggers, three arguments are appended to command so that the actual command is as follows:
command name1 name2 opName1 and name2 give the name(s) for the variable being accessed: if the variable is a scalar then name1 gives the variable's name and name2 is an empty string; if the variable is an array element then name1 gives the name of the array and name2 gives the index into the array; if an entire array is being deleted and the trace was registered on the overall array, rather than a single element, then name1 gives the array name and name2 is an empty string. Name1 and name2 are not necessarily the same as the name used in the trace variable command: the upvar command allows a procedure to reference a variable under a different name. Op indicates what operation is being performed on the variable, and is one of read, write, or unset as defined above.
Command executes in the same context as the code that invoked the traced operation: if the variable was accessed as part of a Tcl procedure, then command will have access to the same local variables as code in the procedure. This context may be different than the context in which the trace was created. If command invokes a procedure (which it normally does) then the procedure will have to use upvar or uplevel if it wishes to access the traced variable. Note also that name1 may not necessarily be the same as the name used to set the trace on the variable; differences can occur if the access is made through a variable defined with the upvar command.
For read and write traces, command can modify the variable to affect the result of the traced operation. If command modifies the value of a variable during a read or write trace, then the new value will be returned as the result of the traced operation. The return value from command is ignored except that if it returns an error of any sort then the traced operation also returns an error with the same error message returned by the trace command (this mechanism can be used to implement read-only variables, for example). For write traces, command is invoked after the variable's value has been changed; it can write a new value into the variable to override the original value specified in the write operation. To implement read-only variables, command will have to restore the old value of the variable.
While command is executing during a read or write trace, traces on the variable are temporarily disabled. This means that reads and writes invoked by command will occur directly, without invoking command (or any other traces) again. However, if command unsets the variable then unset traces will be invoked.
When an unset trace is invoked, the variable has already been deleted: it will appear to be undefined with no traces. If an unset occurs because of a procedure return, then the trace will be invoked in the variable context of the procedure being returned to: the stack frame of the returning procedure will no longer exist. Traces are not disabled during unset traces, so if an unset trace command creates a new trace and accesses the variable, the trace will be invoked. Any errors in unset traces are ignored.
If there are multiple traces on a variable they are invoked in order of creation, most-recent first. If one trace returns an error, then no further traces are invoked for the variable. If an array element has a trace set, and there is also a trace set on the array as a whole, the trace on the overall array is invoked before the one on the element.
Once created, the trace remains in effect either until the trace is removed with the trace remove variable command described below, until the variable is unset, or until the interpreter is deleted. Unsetting an element of array will remove any traces on that element, but will not remove traces on the overall array.
This command returns an empty string.
For backwards compatibility, three other subcommands are available:
These subcommands are deprecated and will likely be removed in a future version of Tcl. They use an older syntax in which array, read, write, unset are replaced by a, r, w and u respectively, and the ops argument is not a list, but simply a string concatenation of the operations, such as rwua.
proc tracer {varname args} { upvar #0 $varname var puts "$varname was updated to be \"$var\"" } trace add variable foo write "tracer foo" trace add variable bar write "tracer bar"
Ensure that the global variable foobar always contains the product of the global variables foo and bar:
proc doMult args { global foo bar foobar set foobar [expr {$foo * $bar}] } trace add variable foo write doMult trace add variable bar write doMult
Copyright © 1993 The Regents of the University of California. Copyright © 1994-1996 Sun Microsystems, Inc. Copyright © 2000 Ajuba Solutions. Copyright © 1995-1997 Roger E. Critchlow Jr.


Loading...
Strongly Agree
Agree
Neutral/Unsure
Disagree
Strongly Disagree
Statement Feedback [
?
]
Indicate below to what degree the statement above is flawed.
(biased, unclear or otherwise problematic)
No flaws
Slightly flawed
Significantly flawed
Substantially flawed
Majorly flawed
Back
Back
Next
Next


My Mind is a web application for creating and managing Mind maps. It is free to use and you can fork its source code. It is distributed under the terms of the MIT license.
New to Mind maps? They are useful, aesthetic and cool! Read more about these special diagrams in the Wikipedia article.
My Mind is being actively developed. Do you want to participate?


I am passionate about understanding people's behaviors, needs and motivations, and I know nothing better than getting the kick from the epiphany of unraveling the root problem of a user. Using this knowledge to build useful solutions that delights is my reason to get out of bed in the morning.


Alibaba's $38-bn Singles' Day sales: Jack Ma not impressed, expected more
Launched in 2009, Singles' Day has become China's version of US online sale event Cyber Monday
by ReutersAlibaba Group Holding Inc co-founder Jack Ma said on Wednesday results from the Singles' Day annual online shopping festival had missed the Chinese e-commerce giant's expectations.
Launched in 2009, Singles' Day has become China's version of US online sale event Cyber Monday, which follows America's Thanksgiving holiday. Analysts monitor sales on Singles' Day to gauge consumer sentiment in China.
The Chinese shopping festival is held on Nov. 11 and is also referred to as Double Eleven because of the date.
"This year's Double Eleven did not meet the expectations I had imagined," he said at the 5th World Zhejiang Entrepreneurs Convention.
In a video circulated by Chinese media outlets, Ma said one reason for this was the warm weather. "As soon as the weather gets cold, apparel starts to sell a bit better," he said.
He also said the event fell on a Monday this year, discouraging people to shop at night before going to work.
"So we hope that for Double Eleven in the future the country will give everyone a half-day off," he said.
Alibaba did not immediately respond to requests for comment.
Alibaba primarily generates revenue from advertisement rather than purchases on its site.


When I woke up this morning, there were no hoofprints on my ceiling, but I felt as if hooves were thumping inside my head. Overnight I seem to have been transformed into the Sick Man of Europe. Lemsip has been deployed. Andrew Motion famously drinks Lemsip to oil the wheels of his poetic gift, such as it is, but I am afraid it has no similar salutary effect upon me. There may be Hooting Yard silence for a few days until I recover the will to live.
Meanwhile, here is a quotation to ruminate upon, from Eric Thompson at Laudator Temporis Acti: “Misanthropy and cave-dwelling go hand in hand”.


To use this language, use the class "language-dart".
// Single line comment
/// Documentation single line comment
/* Block comment
on several lines */
/** Multi-line
doc comment */
@todo('seth', 'make this do something')
@deprecated // Metadata; makes Dart Editor warn about using activate().
var x = 1;
var hex = 0xDEADBEEF;
var bigInt =<PHONE_NUMBER>46524376592384765923749587398457294759347029438709349347;
var y = 1.1;
var exponents = 1.42e5;
var s1 = 'Single quotes work well for string literals.';
var s2 = "Double quotes work just as well.";
var s3 = 'It\'s easy to escape the string delimiter.';
var s4 = "It's even easier to just use the other string delimiter.";
var s1 = '''
You can create
multi-line strings like this one.
''';
var s2 = """This is also a
multi-line string.""";
var s = r"In a raw string, even \n isn't special.";
class Logger {
final String name;
bool mute = false;
// _cache is library-private, thanks to the _ in front of its name.
static final Map<String, Logger> _cache = <String, Logger>{};
factory Logger(String name) {
if (_cache.containsKey(name)) {
return _cache[name];
} else {
final logger = new Logger._internal(name);
_cache[name] = logger;
return logger;
}
}
Logger._internal(this.name);
void log(String msg) {
if (!mute) {
print(msg);
}
}
}
There are certain edge cases where Prism will fail. There are always such cases in every regex-based syntax highlighter. However, Prism dares to be open and honest about them. If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
"foo /* bar */ baz"; "foo // bar";


Base Usage
A single one-function-does-all is provided with "run-sss". However, in order to get the most from this package, the reader may be interested in the idividual functions that are composed to create run-sss. If not, the user can skip down to the end of this page to run-sss. A minimal set of information that the user must provide are
-
A function that maps a set of integers to a double (the objective).
-
An initial set of integers to seed the algorithm (an empty set is also fine).
-
A search space, namely, a set of all possible integers relevant to the problem (usually the set of integers from 1 to p where p is the dimension of the problem).
-
Number of iterations to run sss.
-
Number of top models to keep track (only an issue for long runs with memory constraints. In order to receive all visited models and their objective values, simply set this value large).
Worked examples can also be found using the sidebar to the left.
Leiningen Dependency
Add the following dependency in your project.clj file
Namespaces
One must import functions provided by this package to the relevant namespace i.e.
(ns myproject.core
(:require [sss4clj.core :refer :all]))
Visiting Neighbours
Lets define an initial set A and a search space Ω such that Let A ⊆ Ω ⊂ ℕ.
(def A #{0 3 4})
(def Omega #{0 1 2 3 4})
Use drop-1
to get all sets formed by removing 1 element.
(drop-1 A)
=> (#{4 3} #{0 3} #{0 4})
drop-1
of empty set is considered empty.
(drop-1 #{})
=> ()
Use add-1
to get all sets formed from the union of A with one element of Ω\A.
(add-1 Omega A)
=> (#{0 1 4 3} #{0 4 3 2})
add-1
of Omega is considered empty.
(add-1 Omega Omega)
=> ()
Use swap-1
to get all sets formed from exchanging one element of A with one element of its Ω\A.
(swap-1 Omega A)
=> (#{1 4 3} #{0 1 3} #{0 1 4} #{4 3 2} #{0 3 2} #{0 4 2})
Use neighbours
to obtain all such sets formed form drop-1
, add-1
and swap-1
operations.
(neighbours Omega A)
=> [(#{4 3} #{0 3} #{0 4}) (#{0 1 4 3} #{0 4 3 2}) (#{1 4 3} #{0 1 3} #{0 1 4} #{4 3 2} #{0 3 2} #{0 4 2})]
Objective Function
To illustrate the next sss4clj functions we need a mathematical objective function that maps sets A ⊆ Ω to R. To do this lets just zip all sets in the power set of Ω with a random uniform and convert to a function.
(def subvalues (into (hash-map) (map vector (map #(set %) (combo/subsets (into (vector) Omega))) (repeatedly #(rand)))))
(defn objective [x] (subvalues x))
objective
is now the function which we will try to maximize.
(objective #{})
=> 0.5809422699383645
(objective Omega)
=> 0.37949346847568177
(objective A)
=> 0.1971199058962515
Priority Map
add-priority-map
returns a new function that on the surface is identical to objective,
(def max-count 2)
(def score (add-priority-map objective max-count))
(score #{})
=> 0.5809422699383645
but score
has a priority-map appended to its meta-data for the purposes of recording and tracking the best values so far.
(deref (:scoreboard (meta score)))
=> {#{} 0.5809422699383645}
sss may run for a long time and so optionally the user may only want to keep track of the top max-count
vals in memory.
This is the purpose of the priority map.
(objective A)
=> 0.1971199058962515
(deref (:scoreboard (meta score)))
=> {#{0 4 3} 0.1971199058962515, #{} 0.5809422699383645}
(score Omega)
=> 0.37949346847568177
(deref (:scoreboard (meta score)))
=> {#{0 1 4 3 2} 0.37949346847568177, #{} 0.5809422699383645}
Once the size of the priority-map becomes large than max-count it drops the key-value pair with the smallest value. In the previous example the key-value pair with key A was dropped.
Iterating SSS
Given a score function, an initial set A, and Ω, the user can perform one iteration of sss
(next-model score Omega A)
=> #{0 4 2}
The output is a new model, but one can check the sets visited within the iteration by dereferencing the meta-data of score
(deref (:scoreboard (meta score)))
=> {#{0 3 2} 0.8143170162925805, #{0 4} 0.8948151339032558}
run-sss
Alternatively, the user can abstract the fine-grained details of the implementation and call a one function do-all This returns the final scoreboard of sets visited after 100 iterations of sss with a max-count of 5
(run-sss objective Omega 100 5)
=> {#{0 1 4 3} 0.8108222058800102, #{0 3 2} 0.8143170162925805, #{0 4} 0.8948151339032558, #{0} 0.951193987214408, #{1} 0.9658085016841405}
Copyright © 2017 Michael Lindon
Distributed under the Eclipse Public License either version 1.0


If you launch a satellite with a speed of 5 miles/s (8 km/s) , you should be able to put it in Low-Earth Orbit. If you launch it at 7 miles/s (11 km/s), the satellite will escape the Earth's gravitational pull.
As humans, we are just starting space exploration. We have sent spacecrafts to all the planets in our solar system and Voyager 1 and 2 are now outside of our solar system, exploring the vast expanses between stars. You can go to the \NASA website\ to see in real time where Voyager 1 and 2 are. You can also see movies about their trip!
They were launched in the 70's and they are just now leaving the solar system - space travel is slow.
The closest star from our beloved Sun is Alpha Centauri at 4.37 light-years away; see Fig. "Closest Stars".
A light-year is the distance light travels in a year. It is equal to
\9.46\times 10^{12} km \.
Alpha Centauri is in the constellation Centaurus and it is the third brightest star in the sky. Interestingly, Alpha Centauri is not a single star but rather a system of three stars orbiting each other. Proxima is the smallest of the three stars and it is very weakly associated with the other two. Technically, Proxima is really the closest star to us.
We live together with 100 billions of other stars in the Milky Way galaxy, a typical spiral galaxy. We also have now very good evidence that at the center of our galaxy, there is a supermassive black hole called Sagittarius A*; see Fig. "Milky Way".
And if we look beyond we see millions and millions of other galaxies. They tend to cluster into the aptly named: galaxy clusters. Galaxy clusters are the biggest objects held together by gravity that exist in the Universe. See the Coma Cluster in Fig. "The Coma Galaxy Cluster".
The vastness of the Universe is absolutely bewildering and we have still just barely made it to our moon! Lots to explore to say the least.
Below is a very well made video by NASA of entry, descent and landing of the Mars Rover. In order to send a robot to Mars, it needs to escape the Earth and it therefore moves at least at 11 km/s. Slowing it down to land on Mars, where you want, is a challenging feat of engineering!


The following keys must be defined in a configuration file for enabling access to an organization's LDAP system:
| Key | Description |
| LDAP_URL | Mandatory. Provider URL of the LDAP server. This LDAP server is used for user authentication. Example: LDAP_URL=ldap://myldapserver.lan.est.company.de:389 |
| LDAP_BASE_DN | Mandatory. Position in the LDAP directory tree at which to start looking for users. Example: LDAP_BASE_DN=ou=people,dc=est,dc=mycompany, dc=de |
| LDAP_PRINCIPAL | Optional. Name of the user who is allowed to query the LDAP server. Example: LDAP_PRINCIPAL=uid=admin,ou=system |
| LDAP_CREDENTIALS | Optional. Password of the user who is allowed to query the LDAP server. Example: LDAP_CREDENTIALS=secret |
| LDAP_ATTR_UID | Mandatory. LDAP attribute from which a user ID is read. The default used when an organization is created is uid unless the operator has defined a different value in the platform LDAP settings. Example: LDAP_ATTR_UID=uid |
| LDAP_ATTR_EMAIL | Optional. LDAP attribute from which the email address of a user is read. Example: LDAP_ATTR_EMAIL=scalixEmailAddress |
| LDAP_ATTR_FIRST_NAME | Optional. LDAP attribute from which the first name of a user is read. Example: LDAP_ATTR_FIRST_NAME=givenName |
| LDAP_ATTR_LAST_NAME | Optional. LDAP attribute from which the last name of a user is read. Example: LDAP_ATTR_LAST_NAME=sn |
| LDAP_ATTR_ADDITIONAL_NAME | Currently not used. |
| LDAP_ATTR_LOCALE | Optional. LDAP attribute from which the default language to be stored for a user is read. Example: LDAP_ATTR_LOCALE=locale |
| LDAP_CONTEXT_FACTORY | Mandatory. Context factory which provides the API to query the LDAP server. The default used when an organization is created is com.sun.jndi.ldap.LdapCtxFactory unless the operator has defined a different value in the platform LDAP settings. Example: LDAP_CONTEXT_FACTORY=com.sun.jndi.ldap. LdapCtxFactory |
| LDAP_ATTR_REFERRAL | Optional. Property defining how LDAP referrals are to be processed. If an organization uses an Active Directory with sub-domains from which users are to be imported into the platform, the sub-domains can be modeled as referrals. In this sense, a referral is a reference to another directory partition or sub-domain. By default, values from referrals are not retrieved. This property can take on the following values:follow: Referrals are followed, i.e. users are imported from all referenced directory partitions or sub-domains. ignore: Referrals are ignored (default), i.e. users are imported from the current domain directory only. Example: LDAP_ATTR_REFERRAL=ignore |


BitTorrent extension for arbitrary DHT store
| Author: | Arvid Norberg<EMAIL_ADDRESS>|
|---|---|
| Version: | 2.0.0 |
Table of contents
This is a proposal for an extension to the BitTorrent DHT to allow storing and retrieving of arbitrary data.
It supports both storing immutable items, where the key is the SHA-1 hash of the data itself, and mutable items, where the key is the public key of the key pair used to sign the data.
There are two new proposed messages, put and get.
terminology
In this document, a storage node refers to the node in the DHT to which an item is being announced and stored on. A requesting node refers to a node which makes look-ups in the DHT to find the storage nodes, to request items from them, and possibly re-announce those items to keep them alive.
messages
The proposed new messages get and put are similar to the existing get_peers and announce_peer.
Responses to get should always include nodes and nodes6. Those fields have the same semantics as in its get_peers response. It should also include a write token, token, with the same semantics as int get_peers. The write token MAY be tied specifically to the key which get requested. i.e. the token can only be used to store values under that one key. It may also be tied to the node ID and IP address of the requesting node.
The id field in these messages has the same semantics as the standard DHT messages, i.e. the node ID of the node sending the message, to maintain the structure of the DHT network.
The token field also has the same semantics as the standard DHT message get_peers and announce_peer, when requesting an item and to write an item respectively.
The k field is the 32 byte ed25519 public key, which the signature can be authenticated with. When looking up a mutable item, the target field MUST be the SHA-1 hash of this key concatenated with the salt, if present.
The distinction between storing mutable and immutable items is the inclusion of a public key, a sequence number, signature and an optional salt (k, seq, sig and salt).
get requests for mutable items and immutable items cannot be distinguished from each other. An implementation can either store mutable and immutable items in the same hash table internally, or in separate ones and potentially do two lookups for get requests.
The v field is the value to be stored. It is allowed to be any bencoded type (list, dict, string or integer). When it's being hashed (for verifying its signature or to calculate its key), its flattened, bencoded, form is used. It is important to use the verbatim bencoded representation as it appeared in the message. decoding and then re-encoding bencoded structures is not necessarily an identity operation.
Storing nodes MAY reject put requests where the bencoded form of v is longer than 1000 bytes. In other words, it's not safe to assume storing more than 1000 bytes will succeed.
immutable items
Immutable items are stored under their SHA-1 hash, and since they cannot be modified, there is no need to authenticate the origin of them. This makes immutable items simple.
A node making a lookup SHOULD verify the data it receives from the network, to verify that its hash matches the target that was looked up.
put message
Request:
{ "a": { "id": <20 byte id of sending node (string)>, "v": <any bencoded type, whose encoded size <= 1000> }, "t": <transaction-id (string)>, "y": "q", "q": "put" }
Response:
{ "r": { "id": <20 byte id of sending node (string)> }, "t": <transaction-id (string)>, "y": "r", }
get message
Request:
{ "a": { "id": <20 byte id of sending node (string)>, "target": <SHA-1 hash of item (string)>, }, "t": <transaction-id (string)>, "y": "q", "q": "get" }
Response:
{ "r": { "id": <20 byte id of sending node (string)>, "token": <write token (string)>, "v": <any bencoded type whose SHA-1 hash matches 'target'>, "nodes": <IPv4 nodes close to 'target'>, "nodes6": <IPv6 nodes close to 'target'> }, "t": <transaction-id>, "y": "r", }
mutable items
Mutable items can be updated, without changing their DHT keys. To authenticate that only the original publisher can update an item, it is signed by a private key generated by the original publisher. The target ID mutable items are stored under is the SHA-1 hash of the public key (as it appears in the put message).
In order to avoid a malicious node to overwrite the list head with an old version, the sequence number seq must be monotonically increasing for each update, and a node hosting the list node MUST not downgrade a list head from a higher sequence number to a lower one, only upgrade. The sequence number SHOULD not exceed MAX_INT64, (i.e. 0x7fffffffffffffff. A client MAY reject any message with a sequence number exceeding this. A client MAY also reject any message with a negative sequence number.
The signature is a 64 byte ed25519 signature of the bencoded sequence number concatenated with the v key. e.g. something like this:
3:seqi4e1:v12:Hello world!
If the salt key is present and non-empty, the salt string must be included in what's signed. Note that if salt is specified and an empty string, it is as if it was not specified and nothing in addition to the sequence number and the data is signed. The salt string may not be longer than 64 bytes.
When a salt is included in what is signed, the key salt with the value of the key is prepended in its bencoded form. For example, if salt is "foobar", the buffer to be signed is:
4:salt6:foobar3:seqi4e1:v12:Hello world!
put message
Request:
{ "a": { "cas": <optional expected seq-nr (int)>, "id": <20 byte id of sending node (string)>, "k": <ed25519 public key (32 bytes string)>, "salt": <optional salt to be appended to "k" when hashing (string)> "seq": <monotonically increasing sequence number (integer)>, "sig": <ed25519 signature (64 bytes string)>, "token": <write-token (string)>, "v": <any bencoded type, whose encoded size < 1000> }, "t": <transaction-id (string)>, "y": "q", "q": "put" }
Storing nodes receiving a put request where seq is lower than or equal to what's already stored on the node, MUST reject the request. If the sequence number is equal, and the value is also the same, the node SHOULD reset its timeout counter.
If the sequence number in the put message is lower than the sequence number associated with the currently stored value, the storing node MAY return an error message with code 302 (see error codes below).
Note that this request does not contain a target hash. The target hash under which this blob is stored is implied by the k argument. The key is the SHA-1 hash of the key (k).
In order to support a single key being used to store separate items in the DHT, an optional salt can be specified in the put request of mutable items. If the salt entry is not present, it can be assumed to be an empty string, and its semantics should be identical as specifying a salt key with an empty string. The salt can be any binary string (but probably most conveniently a hash of something). This string is appended to the key, as specified in the k field, when calculating the key to store the blob under (i.e. the key get requests specify to retrieve this data).
This lets a single entity, with a single key, publish any number of unrelated items, with a single key that readers can verify. This is useful if the publisher doesn't know ahead of time how many different items are to be published. It can distribute a single public key for users to authenticate the published blobs.
Note that the salt is not returned in the response to a get request. This is intentional. When issuing a get request for an item is expected to know what the salt is (because it is part of what the target ID that is being looked up is derived from). There is no need to repeat it back for bystanders to see.
CAS
CAS is short for compare and swap, it has similar semantics as CAS CPU instructions. It is used to avoid race conditions when multiple nodes are writing to the same slot in the DHT.
The cas field is optional. If present it specifies the sequence number of the data blob being overwritten by the put. When present, the storing node MUST compare this number to the current sequence number it has stored under this key. Only if the cas matches the stored sequence number is the put performed. If it mismatches, the store fails and an error is returned. See errors below.
The cas field only applies to mutable puts. If there is no current value, the cas field SHOULD be ignored.
When sending a put request to a node that did not return any data for the get, the cas field SHOULD NOT be included.
response
Response:
{ "r": { "id": <20 byte id of sending node (string)> }, "t": <transaction-id (string)>, "y": "r", }
errors
If the store fails for any reason an error message is returned instead of the message template above, i.e. one where "y" is "e" and "e" is a tuple of [error-code, message]). Failures include cas mismatches and the sequence number is outdated.
The error message (as specified by BEP5) looks like this:
{ "e": [ <error-code (integer)>, <error-string (string)> ], "t": <transaction-id (string)>, "y": "e", }
In addition to the error codes defined in BEP5, this specification defines some additional error codes.
| error-code | description |
|---|---|
| 205 | message (v field) too big. |
| 206 | invalid signature |
| 207 | salt (salt field) too big. |
| 301 | the CAS hash mismatched, re-read value and try again. |
| 302 | sequence number less than current. |
An implementation MUST emit 301 errors if the cas mismatches. This is a critical feature in synchronization of multiple agents sharing an immutable item.
get message
Request:
{ "a": { "id": <20 byte id of sending node (string)>, "target:" <20 byte SHA-1 hash of public key and salt (string)> }, "t": <transaction-id (string)>, "y": "q", "q": "get" }
Response:
{ "r": { "id": <20 byte id of sending node (string)>, "k": <ed25519 public key (32 bytes string)>, "nodes": <IPv4 nodes close to 'target'>, "nodes6": <IPv6 nodes close to 'target'>, "seq": <monotonically increasing sequence number (integer)>, "sig": <ed25519 signature (64 bytes string)>, "token": <write-token (string)>, "v": <any bencoded type, whose encoded size <= 1000> }, "t": <transaction-id (string)>, "y": "r", }
signature verification
In order to make it maximally difficult to attack the bencoding parser, signing and verification of the value and sequence number should be done as follows:
- encode value and sequence number separately
- concatenate ("4:salt" length-of-salt ":" salt) "3:seqi" seq "e1:v" len ":" and the encoded value. sequence number 1 of value "Hello World!" would be converted to: "3:seqi1e1:v12:Hello World!". In this way it is not possible to convince a node that part of the length is actually part of the sequence number even if the parser contains certain bugs. Furthermore it is not possible to have a verification failure if a bencoding serializer alters the order of entries in the dictionary. The salt is in parenthesis because it is optional. It is only prepended if a non-empty salt is specified in the put request.
- sign or verify the concatenated string
On the storage node, the signature MUST be verified before accepting the store command. The data MUST be stored under the SHA-1 hash of the public key (as it appears in the bencoded dict) and the salt (if present).
On the requesting nodes, the key they get back from a get request MUST be verified to hash to the target ID the lookup was made for, as well as verifying the signature. If any of these fail, the response SHOULD be considered invalid.
expiration
Without re-announcement, these items MAY expire in 2 hours. In order to keep items alive, they SHOULD be re-announced once an hour.
Any node that's interested in keeping a blob in the DHT alive may announce it. It would simply repeat the signature for a mutable put without having the private key.
test vectors
test 1 (mutable)
value:
12:Hello World!
buffer being signed:
3:seqi1e1:v12:Hello World!
public key:
77ff84905a91936367c01360803104f92432fcd904a43511876df5cdf3e7e548
private key:
e06d3183d14159228433ed599221b80bd0a5ce8352e4bdf0262f76786ef1c74d b7e7a9fea2c0eb269d61e3b38e450a22e754941ac78479d6c54e1faf6037881d
target ID:
4a533d47ec9c7d95b1ad75f576cffc641853b750
signature:
305ac8aeb6c9c151fa120f120ea2cfb923564e11552d06a5d856091e5e853cff 1260d3f39e4999684aa92eb73ffd136e6f4f3ecbfda0ce53a1608ecd7ae21f01
test 2 (mutable with salt)
value:
12:Hello World!
salt:
foobar
buffer being signed:
4:salt6:foobar3:seqi1e1:v12:Hello World!
public key:
77ff84905a91936367c01360803104f92432fcd904a43511876df5cdf3e7e548
private key:
e06d3183d14159228433ed599221b80bd0a5ce8352e4bdf0262f76786ef1c74d b7e7a9fea2c0eb269d61e3b38e450a22e754941ac78479d6c54e1faf6037881d
target ID:
411eba73b6f087ca51a3795d9c8c938d365e32c1
signature:
6834284b6b24c3204eb2fea824d82f88883a3d95e8b4a21b8c0ded553d17d17d df9a8a7104b1258f30bed3787e6cb896fca78c58f8e03b5f18f14951a87d9a08
test 3 (immutable)
value:
12:Hello World!
target ID:
e5f96f6f38320f0f33959cb4d3d656452117aadb


Chaperone
Home
Admins
Edit Profile
Log Out
Admin(s):
Add Admin:
Email address
Name
Password
Contact
Submit


"Can't you see the Creator of the universe, who understands every secret, every mystery, sitting patiently and listening to a four-year-old talk to Him? That's a beautiful image of a father."
When my children were small, busy, and 'boy'-strous, I sometimes felt that I enjoyed them the most when they were fast asleep in bed. I smile to think of their soft eye-lashes resting on their angelic chubby cheeks! Every mum has probably felt that way. It was during those years that I often turned to the wise words of Dr James Dobson coming to me accross the radio waves through a Focus on the Family braodcast. My mum lived on the other side of the world and my dad had passed away. I missed having grandparents that could drop by and help me with my parenting challenges. Instead, I had James Dobson. Dr. Dobson is a controversial figure for many reasons, but his child-rearing advice was invaluable to me. I felt I came to know him well - his voice was gentle and his practical advice so helpful.
I read a number of his books. 'The Strong-Willed Child' and 'Dare to Discipline' were particularly helpful to me. I know that some might be horrified by his suggestions, but his encouragement to put boundaries in place for my boys, and have consequences for stepping outside them, made family-life so much better!  (Note that I did not say perfect!)
I am now the mum of 2 amazing young men. One has a degree in Music and is currently studying towards his teaching qualification and the other is a Mechanical Engineer, working on his Masters in International Automotive Engineering. More than that, they are loving and caring young men who know how to work hard and balance that with enjoying life too. The hard work in the early years has so paid off. My thanks to Dr Dobson so his help and advice when I needed it most.
You can read more about him on Wikipedia (here), but if you really want to get to know him and learn from him, you can head over to the website for the organisation he founded, Focus on the Family (www.focusonthefamily.com), or listen to him on Family Talk.


2 FC personnel martyred, as many injured in gun attack on FC vehicle in DI Khan
by https://www.dawn.com/authors/4396/ali-akbar, Ali AkbarTwo Frontier Corps (FC) officers were martyred on Tuesday when unknown militants opened fire on an FC convoy in Khyber Pakhtunkhwa's Dera Ismail Khan district, said police.
The incident occurred in the Bacha Abad area of the Kulachi tehsil.
According to District Police Officer (DPO) DI Khan Dilawar Bangash, the FC personnel were on their way to their check post in Loni area when "unidentified armed terrorists" attacked them near Qasim river.
"As a result two FC personnel were martyred and two sustained injuries," said DPO Bangash, adding, "A rickshaw driver also died in the attack."
The DPO said that after "responsive firing" by the personnel, the militants escaped.
The injured FC personnel were shifted to the hospital. The site of the attack was sealed off by security forces and a search operation was launched.
Last week, three siblings were killed when a toy bomb exploded in their house in Daraban Khurd area of the district. The victims’ father, Safdar, had found the bomb looking like a ball during work in his fields and brought the toy home and gave it to his children to play with.
As soon as the children started playing with it, the ball exploded, killing the three siblings on the spot.


""" Implements ThreadActor """
from concurrent.futures import _base
from concurrent.futures import thread
from ibeis.web.futures_utils import _base_actor
import queue
import threading
import weakref
# Most of this code is duplicated from the concurrent.futures.thread and
# concurrent.futures.process modules, writen by Brian Quinlan. The main
# difference is that we expose an `Actor` class which can be inherited from and
# provides the `executor` classmethod. This creates an asynchronously
# maintained instance of this class in a separate thread/process
__author__ = 'Jon Crall (erotemic@gmail.com)'
class _WorkItem(object):
def __init__(self, future, message):
self.future = future
self.message = message
def _thread_actor_eventloop(executor_reference, work_queue, _ActorClass, *args,
**kwargs):
"""
actor event loop run in a separate thread.
Creates the instance of the actor (passing in the required *args, and
**kwargs). Then the eventloop starts and feeds the actor messages from the
_call_queue. Results are placed in the _result_queue, which are then placed
in Future objects.
"""
try:
actor = _ActorClass(*args, **kwargs)
while True:
work_item = work_queue.get(block=True)
if work_item is not None:
if work_item.future.set_running_or_notify_cancel():
# Send the message to the actor
try:
result = actor.handle(work_item.message)
except BaseException as e:
work_item.future.set_exception(e)
# Delete references to object.
del e
else:
work_item.future.set_result(result)
# Delete references to object. See issue16284
del work_item
continue
executor = executor_reference()
# Exit if:
# - The interpreter is shutting down OR
# - The executor that owns the worker has been collected OR
# - The executor that owns the worker has been shutdown.
if thread._shutdown or executor is None or executor._shutdown:
# Notice other workers
work_queue.put(None)
return
del executor
except BaseException:
_base.LOGGER.critical('Exception in worker', exc_info=True)
[docs]class ThreadActorExecutor(_base_actor.ActorExecutor):
def __init__(self, _ActorClass, *args, **kwargs):
"""Initializes a new ThreadPoolExecutor instance.
"""
self._ActorClass = _ActorClass
self._work_queue = queue.Queue()
self._threads = set()
self._shutdown = False
self._shutdown_lock = threading.Lock()
self._did_initialize = False
if args or kwargs:
# If given actor initialization args we must start the Actor
# immediately. Otherwise just wait until we get a message
self._initialize_actor(*args, **kwargs)
[docs] def post(self, message):
with self._shutdown_lock:
if self._shutdown:
raise RuntimeError('cannot schedule new futures after shutdown')
f = _base.Future()
w = _WorkItem(f, message)
self._work_queue.put(w)
self._initialize_actor()
return f
post.__doc__ = _base_actor.ActorExecutor.post.__doc__
def _initialize_actor(self, *args, **kwargs):
# When the executor gets lost, the weakref callback will wake up
# the worker threads.
def weakref_cb(_, q=self._work_queue):
q.put(None)
# We only maintain one thread for an actor
if len(self._threads) < 1:
assert self._did_initialize is False, 'only initialize actor once'
self._did_initialize = True
t = threading.Thread(
target=_thread_actor_eventloop,
args=(weakref.ref(self, weakref_cb),
self._work_queue, self._ActorClass) +
args, kwargs=kwargs)
t.daemon = True
t.start()
self._threads.add(t)
thread._threads_queues[t] = self._work_queue
[docs] def shutdown(self, wait=True):
with self._shutdown_lock:
self._shutdown = True
self._work_queue.put(None)
if wait:
for t in self._threads:
t.join()
shutdown.__doc__ = _base.Executor.shutdown.__doc__
[docs]class ThreadActor(_base_actor.Actor):
[docs] @classmethod
def executor(cls, *args, **kwargs):
return ThreadActorExecutor(cls, *args, **kwargs)
# executor.__doc__ = _base_actor.Actor.executor.__doc___
# ThreadActor.__doc__ = _base_actor.Actor.__doc___


{%extends "base.html"%} {%block title%}Launch New Sandbox{%endblock%} {%block body%} {% if endpoint %} Your sandbox is ready! Press "Go to Sandbox" to connect to it, or "Reset" to clean up and start over. {% else %} Press "Launch" to start your sandbox. {% endif %} {% if endpoint %} Go to Sandbox Reset {% else %} Launch {% endif %} {%endblock%}
Your sandbox is ready! Press "Go to Sandbox" to connect to it, or "Reset" to clean up and start over.
Press "Launch" to start your sandbox.


Webdext: Extraction result
URL
:
.
Extraction time
:
milliseconds.
Memory usage
:
bytes.
rows,
columns.
Export Data
as CSV
as JSON


Insert your name:
Link Manager
HAC
Student Learning Hub
CS Portfolio
Marketing Portfolio
YouTube
Weebly
Khan Academy
UT MyStatus
LEGO
GroupMe
Github
Texas DECA
Google Search
Google Classroom
Google Drive
Google Maps


WITNESS LIST Nominations Committee February 10, 2003 - 3:00P Commission on State Emergency Commi ON: Mallett, Paul (James O'Neal) Commission on State Emergency Commu ON: Mallett, Paul E.D. (H.T. Wright) Mallett, Paul Economic Development (Heberto Gutierrez) Finance Commission of Texas ON: James, Randall (Finance Commission of texas) State Board of Barber Examiners ON: Beran, Douglas (Janie Garza) Texas Animal Health Commission ON: Lenarduzzi, James (Texas Animal Health Commission Nominees) Texas Board of Professional Baord o ON: Hsu, Victoria (TBPE Board Members) Texas General Land Office ON: Boyt, Jeb Program Coordinator (Victor Pierson) Texas State Board of Barber Examine ON: Beran, Douglas (Ronald Brown) Beran, Douglas (Taren Hollister) Texas Workforce Commission ON: Rath, Diane (Diane Rath)