What properties define a good resonator?

Question: In my question "Resonance in a 1 ft granite box", someone answered that my granite box (a one foot cube) would make a very poor resonator, which makes me ask what characteristics make a good resonator? Is there a difference between a cube or other rectangular box and a ball (like a Helmholtz resonator)? Also, what defines the pitch? Size?
Comment: The figure of merit here is $Q$ in the mode or modes you are interested in, and more or less represents the inverse of the fractional energy loss per cycle.
Comment: Perhaps the question of pitch should be deleted from this post, since it is your other question: http://physics.stackexchange.com/questions/47750/what-determines-the-pitch-of-a-resonant-object
Comment: Then I'd be happy to move the pitch part of my answer over to that other question
Answer: "Good" can mean a couple different things. The first thing that comes to my mind is not leaking energy. If you can hear sounds from inside your granite box, then clearly energy is escaping. There is no such thing as perfectly reflecting surfaces for sound (or light or anything else), so there will always be some losses - it is just a question of degree.
Related to this, acoustic energy can be transformed into heat, which would also make for a bad resonator. If you have ever been in a room with exposed insulation in the walls (or lots of draperies as you find in theaters), then you may notice how "dead" sounds are - there are very few echoes, since the sound energy is absorbed by the walls.
As for shape, this comes down to solving a partial differential equation - the wave equation, which may be written as
$$ \frac{\partial^2u}{\partial t^2} = c_\mathrm{s}^2 \left(\frac{\partial^2}{\partial x^2} + \frac{\partial^2}{\partial y^2} + \frac{\partial^2}{\partial z^2}\right) u $$
for some scalar quantity $u$, which in the case of sound could be the local pressure. Here $c_\mathrm{s}$ is the speed of sound, which you can often approximate as constant across the small pressure and density variations found. Solutions to this equation satisfying the boundary conditions of your particular geometry give the resonant modes and their frequencies.
With rectangular prisms, solving is easy, since the equation "separates." The solutions can all be written in the form
$$ u(x,y,z,t) = \sin(k_xx) \sin(k_yy) \sin(k_zz) \sin(\omega t), $$
where the spatial wavenumbers are given by $k_x = \pi n_x/L_x$ for any choice of integer $n_x$ and length in the $x$-direction $L_x$, and similarly for $y$ and $z$. The frequency of the mode (for $L_x$, $L_y$, and $L_z$ fixed by your setup and whichever choices of $n_x$, $n_y$, and $n_z$ you like) is
$$ \omega = c_\mathrm{s} \sqrt{k_x^2 + k_y^2 + k_z^2}. $$
This is in radians per unit time; divide by $2\pi$ to get cycles per unit time:
$$ f = \frac{c_\mathrm{s}}{2} \sqrt{\left(\frac{n_x}{L_x}\right)^2 + \left(\frac{n_y}{L_y}\right)^2 + \left(\frac{n_z}{L_z}\right)^2}. $$
If the longest dimension is $L_x = 12'' = 0.305~\mathrm{m}$, then the lowest resonant frequency comes from setting $n_x = 1$, $n_y = n_z = 0$, which gives (assuming $c_\mathrm{s} = 340~\mathrm{m}/\mathrm{s}$) $f = 557~\mathrm{Hz}$.
If you decompose the sound with which you are driving the resonator into its Fourier components, anything with a frequency not matching an $f$ you can get by choosing $n_x$, etc. will not drive a resonance. In particular, anything below $557~\mathrm{Hz}$ will not drive the system. (I'm being somewhat loose here - resonances are naturally "broadened," so you can be close and still have some effect. This is the other meaning of "good" - having narrow response functions.) Intuitively, frequencies that are off-resonance do not have wave patterns that echo constructively, and so there is no build-up of energy in a single mode.
Other geometries can resonate, but they are more complicated. Spheres and cylinders can be done with Bessel functions in place of sines, for instance. However, you will always find that the lowest resonant frequency is something like $c_\mathrm{s}/2L$, where $L$ is the longest dimension of the resonator.
In summary: If your box is a poor resonator it is probably because it is too "leaky." Even if made of a better material (a very stiff plastic may work, or the right kind of glass), you need to drive it at an appropriate frequency to have an effect. Also, it is very hard to demolish a structure with sound. If you want anything spectacular to happen, I suggest looking into treating a crystalline solid as the resonator itself (rather than having an air cavity be the resonator).
Answer: Wind instruments are all long tubes.
The tube shape is one that gives the instrument builder very predictable control over the pitch characteristics. Longer tube, lower sound.
It doesn't have to be a tube. Tube shape is just more predictable.
The opening(s) to the outside must be relatively small in proportion to the volume of vibrating air.
Too small an opening and the sound simply cannot get out. To propagate away from the instrument you need good transfer to the outside.
With a very large opening there is very little internal reflection, hence very little opportunity for resonance.

Generally:
Any form of wind instrument needs a continuous source. With a wind instrument the vibrating mass weighs very little, so any vibration dies away very fast.
At the other extreme there is a church bell. Because of its huge mass the vibrations of a church bell take a long time to decay. Striking a church bell once per second is quite enough, whereas in a wind instrument - even a very big one - the sound will decay in just tenths of a second.
Answer: I believe resonance occurs when a wave reflects back and forth in a medium whose length and rate of propagation match the frequency of the wave source. In this way the amplitude of the wave and it's reflection are in phase and additively increase.
For best effect, I believe the medium in which the wave propagates has to have some elastic properties and needs to be composed of reasonably uniform material.
This is true (at least approximately) of piano-strings, organ-pipes, tuning forks, bells and glockenspiel keys.
a pile of one-inch thick slabs of granite has a large number of (potentially) internally reflecting surfaces rather than a single reflecting surface. It is unlikely that sound waves propagate from slab to slab in the way they would through a solid cube.
Granite consists of a variety of materials, some crystalline, in a granular mixture. This probably isn't optimal for resonance as I suspect it will cause scattering and irregular attenuation of the wave-front.
To tune your resonant cube I guess you'd have to work out the speed of sound in granite and adjust the resonator's dimensions and/or the frequency to arrange that the waves and their reflections are in phase at the reflecting surfaces.

You could read Amplitude dependent internal friction and generation of harmonics in granite resonator


Two-variable generating functions for Laguerre polynomials

Question: Where can I find generating functions for orthogonal polynomials in two variables?
Lebedev's book (Special Functions and their Applications, Dover, 1972) gives a closed form for
$$
\sum_{n=0}^\infty \frac{n!}{\Gamma(n+\alpha+1)} L_n^\alpha(x) L_n^\alpha(y) t^n
$$
as an explicit function of $x,y,t$ (it involves a Bessel function). However, I need to sum over the upper index (when it is an integer), to find
$$
\sum_{k=0}^\infty \frac{n!}{(n+k)!} L_n^k(x) L_n^k(y) t^k = {??}
$$
in a closed form $F(x,y,t)$, for a fixed positive integer $n$. Are generating functions of this kind to be found in the literature? (Not on DLMF, as far as I can see.) A closed form for the previous sum would be great, a pointer to a suitable article would be better.
Answer: I think that http://arxiv.org/pdf/math-ph/0409066v1 (Multivariate Orthogonal Polynomials (symbolically) page 15, has the representation you are looking for [whether it will help you compute your sum, I am not sure, but maybe their Maple package will do the thinking for you?
Comment: Not really, but its bibliography pointed to an article of Baker and Forrester (Commun. Math. Phys. 188, 1997) that has a nice general theory of multivariate generating functions. Sadly, nothing there about summation on the upper index.


10.7: managing SMTP (outgoing) server for multiple POP email accounts on the same mail server

Question: Folks:
re:   mail.app  5.2 (MacOS 10.7.4), possibly similar for earlier versions
I'm struggling to understand how to establish and maintain multiple simple POP, non-SSL email accounts on the same mail server.  Say, I have two accounts for which the hosting service control panel gives these manual setup summaries:
  account: firstname.lastname@example.com
  password:  [blue's password]
  outgoing server:  smtp.example.com, on port 98
  incoming server:  pop.example.com, on port 99
  account: email@example.com
  password:  [green's password]
  outgoing server:  smtp.example.com, on port 98
  incoming server:  pop.example.com, on port 99
I want to add these to mail.app.   No problem with establishing and maintaining the incoming account information.  But mail.app uses a non-parallel method for specifying the outgoing server, yes?   It wants you to enter the data for a multiply-used SMTP (outgoing) server once, then assign each parallel account to that server.   For the above accounts, I think success of this process is indicated by the SMTP Server List (as seen in edit-the SMTP-Server-List mode) showing:
<code>          Server Name               In Use By Account
          -------------------               --------------------------------------------------------------------
          ...
          smtp.example.com      email@example.com, email@example.com
          ...
</code>
(Leftmost "Description" column omitted.  The table display will likely be mangled in this posting;  you can possibly see it correctly by copying the above, pasting it into a new document in an editor, and setting a monospaced font.   I think the accounts are listed in order of establishment;  here "green" is the second account entered for this outgoing server.)
So far, so good?
Though the basic information about the outgoing server --the server name and port settings-- is the same for both accounts,  I think one must set --and later, maintain-- the account name and passwords individually for  each account, even though the common server information is the same.  These are not simply copied from the incoming values for the same account,yes?  (I do not recall seeing an email account in which these credentials differ for the incoming and outgoing servers, and I'm fairly sure some client apps automatically use the same for both.)
I cannot seem to find a method in mail.app's UI to set and later reach these unique settings.
Reference:   this thread gives the general method for adding the second account, but is not sufficiently specific, and refers to mail.app on MacOS10.6.
When I add the second outgoing account, selecting the common server from the Outgoing Mail Sever (SMTP):  pull-down gives me the information for the first account.   Am I supposed to over-write that information?  I don't think so -- correct me if I'm wrong.  I think mail.app should present me with empty boxes, indicating I can enter the new account name and password for the second account. But it doesn't.  (Maybe occasionally, it does, but I can't really figure out how this works.)
The same goes for later maintenance.  If the password for the "green" account changes, I need to make that change to both the incoming and outgoing server, (right?) but I don't see a method for persuading mail.app to show me the credentials for "green" so I can update the password for green's outgoing server.
How is done?   Am I missing something incredibly obvious?
Supplemental:  I noticed that I can run Connection Doctor and click on the rectangle of a failing ("red light") SMTP account to bring up the Edit SMTP window. Cool!  That would be a reasonable, though obscure, way of accessing the SMTP credentials following a password change for that account.   But the account selected in that window seems to have nothing at all to do with the failing server.  It looks like mail.app highlights a random SMTP account in the Edit SMTP window.
TIA
Answer: Update: I've now demonstrated this problem is broken navigation in mail.app.  That's sufficiently different to close the above question and start a new thread, which I've done:  10.7 mail.app preferences-->accounts navigation broken; how to fix?
Comment: Just press the delete button to the right of the share/edit controls.


Set Google Plus profile URL to resolve to about page

Question: The standard Google Plus URL (for example: https://plus.google.com/109229333624640995186 ) resolves to the posts page (i.e. https://plus.google.com/109229333624640995186/posts ) by default. Is there a way to set this URL to resolve to the about page (i.e. https://plus.google.com/109229333624640995186/about ) instead?
Answer: No. No such feature is available yet. And if you follow the other social networks out there, they also follow the same trend. The about page is usually never the landing page. It's a way of promoting the content of the web service and encouraging communication.
Usually professional sites like LinkedIn follow that trend, as in professional field the about page is more important than the content by that user. It is more of a resume and less of a social profile. But for a simple social network, the activity feed gets more priority.


NP-hard problems on trees

Question: Several optimization problems that are known to be NP-hard on general graphs are trivially solvable in polynomial time (some even in linear time) when the input graph is a tree. Examples include minimum vertex cover, maximum independent set, subgraph isomorphism. Name some natural optimization problems that remain NP-hard on trees.
Comment: Some random Google hits of research papers that show that a problem is NP-hard even if the input is a tree: [capacitated vehicle routing](http://www.jstor.org/pss/171168), [minimum latency problem](http://dx.doi.org/10.1007/3-540-47867-1_17), [call scheduling](http://dx.doi.org/10.1109/HICSS.1997.667220)...
Comment: This is not what you asked for, but is worth to mention here: there are some problems that are easy on trees but hard on bounded treewidth. For example, edge-disjoint paths (Nishizeki, Vygen, Zhou '01) and constraint matrix span (McDiarmid, Reed '03).
Comment: Not sure if CW is needed. I can't think of any problem off the top of my head. It seems like posters should be rewarded for answering this question.
Comment: Jukka, it's debatable if "community wiki" is necessary here. Obviously contrived problems with little relevance will probably get down-voted, anyway.
Comment: I'm also inclined to think that CW is not necessary
Comment: Should be CW, I think. One can generate arbitrarily many contrived examples of such problems. It might be better if people could use voting to rank the answers according to how "natural" the problems are.
Comment: @Jukka: Fair enough. I'm neutral on the CW issue.
Comment: A related problem is to ask for NP-hard decision problems with input only a tree (no other structure - no weights, not even a root vertex). I am afraid if i ask it, it will be marked as a duplicate quesiton.
Answer: It is NP-complete to determine whether a tree can be embedded into the two-dimensional integer grid, with the tree vertices placed on distinct grid points and the tree edges placed on grid edges.
See e.g. Gregori, IPL 1989.
Comment: Re the degree bound: if there exists a vertex of degree greater than four, then no grid embedding is possible.
Comment: So, this implies the hardness of rectilinear drawing of trees? Is there a degree bound that preserves hardness?
Comment: Thanks David, simple to state yet an interesting problem.
Comment: Oh, the input tree is also a binary tree. That's great!
Answer: You can find "natural" and "well-known" examples of graph problems that are hard even if restricted to trees from our standard reference. Examples:

Integral k-multicommodity flow,
Common embedded subtree,
Common subtree.

(These are formulated as tree problems, but you can generalise them to arbitrary graphs. Then the above formulations are obtained as the special case when you restrict your input to trees.)

A more general recipe for generating problems that are hard on trees: Take any NP-hard problem related to supersequences, superstrings, substrings, etc. Then re-interpret a string as a labelled path graph. Then pose the analogous question for general graphs (subsequence ≈ graph minor, substring ≈ subgraph). And we know that the problem is NP-hard even on trees (and on paths).

There are also many problems that are hard on weighted stars, by reduction from the subset-sum problem. A natural example is:

TSP with two travellers: given an edge-weighted graph $G$ and a limit $W$, can we find two closed walks $C_1$ and $C_2$ in $G$ such that each walk has total weight at most $W$, and each node of $G$ is covered by at least one walk?

Again, it's easy to come up with variations of the theme.
Comment: The first 4 links in your answer seem to be broken currently. Please could you update the references?
Comment: Too bad the compendium is not updated anymore.
Comment: @gen fixed now.
Comment: What is a "labelled path graph"?
Answer: Group Steiner problem is a nice example. The input to this problem is an undirected edge-weighted graph $G=(V,E)$ and k groups of vertices $S_1, S_2, \ldots, S_k$. The goal is to find a minimum weight tree that contains at least one vertex from each group. It is easy to see that the Set Cover problem is a special case even when G is a star. Thus the problem is hard to approximate to within a $O(\log n)$ factor unless P=NP. Moreover, it was shown by Halperin and Krauthgamer that the problem is hard to approximate to within an $O(\log^{2-\epsilon} n)$ factor for any fixed $\epsilon > 0$ unless NP has randomized quasi-polynomial time algorithms (see the paper for a precise statement). There is an $O(\log^2 n)$ approximation on trees by Garg, Konjevod and Ravi.
Comment: Aaah: the unformatted latex !! it hurts the eyes :)
Comment: Well, I don't know how to do latex formatting here :). Pointers??
Comment: just use \$..\$ as usual.
Comment: ok all fixed now.
Answer: One of the hardest problems on trees is minimum bandwidth problem. It is $NP$-hard on trees of maximum degree 3. Also it is NP-hard on circular caterpillar of hair length 1.
References:
Michael R. Garey, Ronald L. Graham, David S.Johnson, and Donald E. Knuth. Complexity results
for bandwidth minimization. SIAM J. Appl. Math., 34(3):477-495, 1978.
Burkhard Monien. The bandwidth minimization problem for caterpillars with hair length 3 is NP-complete. SIAM J. Algebraic Discrete Methods, 7(4):505-512, 1986.
W. Unger. The complexity of the approximation of the bandwidth problem. In FOCS, pages
82–91, 1998
Comment: The corrected version of Unger's paper is *Hardness results for approximating the bandwidth*, Chandan Dubey, Uriel Feige, and Walter Unger.
Answer: The unweighted edge multicut problem is the following: Given an undirected graph $G$, a collection of pairs of vertices of $G$, and a positive integer $k$, find if there is a subset $S$ of at most $k$ edges in $G$ whose removal disconnects every pair of vertices in the collection.
This problem is NP-hard (and MAX SNP-hard) on stars [1].
[1] Garg, Vazirani, and Yannakakis, Primal-Dual Approximation Algorithms for Integral Flow and Multicut in Trees, Algorithmica, 18(1), pp 3-20, 1997.
Answer: The firefighter problem has received a fair amount of attention recently, and is (somewhat surprisingly) NP-hard on trees of maximum degree 3.  It is actually a fairly natural question, described as follows:
A fire breaks out at the root of the tree (or more generally, a specified vertex in a graph).  At every step, the firefighter protects one non-burning vertex, after which time the fire spreads to every unprotected neighbour.  The process ends when there is no unprotected vertex next to the fire.  Is there a strategy for the firefighter in which at most $k$ vertices burn?
Or a variant, also NP-hard: Is there a strategy for the firefighter in which no leaf burns?
Answer: A problem that one might think would NOT be hard on trees, but is, is the freeze-tag problem in computational geometry: briefly, the problem of scheduling wakeups for robots starting with a single awake 'bot, where makespan is the cost measure.
It's known to be NP-hard on weighted star graphs. However, it's open whether the problem is NP-hard in the plane. One might argue that the NP-hardness comes not from 'tree-ness', but from 'arbitrary metric'-ness, but star graphs only give you a limited space of metrics..
Answer: Given a tree $T$, a partition of $V(T)$ in $k$ levels $\phi: V(T)\to \{1,\ldots, k\}$
(i.e., edges of $T$ connect vertices of neighbouring levels $i$ and $i+1$), and an
integer $K$. Can you permute the vertices inside the levels such that the crossing number
is at most $K$?
This problem is NP-complete, proved by Martin Harrigan and Patrick Healy,
$k$-Level Crossing Minimization Is NP-Hard for Trees,
WALCOM 2011, LNCS 6552, pp. 70–76.
Answer: Empire colouring is NP-hard for trees.
Let $r$ and $s$ be fixed positive integers, and let $G$ be a graph whose vertex set is
partitioned into blocks (or empires) each containing exactly $r$ vertices. The $(s, r)$-colouring
problem $s$-$\text{COL}_r$ asks for a colouring of the vertices of the graph $G$ that
uses at most $s$ colours, never assigns the same colour to adjacent vertices in different
empires and, conversely, assigns the same colour to all vertices in the same empire,
disregarding adjacencies.
McGrae and Zito, Empires make cartography hard: The complexity of the empire colouring problem,
LNCS 6986 (2011) 179–190,
show that, for trees, $s$-$\text{COL}_r$ is NP-hard for $s \in \{3,\ldots, 2r − 1\}$
(and solvable in polynomial time for other positive values of $s$.)
Answer: A flow in a network is confluent if it uses at most one outgoing arc at each node.
NP-hardness of determining a maximum confluent flow in a tree (of diameter 4,
with multiple sinks allowed) is proved in:
D. Dressler and M. Strehler, Capacitated Confluent Flows: Complexity and Algorithms, LNCS 6078 (2010) 347-358.
Answer: The Travelling Repairman Problem (TRP) is known to be NP-hard on weighted trees. In this problem, which is also sometimes called the Minimum Latency Problem, the goal is to find a tour that visits all the vertices of a graph while minimizing the average latency. The latency of a vertex $u$ is the cost of the tour from the origin until the tour visits $u$.
Note that in the related (and more famous) TSP problem, the goal is to minimize the maximum, rather than the average latency. I think the TRP is generally considered a more complicated problem (in fact TSP is in P for tree metrics).
NP-hardness on trees was shown in R.A. Sitters "The Minimum Latency Problem Is NP-Hard for Weighted Trees", ISCO 2002.
Comment: That is a nice Problem!
Answer: Maximum leaf-labeled isomorphic subtree.
The input is a set $TS$ of leaf-labeled tree (internal nodes are not labeled).
A solution is any tree $T$ such that for each tree $T_1\in TS$ then $T$ is isomorphic to a subtree of $T_1$.
The optimal solution is the one that maximizes the number of leaves of $T$.
The problem is NP-hard (actually, it is hard to approximate) only when all input trees have unbounded degree.
Answer: A harmonious coloring of a simple graph is a proper vertex coloring such that each pair of colors appears together on at most one edge. The Harmonious Chromatic Number of a graph is least number of colors in a harmonious coloring of the graph. This problem of finding Harmonious Chromatic Number was shown to be NP-complete on trees by Edwards and McDiarmid. In fact, they also show that the problem remains NP-complete for trees of radius 3.
Answer: Graph Motif is NP-Complete problem on trees of maximum degree three:
Fellows, Fertin, Hermelin and Vialette, Sharp Tractability Borderlines for Finding Connected Motifs in Vertex-Colored Graphs
Lecture Notes in Computer Science, 2007, Volume 4596/2007, 340-351
Answer: A graph $G(V, E)$ is 2-splittable if it is possible to partition its edge set into two subsets such that the induced subgraphs are isomorphic. Deciding whether a given graph is 2-splittable is $NP$-complete even if input is restricted to trees.
Formally, the problem is:
PARTITIONED GRAPH ISOMORPHISM
INSTANCE: A tree $T = (V,E)$
QUESTION: Is there a partition $\{E1,E2 \}$ of $E$ such that the two forests $T1 = (V,E1)$ and $T2 = (V,E2)$ are isomorphic?
The NP-completeness column cites the unpublished manuscript of Graham and Robinson, "Isomorphic factorization IX: even trees".
D.S. Johnson, The NP-completeness column: an ongoing guide, Journal of Algorithms 3
(1982), 288–300
Answer: There's a (very general) problem I had a look at as part of a project: a variant of this problem remains NP-hard even on graphs with two vertices and a single edge, and a different variant is NP-hard on trees. Since the NP-hardness of the first variant obviously doesn't stem from the shape of the graph, the second is probably more interesting.
The problem is the distribution of files on and the routing of downloads in a network (for instance, the intranet of a company). Let $S$ be a set of servers and $C$ be a set of clients. Let $G=(V,E)$ be a graph such that $S \subset V$, $C \subset V$ and $S \cap C = \emptyset$ (so servers and clients are vertices, but there can be vertices that are not servers or clients, think of them as routers). Every $s \in S$ has a capacity (think the size of the harddrives), denoted as $|s|$. Let $F$ be a set of files, where every $f \in F$ has a filesize, denoted as $|f|$. Every $e \in E$ has a throughput, denoted as $t_e$. We also have a set of requests $R \subseteq C \times F$, where each $(c,f) \in R$ means that client $c$ wants to download file $f$.
The problem is to find for each server $s \in S$ a set of files $A_s$ such that $\sum_{f \in A_s} |f| \leq |s|$ (so to add files to servers without the total filesize exceeding the capacity of the server), and to find a path $P_r$ in $G$ for every request $r = (c,f) \in R$ such that the path starts at $c$ and ends at a server $s$ with $f \in A_s$, such that if for some edge $e$, $D_e$ denotes the set of requests such that for all $r = (c,f) \in D_e$, $P_r$ contains $e$, then $\sum_{(c,f) \in D_e}|f| \leq t_e$ (so to route all requests on the graph such that no edge capacity is exceeded).
If you don't require all downloads to be routed but instead try to maximize the sum of the filesizes of the downloads that are routed you can easily reduce subset-sum to this problem: you have a single server with vast amounts of space, a single client connected to the server with an edge with a capacity equal to the target value of the subset-sum instance and for every integer in the subset-sum instance you create a file with equal size; the client then wishes to download all these files.
A (much?) more interesting variant for this question is the case that you try to minimize the number of edges whose capacity is exceeded - perhaps the network we are working on models the transatlantic internet cables and replacing a cable is so costly that the difference in cost of upgrade to a factor two faster and an upgrade to a factor three faster is negligible. We also say that the placements of files on the servers are already given and cannot be modified, so we look solely at the routing issues.
The set-cover problem can easily be reduced to this variant. We are given a set $U$ called the universe and several subsets $S \subseteq P(U)$ of this universe. We are asked to pick the smallest amount of subsets such that their union equals the universe. For every $u \in U$ we create a file of size 1. We have a single client that wants to download all these files.
For every subset $s \in S$, we create a 'cluster' of servers: a cluster consists of a single vertex (a router) connected to a number of servers such that the servers are only connected to the router. For every $u \in s$ we add a single server to the cluster with the file on it corresponding to $u$. These clusters are then connected to the client with an edge of capacity 1 (so each edge connects the client with the router for the cluster). Furthermore, for every server cluster we add one more server to that cluster hosting a single new file (unique to that cluster) of size 1. All these files (so, in addition to the files corresponding to elements of the universe) are requested by the client.
The idea is that the client needs the files that are unique for all the server clusters, so the edges connecting the client to the server clusters are already at the limit of their capacities (their capacities are 1, the files have size 1). If the client downloads any elements of the universe from any cluster, the edge connecting to that cluster becomes overloaded. Since we only require to minimize the number of overloads (and not by how much we exceed the capacities), the client can download the rest of the elements of the universe hosted at that server cluster (so the rest of the elements of the corresponding subset) without penalty. This therefore corresponds to the subset being chosen. The client wants to download all the files in the universe once, so the universe will indeed be covered, and to minimize the number of edges that are overloaded we need to minimize the number of subsets chosen.
Note that the above construction yields a tree graph, so it's an example of an NP-hard problem on trees.
Answer: The Unsplittable Flow Problem. In fact UFP is hard even on a single edge (Knapsack).
Answer: Somehow i missed the Achromatic Number problem in the last answer, but this is one of the most natural problems i know of, which are NP-complete on trees.
A complete coloring of a graph is a proper coloring such that there is an edge between every pair of color classes. The coloring can be stated in contrast to Harmonious Coloring, as a proper coloring such that each pair of colors appears on at least one edge. Also, it can be stated as a complete (or full) homomorphism to a clique. The Achromatic Number problem is a maximization problem, where we look for largest number of color classes in a complete coloring of the graph.
Yannakakis and Gravil proved this problem to be NP-hard on complement of Bipartite Graphs. Cairnie and Edwards extended that result and showed that the problem is NP-complete on trees.
A lot of work has been done on this problem in the field of Approximation Algorithms  [3,4,5].
Answer: k-Balanced Partition Problem on graphs, in which one has to partition the $n$ vertices into $k$ connected components of size at most $\lceil\frac{n}{k}\rceil$ each and at the same time minimize the total cost of edges connecting vertices in different sets, called the cut cost.
This problem is actually APX-hard even on unweighted trees of constant maximum degree[1].
Answer: Is Circuit SAT on trees NPC?. Tree inner vertices are labeled as OR/AND gates. Leaves are inputs. Determine if there is a satisfying set of inputs for the circuit to evaluate to True.
At first glance it seems you can solve bottom up, but constraints get nasty as you move up the tree and OR gates suddenly need one of the other $2^k - 1$ assignments.
Comment: Umm, circuits that are trees have a name: formulas. Formula SAT is of course NP-complete, as 3-SAT or even full CNF-SAT are its special cases.
Comment: How so? *All* formulas are trees. If you want to restrict multiple occurrences of variables, that's an additional constraint. (I also assume that when you write "inputs", you really mean "literals", as Circuit SAT with only AND, OR, and positive literals is trivially polynomial-time to begin with.)
Comment: Certainly not under the standard terminology. The formulas $((a+b)+c)+d$ and $((a+b)+c)+a$ have the same underlying tree, only with different labels at one of the nodes. A tree stays a tree no matter how are its leaves relabelled.
Comment: Emil is right. A formula like $(p \land q) \lor p$ is a tree. Fan-out does not apply to input gates in circuits. With your definition that a variable cannot appear both positively and negatively therefore the formula is trivially satisfiable.
Comment: It is not a toy problem. This is the standard terminology, when when we say a circuit is a tree it does not mean variables appear only once. In any case and independent of what we call it the problem you proposing is trivial as I wrote.
Comment: Formulas without repeated variables.
Comment: a+b+c+a   (Variable a is repeated twice, thus DAG not tree).
Comment: Implicit DAG in your example. Either you make the $p$ value form a diamond where it is referenced from two gates, or you cheat and and have an implicit constraint in the formula that both $p$ leaves must be assigned the same value.  Allowing constraints that certain inputs must be equivalent seems to unnecessarily complicate a nice toy problem.

NP-hard problems on trees


Bad Request (400) after requesting additional rights with Facebook C# SDK

Question: I have also posted this question at: "http://facebooksdk.codeplex.com/Thread/View.aspx?ThreadId=243598"
In our application, we want to request rights in different stages. First, at login, I request "read_stream" rights, and later when a user selects that he/she want to receive e-mail notifications, I want to request additional "email" rights.
The first request works fine:
<code>    [CanvasAuthorize(Perms = "read_stream")]
    public ActionResult Login()
    {
        return RedirectToAction("Index","Home"); // Logged in
    }
</code>
In a later scenario, I try to do the same in another controller action to request additional email permissions:
<code>    [CanvasAuthorize(Perms = "email")]
    public ActionResult NotifyMe()
    {
        return View("Index");
    }
</code>
This time however, when the redirect comes back from Facebook, I get a Bad Request 400 error. The URL looks like this:
"http://localhost:84/facebookredirect.axd//amiinterestingdev/NotAllowed/NotifyMe?perms=email&selected_profiles=609505986&session=%7B%22session_key%22%3A%222.Ss4aOQFlkIhSjPZT1ICtSw__.3600.1296169200-609505986%22%2C%22uid%22%3A%22609505986%22%2C%22expires%22%3A1296169200%2C%22secret%22%3A%22JO6vtN6OuL7WXt1c_RkXCA__%22%2C%22access_token%22%3A%22148210175210859%7C2.Ss4aOQFlkIhSjPZT1ICtSw__.3600.1296169200-609505986%7CihpYs9tHc23..."
If I remove one of the double forward slashed right after facebookredirect.axd it works.
Does anyone know how to fix this or workaround the bug if it is a bug?
Thank you in advance!
// Peter
Answer: Do you have :
<code><system.webServer>
  <handlers>
    <add name="facebookredirect.axd" verb="*" path="facebookredirect.axd" type="Facebook.Web.FacebookAppRedirectHttpHandler" />
</handlers>
</code>

defined in your web.config ?


Is there a way to search my Samsung SCH-R500 phone through a Terminal window?

Question: I have my Samsung SCH-R500 phone connected to my computer via bluetooth. Though when I go to browse in the 'Bluetooth File Exchange' software, nothing comes up. So, I was wondering if I can navigate through my phone using a Terminal. Or, is there a way to get to it by going through the directory?
Comment: What model of phone?
Comment: @benzado: It's a Samsung SCH-R500.
Answer: There's probably not much you can do. I had an old Sony Ericsson phone which I could connect to with Bluetooth File Exchange; it allowed me to copy ringtone files back and forth but that's about it.
Older, "non-smart" phones aren't full computers in the same way that iPhone or Android phones are. When you use Bluetooth File Exchange the device is providing limited access to some data that it decides to export; you aren't interacting with the files directly. So even if you could access it via the Terminal, you wouldn't see a file system with files you could copy to your Mac.
If you're trying to recover specific data from your phone, like ringtones or address book info, you're better off asking a question about that ("How do I copy ringtones from my Samsung XYZ phone?"), and giving as much info about your phone (model number, version numbers on any info screens) as possible.
Comment: Thanks for this information. I'm not trying to recover anything, I'm simply curious.
Answer: This question is a good way to learn about what a Bluetooth profile actually does.
Mac OS X supports about ten of the 30 profiles listed on Wikipedia.
Even if your phone had some profile that allowed it's storage to be mounted as a filesystem, until mac gets that support, it will only receive files one by one since that's how the Bluetooth File-Transfer-Protocol profile is implemented.
(Adding to the confusion is Bluetooth FTP isn't at all the same as the older FTP file transfer which is why most marketing material calls it Bluetooth File Exchange and not FTP)


What is the meaning of responsive design?

Question: I have heard of many websites using "responsive design".
What is this and why should somebody use it?
Answer: Responsive Design is a design philosophy where in the design of the system (the representation and the layout) responds/adapts depending upon the layout of the device. The primary reason to keep your design responsive is to increase the reach of your application to a larger user base using an array of devices.
Improving Usability and accessibility:
A responsive design improves the usability of the product. Few years back, before the advent of mobile Internet communication devices, Developers used to make their applications compatible with screens of various resolutions. This can also be called making the design responsive. In today's world, where more and more users are consuming information on your mobile devices, you need to handle the changing viewports and hardware.
Unlike popular belief, making design responsive does not necessarily mean fitting the entire application on the user's screen. It means:

intelligently pruning amount of information displayed and
making adjustments to the design to improve the users' experience while using the application.

For example, if you open a web application on desktop, you may consider going all guns blazing and displaying a lot of information in the available screen with each component occupying optimal space. But, when you switch to a mobile device, you should not try to squeeze all the information into the limited real estate on screen.
Instead you should choose to

drop out the less important chunks of information;
reduce the number of processor-heavy components (elements that need to be frequently updated/redrawn/re-calculated); and
reduce textual content to only highlight extremely important content

Like, a news app on desktop may show a snippet of the news article along with the headline and a thumbnail about the article. But, on mobile, it need only show the headline, timestamp and publisher, and so on.
Also, even though the mobile screens now-a-days sport desktop-like resolutions, you need to realize that the physical dimensions of these devices are still smaller. So, to make it easier for the user to consume the information, the developer should take steps like increasing the font-size, increasing the dimensions & placement of thumbnails, etc to make the information easily readable (accessible) even on a small screen.
Have a look at the examples listed on mediaqueri.es to get a better idea.
Comment: @Mudassir You should check out book 4 of the "A Book Apart" series titled: [Responsive Web Design by Ethan Marcotte](http://www.abookapart.com/products/responsive-web-design). It supposed to be like a bible of responsive design. *Disclaimer: Even I haven't read it cover-to-cover yet.*
Comment: Good explanation. Let me just add that currently developers are using responsive web design to make the application look good enough across several form factors. I don't see many applications only fetching the data that is really displayed, i.e. data is still fetched, but not displayed to the user.
Comment: @jff It all depends on what level of optimization you are looking at.
Comment: Great explanation. Can you please suggest some good reference (a book will be better) to learn the basics of RWD?
Answer: A responsive design means a type of design where the characteristics of the website(such as width, alignment of data, etc) will get adjusted according to the width of the screen. This means that you are serving different webpages to users with a smartphone, a tablet or a laptop. This is a characteristic implemented on the code. This has got nothing to do with a specific design pattern.
Irrespective of how your website look, you can make a responsive design. This is rather a functional aspect than a design aspect, even though the functionality is achieved by the designer.
Responsive design is needed because of two reasons :

Usability  :
With the spike in the number of smartphone users, it gets more and more necessary for websites to provide content in such a way that it is easier for them to use.
Speed Matters :Google announced mobile page load time as a factor for SEO. So with a design specific for mobile devices, you can get a better page load times for mobile devices and hence better rankings.
Answer: Responsive Web design (RWD) is a Web design approach aimed at crafting sites to provide an optimal viewing experience—easy reading and navigation with a minimum of resizing, panning, and scrolling—across a wide range of devices (from mobile phones to desktop computer monitors).
for more information: http://en.wikipedia.org/wiki/Responsive_web_design
Answer: To add a short-and-sweet definition:
A responsive web site responds to the particular device it's being viewed on by changing the layout, content and interactions to best accommodate that particular device.
Answer: RWD [Responsive Web Design] is the concept of developing a website in a way that allows the layout to adjust according to the user's screen resolution (view port) using media queries.
Responsive Web design is not only about adjustable screen resolutions and automatically resizable images, but rather about a whole new way of thinking about design
Responsive Web design suggests that design and development should respond to the user's behavior and environment which is based on three key technical features are the heart of responsive Web design:

Media queries and media query listeners
A flexible grid-based layout that uses relative sizing
Flexible images and media, through dynamic resizing or CSS

There are three ways to implement media queries:
Use the @import rule to import style rules from other style sheets:
 @import url(style600min.css) screen and (min-width: 600px);
Put media queries directly in the style sheet. for eg:

#nav     {  float: right; }   #nav ul { list-style: none; }

@media screen and (min-width: 400px) and (orientation: portrait)
 {
    #nav li { float: right;   margin: 0 0 0 .5em; border:1px solid #000000 }
 }

@media screen and (min-width: 800px)
 {
        #nav { width: 200px; }   #nav li   { float: left; margin: 0 0 0 .5em; border: none;  }     }

HTML5 Attribute for image resizing :

The data-fullsrc is a custom HTML5 attribute used for any screen that is wider than 480 pixels
//This technique is fully supported in modern browsers, such as IE8+, Safari, Chrome and Opera, as well as mobile devices that use these same browsers (iPad, iPhone, etc.)  //
the Viewport : [Testing media queries]
<meta name="viewport" content="width=device-width">

iPhone and iPod Touch is that Web designs automatically rescale to fit the tiny screen. Because this works only with Apple's simulator, we can use an Apple-specific meta tag to fix the problem, placing it below the website's  section
 <meta name="viewport" content="width=device-width; initial-scale=1.0">

This might be enough for the RWD. If we need full study,
Flexible Grids and Flexible Images and Media will be added.
Flexible Images and Media
This is like the CSS overflow property
img, object { max-width: 100%; }

TIP : In IE this max-width  will not support. So, we have to write as width as 100% in a separate IE stylesheet.
Answer: From a developer's perspective, a responsive site is slightly different than an adaptive site, which also changes its viewing experience based on viewport size. A responsive site / design flows and adapts it fluid grid based on the width of the viewport. An adaptive site / design, on the other hand, "snaps" to a predefined view to match its viewport. Just my 2 cents...
Answer: Responsive web design is the practice of building a website suitable to work on every device and every screen size, no matter how large or small, mobile or desktop. Responsive web design is focused around providing an intuitive and gratifying experience for everyone. Desktop computer and cell phone users alike all benefit from responsive websites.
More you can find on the link it's very useful.
http://learn.shayhowe.com/advanced-html-css/responsive-web-design


Is it possible to setup a writeonly ftp?

Question: I'd like to setup an ftp such that my users (and some software I write) can upload documents, and have those documents saved on the server but I don't want to allow users to see the contents of the ftp folder - essentially the ftp looks empty at all times to the user.
Comment: Which OS are you using?
Answer: Sure, for example with ProFTPD you could use the following configuration:
<Directory /path/to/ftp>
    <Limit ALL>
      DenyAll
    </Limit>

    <Limit CDUP CWD XCWD XCUP>
      AllowAll
    </Limit>

    <Limit STOR STOU>
       AllowAll
    </Limit>
 </Directory>

With vsftpd you can set:
download_enable=NO
dirlist_enable=NO

Answer: Depending on your FTP server it us usually as easy as giving someone write but not read permissions on the directory.  This article discusses it briefly
Comment: `this` article no longer exists
Answer: We've had a client using the scheduled sweep method for years without issues. I'd only see it potentially being a problem on a heavily used server with multiple people intentionally dropping files with the same name.
Regardless, here's an excellent step by step procedure for setting up a blind drop ftp site on Windows 2003 using IIS: http://www.iisanswers.com/Blind_drop_ftp.htm
Comment: The link leads to a SPAM site
Answer: As mentioned, it's easily possible. Your best bet is to do a Google search for "(FTP server type) write permission only" and you should get plenty of responses. Without more information on exactly what FTP server you're using, you're not going to get much more help than that here.
Answer: Yes.  You simply give your FTP users write only access.  Lots of support sites do this for log files and the like.


Is there some textbook for the details of the computation of the homology groups

Question: Is there some results for the cyclic homology group $HC_1(A)$, for example, when it is zero, or which case we can compute out it explictly, here $A$ is a  commutative algebra over the complex field.
Comment: Your title is not as descriptive as it could be.
Answer: There is a formula in the commutative case, $HC_1(A) \cong \Omega^1(A)/(dA)$. Namely there is a Connes exact sequence $HH_0(A) \to HH_1(A) \to HC_1(A) \to 0$. In the case of a commutative algebra over a field $HH_0(A) \cong A$ and $HH_1(A) \cong \Omega^1(A)$. The left hand map is d, giving the above formula. For smooth algebras, you have a similar formula for all of the cyclic homology groups. You can surely find all of this in Loday.
Answer: You should provide more information about your algebra $A$ if you intend a useful, non-generic answer. I doubt you will find a textbook exposition---but for appropriate classes fo algebras, one can surely direct you to papers where computations are carried out.
The one general approach to computing $HC_\bullet$ inthe commutative case is to mimick rational homotopy theorty and construct a model of your algebra $A$, that is, a differential graded algebra $\mathcal A$, and then use the fact that $HC(A)$ and $HC(\mathcal A)$ (this last homology is the homology of graded differential algebras) are isomorphic.


How do large sites like StackOverflow handle their access logs?

Question: I'm wondering how large sites like StackOverflow handle their access logs. A write to the disk on every request seems a little bit uneconomical, but is Google Analytics that reliable to use it as your only information resource?
Comment: You can set up Apache to log to a database. I imagine IIS is the same.
Answer: There is much information that web server logs contain which will never be available to Google Analytics, two things I can think of:

Errors like 404, etc.
Access on media files, like pictures, etc. (including external websites linking to your images)
IP addresses, although an answer to another question pointed out that it can be set as a user variable
Full length referral URLs, for example Google sends links from product search, web search, etc. each search has keywords but Google Analytics does not display the other variables like <code>&source=products</code>, etc.

Must be more stuff I just can't think of right now.
And there are also the error logs; must be important for a website to run smoothly, in my opinion. Not something you would ignore.
Comment: Thats right, but how do they store their logs? File or database as suggested by Lèse majesté seems to heavy to me.
Comment: Actually, when you gzip this kind of repetitive data ... it compresses really well. So I imagine you can just store it as compressed text files and remove them after a while ... just your basic rotation.
Answer: On a *nix system you could use syslog-ng to store log messages on a dedicated log server for your load-balanced cluster(s) and then use a log analysis solution like Splunk to keep tabs on things - as for what the StackExchange sites actually run, may be a good question for StackOverflow Meta.
Comment: Has anyone asked yet what stack exchange uses?
Answer: I don't really look at these logs and end up deleting them on a monthly basis.  I only look at them for trouble shooting.  As for as monitoring application use Google Analytics, CrazyEgg and others do a great job.
Before such services existed these logs were very valuable.  Now, they are good developer tools, but I don't know of any of my colleagues or friends that actively archive these logs or parse them for data.


What are the alternative Android app markets?

Question: How many competing Android markets (other than the Play Store itself) are there and are they any good?  Which ones do you use and why?
Answer: There are actually several alternatives to the 'official' Google Android market (aka Play Store).
I personally like to search for new apps from my PC browser, and a bit less from my phone. Most (all?) of the markets nowadays offer both, via a dedicated phone-app that you'll have to install, except from the official one which is already there.
Until, well, yesterday, the 'official' market would not have been available from your PC (meaning: on a PC web browser). Now it is, with a neat push-to-your-phone one-click installation that is taking away one of the advantages of the competition (see AppBrain). The alternative markets, though, have still their peculiarities. I'll make a short summary but don't expect it to highlight all of the differences. Some markets (e.g. AndSpot) do not offer very specific features to users, but try to gather developers by offering advanced features such as easy stats.

Amazon AppStore: latest big entry. countries limitations; catalog looking very promising with some (exclusive?) good pay-for apps; also features special offers and daily freebies. Def worth checking out
AppBrain: born to let you install Android Market applications directly from your PC web browser, also allows you to discover new apps based on the ones you have. It's a meta-store (my favourite before the official market update)
APKPure: don't need any registration to use it
SlideME: they provide applications to niche markets, based on geographic location, payment method, or even types of applications that users can't find in traditional channels
Samsung Apps (must be installed on Samsung Galaxy devices, or else you can't use this): Samsung app store, which of course requires you to own a Samsung Android device
F-Droid they distribute FOSS open source packages that pass audit and verification to ensure that code has no malicious parts.
GetJar: my latest discovery. Quite a lot of apps, and they have special ("GOLD") commercial apps for free. An extremely interesting platform for developers, since they seem to offer above-the-average marketing and PS activities!

I suggest you click on some of these links and see for yourself if the look/applications suit your style!
Thanks to various sources, in particular, this thenextweb.com article
Answer: I use AppBrain because it provides a nice site, and it makes it really easy to install apps onto my phone.  Additionally, I'm finding that many bloggers that are reviewing apps are putting links to the AppBrain page for the app in their posts.  This makes it really easy to mark something for install while I'm at my computer reading the blog posts, and then install it when I get a chance.

Edit by Izzy:
AppBrain offers an alternative (and much cleaner) interface to the Google Play Store, which offers several advantages:

search results are much less limited (30 pages à 10 apps = 300 results, much more than Play offers)
search results "gray out" possible spam, offensive, and otherwise harmful apps. You still can see them, though – but it's quite clear what to skip
app details page gives the most important details at a glance. It's easy to see what permissions are requested. And if those form "potential dangerous combinations" (called "concerns" at AppBrain), that's automatically pointed out by a warning sign on the permissions tab
Their app (an alternative to the Playstore app) enables you to skip single (or all) updates on a per-app-base, which keeps your list of "pending updates" quite clean.

For installation, you will be redirected to Google Play. In the past, AppBrain had a separate app for this called the "Fast Web Installer", but unfortunately this app was banned by Google. So even for batch updates, the Playstore app will now be opened for each app separately (not AppBrains fault).

AppBrain App Market (source: AppBrain; click images for larger variants)
Still, I count their Website as a much better alternative to the Google Play website – and the same is to be said for their app, though for installations it has to redirect you as described above.
Comment: If it redirects to Google Play, then there is no point in having the store anymore!
Comment: If it's a "cleaner interface" to Play, how is it an alternative?
Answer: I've been using F-Droid, which is a smallish repository focused on free and open source tools. Not all encompassing by any means but one of the few that is explicit about showing you the license before you download an app.

Edit by Izzy:
F-Droid is a small, but superb alternative to Google Play. Though it offers only about 1.200 apps1 in its main repository, they are mostly high quality. In comparision, these are some advantages it has over the Playstore:

Apps are OpenSource, which means they are all free (to support the devs, there are donation buttons on each apps page)
F-Droid compiles the packages from the sources. This adds a level of security, as it makes sure nothing was "sneaked into". The draw-back is, you cannot simply cross-update apps between the F-Droid main repo and other sources.
Compiling the sources themselves, they also often throw out "binary blobs" and other unfree material (i.e. included modules from proprietary sources). In many cases, this means the advertisement stuff being removed. This again increases security (and privacy). But in some cases it has the draw-back of some functionality being broken, if the removed part was e.g. stuff enabling specific Google services, such as maps.
Next to its main repository, F-Droid offers several others2. Developers can provide their own "channel", e.g. for Beta versions. A nice way also for companies or organizations to keep together groups of apps their members are supposed to use.
F-Droid is very clear when it comes to "anti-features" such as ads. If an app in any way deviates from the OpenSource idea, that's pointed out straight in colored boxes you can't miss when browsing the apps pages. Quoting bgvaughan from the comments:

f-droid's Preferences allow you to screen apps by various traits: whether they contain advertising, track your activity, or promote non-free add-ons, among others. While I miss the lack of user ratings on f-droid, and f-droid app versions sometimes trail behind those on Google Play, the fact that I can be sure that anything on f-droid is free, open-source, and not a freaking PITA, is more than enough to recommend its use.

I can also only approve what Nicolas says about F-Droid in his comment:

F-Droid apps are guaranteed open source, ad-free, tracking-free. That means smaller apps that don't waste your bandwidth for anti-features.

F-Droid also offers its own Android client, the F-Droid Application Manager:

F-Droid App (source: AndroidNext; click for larger variant)
More details on F-Droid can also be found at Wikipedia. Interesting fact: F-Droid is a fork of Aptoide3.

1 as of 06/2014
2 see also Broam's and daithib8's comments below – and this list
3 see Wikipedia: F-Droid History
Comment: F-Droid also allows you to add ALTERNATE repositories, which makes it much more powerful than it first seems. :)
Comment: you are free to submit Foss apps and try out the 100 or so that are waiting in the queue. add them by posting the relevant details in the f-droid forums. We need help converting submissions into structured metadata: only a basic knowledge of git required!
Comment: f-droid's Preferences allow you to screen apps by various traits: whether they contain advertising, track your activity, or promote non-free add-ons, among others. While I miss the lack of user ratings on f-droid, and f-droid app versions sometimes trail behind those on Google Play, the fact that I can be sure that anything on f-droid is free, open-source, and not a freaking PITA, is more than enough to recommend its use.
Comment: Everytime I need an app, I check F-Droid before any other, because F-Droid apps are guaranteed open source, ad-free, tracking-free. That means smaller apps that don't waste your bandwidth for anti-features.
Comment: I've discovered F-Droid after the Free Software Foundation recommended it.
Answer: The Amazon Appstore (download link).

Web site (You can download apps from here to your device once its set up)
Advantages of the Amazon Appstore
Uninstalling Apps from the Amazon Appstore
Using the Amazon Appstore from an "Unsupported Region"
Developer FAQ
Answer: SlideME, this is very handy when you want to buy stuff in countries without paid Market. (actually you mention it in your question. I posted this answer just for the sake of completeness)
Answer: Don't forget about GetJAR. :-) This market got its first big break when Rovio announced Angry Birds would be exclusive to them when it first launched.
Answer: Aptoide serves a bunch of repositories in APT style (which some of you might know from Debian and its derivates). They also have their own Android client used to access (search and install apps from) them. For checking available apps, any web browser can be used as well – simply point it to m.aptoide.com. According to Wikipedia, they serve more than 900,000 different apps with over 3.6 billion downloads in over 250,000 stores (as of 5/2017).

Aptoide App for Android (source: Aptoide; click images for larger variants)
Often associated with black markets and other "unsafe sources", that's not what it is by default (like peer-to-peer exchanges are not, and like Youtube isn't – though you easily can find "pirated content" there). Paulo Trezentos, co-founder of Aptoide, kindly pointed out several details behind Aptoide in his answer on How safe is it to use Aptoide? And even more in a mail he sent to me. Some core-points:

Like Google Play, Aptoide actively scans its repositories for malware. They're using 3 different malware scanners, doing signature checks, and having implemented a chain-of-trust based in the signature of the developers.
They work with several universities and research centers to make and keep the environment as safe as possible.
They use a "trust stamp" to mark apps they've thoroughly checked (see the now archived 1000contest). If you see that on the page for an app, you can consider it 99.9% safe (according to Paulo).1

Privacy is considered a high value. Aptoide is very cautious about the way they internally handle the user's private information.
Their "Apps" store is manually curated. So when looking for a way to stay as safe as possible with all those hundred-thousands of repositories, this would be the place (all the app links in this post point there). But even towards all the other repos, Paulo states:

we have a responsibility to assure that the apps in those stores do not harm the end user.

In his mail to me, Paulo concluded: Believe we still can do better. Which to me indicates they don't settle on what they have achieved, but try to continually improve. If you additionally consider there's a company behind the "stores" which recently even filed an antitrust complaint against Google, that should be sufficient to deviate from associating Aptoide with "black markets" and "piracy" any more than Youtube – but rather consider it a good alternative (or supplement) to other Android app markets.

There are some more advantages worth mentioning:

you can have your own repository there – whether private or public. Their Aptoide Uploader helps you upload your apps there.
you can use a private repository to automatically backup your apps. Their Aptoide Backup Apps is your helper for that.
you can schedule installs/updates. Comes in handy when you're e.g. on mobile data, and just found a bigger app you'd prefer installing on WiFi. Just mark it, and when on WiFi toggle the "scheduled installs" (see third screenshot above).

Try that with Google Play :)

1 Example of untrusted app detection:

Aptoide warns an application might be malicious (source: Aptoide; click image for larger variant)
A couple of things to see here:

The little yellow exclamation mark with the red "Warning" title is visible immediately; details below are displayed when "show" was clicked
3 anti-malware-checks have been run against this package, one of them the Aptoide specific malware guard
the signature was found suspicious for multiple reasons:

it is not known to Aptoide as a "trusted signature" (Aptoide maintains a "chain of trust" for signatures, comparable to PGP/GPG)
it was used elsewhere to sign another developers package (and moreover, that developers signature was known to Aptoide, so that was a "re-sign" possibly introducing a hack of some kind)

some information on the Anti-Malware checks is included at the end of the box
Answer: The Samsung app store is installed on every Samsung mobile device (which is a lot). They are ultra helpful, unlike every other app store I have submitted to.
It can take over a week to get a new app past their quality control but it's worth the wait. They are so good at reviewing apps that I now submit to Samsung before Google Play.
It can be a little confusing at first to understand what they call their seller office is all about but hey, we are developers so are used to learning curves.
Among other things they review content to ensure that there are no copyright issues (something that can get you banned from Google Play) and they review every option VERY thoroughly on ALL the devices you have selected.
If anything goes wrong and quality control fails you get a complete breakdown of exactly what went wrong (including log cat) and even a video replicating the issue and they provide details on what is expected from you to fix it and re-submit.
What really impresses me is that they are so constructive with their criticisms.
Once an app has been approved by Samsung, I am more than happy that I have a very solid app that functions the way I want it to.
I just get a comfortable feeling when Samsung approves one of my apps. They don't tell you off or slap you on the wrists or, in any other way treat you like a naughty school kid if you get something wrong. They just help you to understand what to put right. Google Play will just pull your app and suspend you with no help whatsoever to put things right.
Answer: Yalp Store allows the download of apps directly from Google Play Store.

By default Yalp Store connects to Google services using a built-in account, so you do not have to own a Google account to use it . The only reason to use a live Google account is to access the paid apps you own or leave reviews.

It has an option to know the number of trackers found in an app and view the app's report via Exodus Privacy
Answer: Missing in previous answers is AndroidPIT which is running a separate market. Sure, almost all apps found there are also in the Playstore (but not necessarily vice-versa: so for missing apps there are links to the playstore provided). Developers need to actively maintain their apps on this platform (i.e. upload new versions), and for paid apps AndroidPIT provides its own license API.
So what is the plus of this platform? It has an active community (in the forums and the news blogs), and one can use alternative payment methods (e.g. Paypal) in addition to credit cards. Moreover, reviews for apps can be found there as well. So with the playstore comments, local comments, and the reviews, one can get a better idea of what an app is like -- before downloading it. Furthermore, the German branch even has an App Reviews section in their forum, including overviews for apps on a kind of "per-category" base -- which makes it easier to find a suiting app, as similar apps are grouped together.
So if you like that idea, but do not want another "source of apps" (it's a good idea to stick to one market platform, especially for paid apps -- so you don't lose track which app you installed from what source, and get into trouble on a re-install for a new (or factory-reset) device), you can still go there for information.
UPDATE: AndroidPIT has closed its independent app market on 2014-12-31.
Answer: The Opera (as in web browser) mobile store (now Bemobi Mobile Store) has many Android Applications that are arranged by category.
Comment: Looks like Soc.io Mall has become Eferio Communications, and there's no public app store that I could find. Antiroid seems dead already. Opera Mobile Store redirects to Bemobi Mobile Store. Yandex.Store seems dead too.
Answer: Aurora Store is an open source fork of Yalp Store which provides a Material UI to the later.

Aurora Store is an UnOfficial FOSS client to Google's Play Store, with an elegant design, using Aurora you can download apps,
  update existing apps, search for apps, get details about in-app trackers and much more.
  You can also Spoof your Device Information, Language and Region to get access to the apps that are not yet available or restricted in your Country | Device.
  Aurora Store does not require Google's Proprietary Framework to operate, it works perfectly fine with or without GooglePlayService or MicroG. Thereby avoiding the various privacy issues.
Answer: Now Google is focusing on the educational side, offering a special version of its app store called Google Play for Education. (Initially applicable to USA only I believe).
It makes it easier for educators to find apps, books, videos, and other content appropriate for K-12 students, enables bulk purchasing and the ability to distribute apps to a group of students' tablets wirelessly.
At launch, Google is offering Play for Education bundled with Google Nexus 7 tablets. In early 2014 the company plans to offer Asus Transformer Pad and HP Slate 8 Pro tablets as well.
Teachers can find apps by grade level, subject, or other criteria, and content can be paid for using a purchase order.
Video: Introducing Tablets with Google Play for Education
Answer: Though it's rather a "link only answer", in this case there's no way around as the given source is (hopefully) maintained and the content subject to change: Here's a list of available markets in the DMOZ Mozilla directory, also giving users the possibility to report issues with them (if any). In addition to those already mentioned in answers here, it also names e.g. Aptoide, AOpenSource – altogether at the moment of this writing 25 Android markets.
Comment: Unfortunately, the DMOZ link now returns 400 Bad Request...
Comment: @AndrewT. link works fine for me, I've just tried. Maybe a temporary hick-up?
Comment: Hmm, is it geoblocked? I got [this error](https://i.stack.imgur.com/3tVVQ.png).
Comment: Ah, double-mistake: 1) different links (the one reading "DMOZ" is going to Wikipedia and working fine), 2) you meant one hosted on AWS. For the latter, I get the exactly same error. I'd say a server configuration issue which must be fixed by the maintainers of dmoz.org. By the way: if you follow the advice and replace the domain accordingly, you get another 400 saying that bucket does not exist either. And trying https on the original one gives a timeout… Until solved: https://web.archive.org/web/20170317110639/http://www.dmoz.org/Computers/Software/Operating_Systems/Android/Markets/
Answer: I received a very good amount of installs from mobiletoones.com and apps.opera.com (now android.oms.apps.bemobi.com).
Also, my revenue was ramped up too within 2 days. If you are looking for targeted users for your app, then you should distribute your app to many sources, not just stick to one website!


Traditional 1-stone handicap before komi

Question: In "traditional" handicap, when there is a ranking difference of 1, black plays first and there is no komi (Sensei's Library uses this term). But if you play without komi anyway, this is no handicap. In the days before komi, how was the 1-stone handicap handled? Or did the weaker player just take black, and handicap started at two stones?
Answer: In Edo period go, the system worked like this:
Even: Taiga-sen (Alternating Black and White)
One Dan difference: San-Ai-Sen (Black two out of three games)
Two Dan difference: Josen (Always Black)
Three Dan difference: Sen-Ni-Sen (Black two games, two stones on game)
Four Dan difference: Sen-Ni (Alternating Black and two stones)
Five Dan difference: (Always take two stones)
Six Dan difference: (two handis twice, three handis once)
Seven Dan difference: (three stones twice, two stones once)
Eight Dan difference: (always take three stones)
It is important to note that you had a different handicap against each player, based of your individual results against each other. Also it was expected that you would play many games. Almost like tennis where you try to break the serve, if you won consistently while playing white, it was impressive (Black is expected to win more often, getting the first move)
Answer: Taking the black stones always implied a handicap, even before the invention of komi. It has been known for centuries that black had an advantage. I think the real question is how even games worked before komi.
To my knowledge, there was no way to get actually even games. The main workaround I could think of would be repeated color switching. You may be be interested in the related concept of Jubango.
Answer: If one player were clearly one stone weaker, he would ALWAYS take Black (with a "free" first move). If the players were regarded as even in strength, they would alternate taking Black. There was even an "intermediate" handicap where the weaker player would take Black, say, two times out of three.


No carbonation in the bottles?

Question: Had to recap my bottles to fill the level up so I didn't have any explode on me. Now they have been sitting for 2 1/2 weeks. Opened one up and there is no carbonation.. is there a way to recarbonate your beer?
Answer: Depending on how healthy the yeast were at bottling, and the temperature that your beer has been at since you bottled, you might not see carbonation yet.
From personal experience, I bottled a batch of beer right before moving out of state, and during the move, I let the freshly-bottled beer get too chilly.  At 3 weeks, that beer had only a slight carbonation, but after warming the bottles to 70°F for 3 more weeks, it came out fine.  I chose to be patient because I didn't want to go to a lot of extra work and potentially jeopardize my beer.
If you started with healthy yeast, and added the proper amount of priming sugar, and have kept your bottles in the proper temperature range for the yeast, it should take around 3 weeks to fully carbonate.
If you see absolutely zero carbonation at 2.5 weeks - there's not even a hint of a hiss when you uncap a beer and rigorous pouring doesn't produce any fizz - then it's possible that your yeast have died or are otherwise unviable.
Should that be the case, I would recommend pouring all of the bottles back into a sanitized carboy or bucket, and repitch healthy yeast and then re-bottle.  If you added the correct amount of priming sugar at initial bottling do not add more sugar, as it could create overcarbonated beer and bottle bombs.
Your question is tricky since you mentioned in a previous question that you opened all your bottles.  If those bottles hissed at all when you opened them, then the problem may not be the yeast, but that you've released some of your carbonation.  Hopefully that's not the case, because then you'd need to evaluate how much more priming sugar to add.  If that had happened, though, your beer would still be mostly carbonated, which it sounds like it is not.
And FWIW, if you underfilled your bottles the first time, you were at no risk of bottle bombs.  The increased airspace would have been like an extra "cushion" that would cause undercarbonated beer.
I know this is a frustrating problem to work with, but be patient - it'll be worth the effort in the end.
Comment: Yes.  Try only filling a bottle halfway during bottling.  It will barely be carbonated when the rest of the batch are ready.
Comment: So underfilling bottles can cause undercarbonation?
Comment: Should you see any visual signs of carbonation without opening? Surface bubbles or something?
Answer: There are carbonation drops that work on individual bottles. But this can be time consuming. I'd do as Brandon suggests and repitch. He's absolutely right about adding more sugar (DON'T). If you know of someone with a kegging system, there are bottling guns that work extremely well. These are pricey but you get much more consistent gas volumes in the bottle. Another way to carbonate by the bottle is to use dry ice. A small piece the size of your little fingernail should do the trick for each bottle. Just be certain to wear gloves to avoid frostbite.

No carbonation in the bottles?


Deluge torrent client says "no incoming connection"

Question: Deluge is not connecting in my Ubuntu 12.04, whereas Transmission is.
I have no firewall restriction/forward configured as far as I know, the port deluge uses (60233) is successfully tested by deluge, and by http://canyouseeme.org/:

Success: I can see your service on 94.109.X.X on port (60223) Your ISP
  is not blocking port 60223

The error Deluge displays varies: mostly no incoming connection, sometimes Error: Host not found (authoritative) -for ubuntu.com tracker-, often timeout (simultaneously to no incoming connection).
As this seems to be no network issue (since Transmission connects & downloads just fine), but more a deluge specific problem: where should I look for problem? And how to solve it?
Answer: I had the same problem in the past. I DMZ'ed my PC through the router and it worked.
Look into your router for DMZ.


Should I link thousands on landing pages to my website or not?

Question: I'm working on a website, recently we decided to create thousands of landing pages to target different cities, using different keywords and feed them to google ...
Our website's google rank is quite good ! question is, should we have these landing pages in our website's structure or have them separate not directly linked to the website ? if we do that is it going to damage our reputation?
Comment: Downvotes seem a bit excessive...
Answer: That's ok to do although you probably will run into issues with duplicate content. Pages like what you're describing tend to have the same content with the exception of city/location names. There just isn't enough different content on the pages to have them be considered original content.
I would also place them on your website as having thousands of mini-sites linked to your main site sounds like something that may be considered a linking scheme. That's a big no-no and you run the risk of penalties or being banned.
Answer: If the landing pages provide different content to each city then I think you should keep them within your sites structure and use internal links between them all.
If you have literally just called pages city_x.html and city_y.html then I am sure Google will catch on and catch up with you soon enough, I would say pull them off altogether before you are punished for it.


Is killing the dragon and losing a T1 tower a good exchange?

Question:
Possible Duplicate:
When should you give up top tower for Dragon?

Is it worth it? dragon gives more gold but you lose towervision.
Dragon Gives 40 more gold to everybody on youre team and 25 for the one who killed the dragon.
Answer: I would say that it is a fair exchange to lose one of the side turrets, but not the mid turret. The mid lane is much smaller and is therefore more valuable to defend. The side turrets, however, are sometimes a hindrance later in the game as your laners try to guard a tower and are scared to move to other lanes because they want to defend the turret. Considering this, taking Dragon can only be done every 6 minutes and does indeed offer more gold for your team, and you can get a good sum of XP for those around the Dragon when it dies early game.
Answer: Its very situational, but when you take Dragon you can often move the group into mid or bot and get a kill or take down that turret which definitely makes it worth it.
Additionally, if you kill dragon then you can get the exact Dragon timer and hopefully snowball it into a series of Dragons for your team.
On the other hand, if you take Dragon and the enemy is able to transition into Baron or take a second turret then it is definitely not worth it. Just use your best judgement and realize what you are gaining and losing.
Answer: A side turret is perfectly fine to exchange for a dragon.
Mid towers are too important as they allow for two zones of your jungle to be safer than if they weren't there, rather than just the top half or bottom half zones of the jungle.
Answer: Taking dragon in exchange for a sidelane turret is definitely worth it, if top turret gets pushed down while u go get dragon, u can freeze lane at your inner turret afterwards, and be safe knowing that the dragon objective is down and the only thing the other top can do is either risk getting ganked while over extended, or try to gank your team, which won't work if you have the proper wards.
Answer: If you look at it from just a gold stand point dragon is worth more.
Dragon = 190g x 5 = 950g
 -1 player also gets a little extra gold for last hitting dragon.
1 Turret = 150g x 5 = 750g
Another aspect of this trade is map control. If your team is already suffering from bad map control (and somehow you manage to take dragon) it may not be worth the extra 200g.
Answer: Ofcourse the dragon is a better option. Purely speaking of dragon vs tower.

The dragon gives more gold.
What you lose from the tower will be won back once you killed the enemy tower.
The enemy team wont be killing the dragon over the next 6 minutes, you will not have to defend that dragon.
You don't need to defend that tower either.

But, of course it's strongly situational. If you can save both, just save the tower first and then do dragon.
If the enemy or minions are killing bot or mid tower, it's easy to defend it. You probably already have 3 people at the dragon, and now you simply gank bot or mid before you go back to dragon. Or dispatch 1 and do the dragon with just 2 people.
If we're speaking of the first 3 towers, those will fall eventually anyway, and are not worth that much post laning phase. If we're talking inhibitor towers or base tower, you MUST defend those before doing dragon.
At the very least, make sure you keep the dragon warded and keep the enemy team away from it. If i had to choose between killing a enemy tower, or preventing my enemy from killing the dragon, i would certainly save the dragon.
Addition: I like to emphasize that getting dragon and keeping tower is of course the best option. The responsibility for killing the dragon lies at the bot laners early game. They should push or win there lane, and then kill dragon. If any jungler is around, the route around level 6 or 7 should be either gank bot->dragon or just call bot->dragon. If it's not possible to do the dragon at this point because of enemy aggression (and map control) either the jungler or the support should keep the dragon warded and prevent the enemy team from taking it instead.


Why do you aerate wort at first and try to keep oxygen out later?

Question: Why should you aerate the wort before pitching yeast but then try to avoid allowing oxygen into it later in the process? What is going on with the yeast that makes oxygen good at first but bad later?
Answer: It is because of the Pasteur Effect.
Yeast are facultative anaerobes, which means they will produce energy aerobically (respiration) when oxygen is present, and anaerobically, by fermentation, in the absence of oxygen.  Aerobic metabolism produces about 20 times as much energy as anaerobic, but ethanol (alcohol) is not a by-product.
Having the yeast metabolizing aerobically at first is helpful for two key reasons:

Yeast will grow in size and mass by storing fatty acids.  These fatty acids store oxygen within the cell that may be used later.  These make the yeast better at fermenting and increase alcohol tolerance.
Yeast will reproduce faster to create a higher density population.

Once all the oxygen has been consumed from the wort, you will have a lot of hearty yeast, but little alcohol.  However, with the oxygen gone, the yeast will begin using anaerobic metabolism, which produces alcohol (hooray)!  Once this happens, you don't want the yeast getting access to any more oxygen from the environment, because they will switch back to aerobic metabolism and quit creating alcohol.
Additionally, presence of oxygen later can cause oxidation to create off-flavoring compounds (e.g., trans-2-nonenal that causes a paper/cardboard flavor.)
Comment: Do you mean "Having the yeast metabolizing _aerobically_ at first..."?
Answer: It has to do with the yeast lifecycle.  Early on, you want yeast to reproduce very fast.  This requires oxygen.  Later on, you want yeast to more or less maintain itself, and specifically start living in oxygen-free mode, such that it stops giving off early-fermentation byproducts..
*Yeast is somewhat special in that it can operate in both an oxygenated environment and a non-oxygen environment- it just acts a bit different, depending on the case.
Comment: I'd add that after fermentation, oxygen is undesirable because it binds with molecules in the beer to form undesirable flavors. Essentially, it makes the beer go stale.
Answer: Although common practice, adding oxygen into the wort before pitching isn't always a good thing - getting the right amount can be tricky. Too much and the oxygen may stay in the beer causing premature staling. Too little and you may end up with a sluggish fermentation, under attenuation or a banana-easter bomb.
Oxygen is needed by the yeast to synthesize lipids for the cell walls. If lipids can be provided in the wort, then oxygen isn't needed, and the yeast can multiply without requiring oxygen. More details at http://www.homebrewtalk.com/f13/using-olive-oil-instead-oxygen-47872/


Trigger the start of a one time workflow via a data entry in a list

Question: I have a workflow that is triggered via any change on a list and it is set to send email. Problem, the condition is set on any data point when I want it to be triggered on one data point when it changes states once.
Thanks,
Comment: Could you please explain more what do you mean "any data point" or "one data point"?
Answer: If the intention is to only trigger workflow once and do not allow it to run subsequently, you could use a "Wait for change" action and use an additional field as a flag to be checked upon workflow start. So basically, under "Wait for change" add also an If condition and check whether the flag is set or not.


Is caffeine helpful or hurtful when backpacking?

Question: When backpacking for several days, is there a benefit to drinking coffee and the likes in the morning, or does the crash that comes later in the day hinder the progress of a group in the back-country?
Comment: Caffeine is dehydrating, but it seems like a small amount isn't going to be much of a problem. Some of the long-distance hikers drink coffee, and still perform well.
Comment: I go backpacking with people that are used to drinking coffee every morning. It's never been a problem. But they might get a headache if we skipped it.
Answer: If you normally have a coffee in the morning then you will be fine with a coffee in the morning out on the trail. It is part of your daily routine.
It is useful to have something like red bull or energy drinks in a pack as part of your emergency rations as week. Not for long term but if you need to stretch a few final miles late in the day due to delays it can help.
Answer: Well in my personal experience, I've never faced any issue with caffeine while on a trek. As mentioned by Rory, if coffee is a part of your morning ritual, it will not make much of a difference. Too much of caffeine is not good while on treks as it does dehydrate your body. A better substitute would be tea. Usually on higher altitude treks, tea is a beverage used regularly along with garlic soups. Tea also happens to have caffeine but the quantity is much lesser (almost half that of coffee).
But always remember, never overdo. Keep water as your primary source of hydration.
Hope this helps.
Cheers!
Comment: -1 because caffeine does not have any measurable dehydrating effect in people whose bodies have built up a tolerance for it. See the references to scientific papers in my answer.
Comment: Also, tea contains caffeine as well. Probably at a lower concentration (depending on how you brew coffee and tea), but still. Caffeine-free alternative: some chocolate milks.
Answer: There are various popular beliefs that alcoholic and caffeinated drinks "don't count" for hydration because alcohol and caffeine dehydrate you. In fact, beer consumed in moderation has a hydrating, rather than a dehydrating, effect,[Valtin 2002] and laboratory studies have shown that caffeinated soda is just as hydrating as water, i.e., the diuretic effect of the caffeine is too small to measure.[Grandjean 2000] Even in the case of coffee, which has much higher concentrations of caffeine than soda, studies going back as far as 1928 have shown that the diuretic effect vanishes for people whose bodies have learned to tolerate the caffeine.[Eddy 1928]
Caffeine has various positive mental and physical effects, which are one of the main reasons people consume caffeine. It typically improves athletic performance, which would be a plus while hiking.
Caffeine is addictive. However, the time it takes to lose the addiction is typically very short, typically just a few days. Some people may actually lose a significant portion of their physical dependence and tolerance just between their last cup of coffee of the day and the time when they wake up the next morning.
If you have a heavy caffeine habit and suddenly go cold turkey for a hike, the withdrawal symptoms may be unpleasant on your first day. A lot of people think they have physical problems with altitude at elevations as low as 2500-3000 m, and while I don't have any hard evidence, I've always suspected that a lot of the headaches, etc., are not really the effects of altitude but in fact a combination of sleep deprivation and caffeine withdrawal. If you want to avoid withdrawal symptoms, one possibility is just to taper off your habit in the last couple of days before the trip. This is what I do, and it works well for me.
Depending on how you get your caffeine, obtaining it while backpacking may be time-consuming, because you have to boil water. But this is not necessarily a bad thing. Purely as a social matter, a pitstop for tea is a valued little ceremony, e.g., for many mountain guides in East Africa. The hot water may also be helpful if you're in cold weather, and bringing the water to a boil will also kill any potentially harmful microorganisms, although the presence of such pathogens in backcountry water sources has been vastly exaggerated in the popular consciousness. (And contrary to popular belief, it is not necessary to boil the water for any particular amount of time. All organisms capable of causing disease in humans when ingested are killed long before the boiling point is reached, although bringing the water to a boil is a handy way to verify that you've reached the necessary temperature.) If you don't want the hassle of boiling water, and want to keep getting your caffeine fix, there are various other options such as caffeine pills (No Doz), chocolate-covered coffee beans, and caffeinated energy gels.
Eddy 1928 - Eddy NB, Downs AW. Tolerance and cross-tolerance in the human subject to the diuretic effect of caffeine, theobromine and theophylline. J Pharmacol Exp Ther. 1928;33:167-174.
Grandjean 2000 - Grandjean et al., "The Effect of Caffeinated, Non-Caffeinated, Caloric and Non-Caloric Beverages on Hydration," Journal of the American College of Nutrition, Vol. 19, No. 5, 591-600 (2000) http://www.jacn.org/cgi/content/full/19/5/591
Valtin 2002 - Heinz Valtin, "'Drink at least eight glasses of water a day.' Really? Is there scientific evidence for '8x8'?," Am J Physiol Regul Integr Comp Physiol 283: R993-R1004, 2002. http://ajpregu.physiology.org/cgi/content/full/283/5/R993
Comment: Nice! Do you have a reference for your statement "the time it takes to lose the addiction is typically very short, typically just a few days"?
Comment: There are some references in the WP article: http://en.wikipedia.org/wiki/Caffeine#Withdrawal
Answer: I drink caffeine in mass quantities. It's hard to find me not drinking a coffee, Coke, or something similar, here in the regular world.
But when I'm out in the backcountry, I only rarely drink it. I find that I just don't really need or want it.
When I started my hike of the Appalachian Trail I brought a coffee press attachment for my Jetboil and coffee, milk and sugar. The whole nine yards. I even used it for a few days and enjoyed my morning coffee. But it was a lot of hassle, and I sent them home from Neels Gap, mainly to save weight. Though I didn't miss the hassle and I found that I really didn't miss the caffeine either.
I do still drink it when I'm in town or at a hostel or something, but I just don't bother taking it out into the backcountry anymore.


3D Particle-Geometry collision

Question: I am programming a particle engine for a 3D game written in XNA. I was wondering if somebody could point me in the right direction or perhaps give me some pointers in making the particles collide with geometry in game. In essence, I want to be able to make a spark emitter that will bounce and collide down say, a cylindrical tube.
Comment: Are you looking for engines that do this, how to manually implement it, or both?
Comment: I am making an engine to do this for me.
Answer: For 3d physics, you can use 3D Physics Engines as Bullet, Newton or O.D.E. It is probably at first sight overhead... but you can use it for many great effects or add physic in your gameplay.
You can use PAL to abstract the Physics Engine.
Comment: O.D.E is the same link as bullet, but I understand the idea.
Answer: Particle mechanics isn't terribly difficult to understand in general, but there are some messy details.
The single biggest thing to remember is Truesdell's Axiom: "No two distinct masses may occupy the same point in space at the same point in time." Simulating particle dynamics is largely about creatively breaking that axiom, while still preserving physical plausibility.
There's several methods for enforcing non-penetration: measure differential inclusions, displacement based penalties, and velocity based restitution are fairly well developed computationally.
Since you're interested in gaming, I'd recommend focusing on restitution-based methods which produce diagonal systems of equations (i.e., you can solve them explicitly).
A good first reference for details is "D. Baraff, Dynamic Simulation of Non-Penetrating Rigid Bodies, (Ph. D thesis), Technical Report 92-1275, Computer Science Department, Cornell University, 1992."
I would start with Baraff's work and either Bullet or O.D.E. Work in parallel between theory and code.
Also, if you can find papers on Distinct Element Method by Peter Cundall, you might find those an easier entry point.
Particle interaction is very rich. Don't expect overnight success, and you will have a lot of fun.

3D Particle-Geometry collision


Itunes Library main vs shared

Question: I recently moved by itunes library from my pc to an external hard drive and updated to itunes 11.0.  After doing this, when I click on my music I can see two separate libraries.  One is just under Library as music.  Then there is a second one listed below that says Shared Library and refers to the external hard drive.  Some of the songs from albums are missing in the main libary but are present on the Shared Library.   Do I need both of these libraries and if so is there a way to update the main library to get these missing songs from the shared library?
Answer: Okay this is what I would recommend.Follow the steps:

Clear Out your iTunes Library completely
Copy the contents from your hard disk to a place on your Computer
Add the folder from your computer to your iTunes Library and you will get back your old  arrangement of songs.

Hope this helps!
Answer: It's not clear how or why you want two libraries, but you can switch between both by quitting iTunes and holding the Shift (PC) or Option (Mac) key.

HT1589 - How to open an alternate iTunes Library file or create a new one

Then you can export the playlists and everything about the library to your desktop as FileA.xml. Quit and repeat for the other library and make FileB.xml. Then you can choose to merge or not the files and songs / make your one library be the one you like and then import the two xml files to recreate whatever playlists you are missing. It's far easier to clean things up and have one library (a folder with all the iTunes database files) sitting in your user home folder and either store all the media there or store all the media on an external drive. Once you understand how to export the playlists and settings, it's much easier to change storage plans.

Itunes Library main vs shared


Mixing piano and guitar

Question: I'm trying to blend acoustic guitar and piano as background tracks behind vocals.  Individually, both tracks sound excellent, but when I combine them they step on each other and sound really bad.
Any tips (EQ, panning, or otherwise) on getting these two instruments to play nice together?
Comment: What exactly do you mean by "very bad"? Elaborate!
Comment: @Pelle: It's kinda hard to describe, but the two sounds are fighting each other.  Almost a dissonant sound.
Answer: Try to find the sweet spot in each and give it a little EQ boost, while cutting that from the other tracks.  Also, cut areas where the tracks have no contribution, e.g. below 100hz for vox/guitar, and above 10khz for the guitar (e.g., you'll have to play with it).
A more advanced trick is to use side-chaining compression between the vocals and one or both instruments.  Basically you arrange for a compressor on your instrument(s), but key the compressor not from the instrument(s) level(s), but from the vocals level.  When the vocals get loud, the instrument(s) will lower their volume dynamically and, if you get it right, musically.
Generic steps:

Send vox to a bus specifically for keying the side-chained compressor
Add the compressor to the track(s) you want to compress
Set the key input of the compressor to the bus you set up in #1 (note that not all s/w compressors have this, but the stock Pro Tools compressors do, e.g.)
adjust things in the compressor until it sounds right; a good way to start is to set it to SEVERELY compress the instrument tracks so you can actually hear the (exaggerated) effect.  Then dial it back until it sounds good.
Answer: Simply mixing the guitar and piano tracks at different volumes might help.  Pick one of the two as your primary instrument, and mix it louder.  The other can be mixed quieter (perhaps with a softening effect like chorus or reverb) to provide additional atmosphere.
Answer: Are the two just out of time? If so, then you're either going to have to do some serious audio quantizing work or just re-record.
Otherwise, there are two basic options. Either EQ them so they're not occupying the same frequency bands, or pan them away from each other. Don't take either of these too far or it'll just sound weird, but a little bit will help separate them.
Comment: The guitar player was listening to the piano track in headphones when he recorded so it's not a timing problem.

Mixing piano and guitar