counting the patterns

Question: We're given N, the length of pattern and 3 letters X, Y, Z. We can fill the pattern using anyone of them with repetitions allowed so that the total number of patterns is $3^N$. A pattern is special if there are three consecutive letters from which one is X, one is Y, and one is Z. For example, XYZXYZ is special, while XXYYZ is not. For a given value of $N(N<30)$, how many patterns are not special?
Comment: Can be done for smallish $N$ by using Inclusion-Exclusion. But that gets unpleasant quickly.
Answer: Let $a(n)$ be the number of non-special patterns of length $n$. It's convenient to divide these into those that end with two copies of the same letter and those that don't. Let $a_s(n)$ be the number of non-special patterns of length $n$ that end in two copies of the same letter, and let $a_d(n)$ be the number that don't. Then $a_s(1)=0$ and $a_d(1)=3$. Moreover, it's easy to see that $a_s$ and $a_d$ satisfy the following recurrences:
$$\begin{align*}a_s(n+1)&=a_s(n)+a_d(n)\\
a_d(n+1)&=2a_s(n)+a_d(n)\;.
\end{align*}\tag{1}$$
That is, a non-special pattern of length $n+1$ whose last two letters are the same results from doubling the last last letter of any non-special pattern of length $n$. A non-special pattern of length $n+1$ whose last two letters are not the same can be obtained by adding either of the two non-matching letters to a non-special pattern of length $n$ whose last two letters are the same; but if the pattern of length $n$ does not have identical last two letters, the new letter must be a copy of the penultimate letter. (E.g., if the $n$-pattern ends in $XY$, we must add $X$ if we want a non-special pattern whose last two letters are different.)
It follows from the first recurrence of $(1)$ that $a_s(n+1)=a(n)$, and adding the recurrences yields $a(n+1)=2a(n)+a_s(n)$. Combining these, we see that $$a(n+1)=2a(n)+a(n-1)\;,\tag{2}$$ which is a straightforward linear homogeneous recurrence. Its auxiliary equation is $x^2-2x-1=0$, with roots $\frac12(2\pm\sqrt8)=1\pm\sqrt2$, so the general solution of $(2)$ is $$a(n)=A(1+\sqrt2)^n+B(1-\sqrt2)^n\;.\tag{3}$$
You know that $a(1)=3$ and $a(2)=9$, so you can substitute these into $(3)$ and solve for $A$ and $B$ to get the specific solution that you want. Or, since you're interested only in $n<30$, you can simply use $(2)$ to calculate the values directly.
Comment: thanks Brian, I was having a hard time in finding these recurrences and I don't have enough reputation to vote up your answer :(
Comment: @tendua: No problem. By the way, the technique of breaking the things that you're counting into subcases is quite often useful, though it isn't always so easy as it was here to put them back together.
Comment: I tried the same approach, but you were faster ;-) Moreover, my ecurrence was wrong (and yours was right).
Answer: Let $A_n$ denote the number of non-special patterns starting with $XX$, and $B_n$ the number of non-special patterns starting with $XY$. Then $A_2 = 1$, $B_2 = 1$ and
\begin{align*}
A_{n+1} &= A_n + 2B_n, \\
B_{n+1} &= A_n + B_n,
\end{align*}
with solution (calculated by Mathematica) being:
\begin{align*}
\delta = 1+\sqrt{2} && \hat\delta = 1-\sqrt{2}
\end{align*}
\begin{align*}
A_n &= \frac{-1 + \sqrt{2}}{2} \delta^n + \frac{-1 - \sqrt{2}}{2}\hat\delta^n  \\
B_n &= \ \frac{4 - \sqrt{2}}{4}\delta^n \ + \frac{2 + \sqrt{2}}{4}\hat\delta^n
\end{align*}
It is possible to arrive at those formulas by generating functions, or assuming that $A_n = \alpha a^n+\beta b^n$, similairly for $B_n$ and then trying to solve by substitution of small values of $n$.
Your total result is $3B_n + 3A_n$.
Edit: Corrected the formulae (Brian M. Scott was right).
Answer: Actually Inclusion-Exclusion is not so bad here, start by considering the number of different gaps when $k$ copies of the forbidden pattern XYZ are placed on a row of $n$ cells. There are $k+1$ possible gaps and they have size zero or more, giving the following formula for the number of gaps: $$[z^{n-3k}]\left(\frac{1}{1-z}\right)^{k+1}
= {n-3k+k \choose n-3k} = {n-2k\choose n-3k} = {n-2k\choose k}.$$
It now follows by inspection that the count $q_n$ of patterns that are not special is given by
$$q_n = 3^n - \sum_{k=1}^{\lfloor n/3 \rfloor} (-1)^{k+1} {n-2k\choose k} 3^{n-3k}
= 3^n + \sum_{k=1}^{\lfloor n/3 \rfloor} (-1)^k {n-2k\choose k} 3^{n-3k}
\\ = \sum_{k=0}^{\lfloor n/3 \rfloor} (-1)^k {n-2k\choose k} 3^{n-3k}.$$
In order to get a closed form for this sum introduce the ordinary generating function
$$f(z) = \sum_{n\ge 0} q_n z^n
= \sum_{n\ge 0} \sum_{k=0}^{\lfloor n/3 \rfloor} (-1)^k {n-2k\choose k} 3^{n-3k} z^n
= \sum_{k\ge 0} \sum_{\lfloor n/3 \rfloor\ge k} (-1)^k {n-2k\choose k} 3^{n-3k} z^n
\\ = \sum_{k\ge 0} (-1)^k 3^{-3k}
\sum_{\lfloor n/3 \rfloor\ge k}  {n-2k\choose k} 3^n z^n.$$
Now work on the inner sum to get
$$\sum_{n\ge 3k}  {n-2k\choose k} 3^n z^n
= \sum_{n\ge 0} {n+k\choose k} 3^{n+3k} z^{n+3k}
\\= 3^{3k} z^{3k} \sum_{n\ge 0} {n+k\choose n} 3^n z^n
= 3^{3k} z^{3k} \left(\frac{1}{1-3z}\right)^{k+1}.$$
Substituting this into the outer sum yields
$$f(z) = \sum_{k\ge 0} (-1)^k z^{3k} \left(\frac{1}{1-3z}\right)^{k+1}
= \frac{1}{1-3z} \frac{1}{1+z^3/(1-3z)} = \frac{1}{z^3-3z+1}.$$
This does not lead to a simple closed form as the roots of $z^3-3z+1$ are represented by rather involved cubic root formulas. But it produces the following sequence of terms:
$$1, 3, 9, 26, 75, 216, 622, 1791, 5157, 14849, 42756, 123111, 354484, 1020696, 2938977,\ldots$$
which points us to OEIS A076264, where a host of additional material may be found, including how to get the asymptotics out of the generating function.
Remark. This does not agree with the results from the other responders but I would take the OEIS entry as strong evidence that we have the correct answer.
A similar calculation can be found at this MSE link.

counting the patterns


How many computers are connected to the "Ledger" or the Blockchain of Bitcoin?

Question: Somebody asked me about Bitcoin and I explained to him many many computers are connected to the Blockchain to keep records of all the accounts (or to keep addresses of the bitcoin and owner?). But how many computers are connected to it, as of recently or 2020?
Comment: Note: the Blockchain doesn't keep records of *accounts* and doesn't keep track of owners. The Bitcoin network doesn't care about owners in the normal sense - it only cares about proofs of knowledge of private-keys corresponding to addresses. Anyone who can prove they know a key is allowed to spend associated money. Ownership of money in the Bitcoin network is not the same as legal ownership.
Answer:
Somebody asked me about Bitcoin and I explained to him many many computers are connected to the Blockchain to keep records of all the accounts (or to keep addresses of the bitcoin and owner?).

The blockchain is the data structure they collectively maintain. It is not an "entity" that can be connected to. The nodes are just connected to each other, and tell each other about updates they learn about.
It's hard to count how many nodes there actually are. There are sites like https://bitnodes.io that keep track of reachable nodes. However, there are many nodes on the network that only connect out to others but can't be connected to; probably in the 100000s.
A further complication is that not all of these nodes are equally relevant. It's easy to spin up a few hundred nodes on AWS, that nobody uses for anything, but do make it look like there are lots of independent users. Worse, there are also a lot of spy nodes on the network that don't do any work, except trying to monitor which nodes are the origin of particular transactions.
In the end, if you run a node yourself, it doesn't matter. It validates everything the network tells it, so if you do that, the part that matters is: 1 node, your own.
Comment: I added up the "11476 Bitcoin Core nodes" on https://coin.dance/nodes with the other nodes and that number is less than 20,000... could that means less than 20,000 nodes?
Comment: These sites only count reachable nodes. It is very hard to know the actual numbers of others. None of these sites are authoritative. It's just fundamentally hard to know about unreachable nodes.
Comment: @deeper-understanding 83120 Bitcoin Core nodes and more nodes for other implementations according to https://luke.dashjr.org/programs/bitcoin/files/charts/software.html Also refer to this answer: https://bitcoin.stackexchange.com/a/98821/ and I agree with Pieter every website uses its own strategy to crawl and get the numbers
Comment: If it is 83120 nodes... or say, 100,000 nodes, then does that mean one country can just buy 50,000 Raspberry Pi, which would be 50,000 x US$50 = US$2.5 million and be able to become the 51%? It they spend $2.5 million and can steal $20 million, that's immediately very profitable
Comment: Full node ! = Miner https://bitcoin.stackexchange.com/questions/59220/what-is-the-difference-between-a-miner-and-a-full-node and 51% attack is more than just getting hashpower. Some of the game theory is already mentioned in your previous question: https://bitcoin.stackexchange.com/a/101922/
Answer: Computers are not 'connected to the blockchain', as that implies that the blockchain is some sort of central entity in the network.
In reality, the network is just made up of a huge number of peers, known as 'nodes'. A 'full node' is one which has fully verified the state of the network, by working to verify all transactions that have occurred since the genesis block.
So each node keeps its own copy of the blockchain, and is connected to other nodes, which each have their own copy as well. The rules of the network work to allow these nodes to all remain in consensus about what that blockchain looks like, despite the fact they each keep their own record of it.
How many nodes are there? It's tough to say. Many nodes are made to be intentionally hidden, for security or privacy reasons. Many exist on the tor network, and some receive their information via satellite feed. Some websites will query nodes on the network in an attempt to figure out numbers, but ultimately the answer to this question is not really knowable for certain.
See for example:

https://luke.dashjr.org/programs/bitcoin/files/charts/historical.html
https://coin.dance/nodes
https://bitnodes.io/


does "this will kill you" count as a flag reason?

Question: This answer is dangerously unsafe. Is it valid to flag such a post as needing moderator attention?
Comment: Just as an update. His answer was poorly worded, and has been edited to reflect what his intentions were.
Answer: Since we don't actually have moderators yet (just admins), I don't know that flagging it would do you much good at this point.  Even when we do elect moderators, I don't think I would flag it; downvote and comment as necessary.
I liken it to a Stack Overflow answer with a dangerous security flaw.  I have enough faith in the community to sort these issues out without moderator intervention.  If it becomes a serious problem, we can revisit the discussion.
Answer: I could go either way on this one.  I can both see the point of making sure dangerous things are removed, and also that it would allow the community to address common myths that are seriously dangerous.
Answer: The best thing you can do is to downvote the question to show you shouldn't do what is suggested. In most cases, it can be hard to draw the line of what is good/bad behavior and I don't think that it should be a moderators job to judge the contents of a post.
After all the up/down vote system is made for something like this.
This could compare this on stackoverflow when people write a post with code that will introduce bugs or security issues. We downvote those answers and comment why you should definitely not do as the posted, we don't flag them for moderators.
Answer: Is death guaranteed?
If not, I think you're being alarmist - and a comment would suffice.
Comment: Death isn't even guaranteed if you shoot yourself in the head with a shotgun.
Answer: Agreed with acrosman. Dangerous information needs to be flagged out and/or addressed with the facts.
Actually, perhaps that might be a good community wiki question?
Answer: How about a big red disclaimer?  Something like "The answers to this question are potentially unsafe, and you are responsible for all safety research before following any advice." Maybe even put it in the notification dropdown for badges.  Also, we could only show the disclaimer on questions that are tagged "food-safety", or potentially another special tag.
I obviously don't know any legal stuff about this, but maybe it'd at least make people think twice before trying something.


How did Voldemort know he could access Harry's mind but not realise this was because part of his soul was latched onto him?

Question: Once Voldemort realised he could access Harry's mind in Harry Potter and the Order of the Phoenix, how did he not realise this was because part of his soul was latched onto him?
Comment: First version was good. Why did you edit the title? Keep the title simple.
Comment: Apologies, but I had to edit it because Harry is not a Horcrux. See here - http://scifi.stackexchange.com/questions/11530/how-did-harry-become-a-horcrux/11546#11546
Comment: Harry not a horcrux? That would make whole Harry potter series no sense. He was not intentionally horcrux. But he is a Horcrux.
Comment: @SS. Did you even read the link?  JKR herself said that a Horcrux is deliberate, and that what happened with Harry wasn't technically a Horcrux because of the accidental nature.
Comment: @JMac Yeah. I did. But that is not easy to digest. Voldemort didn't cast the horcrux spell in case of harry. It was accidental. I know that. But a part of Voldemort's soul lived in Harry . Isn't it?
Comment: @SS. "the definition will be that a receptacle is prepared by Dark Magic to become the receptacle of a fragmented piece of soul, and that that piece of soul was deliberately detached from the master soul to act as a future safeguard, or anchor, to life, and a safeguard against death."  This was accidental, and therefore not a Horcrux, even if it performed the same actions.
Comment: Same question on S&F SE by the same user: http://scifi.stackexchange.com/questions/157037/how-did-voldemort-know-he-could-access-harrys-mind-but-not-realise-this-was-be
Answer: Because he was under impression that he is using magic for same. He was using Legilimency Spell for same, the part of his soul made the connection strong , however Voldemort would have been able to access Harry's mind anyways.

The Legilimency Spell (Legilimens) allows the caster to perform Legilimency; in other words, to delve into the mind of the victim, permitting the caster to see memories, emotions and thoughts. Skilled Legilimens, such as Lord Voldemort, are able to perform Legilimency without using the incantation or a wand.
Voldemort has used this spell extensively, both wandlessly and nonverbally, to enter the minds of those he wished to interrogate. Due to the link between himself and Harry, both can access each other's thoughts if Voldemort does not block it off with Occlumency.

Voldemort  might had believed that Harry is weak and hence his mind is easily accessible.
Most of people believed this connection is due to the scar gave by Voldemort. He himself believed same, he never thought about soul being latched as this was rare case.
Answer: Because:

No one knew this was possible – except for Professor Dumbledore himself.
Voldemort's huge ego prevented him from analyzing it further.

No one knew this was possible.
Up until it happened, everyone thought the Killing Curse could not be stopped or blocked. "Professor Moody" (Barty Crouch Jr) said so when he was teaching Defense Against the Dark Arts. He stated that the only one known to have survived this curse is Harry. And the reason for this was a mystery to all but a very few. Harry was simply "the boy who lived".
Only Dumbledore (and later Voldemort) figured out that the Killing Curse could be made to rebound off of someone who is protected by the ancient magic of love. Lily Potter died to protect the son whom she loved. Only Dumbledore reasoned out the following:

Because of Lily, Harry was protected.
The Killing Curse rebounded and hit Voldemort, destroying his body but not his soul because of the horcruxes Voldemort created beforehand.
Harry could speak to snakes.
Only the rare descendants of Slytherin spoke to snakes.
Harry was either a descendant or something else.
An additional part of Voldemort's soul was ripped from what remained in his body and latched onto the only living thing in the vicinity: Harry.
That's why Harry can speak to snakes.

Again, only Dumbledore riddled this out (I guess the pun was intended). No one else knew this. Recall when Dumbledore was giving instructions to Professor Snape on what to do after Dumbledore died. He had to specifically say that only Voldemort is the one who had to "kill" Harry. He had to give these exact instructions because no one knew (including all the Death Eaters) that Harry had to have Voldemort's soul fragment removed before Harry could be cured. So Harry had to be "killed" by the only person where the Killing Curse would not work -- Voldemort. And Voldemort's ego pretty much guaranteed that he would be the one to "kill" Harry.
Voldemort's huge ego prevented him from analyzing it further.
Voldemort never took the time to be this analytical – because of his enormous ego. He was very intelligent, but not interested in being an academic. He just wanted to be the most at everything he considered important: power over everyone, eternal life, the elegance of his existence. When Voldemort realized he could reach Harry's mind, it was easy for his ego to make the mistake of thinking his extraordinary talent at legilimency allowed him this unprecedented reach (probably boosted by using Harry's blood to reanimate).
This is not the only time that Voldemort's ego led him to make crucial errors in judgment. Snape used this to his advantage when his skill at occlumency allowed him to move within senior Death Eater circles as a spy. Voldemort never suspected that his prowess at legilimency could be bested.
Also please recall that, when Voldemort was disappointed while using the Elder Wand, he said that he did extraordinary things with it because he was extraordinary, and not because the Elder Wand had chosen him. That led Voldemort to incorrectly think that the Wand still belonged to Snape. So Snape had to die by his hand in order to have the Wand change allegiance. This mistake was a direct consequence of Voldemort's unbridled ego.
Comment: This line in your answer - 'So Harry had to be "killed" by the only person where the Killing Curse would not work -- Voldemort.' is brilliant!! May I ask if this is your own interpretation or is there a source for it? (Just to add, even if there is no source for it, this still makes perfect sense and after reading it, the whole story is much more clearer to me now..) BTW, you seem to be an expert on 'Voldemort's ego-fuelled messes!! :-D'
Comment: @CCCC There are references to this in Rowling's books, but not captured as directly in the movies. Please give me some time and I will edit this comment with at least one book reference. To your question as to whether this is my interpretation: No, because of Rowling's books.
Comment: @CCCC Unable to edit comment above: In Book 7, Chapter 33 (page 686 in my book), Dumbledore instructs Snape that Voldemort must be the one to "kill" Harry. His quote: "And Voldemort himself must do it, Severus. That is essential". After Voldemort's Killing Curse, all of Chapter 35 is dedicated to Harry's experience in the "almost hereafter" when he talks to Dumbledore's spirit. While there he sees a pitiful, small, suffering being which represented the small part of Voldemort's soul that had attached itself to Harry -- and is now detached. Dumbledore's plan to redeem Harry's soul succeeded.


Is there access to beyond hardest AI in Super Street Fighter IV Arcade Edition?

Question: The AI in the bonus/hidden stages of Arcade Mode are significantly trickier to beat than the same AI in versus mode on hardest. Is there a way to access this difficulty of AI in versus mode? Maybe we can move some files around in the SteamApps folders to achieve this?
Comment: When you say bonus stages do you mean bosses and rivals fights?
Comment: No, I mean the stages after Seth. You can unlock them when you have a certain combination of # of perfects, # of ultra/super finishes, # of first attack, and no continues.
Comment: Akuma, Gouken, Evil Ryu and Oni are bosses too.
Answer: The AI settings are encoded in the BCM files and are pretty much deciphered, but there isn't much room for improvement. The current 'hardest' difficulty is almost optimal within the AI framework. You can find detail in the Modding SSF4AE for PC thread. It's a long thread but worth reading if you're serious about modding the game.
The difficulty of hidden bosses is another story. It is not done by AI settings, instead, they are 'cheating' - they have entirely different move sets from the original character. It seems these special move sets are in the EXE, nobody has successfully extracted them yet. This information can also be found in the aforementioned thread.
However there are multiple attempts to recreate them based on the original version of the character, the most authentic one being Error1's boss character moveswap, you can find the download links in the video description.
Answer: The bosses are completely different characters (as NS.X. already pointed out). The problem is that they have different startup timings, invincibility etc. This might confuse you if you want to play online.
Except from just swapping files you could also change the existing character files.
The idea is simple. You use a tool to tweak the moves of the existing characters:

Make Sagats fireball do +20 DMG
Give Sakura Zangiefs health
etc.

Or if you just want to make the game overall harder: Give your character less hit points.
I would not mess with startup and hit stun timings.
You can use the handy OnoTool (see here and here).


Why didn't the key word trigger the hypnosis on the first incident?

