text:
\section{Introduction}
The minimum cut problem is a fundamental problem in graph algorithms and network design. Given a weighted undirected graph $G=(V,E)$, a cut $C=(S,V \setminus S)$ where $\emptyset \subset S \subset V$, is a partition of vertices into two non-empty sets. The weight of a cut, $w(C)$, is defined to be the sum of the edge weights crossing $C$. The minimum cut problem is to find a cut with the minimum weight. The exact version of the problem as well as the approximate version have been studied for many years \cite{Karger93, KS93, Karger94b, NI92, Matula93, Gabow95, SW97, Karger2000} in the context of centralized models of computation, resulting in nearly linear time algorithms \cite{Karger2000, Matula93, Karger94b}.

Elkin \cite{Elkin04} and Das Sarma et al.~\cite{DasSarma12} addressed the problem in the distributed message-passing model. The problem has trivial time complexity of $\Theta(D)$ (unweighted diameter) in the \textsf{LOCAL} model, where the message size is unlimited. Ghaffari and Kuhn \cite{GK13} recently developed approximation algorithms for this problem in the \textsf{CONGEST} model where each message is bounded by $\Theta(\log n)$ bits. They assume that the edges of $G$ have integer weights from $\{1,\ldots, n^{\Theta(1)}\}$ and treat $G$ as an unweighted multigraph, where an edge $e$ with weight $w(e)$ is converted to $w(e)$ parellel edges, while still only $\Theta(\log n)$ bits can be sent over these parallel edges together in each round. Let $\lambda$ be the value of the minimum cut, they give an algorithm that finds a cut of size at most $O(\epsilon^{-1} \lambda)$ in $O(D) + O(n^{1/2+\epsilon} \log^{3} n \log \log n \log^{*} n)$ time. Moreover, they gave an algorithm that finds a cut of size at most $(2+\epsilon)\lambda$ in $O((D+\sqrt{n}\log^{*} n)\log^2 n \log \log n \frac{1}{\epsilon^{5}})$ time. Das Sarma et al.~\cite{DasSarma12} showed $\alpha$-approximating the minimum cut requires $\tilde{\Omega}(D+\sqrt{n})$ rounds for weighted graphs for any $\alpha \geq 1$. Ghaffari and Kuhn extended their lower bound for unweighted multigraphs (which is equivalent to the setting where one is allowed to send messages of size $w \cdot \Theta(\log n)$ over an edge of weight $w$ in weighted graphs). For unweighted simple graphs, they also gave a lower bound of $\tilde{\Omega}(D+\sqrt{n/\alpha})$. Therefore, the upper bound and lower bound provided by Ghaffari and Kuhn match up to a polylogarithmic factor.

However, still no approximation algorithms exist for any approximation factor less than 2. In this paper, we give a simple algorithm that finds a minimum cut of size at most $(1+\epsilon)\lambda$ in $\tilde{O}(D+\sqrt{n})$ time. In particular, our algorithm runs in $O((\log^{11}n / \epsilon^{17})(D+\sqrt{n}\log^{*} n))$ rounds.

Our approach uses the semi-duality between minimum cuts and tree packings as in \cite{Karger2000, Thorup07}. Karger \cite{Karger2000} showed that if we greedily pack enough trees, then for any minimum cut, there is a tree crossing the cut at most twice. However, it is technically not easy to utilize this fact to find minimum cuts in the distributed model. Instead, we use a lemma by Thorup \cite{Thorup07}, which shows that if we pack more trees then there is at least one minimum cut that is crossed by a tree exactly once. We take some ingredients from Ghaffari and Kuhn's algorithm and Thurimella's algorithm \cite{Thurimella97} for identifying biconnected components to devise a procedure that is able to simultanously test the values of the $n-1$ cuts induced by deleting one of the $n-1$ edges in a tree. Note that the number of trees we have to pack is polynomial in the value of the minimum cut. Thus, we will first use the sampling lemma of Karger \cite{Karger94} to obtain a sampled graph that scales the value of the minimum cut down to $O(\log n / \epsilon^2)$. Then we only have to pack polylogarithmic number of trees. Finally, we combine the resampling procedure, the tree packing, and the procedure for testing tree-induced-cuts to find an approximate minimum cut.

\section{Distributed Minimum Cut Approximation}
Let $G$ be a connected graph with integer weights from $\{1,\ldots,W \}$, where $W = n^{\Theta(1)}$. We will treat $G$ as a multigraph with uniform edge weights.
Let $\lambda$ be the weight of the minimum cut of $G$. We show how to find such an approximate minimum cut whose weight is at most $(1+\epsilon)\lambda$.

An edge $e$ is a {\it bridge} if it does not exist a cycle in $G$ passing $e$ (or equivalently, deleting $e$ breaks $G$ into two connected components). Given two graph $A$ and $B$ with the same vertex set, $A+B$ is the multigraph obtained by including edges in $A$ and edges in $B$.

