Why is randomness a problem? (i.e. why do we care about derandomization?)

Question: I'm reading Aaronson's survey on P vs. NP, and I've come to understand that in CS theory, people really care about derandomization results like P vs. BPP etc. My question is, what's the problem with randomness? If your algorithm is known to only require a polynomial number of random bits, then simply go ask a physicist to get the bits for you, which isn't a problem since you only need a tractable number of them, and then write them on the Turing machine tape and you're good! The goal of complexity theory is to figure out what we can compute in this universe, right? Well, this universe has randomness, right? So why do we care about derandomization? Theoretical and practical answers are both welcome.
Answer: Complexity theory is a mathematical theory which aims at addressing one shortcoming of computability theory, namely, it takes into account the use of resources. While it is true that in its early days it aimed to capture the notion of "practical computation" (even particular flavors such as parallel computation, supposedly captured by NC), it has since drifted apart and taken off from reality. As an example you can take higher steps on the polynomial hierarchy, higher complexity classes such as PSPACE, classes defined using alternation, and so on. Indeed, much of this material dates to the early days of complexity theory, showing that it lost touch with reality quite quickly.
Traditionally the two most important resources studied by complexity theory are time and space. However, other resources have also interested complexity theorists, for example alternation and randomness (not to mention the world of circuit complexity). Philosophically speaking, it is a fascinating question whether randomness dramatically reduces the computation time of some problems, or whether the gain is only polynomial (as hinted by the conjecture P=BPP). However, it does not seem to have any practical relevance, though not for the reason you mention. In practice there is no need for actual physical randomness (other than for cryptographic purposes), and pseudorandom number generators work well enough.
Comment: I would add, though, that practically speaking in those cases "true" randomness is needed, it is actually useful to minimize it, as collecting entropy is relatively slow.
Answer: I'm not a complexity theory specialist, but I think there are somewhat practical reasons to be interested in this question.

As noted by Derek Elkins, actually producing "physical" random numbers is quite difficult, and producing the right distribution with the right amount of entropy at sufficient speed is hard enough to justify web sites and custom hardware. It would be nice to know this can be avoided, at least in theory.
In classical physics, there is no "true" randomness, just the (deterministic) physical laws and the initial conditions of the system (or the whole universe, I guess). It's an interesting philosophical question whether this randomness is equivalent to true randomness in some sense. This question finds answers in the fields of chaos theory, the theory of ergodic processes and in computer science, in questions like P vs BPP.
The question of whether we can accurately simulate randomness in P vs BPP seems very related to the question of whether we can truly do encryption, say, the existence of trapdoor or one-way functions. In particular, the ability to deterministically produce bits that "look random" enough for any particular algorithm seems like a good prerequisite to finding a cryptographic function which encrypts a given message into a stream of bits indistinguishable from random bits, if the key is not known. So solving the very hard question of existence of one-way functions should require solving P vs BPP along the way.
Comment: 1. Doesn't random.org actually demonstrate that producing physical random numbers is so fast that one guy is able to make enough of them to supply the whole internet? 2. Our current best model of atomic physics is quantum mechanics, which is intrinsically random. Classical physics can't even begin to explain things like black body radiation or the photoelectric effect.
Comment: @DavidRicherby: 1. the numbers suggest 165.2 giga*bits* over 9 years which doesn't seem like that much (certainly not enough for the whole internet, say if they were being used as nonces for crypto purposes). 2. I think the jury's still somewhat out for QM and "true randomness" (though afaik, QM does seem to be a source of purely probabilistic information). The question for classical mechanics is still of interest though, since as far as computing and "everyday" physics goes, we live in a classical world.


Is it possible to import all files from a uploads DIR into WP media, retaining paths to the files

Question: So i have a uploads DIR from a WP install.  I want to migrate that to my new site, retaining all the old paths  - so if something is in 2011/08  that path is kept and the file registered in the media section of WP admin
Comment: Do you need to migrate ONLY the attachments?
Answer: If the images are attached to posts, when you export/import your WP data, there's a happy checkbox for pulling in the images.
If you just copied over the DB and all, just FTP the images over and they're fine.


Does the MacBook Air Support 5.1 Surround Sound

Question: The title pretty much says it all.  I have a 13" version of the newest-generation MBA.  Can I get 5.1 surround sound?  If so, do I have to do anything special to enable it?
Answer: Not natively, no. The headphone jack is a standard TRS with no optical component.
You can buy a USB sound "card" with 5.1 audio output such as this one:
http://www.amazon.com/Zalman-ZM-RSSC-External-Sound-Card/dp/B0001OZ2K8
That's just the first one I found, so a little more market research might be in order. Something similar to it should get the job done though.
Comment: To elaborate the computer will support surround sound, just has no way to output it. You will need a Thunderbolt to HDMI adapter or something like what @eyemyth linked to.
Answer: You can also get 5.1 out with an HDMI cable and a suitable HDMI switch with optical or other 5.1 out.  Note that running HDMI through a TV (or even possibly certain receivers) likely won't work, because of anti-piracy hardware that restricts output audio quality.  There are a number of cheap switches that people have done this with.  I don't want to suggest anything specific as I haven't used them myself.  You can also get 5.1 audio out from an Airport Express's audio jack.  Unfortunately the Airport Extreme has no audio out (at least not the model I have).


How can I save settings on a Live USB?

Question: So I have an Ubuntu 11.10 Live USB disk. I've noticed that my settings never get saved. Every time I reboot while in my Live USB and then boot back into it, all my settings and [un]installed programs revert back to default after the reboot. How can I set some sort of persistence on settings on a Live USB?
Answer: I actually just now helped one friend over skype to do that with Lubuntu and ive put for him 2y ago one persistant xUbuntu Live USB.
U can make it to be as Live so u can still use it as installation but with persistance witch means it saves files to persistance file witch cant be seenable from windows. Also Live means it will not change thouse 700mb of usb stick even after updates to remain original and updates will be using persitance file part.
OR u can install ubuntu on USB but then in partitioning step use manual and use all usb as system / partition and dont put swap couse swap will be automatically put in automatic installation but u dont need usb to be all the time using swap and u dont need hibernation on usb right?
So 1st step
From computer .. from what else.. go to http://www.ubuntu.com/download/ubuntu/download and download an actual Ubuntu image and i recommend better using 10.04 LTS couse thats lighter and faster and more understandable or even better i recommend 10.04.03 netbook remix couse thats even more faster.
==PRepearing Live USB with installation possibility and persistance file==
If ull use Ubuntu to make USB then System > Administration > Startup Disk Creator
Browse to desired downloaded Ubuntu file and if want u can erase USB from Startup Disk Creator and choose Persitance option and slide to use as much as want.
Press make and in process enter 3 times password.
==Installing on USB==
If u dont need option to be able to later infect some other computers with ubuntu then u can dont need live usb but u can just install Ubuntu on usb. To do that u can use LiveCD/USB and install on USB and dont put swap partition on it. Since choosing automatically to install Ubuntu on chosen partition will make swap file u need to choose Manual installation and format whole USB to be just partition / and done. It will warn that u didnt put swap but since its waste of space and might not anyways be able to work as much as fast possible if swap is beeing used and that means written to USB swap partition as virtual memory witch slows work more then we dont need it.
theres also methods in https://wiki.ubuntu.com/LiveUsbPendrivePersistent
Comment: When you write "Installing on USB", I think you mean "Installing from USB to HDD", right?
Comment: 2016 -  Startup Disk Creator no longer makes Persistent USB Drives, Try mkusb it will make a flash drive with persistence only limited by USB disk size.
Answer: Try installing ubuntu with unetbootin, which allows you to set aside space on your usb drive for persistance.

Just make sure to enter a value into the "Space used to preserve files across reboots" field.
Further instructions can be found here, but I doubt you will need them.

How can I save settings on a Live USB?


eCommerce platform with Bitcoin support?

Question: I'm looking for an eCommerce solution that has the following specs:

Self-hosted
Written in Node.js, or PHP/HTML (not Python or Ruby)
Supports simple theming, addons, and different product types
Has simple installation
Has a messaging system
Supports custom home page
Escrow support

For the Bitcoin part, there's a huge requirement: no external payment processors. I wish to set up an anonymous marketplace where people can purchase (digital) goods without giving up their anonimity.
For this I thought of two possible systems:

Have a central BTC wallet, and have addresses generated for users to send in their Bitcoin (which appears like store credit, from what they can do the purchases, and request it to be sent back).
Have a central BTC wallet, but generate addresses for each purchase. Monitor that address, and when the BTC arrives (either in one or in parts), mark the purchase paid (like a credit card purchase).

It would be important to generate the addresses purchase or user-specific.
Currently the only solution I found was to use a WordPress plugin by Bitcoin Way. But I'd rather not use WordPress as it could have a backdoor (like it had in the past) which could de-anonymize the users.
Any suggestions?
Answer: I suggest you have a look at https://www.openbazaar.org/ We are now 2.5 years later so things have evolved most probably in the right direction for you.


Sign out of YouTube on iPhone video app uploader

Question: I uploaded a video to my YouTube account from a friend's iPhone.  Now I want to to sign out so that he can upload videos from his own account, but it's no longer prompting to login to a YouTube account or giving an option to log out, it's just leaving my account signed in.  Help?  Thanks.
Answer:
Start the YouTube app on the iPhone
Select ".../More" at the bottom right
Select "Sign out" at the top left
Answer: If you did it from the Camera Roll, I think you should go into the actual Youtube app on the phone and have him sign in with his/her account now, and I think that should fix it. Either that or what Iskra said
Answer: If you've upgraded to 7+ OS you can sign out in the share screen when you are in camera roll > click on a video to share > click on youtube > scroll down to the bottom > click on your account username > click on option to log out.
Answer: Youtube has changed recently. Now you have to go to Settings > Sign out.
To get to Settings, look in the upper left corner and hit the button that has 3 lines on top of each other (like this = but with 3 lines). If that button is not there, hit the back arrow enough times until it shows up.
Once you click that button you'll see Settings on the left pane.
Click it, then on the next screen click Sign Out.
I have no idea why Youtube is making it so hard to sign out but, now you know how.
Answer: That didn't work for me, that option wasn't visible on the app. Instead, I started the process of uploading a video again from camera roll then when in the upload window before you take it to next stage I scrolled down to where it says user account ( my email or user name), touch screened that and there was an option to sign out popped up :D
Answer: Go to settings and you should be able to find a log out option
Comment: Could you elaborate on where in settings this lies? The leading answer shows it in the … More tab of the app as opposed to settings.
Answer: I just deleted the app then redownloaded it


