Choosing WACC Tax Rate

Question: I'm calculating the historical and forward quarterly WACC for a security. For the historical WACC, should I use the quarter's tax rate (which in some cases is very negative) or a TTM tax rate or something else? The wide quarterly variances throw off the calculation considerably. The purpose of this would be to look for historical trends.
Comment: Just from common sense some kind of averaging would seem to be required. Using the trailing twelve months seems reasonable.
Comment: Is this for academic research or to fulfill a corporate mandate?
Comment: Academic research.
Answer: The various forms of the Capital Asset Pricing Model, as well as Black-Scholes, are built on top of the axioms of Frequentist Decision Theory.  An assumption in the model is that the parameters are known with a probability of one.  Generally speaking, this assumption is harmless.  There are many models where the result with perfect knowledge is also the result without such knowledge.  Unfortunately, finance cannot be such a case.
To demonstrate this case, consider the simple one period profit function of $w_{t+1}=Rw_t+\epsilon_{t+1}$.  If $\epsilon$ is drawn from a normal distribution and $R$ is known, then all of the properties of mean-variance finance will hold.  In fact, $w_{t+1}$ will converge to a normal distribution on repeated sampling if you rescale to 1 at every sample.  However, if $R$ is unknown and $R>1$, which it must be in finance, then two papers show that this class of problem has no non-Bayesian solution.
The first paper was by Mann and Wald in 1943 and the second by White in 1958.  Mann and Wald solved that the estimator for the coefficient was the least squares estimator, a form of the sample mean.  White showed that the distribution of $\hat{R}-R$ was the Cauchy distribution.  This is where it gets weird.  The Cauchy distribution lacks a population mean or variance. Hence no useful estimator exists.  Therefore WACC cannot be estimated unless you actually know the means, variances, and covariances of every security with perfect knowledge.
I wrote a paper solving the distribution of returns for all asset and liability classes.  It notes something else that most people have ignored.  The first, above, is that no one actually checked the properties of estimators created by these models.  The second though is interesting as well.  Returns cannot be data, except bank or insurance company guaranteed investments.
Returns are not data as they are not observed.  Prices are observed.  Volumes are observed.  Cash flows are observed.  Returns are calculated from either prices or cash flows.  They are a function of the data.  The definition of a statistic is that it is a function of the data.  Returns are not data.  They are statistics.
As such, they inherit the properties of the underlying data via the mathematical transformation that turns them into returns.  There are four methods that economists convert prices to returns discussed in the article.  A fifth, using the internal rate of return method, was not thought about by me when I wrote the article although it is a form of regression and so should be covered.
In the simple case where a return is a future value divided by the present value minus one is the ratio of two random variates.  Under some simple, real-world assumptions, the distribution of returns of going concerns that are traded on an exchange will converge to the truncated Cauchy distribution with a very slight skew due to the intertemporal budget constraint.  For assets sold at other types of auctions, such as Sotheby's, it will be the ratio of two Gumbel distributions because of the different rules.
The short version of this is that WACC cannot be measured if it exists.  Any attempt at measurement would have zero relative asymptotic efficiency to a median based measurement.  This would violate the theory.  It isn't median-interquartile range finance.
The reason you are getting wide sample variances that do not settle down is that the truncated Cauchy distribution lacks a variance.  It looks like heteroskedasticity, but it isn't.  The Cauchy distribution is askedastic, and so no measurement of a traditional understanding of volatility exists.  This is not to say it cannot be measured.  The interpretation is very different because there is no such thing as a variance or covariance.
Bayesian methods are admissible here, but they don't work like it is generally taught in finance.  Indeed, since they do not view data as random, but instead view parameters as uncertain the differences can be rather large.  Before going down that path, I recommend picking up an introductory text on Bayesian methods.
If you look at a mean or variance as a property of a distribution, then you may have an easier time thinking about it.  A nose is a property that vertebrates share.  Trees do not.  If you attempt to measure the number of noses on a tree, you will fail no matter what method you use.  On the other hand, trees do pass gasses with the environment.  They just don't do it through the structure we call a nose.  All living parts of a tree are engaged in respiration.  If you widen your concept, the lack of a nose is not a problem.  Not having a variance is a similar type of problem.  The idea of volatility works differently quite a bit in the same sense that trees lack noses but respirate through an entirely different model.
The correct solution is to look at the marginal cost of capital on a firm by firm basis.  For firms with lines of credit, this is easy.  For firms that would not qualify for commercial loans then you would have to look at the discount on initial public offerings.  I doubt a data source exists to provide you with your requested information.  The existence of mean-variance finance implied that it was not necessary information.  Someone really needs to go back and fill in that gap.
For my paper, you can find it at http://www.scirp.org/Journal/PaperInformation.aspx?PaperID=78849
For White's paper, you can find it at:
White, J.S. (1958) The Limiting Distribution of the Serial Correlation Coefficient in the Explosive Case. The Annals of Mathematical Statistics, 29, 1188-1197.
I don't have the Mann and Wald citation where I am at, but I think you can get to it via the White paper in its bibliography.
I do apologize, but your problem cannot be solved by anyone.  No such methodology exists within null hypothesis based methods.
Just for completeness, it does not matter what tax rate you use as you cannot solve the necessary other components.  IF you used the marginal cost of funds, then you should use the actual quarterly marginal tax rate, even if it is negative to be mathematically consistent with the idea of marginal thinking.
Comment: I believe the variance in the tax rate of the firm I'm looking at have more to do with accounting method and tax loss carry-forward and when the company elects to use them. Great answer on the quant side though.
Comment: The tax must have finite variance, returns won't though.
Comment: Yes, but the tax rate is not a random variable. It is semi-dependent on earnings before tax and presumably the rest of the variance is tax credits and such. The most significant variances occur when the denominator accounting income before taxes is near zero and there is still a sizable tax income base left because of differences in tax accounting. This leads to extraordinary tax rates that are not marginal. Does that make any sense?
Comment: Yes, and the rate is random, though not necessarily a continuous variable.  Your tax rate may be ill-behaved, however.  Your rate is a ratio of two random variates, but are probably not well described by any simple function.  Your tax rate may not have a mean or a variance, depending on the calculation process in the numerator and the denominator.

Have you considered median based methods such as Theil's regression or median based statistical tests?
Answer: If you are trying to determine the quarterly WACC your tax rate needs to be quarterly as well. Personally, I would take a look at the change in income tax expense. You can also try experimenting with change in (income tax expense / ebit) or adding in income tax expense + deferred tax liability.
However, I would say use the quarterly tax rate even if it is negative. It is negative due to corporate tax subsidies, deferments, low quarterly earnings etc. Point being that these, in so far as they are eventually translated in to capital losses or gains should impact the weighted average cost of capital. Example: One of the ways the government will try and encourage businesses to expand is lowering the tax rate. So that they will get more bang for their buck, so to speak.
Answer: TTM or Annual tax rates are the common choice. I have not seen anyone using quarterly tax rate.

Choosing WACC Tax Rate


Cannot type with Apple Bluetooth Keyboard

Question: I am trying to install Ubuntu 10.10 on my iMac, but I cannot type anything in the Who Are You? stage. Is there a way to fix this. I don't own a USB keyboard, so I'm kind of stuck.
Answer: If (and I say IF) you can get BlueTooth to work in a Live session on your existing computer, you should be fine. One thing that I noticed with the Apple BlueTooth keyboard is that it will never properly bind to your adapter until it is given some "name". This is something done, for example, when auto-detected on a MAC computer. I had this issue under Ubuntu 9.10, back then, and a friend of mine just tested the device on his Mac. At that time, the device was given the name of his computer, automatically. From then on, the keyboard never had any problem connecting to my Linux box. I just asked him to rename my keyboard to something else than his own name, of course. The only issue I had, and this is normal is that if I bind my keyboard, say, to my desktop, it will be unbound from my laptop. Or when it is bound to a Windows machine, instead of a Linux box.
Answer: Go to live evaluation , wait till ubuntu loads fully!
if bluetooth window popups press always allow !!!
just make your computer's bluetooth discoverable via the ubuntu's bluetooth menu.
press add device keyboard
start pressing keys like mad
when your keyboard appears press next enter the number you see on the panel and hit enter on your mac's keyboard and you're ready.
You must deactivate bluetooth and reactivate it again to start using your keyboard, when you will start using your keyboard it will be recognised always.


How can I write a routine to check, optimize and analyze all tables in databases in MySQL

Question: How can I create a routine in MySQL to check, optimize and then analyse the tables?
Also how can I schedule this routine to run every night at set time?
Thanks
Comment: By "check, optimize, and analyse" are you referring to specific MySQL commands or general ideas?
Comment: @NickChammas the OP is referring to `CHECK TABLE tblname;`,`OPTIMIZE TABLE tblname;`,`ANALYZE TABLE tblname;` commands in MySQL.
Answer: I prefer writing it myself. Place these lines in /usr/local/sbin/OptimizeAllTables.sh
WHICH=/usr/bin/which
MYSQL=`${WHICH} mysql`
MYSQL_USER=root
MYSQL_PASS=rootpassword
MYSQL_CONN="-u${MYSQL_USER} -p${MYSQL_PASS}"
SQL="SELECT CONCAT('OPTIMIZE LOCAL TABLE ',db,'.',tb,';')"
SQL="${SQL} FROM (SELECT table_schema db,table_name tb,engine eng"
SQL="${SQL} FROM information_schema.tables WHERE"
SQL="${SQL} engine in ('InnoDB','MyISAM') AND table_schema NOT IN"
SQL="${SQL} ('information_schema','performance_schema','mysql')"
SQL="${SQL} ORDER BY data_length DESC) A"
${MYSQL} ${MYSQL_CONN} -ANe"${SQL}" > /tmp/OptimizeAllTables.sql
${MYSQL} ${MYSQL_CONN} < /tmp/OptimizeAllTables.sql

and make it executeable
chmod +x /usr/local/sbin/OptimizeAllTables.sh