Question: There's a scene on the bridge during Now You See Me where Dylan and his Boss are being talked to by the FBI. The FBI guy says "Despite their bullshit razzle-dazzle". Now, at this point nothing happens. But in 10 minutes later, the same guy says "bullshit", and the Boss starts playing Beethoven. Was this an actual flub, or was there something I missed explaining why it triggers that time and not the other?
Comment: Oo!  Good catch!  I'm curious about the answer too.  (BTW, I loved that movie!!)
Comment: This movie has a lot of plot-holes. I'd say this is just another one
Answer: I think it can be safely assumed this is a gaffe. It appears on a few sites online where it is identified as a Movie Mistake and there are forums over at Reddit and other such sites with people citing this issue as something that brought the film down.
I've yet to find a comment or response from the film makers about this, but like with any movie, there are tons of gaffes like this that slip through.
Answer: So this is a little stretch but could it be possible that Evans received a phone call while on the way to the safe and was hypnotized then? When Rhodes is interrogating McKinney, he says McKinney can hypnotize people over the phone.
Answer: I didn't realize that others didn't pick up on this till I saw this post. So I'll post what I picked up on when I watched the movie.  While at the warehouse the guy who helped load the safe said......"sir you got a phone call and said Washington wanted the safe moved." then the guy said "you never heard that come out of my mouth agent." it's at that point that Dylan realizes what happens and tries to stop him from saying bs which if you didn't catch the exchange you would wonder why he would try to stop him cause there was no one in the warehouse that was in the audience in Vegas. Cause thats the trigger word that triggered the french guy to play beethoven and not the trigger word from new orleans which was freeze to tackle the quarterback..so it would seem that bs wouldn't trigger anything but knowing  that Merritt can hypnotize over the phone and guessing thats hes gonna taunt the FBI guessed that bs was going to trigger some sort of reaction which is why he said he guessed it was Beethoven...but in all reality now knowing he's the puppet master  we know he told them to call and hypnotize his boss.....Anyway that's what I picked up on...I could be wrong but...
Comment: You might want to bring some more structure into this answer. It may be that it's just too long that I have seen this movie, but I didn't pick up a single thing from this stream of conciousness.


How do I mock or embed an OSGi HttpService in a unit test?

Question: I have a module that I want to unit test, which extends HttpServlet and, in the real application is connected to an OSGi HttpService (the Jetty-based Pax Web) using registerServlet().
I'm setting up a unit test for that module and want to check whether some test HTTP requests are handled correctly. For this, I need either to embed an instance of HttpService from one of my bundle JARs or create a mock. Since I want to process an actual HTTP request, I figured I should really run a HTTP server. So far, I found tutorials on how to run a Jetty instance from within an application, but I still need to wrap the HttpService around this somehow.
Answer: I'm going to wrap a Jetty instance in a simple implementation of HttpService.


Get custom field from other post in carousel

Question: Im using a plugin called wp carousel to display custom post types in a carousel in the footer in the singular view of posts. By default the plugin gets the featured image and the title of the post, but i want to add a custom field (plain text) I've added to the custom post type through ACF.
I've tried adding this to plugins/wp-carousel/themes/default/theme-jcarousel.php
<?php global $post;
$sidans_id = $post->post_id;
$hamta_kund = get_field('kund');
echo $hamta_kund;
?>

on line 192 (right after the code that gets the title.
What this does is get the currently viewed posts' custom field, I want to get the custom field that is associated with each post in the carousel.
So every item in the carousel gets the same value (the value from the one im currently viewing).
Do anyone know what im doing wrong?
This is some documentation from the plugin-author.
http://sumolari.com/proyecto/wp-carousel/wp-carousel-documentacion-docs/
I've tried the support forum but no answer and im running out of time with the client.
Answer: You should use get_post_meta($sidans_id, 'kund', true); instead. The get_field call is using the ID from the post loop and not from global.
Comment: Thank you for pointing that out, for page-id I had to use `$item['ID']` to get the current Id from the plugin.


Shifts in demand curves

Question: When plotting a demand curve for a good, lets say carrots with price on the y-axis and quantity demanded on the x-axis. A shift any determinant of demand other than price of carrots results in a shift of the curve. Let us say that determinant in question is income. National income increases and as a result demand for carrots increases (as carrots are a normal good). The shift for an increased demand is referred to as a 'shift to right'. However is this not a vertical shift up. A vertical shift up of the demand curve means that for the same price people will demand more and for the same quantity people will pay a higher price. Is 'a vertical shift up' and 'a shift to the right' just different ways of describing the same movement or does a 'a shift to the right' achieve something different that I have not understood.
Answer: Consider a curve with a negative slope (such as the demand function for a normal good).
If you draw a second curve with a negative slope that does not intersect this one then it can either be in the "right-up" or the "left-down" direction from the first.
When they talk about shifts they sometimes just mean this general direction where the new curve will be. Sometimes (as with taxes) there really is a shift.
Let quantity be the vertical axis. If $D(p) = m - \frac{1}{p}$ then an increase in income will shift the demand curve up. But if $D(p) = \frac{m}{p}$ then an increase in income causes something that is not really a shift but a rescaling of the curve. You might still call this a shift up, as by moving up from the original demand curve you will reach the new one.

Shifts in demand curves


Recovering a Missed Call

Question: I just received a call today, but my phone locked up during the call, and when I went to the missed call list, the number didn't show up.  Is there any way to somehow recover the number that was calling?
Answer: Your network provider may provide a "Last Number Redial/Called" or "Call Alert" service.
This is usually a number that you call that will tell you the phone number of the last incoming call to your phone, or can often be implemented as a service that you can turn on and off (again, usually by calling a number or issuing a USSD code) which will inform you in some way (usually by text message) of missed calls.
For example, in the UK, O2 used to have a number, 1471, that you could call to hear an automated voice message telling you the number of the last person that called your phone.  Unfortunately, they have withdrawn that service however, they have replaced it with a free "Call Alert" text message service.
Note that there is no universal mechanism to retrieve the number of the last person that called you, if you no longer have (or never had) that information saved within your phones own call log.
Each of these services is specific to your mobile network provider who may or may not even offer such a thing.  If the last number that called you is truly missing from your phones own call log, you may try to get in contact with your network provider to see if they offer a service as described here.  Also note, though, that even if they do offer such a service, it'll usually only retain the very last number that called, so if someone else calls you in the meantime, the number that you're seeking will probably be lost.

Recovering a Missed Call


How does Tor Network latency (speed) compare with direct internet?

Question: Tor seems slower than my normal direct internet connection, perhaps because of high traffic from users or low bandwidth.
Can anyone explain the speed differences to me?
Thanks so much. Have a nice day.
Comment: Hi, and welcome to Tor.SE. Please don't leave comments asking "Can anyone help me?", "Why don't I have an answer yet?", etc. Be patient, and hopefully someone will answer your question. Good luck!
Answer: External research performed December 2010 to January 2011 found that "The average ratio of HTTP request durations (Tor/direct) [from around the world] is 4.1."
"Another observation is that the four nodes located in Germany, UK, and USA always have the fastest Tor connection compared to the other nodes.. more than 50% of all Tor nodes [were] located in these countries [at the time]." Today, Germany, France, and Netherlands surpass the United States.
Also, "During the timeframe of our experiments, the median value for downloading of 50 KB was reported [by Tor Metrics] as between 3 and 4 s, and for downloading of 1 MB between 9 and 15 s. Our results of downloading 50 KB were between 3 and 11 s (median), and for the download of 1 MB between 12 and 26 s (median). We see them as comparable."
Note that today, Tor Metrics reports a median value for downloading 1 MB between 1.00 and 1.25 seconds. This is an improvement by a factor of 10 from the time of the research cited!
As for bandwidth, Tor Metrics reports that approximately 50% of advertised network bandwidth is currently utilized.
Comment: Thanks so much for your answer... Nice research and useful metric. Thank you so much.
Answer: Tor is somewhat slow by design. Bouncing your traffic between three nodes before sending it out to the wider internet (6 nodes after the response is received) adds a significant amount of latency to the round trip time.
To increase the bandwidth alloted to a node you run, look at the following lines in your torrc file (with some large example values):
RelayBandwidthRate 300 KB
RelayBandwidthBurst 350 KB
MaxAdvertisedBandwidth 100 KB

Sidenote
Manually picking three relays and using them removes almost all of the benefits Tor provides. Now an attacker can simply focus on those three nodes. Persuading your friends to turn over access to their nodes, or just stealing their private keys (or performing a DOS attack, or some other form of attack) is probably going to be easier for the attacker than if you're using three random nodes as is intended.
Further reading
This 2009 Tor Project blog post on the subject might interest you.
Comment: Thanks so much for you answer. I only build the custom circuit for performance measure only.


Does God sleep?

Question: God rested in the 7th day. Did He take a nap?
Does the Bible indicate that He sleeps?
Comment: This is not a bad question but I think you should ask about the Son separately because Trinity is a complicated topic.
Comment: I'm voting to close this question as off-topic because it is too open ended: it starts talking about interpreting Genesis 2 before becoming a general verse search question, then delves into understanding the trinity.
Comment: May I refer you to my answer to your other question regarding God resting. Why does man want to contribute humanly characteristics to God? We were made in the image of God not God in our image.
Comment: on a 100% Theoretical basis in genesis it says Adam slept so God could take his rib. That may be the origin of Human sleep, but God didn't have to undergo that.
Comment: I recommend deleting the last sentence to keep it as a single question, rather than closing it.
Answer: No! God doesn't sleep nor needs to sleep. God is not a human.

Indeed, he who watches over Israel will neither slumber nor sleep. (Psalm 121:4, NIV)

I would mock and laugh at any god who needs to sleep. A god who needs to sleep is not a true God at all. The idea that God would sleep was humorous to Elijah the prophet.

At noon Elijah began to make fun of them. "Pray louder!" he said. "If
  Baal really is a god, maybe he is thinking, or busy, or traveling!
  Maybe he is sleeping so you will have to wake him!" (1 Kings 18:27,
  NCV)
Answer: "Rested" = "Ceased"
The Hebrew word translated "rested" in Genesis 2:2 is shabath (7673, שָׁבַת) literally means: to cease, desist, rest. This is the origin of the word "Sabbath," the day of rest or the day on which no work was to be done.
I posit that "rest" here means something like "at rest" (i.e. an object that is not moving) as opposed to relaxing or sleeping. He "rested" because he had (v2) "completed His work which He had done" and there was nothing left to do. He "ceased" from working because his work was finished.
It isn't sensible to think that God sleeps (as pointed out by @Mawia), nor does the text in Genesis 2:2 support such an idea.
Answer: The confusion about God resting comes from the translation of the original word used in Hebrew.
That original word was:
שָׁבַת