Stimulus Effect of the Minimum Wage

Question: In the question about the minimum wage found here, I have heard several times that an increase in the minimum wage can, as one of several competing effects, "boost the economy" by increasing the income of some workers. Under what conditions could this happen, if at all? Are there any papers (peer-reviewed journal articles) out there that make this claim?
Comment: To make this coherent, you'd have to explain why the "boost" is not offset by the decrease in income of other workers --- particularly since much of the burden of the implicit tax falls on people who shop at McDonald's and Wal-Mart, and might not look too different from the typical minimum wage worker.
Comment: Is this claim controversial?
Comment: @gerrit just have a look at http://economics.stackexchange.com/questions/429/what-is-the-economic-purpose-of-increasing-the-minimum-wage?lq=1 ;)
Answer: From the Chicago Federal Reserve:

Following a minimum wage hike, household income rises on average by about \$250 per quarter and spending by roughly \$700 per quarter for households with minimum wage workers. Most of the spending response is caused by a small number of households who purchase vehicles

http://www.chicagofed.org/digital_assets/publications/working_papers/2007/wp2007_23.pdf
Aaronson, D., S. Agarwal, and E. French  (2011): "The Spending and Debt Responses to Minimum Wage Increases" Federal Reserve Bank of Chicago Working Paper, WP 2007-23.
Comment: Spending increases almost three times more than income?
Comment: Sure. The spending increase is mostly vehicles, which people often need to take out a loan to purchase. Households (hopefully) won't take out a loan without a certain degree of confidence that it can be repaid. If someone is just below that threshold, then increasing their wage will push them over it, and so they'll take out a loan. Alternately, by increasing wage, you increase their incentive to find work, so a car becomes more valuable since it broadens work opportunity.
Comment: Thanks for the answer! I'll definitely look at this. A working paper from the fed is nice, but I was hoping for some paper published in a top 10 journal over the last couple of decades. I'm curious as to if there is some classic paper out there that codifies this idea.
Comment: This paper was published in American Economic Review, 2012 http://www.ingentaconnect.com/content/aea/aer/2012/00000102/00000007/art00001
Answer: To add a paper with a, in my opinion, better identification than cross-state fixed effects as added by charlotte's answer, here is Dube et al (2010 ReStat; paywall-free) - in my opinion the paper with the best identification and external validity out there.
They do first-difference in counties with different minimum wages and

find no adverse employment effects. We show that traditional approaches that do not account for local economic conditions tend to produce spurious negative effects due to spatial heterogeneities in employment trends that are unrelated tto minimum wage policies. Our findings are robust to allowing for long-term effects of minimum wage changes.

(emphasis mine). In contrast, they find that the elasticity of earnings (food sector) w.r.t. the minimum wages is consistently around $0.2$ for many different specifications.

Stimulus Effect of the Minimum Wage


Reasons for negative autocorrelation

Question: I am working with intraday stock prices. I have found that the autocorrelation between the returns is negative (significantly so, but the value is very small). I am aware of how to interpret negative correlations from a technical point of view, but what could be the real-life reasons for that?
Comment: As I commented under the accepted answer, it's not clear how universal/significant this effect is and what data frequency you use. I would imagine any kind of stable autocorrelation effect would've been exploited already. Tick by tick market orders series often shows positive autocorrelation as opposed to negative. any other level of data is somewhat aggregated and the effect of autocorrelation is suspicious. If I were you, I'd do the same analysis for a bunch of stocks and a set of days. If the stats on all these samples are significant, then there could really be something to discuss about.
Answer: Looking at transaction prices, they would occur at the market bid if the active part is a seller, and at the ask if the active part is a buyer. With a random flow of sellers and buyers, the price will bounce between the bid and ask prices, creating a negative autocorrelation in returns.
This penomenon is known as the bid-ask bounce, and has been discussed here in the follow up to this question on how to adjust for the bounce.
Comment: At tick level, this is not (necessarily) true. Market orders cluster -- it's often observed that buys are followed by buys and sells are followed by sells, possibly a result of execution. It's unclear what frequency, time range and stock name OP was looking at, nor was it clear what "significantly so, but the value is very small" means. For mid frequency data, this could be some kind of mean reversion.
Answer: Check the paper by Cont (2001). There is a stylized fact about it. Autocorrelation should be absent unless for very small time periods, such as intraday (5 in 5 minutes).
I don't think there's a really good explanation, since intraday stock prices follow a random walk, so negative autocorrelation is possible. Perhaps one could say that the performance of the company (financials) vs. the news about the company (speculation) can cause negative autocorrelation.
Answer: One possible reason for negative autocorrelation is an imbalance between dynamic option hedgers.
Say an oil producer wants to buy puts on oil, a bank will sell it to them and then delta hedge the risk, whereas the producer won't.
So, if the price of oil goes up the delta of the option for the bank will decrease (as the option goes out of the money) and so they'll sell oil into the market until they hit delta-neutrality, putting selling pressure while the oil producer won't be hedging so the impact is only coming from one side. And viceversa for a decrease.
Another possible reason is that it is hitting stops both above and below. So the price rises a bit hits a stop, comes back down hits another stop bounces up again, etc. etc. until it clears all the stops on one side and then generally rips through.
Comment: "so they'll sell oil into the market until they hit delta-neutrality", shouldn't it be buy, since the bank has already delta hedged the put by shorting the stock, and while the option goes OTM, they reduce their short position?
Answer: Negative autocorrelations are typical in high-frequency datasets. Bid-ask bounce is the classic reason given, but it doesn't add up without some extra structure. Another intuitive answer is provided by Cont and de Larrard (2013, SIAM J. Financial Math.): shortly after an upward price move, the number of shares at the new best bid is often smaller than the number of shares at the new best ask queue, because the new best bid consists of orders since the price increase, while the new best ask consists of orders previously sitting at the second best ask price. If orders come in randomly, then the new best bid queue is more likely to be depleted than the new best ask, which corresponds to a decrease in (mid) price.

Reasons for negative autocorrelation


"can hardly" vs. "there's no way"

Question: Does "can hardly" mean the same thing as "there's no way?"

I can hardly ____________
There's no way I can _______

Do these two mean the same thing? What's the difference, if any?
Answer: "I can hardly" can be used literally to say you can do something but only just.

I can hardly lift this heavy object.

Or it can be used figuratively to mean you can't or won't do something - in the same sense as "There's no way I can ..."

I can hardly be expected to write all this code myself.
Answer: They mean essentially the same thing, but there is at least some difference in the level of emphasis contained in each expression. I would say that "can hardly" is not as strong as "there's no way" in the instances you show above.
Edit: I am shamed to admit that I didn't even think of the "barely able to do something" sense of can hardly which @Martin Beckett explains so clearly in his answer -- even though that's the more common meaning.
Answer: "I can hardly do something" literally means "I can do this difficult something"; the adjective "hard", here synonymous with "difficult", is transformed into an adverb similar to its antonym "easily", and applied to the verb to imply that although possible, the task is difficult or can just barely be done. In fact, "barely" can be used synonymously with "hardly"; "I can barely do something" has largely the same meaning and connotation. It is often used figuratively as an understatement; "I can hardly believe you did that" can really be taken to mean the speaker didn't believe it possible, but since the speaker has probably witnessed it occurring, it must have been.
By contrast, "there's no way" implies impossibility; there is no series of events that would result in the proposed outcome. Though the meanings are clearly different, the two terms are often used in the same context; to express extreme doubt in the possibility of an action.

"can hardly" vs. "there's no way"


Chocolate won't harden up on my cookies