CAVEAT #1
Running OPTIMIZE TABLE is the same as running ALTER TABLE ... ENGINE=... followed by ANALYZE TABLE. Therefore, there is no need to run a separate ANALYZE TABLE.
CAVEAT #2
Please note I use OPTIMIZE LOCAL TABLE instead of OPTIMIZE TABLE. This ensures that the OPTIMIZE TABLE is not recorded in the binary logs because it can replicate to Slaves. If you want the OPTIMIZE TABLE to be replicated all Slaves, OPTIMIZE TABLE is fine.
CAVEAT #3
Note that I ordered all the tables by the biggest table first. If you want to optimize all tables starting with the smallest table, change this line
SQL="${SQL} ORDER BY data_length DESC) A"

to
SQL="${SQL} ORDER BY data_length) A"

EPILOGUE
Simply place this line in the crontab to run every midnight
0 0 * * * /usr/local/sbin/OptimizeAllTables.sh

If the tables are enormous, you may want to schedule this for one a week (Sunday at Midnight)
0 0 * * 0 /usr/local/sbin/OptimizeAllTables.sh

Give it a Try !!!
Answer: It may be that you do not need to write your own script.
I would suggest reading about the mysqlcheck MySQL command. It has options to do all of the things that you want to do to a table, to all tables in a database, and so forth. The MySQL documentation on this can be found at:
http://dev.mysql.com/doc/refman/5.0/en/mysqlcheck.html
In terms of scheduling the tasks MySQL has an Event Scheduler which can be used to manage the scheduling and running of events.  The MySQL documentation starts here:
http://dev.mysql.com/doc/refman/5.1/en/events.html
Original link posted was:
http://www.thegeekstuff.com/2011/12/mysqlcheck/


How do I find out a fair price for my Magic the Gathering cards?

Question: Back in the day, I would check Scrye magazine to figure out how much my Magic cards should sell for, but they folded two years ago. Where's a good place to price my collection these days?
Comment: are you looking to sell the whole collection?  Just a few cards?  Or are you just curious as to the relative worth of the cards?  Also, how old are the cards?  Are they an old collection from the 90's, some of the more recent sets?  Or a decent mix?
Comment: @Pat Looking to value a collection of 90's cards, most likely for sale.
Answer: If you want to know what you can actually sell individual cards for, I think you can't do better than ebay. If you look at price indices like Scrye used to have, you run into the problem that what a shop can sell a card for is typically much higher than what you, a private individual, can achieve.
Bear in mind as well that prices for individual cards are much higher than buying in bulk. In other words, you might work out that your collection is worth thousands of dollars, if you were to sell each rare individually. But if you tried to sell the same thing to a shop, or in a single lot on ebay, it would sell for only a small fraction of this.
The only other caveat is if you have many extremely rare old cards from the first days of Magic. In this case, the wear and tear of the card has a very large impact on the potential price. Again, ebay will give you an excellent guide to how much these can vary (try doing a search for "Black Lotus" for example).
Answer: Another great and reliable source is http://sales.starcitygames.com/spoiler/spoiler.php which has a nice search engine and rather stable prices.
Just reduce the prices by something like 20 or 30% to account for the money they want to make on the cards. The important thing is the relative value of the cards.
Comment: well, Bobby. They do need to make a profit on their sales... So you probably get 20-30% less selling to them than they do selling to you, and that's the same 20-30% you'd not get selling directly to consumers. That's the way things work in all used goods markets.
Answer: magiccards.info has a very nice price chart that compares prices at various conditions across many online retailers for every card. It's also 1000x more useful than Gatherer for searching for and browsing through Magic cards.
Answer: While you can search for only 10 cards at a time, the Apathy House Trade Evaluator is a nice way to find reasonable prices.
When I've traded in the past, others have requested I use Apathy House to value my cards, and when I've sold on eBay, the prices I have received have been close to what Apathy House suggests.
Answer: Another concept is magiccardmarket.eu (also known as magickartenmarkt.de in Germany), which is a user-to-user trading site. Anyone can sell their cards at a self-defined price, which has the interesting side effect that you can see what cards actually sell for very well. It features both private and professional sellers, and will indicate the difference.
To give a quick example, let's assume I wanted to find out a "fair" price for Vigor, I could look on its product page on magiccardmarket to see the following information (this is for the Lorwyn printing):

You can see a number of prices, which I'll explain due to the lack of official documentation on the site:

From gives you the cheapest price of availability of this card, with at least Excellent condition
Foils from does the same, only counting Foils
Price Trend is a fictional number, calculated from recent average selling prices per day
the graph on the right illustrates recent prices and also shows the Price Trend, which is helpful to see recent developments - this will also let you gauge whether you can trust the previous figures

Now, all of these values need to be taken with a grain of salt, as so far, this includes all sellers registered on the site. Most of the time, the cheapest card prices will be from Spain or Italy (as they are in this case), which of course is fine if you're from those countries, but might mean that if you'll mail-order them, you'll have to pay more shipping or even toll costs than is reflected in the price numbers here.
In addition, different regions may affect how valueable a certain language will be. Japanese cards, for example, sell exceptionally well in Europe, even among people not familiar with the language.

Now, depending on what you would consider a "fair" price, your method of determining it may vary, but here's a method I use when looking for a value I can use for buying or trading:

select the card and printing (edition) of the card you want to gauge through the search function
set the condition, language and other applicable values through the filters

if you're a registered member, you'll also get the option to only show sellers from your country. If you're not, you'll have to take a little more effort, but nothing will be "hidden"

look at the result list for prices, keeping in mind that some entries may stray from the average (or have comments further explaining in what ways this card differs from what you would expect) and may need to be discarded in the interest of a truly representative result

Following this method, you should have a good idea of how this card is being traded, and apply your individual judgement of fairness to it. For example, I would go about it like this...

The cheapest seller from my country happens to sell their Near-Mint Lorwyn Vigor for €8,98, which is fairly true to the price average. The next closest prices scale pretty much linear upwards to the highest price - €14,90.
  Looking at the selling prices, the card hasn't been often sold for more than €10,00 and since that seems to be a price slightly above the Price Trend (a rising figure, as of right now), selling it for that amount or a little more may be a good idea.

This appears to be a better method for me that searching on ebay, considering you might also find the self-drawn Vigor playmat, Amulet of Vigor because it's close enough of a search result, or in general don't have to mess around with a whole lot of other stuff due to the system being designed specifically for card trading, along with having no idea where that price comes from, and whether it's justified.
Answer: Most people, and stores, that I know use reputable online sellers or mass resellers to price their cards. In the case of my LGS, here in Canada, that's Face to Face Games. For US prices, Star City Games is pretty popular, and as a mass reseller indexing site, I see TCGPlayer used a lot for pricing. For Euro pricing I believe CardMarket is a popular one. A more recent site, newer perhaps than many of the other answers is Scryfall, which uses some aggregate data from TCGPlayer and CardMarket to show prices for each different version of the card on the results page.
Answer: You are not going to get list price for your cards, no store buys at scg prices. If you want a reasonable indication of what price your cards will fetch you should look at the buylist prices of major retailers, that is what you are going to get for your cards. The list price is for trading not buying.
Scg is a decent buying partner, they are always very fair with there grading and if you have cards they want they give reasonable prices. They also have a very attractive 50% trade bonus if you want to trade up instead of just selling cards for cash.
Comment: You're assuming he intends to sell to a store, he may be looking for pricing to put on ebay, for private sale or for trade values.


Normality assumption in Sharpe ratio

Question: I have read that the Sharpe ratio imposes a normality assumption, but I fail to see how. Standard deviation is statistic for any type of distribution. Anyone have any ideas?
Comment: This is a basic statistics question. The Sharpe ratio is calculated using the mean and variance of a distribution, therefore it is a less descriptive measure the more the mean and variance do not completely describe the distribution.
Comment: @JoshuaUlrich, I disagree with that notion. SR calculations for any return distributions are 100% accurate. SR of a bond portfolio can be fairly compared with an emerging market stock portfolio. After all the returns are scaled by their own volatility measure. The problem arises due to a problem with the definition of SR itself, it penalizes out-sized returns to the upside, which are desirable yet not properly accounted for in SR computations.
Comment: @MattWolf: so you would argue that there's no normality assumption? Even if you account for upside/downside deviation, the Sharpe Ratio still has issues if the distributions are non-normal.
Comment: @JoshuaUlrich, that is not what I said, of course are the moments different for different distributions. My point was, and sorry if that was not clear, that it is impossible to attach an accurate distributional assumption to any financial asset returns, hence the most often used normal and log-normal assumptions for most asset returns, which validates the usage of mean and stdev under normal distributional assumptions. In fact most all financial asset returns exhibit dynamic distributional features.
Comment: @Matt Wolf, I get what you're saying, but is it because the standard deviation is a unitless measure?
Answer: You are correct that you can compute Sharpe ratios on portfolios with any return distribution.  The issue is comparing Sharpe ratio's of non-normally distributed portfolios (which in reality is almost any portfolio).  To take an extreme example.  Consider two portfolios, with returns in excess of benchmark.

50% chance of 10% return, 50% chance of a 20% return
50% chance of 10% return, 50% chance of a 100% return

The Sharpe ratios are
$$
1. \frac{0.5 \cdot 0.1 + 0.5 \cdot 0.2}{\sqrt{0.5 (0.1 - 0.15)^2 + 0.5 (0.2 - 0.15)^2}} = 3 \\
2. \frac{0.5 \cdot 0.1 + 0.5 \cdot 1}{\sqrt{0.5 (0.1 - 0.55)^2 + 0.5 (1 - 0.55)^2}} \approx 1.22
$$
Portfolio 2 clearly dominates portfolio 1, but its Sharpe ratio is much lower.
Comment: Very good example!
Comment: Many thanks to both David Nehme and Joshua Ulrich for answering my question.
Comment: @David, I would argue that this particular observation is not really because of different distributional assumptions but because of the intrinsic flaws of SR itself which is that it penalizes large upside returns because of an increase in volatility such upside returns cause. It is absolutely fair to compare SRs of portfolios of entirely different asset classes with intrinsically different distributional assumptions.
Comment: @user6997, you should mark this as correct answer if you think it properly addresses your question
Answer: The Sharpe ratio is just a transformation of Student's t-test and it is a special case of the t-test so that all requirements to use a t-test apply to any use of the Sharpe ratio.
A statistic is any function that uses data from a sample.  The Sharpe ratio is a statistic.  Although it does not assume normality explicitly, it does assume the existence of a second moment and it is a poor statistic in small samples if the data generating function has a second moment but is not near to the normal distribution and the sample size is small.
It has been argued since Mandelbrot in 1963 that the distribution of returns lacks a mean and hence a variance, or standard deviation.  I have written a proof that no standard deviation exists for stocks that I am about to submit for publication.  Not all statistical distributions have a standard deviation.
The gist of my argument is that returns are a future value divided by a present value minus one.  Under the Markowitz assumptions, of many buyers and sellers and markets in equilibrium the logical market behavior is for actors to bid their expectations.  By the central limit theorem, as the number of buyers and sellers become large, the distribution of a set of expectations must converge to normality.  This implies that the distribution is the ratio of two normal distributions, which would be $$\frac{1}{\pi}\frac{\gamma}{\gamma^2+(r-\mu)^2}.$$
If you take expectations over the distribution you will find that neither a mean nor a variance exists.  This distribution is the Cauchy distribution. It doesn't really explain returns because of the limitation of liability, liquidity constraints, bankruptcy and mergers however it explains the overwhelming amount of the uncertainty.  You have to move away from the Markowitz assumptions to get realistic distributions.  NIST describes the Cauchy distribution thusly.