shabath (shaw-bath') v.

to repose, i.e. desist from exertion
used in many implied relations (causative, figurative or specific)

KJV: (cause to, let, make to) cease, celebrate, cause (make) to fail, keep (sabbath), suffer to be lacking, leave, put away (down), (make to) rest, rid, still, take away.

For some reason many people want to take the word to mean strictly to repose, or sleep, while disregarding it's most common usage which is to stop from exertion.
All Scriptures quoted are from the King James translation.
Genesis 2:1  through 3

1  Thus the heavens and the earth were finished, and all the host of them.
2  And on the seventh day God ended his work which he had made; and he rested on the seventh day from all his work which he had made.
3  And God blessed the seventh day, and sanctified it: because that in it he had rested from all his work which God created and made.

These verses make more sense when we substitute the word celebrate instead of rested and rested from especially in view of later references to the sabbath
Exodus 20:8 through 11

8  Remember the sabbath day, to keep it holy.
9  Six days shalt thou labour, and do all thy work:
10  But the seventh day is the sabbath of the LORD thy God: in it thou shalt not do any work, thou, nor thy son, nor thy daughter, thy manservant, nor thy maidservant, nor thy cattle, nor thy stranger that is within thy gates:
11  For in six days the LORD made heaven and earth, the sea, and all that in them is, and rested the seventh day: wherefore the LORD blessed the sabbath day, and hallowed it.

Sometimes when I am doing something, especially if it is strenuous; I will stop for awhile and catch my breath, (I'm no spring chicken any longer) that may be called rest. However, when I have finished what I was doing I desist from working on it and that rest is different from the break I take in the middle of the task.
On those rare occasions when I do a really good job I have a tendency to step back and admire my work as I: so to speak; rest. That is much different from both of the rests described above.
Having considered all those things it seems to me that after:

Genesis 1:31  And God saw every thing that he had made, and, behold, it was very good. And the evening and the morning were the sixth day.

That might just have been what God did. And it also may have been the reason he commanded us:

Exodus 20:8  Remember the sabbath day, to keep it holy.

Perhaps he just might have wanted us to remember on that day once a week that it had only taken him six days to  create all of this and give him thanks for doing it.
Answer: It is helpful to compare Genesis 1.1-2.3 to other Ancient Near Eastern (ANE) creation texts; the meaning of God 'resting' can be determined by verbal cues and literary parallels to other ANE creation accounts.
John H. Walton notes that Enuma Elish – after Tiamat is slain, after the functions of the world are established from her remains, after humanity has been created – concludes with the creation of a temple for the god Marduk: 'Below the firmament, whose grounding I have made firm, A house I shall build, let it be the abode of my pleasure. Within it I shall establish its holy place, I shall appoint my holy chambers, I shall establish my kingship' (5.121-124). Later, 'We will make a shrine, whose name will be a byword, your chamber that shall be our stopping place, we shall find rest therein' (6.51-52).
The climax of the creation of the world was the creation of a temple, which would serve as the place of 'rest' for the supreme god-king Marduk.
Genesis 2.2-3 describes day 7. At this point, 'the heavens and the earth were finished' already, so day 7 is not an act of creating anything. Instead, day 7 gives meaning to what has just been created: God comes to 'rest'. Appealing to other Hebrew texts, Walton states that 'divine rest' in ANE thought always occurs in a temple. One key text that substantiates this claim is Psalm 132, verses 7-8 and 13-14, which describes the temple in Jerusalem as the 'resting place' and 'dwelling' of God. This temple concept is further corroborated when he look back to day 6, where we find humanity is created as 'the image of God', i.e. God's temple icon.
The necessary conclusion then becomes that the universe that has been created on days 1-6 is God's temple. When God 'rests' in the universe he has just created, it means his presence has come to dwell in his cosmic temple.
Answer: In the Gospel of John it is written in 4:24 that God is a Spirit and spirit don't need rest or sleep. He is alive mighty God and if God sleeps then He is not a God.
According to Psalm 121 our God neither sleeps nor slumbers.
Comment: Welcome to Christianity.SE. For a quick overview, please take the [Site Tour](http://christianity.stackexchange.com/tour). For more on what this site is all about, and for some tips on writing good answers here, see: [How we are different than other sites](http://meta.christianity.stackexchange.com/q/1808/20394) and: [What makes a good supported answer?](http://meta.christianity.stackexchange.com/q/692/20394)
Answer: Just to add to previous answers.
For clarity, Sleep is a physiological phenomenon,
"characterized by altered consciousness, relatively inhibited sensory activity, inhibition of nearly all voluntary muscles, and reduced interactions with surroundings." - https://en.wikipedia.org/wiki/Sleep
While it's a subject of ongoing research, sleep is generally associated with the need to rest, with being tired, a direct association with being material and mortal.
As stated, God is not human, He is immaterial and eternal (Revelation 1:8, John 4:24). The idea of God sleeping doesn't make sense. Similar to asking if a bachelor can be married.
The example given above with Elijah:

At noon Elijah began to make fun of them. "Pray louder!" he said. "If Baal really is a god, maybe he is thinking, or busy, or traveling! Maybe he is sleeping so you will have to wake him!" (1 Kings 18:27, NCV)

Elijah is not just making fun of his opponents god's failure to act. He is, in a sense, charging them with not being real god's (or not even being real at all!).

Does God sleep?


Integrate Facebook comments into a blog

Question: I'm using Facebook as a channel to market job postings on my job board. Whenever a new job posting is added to the site, the site updates Twitter, and Facebook pulls in tweet to show in the Facebook feed.
There's frequently a discussion about the job posting happening on Facebook in the form of comments. Is there a way to bring in that discussion back over to my site, in a reasonably automatic way? I'd love for those comments to appear everywhere (both on my site and on Facebook) and I'd love users to be able to comment from anywhere (both on the site and on Facebook).
Answer: You can use Facebook Connect Comment Box. Installation instructions are described here:
http://developers.facebook.com/blog/post/198

Integrate Facebook comments into a blog


Surfacing rapidly after a Scuba Dive

Question: I recently had my first scuba dive. And the other instructor here was referring to something that is related to air Embolism as I overheard, that one should not surface too rapidly after a deep dive.
I could only hear it that it could prove fatal as well.
I know what is Embolism, but i have no wisdom about how the embolism would be introduced when a diver gets to the surface rapidly. Please shed some light here..
Comment: All the details: https://en.wikipedia.org/wiki/Decompression_sickness
Answer: An embolism in a medical context refers to any large moving mass or defect in the blood stream. An air embolism is an air bubble trapped in a blood vessel. When an air bubble travels along an artery, it moves through a system of blood vessels that gradually become narrower. At some point, the embolus will block a small artery and cut off the blood supply to a particular area of the body.
For example, when a person scuba dives with compressed air, they take in extra oxygen and nitrogen. The body uses the oxygen, but the nitrogen is dissolved into the blood, where it remains during the dive. As one swims back toward the surface after a deep dive, the water pressure around decreases. If this transition occurs too quickly, the nitrogen does not have time to clear from the blood. Instead, it separates out of the blood and forms bubbles within tissues or blood. It is these nitrogen bubbles that cause decompression sickness.
For venous air embolisms, death may occur if a large bubble of gas becomes lodged in the heart, stopping blood from flowing from the right ventricle to the lungs. However, experiments in animals show that the amount of gas necessary for this to happen is quite variable, and also depends on several other factors, such as body position.
Comment: Your answer is only partially correct :-) I think you need to re-write the 2nd paragraph.  You are referring here to partial pressure of the gasses. Which might cause a condition know as Decompression Sickness, this does not just influence the blood and actually could affect you irrespective of the speed of your ascent. There are several good articles on the internet around DCS & AGE. Divers Alert NEtwork would be the best resource but even Wikipedia has a nice summary: http://en.wikipedia.org/wiki/Decompression_sickness
Answer: Here is an interesting article on wikipedia to give overview of pressure related injuries.
Dysbarism
Embolism in diving would most likely refer to Arterial Gas Embolism (AGE) and the internet is full of articales on AGE, DCS, Baurotrauma etc.
But to give you a quick laymen overview of the issues related with rapid ascents while scuba diving.
In scuba diving we breath gas (in most cases air, but could be Oxygen, Nitrox, Helium, Heliox, etc) under pressure. This means for every breath of air we take the volume will be same as at the surface but the density would be higher. For instance when we are 10m deep in sea water we will breath twice the amount of air which means same volume but double density.
If I now did a rapid ascent while holding my breath or if some obstruction like flem was present in a part of my lung the gas would expand (based on boyle's law) causing a rupture of the lung this can be small or large.
The air in the lung can now enter the arteries and could end up blocking blood flow to the brain, the heart muscle, etc. which will cause heart attack or stroke. If a larger rupture happens we could also have air entering the chest cavity which could cause lungs to collapse.
DCS/Decompression Sickness is different this could happen whether you did a slow or rapid ascent, as this is based on how much gas was absorbed into your body (blood, bone, muscle, etc) And DCS could take several hours to affect you after the dive where as AGE would effect you immediately and normally be much more life threatening.
Please read DAN's article: Decompression Illness: What Is It and What Is The Treatment?

Surfacing rapidly after a Scuba Dive


Does the on'yomi of 輪 (リン) have any relation to the English "ring", or is it a coincidence?

Question: Is there an etymological connection between 輪{リン} as in 車輪{しゃりん} and "ring" in English? Or is this a false cognate?
Comment: @Userthatisnotauser Thanks for that piece of information that I didn't know. But once you learn about history of Japanese, Chinese, and English languages, you'll soon find that Japanese on'yomi ン and English "ng" rarely match up until recent times.
Comment: Why is nobody upvoting the original question? "Ring" is being used as a kanji mnemonic over at WaniKani for this - so it's natural to wonder if it's a coincidence.
Comment: @broccoliforest I get it, but it's still a good question. ;)
Answer:
Is there an etymological connection between 輪{リン} as in 車輪{しゃりん} and "ring" in English? Or is this a false cognate?

There are a few things we have to look at to answer this.
Derivation of different Japanese readings
As we can see in the Jisho.org entry, rin is an on'yomi for the kanji 輪.  On'yomi are the "sound readings", the literal meaning of the spelling 音【おん】読【よ】み, in reference to the sound of the kanji as borrowed from Chinese.  So any question about the on'yomi of a kanji is ultimately a question about Chinese.
Middle Chinese pronunciations
Looking at the Wiktionary entry for Chinese 輪, and particularly the Pronunciation section, we see that modern Mandarin pronounces this as lún.  That's not very close to Japanese rin.
⇒ Japanese on'yomi readings ultimately derive from Middle Chinese.  Sometimes we know that a particular on'yomi is more specifically a 唐音【とうおん】 or "T'ang sound" borrowed during the T'ang Dynasty, or a 宋音【そうおん】 or "Song sound" borrowed during the Song Dynasty.  At any rate, we can (mostly) ignore the modern Chinese readings.  (Sometimes the modern varieties are informative for hinting at where a particular vowel value may have appeared.  But that's beyond the scope of this thread.)
The Middle Chinese pronunciation is reconstructed as //liuɪn//.  And if we click that ▼ downward pointing triangle to expand the section, we see a sampling of the different
reconstructions from various academic authors.
I believe that part of the reason for the wide variety of reconstructions is that Chinese itself has so many different varieties.  Think about English even, where different regions or dialects have different phonetic realizations of words.  Just the first-person pronoun "I" can have several actual pronunciations, such as:

//aɪ//
//aː//
//ɑe//

Looking back at the Middle Chinese reconstructions for 輪, we see that some of them are even closer to Japanese rin than the "main" Zhengzhang Shangfang's reconstructed form of //liuɪn//, such as Pan Yuwun's //lʷin//.
So Middle Chinese //lʷin// (or something like that) was borrowed into Japanese as the on'yomi of rin.
Where the Middle Chinese came from
But we still haven't answered your initial question.  :)
The Middle Chinese came in turn from Old Chinese, with a Zhengzhang reconstructed reading of //*run//.  The character 輪 itself was composed as semantic (meaning) radical 車 plus 侖 as the phonetic (sound) base.  We don't have any further etymological information about this (or at least, I can't find any based on sources to hand).
To rephrase your initial question, is Old Chinese //*run// somehow related to modern English ring?
Following up on the Chinese term, our data was inconclusive.
Where the English ring came from
Turning to the Wiktionary entry for ring, we see that English ring is traced back to Proto-Germanic hringaz ("ring; circle; curve"), derived from Proto-Indo-European (PIE) *(s)krengʰ-, derived in turn from PIE *(s)ker- ("to turn, to bend").
Comparing reconstructed ancient roots: Old Chinese and PIE
PIE *(s)krengʰ- and Old Chinese //*run// don't match up very well.
However, PIE is tentatively dated to around the time of the domestication of the horse, maybe 6000 years ago.  Old Chinese is reconstructed to around 3270 years ago.  That's a lot of time -- so we must still ask if the PIE *(s)krengʰ- might have given rise to Old Chinese //*run//.
We know from long research into sound correspondences between PIE daughter languages that the change from PIE //(s)kr-// to Proto-Germanic //hr-// was a regular shift.  We can also see from the list of descendants that all other branches of PIE include that hard //k// at the start, with or without the //s//.  So the only branch where the initial //(s)kr-// in reconstructed PIE *(s)krengʰ- lenited (softened) into just //r-//, as in both modern English and Old Chinese, is the Germanic branch -- the branch of PIE that was most distant from Old Chinese speakers.
Conclusion -- tentative
Given the state of current academia (as publicly accessible by me at the moment, anyway), it appears that English ring and Japanese rin are only accidentally similar in sound and meaning.
Comment: What a great answer! Especially the part about the relationship between PIE and Old Chinese was really interesting.
Comment: I feel like some of the start of your answers should be condensed into a meta page as required reading :p
Comment: @Kaskade: There are a few words where PIE and Old Chinese are considered to have been in some form of (distant, via-other-languages) communication, such as [蜜 ("honey")](https://en.wiktionary.org/wiki/%E8%9C%9C#Chinese), traced to Tocharian, a PIE daughter language (actually, [probably three of them](https://en.wikipedia.org/wiki/Tocharian_languages)) that was around a long time ago in what's now known as [the Tarim Basin](https://en.wikipedia.org/wiki/Tarim_Basin), in modern-day Xinjiang Province. Who knows, further research on Tocharian may uncover that //*run// is indeed from PIE.  Cheers!
Comment: @EiríkrÚtlendi So Japanese 蜜 "mitsu" and English "mead" are indeed cognates.
Comment: +1 for also explaining the process of reaching your conclusion. Very useful for future readers to learn from and be able to apply the research process in other, potentially different situations :)
Comment: What a fantastic answer. I wish I could upvote it and accept it more than once. Thank you for including such a thorough and insightful walkthrough into your research process - I agree with mbrig that this provides enormous value for future readers to answer similar questions. And I agree with Kaskade that your discussion of the relation between PIE and OC is fascinating. 10/10, and thanks again!
Answer: Eirikr's answer has pretty conclusively demonstrated that "ring" meaning "round object" is unrelated, but I can't help but point out that there's a second meaning as well in English, namely "ring" as in the sound of a bell.
Intriguingly, in Japanese the common tō-on on'yomi of the kanji for bell 鈴{リン} is also rin, and this character's reconstructed Old Chinese reading is /*reːŋ/.  And it's not just the bell itself: in Japanese, the sound of a ringing telephone is りーんりーん, while in modern Chinese it's 鈴鈴 línglíng.
So while they're still unlikely to be directly related (as in descended from each other), it's quite possible that both evolved in parallel from onomatopoeia for the sound of a ringing bell.
Comment: +1 for calling out the likelihood of onomatopoeia.  :)  It's somewhere between amazing and disheartening how often folks miss out on the commonality of onomatopoeia and instead come up with wild theories on how two demonstrably unrelated languages must instead be long-lost siblings.  See also one of my favorite Zompist posts, ["How likely are chance resemblances between languages?"](https://www.zompist.com/chance.htm).  :D
Answer: I would preface an attempt to answer this question by firmly establishing the original meaning of「輪」. Ring is not actually a good translation of the character in Chinese (which has other words for ring); the two most common translations for「輪」in Chinese are:

Wheel
Cycle (or the related revolve)

Notice the「車」(chariot) semantic in「輪」:「輪」originally referred to the spoked wheels on a chariot. From Shuowen Jiezi:

有輻曰輪,無輻曰輇。从車,侖聲。
If it has spokes, it is called「輪」; if it doesn't have spokes, it is called「輇」. From semantic「車」and phonetic「侖」.

This is probably why several academic opinions consider this character
商金輪盤集成10010
which appears in Shang Dynasty bronze inscriptions as an ancient representation of the word, but was later made obsolete by「輪」. Note that「侖」does not contain a picture of a wheel, so is not related to the above character and not related to the meaning of「輪」.
The meaning wheel is important, because the hypothesised Tocharian borrowing into Chinese for related meanings is for PIE /*kʷékʷlos/ (wheel, circle) rather than /*(s)krengʰ-/, and /*kʷékʷlos/ is speculated to have been the source of「車」(/*kʰlja/). For「輪」to be related to ring, one would need to demonstrate that Tocharian languages showed the same kinds of shift as Germanic languages (as given in @EiríkrÚtlendi's answer), or I would sooner consider「輪」to be related to /*kʷékʷlos/ instead.

Carrying on from @EiríkrÚtlendi's link (How likely are chance resemblances between languages?), I would add that, even if a phonetic shift model between PIE anything and OC /*run/ was proposed, there needs to be much stronger evidence that /*run/ was related to some PIE root, because of chance/coincidence. Take a look at the phonetic series for /*run/, noting that none of these characters apart from「輪」have anything to do with the meaning wheel:


transferring bitcoin among friends and taxes

Question: I gave my friend btc (ie sent it to their address) to trade together with their btc last week. I'm suddenly worried about taxes (in the US). If right now, they give me back exactly as much btc as I gave them, are there tax ramifications? Can I sell the btc after > a year and pay the 15% capital gains tax or whatever, or is there some short-term hold complication, and do I have to pay more?
Answer: They will most likely see any BTC credit in your account as "income" and you are taxable for it, unless you can prove it otherwise. This is a matter of when the IRS will start cracking down on these exchanges and request them to provide a 1099 for every user. I do not do trading via fiat because of this. The end-game is to acquire more Bitcoins, not fiat.
When its time to sell your Bitcoin for fiat, you won't have to because everyone will be willing to take it. -- See this: https://i.stack.imgur.com/qaOMi.jpg
Answer: Not a tax expert and this is not tax advice, just my understanding:
A taxable event does not occur when the bitcoin comes into your account, any more than it would if you were depositing US dollars into a regular bank account.
The taxable event occurs when you dispose of the bitcoin for a gain. If you gave your friend bitcoin as a gift, for example, I don't think there was a gain. (Although there are limits on how much you can gift.)
If you sold it to him, then there was probably a gain (the difference between what you sold it for and what you paid for it). You only pay taxes on the gain. Re-purchasing the bitcoin  would have no effect.
As far as I know, in the US, the gain is not considered a capital gain, its considered profit on the sale of property, so the rate is different (higher).
This assumes you already paid taxes on the money you used to acquire the bitcoin, but that is not the question you asked.
Comment: Any thoughts on where you might use bitcoin through a payment provider to a retailer? If i use my dollars to buy a bitcoin at $200, it appreciates to $2,000 then I buy a sweet gaming rig for 1 BTC on Newegg. Do I just pay the sales tax on the purchase? Do I claim gains of $1,800 on my investment and pay taxes on that? Seems like a hazy area.
Comment: My dictionary defines capital gain as "a profit from the sale of property or an investment". So saying, "the gain is not considered a capital gain, its considered profit on the sale of property, so the rate is different" is nonsensical. It is considered unearned income, profit from the sale of property, and taxed as a capital gain because that's what a capital gain is. I'm puzzled what you think a capital gain is if not profit from the sale of property held for investment purposes.


Apply Labeled LDA on large data

Question: I'm using a dataset contains about 1.5M document. Each document comes with some keywords describing the topics of this document(Thus multi-labelled). Each document belongs to some authors(not just one author for a document). I wanted to find out the topics interested by each author by looking at documents they write. I'm currently looking an LDA variation (labeled-LDA proposed by D Ramaga: https://www.aclweb.org/anthology/D/D09/D09-1026.pdf .). I'm using all the documents in my dataset to train a model and using the model to predict the labels of an author(here I use the aggregation of all documents belonging to an author to represent him, treat authors like documents).
I'm using python and I found some implementation available on Github:
https://github.com/JoeZJH/Labeled-LDA-Python
https://github.com/shuyo/iir/blob/master/lda/llda.py
I tried the first one and tested it on a small data. It worked but when it came to a big data, the memory required grew a lot (For initialisation, this algorithm generalizes a zero matrix of size #labels times #terms/#vocabulary). I think I need to find a way to reduce the dimension of my corpus. I thought about directly reducing the size of my vocabulary, but it will reduce the length of my texts. And LDA does not work for short text. I'm afraid that if I do this, my texts will not be enough and some information will be lost in the process.
So here are my questions:

Is my method theoretically correct? (I will appreciate it if someone can propose other models suitable for this task)
If there is any method to reduce the dimension while keeping as much information as possible. For instance, is TF-IDF an option for the reduction?

I do appreciate it if you can give some advice on those two questions.
Answer: You matrix will be sparse, so the memory usage will be inefficient. Try to look on LSH - locality sensitive hashing for clustering.
https://en.wikipedia.org/wiki/Locality-sensitive_hashing
Answer:
Is my method theoretically correct? (I will appreciate it if someone can propose other models suitable for this task)

Yes, but you have to remember about stemmatization, lemmatization and removing stop-words and punctuantion.

If there is any method to reduce the dimension while keeping as much information as possible. For instance, is TF-IDF an option for the reduction?

One of best an option.
Answer:
I wanted to find out the topics interested by each author by looking at documents they write.

In 2024 you could brute force this by querying LLMs and using RAG (although still costly)

Apply Labeled LDA on large data


How do I turn off anti-aliasing while drawing shapes in Photoshop?

Question: Whenever I create a square shape at 100% zoom, I get perfectly sharp edges. However, once I zoom in at any amount, drawing a perfect square (without anti-aliasing) is very difficult. Is there a way I can turn this off?
Comment: If you set the grid to one pixel and activate snap-to-grid, the square will be aligned to the pixels and the anti-aliasing is not a problem. Now I'm closing this question as it's clearly off topic.
Answer: Firstly you set the shape mode to "fill pixels", you can't turn AA off with shape layers:

Secondly you need to uncheck the "Anti-alias" checkbox (this only appears after you do the first step)

Here I am zoomed in to 800%. The rectangle on the right was drawn with AA on, the rectangle on the left was drawn with AA off.
Comment: Care to update this for CC 2016?
Answer: If you need to retain the shapes and don't have to be pixel-perfect about the anti-aliasing, you can use selections as a quick & easy guide.  Selections always snap to-pixel so they are better "pixel guides" than regular Guides.
For example:

Zoom to 800% (or some other high zoom)
Draw some guides and make a selection.

Using the Rectangle shape tool, draw a rectangle that matches the guides and another rectangle that matches the selection.

You'll notice that the guide following the selection is not perfectly aliased, but it's pretty close and probably not be noticeable at normal zoom (keep in mind that if you're zooming in for sub-pixel edits, you're taking a much closer look than most people will).


Can I downgrade from Windows 8 to Windows 7?

Question: I am about to upgrade to Windows 8 Professional however I was wondering if I would be able to downgrade to Windows 7 if there are any compatibility issues and such forth.
Comment: Make a backup first.
Answer: If you are upgrading a existing Windows 7 install you will still have your old license, you will need to re-install windows in the process of "Downgrading" so it will not save your settings like when you upgraded.
Answer: In the past I have been able to downgrade by creating a system restore image when still in Windows 7.
Creating one can be done as explained here: Back up your programs, system settings, and files
Restoring it when you want to downgrade is explained here: Restore your computer from a system image backup
Note that restoring a system image will remove any changes made since the creation of the image. Therefor make sure to store important data on a different partition and back it up before proceeding with the system restore. Also note that it may take a while to restore your system. However, it will automatically restore your computer as it was before the installation of Windows 8.
Comment: Note that this will destroy any files created/modified since the backup...
Comment: Thank you Bob. Because I always keep my data on a separate partition I had no problems with this. I updated my answer.


Why kids and ladies apparels placed mostly nearer in the shopping mall?

Question: Just try to remember the last time when you visited shopping mall, these two kinds of apparel were put close.
Do you know why?
Comment: yeah i;ve seen that too :D
Answer: It's the parents who are making the purchase for the children, so the parents are the actual customers. Kids are almost always shopping with their mothers. Putting the two in proximity makes shopping more convenient for the mother, and also more profitable for the store.
"Purchasing something for your child? Why not get something for yourself while you're at it?" And vice versa.


100 AMP sub panel from 200 AMP main

Question: Installing a new sub panel in my detached garage, about 90' from the main panel. Half of the distance of the run will be under the house and the second half underground to the garage. I have read that SER should not be run in underground conduit. Should I use a combination of SER and URD cable?
Comment: I would use electrical pvc conduit and thhn/ thwn wire to make the run. At less than 100 feet wire size can be a crap shoot based on the load so we need some more info, last week I helped a friend (in advice) put in a system close to 100 feet from the main, new panel 250 amp but we think the max load was similar to yours. If at the max larger wire would be needed so I did not suggest the size wire that was approved for this case.
Comment: What kind of loads will you be running from this subpanel?
Answer: Run conduit the whole way and use individual XHHW-2 wires
First off, if you're going to run conduit, simply run the entire run in conduit -- it's not all that much more expensive than a cable wiring method parts-wise, and running a fat (say 2") Schedule 80 PVC conduit for the whole run means you can put fatter wires in in the future if called for, as well as making the pull relatively easy for whoever (you or your electrician) does it.
As to what goes in the conduit, once you have a conduit for the whole length of the run, you can run individual wires (presumably XHHW-2 insulated AA-8000 aluminum alloy wires at the sizes you'd be dealing with for 100A) for the hots and neutral, and a relatively thin (8AWG) bare copper ground.  This is no more expensive than either a SER or a URD cable in the grand scheme of things, takes up less space in the conduit, and is far easier to pull through the conduit than a fat, stiff cable will be.
Answer: I agree with @ThreePhaseEel. In fact it would probably be cheaper and less laborious. Now there is nothing in the NEC that says you can't run SER or URD in conduit underground that I know of, but you cannot use it as direct burial cable.
That being said, if you use @threephase recommendation you would be able to run a minimum #3 XHHW-2 copper and ground in a 1 1/4 pvc conduit. I would go with a 1 1/2 for an easier pull. If you used SER copper in order for you to meet the 40% fill qualification you would have to go with a 2" pvc or larger. Not to mention pulling it would be a bear. You can just trust me on this and try and keep your bends to a minimum no more than 360 degrees without a pull section.
If you are trying to save money you could go direct burial aluminum USE-2 cable, minimum size conductors #1.
Good luck.

100 AMP sub panel from 200 AMP main


Figuring out EQ for sounds

Question: Looking for some guidance on EQ strategies for making sounds more professional.  I know this is a very general question and maybe this falls more into mastering, but when I hear sounds in libraries or whatever, many tend to have a pro sound that mine do not.  I'm just not sure which frequencies to boost/cut to get that sheen and which EQ plugins are best.  Are people stacking EQs to get this sound or is there some pro suite that really does it?  Again, I know this is general and I'll probably get responses like "depends on the sound", but really just looking for some EQ guidance to dramatically up my game.  I've been at this too long to still be struggling with this.  Also if you can recommend books or videos that would help as well I would be forever grateful.
Comment: "I've been at this too long to still be struggling with this" - this speaks to a deeper issue, of attitude rather than technique. There is no magic bullet that you suddenly learn. Keep an open mind & do lots of experimenting, make mistakes, lots of them, and learn from them. Record a problematic prop ten different ways, compare them later (not at the time) and learn what worked better (without thinking EQ is going to save you) Remember what worked best for that prop, it may not apply to future situations, but slowly experience hones your instincts...
Answer: Your real problem is most likely recording technique and possibly the gear you're using. A good sound recorded properly doesn't need any EQ to sound professional.
Where you place your microphone is the most important thing in capturing a sound and works just like EQing when in the right hands.
Comment: I agree, but its not necessarily the gear - experience, mic placement and general inquisitiveness/interaction with the things you are recording also counts for a lot! A clever person with limited gear will likely get better results than a noob with great gear
Comment: +1000 - 90% of the time I'm only notching something out.
Comment: Damn straight mate.
Answer: First of all: An EQ can not add something to a sound that is not there!!!!
This is a very important fact, as a lot of beginners feel like they need to put on a magic frequency response in the EQ to make a sound big or stand out.
But there are roughly 3 situations where you want to use an EQ:
On all of those as a rule of thumb: Wide Q boots and small Q cuts!

To clean up a sound:
To clean up a sound you can remove unwanted bottom end with a high pass filter or low shelf. You can also remove feedback, resonating frequencies and static screaming created by guitar amps and lamps via notch filters. Moreover you can dampen room modes via a bell curve.
For EG: to cleanup a Vocal recording you high pass at 120 Hz to remove the steps of the vocalist, you notch 2 kHz and 4 kHz because you had a lamp in the vocal booth that created screams and you cut 6 dB at 250 Hz since this is the biggest room mode of your vocal booth.
To improve the timbre:
By Cutting or boosting different regions in the frequency spectrum you will change which parts of the sound are pronounced. Normally the best approach is to cut 3-6 dB of frequency areas that are too present. -> you then are left with what you like. There are some EQ that also add some kind of sweetening effect like small distortion, resonances etc in comparison to digital EQs that are often described as harsh. A very good area to cut a little bit is between 200Hz and 800 Hz. This area is referred as the Mud/paper/boxy. If you remove some content there on some "unimportant/background sounds" you often get a cleaner mix. On the other hand boosting 8-12 kHz often is often referred to as giving the sound brightness, clarity and breathing. A very good area to look at.
For EG you have a piano recording that plays chords on the background of a song. So why not remove some mud at 450 Hz with a medium 4 dB cut. Also a 2 -3 dB High shelf boost at 8kHz can give the piano some life, clarity etc.
Fit the sound in the context of your mix:
If you bring in sound after sound in a mix scenery, you sometimes have the effect that you want to have a sound louder, but if you push the fader another sound disappears partly or looses something. This is where you use an eq for mix purpose.
For EG: you recorded a bass and a wurlitzer EPiano. When you bring in the wurlitzer, you loose some punch of the bass. So why not remove the low end of the EPiano with a high pass at 180 hz to give every instrument its place.

So by removing unwanted frequency content and carefully hearing which instrument dominated which frequency area you will get a more professional sound by EQ. But you will never get something new out of an eq, you will just make the things you have cleaner.
Peace
Answer: Listen for what you want to add or remove, then equalize.
It comes through experience that you learn to hear when an equalization sounds good and when there's something to adjust. Mainly it has to do with contrast (e.g. removing "mud frequencies" to bring out the essentials or to "clean" the sound, or equalizing different layers so that they either sound "blended", tightly layered or separated.).
The main difference in equalizers comes from the exact shape of the curve. You should hear the difference (if there's any) between different equalizers by dialing in the same numerical settings.

Figuring out EQ for sounds


PadFone X using MHL?

Question: What is the PadFone X using to output audio/ video to the tablet dock? Is it propriety firmware, MHL, or what? I'd like to hardwire to a monitor/TV. It would also be nice to be able to wire back to the dock when an OTG hub is connected to the phone. Would this require a hacked cable?
Comment: I've since learned this is a slimport. I got a slimport cable that breaks out to HDMI and USB for power. Works awesome! It doesn't appear though that a hub would work though.
Answer: Slimport is the technology used here.

PadFone X using MHL?


Why was Bitcoin designed with a decreasing production rate?

Question: I have no doubt that the person who designed Bitcoin was many times smarter than me but with the benefit of hindsight was the decreasing number of bitcoins a good design decision given the 'hoarding' it encourages? Wouldn't a steady and low inflation rate increase the incentive to spend bitcoins and make it more attractive to the later adopters?
Comment: Please note that a constant production rate measured in a fixed number of coins would result in a deflationary system very much like bitcoin because the relative number of coins per block gets less (asymptotic curve). The difference of such a system would only be a psychological one. So a system with a fixed PERCENTAGE of production would be necessary to achieve what you have in mind (e.g. 3% per year).
Answer: The main issue with Bitcoin is not attracting late developers, but early developers. At its infancy, Bitcoin was an interesting curiosity - people would play around with it but not necessarily use it as money. But due to its scarcity and many benefits, Bitcoin came to be recognised as a digital currency.
At that point people could either wait and see if it gets bigger, or start using it. If Bitcoin's reward wasn't decreasing, probably a lot of people would put off getting into Bitcoin until it is more stable. If everyone decided to wait, Bitcoin would be going nowhere and fade into obscurity. Nobody would then care for late adopter's benefit. This is why getting early adopters on is so crucial - with them comes incentive for late adopters anyway.
Comment: I understand the rationale and it seems to have been an effective way to gain traction. Given the amount of wealth not being utilised http://arstechnica.com/tech-policy/2012/10/78-percent-of-bitcoin-currency-stashed-under-digital-mattress-study-finds/ it unfortunately now looks to be a hindrance. Could you explain more why you think gearing a system to early adopters will encourage late adopters though?
Answer: "Hoarding" is a loaded term used to denigrate saving by people who like having the government give money to bankers. To "hoard" money, what do you do? You produce something, you trade it for money, and ... well, that's it. So "hoarding" is actually just producing.
The idea that hoarding is bad is just a broken window fallacy. Hoarding means producing without consuming, giving without taking.

But at times it could be good for a country to make its own currency that can go down in value to increase export and get more tourists. To get people to use such a FIAT people in that region must pay tax in that currency.

Good for some people in that country, bad for others. Those that it is bad for will only go along with such a scheme if they have no practical choice. In other words, this is one way a government picks winners and losers and makes markets less free.
As for increasing exports, that's another fallacy. Imports are what you get from other countries. Exports are what pays for it. If you raise your exports relative to your imports, you are paying more to other countries and getting less. That's not good.
Comment: @fj2942ks: Others can't use the currency. But they are absolutely free to use the real wealth that you produced. If you're going to let the world trade you pieces of paper for trucks and factories, the world should be thrilled. You can hoard all the pieces of paper or strings of digits you want. We'll all profit from driving the trucks you made and using the fruits of your labor.
Comment: It's an interesting point but I consider hoarding to be a symptom of people being effective at making money  but less willing to spend it. If I have a system that allows me to accumulate 90% of the wealth in the world and spend only what I need to survive, although I produced, I'm also stopping the free flow of money through the system. Others can't use it so I'm hoarding. Looking at the distribution of wealth in bitcoin, this is currently the situation.
Answer: Bitcoin is deflationary, in modern "economy" it is deemed to be bad.
The modern economist argument is that we will be hoarding, instead of spending. Because we know that tomorrow the things will cost less.
This is modern myth(=mistake), because:

We always need to buy important things (food, transport fees, clothing), no matter what the price will be tommorow.
Inflationary economy force us to buy useless goods. We are promoting low quality products, while those that are important for human beings are getting less capital.
For sustainable economy we need to have a production of real goods. When majority of people are buying goods while creating debt. It may seem that GDP grows. But the truth is rather that the consumption is growing, not production.

Wouldn't a steady and low inflation rate increase the incentive to spend BitCoins and make it more attractive to the later adopters?
The answer would be almost the same as the previous one. You are speaking about attractivity.
In our world, there are payment systems that are inflationary.

They can promote economy (By QE = printing money), when there is recession.
When there is boom, they must draw money back.

It is not happening in most cases. We may say, that it is caused by people in power. Actualy it is mostly the problem of system and its incentives. I recommend this video. The biggest problem is that it always ends and ended with hyperinflation.
It is everybody choice: Convenience vs. Sustainability.
If you choose Bitcoin, you will use a system that gives right incentive. It may even lead into convenience.
Comment: The amount of money I 'need' to spend and the amount of money I 'choose' to spend will be very different if by doing nothing I increase my relative wealth.
Answer: With every purchase at retail with a Visa/Mastercard/etc. payment card, somewhere in the range of 3% goes to the banking system in the form of fees.
With Bitcoin, the fees are tiny fraction of that.
If the merchant will accept payment in bitcoin, then there is room to offer a discount for customers paying with bitcoins at no cost to the merchant.
So as a consumer, let's say you are given the option for your $100 purchase:
$100 if paying with Visa/Mastercard
$98 worth of bitcoins (at current market rate) if paying with bitcoins.
If you hoard, do you know that you can make more than 2% by holding your coins?  Or is it beneficial to take the 2% discount today (and then through a bank transfer buy more bitcoins to replenish what was just spent)?
So the argument fails because there is greater value in using bitcoins in commerce than comes from the potential future increase in the exchange rate.
Comment: This is true but to move money in and out of bitcoin costs > 3% for most people.
Answer: Had Bitcoin be designed inflationary the first clone would have been a deflationary one. Given the choice most people would then have moved to the deflationary one for savings (keep or increase value). Thus an inflationary coin does not stand a chance.
Answer: Bitcoin was designed to have potential to increase in value a lot over the long term. If not, noone would want to take the risc of adopting it, caring about it or developing tools for it.
This gives it potential stability.
When people hoard it means that they have a longterm look at the value of Bitcoin.
If noone was hoarding it would mean that everyone wanted to get rid of their Bitcoins as quick as possible.
And if everyone wanted to get rid of their Bitcoins, that would mean they would not want them.
Now you can be sure that people will want your Bitcoins in the future.
When people say hoarding is bad, they look at Bitcoin as if it was to replace a FIAT currency. Bitcoin is not a FIAT and must not replace any other currency, thus does not need to drive a countrys economy.
A currency that allways goes down in value such as FIAT must be forced upon people with laws. Noone would want money that goes down in value if they had a choice between money that keeps it value or goes up and money that decrease.
But at times it could be good for a country to make its own currency that can go down in value to increase export and get more tourists.
To get people to use such a FIAT people in that region must pay tax in that currency.
But that currency will only be used by those that need to pay tax with it so its of no interest for example a African person or someone in india.
However a currency such as Bitcoin that can hold and will probably increase 100 fold in value is of interest to everyone on earth.
It is also in the best interest of everyone to deal in a currency that noone, not a single country can print as much of as they like. Thus Bitcoin does not give away the power to another country since there is noone who can decide to print more of it.
Thus its a excellent tool for trading across the borders, such as on the internet, something which another countrys FIAT money is not.


Jail on a http only server

Question: Does it make sense to set up a chroot jail for a apache server which is the only service on the server? Or it is pointless, because the server is in either way lost if it get hacked?
Answer:
which is the only service on the server

Really? How do you change the content on the server? Even if that is the case, it does improve security - even if there are no other avenues for attack, it would limit the targets of attacks.
C.
Answer: Under those condition a chroot might potentially do more damage than good.
Depending on the amount of dynamic content being generated, you might have to copy a rather large chunk of libraries and binaries into the chroot. Unless you also have a easy and convenient way to keep the chroot updated you will most likely sooner or later end up with a rather vulnerable web site.

Jail on a http only server


Fedora remix not working with rca cable

Question: When I use Raspbian I can start my Raspberry Pi with my analogue TV connected over a RCA cable. After I installed Fedora remix I don't get anything on screen.
Does anybody know how to fix this?
Comment: Welcome to Raspberry Pi Q&A. Please try and use proper grammar (like capitals, punctuation and sensible sentence structure) when asking questions. Generally you should only ask one specific question as open ended question can lead to unwanted discussions. Please read the [FAQ](http://raspberrypi.stackexchange.com/faq)
Comment: You are not plugging it into your antenna input, are you?
Comment: i guess the wiring is correct because it works with Raspbian weezy, only fedora remix doesn't work.
Answer: I suspect either the config.txt file or the version of the firmware for the Broadcom chip used in Fedora are causing problems. Make a backup of everything in the FAT32 boot section of the Fedora SD card, and then copy everything EXCEPT kernel.img and cmdline.txt from the Rasbian boot section to the Fedora one, overwriting files as necessary (that's why there's a backup!). Hopefully this would fix the problem.

Fedora remix not working with rca cable


Creating an advanced searchform based on select boxes

Question: I am trying to create a WordPress website where a user can post a car that he is trying to sell with contact details for it. I have most of the things figured out about how this website will work. My only problem is creating a search form for it.
I would like the search form to contain two <select> boxes.  The first one should have a list of all the cars and the second one a list of all the models. When the user selects a car from the first box, the second box should dynamically generate a list of model cars. I do not know if this is even possible in WordPress. I could not find any resources about this.
Is there any way to achieve this? I am not looking for exact code but some directions on this if there are any.
Answer: If you are implementing your car and models as custom taxonomies, then this plugin will probably help you out.
http://wordpress.org/extend/plugins/query-multiple-taxonomies/


Optimizing .gif image sizes?

Question: What can I try to make my animted .gif image smaller? It was created in adobe flash and converted into .gif after, however it's still way too big, it's 3mb and I need it under 1mb. What can I try?
Answer: You can:

reduce the image size (fewer pixels = smaller file)
reduce the frames in the animation
reduce the color pallet further
posterize the images (larger flatter areas of color compress better for GIFs)
Use software that can add additional compression techniques (IIRC, Fireworks is good for this)
Answer: Reducing image size and number of frames will be most effective by far.
GIF can encode only difference between frames, so you can also try to reduce size of the area of the image that changes, i.e. have as much unchanged/non-moving background as you can (pixels must remain completely identical between frames, even slight temporal noise will still take space in the file).
And finally, optimize the file with gifsicle (GUI).
edit: I've created lossy gif compressor: https://kornel.ski/lossygif and added it as an option to ImageOptim. Usually it reduces GIF sizes by 50%.
Comment: Thanks a thousand times. Especially for the link to gifsicle.

Optimizing .gif image sizes?


Profile Picture, Circular? Square?

Question: I have been reviewing standards that show the benefits of using circular pictures. We recommended this option to a client but the developer raised concerns over cropping. The developer mention when clients want to crop pictures with other people it is problematic. Has anyone run into this concern from development? or other issues with cropping in circular? this seems like a strange concern but they convinced the client it was an issue.
Comment: The developer has no idea how to implement a cropping tool. End of story. Then comes with a made up story, but there aren't any real reasons for this. Also, who uploads a group photo as a personal profile photo? Is this developer joking?
Comment: @Devin That's a bit harsh and doesn't seem to be based on any evidence. Wouldn't you agree? Also, am I the only one that for a brief moment thought it was Donald Trump asking?
Comment: @Izhaki, believe it or not, I have gone through the same "cropping is difficult and evil" situation not one, not two, but three times. all three times without any real reason given, just this same words: "is problematic". On the other hand, we've implemented this hundreds of times and never had an issue. So it might sound harsh, but instead of telling the OP some soft version of the story and wasting his time, a blunt and (I bet whatever you want) accurate description of the problem at hand. I'd lve to hear the reasons any developer may have about a pretty basic feature implementation, though
Answer: It depends whether you want the user's profile to be their face or not.
On one hand, the client is right - it would be harder to fit a group photo into a circle, or many photos that aren't just faces. There's a reason camera's take rectangular pictures, after all. So if you want users to have profile pictures that aren't their face, than a square seems the natural option.
On many sites, though, I would imagine that you want to encourage users to put their face as their profile picture, because the purpose of the picture is to help users identify each-other. In this case, it makes sense to make the pictures round, as a way to encourage users to make their profiles their face.
Comment: There are many reason cameras take rectangular pictures, but I can think of any  related to the question at hand. What do you mean exactly?

Profile Picture, Circular? Square?


How to find in page in google chrome mobile?

Question: How to find in page in google chrome mobile? You used to be able to type in the omnibox and an magnifying glass icon would appear on one line.  Clicking on that would enable one to find in page.  In the new version it has disappeared so how does it work now?
Answer: If you click the three dots menu you should see a 'Find in page' option which allows you to enter the text to look for.
Comment: Duh! Can't believe I missed that.
Comment: @DarrynBrisdaz easily done! It's interesting, I haven't been a fan of Google's move away from icons towards the wording, it looks a little too much on a small screen at times.


Computer Software patent applications rejected in the UK - Can it still be granted in Europe/US?

Question: I understand Europe/US have relaxed the regulations surrounding computer software patents, whilst the UK remains somewhat rigid. Thus, would it stand that if such an application was rejected in the UK it may still be granted in Europe/US?
Answer: One place loves it and another rejects it or demands changes in opposite directions - yes!  Every jurisdiction has their own laws and rules, obviously. Defining what a software patent is and how the line is drawn between patent-eligible subject matter and not patent-eligible matter is messy and a moving target in the US and elsewhere.
I am involved with a patent on a very prosaic, very tangible thing and it sailed through Australia but may have hit a wall in China.


Sources of political voting records at the county level?

Question: Is there a database of which party (Democrats/Republicans/Other) won which county/zip code in a U.S. presidential election?  Even better would be a panel of these data. If no public database like this exists, which I find hard to imagine, what do you think the best way of getting these data would be?
Comment: If you're talking specifically about the US, it helps if you actually specify that.
Answer: The open elections project is trying to collect this type of information from official sources, though it isn't yet available.
This is commercially valuable information that typically comes with a licensing fee and can be problematic for republishing. "Election Data Services" is one of the usual sources for this data. Also see Dave Leip's political atlas store where a site license for 2012 county-level presidential results appears to be about $200.
This data doesn't exist for ZIP codes, of course; they don't match polling districts.
Answer: A word of caution about using the AP data made available through client sites such as Politico (or, for that matter, the New York Times): AP does make updates to its election results data, but most news organizations do not update their published data more than a few days after the election. So in most cases what you'll find in such feeds is incomplete data for some states and counties. This is one reason why we're doing OpenElections, and we will have county-level presidential results.
Answer: I know that a number of the news organizations have made graphics showing visualizations with basic party-by-county vote information, so I'm fairly certain it's out there ... but I don't know if it's open in its aggregated form.
Some newspapers have a sort of co-op that they call the National Election Pool to get presidential election results ... but again, it doesn't mean that the data's available to others in its raw form.
The good news is that even if you had to collect it up yourself, I would assume that there are enough other non-profits and similar interested groups (eg, Project VoteSmart, League of Women Voters, Center for Responsive Politics, Center for Public Integrity, Sunlight Foundation, etc)  that you could probably make your own co-op.  You might also have luck attempting to contact state Board of Elections, and attempting to determine if they have county results, rather than having to contact each local election board individually.  (and/or attempting to convince the state board that they should become an aggregator of this information)
Answer: There's nothing completely pre-packaged that I'm aware of, but this page has a lot of decent resources, including recent county-level presidential voting data, but only under a commercial license. The gold standard for comprehensive data is CQ Press's Elections collection, but unfortunately it's commercial.
I know some folks have used the Associated Press's data for visualizations of the last election through links like this:
http://www.politico.com/mapdata/2012/NV.xml?cachebuster=4252013144720
It's actually a semi-colon separated values result, not XML, and you'll have to crawl for each state (replacing NV in the URL with the other state codes). There's no license information, but it has been used for academic work.
Answer: In Louisiana election results for all races are available on the Secretary of State's website down to precinct level, as well at the Parish (Louisiana's equivalent for counties) level, though you will have to scrape the web pages to gather the data. Here is one example page at parish level: http://staticresults.sos.la.gov/11062012/11062012_17.html, which includes link to access precinct level data. Other states may have similar data on state's Secretary of State web sites since those offices generally are responsible for election returns.


Are the Gorn and the Xindi-Reptilians somehow related?

Question: Has there ever been a reference to the Gorn and the Xindi-Reptilians somehow being related? According to one Federation map I've seen, Xindus, New Xindus and Gorn, in the Gorn Hegemony, are relatively close. Since both are reptilian species whose home worlds are not incredibly far apart, I believe this to be a valid question.
Comment: Possibly, insofar as they may both be descended from DNA seeded by the [ancient humanoids](http://memory-alpha.wikia.com/wiki/Humanoid). I don't think anything remotely canon has explored this specific case further.
Comment: You big reptile racist.
Answer: Main canon
Unknown (but see below).
There simply isn't any canonical information from the shows or canon tie-in factbooks to make any sort of conclusive judgement. You might however want to note that their regions of influence aren't at all close, over 200+ light years away and that the history of the Xindi (as seen in Enterprise) would suggest that warp travel is a relatively recent development for them, perhaps a matter of a few hundred years.

Image from Star Trek: Star Charts
Having said all that, we learned in TNG: The Chase that the Milky Way galaxy was seeded with DNA from an an early humanoid race. It's certainly plausible (nay, likely) that both the Gorn and Xindi arose as a result of this seeding process.

Non-Canon.
Unknown
We get a little bit more info about the background of the Gorn in the RPG Star Command II: Empires at War in which we learn that the Gorn aren't a single race (but in fact three) and that none of the three planets that these races had assumed were their ancestral homeworlds were in fact their point of origin, and nor was the world (Clagorn) that they all claimed as their new homeworld and capitol of their Confederacy.

Actually, the Gorn species is comprised of three different races, each
  having evolved on a separate planet. Soon after these races made
  contact, scientists discovered that genetically, all three were in
  fact the same species. In turn, it was discovered by examination of
  fossil records, that none of their three home worlds was the true point
  of origin for their species. This helped to quickly cement the three
  races into a solid political unit.

Given this and the fact that their race was apparently capable of warp travel hundreds of thousands of years before the present era, it's easily possible that the Gorn and the Xindi are interrelated in some fashion.
Comment: I went to Google Images and found a map of Federation space that is different from this one, and that's what I based my geographical opinion on. It shows the three planets in the lower portion of the map, with Gorn space next to Klingon space in the Beta Quadrant, not under it, and Xindus above it and New Xindus more to the left; both in the Alpha Quadrant. I completely understand there are many different maps out there, but this was the one I was looking at, so the proximity was part of what led to the question.
Comment: @AlFleming - Can you post a link? It may be that it's still a canon map, but from a different angle.
Comment: This is my first attempt at a link, so I hope I do it right. Here goes...https://i.stack.imgur.com/d3lUG.jpg
Comment: @Valorum unless I'm blind, neither Xindus nor any other (previously) Delphic Expanse locations are on your map.
Comment: [Stellar Cartography](https://memory-alpha.fandom.com/wiki/Stellar_Cartography:_The_Starfleet_Reference_Library) says the Delphic Expanse was in the Beta quadrant.
Answer: Comparative anatomy provides inconclusive evidence
Possible support
A Xindi-Reptilian:

The five surviving Xindi species share a characteristic cheek feature that might be analogous to the notch between the eye and nostril of the Gorn from "Arena":

Inconsistent support
The eyes of the mirror-universe Gorn in "In a Mirror, Darkly, Part II" have vertical slit pupils:

These are similar in form and colour to Xindi-Reptilian eyes.
The faceted eyes of the Gorn in "Arena" could be explained as transparent eyelids or artificial eye protection.  Canon is silent on the matter.
Discrepancy
Xindi-Reptilians have five-fingered hands that resemble human hands:

Gorn have robust three-fingered hands:

Although Xindi-Reptilians always wear gloves which could disguise three-fingered hands, their aggressive pride in their own species makes any imitation of other species' features unlikely.