Question: I melted chocolate chips and a small amount of oil and coated cookies. Here's the problem: the chocolate won't harden up. Is there anything I can do NOW to help the situation, or is this just a sticky, melty, lost cause?
Comment: The best part about making a mistake with cookies is that you've now got an excuse to eat them all and start again.
Comment: Cookies with gooey chocolate on top?  I'm not seeing the problem... but I would be happy to taste it!
Comment: why did you add oil to the chocolate? oil (what oil, btw?) is liquid at room temperature, so it would lower the melting point of the mixture.
Comment: Well, you could melt *more* chocolate, without the oil, and try over-coating the cookies. Basically, trying to encapsulate the still liquid spread. You could also try serving them frozen, or re-coating while frozen/cooled. What happens, or what would be a good idea, other than just eating the cookies, will largely depend on what you really did. You haven't described it in enough detail for us to know. Other than being able to say that the current coating isn't ever going to be hard at room temperature, there's really not much we're going to be able to say without more detailed information.
Answer: The problem is the "small amount of oil". If you measured wrong or just eyeballed it, you now have a chocolate spread instead of a solid coating.
Storing the cookies in the fridge may or may not be enough to solidify the chocolate coating, but apart from that, there's nothing you can do to change the chocolate. Depending on what matches the cookie flavor, dipping the sticky part in something like grated coconut or ground almonds may at least protect your fingers somewhat.
Comment: A dusting of cocoa could help with the stickiness as well.
Comment: Also possibly what kind of oil, and how fresh is the chocolate. I made some chocolate-covered vanilla fondants as "favours" for people around the place using leftover chocolate a few days ago (without trying to add oil), and they were OK but inclined to "sweat". The really rough stuff- scraps and shavings of various types- I saved for myself and added a little olive oil since that's what I had to hand, it's ended up a bit gritty but still looks a bit sweaty.
Answer: It may have something to do with the temperature that the coated cookies are stored at, I mean, some room temperatures can be significantly higher than others. Perhaps the chocolate will harden in the fridge?
If the temperature is not the case, get this: You can drizzle or brush on another, likely thin, layer of pure melted chocolate (who doesn't love more chocolate :p) over the existing chocolate coating.
If my calculations are correct, pure melted chocolate will harden on soft surfaces (like Nutella) just as well on hard surfaces (like more solid chocolate).
Answer: In addition to Stephie's answer, when melting and re-cooling chocolate, it needs to be tempered properly.  That refers to how the chocolate is cooled and "seeded".  The fats in chocolate can have several different crystal structures.  That affects the texture of the chocolate.
The particular structure your chocolate has depends on how it's tempered.  Here's one method from Ghirardelli:

Grate or chop the desired amount of chocolate. Place two-thirds of the chocolate in the top pan of a double boiler. Heat over hot but not boiling water, stirring constantly, until chocolate reaches 110°–115°F.  Place the top pan of the double boiler on a towel. Cool chocolate to 95°–100°F. Add the remaining chocolate to the top pan, stirring until melted. The chocolate is now ready to be used for molding candies, coating, or dipping.

Adding the unmelted chocolate is adding a "seed" of the desired crystal structure so the melted fats will match the structure of the unmelted crystals.
Answer: I would say take one cookie, turn it upside down and place it on another cookie. Unless the mixture is too fluid you should be able to eat the cookies this way.
Maybe try sugar powder or cocoanut flakes to bind the oil? If that fails you can still take one cookie, turn it upside down ....
Comment: Welcome to SA! I'm afraid this answer isn't related to the actual question. The question asks for a solution to salvage the coating.
Comment: the second part is
Answer: Sounds like you might have messed up the tempering of the chocolate.
In order to get chocolate that doesn't melt easily at room temperature, you need to properly temper the chocolate. This is a very complicated process involving holding the chocolate at specific temperatures for a specific period of time. Additionally, adding oil to the chocolate might have resulted in the tempering time and temperatures being altered as a result of the adulteration of the chocolate.
You may need to throw away all of the chocolate and making new, unadulterated chocolate that has been properly tempered, but if the problem is that the chocolate hasn't been tempered properly and the adulteration haven't altered its characteristics too much, you might be able to save it by scraping it all off of your cookies, then melting down some chocolate and adding your adulterated chocolate into it before following a proper tempering process.

Chocolate won’t harden up on my cookies


Why do we need $dS_t=r S_tdt+\sigma S_tdW_t^Q$?

Question: Suppose $S_t$ is the stock price and follows the dynamics $$dS_t=\mu S_tdt+\sigma S_tdW_t$$.  According to Girsanov, we can apply change of measure and obtain $dS_t=r S_tdt+\sigma S_tdW_t^Q$, this implies $\ln S_T = \ln S_0+rT+\sigma W_T^Q$, and therefore $$\mathbb{E}^Q[S_T]=S_0 e^{rT+\frac{1}{2}\sigma^2T}$$, however $\mathbb{E}^Q[S_T]=S_0e^{rT}$ by Fundamental Theorem of Asset Pricing, which is contradicted.  Please correct me.
Answer: It doesn't imply
$$ \ln S_T=\ln S_0+rT+σW^Q_T,$$
it implies
$$ \ln S_T=\ln S_0+(r-0.5\sigma^2)T+σW^Q_T.$$
Look up Ito's lemma.
This is covered in just about any book on financial maths including my own Concepts etc.
Answer: If $dS_t = r S_t \, dt + \sigma S_t \, dW_t^Q$,
$$S_T = S_0 \, e^{\sigma W_T^Q + \left( r - \frac{1}{2} \sigma^2\right) T}\, .$$
Hence $\mathbb{E}\left[ S_T \right] = S_0 \, e^{rT} \,.$


Export Fbx from Blender To Unity

Question: I have a complete blender file which has an animated character with two actions and I want to export it as an fbx so i can view it in unity.  I did it and for some reason it is only exporting my actions and not the mesh or camera or anything else only exports the actions.  Why is it not exporting my mesh I have everything selected and i have apply modifiers and include animation selected. Thanks for the help
Answer: Sounds like you are exporting in Blender with Selected Objects options set. In this case you have to select the mesh itself in object mode to export both. Selecting the armature will export animations only.
If you do have a mesh in Unity3D but can't see it in the scene, you have to fix the scale factor. It's set to 0.01 by default. So change it to 1 to see the mesh in its original size.

Export Fbx from Blender To Unity


Do aggregated personal data fall under GDPR personal data rules?

Question: If I have statistics on users location data (i.e. city, country, etc.) aggregated from hundreds or thousands of users, are there any restrictions on storing and using these data under GDPR? I plan to store it in plain text and make it publicly available, with the users' consent of course. E.g. 1540 users from country X have an average statistics of Y. Of course if one user's data is deleted, it will still remain a part of the aggregate statistics. Will this be legal under GDPR?
Comment: It depends on whether reidentification, be means of the mosaic effect or other means, is possible. If reidentification is not possible, this is not personal data as defined in the GDPR.
Answer: You will need consent that is freely given, informed, unbundled and intelligible.  This is a high burden.  Without consent you will have to encrypt/anonymise personal data before you aggregate and run data analytics.  If you rely on a de-identification or pseudomization method, you are not exempt from privacy law.  As for deletion of user data, as long as you have anonymised the data prior to aggregation, it is okay under the GDPR - specifically the right of erasure.  You wouldn't have to remove it from aggregate statistics because it isn't technically feasible.


Lenovo Z580 Graphics Cards

Question: I recently purchased a laptop with an Intel Core i5-3210M running at 2.5 Gigahertz with 6 gigabytes of RAM with a maximum of 8 gigabytes of RAM. The laptop had windows 8 preinstalled. It only came with Intel HD 4000 integrated graphics, however, other configurations of this laptop with the same motherboard and processor come from the factory with a dedicated Nvidia Geforce card as well as integrated Intel graphics and use Nvidia Optimus technology to switch between graphics cards. I am wondering if i could add an Nvidia card in one of my three available PCI express slots and install the Nvidia Optimus driver. Currently in my "Bios" or whatever Windows 8 replaced it with, there are no options for Optimus. My question is if i added an Nvidia card and installed the Optimus driver, would it work? Also, should i install the driver first and then the card?
Comment: this is not possible. The GPUs are added to the motherboard. If you want a GPU, you must buy a laptop which has the GPU.
Answer: Well, sort of. Generally there's only one PCI-E slot (maybe 2) and they're mini pci-e formfactor. No one that I know of makes video cards in that formfactor, and they're usually x1 slots anyway (most graphics cards run at x16, or x8).
There's a previous question that asked about upgrading video cards, and the same answer might be true here - there might be some graphics adaptors that would work, and they're of the MXM formfactor, and its a crapshoot.
There's one more option though, assuming you're using this on a desk, you may be able to get a expresscard -> PCIe adaptor - you'd need to supply a power supply, and of course there's the cost of the kit itself. Notebook review has a nice in depth guide on the process
Comment: I have an available PCI slot designated as a PEG Gen1/Gen2/Gen3 X16. Here is my speccy screenshot: http://i1289.photobucket.com/albums/b516/evane999/Capture_zps6cfce21e.png

Lenovo Z580 Graphics Cards


Is there a website for searching/booking European trains?

Question: Is there a website to search for European train tickets? I mean something like kayak.com, expedia.com, airfare.com, etc for trains? I know there are specific countries' website like bahn.de, sbb.ch, voyages-sncf.com, etc. But is there a website to search and see the prices easily without having to go through many steps?
Comment: Funnily enough, I once had a Eurostar ticket show up when I was doing a kayak search for London to Paris flights.  It was a special deal, getting me a business seat for less than economy, so I enjoyed an early morning breakfast while zooming across the English&French countryside :)
Comment: Sadly enough, there is nothing like that :( But I heard EU is pushing to make it available some day
Answer: All national railway sites whose underlying database is HAFAS(de) can give you timetable information on all european trains. This includes Germany, Switzerland and Belgium. This excludes France.
Unfortunately, pricing and booking is not available on these sites beyond domestic routes and some international ones.
The best site that gather information about train travel in Europe is Seat 61.
Comment: Hafas is not actually a database, it is a journey-planning engine (built in the programming language Java). The data that is used by Hafas is a pan-European timetable dataset called Merits. The Merits data is amended by different rail companies (particularly Deutsche Bahn) so Hafas may give slightly different results depending on where you access it
Comment: I didnt notice that you mentioned Seat 61, so I have deleted my answer.
Answer: There are some offers that start appearing on the web:
A website called Loco2.com offers that (it's based in UK so be careful with currency of payment - see the co-founder answer to this question).
http://mytripset.voyages-sncf.com offers flights and trains (apparently it's possible to book some outside France [it's a French travel agency] but I cannot guarantee it).
In any way, as Mouviciel suggested, you can query trains in Europe from the German/Swiss/Austrian providers but not book tickets out of these countries. You can have a lot of information on the trains (like all stops) and I use it sometimes for any train in Europe. It includes some local transit system.
More generally, there is an answer that will probably help you.
Answer: This forum post just popped up in my alerts because it mentions Loco2. I'm co-founder of loco2.com so don't want to get lambasted for self-promotion, but actually @Vince isn't quite right. Loco2 has print at home tickets for lots of trains (Eurostar, TGV, ICE trains etc) which means it doesn't matter where you are.
We're integrated with the French and German (SNCF & Deutsche Bahn) rail booking systems and usually have print at home or collect at station tickets for domestic tickets in those countries, as well as international trains that cross their borders. We have some tickets from other operators via indirect connections, and it is these that are only able to be delivered to the UK.
@mouviciel is right though that sites using Hafas have the most comprehensive timetable information, but see Jamie's comment about the difference between Hafas (the journey-planning engine) and Merits (the timetable data) (Loco2 does not currently use Hafas/Merits).
Comment: Welcome Kate.  That's two Loco2 founders now on this site ;)  As long as you're not blatantly advertising and your posts are relevant, and you disclose your affiliation, we're ok with it :)
Comment: OK. I based my answer on an old post of your fellow Jamie saying you cannot sell tickets too close to the departure. I edited my answer accordingly. http://travel.stackexchange.com/questions/9692/is-it-possible-to-make-last-minute-reservations-on-the-city-night-train/9702#9702
Comment: loco2.com is dead...
Answer: One service that hasn't been mentioned yet is Waymate. They are somewhat like Hipmunk but for train travel. Waymate has the potential to become awesome once they add flight search. Good combined flight and train search is something that would be very useful in Europe.
Personally, I use bahn.hafas.de for finding train connections. In fact, when I once asked someone in Russia to help me find a train connection, I was quite surprised that he used the same service and not that of Russian Railways. Hafas has a really good database, nowadays even with real-time updates to the schedule, and when searching I can specify that I have a BahnCard, which gives me price reductions.
Comment: Note that the Hafas system is only as good as the information they get from national train operators.  In some countries they are incomplete!  I thought they were complete in Europe, only to arrive in Spain and find there are a lot more departures than Hafas knows about.
Answer: Generally, trains in Europe are either local or long-distance.  The local ones sell tickets on the same day at the station and are fairly cheap.  The long-distance ones offer much more comfort, for a higher price, and only between cities.  I feel like 3-4 hours on a normal train is my limit and anything more than that and you'll want something better.
Some trains (ie. Amsterdam -> Brussels) run every day at the same time and you don't get a seat number - so you can get your ticket ahead of time and just show up and go on the day you want.
However, the Thalys and ICE are the nicest and best trains but also priciest.  The comfort is similar or better than that of an airplane.  Book early enough and you might get a nice discount.  They often run specials available on their website (http://www.thalys.com/ and http://www.bahn.com/i/view/USA/en/trains/overview/ice.shtml)
Comment: You can also book high speed trains in German, e.g. the ICE, the same day. In fact you can buy the ticket inside of the train at the conductor! Reservation, obviously, is optional. Rarely, it may happen that you don't get a seat. In any case, if the train is very full, I recommend to have a look in the first or last wagon. Within Germany, I prefer trains to airplanes. Train stations are right in the cities, and there is no check-in necessary. Also, there is more flexibility - see above.
Answer: For checking schedules you can rely on the site of the German railways, already mentioned in this thread. That should be sufficient for most of your needs.
Unfortunately, when it comes to booking, the situation is not as good. There is no single website for booking trains in Europe, like you can find for e.g. flights. The best strategy is to use the sites of the national companies of the country of departure or the country of arrival. You can google for these sites or you can use the excellent seat61.com to find the addresses. Sites à la loco2.com provide a more user-friendly interface than some railway companies. But, you cannot use them to book anything you want to. They are limited in their possibilities, just as the national sites.
Example. Let's suppose I want to travel from Brussels to Gdansk somewhere in March. Loco2 doesn't show anything. However, the German Bahn gives me a list of connections. None of these can be booked directly. For the booking I have to split my trip into 2 parts. First I will have to buy a ticket from Brussels to Cologne, via bahn.de or thalys.com. Next I will have to book a ticket from Cologne to Gdansk, via bahn.de. This may look a bit cumbersome, but it is funny. Your trip starts at home :-)
If you find this horrible, note that until not so long ago, it wasn't even possible to buy international tickets online. Things are changing into the good direction. And seat61.com really helps a lot to find the good way through the jungle!
Answer: www.bahn.de will show you prices, and sell you tickets for trips from Germany to most neighbouring destinations.
Another good site is www.b-europe.com. This is the international booking site of the Belgian railways, an there is www.ns-hispeed.nl which is basically the same booking engine, but for the Dutch railways.
www.sbb.ch is good for trips from Switzerland.
loco2.com, mentioned above however has failed to provide me with solutions for all of the origin - destination pairs I entered. Maybe because they're linked to the French system, which doesn't like to give solutions involving many transfers.


With there being such a high demand for electronic trading or just trading in general why are market hours so limited?

Question: I am curious why a lot of market hours are something like 9 to 3 or 9 to 4 pm when there is such demand and so many prop shops and more out there. I know certain markets are continuous trading but a lot of very large famous ones seem to stick to this incredibly short schedule. Why would they do that?
Comment: I think a similar question great discussion is here - http://money.stackexchange.com/questions/8950/why-is-the-stock-market-closed-on-the-weekend although not the exact same answer.
Comment: Why did you post this here rather than on money.SE.  Should we migrate your question?  This may not be the right forum, as the question is not really quantitative.
Comment: Not sure about that, but for stock markets, companies like to wait until the market closes before they come out with bad news, and in general, some traders also like to wait until the market closes before making certain kinds of deals.  It's really more about managing perceptions than anything else because the processes that drive the evolution of market prices always continue uninterrupted whether there is trading or not.
Comment: "Continuous market" doesn't mean 24/7. It only means that trading can occur at any point in time while the market is open. Ie, it's *continuous* time vs. *discrete* time. The opposite would be an auction market.
Comment: @Tal, I am actually also curious because I am not working as pure quant anymore but more in quant trading space with emphasis on managing risk. Where would such questions go? I checked out personal money and finance SE and it does not look suited for questions about tick data, trading algos, risk management, trading platforms and the like, certainly it does not look like Bloomberg related questions fit with that format. What do you advise? I am asking because I may also pose trading related questions down the road. Thanks
Comment: @Freddy money.SE has generally been very receptive to general interest trading questions, such as regarding market hours.  But if it's the kind of question that only a quant would be interested in asking (algos, quantitative risk management, etc.), then it belongs here.
Answer: I think there is a straightforward answer to this:
The associated costs of changing trading hours need to be justified by the benefits.
Exchanges, regulators, and large market participants such as banks, hedge funds, buy side long-only funds very closely communicate and weigh pros and cons when considering changes to trading hours. Obviously motivations at times between those participants are opposing. Exchanges argue they may transact more volume through longer trading hours (which is actually not proven). Some investors believe that continuous trading hours in some assets benefit price discovery and that they smooth out liquidity spikes throughout the day. Other market participants believe that its better to transact only for a few hours when everyone trades and thus liquidity is much more concentrated. There are in fact exchanges that are only open for 30 minutes or 1 hour for precisely that reason, even though some of such assets have very high turn over. This is as far as motivations and participants in such discussions goes.
But the key aspect is cost-benefit when considering a change in trading hours. The cost are very high by having to adjust algorithms, trading applications, back office systems, data streams, and such forth. It is not an easy process and such changes are sometimes announced months if not a year ahead. In some cases such as liquid index futures pressure to expand trading hours are mainly motivated by competition. Nikkei futures trade a lot longer now compared to a short while ago mainly because of Japan's drive to not lose sight of remaining one of the most advanced exchanges (plus often what comes out of the US and proves itself is imitated in Japan). Imagine if you could trade the same Nikkei contract in Singapore round the clock but not in Osaka. What if price and liquidity patterns would not disfavor Singapore? Would anyone want to trade in Osaka? I doubt it. But my assumption of similar price or liquidity patterns when expanding trading hours is what it is, an assumption. Volume and liquidity profiles change drastically when changing trading hours. I remember that all the banks had to completely re-write/update their VWAP algorithms when trading hours in HK were adjusted.
Keep in mind that especially in the financial community one mantra goes: "If it ain't broke don't fix it". The fear of changes in liquidity, price discovery often scare portfolio managers and traders more than keeping things as they are.
Finally do not forget, lunch breaks are a great way to stretch your legs, get out of your lazy Herman Miller, catch up on the latest gossip and get back to the office. Some do not appreciate this being taken away from them at least not if they can voice their opinion and can hold on to it :-)


Why does Jack Nicholson say "Here's Johnny!" in The Shining when his character is called Jack?

Question: In The Shining, when Jack Torrance has clearly gone mad and is chopping down the bathroom door with an axe to get to his wife, why does Jack Nicholson say "Here's Johnny!" when his character's name is Jack? Is it completely random and showing how he's gone so insane he's just saying random names, or does it have some sort of significance?
Answer: That line was ad-libbed by Jack Nicholson as an imitation of Ed McMahon's intro for The Tonight Show.
From here:

Jack Nicholson ad-libbed the line "Here's Johnny!" in imitation of
  announcer Ed McMahon's famous introduction of Johnny Carson on U.S.
  network NBC-TV's long-running late night television program The
  Tonight Show Starring Johnny Carson. Stanley Kubrick, who had been
  living in England since before Carson took over "The Tonight Show,"
  had no clue what "Here's Johnny!" meant. Carson once used the clip of
  Nicholson as the introduction to one of his annual anniversary
  specials.
Comment: Also, Jack is a nickname for John so it fits with his character's name too.
Comment: Another example of the John/Jack - In the village where I grew up, a new breed of dog was named the Jack Russell Terrier, after the local Parson who bred them for hunting. He was called John Russell.
Comment: They called jfk jack sometimes
Comment: @tcrosley Really? Jack means John? Now I didn't know that! And I thought Bill for William was already weird! Thanks for this information.
Comment: @tcrosley - Yes, my dad John goes by Jack. It's probably less common nowadays, but it used to be pretty common.
Comment: Tom Clancy used "Jack" as John Ryan, Sr.'s nickname in his books. Used to be more common, I think, but still valid.
Comment: The scene in "Night of the Living Dead" where zombie Johnny comes walking through the door and grabs Barbara makes me think of this


What's the difference between LED and conventional lighting?

Question: Is there any difference in LED lighting vs bulb lighting or any other lighting?
Someone said that the LED light doesn't have the full spectrum of light. Is that a problem?
Comment: See also: [What continuous light technology gives light most suitable for photo lighting?](/questions/14027/what-continuous-light-technology-gives-light-most-suitable-for-photo-lighting)
Answer: The real answer is 'depends'.
White LED usually consists of phosphor (react with the chip emission) layered on a diode (such as GaN, which emits violet light 405nm) that's why they are white. The phosphor gets activated by the light from the chip and emits another wavelength of light, hence different colour in a mixture to produce white.
Wavelength of White LED are such shown below (lifted from Wikipedia):

Wavelength that can be perceived by normal trichormatic eyes shown below:

As you can clearly see, White LED has already covered up most of the spectrum leaving only the near 400nm wavelength uncovered. The other problem might be uneven wavelength brightness, which means even though the light looks white, the object tends to have a unnatural blue/green tint as shown in this video.
The technical term for this is called low CRI.
Also, the brightness of such LED will somewhat suffer due to inherent Stokes shift problem. Manufacturers have invested to improve the GaN system such as shown below.
Numerous technologies for LED has emerged but availability on the market is not really known.

Then what about bulb you say?
Well, fluorescent light works with the basic principle as the LED, which means they too can have low CRI, albeit a lot brighter.
What you are comparing, I assume is incandescent halogen lighting. Halogen light have two main disadvantages, being really hot when using and very inefficient. The light they produce have great CRI (not to say the best), but are definitely one of the strongest (halogen lights on car, anyone?).
---- Edit ----
Did I mention plasma lighting? They are quite efficient and have very good CRI. This is because they mainly heat gases up (argon/neon or more) into plasma and turning them into a blackbody radiator.
Look them up.
Comment: still cannot understand why you say "usually". From all those whitish LEDs which I have seen in my life only a small fraction was RGB composition and that was used not for white light but for colour changing light.
Comment: also, color on the screen is completely different from the real world colors. looking at the screen our eyes receive the light directly from the source and we need very narrow spectrum in order to precisely generate colors we want. but when it comes to lighting, objects around us absord some part of the light and reflect the other part and we need wide spectrum so our light has many wavelengths for probing all the possible colors we want to perceive.
Comment: LED is not necessarily RGB LED.
Comment: white LEDs are almost never an array of RGB... because of the horrible energy efficiency and color rendering index. but sometimes they are, when the goal is to have user selectable color.
Comment: LED part is much better. The part about fluorescent bulbs is quite incomplete, though —as the name implies, those also use glowing phosphors. And *that's* really the key difference from traditional incandescent bulbs — not brightness or yellowness.
Comment: Hehe, we are all learning right?
Will change it up, thanks.
Comment: @szulat *"white LEDs are almost never an array of RGB... because of the horrible energy efficiency and color rendering index. but sometimes they are, when the goal is to have user selectable color."* That "sometimes" includes pretty much all LED lights used in a theatrical/concert setting. It's rare to see white LEDs in theatrical lights. When white is desired they run the red, green, and blue bulbs at full intensity.
Answer: It can definitely be a problem, especially if the LED lights in question are not white LED lights. White LED lights, at least the higher quality ones, put out enough red, green, and blue light to work fairly well for most cameras. The results might not be as ideal as a fuller spectrum light source, but you can usually get pretty close. Typical high quality white LEDs put out a stronger blue channel than red or green. Red is usually stronger than green at the wavelengths to which many cameras are most sensitive to red and green respectively. Depending on the exact colors of the filter on your camera's Bayer mask, you'll probably have to pull back blue and boost green to get the colors looking more natural.
The problem is that not all white LED lights put out enough red and/or particularly green light in the part of each of those bands to which digital cameras are most sensitive. When that is the case it becomes an issue if you want to remove color casts that were in the scene when you post process your images.
Shooting under traditional incandescent lights with a color cast is less of a problem because even when they have a strong color cast they are usually putting out at least some light throughout most of the visible spectrum. Assuming you shoot raw files, you can adjust the color response curve before converting the raw file and correct for the color cast so that things look the actual color they are.
Colored LED lights are different, though. Red LED lights put out very little light other than in a narrow band of red. Blue LED lights put out very little light other than a narrow band of blue. Green LED lights are slightly better, but they still mostly put out a narrow band of green light.
If you have all three colors of LED lights mentioned above then you can usually adjust the color response curve in post to make the light look natural. But if you only have one or two there are going to be colors that you won't be able to pull out of the raw data no matter what you do. Again, this is especially the case when green is most deficient. Remember that your camera, like your eyes, is most sensitive to green light. Half the pixel wells of a typical digital camera are filtered for green light. When there is very little light that includes green wavelengths in the scene your camera's sensor sensitivity is effectively halved!
For how this works out practically in a specific situation, please see this answer to Blown out blue/red light making photos look out of focus
Comment: I am interested in white LEDs only
Answer: Another difference: pulsing artifacts when used for stage lighting.
LEDs arrays are dimmed/colored by being pulsed at full power rather than run continuously at partial power.
While this is also how modern tungsten dimmers work, tungsten (and phosphor-based LEDs) tend to produce light that is an average of the power input. The RGB composition LEDs in stage lighting have spikey light output closely following the input power.
The low-end LED stage lighting I've ex[erienced cycles at around 240 hz. With means shutter speeds much above a 1/250th are likely to exhibit weird banding. Also, at slower shutter speeds you get strobing where you would've gotten smooth blur under tungsten--fast-moving drumsticks for instance.
Answer: "White" LED lights usually have an extra dose of blue in them, compared to other conventional white light sources. My own LED lighting requires post-processing to get the white balance correct, because even 'preset' white balance in-camera (calibrated using a gray card) doesn't provide enough correction to counteract the excessive blue.
Post-processing can fully correct the white balance using a two-step approach (1) high color temperature around 10000K followed by (2) blue-channel-only decrease. I have a few examples here:  https://www.photoartfromscience.com/single-post/2017/09/09/How-to-Correct-an-LED-%E2%80%9CWhite%E2%80%9D-Light-Source
I'd further recommend you shoot in RAW format to get the most adjustability in post-processing.


Documentation requirements for a baby for domestic air travel within India

Question: I wish to travel domestically within India with my 9-month-old baby. What documentation do I need for a domestic journey? I don't currently have any documentation for my baby.
Answer: Personal experience :
I think birth certificate would be sufficient.
Comment: That still seems a bit unclear. Do you mean it is necessary but not sufficient (the baby needs something else), sufficient but not necessary (the baby could use something else instead), or both necessary and sufficient?
Comment: It may even be necessary because airlines insist on it or else you need to pay full fare.
Comment: I mean it is sufficient... I do not know if it is necessary or not.... @mdewey
Answer: Short Answer - This would depend on the carrier airlines.
Bureau of Civil Aviation security mandates no separate ID is required for infants/minors travelling with their parents.
The airlines may require an age proof to ensure infant qualifies for infant fare. If you don't provide a proof, you may need to pay full fare to travel. A birth certificate is universallly accepted (from experience).
Indigo states you should produce one of these at check-in

Birth Certificate
Mother's hospital discharge summary
Vaccination certificate

Air India has no such requirement:

No identity proof is required in respect of Infant/Minor, when accompanied by their parents / guardian who is a traveling and having a valid identity proof as listed above. However, an unaccompanied minor must carry a valid identity proof as listed above.

Go Air has no clarity. They just state age proof may be required.
Spicejet is more stringent. They insist on birth certificate.

Proof of age is required, so please carry the Infant's Passport/valid ID (birth certificate) for inspection

Vistara also requires valid ID but don't state what it is.

If your infant is between 7 days and 2 years of age, they require valid ID


(Possible incorrect location) Duplicate question incorrect duplicate

Question: So the other day I asked Term for situation where alternative choice is not really one
and it was marked as a duplicate of another, however the duplicate doesn't correctly answer the question. A better duplicate would have been
Expression for a choice which isn't really one
as listed in a comment.
--
I am not sure if this is the correct place to ask/submit this
Comment: You are correct, that question was not a duplicate. Maybe a mod can swap out the better choice for the original.
Answer: This is the correct place to ask. I have replaced the duplicate with the one you've requested.
Thanks for raising the issue.


Is content scraping useful for SEO or harmful?

Question: Is content scraping useful for SEO or harmful?
 Scraping: Taking content from other places on the web and publishing it on your own site.
There are many websites that only contain pieces of other websites or stolen content. Many sites will take articles from other websites and publish them as if they were their own, or will copy entire websites.Will this process is useful for SEO rankings.
Comment: @SathiyaKumar The first site I saw said November or my mind went wonky- not sure which, but I think November is wrong and I reported it wrong. Good catch!! Ironically, I got it right in another answer.
Comment: BTW- Panda 4.1 was just released around November 23-25 2014 and quite possibly earlier. If the drop is around/between the 20th - 25th, then it could be Panda 4.1. Panda 4.0 and 4.1 addresses this issue specifically.
Comment: @closetnoc Panda 4.1 was released just around November 23-25 2014 or September 23-25 2014? Because today only November 23 that's why got confused.
Answer: Content Scraping is not at all Good and it is a worst SEO technique (Negative SEO) which will surely harm your website in Panda update. Google will penalize those websites which are following content scraping technique.
In Google support page you can find

Scraped content
Some webmasters use content taken ("scraped") from other, more
  reputable sites on the assumption that increasing the volume of pages
  on their site is a good long-term strategy regardless of the relevance
  or uniqueness of that content. Purely scraped content, even from
  high-quality sources, may not provide any added value to your users
  without additional useful services or content provided by your site;
  it may also constitute copyright infringement in some cases. It's
  worthwhile to take the time to create original content that sets your
  site apart. This will keep your visitors coming back and will provide
  more useful results for users searching on Google.
Some examples of scraping include:

Sites that copy and republish content from other sites without adding    any original content or value
Sites that copy content from other sites, modify it slightly (for    example, by substituting synonyms or using automated techniques), and
  republish it
Sites that reproduce content feeds from other sites without providing    some type of unique organization or benefit to the user
Sites dedicated to embedding content such as video, images, or other    media from other sites without substantial added value to the
  user

Matt Cutts, Google's head of search spam announced a new tool to let Google know when you find scraped content ranking better than original content and he stated that

If you see a scraper URL outranking the original source of content in
  Google, please tell us about it: http://t.co/WohXQmI45X
Answer: It's worth mentioning that Panda, a Google algorithm update, deals with this specifically. Sites with large swathes of duplicate content or pages with very little content are penalized quite heavily - the idea is to prevent people who's sole purpose is the ranking of keywords. Each page either has to have a good portion of good, unique content or you need ensure that it is kept out of Google's index, by using meta robots tag (noindex, follow) or by preventing crawling using robots.txt
Answer: Content scraping is always worst techniques in SEO. If you working on content scraping, please come out from this method. surely this kind of content scrapped websites will get penalty from Google.
Comment: "swapping" or "scraping"?    Can you improve this answer by adding references for your reasoning or explain why this is true from your personal experience?
Answer: Collecting the content from multiple sources it is good to learn new things but it is a NEGATIVE for SEO
Because Google have one algorithm that algorithm is called as a Panda algorithm so if you copied content from other website Google may identify your website and hit with the panda update
if it happen to your website rank is going down day by day...
so my solutions is don't go for content scraping...


Why does freezing point decrease when vapour pressure decreases in dilute solutions?

Question: I was studying colligative properties of dilute solutions, and one of the properties was freezing point depression. The confusion I had was that, if vapour pressure decreases, it should be easier to reach the freezing point (point where vapour pressure of solid and liquid are equal). So I thought the freezing point will increase, but freezing point actually decreases. Is there any logical explanation?
Comment: I thought of when there is increase in pressure there will always be increase in the density .For example when you add more pressure to your liquid it will tend to move to solid
Answer: Consider graphs of the vapor pressure of the liquid and of the solid, both as a function of temperature. Intuitively, both graphs increase with temperature, and intersect at the freezing point. By lowering the vapor pressure of the liquid, we lower the corresponding vapor pressure curve and hence the temperature at the point of intersection.
Answer: I think it of this way. There is a lot of intermolecular space between individual molecules of a solvent. When we decrease the temperature, the individual molecules come closer, lose their heat of fusion and eventually the intermolecular spaces goes on decreasing until they became a tightly packed solid.
Adding a solute hinders the process as the solute particles, which are different in size and geometry from the solvent particles, occupies these interstitial spaces and prevents solvent molecules from coming closer. Hence we need a much lower temperature than before to freeze my solution as at lower temperatures, the solvent-solute particle interaction gets relatively weakened.


Why so many warnings about importing private keys?

Question: Blockchain.info and other products make you read dire (but vague) warnings that "you must be an expert" before you can import private keys.  What's that all about?
Comment: To venture a guess: To prevent complaints from unhappy users after realizing that handling cryptographic secrets has its pitfalls? Bitcoin private keys have the additional complication that there are at least two formats (the mini key option). I guess it might be a support nightmare to advertise this functionality---after all, doesn't the site seem the first suspect when you cannot redeem your incomplete, compromised, or fake private key?
Answer: Importing a private key can lead to non-intuitive behaviour, and that can be exploited by an attacker.
Imagine I'm evil. I give you a paper wallet with 1 mBTC on it. You're happy and import it. I keep the private key and wait. Depending on the client/user, maybe someday you'll put some real money on there as change/received funds. Then I can swipe them right off from you. If you don't bother moving the original money off the key, I can also steal that back.
If not, then at the very least I can trick you next time into thinking you were paid by sending funds to that address. Then I can steal them right back.
Importing also tends to break backups, especially deterministic key schemes. Armory gives you one line of text for all your keys, and then 1 line per imported key. Every time you import, you'll need to redo all your backups.
Because most users don't understand these implications, wallets tend to discourage importing, and instead offer sweeping (moving the funds to an address that was generated by the wallet itself). Supports 90% of the use cases with none of the issues.
Comment: If that's the reason for the warning, the warnings should be re-written to specifically say that any coins in the wallet are still accessible to anyone who has the private key.  It's confusing that many sources say "users should never import private keys", but then don't say why and leave users wondering how they're correctly supposed to spend coins from their own private paper wallets.
Comment: In other words, you should only import private keys that are only known to yourself.
Answer: because exposing your private keys on your computer will expose them to all the viruses and keyloggers on your computer that non-experts tend to have.
thats one reason
Comment: This is not specific to Bitcoin, though. It's true of all financial authentication.


Mattanos Levyonim via Jerusalem organazations

Question: Am I yotzeh if I (a non-Jerusalemite) give it to an organization in Jerusalem who gives it out on their Purim since a mitzvas Hayom on my purim?
Answer: As long as your giving happened on your Purim, you fulfilled your obligation. The halacha is that if you wake up Purim morning and look around town and can't find any poor people, you can send the money in the mail, or just set aside the money for whenever you find a poor person. Chayei Adam 154:28, among others.

ואם הוא במקום שאין עניים שם, יכול לעכב מעות פורים עד שיבואו עניים, או שישלחם למקום שירצה

I suppose it might be slightly more ideal to have it distributed on your Purim too; how you weigh that against the preference for the poor of Jerusalem over, say, Tel Aviv, I don't know. But either way, you fulfilled your obligation.
Comment: Source, please?
Comment: The Nitei Gavriel (68:5) writes that it is better to set aside Matanot La'Evyonim before purim, in order that it arrive on purim, than to set aside money on purim, so that it arrives after purim (although it is still good if you did it that way): http://hebrewbooks.org/pdfpager.aspx?req=46446&pgnum=379
Answer: When giving Matanos L'Evyonim, the money should be given on Purim and received on Purim. For one who wishes to give Matanos L'Evyonim to Aniyim in Yerushalayim this presents a problem. Since they celebrate Purim on a different day, how can we give them Matanos L'Evyonim and still be Mekayem the Mitzva? If we give it on the fourteenth when we observe Purim, it is not Purim for the recipients. If we would wait until the next day, when it is Purim for them, it is not Purim for us. The solution, (Rabbi Yosef Zimbal, Moadim U'zmanim, Vol. 1, No.1.) is that we can give money to a Shaliach on the fourteenth and that this would be distributed on the fifteenth when it is Purim for the Aniyim.
Comment: This is surprising. One of the commentaries on Shulchan Aruch -- Magen Avraham I think, don't recall off-hand -- says not to give too far in advance of Purim "as by the time Purim comes around, the poor person may have already consumed the gift." Which would imply that if you give it on the 14th, so long as he still has it for his use on the 15th (his Purim), that should be fine.
Comment: Shkoach Shliach Shel Adam Kmoisio I should have thought of the Eitzah