The Cauchy distribution is important as an example of a pathological case. Cauchy distributions look similar to a normal distribution. However, they have much heavier tails. When studying hypothesis tests that assume normality, seeing how the tests perform on data from a Cauchy distribution is a good indicator of how sensitive the tests are to heavy-tail departures from normality. Likewise, it is a good check for robust techniques that are designed to work well under a wide variety of distributional assumptions.
  The mean and standard deviation of the Cauchy distribution are undefined. The practical meaning of this is that collecting 1,000 data points gives no more accurate an estimate of the mean and standard deviation than does a single point.

One practical issue though is that the Sharpe ratio cannot exist.  It is not difficult to show that a t-test would be perfectly inefficient as the sample size went to infinity.
So to answer your question exactly, a standard deviation does not exist for all distributions, and while there isn't a strict assumption of normality it will only be efficient for small samples if normality holds.
Comment: Looking forward to reading your paper. It seems like you have an outsider mindset. Why is the convergence of two normally distributed sets of expectations the ratio of two normal distributions? Sees, if anything, if you be bimodal. And how is this related to the Cauchy?
Comment: Actually, I am an old-time insider.  I just am an outsider on this issue because I am a very strict empiricist.  As to the expectations question, the sampling distribution of an arbitrarily large set of expectations will tend toward normality.  If you add the assumption of independence and equilibrium and work in the error space, then you end up with a Cauchy.  If the errors are not independent and/or are systematically away from the equilibrium then you get a very ugly transform of the Cauchy distribution.
Comment: If you do other assumptions, such as using a single price auction, you end up with yet another type of distribution as the ratio of two Gumbel distributions.  And, of course, if you alter the assumptions yet again, you can even end up with a log-normal distribution for a set of single period discount bonds with simultaneous maturities.
Comment: Likewise, if you collapse liquidity as in 2008, or play games with the macro economy as the Fed did in August of 1929 you get yet again another set of ugly distributions once the system goes into free-fall.  Liquidity should always be a real world component of your distribution of returns since you cannot sell your stock if nobody can buy it.
Comment: Finally, the limitation on liability really matters a lot in the macro economy because it truncates losses at -100% and this appears to matter for economic growth, surprisingly.  It appears that abolishing slavery matters quite a bit more than appears in standard literature because it forces behavioral changes on the part of creditors.

Normality assumption in Sharpe ratio


Improving DNA quality and yield from stool samples

Question: I prepared genomic DNA from pig stools but the concentration was very low — about 3~4 ng/µl, when I measured it using nanodrop. The A260/A280 and A260/A230 values also did not come out very well (0.4~0.5 and 1.0, respectively). I also tried filtering the DNA two times but it didn't improve the quality. Does anyone have experience with DNA extraction from stool samples and suggest me how I can improve the quality and yield?
Answer: Expected photometric ratios for pure DNA are around 1.8 (A260/A280) and 2.0-2.2 (A260/A230). For reference, if you are extracting pure RNA, its ratio is ideally 2.0 (A260/A280).
Often, lower ratios usually indicate low purity due to contaminants or simply a very low amount of DNA.
EDTA, carbs and phenol among other chemicals all have absorbance at 230nm. If you used TRIzol reagent to extract DNA, you may also get some absorbance from this reagent at 270nm if you incorrectly pipetted some of the phenol phase (pink stuff) or the interface (white cloudy stuff between the aqueous phase and the pink phase). If you measure a low ratio, like you did, it probably means that in your final DNA extract, you seem to have (a) things that are not DNA in your solution, and/or (b) a very low concentration of DNA.
If you suspect you have enough DNA, you can purify to try to remove non-nucleic acids. However, with ratios that low, I suspect you should extract DNA from scratch; it does not appear that you have enough to rescue simply by purifying again.
Which method did you use to extract your DNA? What do you mean by filtering?
Comment: Oh I didn't use trizole reagent. I used a commercial kit. filtering means DNA binding and eluting at column tube during experiment.
Comment: You're using spin columns, I'm sure. They contain a silica resin that selectively binds DNA (RNA is also possible), by varying salt conditions. You pass the solution with your DNA by centrifuging, the DNA gets trapped on the resin, and then elute the bound DNA with a second pass of an elution buffer. It's quite a high-quality way of purifying DNA from a solution, in my hands it works better than TRIzol extractions. I have no idea how you obtain an aqueous solution workable with columns from pig stool. In principle, it should work well if the input is good enough. Sorry that's all I got!


Source and authentication of "Jihad Will Be Performed Until The Coming of the Hour"

Question: الجهاد ماض إلى قيام الساعة
Jihad Will Be Performed Until The Coming of the Hour
Where is this hadith from and what is the authenticity of this hadith?
Answer: Its meaning is correct and supported in many other ways as well.
From the Koran:

وَقَاتِلُوهُمْ حَتَّىٰ لَا تَكُونَ فِتْنَةٌ وَيَكُونَ الدِّينُ كُلُّهُ
  لِلَّـهِ
And fight them until there is no fitnah and [until] the religion, all of it, is for Allah .
Al-Anfal 39

This will happen when Jesus (Isa) returns near the Day of Judgement when all religions except Islam would perish, see Surah An-Nisa 159 and Hadith on Isa and Dajjal. So Jihad must continue till then.
From Hadith:

يقاتل عليه عصابة من المسلمين حتى تقوم الساعة
A group of people from the Muslims will fight until the Hour is established.
Sahih Muslim 1922

لا تزال طائفة من أمتي يقاتلون على الحق ظاهرين على من ناوأهم حتى يقاتل
  آخرهم المسيح الدجال
A section of my community will continue to fight for the Truth and overcome their opponents till the last of them fights with the
  Dajjal.
Sahih Sunan Abu Dawud 2484

لا هجرة بعد الفتح ولكن جهاد ونية
There is no Migration after the Conquest of Mecca, but Jihad and good intention remain
Sahih Bukhari 2783
Answer: The hadith with the closest wording to that what you quoted is this one from Sunnan Abi Dawod, which was qualified as da'if by al-Albani:

Three things are the roots of faith: to refrain from (killing) a person who utters, "There is no god but Allah" and not to declare him unbeliever whatever sin he commits, and not to excommunicate him from Islam for his any action; and jihad will be performed continuously since the day Allah sent me as a prophet until the day the last member of my community will fight with the Dajjal (Antichrist). The tyranny of any tyrant and the justice of any just (ruler) will not invalidate it. One must have faith in Divine decree.

The hadith was also compiled by al-Bayhaqi in his al-Qada' wa al-Qadar  القضاء والقدر  -see here in Arabic-  and in his as-Sunan al-Kubra -see here in Arabic- via the narrator chain of abu Dawod and among those who compiled it too you may find Sa'id ibn Mansoor (the teacher of abu Dawod) -see here in Arabic-, abu Ya'ala and a-Daylami. The hadith has two issues in the narrator chain: Ja'afr ibn Burqan جَعْفَرُ بْنُ بُرْقَانَ is considered as somewhat trustworthy, but making mistakes in his narrations from imam az-Zuhri and Yazid ibn abi Nushbah يَزِيدَ بْنِ أَبِي نُشْبَةَ is unknown. Even if the hadith's authenticity is rather weak, al-Mundhiri didn't comment on it as stated in Aabadi's 'Awan al_Ma'abud عون المعبود, there are some sound ahadith that support its meaning, like:

Good is tied to the forelock of the horses. It Was said to him: Messenger of Allah, why is it so? He (the Prophet said): For reward and booty until the Day of Judgment. (See for example in Sahih Muslim)

This hadith was also compiled by al-Bukhari under a chapter entitled: Jihad is to be carried on whether the Muslim ruler is good or bad الْجِهَادُ مَاضٍ مَعَ الْبَرِّ وَالْفَاجِرِ -see here-.

"Some people from my followers will continue to be victorious over others till Allah's Order (The Hour) is established." (Sahih al-Bukhari)

The Prophet (ﷺ) said, on the day of the Conquest of Mecca, "There is no migration (after the Conquest), but Jihad and good intentions, and when you are called for Jihad, you should immediately respond to the call." (Sahih al-Bukhari and in Sahih Muslim)

beside many ahadith starting with:

The Last Hour would not come unless you fight  ... (see for example: in Sahih Muslim, Sahih al-Bukhari, and many more)

So far a few examples from the sunnah.
The Qur'an supports the meaning more as Jihad is prescribed as any other deed and is at least fard kifaya, and as the hadith says:

'What is lawful is that which Allah has permitted, in His Book and what is unlawful is that which Allah has forbidden in His Book. What He remained silent about is what is pardoned.'" (Sunan ibn Majah)

among the verses supporting that Jihad will last until the last hour you may find:

Indeed, Allah has purchased from the believers their lives and their properties [in exchange] for that they will have Paradise. They fight in the cause of Allah , so they kill and are killed. [It is] a true promise [binding] upon Him in the Torah and the Gospel and the Qur'an. And who is truer to his covenant than Allah ? So rejoice in your transaction which you have contracted. And it is that which is the great attainment. (9:111)