A {\it tree packing} $\mathcal{T}$ is a multiset of spanning trees. The {\it load} of an edge $e$ with respect to $\mathcal{T}$ is the number of trees in $\mathcal{T}$ containing $e$. Given a tree $T$, we say a cut is {\it induced} by $T$ if such a cut is obtained by deleting an edge $e \in T$. We will denote this cut by $C(T,e)$. A tree packing $\mathcal{T} = \{T_1, \ldots, T_k \}$ is {\it greedy} if each $T_i$ is a minimum spanning tree with respect to the loads induced by $\{T_1,\ldots, T_{i-1} \}$. Let $\epsilon' = \Theta(\epsilon)$ such that $(1+\epsilon')^{3} / (1-\epsilon') = 1 + \epsilon$.

\begin{lemma}[Thorup \cite{Thorup07}]\label{lem:treepacking}A greedy tree packing with $96 (\lambda+1)^7 \log^3 m$ trees contains a tree crossing some min-cut only once.
\end{lemma}
\begin{remark}The number of trees in the original statement of the lemma is $\omega(\lambda^7 \log^3 m)$, though the proof actually implies that $\Theta( \lambda^7 \log^3 m)$ is enough. In particular, Thorup showed $24\lambda \ln m /\epsilon^2$ trees is sufficient, where $\epsilon$ satisfies $\frac{\epsilon(3+\log_{1+\alpha} m)}{\lambda} + \alpha < \frac{2}{\lambda(\lambda+1)}$ for some $\alpha < 1$. We can choose $\alpha = \frac{1}{\lambda(\lambda+1)}$ and $\epsilon = \frac{1}{2(\lambda + 1)^3 \ln m}$ to make the inequality hold. Therefore, $96 (\lambda+1)^{7} \ln^3 m$ trees is sufficient.\end{remark}

We describe our algorithm in Algorithm \ref{alg:approxmincut}. The subroutine Test($T, \kappa$) returns a cut whose weight is at most $(1+\epsilon') \kappa$ w.h.p.~if there exists a cut in $G$ induced by $T$ with weight at most $\kappa$.

We show that w.h.p. the algorithm will output a cut $C$ with $w(C) \leq (1+\epsilon)\lambda$. In particular, consider the iteration $i$ where $\lambda \in [X_i, X_{i+1}]$. Let $\lambda'$ denote the value of the minimum cut in the sampled graph $H_i$. If $i = 0$, then it is clear that $\lambda' = \lambda \leq X_1 = 20\ln n / \epsilon'^2$. If $i>0$, since we sampled with probability $1/2^{i} = 20 \ln n / (\epsilon'^2 X_{i+1})= 10\ln n / (\epsilon'^2 X_{i}) \geq 10\ln n / (\epsilon'^2\lambda)$, we know that w.h.p. for any cut $C$ \cite[Corollary 2.4]{Karger94}, $$(1 - \epsilon') \cdot w_{G}(C) / 2^{i} \leq w_{H_{i}}(C) \leq (1 + \epsilon') \cdot w_{G}(C) / 2^{i}.$$
Therefore, $\lambda' \leq (1+\epsilon') \lambda / 2^{i} \leq (1+\epsilon')20\ln n / \epsilon'^2$. If we pack $96 (\lambda'+1)^7 \log^{3} m$ trees in $\mathcal{T}$, then by Lemma \ref{lem:treepacking} there exists a tree crossing some minimum cut $C^{*}$ of $H_i$ only once. Notice that for any other cut $C'$, $$w_{G}(C^{*}) \leq 2^{i} \cdot \frac{w_{H_i}(C^{*})}{1-\epsilon'} = 2^{i} \cdot \frac{\lambda'}{1-\epsilon'} \leq 2^{i} \cdot \frac{w_{H_{i}}(C')}{1-\epsilon'} \leq \frac{1+\epsilon'}{1-\epsilon'} \cdot w_{G}(C')$$

\begin{algorithm}[H]
\caption{$(1+\epsilon)$-approximate minimum cut}
\begin{algorithmic}[1]\label{alg:approxmincut}
\STATE $X_0 \leftarrow 1$
\STATE $i \leftarrow 0$
\REPEAT
\STATE $X_{i+1} \leftarrow 2^{i} \cdot 20\ln n /\epsilon'^2$
\STATE (We are assuming $\lambda \in [X_{i}, X_{i+1}]$ in this iteration)
\STATE Let $H_i$ be the subgraph sampled with probability $p = 1/2^{i}$ on each edge of $G$.
\STATE \label{line:treepacking}Find a greedy tree packing $\mathcal{T}$ with $96((1+\epsilon')20\ln n/\epsilon'^2 + 1)^{7} \ln^{3} m$ trees in $H_i$
\
\STATE $\gamma \leftarrow X_{i}$
\REPEAT \label{line:loopup}
\FOR{each $T \in \mathcal{T}$}
\STATE Call Test($T,(1+\epsilon')\gamma$).
\STATE If Test($T,(1+\epsilon')\gamma$) returns a cut $C$, output $C$ and terminate.
\ENDFOR
\STATE $\gamma \leftarrow (1+\epsilon')\gamma$
\UNTIL{$\gamma > \frac{1+\epsilon'}{1-\epsilon'}\cdot X_{i+1}$} \label{line:loopdown}
\STATE $i \leftarrow i+1$
\UNTIL{$X_{i+1} > nW$}
\end{algorithmic}
\end{algorithm}

Therefore, one of the cuts induced by some $T \in \mathcal{T}$ is an $(1+\epsilon')/(1-\epsilon')$ approximate minimum cut. Denote this cut by $C'$, so $w(C') \in [X_i, ((1+\epsilon')/(1-\epsilon')) \cdot X_{i+1}]$. Therefore in the $i$'th iteration, there exists $\gamma$ in the loop (Line \ref{line:loopup}--Line \ref{line:loopdown}) such that $w(C') \in [\gamma, (1+\epsilon')\gamma]$. So w.h.p.\ we will output a cut with weight at most $(1+\epsilon')^2\gamma \leq (1+\epsilon')^2w(C') \leq (1+\epsilon')^3/(1-\epsilon')w(C^{*}) = (1+\epsilon)w(C^{*})$.

\subsection{Distributed Implmentation}

We have shown the correctness of this algorithm. It remains to show how to implement it in $\tilde{O}(D+\sqrt{n})$ distributed rounds, and in particular, to implement the tree packing (Line \ref{line:treepacking}) and Test($T,\kappa$) in Algorithm \ref{alg:approxmincut}. To pack $k$ trees, it is striaghtfoward to apply $k$ MST computations on the graph where the edge weights are equal to the number of trees including it. This can be done in $O(k(D + \sqrt{n} \log^{*} n))$ rounds \cite{KP95}.

Given a partition $\mathcal{P}$ of $G$ into components, Ghaffari and Kuhn \cite{GK13} devised a testing procedure to test if there is a cut induced by a component in $\mathcal{P}$ that has weight less than $\kappa$ in $\widetilde{O}(D+\sqrt{n})$ rounds. Given a spanning tree $T$, we will show how to test the $n-1$ cuts induced by $T$ also in $\widetilde{O}(D+\sqrt{n})$ rounds.

\begin{algorithm}[H]
\caption{Test$(T,\kappa)$. Test($T, \kappa$) returns a cut whose weight is at most $(1+\epsilon') \kappa$ w.h.p.~if there exists a cut in $G$ induced by $T$ with weight at most $\kappa$. Note that the sample probability $1-2^{-1/\kappa} = \Theta(1/\kappa)$.}
\begin{algorithmic}[1]\label{alg:testing}
\FOR{$i \leftarrow 1\ldots k = \Theta(\frac{\log n}{\epsilon^2})$}
	\STATE Let $G_i$ be the subgraph obtained by sampling each edge of $G$ independently with probability $1 - 2^{-1/\kappa}$.
	\STATE For each edge $e \in T$, determine if $e$ is a {\bf bridge} in the graph $G_i + T$. \STATE Let $Y_{e,i}=\begin{cases} 1& \mbox{if $e$ is not a bridge in the graph $G_i+T$.} \\ 0 & \mbox{otherwise.}\end{cases} $
\ENDFOR
\STATE If there is $e \in T$ such that $\sum_{i=1}^{k} Y_{e,i} \leq k/2 + \epsilon'k/8$, then return the cut $C(T,e)$
\end{algorithmic}
\end{algorithm}

\begin{lemma} If $T$ induces a cut $C(T,e)$ with weight at most $\kappa$, then Test($T,\kappa$) returns a cut w.h.p. Moreover, any cut returned by the algorithm has weight at most $(1+\epsilon')\kappa$ w.h.p. \end{lemma}

\begin{proof}

Consider a cut $C(T,e)$. First observe that $G_i$ contains an edge crossing $C(T,e)$ if and only if $e$ is not a bridge in the graph $G_i + T$. Therefore, $\E[Y_{e,i}] = 1 - (1 - (1 - 2^{-1/\kappa}))^{w(C(T,e))} = 1 - 2^{-w(C(T,e))/\kappa}$.

If there is $C(T,e) \leq \kappa$, then $\E[Y_{e,i}] \leq 1/2$ and $\E[\sum_i Y_{e,i}] \leq k/2$. By Hoeffiding's inequality, $\Pr(\sum_i Y_{e,i} > k/2 + \epsilon' k/ 8) \leq \Pr(\sum_i Y_{e,i} > \E[\sum_i Y_{e,i}] + \epsilon' k/ 8) \leq e^{-\frac{2(\epsilon'k/8)^2}{k}} = e^{-\epsilon'^2 k/32} = 1/\poly(n)$. By taking the union bound over the $n-1$ cuts induced by $T$, we conclude that w.h.p. the algorithm will return a cut if there is cut whose weight is at most $\kappa$.

On the other hand if $w(C(T,e)) > (1+\epsilon')\kappa$, then $\E[Y_{e,i}] = 1 - 2^{-{1-\epsilon'}} \geq 1/2 + \epsilon' / 4$ when $\epsilon' \leq 1$, since $2^{-\epsilon'} \leq 1 - \epsilon'/2$ when $\epsilon' \leq 1$. So $\E[\sum_i Y_{e,i}] \geq k/2 + \epsilon'k/ 4$. By Hoeffiding's inequality, $\Pr(\sum_i Y_{e,i} \leq k/2 + \epsilon' k/ 8) \leq \Pr(\sum_i Y_{e,i} \leq \E[\sum_i Y_{e,i}] - \epsilon' k / 8) \leq e^{-\frac{2(\epsilon'k/8)^2}{k}} = e^{-\epsilon'^2 k/32} = 1/\poly(n)$. By taking the union bound over the $n-1$ cuts induced by $T$, we conclude the cut returned by the algorithm has weight at most $(1+\epsilon')\kappa$ w.h.p.
\end{proof}

\subsection{Computing the Bridges}
Given a subgraph $G_i$ of $G$, it remains to show how to determine what edges of $T$ are bridges in the subgraph $T +G_i$ in $\tilde{O}(D+\sqrt{n})$ rounds. Thurimella \cite{Thurimella97} gave an algorithm for computing the biconnected components of the underlying graph in $\tilde{O}(D+\sqrt{n})$ rounds. With simple modifications, it can be applied to compute which edges of $T$ are bridges in the {\it subgraph} $G_i$ of the underlying graph $G$. Note that even we have the algorithm for computing the bridges of $T$ in $G+T$, it is not clearly whether we can directly simulate it to compute the bridges of $T$ in $G_i+T$, because we want the running time to depend on the diameter of $G$ rather than that of $G_i$. Therefore, we describe the algorithm and necessary changes below.

\renewcommand\thefootnote{\fnsymbol{footnote}}
Fix a root $r$ in $T$. Let $\mathit{pre}(u) \in [0,n-1]$ be the preorder number which denote the time $u$ is visited if we perform a depth-first search on $T$ starting at $r$. Denote the subtree rooted at $u$ by $T_u$ and let $\mathit{size}(u)$ be the size of $T_u$. Let
\addtocounter{footnote}{1}
\begin{align*}
\mathit{low}(u) &\defeq \min \begin{cases}\mathit{pre}(u) \\ \mathit{low}(v) & \mbox{$v$ is a child of $u$ in $T$} \\ \mathit{pre}(v) & \mbox{$uv \in G_i $ \footnotemark}\end{cases}
\\ \mathit{high}(u) &\defeq \max \begin{cases}\mathit{pre}(u) \\ \mathit{high}(v) & \mbox{$v$ is a child of $u$ in $T$} \\ \mathit{pre}(v) & \mbox{$uv \in G_i$ \addtocounter{footnote}{-1}\footnotemark }\end{cases}
\end{align*}
 \footnotetext[2]{It can be the case that $v$ is the parent of $u$ in $T$, which happens when there are parallel edges between $u$ and $v$ in $G_i + T$, and one of them is in $T$. Note that an edge is not a bridge if it is a multiedge.}
\begin{lemma}Let $uv \in T$ with $v$ being a child of $u$, i.e.~$\mathit{pre}(u) < \mathit{pre}(v)$. $uv$ is a bridge if and only if $\mathit{low}(v) \geq \mathit{pre}(v)$ and $\mathit{high}(v) \leq \mathit{pre}(v) + \mathit{size}(v) - 1$.\end{lemma}
\begin{proof}
First notice that every vertex $x \in T_v$ must have $\mathit{pre}(x) \in [\mathit{pre}(v), \mathit{pre}(v) + \mathit{size}(v) - 1]$. If $uv$ is a bridge, then no descendent of $v$ will be adjacent to anything outside the subtree rooted at $v$, for otherwise a cycle passing $uv$ will be created. Therefore, $\mathit{low}(v), \mathit{high}(v) \in [\mathit{pre}(v), \mathit{pre}(v) + \mathit{size}(v) - 1]$.

On the other hand, if $\mathit{low}(v) < \mathit{pre}(v)$ or if $\mathit{high}(v) \geq \mathit{pre}(v) + \mathit{size}(v)$, then there exists a vertex $y \in T_v$ and $z \notin T_v$ such that $y$ and $z$ are adjacent. Since $z \notin T_v$, there must exists a path from $z$ to $u$ such that it does not pass $uv$. Therefore, $u \to v \leadsto y \to z \leadsto u$ forms a cycle and $uv$ is not a bridge.
\end{proof}
\begin{remark}Note that the second condition $\mathit{high}(v) \leq \mathit{pre}(v) + \mathit{size}(v) - 1$ is needed because $T$ is not necessarily a DFS tree. \end{remark}

Now it remains to show how to compute $\mathit{pre}(u)$, $\mathit{low}(u)$, and $\mathit{high}(u)$ in $\tilde{O}(D+\sqrt{n})$ time. It is explicitly described in \cite{Thurimella97} how to compute $\mathit{pre}(u)$. Note that $\mathit{pre}(u)$ is independent of the $G_i$. Although $\mathit{low}(u)$ and $\mathit{high}(u)$ depend on $G_i$, they can be computed in a similar way in $\tilde{O}(D+\sqrt{n})$ time. For completeness, we describe how to compute these functions in the following.

\begin{lemma}[\cite{GKP93,KP95}]\label{lem:decompose} A tree of $n$ vertices can be divided into $O(\sqrt{n})$ connected subgraphs each of diameter $O(\sqrt{n})$ in $O(\sqrt{n}\log^{*}n)$ time\end{lemma}

First, use Lemma \ref{lem:decompose} to decompose the rooted tree $T$ into components $F_1,\ldots F_{O(\sqrt{n})}$. For each component $F_i$, there is a root $r_i$ which is either the root of $T$, $r$, or the unique vertex in $F_i$ connecting to its parent outside $F_i$. It is shown in \cite{Peleg} that the root $r$ is able to downcast distinct messages of size $O(\log n)$ to each of $r_i$ in $O(D+\sqrt{n})$ time. Conversely, it is possible for each of the $r_i$ to upcast a message of size $O(\log n)$ to the root $r$ in $O(D+\sqrt{n})$ time.

Suppose each vertex has a unique ID. The component ID of $F_i$ is defined to be the ID of $r_i$. The component ID can be broadcast to every vertex in the component in $O(\sqrt{n})$ rounds. We can then assume that the root $r$ knows the topology of the contracted tree where each component is contracted into a single vertex. This can be done if every root $r_i$ upcasts a message about the component ID of its parent and itself.

To compute $\mathit{pre}(u)$, each root $r_i$ in each component first calculate the size of $F_i$ then upcast it to $r$. Since $r$ knows the topology of the contracted tree, $r$ can calculate the size of each subtree rooted at each of $r_i$. Then $r$ downcasts the size of subtree rooted at $r_i$ back to $r_i$. Now each $F_i$ computes its preorder number internally in $O(\sqrt{n})$ time assuming $r_i$ has number $0$. During the computation, each $r_i$ also records what its preorder number is supposed to be if the depth-first search started from the root of its parent component. Finally, each $r_i$ upcasts this number to $r$ and then $r$ computes the correct offset for each subtree and downcasts the offsets back to the $r_i$. After adding the offset internally, we get the correct preorder number.

To compute $\mathit{low}(u)$, initially each vertex $u$ computes $\min(\mathit{pre}(u),\min_{uv \in G_i}\mathit{pre}(v))$ in constant rounds. Then the problem becomes aggregating the minimum in the subtree $T_u$ for each $u$. First, each $r_i$ computes the minimum in $F_i$ in $O(\sqrt{n})$ time and then upcasts to $r$. Using the information, $r$ calculates the minimum of the subtrees rooted at each $r_i$ and downcasts to each $r_i$. Now each $r_i$ sends the minimum to its parent via the inter-component links. The parent replace its minimum if it is smaller. Finally, each component $F_i$ internally updates the minimum toward the root $r_i$. Then each vertex has the correct minimum. $\mathit{high}(u)$ can be computed in the same way.

Therefore, the step of computing the bridges in $T$ of $G_i + T$ takes $O(D + \sqrt{n} \log^{*} n)$ time. Each invocation of Test($T,\kappa$) takes $O(\frac{\log n}{\epsilon^2}(D+\sqrt{n} \log^{*} n))$ time.

\subsection{Running Time}
Now we analyze the running time of Algorithm \ref{alg:approxmincut}. The outerloop runs for $O(\log n)$ iterations. Therefore, the tree packing, Line \ref{line:treepacking}, is executed $O(\log n)$ times, each taking $O(\log^{10} n / \epsilon^{14}(D + \sqrt{n}\log^{*} n))$ rounds.

Let $k = O(\log (nW))$ be the largest index such that $X_k \leq nW$. The total number of iterations that the innerloop runs is at most $$\sum_{i=0}^{k} \log_{1+\epsilon'} \left(\frac{1+\epsilon'}{1-\epsilon'} \cdot \frac{X_{i+1}}{X_{i}}\right)
= O(k) + \sum_{i=0}^{k} \log_{1+\epsilon'}\frac{X_{i+1}}{X_i} = O(k) + \log_{1+\epsilon'} (X_{k+1}) = O(\log n/ \epsilon)$$
Therefore, Test($T,\kappa$) is invoked at most $O( (\log n / \epsilon)\cdot (\log^{10} n / \epsilon^{14}) )$ times, each taking $O((\log n/ \epsilon^2)(D + \sqrt{n} \log^{*} n))$ rounds.

The total running time is
\begin{align*}&O(\log n \cdot (\log^{10} n / \epsilon^{14})(D + \sqrt{n}\log^{*} n) ) + (\log^{11} n / \epsilon^{15})\cdot((\log n/ \epsilon^2)(D + \sqrt{n} \log^{*} n)) \\ &= O((\log^{12} n / \epsilon^{17}) \cdot (D + \sqrt{n}\log^{*} n) ) = \tilde{O}(D+\sqrt{n}) \end{align*}

\begin{remark}\label{rmk:combinedGK} The total iterations of the outerloop and innerloop in Algorithm \ref{alg:approxmincut} can be reduced to $O(1)$ and $O(1/ \epsilon)$ by first approximating $\lambda$ within constant factor by Ghaffari and Kuhn's algorithm. Then, we can reduce our running time to $O((\log^{11}n / \epsilon^{17})(D+\sqrt{n}\log^{*} n))$.\end{remark}

The exponent of the $\log n$ and the $\epsilon$ in our running time depends heavily on the size of the greedy tree packing in Lemma \ref{lem:treepacking}. If one can show that $O(\lambda^{a} \log^b n)$ trees is sufficient, then our running time can be improved to $O((\log^{2+a+b} n / \epsilon^{2a+3})\cdot(D+ \sqrt{n} \log^{*} n) )$ rounds. Using Ghaffari and Kuhn's algorithm to approximate $\lambda$ within a constant (Remark \ref{rmk:combinedGK}), we can get a running time of $O((\log^{1+a+b} n / \epsilon^{2a+3} + (\log^2 n \log \log n)/\epsilon^5)\cdot(D+ \sqrt{n} \log^{*} n) )$. For comparison, Karger \cite{Karger2000} showed that a greedy tree packing of size $O(\lambda \log n)$ is enough for any minimum cut to be crossed at most twice by some tree. It will be interesting to see if the number of trees in Lemma \ref{lem:treepacking} can be reduced.

redpajama_set_name: RedPajamaArXiv


text:
<?php

/**
 * DiaryCommentUnread filter form base class.
 *
 * @package    OpenPNE
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterGeneratedTemplate.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
 */
abstract class BaseDiaryCommentUnreadFormFilter extends BaseFormFilterDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'member_id' => new sfWidgetFormDoctrineChoice(array('model' => $this->getRelatedModelName('Member'), 'add_empty' => true)),
    ));

    $this->setValidators(array(
      'member_id' => new sfValidatorDoctrineChoice(array('required' => false, 'model' => $this->getRelatedModelName('Member'), 'column' => 'id')),
    ));

    $this->widgetSchema->setNameFormat('diary_comment_unread_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'DiaryCommentUnread';
  }

  public function getFields()
  {
    return array(
      'diary_id'  => 'Number',
      'member_id' => 'ForeignKey',
    );
  }
}

redpajama_set_name: RedPajamaGithub


text:
Vinica Breg  falu Horvátországban, Varasd megyében. Közigazgatásilag Vinicához tartozik.

Fekvése
Varasdtól 18 km-re, községközpontjától Vinicától 4 km-re nyugatra a Zagorje hegyei között fekszik.

Története
A falunak 1857-ben 230, 1910-ben 458 lakosa volt. A trianoni békeszerződésig Varasd vármegye Varasdi járásához tartozott. 2001-ben 98 háztartása és 285 lakosa volt.

Népessége

Jegyzetek

Külső hivatkozások
Vinica község hivatalos oldala

Varasd megye települései

redpajama_set_name: RedPajamaWikipedia


Smashwords – About Antonio Pinto Renedo, Sr, author of 'My philosophical ideas with graphics', 'My philosophical ideas 3', 'My philosophical ideas 2', etc.
Este libro trata sobre el progreso de las ciudades en el futuro y su relación con el ser humano.
You have subscribed to alerts for Antonio Pinto Renedo, Sr.
Would you like to favorite Antonio Pinto Renedo, Sr?
You have been added to Antonio Pinto Renedo, Sr's favorite list.
You can also sign-up to receive email notifications whenever Antonio Pinto Renedo, Sr releases a new book.


text:
Cloud: Why? (Mind the Gap Series, #1)
We are living in a posh world: There are now many ways to achieve a simple requirement with software, maybe way too many. Too many languages, too many patterns, too many platforms, too many developers, etc. Now we have cloud; increasing the speed of delivery while reducing the infra costs and complexity. It also has one hell of a learning curve, but that's an article for another day. As mentioned in the intro, I'll be talking about how implemented a cloud transformation, namely on Azure, at my latest client. They are one of the largest investment companies with a very large (and until recently, very complex) organisational chart with offices all over the world.
Imagine the complexity and the diversity of the organisation, the amount of effort required to make the transformation (even partially), the challenges not just technologically but also politically. We managed to pull it off as a team and I'm hoping this article series will make it visible the journey to you.
Let's kick-off the series with a short, simple question: Why? Why did they decide to go cloud?
The short answer is, why not?
Some time ago, my client decided to move from their existing on-premise trading application and adopt Aladdin from BlackRock. The version of Aladdin they bought was a cloud based service, hosted by BlackRock itself. This was a great thing, they didn't have to buy big servers on racks, even cooling them is a cost. There are certain SLAs BlackRock needs to honour, so your business continues without interruption (you can check BlackRock's website for all the features, otherwise I would have to charge them for advertisement) (Yes, joking).
Ultimately, this was game-changing and a great step towards the future; but it also brought many other questions: How do you connect with an external application, which is at the heart of your business? And if your heart lives outside of your body, how do you connect the veins properly so your body still gets blood pumped to it?
So, if the technology is so advanced and you are getting a new heart, why not update the rest of the organs as well? If you are changing the core application you have, and it is in the cloud, it simply makes sense to start carrying the rest of the applications to the cloud as well. Or at least, start developing new applications there.
It would solve most of your on-premise issues, such as infrastructure bottlenecks, and it would definitely speed up your delivery. It's also a great investment for the future and it would be quite ironical if an investment company didn't do it.
Let's take a step back and talk about our game plan here. There were certain things we needed to do: We didn't have an Azure subscription to start with, let alone an operation model. We had to come up with a roadmap.
Our aim has not been simple, but it was clear:
Create a development environment for our developers to start working right away
Create an operating model that will support both us and applications
Integrate with not just Aladdin, but also with on-premise apps
Craft applications using the available tools on Azure and with best practices
Create an API layer to create an integration point between apps and consumers
Create CI/CD pipelines to ensure software quality
Craft a solution to process and store batch data in a central store, so anyone can reach the data they need easily
Process the data through the store and make it available to other apps like Power BI
Create in-company best practices and distribute them across teams
With these goals in mind, we started making small castles in our sandpit.
This is where we came in. I joined the team through James Saffron, long after the Aladdin decision. It was shortly after that cloud provider was selected and a little headway was made. When I joined, there was already a basic version of a cloud operating model in place for development in a sandpit environment, but the non-prod and prod environments were still under discussion. AD was recently synced up with Azure AD, we had a subscription that we could mess around with. The Retail team was already elbow-deep into it with their Data Lake project.
The reason I joined in the team was to create report and analytics tools with the incoming Aladdin data using the Azure Data Lake Store and Analytics. The Data Lake might not be the perfect tool to do the job, but still it did the job well.
Just before our project, company kicked off the API project to use Apigee Edge to create an API layer. It was for ingesting the Aladdin data like us and expose it via REST APIs. The APIs would serve both internal and third party consumers. Their goal was for it to be a live endpoint while we were producing analytics and reporting data.
Attacking from both sides, we started tackling the problems and building our platform. We had many gaps to fill, which I'll mention shortly below. I'll also explain each of them in their own articles.
The first thing we needed to begin development or at least experimenting was an Azure subscription that we could play around with. We needed a subscription with full control over our resources, so the first thing we had to do was create a subscription model in three stages:
Sandpit: A full playground for us to experiment, build, demolish resources as we wish. No real data is allowed in this environment.
Non-prod: Development environments for our projects after we decided how. We still have full control over our resources except subscription level actions. Includes Dev, Integration and Test environments. Contains non-sensitive but non-production data.
Prod: No-developer fly zone, except read-only permissions. Contains Pre-Production and Production environments, only release and support teams has contributor permissions.
Existing on-premise developer desktops were quite limited in both specs and permissions. They didn't allow us to install new tools to experiment with, the specs wouldn't be able to handle them anyway. To overcome this, we were issued with high-performance Azure VMs to develop our applications on. We had admin permissions on the machine, allowing us to experiment freely. Of course, it was still behind a firewall to prevent any type of data loss.
Source Control, CI/CD
We chose Visual Studio Team Services for our source control, build and deployment needs. VSTS is a magnificent tool, allowing us to work through Git and deploy through our release pipeline.
We created our own accounts on VSTS and started development. After the process became stable, we promoted it to become company-wide and all the teams started using it.
The on-premise world (Windows-based one anyway) trusts Active Directory to take over security. On Azure, we have Azure Active Directory which provides the same capabilities in different ways. Azure AD was created and synced up from AD for us. This allowed us to utilise existing user credentials as well as the security groups in the cloud.
Azure Active Directory supports both OpenID Connect and OAuth 2.0, allowing us to authenticate and authorise both our users and applications with the directory. Azure AD also allows role based access control as well as security groups. This allowed us to assign users and groups into application specific roles, reducing the complexity on AD groups and increasing flexibility of applications.
Credential Rotation
On-premise environments are mostly locked down and are not exposed to the internet. But the moment you step out on to the cloud, you need to take precautions such as rotating your credentials. Microsoft didn't offer an out of the box solution for this. We created a solution that rotates the credentials frequently and notifies the consumer applications' configuration accordingly.
On-premise Connectivity
In order to access on-premise resources, our API proxies have been deployed within an App Service Environment, which had firewall access to internal resources. All the traffic from Azure to on-premise was communicated through these APIs. The other way around this is achieved directly with out-going internet access permissions.
There are many other things I haven't mentioned; one reason is because the article is now too long. The other one is, I need to fish out all the details buried deep in my mind along the way.
Keep an eye out for the new articles on this series, many more coming. I am hoping they will be much more detailed and will help you with your transformation as well.
Jun 29, 2018 Azure Cloud azure mind-the-gap
Mind the Gap: An Azure Transformation Story
All aboard the cloud train.
Cloud is an amazing development and very popular, we all know its pros and cons by heart by now. Unfortunately, it's not all sunshine on top of the clouds; most companies feel like between being Cloud-Aware and Cloud-Ready there is a huge gap that they simply cannot leap across.
If you move to cloud how are you going to manage authentication? How do you enable an AD based authentication for your apps? Can do you do single sign-on? What updates do you need on your SDLC processes? How do you create a new hybrid operating model? These questions defy the rules of the on-premise kingdom.
I'll approach this gap between the "On-Premise" and "Cloud" through this article series. It's not just to make the problems and pitfalls more visible, but also to point you in a direction to solve them. I'll make them based on Azure, because that's where my experience mostly lies. But keep in mind that the problems and solutions also apply to other cloud providers such as Amazon and Google, the same tech simply has different names.
The ideas that I'll demonstrate are based on my experience and observations from the projects/organisations I was involved in, the latest one is one of the biggest investment companies in UK and they just went through a big Azure transformation project. I was working together with James Saffron through that journey.
Keep in mind that I have not participated in all the parts of these journeys, in some I was at the helm, but in most I was merely an observant passenger. To make it easier, I've divided this journey into smaller sections:
Cloud: Why?
Solution Architecture
Application Lifecycle and CI/CD
Application Security, Authentication and Authorisation
Data Stores and Management
On-Premise Access and Hybrid Architecture
Cloud Operating Model
Big Data Processing
I'll also follow a structure on these articles to make it easier to read:
Keep an eye out, articles will be flying in.
Azure Info Hub
I may have joined the party a bit late with this website, but still it's a great and hidden gem on Azure.
Azure Info Hub (https://azureinfohub.azurewebsites.net) is a great website that combines all the information on Azure on a single dashboard. It not just shows general Azure related news, events and e-books, but also shows official documentation, videos, tools and trainings for each service Azure provides. Even though it's not an official Microsoft page, it combines everything together in a very neat way.
Here is what Azure Info Hub is, from their about page:
What Azure InfoHub is
A resource of publicly available content about Azure (you won't find any content there that is not available somewhere else). You will find per service...
Links to official homepage, SLAs, limits, pricing
Short overview
Getting started link lists (how to start with using the service)
Full content map of the official documentation with links to the documentation
Links to videos (on Channel9 and YouTube), online-trainings, tools and StackOverflow questions
A link-network between content sources (feeds, Azure doc, Stackoverflow, Youtube etc.) and output channels (the website itself, its RSS-feed-capabilities etc.)
What Azure InfoHub is NOT
It is not an official Microsoft resource.
It does not contain any content only available there, it only references to other content.
It is not a way to "steal" web traffic from other Azure-content-source (it's the opposite: it's an attempt to direct traffic to these sources and make content visible/findable on a per-service-basis)
It does not have any hard SLAs.
Jun 10, 2018 Azure
Cybersecurity Reference Architecture
Microsoft released the v2 for the Cybersecurity Reference Architecture; a diagram shows the cybersecurity capabilities of Microsoft products. Here is their own definition:
The Microsoft Cybersecurity Reference Architecture describes Microsoft's cybersecurity capabilities and how they integrate with existing security architectures and capabilities. We recently updated this diagram and wanted to share a little bit about the changes and the document itself to help you better utilise it.
Apart from being a very fancy wall poster, this diagram describes what Microsoft offers in cybersecurity area and how does it map/relate to other products. It's also a great kick-off template for initial security architecture; for those who wishes to implement a proper organisational security model over Microsoft toolset. The v2 of the diagram is quite improved and became interactive, in presentation mode you can hover over elements to get some tips about them.
v2 also contains Azure capabilities; including Azure Policy, Azure AD B2B and B2C, etc. So now you can extend your security strategy through your entire hybrid architecture.
You can view Mark Simos' (Lead Cybersecurity Architect, Enterprise Cybersecurity Group) article here.
You can view and download the Cybersecurity Reference Architecture diagram here
Jun 07, 2018 Security

redpajama_set_name: RedPajamaCommonCrawl


text:
•Featured Retailer
At the Seattle Art Museum, one block from Pike Place Market, light-filled galleries invite you to wander through global art collections, temporary installations, and special exhibitions from around the world. (SAM)
Photo: Benjamin Benschneider
Seattle is home to unrivaled natural beauty, the best coffee, a beautiful coastline, great seafood and an abundance of culture, among many other marvels. One of these is The Seattle Art Museum, commonly and fondly, known as "SAM".
SAM maintains three major and distinct facilities: The main part of the museum is located in downtown Seattle about a mile-and-a-half south of the Space Needle, not far from Pike Place Market.
The second is The Seattle Asian Art Museum (SAAM) in Volunteer Park on Capitol Hill, and the open Olympic Sculpture Park on the central Seattle waterfront is the 3rd.
"SAM has been the center for world-class visual arts in the Pacific Northwest since 1933. It's a museum carved into the city, as much a part of Seattle's landscape and personality as the coffee, rain, mountains, Pike Place, and The Space Needle."
The Seattle Art Museum houses one of America's great global art collections, displaying everything from European masterpieces to contemporary sculpture. Collections include modern and contemporary, African, Meso-American, Ancient Mediterranean, Islamic, European, Oceanic and Australian Aboriginal, Asian, American, (Georgia O'Keefe, Jason Pollock) and decorative arts, including a nice collection of porcelain. Visitors from out of town especially enjoy the remarkable Native American galleries featuring Northwest Coast art.
SAM traces its origins to the Seattle Fine Arts Society, organized in 1905. In 1931 the group renamed itself as the Art Institute of Seattle. Over the years the museum came to fruition with donors of art, time and grants of land. In 1933 the first Seattle Art Museum was officially opened with a focus on Asian art.
In 1983, the museum received a donation of half of a downtown city block, on the west side of Second Avenue between Union and Pike Streets. They eventually decided that this particular block was not a suitable site, so the museum acquired land in the next block south.
By the late 1980s the museum had outgrown its original home, and in 1991 a new $62 million, 155,000-square-foot downtown building opened to the public. The original 1933 building was renovated and reopened as the Asian Art Museum in 1994. (This building has just finished an expansion and beautiful renovation.)
In 2007, the 9 acre Olympic Sculpture Park (a "museum without walls") opened to the public, a process that took almost 8 years.
The SAM collection has grown from just over 1,900 pieces in 1933 to nearly 25,000 works of art from around the world.
Jonathan Borofsky's Hammering Man sculpture was installed outside the museum. This sculpture would have been installed in time for the museum's opening, but on September 28, 1991, as workers attempted to erect the piece, it fell and was damaged. Consequently, it had to be returned to the foundry for repairs and was finally installed the following year.
In addition to permanent collections and temporary exhibitions, the museum offers many perks and programs ……..free admission on the first Thursday of every month, (Seniors can also take advantage of First Fridays, where admission is free to those ages 62 and older) Community night out, Family Fun Workshops, lectures, drop in workshops and Saturday University.
SAM Shop sells uncommon objects, contemporary design for the home, toys for kids, jewelry by local artists, art and design books, fine paper and items pertaining to the current exhibition.
SAM Gallery is the Seattle Art Museum's art sales and rental gallery, offering hundreds of contemporary original works from Northwest artists; paintings, drawings, mixed-media works, limited-edition prints, and photographs. The gallery supports local artists and their careers by increasing their exposure and finding audiences for their work.
Renata Tatman is the lead buyer and product developer for the gallery and shop.
"The Seattle Art Museum (SAM) originally opened in 1933, in a beautiful Art Deco building in Seattle's Volunteer Park. SAM has since grown and now has three locations; our main museum in downtown Seattle, the Olympic Sculpture Park just north of downtown, and our Asian Art Museum that is located in SAM's original building. As the museum expanded, so did the store with two locations, and a special exhibition store that completely changes content and theme with each new exhibition. Products in the store reflect what a visitor might expect to see at SAM and the collection is broad; African, Asian, Australian Aboriginal, contemporary, European, early American, Native American….so much to see!"
"Our new exhibition that opened in October 2019, titled "Flesh and Blood", is a beautiful collection of old masters from the Capodimonte museum in Naples, Italy. The theme of our special exhibition store will be "ITALY". We have carried Rossi products before with great success, and this theme was a wonderful opportunity to really show how beautiful this Italian product line is and feature a broader selection."
Portrait of a cardinal, Alessandro Farnese. 1509-1511. The commissioned portrait of the future pope as a cardinal by the young master Raphael opens the exhibition.
Flesh and Blood: Italian Masterpieces from the Capodimonte Museum offers the opportunity to experience the intense beauty of art from the 16th and 17th centuries. Forty Renaissance and Baroque works of art (39 paintings and one sculpture) by masters such as Titian and Raphael are on view. At the core of the collection is the eminent Farnese collection formed in the sixteenth and seventeenth centuries.
This exhibition marks the first time that this many works from the Capodimonte Museum in Naples have traveled together at the same time. The exhibit runs until January 26, 2020.
Renata continues:
We ordered a variety of gift wraps, journals, note pads, note cards, and stationary sets. My favorites are the journals made of different plant materials; hazelnut, lavender, citrus, and cherry. The notebook and small notecards with the historical illustration of an octopus are wonderful! Our Pacific Northwest clientele always appreciate a beautiful image of an octopus. Of course the Fiorenze note pads in all sizes with matching pencils are a must. Because our exhibition references Catholicism, we'll feature a collection from the "Italian Gallery". The notecards are of beautiful religious imagery accented with gold and will make perfect holiday cards.
Our clientele appreciate very good quality and love beautiful paper. They also like to hear the story behind a product; how it was made, the history, the inspiration. Rossi is a great example of a product that is very good quality, with a long and fascinating history.
"Our main store in downtown Seattle has a contemporary feel with a broad range of products including books, contemporary design, hand crafted jewelry, glass and ceramics, textiles, toys, stationary, and a strong emphasis on products designed by regional artisans. We also have a variety of SAM branded products", says Renata.
Renata is, befittingly, a true spokesperson and fan of SAM; "Come to Seattle and visit! We'd love to meet you and show you the exciting and ever changing collections at the Seattle Art Museum. Then of course you have to stop in the shop!"
Seattle Art Museum: http://seattleartmuseum.org
1300 FIRST AVE, SEATTLE, WA 98101
Current Exhibition:
Oct 17–Jan 26, Seattle Art Museum
SAAM (Seattle Asian Art Museum):
http://seattleartmuseum.org/visit/asian-art-museum
VOLUNTEER PARK 1400 EAST PROSPECT STREET, SEATTLE, WA 98112
Olympic Sculpture Park:
http://seattleartmuseum.org/visit/olympic-sculpture-park
2901 WESTERN AVENUE,SEATTLE, WA 98121
0 Ideas and Inspiration, News
0 Featured Retailer


Three boys and a train museum…with buses! What do you get? Fun and energy all wound up and let loose at the Southeastern Train Museum in Duluth, Georgia!
I wish I could see the world as they do…in awe and wonder…and with the vivaciousness of their souls leaping out at all times. Instead I'll do as God intended us to do. I'll look on then with wonder, accept the challenge in being their guardian for the day, and see what lessons I can bank for another day.
As we pray for them, grab a the Federalist Papers and read what the founders understood liberty to be. Learn what histories they read, and why the rejected so many notions we see advanced today…as if they are new and improved ideas!
Meditate on why they said on more than one occasion that our nation cannot survive without God's natural law as its moral guide.
My big girl turns 12!
She has had me wrapped around her pinky since then, but never abused that privilege! Last night she had a small party with family and three close friends. It was wonderful to see them play in the yard, make up stories filled with honor, and then hear the cards written by her friends with words of fellowship based in Christ's example.
Kevin takes a practice swing as he steps up to the plate…looks bigger than six huh? One of two photos I took at his last game of instructional T-Ball. I'm glad I made them count, while I enjoyed the whole game without a large camera tied to me. Sometimes it is very helpful to enjoy life through your own lenses.
I took this photo through the fence with my Fujifilm X20. It is quite sharp, and provides a lot of dynamic range to pull out and play with.
I took some liberty with it in PerfectEffects, and I am pleased with the results. I did vignette the photo as well to focus the eyes on the batter.


text:
Reviews For The Easily Distracted:
The Comedy of Manners Private Lives Opens at Main Street Theater
100 Creatives: Detria Ward, Actress and Entrepreneur
Olivia Flores Alvarez
Olivia Flores Alvarez | October 26, 2012 | 7:00am
Longtime Houston actress Detria Ward was still a teenager when George Hawkins, the late founder of the Ensemble Theatre, pronounced her a "natural." She went on to study theater at Texas Southern University and after graduating, performed in local productions, including a few shows with Stages Repertory Theatre. She also continued her relationship with the Ensemble, acting in several shows there over the last 20+ years. She's been in Lotto: Experience the Dream, Cuttin' Up and The Waiting Room.
She was most recently seen as the elegant Grace, matriarch of an upper-class African-American family in the 1960s in Pearl Cleage's comedy of manners The Nacirema Society. When faced with a scandal that could tarnish her family name and the memory of her late husband, Grace enlists the help of her friend Katherine Green (played by Joyce Anastasia) to pay off a bumbling blackmailer. All the while, she's determined to keep her granddaughter's cotillion on track as the highlight of the social season.
What She Does: Ward has had a variety of "day jobs," working for several years as program manager for KTSU 90.9 FM, a position she left to join Matthew Knowles's Music World Entertainment organization as general manager at the launching of Beyoncé's solo career. Now she's back at Texas Southern University, her alma mater, as the program director for the school's continuing education division. But no matter what her 9-to-5 gig is, Ward says that first and foremost, she is an actress. "In my heart, I'm an actress. When people ask me what I do, I tell them, 'Well, I work...' But if I could do nothing but get up every day and go to rehearsals and performances, that's what I'd do."
Why She Likes It: There are several aspects of performing that Ward enjoys. She likes seeing a project from the very beginning (a script) to the very end (the last encore). "At the end of rehearsals, when we finally have all the set in place and all the costumes done, it's amazing to look back and say, 'Did we really come from there to this?' It's always a great feeling knowing how far we've brought the show."
She goes on to say, "I also like the fact that I can absorb a character. It's weird, and it's hard for me to describe. It's not the applause; it's getting on the stage and being able to have taken someone's work and portray a character, a whole person. In Cuttin' Up, I played seven or eight different characters and the challenge for me was to make each one clearly different from the others."
What Inspires Her: "Personally, my faith in God inspires me, that keeps me going." Ward finds that each character she plays has inspired her in different ways. "What inspired me with Grace [from Nacirema Society] was that she was genuine. She seemed a tough character, but she actually was very affected by [the rumor] that her husband had had an affair with her maid. She was real and had all the emotions and responses that a real woman in those situations would have."
If Not This, Then What: "Actually, I don't even want to imagine my life without acting, it just means so much to me. But if I had to, if I was forced, I would have to do something with entertainment."
If Not Here, Then Where: "In the old days, it was New York, it was L.A. and it still is, don't misunderstand me, but these days, there are some other hubs. I've been hearing a lot of buzz about Atlanta and I'm looking forward to taking a trip there real soon. And honestly, if one more person tells me about Tyler Perry!" she laughs. "People tell me all the time, 'You should be working with Tyler Perry, he has to come see you!' And I always say, 'Well, could you call him and tell him?' I have a friend in Atlanta and he's always telling me about the theater scene that they have, the concerts and shows, so I can certainly see Atlanta as some place I would like to explore. But Houston is just so much a home to me, I'd have to figure out a way to have this still be home."
What's Next: "I'll never stop acting, but I have a few other projects," Ward tells us. She's launched a new venture called Loving Life Entertainment and Travel. It's designed to allow her to do a wide variety of things, from arranging travel to booking talent to planning events. "It's very open-ended. One day, I could be organizing a whole group that wants to see a show on Broadway and another day dealing with just two people who don't want to deal with all the particulars of their honeymoon. It's a way for me to stay in entertainment, to be creative and still have time to act. My uncle has been in the travel business for 20 years and he's taken me under his wing."
More Creatives for 2012 (In order of most recently published; click here for the full page).
Justin Cronin, book author Mark Ivy, actor Lauren Luna, painter and shoe designer Sarah Cortez, writer Kent Dorn, drawer, painter, artist Lillian Warren, painter Carl Lindahl, folklorist, UH professor Sutapa Ghosh, film producer and Indian Film Festival of Houston organizer Tom Stell, actor, writer, director Gregory Oaks, teacher and Poison Pen co-founder Oliver Halkowich, dancer and performer Lupe Mendez, poet and poem pusher Jason Nodler, artistic director, playwright, director Ana Treviño-Godfrey, musician Matthew Detrick, classical musician Travis Ammons, filmmaker Florence Garvey, actress Julia Gabriel, artist, designer and backpack maker Rebecca French, choreographer and FrenetiCore co-founder Kiki Neumann, found object folk artist Flynn Prejean, Poster Artist JoDee Engle, dancer David Rainey, actor, artistic director and teacher Geoff Hippenstiel, painter, art instructor Jessica Janes, actress and musician Dennis Draper, actor and director Mat Johnson, novelist and tweeter Orna Feinstein, printmaker and installation artist Adriana Soto, jewelry designer Domokos Benczédi, Noise and Collage Artist Robert Boswell, Book Author, UH Prof Patrick Turk, visual artist Elizabeth Keel, playwright Bob Martin, designer Mary Lampe, short film promoter and developer Nisha Gosar, Indian classical dancer Jeremy Wells, painter George Brock, theater teacher Radu Runcanu, painter Ariane Roesch, Mixed-Media Sandie Zilker, art jewelry maker Philip Hayes, actor Patrick Palmer, painter Ana Mae Holmes, Jewelry Designer John Tyson, actor Jerry Ochoa, violinist and filmmaker Raul Gonzalez, painter, sculptor, photographer Roy Williams, DJ of medieval music Laura Burlton, photographer David Peck, fashion designer Rebecca Udden, theater director Donae Cangelosi Chramosta, vintage designer handbag dealer Paul Fredric, author John Sparagana, photographer Damon Smith, musician and visual artist Geoff Winningham, photographer Johnathon Michael Espinoza, visual artist Jaemi Blair Loeb, conductor Katya Horner, photographer Johnathan Felton, artist Nicoletta Maranos, cosplayer Carol Simmons, hair stylist Joseph "JoeP" Palmore, actor, poet Greg Carter, director Kenn McLaughlin, theater director Justin Whitney, musician Antone Pham, tattoo artist Susie Silbert, crafts Lauralee Capelo, hair designer Marisol Monasterio, flamenco dancer Carmina Bell, promoter and DJ ReShonda Tate Billingsley, writer Kiki Lucas, choreographer and director J.J. Johnston, theater director Mary Margaret Hansen, artist Richard Tallent, photographer Viswa Subbaraman, opera director Emily Sloan, sculptor and performance artist Sonja Roesch, gallery owner Enrique Carreón-Robledo, conductor Sandy Ewen, musician Camella Clements, puppeteer Wade Wilson, gallery owner Magid Salmi, photographer Carl Williams, playwright
Death and the Maiden is Next Up in the Houston...
Murder on the Orient Express As You've Never Seen it...
Comic Erica Rhodes Set to Bring The Funny, Both on NBC...


text:
Five Thoughts
Five Thoughts for Friday
Some thoughts on mending fences, making the game safe, incorporating the youth and more!
By nkb@NKB121 Apr 13, 2018, 7:00am EDT
Share All sharing options for: Five Thoughts for Friday
"Hey man, get that stick away from me!"
Brian Fluharty-USA TODAY Sports
Fear not friends, the Ottawa Senators' season may be over but the thoughts roll on. And, as ever, there are five of them:
On Winning Back Fans:
There's been a lot of talk this past week about how the Sens can mend the relationship with their fans — and maybe the media as well, though that seems to be less of a pressing concern! I'm not going to re-hash the events of the three town halls that took place this week, Beata wrote a great recap if you haven't check it out already, other than to say that they were a good first step. A deep distrust had festered between this team and the fan base, and some of the frustrations needed to be heard before the two parties could move on. We've now had the airing of the grievances, as it were. The next step is for Pierre Dorion and Eugene Melnyk to show that they actually listened. I can't really speak for every fan of this team but I feel confident in saying that all the listening isn't worth much if the subsequent actions fly in the face of what was discussed. I don't need to agree with every roster move that management makes, but I need the team to operate in good faith. There's a covenant that must exist between fans and professional sports franchises: in exchange for our loyalty, the team will make a sincere effort to deliver a quality product. The Sens haven't always respected that covenant in the last little while; I'm hoping that will change.
On Making the Game Safer:
As some of you may be aware, Ken Dryden's book Game Change: The Life and Death of Steve Montador and the Future of Hockey came out this past fall. Dryden was very upfront about what he was hoping to accomplish in writing it: convince the NHL, and very specifically Gary Bettman, to take concrete action towards reducing the prevalence of concussions by making all hits to the head illegal. In the time since the book came out, Dryden's remained persistent in pursuit of getting his message heard. Last week, he penned a follow-up article for the Player's Tribune in which he cites support from many influential people in the hockey world, but not Bettman. Dryden is ultimately correct, of course: as long as Bettman won't get on board with changing the rules, nothing will happen. Bettman has his reasons for rejecting the notion, ranging from "preserving the heritage of the game" to a possible fear of jeopardizing the outcome of the pending concussion lawsuit. Bettman has led the NHL down a path of complete denial of the science connecting brain trauma with CTE. Simply put, this is moral cowardice.
There is a large, ever-growing, body of work linking concussions and brain trauma with CTE. What we know now about the health effects of repeated head trauma makes inaction inexcusable. There is nothing to debate here, the science is settled. I also happen to share Dryden's practical belief that this rule change would not dramatically alter the character of the sport. But it is the NHL that must act. Look at how the reduction in fighting in the NHL has trickled down to the lower levels of hockey. If the sport is to survive, and if it has any ambitions at all of thriving outside the niche it's carved for itself, this is the kind of change that must be made.
On Guy Boucher's Future:
There was some hockey talk this week during Dorion and Melnyk's various availability, mixed in as it was with the rest of the on-going drama. Perhaps the quotes garnering the most headlines were the ones pertaining to Guy Boucher, who would appear to be on thin ice. There's a litany of reasons Dorion can't be keen to fire Boucher but it's also difficult to justify bringing back the architect of such a disastrous season, particularly when the GM has admitted the coach played a part in some of the player acquisitions. Dorion has fired one coach before, when he relieved Dave Cameron of his duties mere days after the 2015-16 regular season came to a similarly disappointing conclusion. My read of this situation is that Dorion would like to move on from Boucher, but he can't be sure that there's an adequate replacement available that would be willing to take the job. With the sheer number of coaches that have come and gone in recent years, the roster uncertainty, and of course the shaky finances of the organization, if Dorion were to act too quickly in firing Boucher he risks not being able to find a replacement he likes. The inevitable coaching carousel will kick up in the coming weeks, I'd be very surprised if Dorion isn't poking around and then making his coaching choice based on that.
On Giving More Ice Time to Younger Players:
Speaking of Boucher's job performance, one of the ways in which Dorion has said the head coach will have to change if he is to return next year will be a great incorporation of the younger players into his line-up. This is probably music to a lot of folks' ears, but in particular Christian Wolanin, Colin White, Filip Chlapik and maybe even Logan Brown. The first three all looked good at times this past season, and Brown has been making a mockery of the OHL. Whether each of the aforementioned players would benefit from some more time in the AHL is up for debate, but what is certain is that the Sens need to find cheap production given some of the other contracts on their books. Dorion's indicated that the Sens could perhaps use buy-outs this offseason, but it would be a surprise if anyone but Gaborik departs this way. It would represent a dramatic departure for the organization to eat the money on say, Bobby Ryan's contract for instance. Alexandre Burrows and Zack Smith aren't giving the Sens a tonne of bang for their buck, either. The kids are not as seasoned as Boucher would like, and undoubtedly a few of their errors will frustrate him, but ultimately this could be a blessing in disgusie for the coach. A third line of Chlapik-Brown-White sure sounds a lot more appealing to me than some of what was rolled out this year.
On Play-off Overtime Game Winners:
Artemi Panarin scored a real beauty in overtime last night to push the Columbus Blue Jackets past the Washington Capitals:
The sudden acceleration, the quick drag to get wide on Orlov, the perfect shot — it's all there. It also got me thinking about the absolute best play-off over time winners I've seen. From a Sens' perspective, the Kyle Turris goal against the Rangers in 2012 has to be up there because of how great a shot that was. But I thought I'd put it to the readership: what's the best play-off over time goal you've ever seen, Sens or otherwise?


My girls are pretty good at getting to sleep. I do have one daughter who takes a while for her to get to sleep though. Usually if I leave her door closed or use some lavender oil on her pillow, she falls asleep quicker.


Dedicated to all my friends who died on the ship Eilat, and to their families, who were left with the pain and the memories.
when it was attacked by Egyptian missiles.
It was shortly after the 6 days war in Israel. The attack came by surprise and there was no sea battle.
In less than two hours the navy ship Eilat sunk forever, swallowed by the sea.
Many of the survivors that made it to the water, were then killed by another missile, oil, gasoline and fire. Other navy man drowned or died from exhaustion. Moshe Levy was there, on the ship, when it happened, and tells the horrors of this tragic night hours of survival in his book "Neshama 48"- Eilat The 48 Soul.
Copyright . The 48th Soul. All rights reserved.


text:
Eternal Forest Sanctuary
Eternal Forest Vision
Eternal Forest explores the human relationship with forests, biodiversity and the sacred through art. Looking at a timeline beyond human life - a hundred, a thousand, 10,000 years, how can art be created at this timescale?
An ongoing art project Eternal Forest is the vision to create 1000 Eternal Forest Sanctuaries across the World, protected for 1000 years. Each sanctuary - a gift of ancient trees and biodiversity to future generations. An expression of hope, love and care for those who will come after us. Let us be remembered as the generations which created 1000 sanctuaries, changing humanity's relationship to nature forever.
Eternal Forest Sanctuary, Bienal de Coruche, Herdade dos Concelhos, 2019
Eternal Forest project was born in Portugal, as my response to globally pervasive deforestation, loss of biodiversity and healthy ecosystems, with intention to contribute to rewilding our psyche and our planet. Inviting deep-time thinking, Eternal Forest asks the question: 'how can we create spaces for deep connection with nature through art and ecology?'
We live in a critical time, when the level of destruction of biodiversity and wildlife have made us witness degradation and collapse of ecosystems around the globe. Each of us needs to think: how are we contributing to the biosphere and to the future of this planet? What do we want to create and what do we want to be remembered for? What can we do together, today, to help restore balance on this planet?
Could an Eternal Forest Sanctuary be the key to answering these questions?
An Eternal Forest Sanctuary is an offering, a gift of an old-growth biodiverse forest to future generations. Today, old-growth forests are few; many people have never experienced the awe of being in the presence of a 1,000-year-old being.
Eternal Forest is the vision to make this experience possible for those who come after us. It is an invitation to become part of history, by co-creating a new kind of ecological artwork: establishing an Eternal Forest Sanctuary for 1,000 years.
Are you worried about pervasive deforestation? Do you think that loss of biodiversity is a problem? Do you want to contribute to rewilding our psyche and our planet?
Through Eternal Forest we can explore our relationship with forests, biodiversity and the sacred. Looking at a timeline beyond our life - a hundred, a thousand, 10,000 years, how can we create a legacy at this timescale?
The Eternal Forest art project builds awareness of the beauty and the deep impact a biodiverse forest and nature can have on our lives, but it also aims to create beautiful natural spaces that positively contribute to local biodiversity.
Eternal Forest considers the human need for time and space for contemplation, for regeneration in natural time and space distant from everyday life. Eternal Forest, through an artistic vision, creates such space, which helps us reconnect with our inner, quiet centres in a fast-changing and tumultuous world.
What is Eternal Forest Sanctuary?
Eternal Forest Sanctuary is a combination of art, nature protection, and community working together. It offers us a deeper connection with nature, allowing us to contribute to improving the biosphere in our region.
Eternal Forest Sanctuary invites us to think, dream and imagine together what a place could be in 1,000 years, how it would contribute to preservation of biodiversity and human culture.
Eternal Forest Sanctuary is a forest space designed with art and in collaboration with nature to boost biodiversity. It is created to be protected and supported by the local community as guardians. The purpose of these spaces is to encourage quiet and contemplative activities: various 'forest' practices, such as forest bathing, meditation, mindful walks, ecopsychology, learning deep ecology, community gatherings and celebrations of nature's cycles, inspiration and art, while helping the forest to grow.
We experience Eternal Forest, but we do not take from it. We do not harvest it, we just let it be and enjoy the experience of being in true biodiversity, in a truly wild forest.
Eternal Forest will require our protection. 1000 years is many human generations – forest time is different from ours. Eternal Forest is an invitation to dream of growing a deep forest, to experience a deeper sense of time.
In time, great trees will rise. At times calamities and diseases might occur, but should we perhaps trust nature and let it restore itself and rejuvenate on its own? At the start, perhaps a careful intervention will be required to support the regeneration of biodiversity and the health of the ecosystem.
Eternal Forest Sanctuary is the time and space for us to be with ourselves, away from everyday activities. It is the time and space to be quiet, to be still, to observe, to tune into the forest, to tune into its wisdom and to let ourselves be taken into its flow. It is the time and space for us to recover and restore, to open our senses and connect our lives with that of the forest.
Eternal Forest Sanctuary is for the whole community to enjoy: for the young and the old, for humans and animals, for trees and insects. It is equally welcoming to all beings. Human community may play a key role as guardians in an Eternal Forest Sanctuary.
How do we create it?
Eternal Forest proposes to establish an area of forest as an artwork and a sanctuary to benefit both humans and nature. It will be a designed, protected space with no harvesting of forest resources. We will listen to the land to see what its dream is, what it needs to flourish. If needed, we will introduce 'supportive' species of wild grasses, herbs, flowers and trees, which will enable a regeneration of a larger biodiverse system. It will be a space designed for human enjoyment, a landmark artwork for experiencing biodiversity far into the future. Eternal Forest offers us, humans, beauty and inspiration that will touch the hearts of future generations for a thousand years to come.
The design and creation of Eternal Forest is proposed as an on-going collaborative work between artists, scientists, forest experts, ecosystem restoration and reforestation experts - to help understand the cycles of nature, the effect of climate change on the forest ecosystem and biodiversity, driven and organised by the local community .
Model and future
Eternal Forest Sanctuary project is being developed on the basis of emerging a model which is clear and shareable on a larger international scale. So in a way we are the first test community which will co-create the first test site. Through our gatherings, discussions, and learning we will then be able to create a recipe for other communities to create their own Eternal Forest Sanctuary.
Eternal Forest is intended as a model for artistic and community interventions around Europe and throughout the world. In every location Eternal Forest can have a different artistic expression connected with the local ecological and cultural landscape - always, however, preserving the vision of Eternal Forest as an artwork, a sanctuary rather than land for 'production'.
Tags: Eternal Forest


text:
totallyelle
THE PREMIER ONLINE RESOURCE FOR ACTRESS ELLE FANNING, ESTABLISHED IN 2003
Home & Updates Elle Fanning Photo Gallery Media Online & Site
(Photos) Miu Miu Twist Launch in Shanghai
Elle attended the Miu Miu Twist Launch in Shanghai last night! Elle has been working with Miu Miu since 2014, and she first appeared as the face of the fragrance Twist in January 2019. Public Appearances & Events > 2019 > Mar 26 | Miu Miu Twist Launch in Shanghai
March 27th, 2019 No Comments Appearances
(Photos) : Elle filming a music video in Los Angeles
On March 22, Elle Fanning was spotted filming a music video or a promotional video for Teen Spirit, which will be out in select theaters on April 05 in the USA. Pictures have been added to our gallery, see those below : Movie Productions > Teen Spirit > Mar 22 | Filming music video in Los Angeles
March 24th, 2019 1 Comment Candids, Film Productions, Gallery Updates, Teen Spirit
Elle covers The Edit + new photoshoot!
Elle is featured on the new issue of The Edit! She is promoting Teen Spirit, and she talked about playing make belief with Dakota as a child, the feeling of rejection that still happens when she auditions, the sequel to Maleficent and more. You can read it all below! Our gallery has been updated with a new photoshoot that's featured on the issue, too. Photoshoots > 2019 > Session 03:
March 22nd, 2019 No Comments Photoshoots, Scans
(Scans) Harper's Bazaar – March 2019
Elle is in the March issue of Harper's Bazaar! She's promoting her latest movie Teen Spirit, and it features a beautiful new photoshoot. Our gallery has been updated with the scans. Magazine Scans > 2019 > Harper's Bazaar
March 20th, 2019 No Comments Scans
Screen captures of "I Think We're Alone Now"
Our gallery has been updated with screen captures of Elle's scenes in I Think We're Alone Now! I've also uploaded captures of an interview with her that's in the bonus features of the Blu-Ray version of the movie. You can rent/buy it on iTunes and Amazon. Film Productions > I Think We're Alone Now > Screen Captures Film Productions > I Think We're Alone Now > Screen Captures: Interview
March 18th, 2019 No Comments I Think We're Alone Now, Screen Captures
(Photos) IHeartRadio Music Awards
Elle attended the IHeartRadio Music Awards yesterday, March 14, in Los Angeles. She presented the "Fan Girls" award on stage. Elle was wearing all three of her fashion deals. Miu Miu dress, Tiffany jewels and L'Oréal makeup! Find pictures of the event in the gallery : Public Appearances & Events > 2019 > Mar 14 | iHeartRadio Music Awards
(Photos) "Teen Spirit" Premiere at SXSW Festival
Elle attended the Teen Spirit premiere at SXSW Festival earlier today! This is the movie's 2nd screening ever, the 1st having been at Toronto International Film Festival on September 2018. It will premiere on select theaters on April 5, 2019. Our gallery has been updated with images of Elle at the event. Public Appearances & Events > 2019 > Mar 12 | "Teen Spirit" Premiere at SXSW Festival
Screen Captures of "The Vanishing of Sidney Hall"
I'm on a roll! Our gallery has been updated with screen captures of Elle in the movie The Vanishing of Sidney Hall. Most of Elle's scenes were with actor Logan Lerman, and you can rent/buy the movie on sites like iTunes and Amazon. Film Productions > The Vanishing of Sidney Hall > Screen Captures
March 12th, 2019 No Comments Screen Captures, Sidney Hall
Screen Captures of "Mary Shelley"
Our gallery has been updated with screen captures of Elle in the movie Mary Shelley! The movie is available on streaming platforms around the world – but in case it is not currently available in your country, you can rent/buy it on iTunes, Amazon and other stores. I really enjoyed this movie and Mary Shelley's story, which I wasn't aware of, so I'm thankful Elle chose to join this project.
March 12th, 2019 1 Comment Mary Shelley, Screen Captures
Elle Fanning as Isabelle
The lives of two sisters living in France are torn apart at the onset of World War II. Based on Kristin Hannah's novel 'The Nightingale'.
Information Photos IMDb
The Great (2020)
Elle Fanning as Catherine
A royal woman living in rural Austria during the seventeenth century is forced to choose between her own personal happiness and the future of Russia, when she marries an Emperor.
Follow Totally Elle
Family fansite: LOVELY DAKOTA
Visit www.dakota-fanning.org for all things Dakota Fanning!
Gif of the moment
Do you have photos, magazine scans, videos, or anything that you'd like us to add to our archive? If so, you are more than welcome to send them our way. We are always accepting content donation, and we will aways credit you – just make sure you give us a name and a link.
If you have…
– Public appearances photos;
– Magazine scans;
– Screen Captures
– Icons, wallpapers, avatars;
– Video clips;
You can send them to our e-mail address and we'll reply as soon as we add them to our fansite. Please note that anything that violates Elle's privacy will not be posted.
https://www.youtube.com/watch?v=U4KiGDzklwQ
Maintained by Paige, Helena, Elisa, Stefy.
Established on July 2003
Founded by Leila
Contact via e-mail or form
Hosted by The Fan Carpet
Totally Elle (www.elle-fanning.net) was created by fans, for fans. All original content and graphics belong to Totally Elle and cannot be reproduced in any form without the permission of the webmaster. All professional photographs in our Image Archive belong to the original photographers. This is a nonprofit fansite and has no conection with Elle Fanning, her family or management. No copyright infrigment is ever intended, please contact us before taking legal action.
‹ Back | Top Page | Homepage › • Totally Elle © Copyright 2014 All Rights Reserved • Designed by OhMyMorning


text:
Q: How to avoid the below error in Python Flask I am using the below 3 html i.e. Index.html , Results.html and Edit.html
  and python code file  app.py code is also pasted below.
The save to the DB is working fine and when I retrieve the data for editing and click on Submit I am encountering the below error
"_mysql_exceptions.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '%s' at line 1")"
Index.html

Welcome

<form method="POST" action="{{ url_for('index') }}">

Name <input type="text" name="name" />

Email <input type="email" name="email" />

CRType <select name = "CRType">
        <option value = "New">New</option>
         <option value = "Old">Old</option>
  </select>

<input type="submit" value="Submit">
</form>

Results.html
Add CR

  {% for user in userDetails %}

   {{user[3]}}
    {{user[0]}}
     {{user[1]}}
   {{user[2]}}
     Edit Profile

  {% endfor %}

Edit.html
h1>Welcome to Update Zone

<form method="POST" action="{{ url_for('Edit') }}">

CR_ID <input type="text" name="CR_ID" value = "{{user[0]}}"/>

Name <input type="text" name="name" value = "{{user[1]}}"/>

Email <input type="email" name="email" value = "{{user[2]}}"/>

      <input type="submit" value="Submit">

</form>

App.PY
from flask import Flask, render_template, request, redirect
from flask_mysqldb import MySQL
# from flask_table import Table, Col, LinkCol

app = Flask(__name__)

# Configure db
#db = yaml.load(open('db.yaml'))
app.config['MYSQL_HOST'] = 'localhost'
app.config['MYSQL_USER'] = 'root'
#app.config['MYSQL_PASSWORD'] = 'P@$$w0rd'
app.config['MYSQL_DB'] = 'flaskapp'

mysql = MySQL(app)

@app.route('/', methods=['GET', 'POST'])
def index():
    if request.method == 'POST':
        # Fetch form data
        userDetails = request.form
        name = userDetails['name']
        email = userDetails['email']
        CRType = userDetails['CRType']
     #   CR_ID = userDetails['CR_ID']
        cur = mysql.connection.cursor()
      #  cur.execute("""INSERT INTO users(name, email, CRType) VALUES(%s, %s, % )""",(name, email, CRType)
        cur.execute("""INSERT INTO users (name, email, CRType) VALUES (%s, %s, %s)""", (name, email, CRType))
        mysql.connection.commit()
        cur.close()
        return redirect ('/results')
      #  return redirect('/results')
    return render_template('index.html')

@app.route('/results')
def results():
    cur = mysql.connection.cursor()
    resultValue = cur.execute("SELECT * from users")
    if resultValue > 0:
        userDetails = cur.fetchall()
    #    edit = LinkCol('Edit', 'edit', url_kwargs=dict(id='CR_ID'))
        return render_template('results.html',userDetails=userDetails)

@app.route('/Edit', methods=['GET', 'POST'])
def Edit():
       # request.method == 'GET':
        # Fetch form data
      #  user = request.form
      #  CR_ID = user['CR_ID']
        CR_ID = request.args.get('CR_ID')
        name = request.args.get('name')
        email = request.args.get('email')
        CRType = request.args.get('CRType')
        cur = mysql.connection.cursor()
      #  result= cur.execute("SELECT CR_ID, name, email  from users where CR_ID = 1")
        result = cur.execute("""SELECT CR_ID, name, email from users where CR_ID = %s""",CR_ID)
     #   result = cur.execute("Update table users set name=?, email=?, CRType=? where CR_ID = %s", CR_ID)
        RV = cur.fetchall()
        user = RV[0]
        cur.close()
        return render_template('Edit.html',user=user)

if __name__ == '__main__':
    app.run(debug= True)

A: Your SQL statements aren't properly formatted. It should be
result = cur.execute("SELECT CR_ID, name, email from users where CR_ID = %s", (CR_ID))

redpajama_set_name: RedPajamaStackExchange


text:
Q: "Inserting" columns neatly I have one table, called "likes",that looks like this:
ID1     ID2
1247    1468
1641    1468
1316    1304
1025    1101

And another table, called "Students", that looks like this:
ID      Name    Grade
1510    Jordan  9
1689    Gabriel 9
1381    Tiffany 9
1709    Cassandra   9
1101    Haley   10
1782    Andrew  10
1468    Kris    10
1641    Brittany    10
1247    Alexis  11
1316    Austin  11
1911    Gabriel 11
1501    Jessica 11
1304    Jordan  12
1025    John    12
1934    Kyle    12
1661    Logan   12

What I'm trying to do is return a new table that has the following columns:
NameofID1, GradeofID1, NameOfID2, GradeOfID2, which would equate to somewhat of an "insert".
Any idea of how I might do this?
Thanks!

A: You need to join the students table twice.
--insert into newtable(col1,col2,col3,col4)
select s1.name as name1,s2.name as name2,s1.grade as grade1,s2.grade as grade2
from likes l
join students s1 on s1.id=l.id1
join students s2 on s2.id=l.id2

A: You just need to join to the table twice:
Select s1.Name,s1.grade,s2.Name,s2.grade,
  from  likes l
   inner join students s1
    on l.ID1 = s1.ID
   inner join  students s2
    on l.id2 = s2.ID
  Where l.ID1 = 1247

A: You can use simple INNER JOIN to get the values, e.g.:
SELECT s1.name, s1.grade, s2.name, s2.grade
FROM student s1 JOIN likes l ON s1.id = l.id1
JOIN student s2 ON s2.id = l.id2;

Here's the SQL Fiddle.
Once you get the values, you can use INSERT INTO.. SELECT statement to insert into new table.
Here's the documentation and examples for INSERT INTO... SELECT statememt.


text:
Q: Is there something like CherryPy or Cerise in the Java world? CherryPy and Cerise are two small frameworks that implement nothing but the barebones of a web-framework and I love their simplicity: in fact I reckon that if Classic ASP was implemented that way (and didn't pretty much require VBScript) I could have settled for it and lived happily ever after.
But now I'm living at the borders of the Java world and would like to know if there's something similar to these 2 frameworks and that doesn't try to take control away from you. My requrements would be that they have an:

*

*a dispatcher that maps urls to methods (like CherryPy, Django, Cerise, Rails, etc...)

*bonus points if it has a simple, yet powerful templating language (a la JSP/ASP) that is not too religious in separation of concerns

*bonus points if it has some sort of library that helps in validating forms
Thanks
--

A: Stripes
URLs to methods, check, form validation, check.  Powerful but stays out of your way unless you need it.

A: OOWeb, essentially a port of CherryPy.

A: Groovy and Grails. If you like MVC or even have a existing library written in Java/JVM, that are the tools you're looking for!

Grails aims to bring the "coding by
  convention" paradigm to Groovy. It's
  an open-source web application
  framework that leverages the Groovy
  language and complements Java Web
  development. You can use Grails as a
  standalone development environment
  that hides all configuration details
  or integrate your Java business logic.
  Grails aims to make development as
  simple as possible and hence should
  appeal to a wide range of developers
  not just those from the Java
  community.