Epivally SXC 1080 Modem

Question: I have Tata Epivally SXC 1080 1 X USB Modem. I want to use it with Ubuntu 11.10 64 bit OS. what steps should I follow?
Answer: It's simple in Ubuntu, insert the modem, next go to network manager icon on top panel, click on it, select "Edit Connections" below drop down menu, select "Mobile Broadband" tab, click "Add" then "Continue" Select Country "India", here U find Tata Indicom, selec appropriate device of Your's,

Epivally SXC 1080 Modem


IIS 7.5 extremely slow, intermittently no response

Question: I have a problem with our web server. It's running about 35 ASP.NET (mostly 4.0) sites using Windows Server 2008 R2 with IIS 7.5. It's patched as of mid-January this year.
Symptoms:

Intermittently extremely slow performance
Some requests seem to never be processed, resulting in ViewState errors
General sluggishness when navigating sites, browsers spinning waiting for a response

Some facts about the server that may matter:

It's running in a virtual machine on a very powerful, underutilized server
12 GB RAM, 4 virtual CPUs

Some facts about our ASP.NET sites that may matter:

In low frequency, we synchronously send email from the site
Some requests are synchronously long-running because we create PDFs and reports on the fly. These requests may take more than 30 seconds to complete.
Each site is in its own application pool, 1 worker process (no web garden), recycle at midnight