Fight them until there is no [more] fitnah and [until] worship is [acknowledged to be] for Allah . But if they cease, then there is to be no aggression except against the oppressors. (2:193)

Fight those who do not believe in Allah or in the Last Day and who do not consider unlawful what Allah and His Messenger have made unlawful and who do not adopt the religion of truth from those who were given the Scripture - [fight] until they give the jizyah willingly while they are humbled. (9:29)

And fight them until there is no fitnah and [until] the religion, all of it, is for Allah . And if they cease - then indeed, Allah is Seeing of what they do. (8:39)

Fighting has been enjoined upon you while it is hateful to you. But perhaps you hate a thing and it is good for you; and perhaps you love a thing and it is bad for you. And Allah Knows, while you know not. (2:216)
Answer: First of all a disclaimer: I am not a scholar, I just did a google search.
The closest thing I could find to what you quoted are these words:
الجهاد ماضٍ إلى يوم القيامة
It is essentially the same statement with the same sentence structure, except that  يوم القيامة  is used instead of قيام الساعة to indicate the end of time. This is from a bigger hadith in Mu'jam al-Awsat of Al-Tabarani, hadith number 4775.
From what I understand, this particular hadith is a weak hadith, however everywhere it says that the meaning is correct since there are other versions that essentially say the same thing. This is also kind of obvious as fighting is an obligation in Islam:

2:216 Jihad (holy fighting in Allah's Cause) is ordained for you (Muslims) though you dislike it, and it may be that you dislike a thing which is good for you and that you like a thing which is bad for you. Allah knows but you do not know.

And Jihad is a more general form of fighting, and like other obligations it would remain until the end of times.


Is it possible to spoof IP behind NAT?

Question: Is it possible to spoof the source IP if I'm behind a router that is using NAT?
If not, how do botnet programmers manage to make a SYN flood from their slaves? Don't most home/business networks use NAT?
Answer: In short, No unless you have a leak in the protocol.
A botnet can still "do a SYN flood" but, in case where a NAT function delineates the corporate LAN from the Internet, it is the router that will get flooded.
Of course, the actual situation is more complicated than that but I won't get into fully describing it here.

Is it possible to spoof IP behind NAT?


When is the best time to harvest chilli peppers?

Question: I'm wondering when my chilli plants start bearing fruit when would be the best time to harvest the fruit when the chillis are still green or when they change colour.
Comment: My personal opinion is that you should harvest them when they taste the best for your intended purpose, which isn't the same time for every pepper. I recommend experimenting here, because I've found that the recommended color stage to harvest isn't always the best. For instance Randy Sine's Evil Jalapeno is so much better green, IMO, but they say to harvest it when it's red.
Answer: There are some chilis that are generally harvested when green - jalapeño, rocoto sometimes - but in most cases you'll want to wait until they ripen to their final color. The heat is typically present in the unripe green fruit, but the sugars and other flavors that give each variety their specific flavor profiles will not be developed until the color changes. The difference can be quite profound, and I even like to let jalapeños turn red before harvesting because of the flavor improvement.
As to when they are ready to pick, you can cut them off almost any time, but when they are truly ripe they can generally be pulled from the stem with little effort. Wait too long, however, and they'll get mushy.
Answer: It depends on the variety.  I have jalapeno peppers that I harvest when they are green.  If you planted seeds, the packet should have an approximate harvest time in days.  I use that as a general guideline as well to figure out when best to harvest and so far it has worked out well for me.


What does 我在包里 mean?

Question: What does this phrase mean? 我在包里。 In English this is slang for being drunk, but I wonder what it means in Chinese. I was told this last night, by my girlfriend last night and I am wondering if it carries the same meaning.
Comment: do you have any context?
Answer:
我在包里

is a literal translation of

I'm in the bag

which means "I'm drunk" in English. While the Chinese sentence does not have any relationship with 'drunk' at all.
Here are some phrases that mean I'm drunk in chinese:
我喝醉了
我喝多了
我断片了 (I'm so drunk that lost my memory)
Answer: If it means "being drunk"
then I think it is just a mimicking of drunken talk or child words:
在 /zài/ is sound-alike of 醉 /zuì/
包 /bāo/ is sound-alike of 饱 /bǎo/ or 爆/bào/
里 /lǐ/ is sound-alike of 呢 /ne/
在包里 is a drunken talk of 醉饱呢 or 醉爆呢
Similar example:
喜歡 /Xǐhuān/ --> 稀飯 /Xīfàn/
什麼 /Shénme/ --> 神馬 /Shénmǎ/

What does 我在包里 mean?


How do you optimize new user setup?

Question: What's your top trick for getting a new employee set up quickly? Do you use images, scripts, something else?
Answer: Ghosted images that then run a user customisation script work well.  Give the user all the basic stuff (OS, Office, Firefox, misc corporate software) and then get the server to allocate shared drives and exchange on first login.  This is of course a windows-centric answer :)
I should also mention, for developer machines, I would then back off and let a higher level of customisation. But then I'm biased.
Answer: If you have no process to automate this already, start by doing a manual setup of a user's workstation. Include all the little details like partitioning specifics, branding logos, backgrounds, themes, applications to install, changes to their default configuration and so on... only once you have this on "paper" and it works as a manual routine - you can start automating it.
User-profile settings could either be provided as part of the default user profile on a new machine's image, which is copied to generate the profile for a new user on the first log-on. Or you could script all the changes and apply them during log-on regardless of the user's state.
Many settings are of course easily adjusted using Group Policies and won't require any tinkering with the client image.
Once you have an image defined, and policies and log-on scripts that do what you want, deploying a new user machine shouldn't take any time at all.
Check out Windows Deployment Toolkit for example as Microsoft (of course) prefer you use their imaging tools and formats these days. It's a lot easier as well but (for full effect) requires that you step away from that old XP thingie I guess ^^
Answer: I have found that the best to way optimize a new user setup is to start before they are hired.  Get with the manager and find out what the employee will need.  Have the hiring manager let you know the minute they accept the position. Have the manager give you all their info so you can do things like set up their login credentials.
In my last job, the most important thing for us was knowing WHERE the new employee was going to sit.  It's so much easier to set up a computer if there is a desk to put it on.
Answer: We have a new employee document and they usually share an office with someone else.
Comment: This doesn't really help to have a clean install of a machine but it really helps when someone is new at a company
Answer: As has been mentioned, setting up the machine with any productivity applications, corporate software, and a proper web browser (Firefox) are important basics.  Shared space is another good point, though you should also make sure to map that properly on the user's machine and probably provide links to it so that the user knows it is available.  In the same vein, bookmarks in the web browser to helpful intranet sites are a definite plus for users new to the company.

How do you optimize new user setup?


Does conversion between filetypes always break formatting in ebooks?

Question: Do different file types of ebooks have different formatting parameters? It looks like many of my ebooks layout came from the Soviet Union or from a typewriter that has no options. It would be really nice to have a more aesthetic look.
Answer: Different authors spend different amount of time getting the formatting right. Also, support for various formatting changes over time. I formatted some things in 2011 which were the best available technology at the time, but wouldn't look good on today's kindles. (I'm redoing one such book at the moment).
One of the problems is that ebook conversions are usually seen as afterthoughts after the print version comes out.
My rules of thumb:

PDFs to anything generally sucks
EPUB to Kindle does not suck anymore (via Kindle Previewer (kindlegen)) -- especially if the CSS were done right.
MS Word to epub (via Calibre) does not suck as long as headers are consistently styled and you are not using a lot of invisible formatting (i.e., hard carriage returns, manual centering etc).
Ebooks with images are hard to convert well.
MS Word to PDF generally does not suck (unless you think of PDF as inherently a sucky/inflexible format).
Encoding errors are a frequent problem when converting from one format to another. They are also easy to miss during proofing.

One other thought. Some lesser known reading systems  don't support much publisher formatting but impose their own default css on the ebook -- and give users the option to override publisher settings. You need to make sure you're viewing it in ibooks or google play books, adobe Digital Editions or possibly kindle app.
Answer: Yes, they do. And in addition to that there is no single set of formatting parameters within one type of of ebook. You can buy ePub based books that have margins set, so your full display is unused, that have paragraphs with indented first line, or with extra space etc. If books have been scanned the formatting might even be more diverse.
If the formatting is done properly, via style sheets, you might be able to "show" them on your device to your liking and for sure should be able to convert them. If the formatting was done "hard", using spaces and/or inline styling, that is much more difficult.


Difference between Subnet and VLAN?

Question: You often hear the terms Subnet and VLAN used interchangeably.  With the ubiquitous nature of IP these days, when are the two not considered roughly the same from a high-level, understanding that VLANs are L2 and Subnets are L3.   In other words, are there any cases for having a VLAN without a Subnet, and still have IP (L3) communication?  [Also ignoring that all networks are not subnets when considering classful networks which all are really just CIDR prefixes these days.]
Answer: If they are used interchangeably then they are used incorrectly.
Subnet refers to particular IP network, such as 192.0.2.0/28.
VLAN refers to 802.1Q standard, in which you can essentially give each port unique MAC address table, effectively separating them from each other.
VLAN may transport one or more subnet (but does not have to, it may be transporting something else than IP entirely).
Subnet may be configured for VLAN, but does not have to be, it could be without 802.1Q or over some completely different L2 technology than ethernet.
Comment: VLANs are a way to split a single L2 media into multiple Broadcast Domain, effectively creating "virtual" layer 2 networks

VLANs are usually used in switches to separate ports into distinct network The actual separation depends on the architecture, it can be along administrative lines (departments) or technological lines (PC, Server, IP Phones, Printers)

The 802.1Q Standard is only for Trunking purpose (multiple VLAN in a single link), by way of a Tag that is included in the 802.1Q Header that is inserted in the Ethernet Header and is a must when connection multiple switches using VLANs
Comment: The last paragraph is closer to what I was looking to see, though the question was phrased around IP only.
Comment: But to use them interchangeably you would need to remove all other conditions. Maybe in some companies VLANn has direct, unambiguous mapping to subnet Y, but it does not mean you could use them interchangeably in any practical way.
Comment: Devices are not VLAN aware.
Answer: Subnets (L3) and VLANs (L2) are on different layers. The terms should not be used interchangeably. A VLAN can contain one or more L3 prefixes ("Subnets"). For a layman this could cause confusion. Often people don't understand that these two are connected but not the same. People might say The host located in our server subnet or The server located in the DMZ VLAN and mean the same thing.
Comment: The multiple subsets per VLAN concept is a big one to keep in mind and many people forget.
Answer: This is a very informal way of looking at the difference between VLANs and subnets, but it's not inaccurate (just incomplete).  It may help networking newcomers get a little bit closer to the right mental picture.
Two different VLANs on a single switch or host are like two physically separate switches.  They partition the MAC address space, in that communications between two parties on a single VLAN or on a single physical switch don't involve any other parties on the MAC-level (layer 2) network.  The VLAN or physical switch limits the extent of MAC-level message propagation, keeping it as local as possible.
In contrast, IP subnets exist at layer 3 and partition the IP address space, not the MAC address space, but with a similar purpose:  to limit the extent of message propagation.  Any partitioning at the MAC-level layer 2 network below is entirely transparent to layer 3, which means that VLANs and/or separate physical switches can be treated as one single continuous layer 2 medium from the point of view of IP-level networking.
Conversely, switches and VLANs don't even see IP addresses nor IP subnetting (with some minor provisos which can complicate the picture).  Everything at layer 3 and higher is just payload to them at the layer 2 MAC level.
In summary:  VLANs and subnets partition different layers of the network model.  There is no circumstance in which they are interchangeable terms.
Answer: They are only used interchangeably from a perspective of each unique vlan at layer 2 should have its own subnet for addressing at layer 3 giving you separation and ability to manage broadcast traffic etc.
In terms of scenarios where you would have a vlan without a subnet then only perhaps if using an 'ip unumbered' setup but there are not too many reasons to want to have to do this.  If you review some best practice models like Cisco's composite network model then in terms of keeping individual subnets and your vlans 'local' to switch blocks then you would generally have a separate subnet assigned per vlan.
Comment: There are lot of reasons to run VLAN without subnet, IP is just one of the many protocols you can carry over ethernet. http://en.wikipedia.org/wiki/EtherType for list of others, some of them are very common, such as MPLS
Comment: Yes agreed, I was just looking at this from an IP perspective and the relationship in terms of correlating vlans with unique subnets.  Arguably one can view mpls as a means of tunnelling IP :)
Answer: A lot of the responders said the terms should NOT be used interchangeably.
Actually I think it is perfectly acceptable and common practice amongst people who DO know the difference to use the terms interchangeably when talking about IP on ethernet networks. In fact they pretty much should be synonymous in most circumstances (there's always exceptions) since both define a broadcast domain and your L2 and L3 broadcast domains should normally be identical.
Answer: In many implementations an IPv4 subnet and a VLAN are closely correlated on a 1:1 basis.  A subnet, strictly speaking is a portion of IPv4 address space from which one may assign addresses to hosts.  This is differentiated from a "prefix" a term used in the common parlance or a supernet, which may be a some larger portion of IP address space that is comprised of many subnets.
The reason for the correlation is that a single VLAN and a single subnet both represent a single broadcast domain.  As such, these two tend to be overlaid in most implementations.  As described in earlier answers, a VLAN is a layer 2 entity.  All hosts on a given VLAN can communicate with each other, but no hosts on one VLAN can communicate to hosts on another without some form of routing or in rare cases, bridging.
Answer: A VLAN is an Ethernet level concept, a subnet is an IP level concept.
A VLAN splits an Ethernet network into multiple logically separate Ethernet networks.
A subnet defines which hosts a host will try to communicate with directly, versus which hosts will need to go via a router. It also defines "network" and "broadcast" addresses.
It is common practice to have a 1:1 mapping between subnets and VLANs, but it is perfectly possible to have multiple subnets on the same VLAN. Equally it is possible to use proxy ARP to split a subnet between multiple VLANs or even have two VLANs using the same IP subnet for different purposes.
Answer: They are very much different. However a lot of terms (megabit, megabyte, memory, hard drive, etc) get miscommunicated.
Often we have customers asking us to move a vlan from one site to another, when really what they want is to move a subnet over.
You get used to it, even though I try and correct them (politely)
Answer:
In other words, are there any cases for having a VLAN without a Subnet, and still have IP (L3) communication? [Also ignoring that all networks are not subnets when considering classful networks which all are really just CIDR prefixes these days.]

some routing protocols can be in the same L2 domain and support the likes of apple talk or other non IP L3/4 protocols. These would need to be in the same L2 domain but not be in the same IP subnet, since IP is not required. In such a case it may be practical to use VLANS without considering IP/Subnetting of any kind.
Answer: The difference between the two is one of significance.  VLANs are generally only locally unique while subnets are usually unique across an organization.
Folks 'in the know' understand that vlan 100 in campus 1 is different than the one at campus 2 if the subnet of one is 192.168.1.0 and the other is 192.168.2.0 But you could have vlan 100 repeated in every building across a campus if you separate them by layer-3 boundaries and use different subnets.
And then there there are the exceptions to the rules or the bad designs that get worked around with duct tape and NAT pools...
Answer: In my experience, these days, they are considered the same until you use a protocol other than IP directly on top of Ethernet.
Answer: Put another way, subnets are, technically, a division of the address space at the L2 level -- it's more of a routing decision than anything else.  VLANs are tunneled LAN frames within the payload of other LAN frames.  Ignoring the various standards for a moment, if you put a packet analyzer on the cable, you'd see:
For a subnetted LAN, you'd see the same traffic.   THere's no easy way to look at a subnetted LAN and tell it is, in fact, subnetted.   For VLANs, you'd actually see ethernet frames carrying a VLAN tag, which then carry another ethernet frame inside of them.
Subnet frames are easily handled by equipment -- you can choose to ignore the subnet at a given moment if you want to, for example, have a transparent proxy watch some trafic.  VLANs are tunnels.
Comment: Your description of a VLAN is only true on a tagged or trunk port, nor are they tunnels in any sense.
Comment: VLANs are pure Layer 2 concepts, routing has nothing to do with VLANs (you are routing the L3 running on the VLAN, not the VLAN themselves).

Subnet frames..  that doesn't even exists..

Ethernet Frames (at Layer 2) or IP Packet (at Layer 3)
Answer: VLANs carve a switch into multiple virtual switches.
Subnets carve an IP network address into multiple smaller network addresses.
Comment: Hmm, no? Perhaps you need to [update your information](http://www.cisco.com/c/en/us/products/collateral/switches/catalyst-6500-series-switches/white_paper_c11-652204.html)? And taking too much away is often as bad or worse than having too much. - Myself
Comment: I don't mind late answers when they add something. Other than brevity, I don't find this providing anything to this two year old question. As a very brief answer, this is both it's strength and weakness. I could just as easily say "VRFs carve a switch into multiple virtual switches" and someone could then assume VLANs and VRFs are similar/the same.
Comment: VRF is not a layer 2 (switching) technology.  "Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away."
Antoine de Saint-Exupery

Difference between Subnet and VLAN?


AudioTrack Latency

Question: I'm making an application, that will be capable to make a VOIP communications on WAN, using AudioManager, specifically AudioTrack and AudioRecord, AudioRecord works fine but I have serious problems with the latency to play with AudioTrack. It is really high and unacceptable. I'm receiving chunks of 160Bytes and my audio settings are of 16 bit, 8KHz, 1 Channel, by that, in my chunk of 160 bytes I have about 10 ms by chunk, I will not have significative latency
I know that they are a lot of peoples with the same problem, but VOIP applications exists and probably the problem is mine.
PD: I'm programming in Java, I have tested it between a Motorola Milestone (Droid, android 2.2) and in another Samsung phone (android 2.3) and I have the same problems in both playing device. Also, I have tried to play my sound streamed to my computer and it is in real time. By that, the problem is in the player (AudioTrack). The latency of the network is very low (I'm on WAN) and I receive more than 99% of the packets (about 16Kb/s).
There is any way to continue with a VOIP program and make it usable?
Really thanks, beyond this problem, I haven't found some clear solution and it surely exist. It is a very usual and usefull, more in a communication device.
Answer: Do you use UDP instead of TCP? If not, consider Google for "Android UDP example". If yes, sorry for bothering.

AudioTrack Latency


Isn't it illegal to block wheelchair access to sidewalks with your vehicle?

Question: I live in Federal Way, Washington State. Many of my neighbors continually park their vehicles, blocking wheelchair access to our sidewalks. I can't find the RCW for it, but I am positive that it is illegal. The only alternatives, for those in wheelchairs, is to either use the grass (dangerous), or use the street (very dangerous). I am trying to build a case against these neighbors, for the sole purpose of making them cease this dangerous activity, and actually use common courtesy with regard to others. Previously, I've spoken with a few other neighbors, who have agreed with me that, regardless of the fact that the owner of the vehicle may not be at fault for a parking spot possibly being too short, it is definitely not at all the handicapped person's fault that the vehicle owner purchased such a large vehicle, and failed to find adequate parking. I have attached a photo of just one example of the many inconsiderate vehicle owners who I have as neighbors.
Ford Pickup blocking sidewalk access.
Comment: Are there any handicapped people that are actually affected by this or this is more a theoretical question ?
Answer: There is no state law that addresses blocking sidewalks: the closest that you can come are the rules against parking in or obstructing designated handicapped parking spaces. Sidewalks are generally within the purview of local government. Again there is nothing relevant that addresses parking. There is code (a chapter) that addresses sidewalks, but those ordinances pertain to a property owner's obligation to fix a sidewalk that they break, the snow-shoveling law, and so on -- nothing that prohibits blocking sidewalks.
Federal Way law defines "sidewalk" as

any hard-surfaced walkways within a right-of-way between the portion
  of the road designed or ordinarily used for vehicular travel and the
  adjacent property line, intended for the use of, or ordinarily used
  by, pedestrians or bicycles, including driveways.

We cannot judge from the limited details in the picture, but it appears that this is not a "sidewalk" in the legal sense. It looks like a paved walkway on private property – it does not meet the physical standards of city sidewalks (it is well below the minimum 5 ft. width standard). If this is private property, that gives you a simple solution: approach the property owner with an alternative proposal. Alternatively, you could consider whether the complex has adequately required with federal, state and local law regarding handicap access. It is not the vehicle owner's fault that the sidewalk is too narrow and not up to code.
Answer: Illegal?  Not at the state level.  The law does prohibit parking on sidewalks, although it could be argued that what the truck in the picture is doing doesn't meet the definition of "on".
RCW 46.61.570:

(1) Except when necessary to avoid conflict with other traffic, or in compliance with law or the directions of a police officer or official traffic control device, no person shall:
(a) Stop, stand, or park a vehicle:
(ii) On a sidewalk or street planting strip;

But the law says that's not a sidewalk.  It's adjacent to a parking lot, not a roadway or public highway.
RCW 46.04.540:

"Sidewalk" means that property between the curb lines or the lateral lines of a roadway and the adjacent property, set aside and intended for the use of pedestrians or such portion of private property parallel and in proximity to a public highway and dedicated to use by pedestrians.


Bitcoin price oracle

Question: Are there any oracles available for Bitcoin price? I'd like to do a currency conversion math inside the smart contract code.
Answer: Thomas from Oraclize here.
One simple yet quite secure way to get a Bitcoin reference price into your contract is to use existing exchanges as datasources thanks to their APIs. I suppose here that what you want is BTCUSD, if it was BTCETH instead than minor code changes are required but the same reasoning applies.
Doing that in Solidity via Oraclize is trivial, I would suggest not to rely on a single exchange only, but for simplicity reasons the example that follows is using just one (Kraken).
I think the following code is self explanatory, but in case you have any questions feel free to ask here or via our support channels (gitter, email, ..).
<code>/*
   Kraken-based ETH/USD price ticker

   This contract keeps in storage an updated ETH/USD price,
   which is optionally updated every ~60 seconds.
*/

pragma solidity ^0.4.0;
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol";

contract KrakenPriceTicker is usingOraclize {

    uint public ETHUSD;

    event newOraclizeQuery(string description);
    event newKrakenPriceTicker(string price);

    function KrakenPriceTicker() {
        // FIXME: enable oraclize_setProof is production
        // oraclize_setProof(proofType_TLSNotary | proofStorage_IPFS);
        update(0);
    }

    function __callback(bytes32 myid, string result, bytes proof) {
        if (msg.sender != oraclize_cbAddress()) throw;
        newKrakenPriceTicker(result);
        ETHUSD = parseInt(result, 2); // save it in storage as $ cents
        // do something with ETHUSD
        // update(60); // FIXME: comment this out to enable recursive price updates
    }

    function update(uint delay) payable {
        if (oraclize_getPrice("URL") > this.balance) {
            newOraclizeQuery("Oraclize query was NOT sent, please add some ETH to cover for the query fee");
        } else {
            newOraclizeQuery("Oraclize query was sent, standing by for the answer..");
            oraclize_query(delay, "URL", "json(https://api.kraken.com/0/public/Ticker?pair=ETHUSD).result.XETHZUSD.c.0");
        }
    }

}
</code>
You can see this in action here thanks to the Oraclize browser-solidity integration, just click on the link and click on the contract "Create" button on the panel you find on the right!
Comment: What additional exchanges do you recommend? And do you recommend taking a median value? Or, alternatively, say the highest ask (if buying) or lowest bid (if selling)?
Comment: At that link, I don't see a "create" button on the panel to the right. I only see several error messages.
Answer: Just adding an updated answer here since this question comes up on searches a lot.  You have three options for the BTC/USD: wbtc/usdc uni pool, a LINK contract that puts it on chain, or Tellor which allows you to request that an update (or stake and update it yourself)
Here's an example with Tellor that pulls the BTC price: https://github.com/tellor-io/sampleUsingTellor
Comment: Moving the correct answer check mark, as the old answer is from the prehistory of Ethereum.

Bitcoin price oracle


Please get rid of daily reputation limit

Question: Please get rid of daily reputation limit, if not on SO, then at least on MSE. On SO I can at least see both sides of the argument, but on MSE the cap seems a bit useless. Let the active members of the community flourish here.
Comment: or at least raise it, I guess.
Comment: I can easily raise it here, but this question has bifurcated into two questions -- whether the rep cap is GOOD or GOOD ON THIS SPECIFIC SITE.
Comment: Seems like Jon Skeet has done pretty well already, lol.
Comment: If we got rid of the rep cap, Jon Skeet would soon have enough rep to single handedly own all of SE
Answer: I don't know for sure whether I'd support a complete removal of the cap, but I'd at least like to see it discussed. I'm still in favour of a per-post cap rather than a daily cap, personally. That way you don't get oodles of points for trivial posts, but a large effort across many posts would reap appropriate rewards.
I totally agree that on Meta it makes very little sense indeed, but I suspect that it would be awkward (with the current code base) to have a per-site reputation algorithm. It ought to be easily pluggable, but I would guess that the pluggability would have to be designed in from the start :)
Comment: I would argue that all activity on meta is somewhat trivial, and the measure thereof would be subjective at best.
Comment: I don't agree with the per-post cap idea. I have some posts I've put significant effort into where I've received a lot of votes. A per-post cap would encourage people just to go after all the low-hanging fruit (moreso).
Comment: I was wanting to suggest something along the same lines as Rich did, but I was also going to leave in the possibility for significantly raising that cap (perhaps 500 in a day).
Comment: I agree with cletus. I understand the idea of wanting the limit gained from answers such as mine from the Code Wedding Cake (which altogether I managed to gain 120 rep from and that' sit) but I have a feeling it would unfairly diminish the rep gains from legit answers that were worked on heavily.
Comment: @cletus: On the other hand, the answers I've received the *most* votes from have been trivial. There's often little correspondence between "working hard on an answer" and "lots of votes". It depends on the topic and the question visibility.
Comment: @Jon: I know what you mean, I've gotten 200 rep from suggesting to use "".equals(s) instead of s.equals("") in Java to avoid null pointer exceptions (don't ask me why!) but I think the potential benefit of good, long answers being justly rewarded outweighs that downside.
Comment: +1: "I'm still in favour of a per-post cap rather than a daily cap"
Comment: Making the cap site-specific may well be very much easier than having a different algorithm per site.
Comment: i also vote for per-post cap. I think that's much better
Comment: I think if they would make a limit of say 500 rep per answer, that's enough to give you credit for a good answer.
Comment: @litb - isn't 200 rep, a "nice answer" followed by a "good answer" and potentially "enlightened" and "guru" badges enough credit?
Comment: I think what is important to promote and incentivize, is the _quality_ of the answers on SO - not their popularity. I have seen many answers that are posted more as humorous remarks or rants against another answer. These sometimes get upvoted (and hence contribute rep) because they are appealing rather than helpful. One way to rebalance the incentive model IMO - would be to increase the reputation awarded for accepted answers, add additional reputation for upvotes on accepted answers, and have rep from accepting an answer ignore the daily cap.
Comment: Interesting idea - not that it would apply to me.
Comment: @LBushkin: Interesting idea... although it would mean the difference between an accepted answer and an unaccepted-though-equally-good answer would be *hundreds* of rep points...
Comment: @JonSkeet - The reputation difference already is significant - because accepted answers tend to get "posthumous" (can't think of a better term here) upvotes - and the equally good answers tend to stagnate. I see your point though - perhaps there should be a point of diminishing returns for upvotes on accepted answers. Alternatively, you could use thresholding - so that the first 10 upvotes on an accepted answer add X rep, the next 90 add a little less, the next 900 add even less, etc.
Answer: Agreed. Between the inconsistencies in the rep limit being calculated over a daily basis (thanks to the differences in local vs. server time), and the inconsistencies that other users such as Cletus have pointed out previously, I think it is losing its popularity (if it ever really had any). It is a serious demotivator for very active users who contribute a lot to the site.
I know I and others have hit our rep limit early in the day and then completely stopped activity for the day, which cuts down the number of people who are willing to answer a question.
As I mentioned in another comment, I am also a strong advocate of raising the rep limit to something more reasonable for super-active users, such as 500 rep in a day -- if you aren't going to bother getting rid of it.
Comment: When I hit my rep cap I stop answering questions. Sometimes i answer just because the person seems to really need help but usually I'm done for the day.
Comment: @Olafur: Interesting... I don't work that way (I go for accepted answers) but I wonder how many do...
Comment: Jon Skeet: With your level of activity, accepted answers are damn near the only way you can accumulate points since I imagine your rep limit gets wiped out a lot by older answers as well.
Comment: @TheTXI: Number of accepted answers (and bounty) is certainly all that separates most of the top few users, I suspect. Oh, and how active one chooses to be over the weekend. I suspect quite a few of the top users hit the cap on almost every weekday.
Comment: In my pre 2000 rep days I felt sorry for the lost upvotes. My aim was to get the edit ability so I could reformat things and not wait for someone to come along. My worst experience was on one end of a day: I answered and the next day I noticed the ton of upvotes - sadly all ignored due the cap. I think a degressive limit could help things out.
Comment: Yes, I suspect that happens. It's an unfortunate form of positive feedback loop. One day I may ask Jeff for permission to create another user to post as (on different questions) and see whether I find it harder to get rep. On the other hand, I remember going past the rep cap on my first full day on SO, so it isn't *just* that :)
Comment: There are just little tricks you use to get reputation cap. For example use the new questions list. Answer with a short version and then spend the 5 minute period to refine the answer, link it and find references.
Comment: I usually stop after I hit the rep cap as well.  I strongly feel that the accepted answer functionality should be emphasized more than it is, and have commented in the past on this.  However, removing the rep cap will lead to a greater disparity in technical vs. non-technical reputation farming, which I think is a very bad thing.
Comment: Jon Skeet: Oh I have no doubt (I have had stretches where I capped out every day save weekends for three weeks straight myself before losing interest some along the way). With this meta board, I have been regularly capping out after 2 hours of activity in the morning. If it wasn't for the rep cap right now, myself (and probably many others) would already be close to the 1,500-2,000 rep level.
Comment: @jon: Do you think you're favored when choosing among the answers to accept ? :-) [ Ie: I had my question answered by Jon, yeay ! ]
Comment: Steve: I wouldn't doubt it. When you see someone with a massive rep, you will more often than not put your trust in that user (which is sort of the idea of reputation) to believe it is the right answer.
Comment: When you know those tricks, it's easy to get rep cap if you're active during one day.
Answer: Please don't get rid of the rep cap on SO.com. Here is another story.
The rep cap on SO.com is good. It acts as a hint to limit yourself to a certain amount of time on the site each day. Of course you can stay as long as you like but the daily cap is a gentle hint that maybe you should be doing something else for awhile.
What I would like however is some consistency with above-the-cap items (accepted answers, bounties, etc) such that whether they were above the cap or not wasn't a timing issue with whether you happened to be at or above the daily cap at the time they happened.
Comment: I completely agree that "accepted answers" and "bounties" should not count toward the cap whenever they're awarded. It's funny that when you've got 190 rep and a guy accepts and upvotes your answer you get less rep than if he had upvoted then accepted. It looks like a bug in the SO rep strategy.
Comment: I agree with this. Maybe we need a special type of "methodone" reputation to wean people off the harder stuff... :)
Comment: @Shog9 - no, this is a metadone site
Comment: +1 I agree on both counts. (By the way, you seem to be maxed out--why are you still here?)
Comment: @Jeff: isn't that... *this* site?
Comment: @Mehrdad: exactly.
Comment: Would also be funny if someone offered a bounty of 500 rep and accepts your answer while you've already earned 200 rep that day.
Comment: @rightfold Then you've got 715 rep. Bounties and accepted answers don't count toward the cap.
Answer: [I know SO isn't only about reputation but, putting that asside for a moment...]
I am for changing the "daily cap" to a "per-message cap." Here's why...
It may make no ultimate difference in the reputation scores (Jeff Atwood said he tested it and it made no difference) but, since I have been a "top-scoring" user on meta.SO (temporarily, I'm sure), I can see how per-day limits might provide a diminishing incentive to contribute for some.
I asked a few vaguely interesting questions (on meta.SO) which have pretty much maxed out my daily rep thereafter. I continue contributing but, strictly from a reputation-as-incentive point of view, why bother? A few even-mildly good posts essentially "cancels out" anything else you contribute to the site for some period of time.
I can only imagine what someone who continually contributes top contents feels like. Jon Skeet could flat-out leave this site for months and still have one of the fastest growing reputations on the system. He's earned it.
But, in the interest of rewarding someone's on-going contribution to the system, maybe the rep from a single post should max-out at some point, while a continuing contribution to the site is rewarded.
Just a thought.
Comment: Which brings up an interesting corollary question - are votes past a certain point meaningless?
Answer: The only good I can speak of the Cap is that when I hit it...I often times am less-distracted by SO throughout the rest of the day :)
Answer: This is one of the few times I agree with Rich B :).
I seem to remember the daily cap limit was intended to prevent runaway rep totals, but to be honest, even with the rep cap it's already happened. Just look at the first page of the user list.
Either the daily cap needs a bump to say 500 or 1000 or just removed. It seems a bit unfair that new users to SO who are contributing great answers are hobbled by the 200 pt daily limit with no real chance of catching up with the high scoring beta crowd.
Whilst rep isn't the be all and end all, it is nice to see those numbers going up. And as some others have said, once you hit the rep cap it's a bit of a disincentive to spend a proper amount of time on a particularly gnarly question.
Comment: I hardly think increasing rep cap will benefit low-rep users. I think it'll work in the opposite way.
Comment: @mmyers: A quick calculation on the data dump before made me guess at about 220K, but I may well have been misinterpreting the data...
Comment: Actually, Jon Skeet & Marc Gravel joined after the beta period. But you're right, when they both get 200+ rep a day, there's no chance of catching up.
Comment: You do realize that if there were no rep limit, Jon Skeet would be somewhere around 150k now, right?
Comment: I was just guessing based on upvotes in the c# and java tags. I'm sure you've answered many questions with neither tag.
Comment: John: Yep, based on the June data-dump, you would have had 230,084 reputation were it not for the rep cap..
Answer: Personally I would suggest perhaps a sliding scale of rep cap rather than a single bump. As has been mentioned its meant to be about runaway totals. So it should probably start low that way you have to show a certain commitment of time to the site as well as "knowledge" before the site "trusts you" more. After all that was one of the primary purposes of the rep anyway.
I wonder how valuable the cap is after the user has passed 10k, unless the dev team plans to add more trusted access to even higher reps.
Or perhaps if the cap was removed after 10k John Skeet would have overflowed the counter on his account record :-)
Answer: Keep the limit.  That said, one of the happiest times of my day is when my SO rep. resets.  (How sad is that? :)
Comment: Think yourself lucky you're not in the UK - it's 1am when my limit resets. 8-(


ipfw - purpose of outgoing keep-state?

Question: I'm looking over the ipfw rules for our webserver and it struck me that we use check/keep-state on all outgoing traffic. We only have a handful ports open in both directions. We dont have much outgoing traffic, and 99% of it is on port 80 (PHP/CURL for example). There could be a potential risk of filling up the state table, so i'm thinking maybe its unnecessary to use keep-state at all. We dont use it on ingoing (for obvious reasons).
What in general is the purpose of using out keep-state?
Answer: Outgoing keep-state opens the ports dynamically for replies to outgoing traffic. These reply packets could come back on any port so keep-state reduces the exposure while opening the random ports used from the external service allowing the reply packets back in. In special cases a server could run without keep-state, no externally bound traffic, but in practice most systems use external services. A multi-tiered system could be setup to reply on specific ports but the default configuration for most general use services is; known port inbound - random port outbound. DNS, outbound email, remote logging, ping, load balance or watchdog heartbeats, pager/cell phone notifications, some or all are common outbound traffic on servers that "don't have outbound traffic".

ipfw - purpose of outgoing keep-state?


Is it beneficial to publish papers not related to your primary research field?

Question: I know there is nothing preventing me from publishing an article in a different research field, but is it beneficial other than for satisfying my own interest/curiosity? Presumably these may be added to my CV, and possibly included for funding applications?
Comment: I stopped reading after "*Is it beneficial to publish papers*", since anything after that is irrelevant and the answer will be yes.
Comment: Here is a [closely related question from cstheory.SE](http://cstheory.stackexchange.com/q/8317/1037)
Comment: You've asked about publishing a paper in a different field, and others have answered that question. However, you should also think about the effort to publish in another field: will you take too much time to gain background compared to the output?
Answer: I'm honestly surprised at the question.  "Primary" does not mean "only"!
If it's a good paper, then of course you should publish it.  Aside from the obvious personal benefits of making you look more diverse, increasing your visibility in another field, and possibly creating opportunities for future collaboration, you're doing what research is for: expanding human knowledge.  And if it's not a good paper, then of course you shouldn't publish it, even if it is in your primary field.
But to echo shan23's comment: Don't use grants in area X to fund research in area Y.
Comment: Thanks for the reply. This is good to know, and I think I will pursue my publication idea.
Answer: I'd say it depends, on how tangential the research field is from your primary focus, and how you came to work on that field. Researchers working on interdisciplinary fields often have this kind of a scenario (which I would label as an advantageous one) - it would help you in case you ever wanted to change your research focus, as the grant agencies could see from your publication track record that you have done publishable research on more than one research field.
But, it might not be a very good idea to use funds/grants from your primary research focus for working on a different field. You should be able to show that these publications were in addition to the work that you published in your principal research area.
Comment: Thank you as well for your input. I agree also about not funding X with funds from Y, and that they should be independent efforts.
Answer: This is an interesting question. I recently was interviewed for a job and one of the interviewers asked me about a couple of papers which were clearly outside of my field of specialization. She wanted to know 'what these papers say about me and my professional capacity'. I was not prepared... and I said something along the lines of that ... I observe everything and try to identify problems and give solutions, even in a field that I am not directly studying... which, by the way, is my true reason to venture outside of my field. Now, looking at some of the responses maybe I was not wrong to go out of my field and produce some publications.


Scarface Tony Montana quote meaning

Question: During Scarface Tony Montana says:

You know what capitalism is? Getting f***ed!

What did Tony mean by this? And in what context?
Comment: I'm not following the VtC as Too Broad... This is asking for the meaning behind one piece of dialog, as referenced by the character making it. How on Earth is this too broad?
Comment: @CGCampbell Me neither but fortunately it is out of close vote review queue.
Answer: Two scenes before the one where he makes that quote, Tony Montana had just met with his Banker to discuss the fees he was paying them to launder his money. Tony was making "ten million a month" and the Banker told him they would have to raise their rates, because of 'stockholders' and 'feds'. The Bank was charging

(Xl Rev. l/18/83 151-B  CONTINUED BANKER  (Cont'd)
Tony, we   got   stockholders,   we   gotta go  ten  percent  on  the first  twelve million; that's  in  denominations  of twenty. We'll  go  eight percent  on your  ten  dollar  bills  and  six  points on  your  fives.

Remember that the "ten million a month" Tony refers to is illicit drug money. It could not be reported to the government. So it had to be laundered to 'clean' it and make it usable income. This was what the Banker was charging the (exorbitant) fees for.
Then, two scenes later, Tony is sitting in his tub, talking to Manny, and watches a Bank commercial

158
INT. TONY'S MANSION - BATHROOM -NIGHT - CLOSE ON (Xl TELEVISION   COMMERCIAL
A   television   spot   for   Florida   Security   Trust   (or   Miami
(Xl Security   Trust   or   Dade   Security   Trust   depending   on   legal
options). A  respectable  business-type  walks  along  the sidewalk with a  nascent downtown Miami as a backdrop.
Skyscrapers, glinting glass, cranes....
BANK SPOKESMAN
Here at Florida Security Trust we've been  putting  your  money  to work
for a better   America. We've been   around   for seventy-five years. We'll  be  here tomorrow.
A logo  for  the  firm  over  with  the  reminder  "Since  1907."

and then

TONY
You  know  what  capitalism  is  -- Getting fucked

From Tony's perspective, Capitalism is where the Banker holds all of the cards and he has to pay, to him, a large sum, just to be able to use, or spend, his hard earned money.
Answer: Tony is saying that, in a Capitalist system, one cannot succeed by being nice and polite to the competition, compassionate or generous to one's customers, or expect favours from one's suppliers.  Everyone along the supply and demand chain are looking out for themselves and, in the process, someone is always getting fwk'd.
Tony's main motivations, throughout the movie, are to:

not be the one being fwk'd
retaliate against anyone who he feels fwk'd with him
and fwk everyone else while claiming he isn't being unreasonable in doing so...

[..as he just wants the money to get the power to chose his own girlfriend... but that's a different quote, "In this country, you gotta make the money first. Then when you get the money, you get the power. Then when you get the power, then you get the women" and ET video].
Answer: Quite simply, Capitalism is you (the Capitalist) doing all the hard (and in Montana's case, dangerous) work, while the government/banks take a huge chunk of the money you've made.  Remember, the banks were laundering the money for a price, and then on top of that Montana still had to pay taxes.  He was getting hit on all ends, all while literally risking his life on a daily basis to make that money.

Scarface Tony Montana quote meaning


Why is card counting considered illegal in Blackjack?

Question: As far as I can see, a card counter is still subject to the same mechanic as any other players, but they are able to perform better then most people within these confines. So why is card counting a justification for casinos to kick people out? Obviously, a card counter will cost them money, but if that is the only justification, then it's like the casino is cheating- they only allow sucky players to play. If you are too good you get thrown out. Is that all there is to it, or is there a valid gameplay justification for this?
Comment: Actually, it is not the "mechanic," that makes for card counting. What card counters (mostly) do is to vary their bet sizes in their own favor. See my answer below.
Comment: Well, the very odds of the game are per se in the casino's favour -- it turns out they're not a charity :) If you want to play a fair game, simply don't go to a casino in the first place...
Comment: @NeilCoffey: What you said is basically true, except that the best players can beat the game by varying their bets at appropriate times.
Comment: @TomAu But isn't that essentially if "the appropriate times" are derived by "card counting" or methods that the casino decides "aren't fair" (on their scheme of making a living off an unfair game)?
Comment: @TomAu (Or by "beat the game" do you mean beat the other players? I was under the impression that if all players play by what the casino deems are the accepted rules, then statistically, the players collectively are essentially bound to lose to the house.)
Comment: @NeilCoffey: POKER is played by players against each other, with the house playing a "neutral" (dealing) role. Blackjack is played by all players against the house. The house beats "most," and then throws out the one (card counter) it can't beat.
Answer: Card counting isn't considered illegal. Casinos have the right to deny service to anyone, and of makes sense to deny players from playing a game in which they have an advantage versus the house. This isn't  cheating in any sense of the word. 994 P.2d 1151 (2000) CHEN v. NEVADA STATE GAMING CONTROL BOARD and Monte Carlo Resort & Casino:

This case presents a conflict between two inconsistent public policies that have developed over the years with regard to the gaming industry. On one hand, gaming establishments have the unquestioned right to protect themselves against so-called "card counters" who have developed expertise in the game of "blackjack" ("twenty-one"). On the other hand, neither card counting nor the use of a legal subterfuge such as a disguise to gain access to this table game is illegal under Nevada law.

cheat transitive verb

1 : to deprive of something valuable by the use of deceit or fraud
2 : to influence or lead by deceit, trick, or artifice
3 : to elude or thwart by or as if by outwitting  intransitive verb
1 a : to practice fraud or trickery b : to violate rules dishonestly   [...]
Comment: @TimLymington: If casinos were "even money" against a handful of "best" players and favorites against everyone else, they'd be ok.
Comment: @TomAu well that's how many policies are created
Comment: I'm still not convinced. "gaming establishments have the unquestioned right to protect themselves against those who have developed expertise in the game" So basically you are not allowed to become skilled in the game. Casinos pretend that they let you gamble in a game that has certain rules, but if you use skill to win, then you are not allowed to play, even if you play within the confines of those rules. Sounds like fraud to me.
Comment: @EpsilonVector actually, according to Wikipedia, casinos in Atlantic city can't kick you out for skilled play
Comment: @EpsilonVector: If casinos took bets where they didn't have an edge, they'd go out of business. (Yes, even if the game was precisely even; the mathematics is interesting).
Comment: @SamIam: That's because Kenny Uston fought and won a state court case against them. But they can shuffle up after every deal.
Comment: @EpsilonVector: Basically, it's not *illegal*, but they can still *kick you out* for it.
Answer: Just a little addition to the previous answer: Imagine you have the opportunity to play blackjack against a thousand people. You have a few advantages, but also have to play by strict and predictable conventions, but the thousand can play in any manner they choose.
You also know that one of those thousand is capable of card-counting. You wouldn't risk your money betting against someone with such an advantage would you? You'd stick with the odds, and play only the other 999. A perfectly sensible and logical position, which is, in essence, the same position the casino takes.
Comment: I *believe* that if you have won it legally, they cannot take it back. (Only if you've used a counting device, or properly cheated etc, but then they also throw you in jail after taking back the money :) ) Of course, there's nothing to say you aren't going to suffer a few accidents "falling down the stairs" on your way out of the casino....
Comment: OK this actually makes sense. As a slightly off topic followup, do casinos typically let you keep what you won if they do catch you card counting? They may have the right to choose not to play with you, but the games in which they did play with you should be considered legitimate, right?
Answer: Card counting ISN'T illegal. (Unless you use a "device" such as a computer to do so in Nevada, which is a felony under Nevada law.)
Card counting is frowned upon because it violates the UNWRITTEN "law" (that the casino is supposed to have the edge). From the CASINO's point of view, it is a case of "if this isn't illegal, it ought to be." Hence they take measures such as barring, or harassing card counters, which go to the border (and sometimes beyond) the law. But Nevada courts do tend to side with the casinos for economic reasons.
If a player played "Basic" (optimal) strategy, and "flat bet," (bet the same on every hand), the casino would have an edge of about 1%. What card counters do is to watch for a handful of situations that come up occasionally, where the player is favored. Then they "jump" their bets by five or ten times to take advantage of these situations, and bet a "basic" unit at other times, shifting the odds in their favor.
A variation of this is "team" play, whereby a team of counters will "spread" among the tables, watching for favorable situations, and making a minimum bet of say, $10 a hand. This is a form of "trolling." When the cards get "good," they will signal a well dressed team mate called a "big player" to come to "their" table, and make "outsized" bets of $50 or $100, or even $500-$1000 (these situations are rare enough that you will seldom have two "good" tables at a time). This strategy calls for the big player to "table hop" in a seemingly random fashion (but actually based on signals from his teammates).
Needless to say, "trolling" and "table hopping," whether or not for the purpose of making money, while not illegal, are socially gauche. So casinos will eject players for that kind of behavior alone, whether or not connected with card counting. (And the assumption is that most people would not engage in that kind of behavior unless they are card counting.)
Card counter Kenny Uston won a court case in New Jersey that prohibits Atlantic City casinos from barring or harassing card counters. They are allowed to take "defensive" measures such as shuffling up after every deal.
Comment: @TheChaz2.0: The historical house edge is 4-5 percent against the "average Joe" (who plays poorly). It is some fraction of 1 percent (depending on house rules) against a "skilled" player who plays optimally but doesn't vary his bets based on card-counting. That's just a theoretical construct. It is negative against a skilled card counter who varies his bets. So "bet management" is a key skill in the game.
Comment: I heard that the house edge on a person playing by basic strategy was much lower than that; an eight-deck game with no additional rules benefiting the player (like hitting split aces or dealer must hit soft 17) has a house edge of about .65%. This is further reduced with fewer decks in the shoe. But, the house still wins the longer you sit; you're expecting to lose a nickel a hand betting $10. As entertainment goes, not bad.
Comment: @KeithS: The house does have an advantage over the player on PLAYING. But card counters overcome this advantage by betting big on certain "good" hands and betting small on (most other) "bad" ones. That's the point of counting cards. Meaning that if card counters were forced to "flat bet," they would lose.
Comment: I understand that. My point was that you said there was a 1% house edge against a player using only basic strategy, which is a little high.
Comment: @KeithS: It used to be more like 0.6%. Then the casinos reduced the payouts on blackjack from 3 to 2 to 4 to 3, in some cases even 5 to 4, which took their edge above 1%.
Comment: This is probably a silly question (and I realize that I'm a year late to the party!)... but *where are these numbers coming from*? Somehow, I have come to believe that the house edge is like 4-5%, which is obviously way different than what you two are saying!
Answer: Card counters exploit a flaw in the game implementation which is not actually part of the rules of the game. The rules of blackjack say nothing about dealing multiple hands from the same pre-shuffled stack - but that's exactly what makes card counting possible.
This flaw (and thus card counting) can actually be neutralized in two ways:

Shuffling manually after each hand - but that slows down the game and thus reduces casino winnings on the game that already gives them a rather small house edge. Not gonna happen.
Continuous shuffling machines - but players and dealers hate those, claim that they destroy the atmosphere, etc. Some casinos use them, but most seem to prefer making a fuss about card counters.


Tomcat 6 path issue on Linux Debian

Question: I'm facing an anoying issue on Linux/Debian Tomcat configuration:
I've set up path variables, but when I try to start or shutdown Tomcat nothing happens. Log is empty and the following appears:
<code>root@debian:/var/tomcat/bin# ./version.sh
Using CATALINA_BASE:   /var/tomcat
Using CATALINA_HOME:   /var/tomcat
Using CATALINA_TMPDIR: /var/tomcat/temp
Using JRE_HOME:        /usr/lib/jdk/bin
Using CLASSPATH:       /var/tomcat/bin/bootstrap.jar
./catalina.sh: 476: ./catalina.sh: /usr/lib/jdk/bin/bin/java: not found
</code>
As seen, the last line shows a possible missconfigured environment variable. But I've reviewed installation steps and I couldn't find it. Any idea on what should solve the problem?
Tomcat is version 6 (in directory /var/tomcat). JDK is 1.7.0 update 25 (latest) (in directory /usr/lib/jdk/).
Thanks!
Answer: Problem was in exporting JAVA_HOME:
Rather /usr/lib/jdk/bin it should be only /usr/lib/jdk.
Everything is working fine now. Hope it would be usefull to sb.

Tomcat 6 path issue on Linux Debian