Some performance counter facts:

ASP.NET performance counters show between 10 and 50 requests/sec
W3WP process performance counters show per process 10 to 45 threads, 1,000 handles. The total handle count is between 30,000 and 40,000 (fluctuating).
CPU usage is between 0 and 10 percent most of the time; may spike to 30 percent during long running request (PDF or report generation).

I'm really stumped as to why we get such bad performance. I'm suspecting it has to do with some thread pool/handle limit - I read that having around 40,000 handles dramatically reduces server performance etc. but I don't know how to get this under control.
Generally it's clear that something is preventing IIS from unlocking the power of the VM... the CPUs are mostly idle with very low usage. Any help?
Comment: Why don't you try refactoring your application so as to not run long tasks synchronously? Sounds like a job for a message queue (e.g. MSMQ) or service bus (NServiceBus).
Comment: Are you running everything on the same logical drive and/or partition?  You've got a bottleneck somewhere.  Keep looking on your performance monitor at the OS/(virtual) hardware.  It's not uncommon to see bottlenecks at these levels due to large amounts processing.
Answer: 40,000 handles? Look elsewhere, my fresh-booted laptop's sitting at 56,000 while I read this website. The documents you're looking at might be from the 90s!
The symptoms you've described are consistent with a networking problem.
If it's more than a little reproducible, I'd grab a simultaneous network capture from the server and a client. If it's not, I'd grab one from the server alone, and look for indications of connectivity problems (basically: retransmits).


Tilemill Index problem

Question: I have created my own customized tile. Now I am facing some problem with its indexing or naming convention. I am giving an clear example. I have taken an area where 6 tiles were created. In Google Maps or OSM in the same extent its giving 6 tiles and the same tiles. So there is no referencing or projection problem. Even the X or the folder name is also matching. I am getting trouble with the Y column or Image name. Its not matching. I have taken a close look at it. Interestingly I found in Google or OSM the Y column is incrementing from top to bottom where as tilemill created tiles number those incrementing from bottom to top. That is why the naming of tiles are not matching. What should I do?
Answer: This is a double of an issue asked in our support queue. I answered it here.

Tilemill Index problem


Age appropriateness of throwing curveballs

Question: My son is 15 years old and just now is starting to throw curveballs.  Should he limit throwing them and how many should be his maximum per day?
Comment: This is something you should talk to your son's doctor about, not some random blokes on the net.
Answer: You definitely waited until the right age for you son to start throwing this pitch. It is recommended to wait until the child is 15-16 years old before throwing this pitch.
There are very few resources on the web that list the recommended number of pitches a player should throw at this age because everybody is different. But throwing a curve ball at this young of an age is very dangerous if you throw it incorrectly. So you have to be very carful. Throwing a curve ball with bad technique can cause serious elbow injuries.
As long as he is throwing the curve correctly, he can throw as many as he wants. If he complains about any pain or pinching, stop immediately. If you want to play it safe, take the number of pitches (non curves) he usually throws, cut it in half and have him throw that many that day. Do this until he feels perfectly comfortable.
Here is a video that shows the proper way to throw a curveball without causing injury.
I also agree with what wax eagle said. Talk to your doctor. I'm just trying to make a point that if done incorrectly, your son might injure his elbow.


Why doesn't Duck Hunt work on plasma or LCD screens?

Question: I'm told that the original Duck Hunt (NES) works fine on all CRT screens, but fails to register successful hits on a plasma or LCD screen. Why is this? Is there a fix for it?
Comment: [This question](http://gaming.stackexchange.com/questions/17148/will-the-nes-zapper-light-gun-work-on-a-crt-hdtv) covers details on the Light gun against CRT TVs, and covers the mechanics of how it specifically works. Don't know if it's enough to explain whether or not it fails on plasma/LCD.
Answer: I disagree with both of the contributed answers to this question. They are right but for the wrong reasons. I believe LCDs don't work because of a technical limitation, but this talk about electron beams and "retrace lines" doesn't make sense to someone who understands the technology: a properly contrasted white box is all the light gun looks for. The photo-diode inside the gun can't tell if it's seeing white light from lit phosphors or a properly backlit LCD.
Please understand that my response is founded on my studies in computer engineering (specializing in embedded systems design) at a credible institution, where, out of many projects, I had a particularly pertinent project writing the VHDL code to drive images in frame buffers directly to the raw data pins with horizontal/vertical/blanking timing signals of an LCD display. My response is also based on knowledge of how Duck Hunt and the light gun interact. However the following is mostly based on my observation in getting Duck Hunt working on a recent-model Samsung LCD TV.
This problem is almost certainly to do with timing and image processing. Brightness may play a factor in some people's situation (early LCDs had relatively poor contrast ratios), however the pixel transition time and contrast ratio of the Samsung LCD I used were good enough to occasionally register a hit. The fact that it registered at all may be a miracle but I can assure you it has nothing to do with CRT electron beams or retracing.
Why I believe this to be a latency issue is because of a strange anomaly where, when I could finally get the title screen to register a hit, I'd either end up in the single, double-duck or double-clay pigeon mode. When I'd fire at a target there'd be a roughly 50/50 chance that the white boxes would display at all, and I could never hit a duck in the single-duck game. However in the double-duck/pigeon game, when I would see the white squares and a hit would be registered, the wrong target would get hit.
From what I understand about Duck Hunt, to allow for hits on multiple targets to be distinguished, the game would first blank the screen and show the square for "target 1" for a few milliseconds (not sure on timing), then clear that square and show the square for "target 2" for a few milliseconds. CRT TVs would have no latency in showing the image to the screen and therefore work great for Duck Hunt where the times that white squares were on the screen were timed precisely by the game. What I believe I experienced was that the light gun would see the square for "target 2" when I aimed at "target 1" because of the latency in the image processing algorithm the TV was using to up-convert the image. When I'd fire, the game thought it saw the light from "target 1", because that's the square being shown on the TV at the time, when the target I shot at on the TV was "target 2".
I have a number of tests I want to try and run to confirm if this theory is correct, but if this is the case, TV manufacturers could fix this problem by speeding up the processing of the image. So all my classic-gaming friends, all hope is not lost and as technology gets better we may once again be able to use our NES zapper with future TVs.
Comment: Actually, now that I think about it, utilizing this information it might be possible to make a sort of "Duck Hunt configuration screen", where you point at the screen and fire, and the game tracks how long it takes for white to register, using that later to adjust the timing sensitivity for the gameplay. Hmm...
Comment: This is actually the correct answer; the NES displays a white box wherever the "hit zone" is, then polls the Zapper; if it returns "White" when the box is up and "Black" when it is removed, the game registers a hit. The fact that the game checks for *both* light and dark to verify is what prevents you from just pointing the gun at a lightbulb and firing away.
Comment: @Xkeeper. It would be difficult to add a config screen to the game itself, but I think if you could throttle the latency outside of the game (maybe on the monitor itself), and actually make it a bit longer than it is currently, you could get back in the refresh pocket, and just be one frame behind where the game thinks it is. But since the duck is pretty big (lots of pixels), this may be good enough. In fact, if the game is just looking for a white-then-black light signature, the accuracy when being one frame behind would be the same.
Comment: Also all the people talking about the scanlines and stuff are thinking of light pens, which do indeed only work with CRTs because they detect their XY position by reading the timing of when the beam sweeps by their tip.
Answer: I did quite some tests with the Sega Light Phaser (Master System's light gun), which is pretty much the same technology.
There are two issues involved:
One is indeed the timing. You would need to have a very fast TV with a game-mode so the delay wouldn't affect the results
The second and more important is that, in order to be cheap, the light gun was made using tradicional home appliance electronic components. It uses the same kind of photoreceptor used on TVs and VCRs to receive the IR light from the remote. This means, obviously, that it the light guns can only "see" IR light. Since the CRTs emitted IR light alongside with the visible light, it worked pretty fine. But LCDs emit zero IR light, and this is why the light gun just wouldn't capable to detect the targets on duck hunt even on a hypothetically zero-delay LCD TV. Any hit detected when testing on a LCD TV was much probably caused by IR light reflecting from from some other source, like a fluorescent lamp.
If anyone want to replicate the rest, just connect light gun to an arduino and check the results. The light gun will be able to read white areas on a CRT TV, light emitted from infrared remotes, light from fluorescent lamps. But it will not detect any light coming from a white area in a LCD monitor.
So, one requirement to fix the problem would be to replace the photoreceptor with another that's able to receive visible light. But that would also require adjustments to the circuit, since the logic levels are very different between different types of receptors. Only a skilled electronic engineer would be able to do that.
The third important factor is the detection method used by the video-game. Software-based detection methods like the NES and MSX had can be fixed because it's frame-based. OTOH, hardware based solutions like the SMS, Megadrive and SNES were more precise and indeed rely on the position of the beam to detect the coordinates. This would only work on raster based TVs/monitors, but LCDs and Plasmas are frame-based. In this case, it's just not possible to fix the issue, because the delay requirements are much smaller, close to zero.
Answer: Change the contrast button slider all the way to right.
I changed the contrast button to middle of bar when I noticed this. I have both an LCD and CATV display. It confused me, because every once in a while the gun would work on the LCD, I noticed (usually at night or in the dark, but I didn't put it together).
Anyway, I changed it, put Rambo 3 (Sega Master System) and it no longer worked. I retraced my steps, put contrast slider button to right and it went from inoperable to working as if it was turbo fast.
I am not familiar with concept of fast TV's as mentioned in an answer above. I am next going to try it on my LCD, in case this was just coincidence.
It could be that the light gun will work on most TVs if contrast is high enough.
I tested on CATV, but not on LCD.


What scale problem can be simulated on an PC using Smooth Particle Hydrodynamics?

Question: I want to simulate tidal features in a large body of water using was smooth particle hydrodynamics.  For a system composed of an incompressible fluid, what general scale of problem can be tackled with an home computer? That is, how large of a body of water can I accurately represent using Smooth Particle Hydrodynamics?
Comment: You can simulate the ocean with 10 grid points on a home computer, but that simulation isn't going to be very good.
Comment: Based on the comments below, the term 'scale' does not directly translate to a quantifiable computational load.  Without providing a specific problem and accuracy constraints, it is impossible to answer this question in any meaningful way.
Comment: I think this is a perfectly fine question. It's not specific, and I'm interested in hearing anecdotes. For example, I can say in electromagnetics, you can simulate a 2D domain that's maybe a dozen wavelengths on a side for hundreds of optical cycles in a reasonable amount of time. I think this kind of answer is both useful and interesting.
Comment: What is the characteristic length between individual particles in a "Smooth Particle Hydrodynamics" model?  Also, how many spatial dimensions are you simulating on?  Hypothetically, any computer will only be able to work efficiently with some maximum number of $N$ degrees of freedom in its memory.  If you're simulating in $d$ dimensions and the characteristic length is $L$, you can only simulate a problem of scale $L\cdot\sqrt[d]{N}$.
Comment: If I understand your comment, the characteristic length is L should be quite large for a tidal type phenomenon?
Answer: This depends a great deal on the type of CFD problem and the methods being used.  But as a rough start using a lightweight geometric multigrid for the pressure solve and explicit time stepping for velocity, suppose you have 100 bytes per cell.  If you have 8 GB of memory, you could solve a problem with about 80 million cells.  This will likely be slower than you want because explicit CFD typically needs many time steps, in which case you should move to a smaller problem size.  More storage will be needed if you use assembled matrices or Krylov methods (which may or may not make the code run faster).
Comment: The 80 M figure roughly corresponds to the number of degrees of freedom.  The question of estimating the number of degrees of freedom in a "real" system is 1) hard and 2) not general.  Could you make your question more specific?
Comment: How would that corispond to a "real" system? Is is a glass of water or a large lake?
Answer:
All models are wrong, but some models are useful - George E. P. Box

Let's establish one important fact:  Simulation Models are not exact replicas of reality.  We use models to understand only a small piece of the real physics that is actually happening.  No model, no matter how good the equations are or how powerful the computer is, can exactly mimic reality.
Models can be useful to understand certain physics, whether at the atomic scale (ab-initio models), mesoscopic scale (molecular dynamics or lattice boltzmann models), or macroscopic scale (navier stokes equations).  Depending on which scale you choose (among other factors), you can make certain assumptions to model a glass of water or a lake (or even an ocean).
The word 'scale' (as the OP is using it) does not translate directly into a computational load directly.  As others have already pointed out, the computational load depends on the total number of the resulting degrees of freedom after discretization.  Any 'scale' can be simulated on a desktop computer provided that the total number of resulting "degrees of freedom" is small enough to fit in the computer's memory.  Scale is independent of degrees of freedom.  Accuracy, on the other hand, is highly dependent on the number of degrees of freedom, the type of problem, and the solver being used.
The key questions to ask are:

Which 'physics' are most important for this particular problem?
How much accuracy is needed?

Neither of these two questions is easy to generalize for any problem, no matter what the scale is.  Therefore, it's really not possible to answer your question in any kind of general sense.  It really depends on the kind of problem you want to model and how much accuracy you really need.
Answer: Wow what an open question to ask!
As already mentioned the answer depends on so many factors. Here are just a few: Type of method (i.e. finite difference, spectral, finite volume, finite element etc), the power of your home computer, your skill as a programmer, the language you use, the algorithms you use for solving linear systems, explicit verses implicit time stepping, any parallelization you are able to exploit, the time you are willing to wait, how many time steps you need....
I assume by "general scale" you are talking about what grid sizes can be solved on a home PC. For 2D problems as a rough estimate I would say O(1024^2) is definitely do-able for many problems with maybe around 100000 time steps.
Answer: In addition to the other answers, let me just note this as a comparison: if you do not smoothed particle hydrodynamics but just a traditional Q2xQ1 (Taylor-Hood) finite element discretization of the Stokes equations in 3d, then you end up with ~400 nonzero entries per row of the matrix. That means ~5000 bytes per degree of freedom in the matrix alone, plus maybe that much again if you want a good preconditioner. So 10kB per degree of freedom. (I know @Jed Brown is going to say that one could get away with less, or do use matrix free methods, and that is all true, but for the sake of argument let us consider a "traditional" approach.)
Then, if you have say 16GB of memory, you can do ~1.6M unknowns in total. Given that every cell in a uniform mesh has 25 unique degrees of freedom, this equates to 64,000 cells -- i.e., for example a 64x32x32 mesh. Whether that's appropriate for your problem is a question that depends on what you want to do.
How long will it take to solve such a problem? A rule of thumb is that solving 100,000 unknowns on a single core in a parallel context will take 1 minute. So if your computer has 8 cores, then that's 200k unknowns per core and it would take 2 minutes to solve a Stokes system of the size outlined above.


How does love potion, aka Amortentia, behave in other gender interactions?

Question: In Harry Potter universe we're given example of Amortentia usage in a scenario where a female gives the potion to a male. Has Rowling explicitly commented if a male can use the potion to seduce a female ? Furthermore can Amortentia be used in a same sex scenario, e.g. male to male, female to female ?
Comment: For anyone taking love potions in Hp as haha-funny: please read this very insightful essay: http://thats-normal.com/2013/11/love-potions-in-harry-potter/
Comment: @DVK - A key component of love potions is that they're largely ineffective. Even the most powerful wears off relatively quickly if the person isn't *actually attracted* to the person who made it. I think (or at least hope) that the commercially available versions have little or no ability to be used as a date-rape drug.
Comment: @Valorum: We *know* that it's possible to rape someone via love potion (of [questionable provenance](https://scifi.stackexchange.com/q/22810/36526), no less), because that's how Voldemort was born.  In your own answer, you quote a line asserting that the joke-shop-level potions the Weasley twins were selling were good for 24 hours, which is more than long enough to rape someone (attraction to a person and consent to have sex with that person are two entirely different things, obviously).
Answer: Male to female - Yes
Rita Skeeta suspects Bill Weasley of having used a Love Potion on Fleur.
Regarding Love potions in general working in females:

The only one who is easy to recognize is Bill who, poor man, is grievously scarred from an encounter with a werewolf and yet somehow (enchantment? Love potion? Blackmail? Kidnap?) married the undeniably beautiful (though doubtless empty-headed) Fleur Delacour.
Dumbledore's Army Reunites at Quidditch World Cup Final

Additionally, in the semi-canonical play Harry Potter and the Cursed Child by Jack Thorne, Ron gives Albus a love potion with intent that he use it on girls (while Albus does have a certain 'gay vibe' in the play, there is no indication of that being the intended use of the potion)

RON: And a cracking one at that — gorgeous silver hair. Saw them on the roof together, near the Owlery with Scorpius playing the gooseberry. Nice to see my love potion being used well, I thought.
(Harry Potter and the Cursed Child by Jack Thorne - Act 3, Scene 17)

We also see that the smell component of Amortentia (a particularly powerful Love Potion) works on females:

"It's the most powerful love potion in the world!" said Hermione.
"Quite right! You recognized it, I suppose, by its distinctive mother-of-pearl sheen?"
"And the steam rising in characteristic spirals," said Hermione enthusiastically, "and it's supposed to smell differently to each of according to what attracts us, and I can smell freshly mown grass and new parchment and-"
But she turned slightly pink and did not complete the sentence.
(Harry Potter and the Half-Blodd Prince - Chapter 9)

Same Sex - Unknown
I don't think that there are any canonical examples of Amortentia or any other Love Potion being used in a same sex scenario, considering the only LGBT character that we know of is Dumbledore.
Comment: " the only LGBT that we know of is Dumbledore" - you clearly have not read many fanfics.... :)
Comment: Certainly the smell component works on female. The question is whether the actual effects (e.g. causing infatuation) work.
Comment: They're certainly connected but I'd consider a love potion that smelled nice but didn't actually create feelings of love to be a bit of a failure.
Comment: @Richard I didn't know that they were separate.
Comment: @DVK clearly we have different views regarding what's canon :)
Comment: @ibid - who said anything about canon? I didn't :)
Comment: @DVK you were commenting on a line which included the words *"canonical examples"* :)
Answer: In Canon
Unknown. As far as I'm aware, there are no references in any of the books, films, supplementary material or interviews that deal with the issue of a love potion being used on...

Someone of the same sex as the potion-maker (or)
A woman.

Guesswork
My instinct is that a love potion would work on just about anyone, however a potion used to create a same-sex infatuation, when used on someone heterosexual (or vice-versa) would probably run out very rapidly since the object of their affection would be deeply unattractive to them:

'There you go,' said Fred proudly. 'Best range of love potions you'll find anywhere.'
Ginny raised an eyebrow sceptically. 'Do they work?'
'Certainly they work, for up to twenty-four hours at a time depending on the weight of the boy in question –'
'– and the attractiveness of the girl,' said George, reappearing suddenly at their side. 'But we're not selling them to our sister,' he added, becoming suddenly stern, 'not when she's already got about five boys on the go from what we've –' - Harry Potter and the Half-Blood Prince: Chapter 6, Draco's Detour

Notably, in an interview JKR indicated that both witches and wizards could take love potion and that wizarding scientists could then study the effects. No indication was given as to what those effects were:

SU: Well, we have a lot of questions, though, for you Jo. Like stuff about that mysterious Department of Mysteries. Can you tell us, what was in the Love Room?
JKR: Well, there was that mysterious room, we don't know what it is in the Love Room. Yet it was the-- (laughter, overtalk) What's in the Love Room. It's the place where they study what Love means. So that room, I believe, would have at its center, a kind of fountain or well containing a love potion, a very powerful love potion. You know that the first time they ever enter Slughorn's Potions class, and he starts talking about Amortentia, the Love Potion, and he says it's the most dangerous one in the room. That's what they would've found in the Love Room. So you would see wizards and witches taking it, they would study the effects.
Comment: @AthenaWidget - Just out of interest, are you in the middle of writing a very saucy Firenze / Trelawney slashfic?
Comment: @AthenaWidget - "negative" as in you're NOT in the middle? Finished writing?
Comment: `would work on just about anyone` But what about _inter species!_
Comment: Negative. I was _shocked_ by the number of DV on the [slave girl](http://scifi.stackexchange.com/questions/110683/why-are-there-slave-girls-in-star-trek) question. I didn't expect such a reaction, in retrospect _I should have known._ There is _NO_ way I'll ever take anything on the internet seriously. BTW, you are one of the shining lights on this forum. I thank you for being a gentleman/lady.
Comment: @AthenaWidget - You can have my +1. I was especially intrigued to find that I can't find a single (book canon) instance of a witch being given a love potion, only administering them to unsuspecting wizards and muggle men. I'm not sure what that says about JKR.
Answer: There are two canon descriptions about how the love potion works:
Harry Potter and the Half-Blood Prince chapter 9

"Amortentia doesn't really create love, of course. It is impossible to
  manufacture or imitate love. No, this will simply cause a powerful
  infatuation or obsession. It is probably the most dangerous and
  powerful potion in this room - oh yes,"

Harry Potter and the Deathly Hallows chapter 6

'There you go,' said Fred proudly. 'Best range of love potions you'll
  find anywhere.'
Ginny raised an eyebrow sceptically. 'Do they work?'
'Certainly they work, for up to twenty-four hours at a time depending
  on the weight of the boy in question –' '– and the attractiveness of
  the girl,' said George, reappearing suddenly at their side.

So the "love" potion doesn't even generate sexual desire. It just makes you very obsessed with another person. Sexual attraction would be the usual result of such obsession because it is "natural" for humans.
It is possible that someone feels obsessed with another one from the same sex without any potion and without being gay or having sexual desires. There are many examples of someone being admired for his/her achievements or skills.
So I see no problem that the love potion works for "man to woman", "woman to man", "man to man" and "woman to woman" scenarios. Still it might not have the desired effect (i.e. sexual attraction). Everything will depend on :

strength of the potion
amount of potion taken
the person's "normal" desire for such things

I would rather speculate that a heterosexual man will be very unlikely to feel sexual desire for another man even under the effect of a strong love potion. He'll be very obsessed - yes - but not sexually attracted. A homosexual man on the other side will feel also sexual attraction.
The only canon example of someone taking a love potion is Ron in HPHBP and the sender was Romilda Vane. It worked "as expected" because:

Ron is heterosexual
Romilda is an attractive girl

Another 'semi-canon' example would be Merope Gaunt and Tom Riddle Sr. If the seduction was done by love potion then it must have been a strong one and taken in appropriate quantities. It worked again because Merope, while being not very attractive, is a woman and Tom Riddle Sr is heterosexual.