Use Arduino to detect low battery state and shut it down

Question: I wanted to know if it is possible to monitor a battery that is driving the Arduino and check its voltage. When the voltage drops below a certain level (i.E below 3.0V) it should shutdown and disconnect itself from the battery by using a relay or something. When the battery is full enough again it should power up again. Is that possible without any external sensors just by using the Arduino's inputs?
Comment: After it has "disconnected itself from the battery", how would it know that the battery is full enough again?
Comment: I don't really know, that's why I'm asking here. Maybe use a programmable attiny45 which controls the voltage and the relay? If that is not possible just shutting down is enough for me
Answer: It is not entirely beyond possible, in fact quite possible in theory.
I think the saying 'in theory, theory and reality are the same, but in reality they are not' is appropriate here.
So to monitor voltage, a simple voltage divider circuit can be used, and the Arduino can monitor that, and release a relay controlling the power line. The same relay could be wired to also reconnect when voltage reaches a threshold. I think the circuit actually requires 2 (or more) relays, and technically is it a kind of sensor, but since you indicated a relay was ok, it could work. So given those requirements, do you really need someone to draw it out, or were you just curious?

Simple battery monitoring from http://arduinotronics.blogspot.com/2012/04/voltage-monitor.html
Comment: I think I understood how the voltage detection works on the arduino. Yeah I would kinda need someone to show me how to do it as I'm really not advanced in this territory.
Comment: https://www.google.com/search?q=latching+relay&tbm=isch
Comment: That looks quite complicated, but I'll try to figure it out :)
Comment: I think that was my point, good luck :)
Answer: Have a look here
http://wp.josh.com/2014/11/06/battery-fuel-guage-with-zero-parts-and-zero-pins-on-avr/
It is for bare metal Atmel chip, but applicable to Arduino as well probably.
Step one in getting longer battery life is to move to a bare metal Atmel chip, choose ATMEGA or ATTINY depending on how many pins you need.
Also see my answer here
What are (or how do I use) the power saving options of the Arduino to extend battery life?
Comment: You also probably do not need a relay to disconnect the chip. Assuming you have the chip connected directly to the power supply with no regulator (which you do if you are running off battery), then you can just have your software put the chip into sleep mode which uses a negligible amount of power (micro amps). You can even set things up so that the chip will wake itself when the battery is reconnected to a charger. He is an example circuit and software using an ATTINY that does just that... https://github.com/bigjosh/Vibe-V2
Answer: I'm assuming Arduino is powered directly by the battery, and not via a voltage regulator. In that case you van measure VCC by first measuring the internal 1.1v voltage reference (in relation to Vcc). Since the internal 1.1v is constant and VCC will lower over time, the reading (0-1023) will increase.
See this article:
http://jeelabs.org/2012/05/04/measuring-vcc-via-the-bandgap/


Booting problem from external hard drive

Question: I installed Ubuntu 12.10 on an external hard drive using an Acer One netbook (Windows XP) and used the same external disk with another desktop PC (Windows XP).
Now it does not load Ubuntu. Instead I get an error message: 'hd0 missing' etc. I tried reinstalling Ubuntu, now a grub on text command prompt comes, like grub>.
I don't know what to do now. Any suggestions?
Answer: Did you get into your BIOS and changed the booting order from internal hdd to external?


How do I convert images of a page of text to pure Black & White and sharpen the text?

Question: I'm a research student working with large numbers of archival documents. For speed when at the archives, I photograph the documents (with a decent but not fancy digital camera), producing colour .jpg files. For ease of reading, and to improve detail when printing some of the documents, I would like to convert the images to pure Black and White - not Greyscale - and enhance / sharpen the text. Ideally, I would like the finished image to look more like a photocopied page, with the background, any shadows etc faded as much as possible to improve contrast with the text. I've tried various things but can't quite get it there. Apologies if there's an obvious method I've missed - I'm a GIMP novice. See the sample image for what I'm working with.
Answer: Adjusting brightness/contrast is not easy due to the uneven lighting.
First, to avoid color fringes, you work on a grayscale version of the image, either Image>Mode>Grayscale or Color>Desaturate. If you are using Gimp 2.10, you can also set Image>Precision to 32-bit floating point/linear.
Then you apply the following technique(*) to even the lighting:

duplicate the image layer
apply a Gaussian blur that is sufficient to make the text disappear completely (around 50px on your image)
set the top layer to Grain extract mode
create a new layer with the result: Layer>New from visible

In the resulting layer, the background is gray (around 50%) but is a more uniform gray. In the histogram, this is the big spike. You can then use the Levels tool comfortably to optimize the result. In the "input" settings:

right handle slightly left of the middle of the big spike (anything to its right becomes completely white)
left handle to where the histogram seems to cease (anything to its left becomes completely black)
middle handle adjusted to optimize contrast

The text on the other side of the page shows through and limits a bit your ability to stretch contrast. Next time you take these pictures, bring a dark sheet of paper (ideally, black) that you insert under the page that you are shooting.
(*) To explain a bit:

With the Gaussian blur a pixel value is replaced by the lightness of the area around it (the blur is assumed to be sufficiently wide to make the influence of local details such as text negligible)
The grain extract, which is basically a subtraction subtracts the average lightness of the area from the pixels in the initial image:

for background pixels, the average value of the background around them  is removed, so whatever the initial background lightness, the result is close to zero (actually, 50% gray, since Grain extract adds a bias to the result),
for subject pixels (which are normally quite different from the background) the difference is far from 0 and they remain visible.
Comment: If you have enough memory you can coalesce all your page layers into one big layer, fix that layer, and then split it again (the script that does split/join is [`ofn-layer-tiles`](http://sourceforge.net/projects/gimp-tools/files/scripts/). Since then I have found a quicker method anyway: use `Filters > Enhance > Wavelet decompose` and replace the `Residual` by its own average (`Filters > Blur > Pixellize` using the layer size).
Comment: This is another really helpful answer - even the simple but very useful tip about putting a dark sheet of paper behind the page I'm shooting. That bleed-through effect you mention is a bigger problem with some of the other documents (cheap 1970s government paper!) and was causing problems when I tried to manipulate contrast so it may be worth me re-shooting as you describe. Given that I don't have any control over the lighting in the archives, your suggested method of evening that out may be really helpful.
Comment: Great answer. Only if you or someone else could explain what the Gaussian blur and Grain extract are and how it helps uniform the background ...
Comment: Added some explanation in the answer
Comment: Had a difficult document where this gave excellent results. I improved the result further by using the Dodge tool to increase the brightness of extra dark areas first (after desaturation).
Comment: This is great, thanks. I wish this could be automated (I have a 26 pages document).
Answer: Simple contrast boost will not work because the light is uneven.
The uneven light can be to some degree flattened with high pass filtering. (It's not perfect because missing local contrast will not be fixed). Here's a split view scene from the high pass filter:

Applying curves can be used to increase the contrast. It unfortunately also boosts color differences and all unwanted crap at the edges:

But the edges can be painted white or clipped off and the colors can be desaturated (not done here):

Filter "treshold" makes everything strictly black and white. I found that a steep curve which retains some grayshades, results better readability.
Desaturating in the beginning is in your case useful, because it prevents all color boosting which can be caused (OCR is different, desaturating increases errors). Colored dirt for example could be attacked only if the image was colored. In addition you wanted the result in BW.
This still isn't the best possible apparent contrast. Darker text is available with edge detection. It unfortunately makes the image negative, but the result can be inverted at the same time when the final contrast is stretched to limit with the curves. In the next example the image is at first desaturated, then it got Sobel Edge detection filtering and the screenshot shows the curves tool in use:

Note: The paper edges stayed guite clean witout clipping anything.
Enhancing the letters needs some pattern matching filtering that knows this is typewritten text and replaces the letters with perfect ones. That's OCR.
I believe at least Google likes to read your documents and do the OCR thing for you. As installable software there are commercial packages and FreeOCR.
I cleaned the edges of the output image and dropped it to FreeOCR. Here's the result.

All extra spaces are removed. There's no control over it in FreeOCR.
You see that full check is a must, but it can still be faster than retyping. The next question is What file preprocessing is actually needed for succesful OCR, probably not the highest apparent contrast?
I made some tests. It became clear that highest possible apparent contrast causes errors. Best results needed:

no desaturation, many pieces of crap are colored differently than text, OCR can reject them more easily in colors
high pass filtering to remove overall lightness variations
contrast boost to fade the ghost writing throught the paper.If the ghost has clearly different color, it is not useful to fade it completely, because fading deletes something also in the wanted writing.
cropping off all extra areas

Here's a screenshot:
Comment: This is a really detailed and helpful answer, which I was not expecting but really appreciate. The point about retaining some greyscale to improve readability is particularly helpful, as I was struggling with that. The additional information on OCR is also very helpful - I have tried a couple of tools but the quality was not great, and your explanation has really helped me understand why and how to fix it.
Comment: I've commented on Xenoid's answer too, and upvoted both - apparently invisible because I'm still a noob - and I will accept too!
Comment: @AndrewHarris It's visible now, thnx! Xenoids intuitive method and shooting tip earns well the acceptance.
Answer: This is a complement to my other answer, using new capabilities in Gimp 2.10

De-saturate the image as above
Use Filters>Enhance>Wavelet Decompose
Fill the "Residual" layer with a uniform color. Two ways:

`Filters>Blur>Pixelize and set the "pixel" size to the image size
Use the color picker with a very large radius where th eimage seems to have the average luminosity, and bucket-fill

Layer>New from visible to create a new layer (make sure it is on top of the stack, outside the layer group created by the wavelet decomposition)
You can then use Brighness/Constrast with very few side effects
Comment: This method is excellent, but in comparison to your other method, I had to fiddle more with the sliders to avoid some grain that entered the image.
Answer: I did this by:
Image->Mode->Indexed then select "Use black and white (1 bit) palette"
(Gimp 2.1)


Two phones on one account

Question: I have two phones that are both on one Apple account in Itunes. Now that I am on ICloud updating the two phones are merging information. How do I separate the two phones into distinct accounts?
Answer: You can use different Apple ID's with different services. Create a new Apple ID for the second iPhone and use that ID for iCloud, while still using the same iTunes/App Store login.
There may be a way to manage how the devices sync (using the same account), but I have been using the above method successfully.

Two phones on one account


Production ready smart contracts

Question: How do I make sure that a smart contract is production ready. Other than unit testing, what other methods or tools are currently available ?
Answer: Functional testing is only the first step before deploying your contract to MainNet. Once your contract is doing what you want it to do, you'll want to pay close attention to the following:

Security (very important)
Optimization
Upgradeability

I've put some high level information about each below, but each topic is very involved, so you'll have to do some additional research on your own to learn more.
Security
Security flaws in your contract will make it unusable. You need to protect access to your contract, prevent re-entrancy, perform safe math operations, and make sure your contract has emergency fail-safes in case an issue is discovered after deployment.
The Solidity docs have several pointers to help deal with this. There are also security tools that can analyze your code such as Oyente, SmartCheck, Mythril and several others. See this post on Ethereum StackExchange for more suggestions
Optimization
Optimizing your contracts will help to minimize gas usage resulting in both cost benefits and protects against out of gas exceptions. Are you only storing data that needs to be stored? Are you using the correctly sized data types and ordering the elements of your structs to be tightly packed? Most importantly, are you avoiding expensive loops (or, even worse, nested loops) that can perform an unknown number of iterations?
Look for areas where you can limit code execution, remove loops, short circuit condition checks, etc. There is a well-written paper on smart contract optimization that can be found here.
Upgradeability
Finally, what will you do if you need to release a new version of your contract? If the data your contract relies on is tightly coupled with the business logic of your contract, you will have to migrate all of that data when your business logic changes. That's very costly. Ideally, you'll want to put your data into its own external storage contract that implements an interface, and use that interface to interact with your data from within your business contract.
Here is a blog post that goes into more detail on writing upgradeable contracts and goes through an example.

Production ready smart contracts


Why is using a banjo burner indoors dangerous?

Question: I have a natural gas heater and a natural gas range, both of which could be converted to propane. Why is the carbon monoxide so dangerous with a banjo burner, but not with the heater or range? I've looked around but can't seem to find a definitive answer. There do seem to be a lot of people using camp stoves and other lp stoves indoors without incident. What I can't tell is if they are simply really lucky... I am not referring to any danger from the location of the flame, boil overs or leaky gas lines, etc, purely with respect to the ventilation requirements and carbon monoxide.
Comment: Almost all indoor brewers have a ventilation hood over their brewery to ensure all gas generated is properly ventilated out to prevent any accidents, be it carbon monoxide or moisture build-up, among other potential catastrophes.
Answer: Just don't.
When it goes wrong you end up passed out on the floor with the burner continuing to burn up your oxygen nearby. Bad, bad failure case. In terms of comparison to range, the volume is significantly more, probably orders of magnitude. All those BTUs come at a cost of danger.
Comment: It takes 60,000 BTUs to heat my home. Why doesn't my dog die when she's in her kennel near the heater?
Comment: The burn pattern is completely different. You would never get 5-10g wort up to boil with your home furnace. That said, no one can stop you from using a loaded pistol as a Q-tip; the sight nubbin is just the right size for some people's ears.
Comment: So the technical reason is because of the burn pattern? When my furnace fires up there are 8 x 4-6" flames, a lot more intense than what my burner puts out. At any rate, the questions is regarding the carbon monoxide danger. I am not looking for "do it" or "don't do it", I'm looking for why, and specifically why is the carbon monoxide danger different from other forms of gas usage indoors (or is it?).
Comment: I meant the pattern of gas/time and temperature, not the arrangement of the elements. It sounds like you found this on your own though.
Answer: I don't think the danger is in the output of CO.  CO will pool on the ground rather than up to your face where you breathe.  I think the larger danger is with propane/fuel leakage, which will also pool on the floor... right where you won't be able to quickly register the odor marker and right where the source of ignition will be.
Say you had a leak at the valve that pushed volumes of propane back into a corner, while the bulk of the propane was being delivered to the burner... wait for that area behind the burner to reach a critical volume where that gas is going to push toward the flame and then... get ready to call the roofers!
Answer: I did some more trolling and found this. In the first paragraph; "Properly functioning propane appliances will produce what is called an "ideal burn" during combustion and present no danger of Carbon Monoxide poisoning." The article goes on to indicate the ideal burn is a blue flame. A lean or rich burn however, produces unsafe levels of CO. There are other dangers, but specifically the danger of CO poisoning and why this danger isn't present in a gas stove or heater was the point of the question.
Comment: see also - http://homebrew.stackexchange.com/questions/5804/what-indicates-my-burner-is-at-the-peak-performance/5816#5816


How to level out or grind down concrete basement floor?

Question: I had a french drain installed in my basement and the top of its cement sits around 1/8" to 1/4" of an inch higher then the rest of my basement floor. I need to somehow level this out so I can put flooring down. How would you recommend I do this?
Comment: How does your floor drain if the drain is higher than the floor?
Comment: are you trying to grind down the french drain?
Answer: I'm surprised no one has mentioned this but based on the statement:

I had a french drain installed

it seems to me like if you paid someone (assumption here) to install a drain and they left it in a state where it is going to cause a puddle to form before water is able to drain into it, that it should be the company's responsibility at this point.  At the very least, you should be contacting them to get their explanation as to why it was done that way before attempting to undo what they did.
Comment: I had the same thought. Seems like a fail.
Answer: From the description, I suggest renting a proper concrete grinder (bottom of the page) from your local rental shop or big box. This will allow finer control and result in a flatter, smoother surface than if you attempted to use abrasive or diamond-bitted handheld power tools.
If you'd rather not go that far, an angle grinder with an appropriate disk would do the job. You may need to skim the resulting surface to prep it for vinyl tile or other flooring sensitive to surface texture.
Comment: A grinder with a sanding wheel/disk
Comment: If you grind, use a mask. [Silicosis](https://en.wikipedia.org/wiki/Silicosis) is no fun.
Answer: A big 7" angle grinder with a diamond cup bit would work nicely.  You can also get away with the 'masonry grinding' bit sold at big box stores.  You should try to get a dust shroud as well, as even a small amount of concrete grinding will send fine dust everywhere.
Answer: If it's a small area around the drain, the lowest cost, least-fuss option is one of these grinding blocks (use with some water and you can mop the slurry up rather than deal with dust in the air. Plug the floor drain first.)

The one with the grooves is most applicable.


What is the CiviCRM LTS Version, and should I use it or the latest stable release?

Question: On the CiviCRM download page there is an LTS version underneath the current one. What's the difference, and which should I use?
Answer: LTS stands for Long Term Stable version. It is intended for use on more conservative sites that are more concerned with having a stable CiviCRM environment than with having access to the latest features in CiviCRM. You should decide which type of site yours is.
The LTS version contains all fixes for security vulnerabilities that affect the software, and many but not all of the bug fixes that are available in the stable version. As mentioned, it does not contain the new features made available in more recent versions.
The LTS version tends to be one or two minor versions behind the latest stable version. So a little while after 4.5 was released as the latest stable version, the LTS version switched from 4.2 to 4.4, skipping 4.3. Similarly, in late 2015 likely after 4.7 came out, 4.6 became the LTS version, skipping 4.5. Now that it is April 2016, the expectation is that 4.7 could become the next Long Term Stable release after 4.6, in anticipation of significant changes in 5.0.
But the final decision on this won't likely be made until late 2016 / early 2017.
The benefits of using the LTS (long term stable) release are:

There are fewer unknown bugs in the software since it has been used extensively for a long time.
Upgrading within one release branch like 4.2 or 4.4 is less likely to require extra effort or cause problems than upgrades from 4.2 to 4.3, or 4.4 to 4.5.

Downsides to using LTS include:

Not having access to the features available in more recent versions of CiviCRM.
Not having access to extensions or releases of extensions that are only available for more recent versions of CiviCRM.
Not having access to some bug fixes that are included in more recent versions of CiviCRM (usually ones that are not important or that require a lot of work to backport).
Answer: We advise our customers to stay on the LTS versions of CiviCRM unless they have a functional need for the latest and greatest. This is in line with the detailed explanation that Joe Murray entered (thanks Joe).
Answer: The current trend (although this may change in the future) is for even-numbered versions to get long term support (LTS) while odd numbered versions don't.
If you are installing CiviCRM for the first time, I recommend always going with the latest version and not LTS. This is because there is a cost to upgrading, and starting off on a higher version # means fewer upgrades are in your immediate future.
Once you have been running CiviCRM for a while and newer versions are released, you'll need to decide when to upgrade. There are at least 3 approaches:

Cutting Edge: always upgrade to the latest release to gain the benefits of new features (and possibly face new bugs).
Conservative: always stay on the LTS version, upgrading only when a new LTS is announced and the current one is retired.
Middle-of-the-road: when a new .0 version is announced (e.g. 4.6.0) sit back and wait a few weeks until the majority of bugs are found and fixed, then upgrade when it is at .3 or .4.
Comment: It's worth noting that it's difficult to guess which minor version will become the LTS. So, for instance right now, LTS is 4.4 while latest is 4.6.7. So we might expect 4.6.? to become LTS when 4.7 released ([scheduled Oct 2015](https://civicrm.org/blogs/dave-greenberg/road-map-and-release-schedule-47?q=blogs/dave-greenberg/road-map-and-release-schedule-47)). So it's tempting (if you need features not in LTS) to use latest and hope to hop over to new LTS, but last time I tried this I got ahead of the LTS 4.4 release; i.e. I got stuck on latest.
Comment: I've been thinking about that too. It would be nice if we gave advanced notice (I think it's buried in a blog somewhere, but more prominently) of our intentions. In this case yes, 4.6 will be the next LTS.
Answer: At Cividesk we recommend going with the LTS.  That may be because we help maintain the LTS ;). All security fixes are backported to the LTS and it tends to be more stable than the newest release.  As @Coleman points out the newest release does get more stable over time so this is something to consider as well.


Why is pork derived gelatin haram in Islam?

Question: I understand that the Quran says that the flesh of a pig is forbidden for consumption, but how does that include extracts of pig skin/bones which I believe is the source for gelatin?
Answer: There is consensus that the entirety of a pig is haram1.

أجمعت الأمة على أن الخنزير بجميع أجزائه محرم
The ummah is unanimous that all parts of swine are forbidden
— Tafsir Razi
لا خلاف أن جملة الخنزير محرمة
There is no difference of opinion in that the entirety of a swine is forbidden
— Tafsir Qurtubi
وقوله تعالى : ولحم الخنزير فإنه قد تناول شحمه وعظمه وسائر أجزائه ، ألا ترى أن الشحم المخالط للحم قد اقتضاه اللفظ ؛ لأن اسم اللحم يتناوله ؟ ولا خلاف بين الفقهاء في ذلك
Allah said: "The flesh of swine", and this includes the prohibition of its fat, bones and all parts of its body. Do you not see that when fat is mixed with meat then it comes under the same word, and the noun is inclusive of it. There is no difference of opinion on this among the jurists.
— Tafsir Jassas

Among the basis for this is:

أو لحم خنزير فإنه رجس
or the flesh of swine - for indeed it is impure
— Quran 6:145

The subject of  فإنه رجس (it is impure) is خنزير (swine), so all of it is filth and hence prohibited.
And even if the subject is taken to be لحم خنزير (flesh of swine) then everything that is in contact with the flesh is contaminated by it and hence is impure and forbidden.
Flesh contaminates and is interwoven with both bones:

Note:- Potentially graphic images of flesh, do not move mouse over it if you don't wish to view.

and skin:

The reason Allah specifies لحم (flesh) when prohibiting swine is that it is the part that is most cherished and customarily consumed, and when a prohibition applies to it, it is also implied to everything else and is not limited to it.
An example of this is the following:

يا أيها الذين آمنوا إذا نودي للصلاة من يوم الجمعة فاسعوا إلى ذكر الله وذروا البيع
O you who have believed, when [the adhan] is called for the prayer on the day of Jumu'ah [Friday], then proceed to the remembrance of Allah and leave trade.
—Quran 62:9

This does not mean that only trade is forbidden at that time, and it is permitted to e.g. play board games instead ... but rather trade has been specified because that is what would be customary for people to be doing at that time ... and the prohibition is implied on every activity.

1:Except for its hair. According to some it is permitted to use its hair as a fibre for stitching.
Comment: The subject of فإنه رجس (it is impure) is خنزير (swine), so all of it is filth and hence prohibited. Is the subject in this case not the flesh? That is what I understood when I read it. How is my interpretation incorrect? Thanks.


Is it possible to create a soundproof studio in an apartment?

Question: I have a 70 square meters building apartment, and two pretty decent rooms i could use as a studio. Is it possible to soundproof that good that it's possible to play drums and amplified guitars without it being noisy in other apartments?
Comment: Depends what you mean by noisy... but very unlikely.
Answer: If you're able to spend enough money, anything is possible.
The ideal solution in this case would be to build an isolated room within a room. Using offset studs, so inside and outside walls hang from separate studs, double sheetrock, green glue, and heavy insulation in all walls, including floor and ceiling. This is the technique used in most production facilities to achieve high isolation between the control room and live room.
Whether or not you can do this in your apartment is up to your landlord. You maybe be better off renting a dedicated rehearsal facility.
Answer: It's not going to be possible for less than tens of thousands of dollars.  Even if you have free reign to modify the building as needed, it's still generally easily 5 to 10 grand just to soundproof a room well.  In order to do that when you can't modify the building extensively, you'd basically have to build your own isolated room and then soundproof that.  That isn't going to be cheap at all.


How functional/practical is it to use an hdtv as a computer monitor?

Question: My small (22") monitor went bad on the pc I use to watch hulu/netflix with... The kids like to use this computer to play online games.  I am considering buying a HDTV (~32") to replace the smaller lcd. Is this a viable solution that will give satisfactory performance for both types of use?
Answer: Televisions and monitors have different characteristics, such as brightness, reflectivity, resolution, price, etc.
Typical 32" LCD has 1366 x 766 resolution, and wouldn't be comfortable for daily work. Casual online gaming should be ok though.
Comment: Yep, I've got a 32" with 1366 x 768. It's nice for films and games, but for browsing the web the 768 height feels very small.
Answer: Sure. Current HDTV's are essentially large monitors with TV tuners built in.
There are differences, mainly pixel density (or PPI).. The highest resolution TV you will get is 1920x1080, and it might be 50 inches. I have a 1920x1080 computer monitor and it's only 22 inches - meaning those 1920 pixels are smaller and closer together, thus the image will be sharper on the smaller display.
The lower pixel density is good for TV's, as the size of the screen is much more important, because you tend to sit several meters from the TV.. PC monitors have higher pixel density, and higher resolution because you sit closer to the screen, and it makes things like small text easier to read.
I wouldn't buy an HDTV for a computer if I was planning to do lots of coding, or anything involving reading much text etc.. but for games, or a media center, HDTV's are perfect (I have a 32" HDTV, which is 720p, or about 1280x720 resolution and it's great for films/games, it's fine for web-browsing, but not for too long)
Answer: As long as you use an LCD with a square pixel aspect, sure - no problem at all. If the PC is already an HTPC why not have it connected directly to such a device?
It might lack some features or sharpness (or do way too much post-processing) for it to be comfortable for professional use but for playing games, watching videos and some surfing - definitely usable. Try to get one with a standard native HD resolution so you can easily set the PC at the native resolution as well - to avoid scaling artefacts.
Obviously, playing pc games on it could be quite a ride if trying to sit as close to it as before (keyboard+mouse games) - that's about the only problem I can think of.
Answer: As Dani said, "Typical 32" LCD has 1366 x 766 resolution". The problem is that few video cards support this resolution. The nearest is probably 1360x768 and you can end up with aliasing that makes text look terrible. If you use a DVI to HDMI cable you may find your PC will offer 1:1 pixel mapping to something like 1360x768 with blank strips at the edges of the screen. But it depends on the TV. My cheapo 32" TV insists on scaling the display to fit the screen even through DVI and while it's usable, you wouldn't want to work on it for long.
If you can stretch to a 1080p screen then the problems go away, but of course it would be (much) cheaper to buy a new monitor.
John Rennie
Answer: Yes, you'll get more than satisfactory performance. But choose your TV carefully.
I use a Sony Bravia 32" LCD TV (KLV-32S400A) as a monitor. It's plugged into a Mac Mini via HDMI at full resolution. The image and text quality is just spectacular. Make sure you get a TV that's designed also for use as a monitor. One way to check this is to see the TV settings menu and look out for some options specific to monitor usage. Also a VGA-in connector is also a good sign, as it means the designers specifically expected the TV to be used as a monitor.
Sony is a good choice as they sell their own media center PCs which are designed to be plugged into thier TVs.
And of course, if your graphics card cannot keep up with the TV's HD resolution, then don't bother. You'll hate it.
Comment: Pretty much every flat panel TV I've seen has a VGA connection, even a cheap ~13" standard-def TV! Also, I doubt any vaguely recent graphics card would struggle with 1920x1080, aside from in games maybe..
Comment: VGA-in connections are great, but commonly cannot accept the TV's native resolution. Use HDMI if at all possible.
Answer: The biggest problem I see, is that typical TV has almost no vertical tilt, so you cannot just put it on the table an use it as a really big monitor.
Answer: I have a 50" DLP HDTV. While it is great for movies and gaming, it's pretty terrible for reading text smaller than the standard fonts in Windows Media Center's interface (games with text that I actually need to read aren't pleasant either, like Civ4).
I've seen 27-32" HDTV LCD's that were passable for reading text on, especially when switching to 120 DPI in the display settings.
Answer: I would not pick a TV for computer use. The reasons:

TV's are super bright. Mostly too
much for watching from close. Check
if you can turn it down to say
100-150cd/m2, otherwise skip it.
TV's have a big input lag. Because of
all the image processing, a TV can
take 3-4 frames before it actually
shows the image coming in. That's
frustrating hard core gaming
TV's use more energy. You have to put
them further back for good viewing,
but a smaller screen, at a closer
distance with the same resolution
would give the same usability for
computer use.

If you still consider a TV, check this:

input lag
panel type: lot of small TV's (<32
inch) have cheap TN panels
resolution: 1366x768 is still a very common resolution on a 32 inch or smaller TV. That won't work for computer use.


Do notes duration change depending on the time signature?

Question: Is a Whole note always 4 beats? Why is a dotted quarter 1.5 beats in common time but 1 beat in 6/8 time? how many beats is a quarter note in 6/8 time? I'm really confused.
Comment: I hope I don't need to write a full answer here but I'm skimming and seeing some wrong information. Let me state: a note's length changes relative to the perceived unit pulse. A quarter note in 4/4 is perceived as being 1 beat but in 2/2 would be felt relatively speaking like an 8th note. The same relationship is found for all note values. When you change the unit pulse, either the tempo or the duration must change proportionally.
Comment: Note values never change, period. Rest values are mostly constant too; **however**, a whole rest is always as long as a whole bar, no matter what the signature is. (As usual, ease of notation won out over total consistency.)
Answer: The US names whole note, half note, quarter note, eighth note, etc have some obvious advantages over the UK names semibreve, minim, crotchet, quaver, etc.  However, they introduce a different confusion since the whole note is only the whole bar in 4/4 or 2/2. In 3/4 a whole note is more than a bar and hence not used.  In 5/4, it does not fill a bar.
6/8, and other time signatures with lower number 8, would suggest that the beat is an eighth note or quaver.  However, these are used when it is wished to be able to divide a beat into 3 rather than 2.  There will be 6 8th notes (or others of the same total duration) per bar they will not each be considered a beat.  A beat will be 3 of these hence a dotted quarter note.  These time signatures are called "compound time".
The system is not entirely logical, you just need to remember this quirk.
This Wikipedia article is quite good.
Comment: Yes.  That is the purpose, to allow the beat to be divided into three.  This is done occasionally in other time signatures using triplets but when it is the norm then these compound time signatures are convenient.
Comment: If a beat is a Dotted-crotchet, a quaver is 1/3 of the beat not 1/2 as in other time signatures?
Answer: To further confuse - a 'whole note' is called a semibreve which in itself is half of a breve - a very old note, which ironically translates as 'short'!! That semibreve has become known as a whole note and takes up the full bar (measure) in the common 4/4 time signature.
Its actual played length or duration fills any bar of 4/4, no matter what the tempo (bpm) of the piece is. That tempo is usually the only deciding factor as to how long a beat is.
6/8 time comprises two beats, but each one is actually written as a dotted crotchet, so the whole bar is 3 crotchets long - or put another way, 6 quavers (eighth notes), and counts in two ways - a slow 1-- 2-- or a quicker 123456. This is where it all seems to lose credibility, as we're now in compound duple time. Compound = not standard/straightforward ! But - we're not in 4/4, or even 3/4, so the 'rule' that applied there doesn't have to here.
In 6/8 (and 9/8 and 12/8) one 'beat' is recognised by a dotted crotchet (dotted quarter note), as when writing the music out, it conveys more sense as to the feel of the piece. So, in one way, a 'beat' = a crotchet doesn't transfer happily to this compound time, as now a 'beat' = a dotted crotchet.
In this answer, I've referred to a 'beat' as the overriding pulse of a piece - the foot tapping part.
Yes, most seem to find this concept confusing, but it would appear that no better way of portraying it has revealed itself - yet !
Answer: I've had guitar students who struggle with the issue, so I sympathise with this question. Let me suggest a few thoughts that might help.
I would start with one note and get it absolutely clear in my mind. For instance consider the quarter note. This note is also called the crotchet, and it is one beat long. So it has three different labels. We need to take the time to understand how they are related.
"Quarter note" describes the note proportionally. The most common time signature is 4/4 time (four beats in each bar). In that music a whole note is a note that lasts for a whole bar. By correspondence a half note is two beats, a quarter note is one beat, and so on.
But this does not mean that the quarter note is variable. It is not proportional in all time signatures. What has happened is that 4/4 time, being the most common time signature, has been the foundation for defining the length of a quarter note, and that same label and length flows through to other time signatures.
A good way to get a feel for this is to set up a simple rhythm: listen to a metronome, follow the ticking of a clock, tap your foot. Then start counting 1-2-3-4-1-2-3-4-1-2-3-1-2-3. What you are doing is toggling between 4/4 time and 3/4 time. The length of the note hasn't changed. It's just that in 4/4 time there are four quarter notes, while in 3/4 time there are three quarter notes.
So we have three ways of describing the note. We can call it a quarter note, based on the proportion of a bar that it fills in the default 4/4 time. We can call it a crotchet, based on its historical origin. (I think it is French and has to do with the appearance of the symbol for this note.) Or we can name it a one beat note, based on its length.
In music lessons my habit and my suggestion to my students is that they call it a one beat note until they are confident with note lengths. This has the huge advantage of consistency and clarity. We see this in the OP:

Why is a dotted quarter 1.5 beats in common time but 1 beat in 6/8 time?

In fact this is not the case. The quarter note has the same length in both settings. In 6/8 time the 8 tells us that the bars have an eighth note or half beat rhythm, while the 6 tells us that there are 6 of those half beat notes in each bar. If there are two even notes played in a bar, then those notes will each be three half beats long. That equates to 1 and a half beats, hence the dotted quarter note. (If this is complicated, that illustrates the importance of starting simple and building one's understanding.)
Comment: @n00B That reply is understandable but wrong. You're comparing 6/8 time and 3/4 time. It would be true to say that 6/8 time only has two stresses, but those stresses are 1 and a half beats long as I explained. Consider 6 half beat units. (Tap them out if necessary.) In 3/4 time the stress is on 1, 3 and 5; in 6/8 time the stress is on 1 and 4. If you toggle between the rhythms as per the suggested exercise in my answer, you would count them like this: ONE-two-THREE-four-FIVE-six-ONE-two-three-FOUR-five-six. Different rhythms but the same overall length.
Comment: The crotchet is indeed from the French 'crotchet', meaning 'hook'. However, personally, I think a quaver more resembles a hook...
Comment: Agreed. But then I guess they already named the quaver because it looks like, well, something quavery.
Comment: A dotted quarter is only one beat in 6/8 because 6/8 is a compound duple, worth two beats. If it was 1.5 in 6/8 it will be 3 beats total which is just simple triple time.
Answer: The length of a note is always the same. Neither does it change with time signature, nor with the tempo.
Working in the 4/4 time signature I will explain how this works:
This is a whole note. A whole note is always 2 half notes, 4 quarter notes, 8 eighth notes and etc.

These are two half notes. They together form a whole note.

There are 4 quarter notes. They together form a whole note. In pairs they form two half notes.

This can go on and on. This is how the note duration tree looks:

Here is how dotted notes are formed. I guess you can get the pattern:

If we take the 6/8 time signature (6 notes which are eighth) then a whole note will be a quarter note more than the time signature allow (or two eighth more):

We can count 6/8 (8-2 eighth notes) as 3/4 and this way it's easier to understand that 3/4 is 4-1 quarter notes. Notice that you can always divide the notes using the tree mentioned earlier.
So to fill a 6/8 (3/4) bar we need something that is a quarter less. We can place a half note and a quarter note:

We can also use a different pattern and place a dotted half note which is a half note + a quarter note or we can place two dotted quarter notes:

Each quarter note is a quarter note + an eighth note so we get this:

And each quarter note as we know is formed of two eighth notes so we get this:

Now if we count the amount of eighth notes we get 6. so 6/8 is 6 notes which are eighth.
Comment: Why the downvotes? This is absolutely correct information.
Comment: Maybe because the numbers should represent fractions, and they don't look that way.
Comment: Maybe also because you have given facts but not clarity. For example, your first sentence is ambiguous and (as it currently stands) is wrong. "The length of a note is always the same." But notes can be of any length. I presume you mean that a specific note symbol will always have a consistent length. But that's not what you say.


How insecure are non-cryptographic random number generators?

Question: I always hear that C rand() is not secure, but what how many calls would you need to know in order to predict the next value (or at least cut down the possibilities)? Would they have to be sequential? If there isn't good information about rand() I am interested in any other widely used random number generators.
Comment: This question is too broad.  No one can give you a concrete answer about the entire category of non-cryptographic pseudorandom number generators.  Instead, you should pick a particular non-cryptographic pseudorandom number generator and ask about that specific one algorithm.
Comment: [Mersenne twister version MT19937](https://en.wikipedia.org/wiki/Mersenne_twister) is not secure, you can predict it given only 624 readings.
Answer: It generally depends on the implementation. For the mostpart, you're going to be looking at Linear Congruence Generators, or Linear Feedback Shift Registers.
A common problem with these types of generators is that their period is generally quite short, and that their mathematical form implies deterministic generation. As such, you can (generally) break them in a few hundred calls or less. Sequential results do make breaking the algorithm easier, since you can make stronger correlations that way, but they're not necessary.
The largest flaw with "novel" generators is that the seed is insufficiently large. For example, if you have a generator with a 32-bit seed and know the first 20 values of the generator, it's trivial to brute force. Just generate a sequence for each seed from 0 to 2^32, and compare it. You can employ early-out optimisation to massively reduce the computational cost of this.
Pseudo code:
// the known values from the generator
byte[] knownValues = { 9, 55, 201, 50, 41, 111, 67, 44, 122, 66 };

for(seed = 0 to 2^32)
{
    srand(seed);

    bool found = true;
    for(n = 0 to len(knownValues))
    {
        if(rand() != knownValues[n])
        {
            found = false;
            break;
        }
    }

    if(found == true)
    {
        print "Found potential seed: " + seed + "\n";
    }
}

With a reasonably fast RNG and some decent hardware, this definitely becomes a plausible attack.
I recommend you read through the following for a thorough explanation:

Random Number Generator Designs - Andreas Zeller, Stephan Neuhaus [pdf]
Randomness in Cryptography - Erik Sonnleitner [pdf]
Applied Cryptography - Bruce Schneier
Answer: Implementations of rand() vary from system to system.  I've looked at several of them, and the security varies from godawful to absolutely godawful.  You definitely do not want to use rand() for anything cryptographic.
On some systems, one output from rand() is enough to recover the seed and predict all future outputs.  On others, you need 2 outputs from rand().  On some systems, if you look at the sequence of outputs from rand()&1, you find that you always get the sequence 0,1,0,1,0,1,... -- in other words, the least significant bits of consecutive outputs from rand() alternate between 0 and 1 (i.e., the outputs from rand() alternate between odd and even).
How insecure is it?  As insecure as you could possibly imagine.
Answer: I don't know the exact implementation used for rand() so I will instead answer a general case.
A popular non-cryptographic random generator is the Linear Congruence Generator. This can be predicted with less than 10 sequential calls*.
*: The upper bound is probably much lower but this was given as a first week assignment in an introductory course on cryptography which says something about how easy they are to break.
Answer: CSPRNGs are a subset of PRNGs. A PRNG just needs to be statistically random. A CSPRNG needs to be statistically random and hold up against cryptanalysis to determine past or future values even when a good amount of information is known about initial and/or past values.
All PRNGs are secure enough when you simply need a value that is statistically random (like password salts or random user ids); however, a CSPRNG is necessary when the system that makes use of statistically random values needs to withstand cryptanalysis (use in cryptography).


Can consuming acidic drinks help kill bacteria in the stomach?

Question: All around us we hear and read articles which suggest that soft drinks or carbonated beverages are acidic and damage our body but we still consume them (or atleast a significant proportion of us do). Why doesn't consuming such drinks during a bacterial infection in stomach help to kill all the bacteria?
Comment: The stomach is already full of gastric acid (pH 1.5 - 3.5). So anything that lives in the stomach must already be able to survive low pH conditions
Comment: @divibisan Thanks Man totally missed this point
Answer: There is insufficient evidence to claim that soft drinks can kill microbes in the human gut; sugar in them could actually stimulate their growth.
Natural acidity of the gastric juice with pH 1.5-3.5 kills a lot of microbes (Medline Plus, Journal of Medical Microbiology). The pH of common soft drinks is 2.5-3.4 (PubMed, Fig.1). So, drinking soft drinks does not likely make the gastric juice more acidic.
According to one in vitro study, soft drinks can help to kill some bacteria (ResearchGate, 2015). In another in vitro study, they did not observe any antimicrobial activity of Coca Cola (Journal of Food Protection, 2007).
Comment: I deleted that part to prevent confusion, because the emphasis in the question was only on acidity not on carbonation.
Comment: [This article](https://jfoodprotection.org/doi/pdf/10.4315/0362-028X-70.5.1194) shows that carbonated beverages (Coca cola and Beer) have no direct bactericidal effect. However, these drinks may possibly increase stomach acidity.
Comment: Yes, OK; it's always some study will say something works and another study it doesn't. I'll search into it a bit more.
Comment: I'm a bit skeptical of that traveller's diarrhea quote... if a carbonated beverage is sealed from a safe source (e.g., a 20oz bottle of Coke), it's safe to drink but that safety has nothing to do with the acidity. If a carbonated beverage comes from a soda fountain it's local water mixed with a syrup. It would have to be acidic enough to kill pathogens present in the original water source, and if those pathogens can't survive 5 minutes in an acidic soda they aren't going to last any longer in the stomach. Am I missing something?
Answer: I don't know if soft drinks can help ward off bacterial infections in the stomach, however if you're not taking antibiotics, other acidic compounds can be helpful for that. One of these is apple cider vinegar, you will find many videos on youtube about it. Another is betain-HCL, which is actually hydrochloric acid, the same acid we have in our stomach but it's more expensive than ACV.
There is a big misconception regarding stomach acid problems and their treatment, and people should first check whether they have low or high acid level in their stomach, as both have almost the same symptoms. You can do that with a simple bicarbonate test.
I was diagnosed with mild GERD (gastroesophageal reflux disease), and I was surprised to learn that, contrary to popular belief, this common digestive problem does not arise from excess acid in the stomach but on the contrary from having too low acid, which causes the valve that we have at the bottom of our esophagus, called LES, to relax, so that the acidic content of the stomach goes up and reaches the delicate mucosa of the esophagus triggering the burning sensation, especially after a heavy meal.
Having low acid is something you want to avoid not only because you are more prone to digestive problems due to improperly broken down proteins, but also to infections - our food is not 100% sterile, bacteria are everywhere and even after washing or cooking there will always be some in our food, they don't create problems to us simply because they get killed in the stomach.
The worst part of the GERD epidemics in the Western world due to excess and bad eating, is that doctors prescribe you acid reducers (so called proton pump inhibitors, they go with various brand names that contain omeprazole, lansoprazole, etc.) which further lower the acid content of the stomach. Doctors should know that, right? Well this drugs put you at higher risk of infections, given that in the long term they can lower the acid content in the stomach down to 5% of the normal level! Which is like inviting bacteria to a party. As if this were not enough, once you take them is very difficult to stop and get rid of their side effects, as there will be a rebound effect after a few days, with symptoms even worse than before you started the treatment, so you are literally bound to them. The only way to get rid of them is decreasing the dosage very slowly over a long period of time, usually months, while taking substitutes.
My doctor didn't give me acid reducers, instead he told me that if I like soft drinks I can try coke zero, which has zero calories but still retains the acidity necessary to raise the stomach acid and help with digestion, and it works! Later I found that the same effect is given by apple cider vinegar and also vitamin C, aka ascorbic acid, and now I tend to prefer the vitamin over the rest.
Comment: The bicarbonate test in the video is not a reliable test for the lack of stomach acid. Acid is secreted during meals, but between meals you can have very little acid in the stomach. There's another video in which someone claims that GERD is caused by lack of gastric acid, but I have found any evidence from any reliable source. The question is if acidic drinks can kill bacteria. I have found no evidence that apple cider vinegar kills them. Can you provide links for your claims from reliable sources?
Answer: Carbonic acid (H2CO3) itself in the human body is not stable and falls apart to water and carbon dioxide. When you consume anything by eating/drinking it and swallowing it via the gastro-instestinal tract, it does not enter your bloodstream directly but instead is filtered by various organs first and in many cases undergoes a transformation (First pass effect). In this case the main organ dealing with the drink would be the kidney.
So to answer your question more concisely: it is not stable, and it can not pass the apical cell membranes freely (especially in the proximal kidney tubuli). This is done by the body on purpose because if it could pass freely it would disrupt the pH balance (more specifically the bicarbonate buffer system) of the body. There are different mechanisms in the body that regulate this (look up any physiology textbook).


Web service for converting YouTube videos to MP3 files

Question: I need to create a web service that given a YouTube URL will output a MP3 file with the audio of the video, and was wondering how I could host something like this. Amazon EC2, or just normal web hosting?
Answer: You'll need more than just shared hosting, more like a virtual or dedicated machine considering the amount of customisation you'll be doing to the instance. You could do it on EC2 or any of the other 'cloud' providers (linode etc) or on a "normal" web host who offers virtual/dedicated hosting.
Answer: There are probably some open source converters in Linux that could pull out the audio for you.
I agree with micmcg you need a virtual host not just an ISP.  And in addition, the choice of which hosting provider may all really boil down to a question of cost and maybe performance.
http://aws.amazon.com/ec2/#pricing  says that inbound traffic to EC2 is free until June 30.  That video file that will need to be download will be inbound traffic, and can get pretty big..., but downloading that into EC2 will be free.
The outbound side of EC2, though, costs $0.15/Gb.  And then there's the instance charge of $0.10/instance per CLOCK hour.  Thats not a cpu hour, thats $0.10 per hour, $2.40 per day, $72 per month.  And the $0.10 instances -- the last time I tried EC2 -- were about as fast as my old Fujitsu P2040 laptop from 2002.
If you were with Linode, you get decent performance by bursting over a multicore cpus at no charge, and you get generous traffic allotments.  The monthly charge for presence could be less or more than $72/month depending on how much RAM you want and how many others you are willing to share with in a shared virtual-hosting environment.  But you will have to count up those videos you are downloading somehow.  The charge for going over a traffic allotment is steeper than renting a new virtual machine, and they have an API that lets you add machines to your account programmatically and deallocate for pro-rate refunds (sounds like an accounting nightmare but would be fun to play with).


Where do I look up to see Performance related issues in SharePoint 2010?

Question: I want to be aware of performance related issues with SharePoint 2010 while I'm designing my solutons. What's the best place to look up?
Answer: SharePoint performance is a very broad subject. A good source of information is the various whitepapers Microsoft have published, but it can be heavy reading. If possible do some prototyping. If performance is an issue:
1) Use the logging database (configure health and data collection in Central Administration->Monitoring->Reporting->Configure usage and health data collection) and use administrative reports to locate the slow pages(Central Administration->Monitoring->Reporting->View administrative reports).
2) Enable the Developer Dashboard for the pages you are interested in (this is not just useful for developers, despite the name) to pinpoint the source of problems, e.g. slow web part on page.
3) You can also use web analytics reports to identify pages that are giving users problems.
A good starting point for monitoring is TechNet.
Answer: Tobias Zimmergren has a good guide here: Developing for performance
Answer: I recommend the SharePoint Pod Show cast on Performance Tuning in SP2010.
Also look at Firefox plugins like FireBug and perhaps ySlow.


(If and) Why does cold temperature affect semiconductors?

Question: I had a college student build an overclocked PC using phase-change technology.  (This is essentially an air-conditioning unit with the evaporator attached directly to the motherboard.)  He said that cold temperature made the CPU more stable at higher clock speeds (5.5 GHz) by affecting how the atoms and electrons behave.  My question is, is this true?  If so, in what way does cold temperature affect semiconductors?
Comment: See my [question on my lab results](http://physics.stackexchange.com/q/89389/5705). We measured the dependence of the conductivity from the temperature and plotted the results.
Answer: I am not really an expert on solid state physics, and I'm prepared to look an idiot here - but I don't think it's the low temperatures that help.
By overclocking a CPU 5.5 GHz you are almost doubling the power consumption and hence the dissipation. A large reduction in the temperature of the cold site of the heat sink helps it remove twice as much power while keeping the hot side (i.e. the CPU) at a reasonable temperature.
Resistance of semiconductors increases at lower temperatures and certainly once you get to cryogenic temps (below 100 K) you are very limited in the types of IC devices you can use and their performance.
I suspect that running at 5.5 GHz, putting out several hundred watts then even if the heat sink is in liquid nitrogen the CPU core is still near room temperature.
Comment: I'm saying that the impressive cooling systems (some even use LN2!) used to clock a CPU at 2x it's spec is in order to get the heat out rather than improving the semiconductor performance by having the CPU core operating at very low temperatures.
Comment: This is not true-- overclockers routinely manage to get the heat out efficiently, just by putting a liquid next to the chip instead of air. The heat conductivity of a liquid is higher than that of air, and it cools the solid chip more efficiently. Actually, I don't get what this answer is trying to say--- is it saying you can't reduce the heat in the chip? Or that it requires liquid nitrogen? Neither is true.
Comment: I see, that makes sense.
Comment: @Ron - just reread my post, I didn't mean to claim that you needed a lower T_cold. In fact you just need to maintain the previous T_cold with  more power. I've rewritten the answer - thanks
Comment: The temperatures that the surface of the chip are experiencing are -40 C.  I agree that the primary purpose is to remove heat, but CPU stability is also an issue here, right?  I was told that stability is an issue of the materials that the CPU is made of, and varies from CPU to CPU.
Comment: @n.taco you might need -40C to extract 200W and keep the core temp in range. If CPUs performed much better at -40C we would cool them more. At least in the supercomputer world where we pay $M, we would buy a deep freeze!
Comment: +1. The point of "cooling" a CPU is not to lower its temperature. The point of "cooling" a CPU is to try to keep the core CPU temperature below the melting point.
Answer: Temperature certainly affects semiconductors.
As someone who is not specialized in semiconductors, I can think of at least two microscopic effects at play here. The first is that at lower temperatures there are less phonons (quantized vibrations of the atomic lattice). The effect of phonons is to scatter the electrons and lower the conductance of the semiconductor. Thus at lower temperatures the conductance should be increased (as in the case of metals).
The second effect is that as the temperature is lowered, the fraction of electrons on high energy states is lowered (and on low energy states increased) thus potentially changing the amount of electrons electrons above/below the band gap (carrier concentration). The effect of this is more complex than the effect of phonons.
Comment: Although the other explanations are good, they focus on the practical effects of CPU cooling rather than the underlying physics, the latter of which was the answer I was looking for.
Answer: That is true. "Another reason that electronics has been operated at low temperatures is improved performance of the cooled electronics itself. Improvement upon cooling results from a combination of effects: in general, transistors (field-effect types) exhibit increased gain and speed and lower leakage; also parasitic resistances and capacitances in interconnections decrease, heat transfer improves, and many devices exhibit lower noise." (http://www.extremetemperatureelectronics.com/tutorial1.html)
Answer: Being too cold or too hot can cause problems in either case. Conductance at semiconductor junctions change with temperature. The junctions are more conductive at lower temperatures thus increasing switching speeds and less conductive at high temperatures thus decreasing switching speed.
It is this variation of switching speed that can cause different operating characteristics. Some parts of your circuit might start switching too fast or too slow for other parts. The idea of heating and cooling is to keep the entire circuit in the required temperature operating range. Also not to mention the obvious that if you are dumping 35 watts of power with nowhere for the power to go you are going to burn up your part.
This problem is first addressed at the design level by selecting parts with acceptable switching characteristics across the entire range of temperatures required for operation. Then it is the responsibility of the user to make sure that the design is kept in this temperature range during operation.


Cheapest way to enhance soundproofing for an apartment door?

Question: I have lived in a studio for two months. The door seems quite thin because I can hear every move outside my room very clearly as if there is no door. How can I reduce the noise from outside my door in a way that induces least cost? I have filled every gap along the door but it does not help significantly. Thank you.
Answer: You've already done what you can by blocking gaps around the door.
Next, You can try hanging mover's mats from strong portable over-the-door hooks
Overlap the opening on either side of the door as best you can. Keep the length sufficient to clear the floor as you swing the door open and closed. The mass of the mats and their thick multi-layer construction will block most all but the sounds by contact with the floor from composition shoe heels and similar objects.
You can take them with you as they're not permanent. You can wrap the mover's mat to protect your belongings when you relocate.
If you buy new, when you get to a more private place, they'll make fantastic warm blankets on a cold day.

Comment: Thanks. In fact I did not grow up in the US. Could you let me know by the way how much does it cost to have the necessary stuff you were referring to? Thanks. Of a normal quality suffices.
Comment: @GaryMoore Over-the-door hooks are less than $5 Canadian. The thick-heavy "moving blankets" are stock items from moving companies and truck rental agencies. They would probably be ~ $10 (72" x 54"). Online, they are for sale 6 for $60 Canadian, plus delivery. You might need more than one if they are too thin.
Comment: @Alex Thanx for the formatting. I expected you days ago.
Comment: @Stan Haha, you're welcome. It's not like you could've done it like me from the beginning. Just an `m` at the end of the link and a `"Click photo for full size."` after the link. I'm not mad, though. Actually quite pleased to be something like a local celebrity. And sorry for the delay.
Answer: To Stan's answer, I would simple add: You could also use an area carpet. Check Craig'sList —people give away these rugs all the time. You can find gently used ones and even new rugs for free.

A decorative carpet could be a more attractive and possibly free, sound-proofing solution. I found this area rug FREE on Craigslist just now.
Comment: Thanks! I never tried Craig'slist just heard of it before.
Answer:
Line the inside of the door with an insulating material.  Do a google search for: "noise insulation with foam"  to get lots of ideas and prices and sources.
Can't resist  :-)  ---- get earplugs or earphones with your favorite music.
Comment: Thanks. I know that you are kidding with point 2, my joking reply is that then someone has to compensate me in monetary form for having to do the additional action
Answer: At the hardware store look for look for rubber weather striping designed for exterior doors. Imagine a rubber flap surrounding your door on 4 sides.
The moving blanket idea mentioned previously is great. Motion Picture crews use them all the time to absorb sound. Also called "furniture pads'


Windshield washer fluid for sticky bugs

Question: Driving at night and in rural areas I pickup a lot of BIG sticky bugs on the windshield. Even with new wipers on the vehicle I often cannot wash/wipe the bugs off sufficiently while going down the road. Are some washer fluids better at removing sticky bugs?
Answer: Yes, there is special windshield washer fluid that is designed specifically to remove the remains of bugs from your windshield.
I don't know what the active ingredient is in these formula's.  I have used this fluid and did not seem to do any harm to the paint of my vehicle either.
All the major auto parts stores have several brands of this type of washer fluid on their shelves.
My own experience is that it works pretty good.  Better than water.
Answer: I have found the real key to getting the bugs off is, the shorter they are on the windshield, the easier they come off the windshield. If you are in a swarm, I understand this can use a lot of washer fluid and will keep the wipers in the on position a lot. Been there; done that. ( Try travelling in southern Virginia in the summer time at dusk and see the green glow of lightning bugs as they cover the windshield. )
Something which may help you in the future is to apply a product like Rain-X. It says on their product page:

Product Features

Improve all-weather visibility, safety and driving comfort
Helps easily remove frost, ice, salt, mud and bugs

This along with the windshield washer fluid to help the repellent part stay good on your windshield will help tremendously with removing bugs when the go splat. Personal experience with the product allows me to state this is a good product.
NOTE: I have no affiliation with the product nor the company which manufactures it.

Windshield washer fluid for sticky bugs


Philosophical proofs that God must be triune?

Question: I have heard that many philosophers wrote that God must be triune. What were their arguments? What are some references regarding this topic?
Comment: I really  suggest making this a broad overview question. There are probably only a relatively small number of major arguments for the idea. Focusing on the major arguments rather than the arguers might be a better question.
Comment: @Geremia That was a very inappropriate edit - you changed the meaning substantially, and made it too broad! As it was originally, it could've just been made a duplicate of the Biblical basis for the Trinity question.
Comment: Welcome. There are hundreds of books on the trinity, and asking for a list of them is too broad for this site.  I'd recommend searching for "trinity" on your favorite book vendor's website and reading the reviews given.  When you get a chance, I hope you'll take a minute to take the [tour] and learn [how this site is different from others](http://meta.christianity.stackexchange.com/a/1809/21576).
Comment: @Maickel Please see [What is the Biblical basis for the doctrine of the Trinity?](http://christianity.stackexchange.com/q/72/6071)
Comment: @curiousdannii The original question and my edited version are not asking about the Biblical basis for the Trinity.
Comment: How is this question too broad?
Comment: [A similar question on Philosophy.SE](https://philosophy.stackexchange.com/q/22549/2014) was also closed, and the commenters there said such a question would be suited for Christianity.SE…
Comment: You would like this recent article: Ugwuanyi, Faustinus Ik. "[Why Aquinas Stopped Commenting on Boethius's _De Trinitate_](https://isidore.co/misc/Physics%20papers%20and%20books/Zotero/storage/TF4ZAJM7/Ugwuanyi%20-%202020%20-%20Why%20Aquinas%20Stopped%20Commenting%20on%20Boethius%e2%80%99s%20De%20Tr.pdf)." _Studia Gilsoniana_ 9, no. 1 (March 2020): 167–88. DOI: 10.26385/SG.090106.
Answer: St. Thomas Aquinas, addressing the question of "Whether the trinity of the divine persons can be known by natural reason?" (Summa Theologica I q. 32 a. 1), considered it "impossible to attain to the knowledge of the Trinity by natural reason." He listed some objections to his opinion, in which theologians and philosophers tried to prove that God is triune:

Objection 1: It would seem that the trinity of the divine persons can be known by natural reason. For philosophers came to the knowledge of God not otherwise than by natural reason. Now we find that they said many things about the trinity of persons, for

Aristotle says (De Coelo et Mundo i, 2): "Through this number"—namely, three—"we bring ourselves to acknowledge the greatness of one God, surpassing all things created."

And

Augustine says (Confess. vii, 9): "I have read in their works, not in so many words, but enforced by many and various reasons, that in the beginning was the Word, and the Word was with God, and the Word was God," and so on; in which passage the distinction of persons is laid down.
We read, moreover, in a gloss on Rm. 1 and Ex. 8 that the magicians of Pharaoh failed in the third sign—that is, as regards knowledge of a third person—i.e. of the Holy Ghost —and thus it is clear that they knew at least two persons.

Likewise

Trismegistus says: "The monad begot a monad, and reflected upon itself its own heat." By which words the generation of the Son and procession of the Holy Ghost seem to be indicated.

Therefore knowledge of the divine persons can be obtained by natural reason.
Objection 2: Further,

Richard St. Victor says (De Trin. i, 4): "I believe without doubt that probable and even necessary arguments can be found for any explanation of the truth." So even to prove the Trinity some have brought forward a reason from the infinite goodness of God, who communicates Himself infinitely in the procession of the divine persons; while some are moved by the consideration that "no good thing can be joyfully possessed without partnership."
Augustine proceeds (De Trin. x, 4; x, 11,12) to prove the trinity of persons by the procession of the word and of love in our own mind; and we have followed him in this (Question [27], Articles 1,3).

Therefore the trinity of persons can be known by natural reason.

Fr. Réginald Garrigou-Lagrange, O.P., commentating on this passage in ch. 6, "The Knowability of the Divine Persons," of his De Deo Trino, gives some examples of philosophers and theologians who, contrary to St. Thomas, did think it is possibility to know God is triune from natural reason:

State of the question. The question is well put by St. Thomas in the three difficulties proposed at the beginning of the article.

Many Platonic and Neoplatonic philosophers admitted a certain kind of Trinity with three hypostases, namely, the One, the Logos, and the world soul.
Richard of St. Victor tried to demonstrate the Trinity from the infinity of the divine goodness, which communicates itself infinitely in the procession of the three divine persons and from the fact that there can be no joyous possession of any good without some consort or association in that enjoyment. In a similar way, St. Augustine proceeded to show the Trinity of persons from the procession of the word and of love in our human minds.
If the mystery of the Trinity had no relation to our reason, its revelation would seem to be superfluous.

We might add that Abelard tried to demonstrate the Trinity.[333] St. Anselm frequently attempted to construct demonstrations to prove the Trinity and sometimes indulged in what were at least wordy extravagances. In recent times Guenther also wished to demonstrate this mystery,[334] as did Rosmini, who brought down on himself the Church's condemnation.[335] More recently Schell, in opposition to the rationalists and Unitarians, who said this mystery was openly opposed to reason, tried to prove the Trinity from the nexus between aseity and immanent processions.[336]
NOTES

Theologia christiana, I, 5
Cf. Vacant, Etudes sur le Concile Vatican, I, 130
Denz., no. 1915
Pesch, Dogmatica, p. 274


Does blocking others remove me from their recent players list? How can I clear the list?

Question: I recently added someone on my friend's list on diablo3, and good god he is not only a total prick to my other friends and constantly bashing them, but he is stalking me!  I have blocked him and reported him, but he seems to know when I'm playing diablo because he starts sending me emails confronting me.  I've blocked his emails too, but of course you can make unlimited email accounts.  I'm also afraid he is pestering my friends on his recent players list too...
Answer: I do believe your best bet is to contact Blizzard with this thing. I don't think you can affect the recent player list of others.
Heck, even if it IS possible to affect someone else's recent player list (I'm sure someone will correct me if this is the case), you should still contact Blizzard!


Prior art for US20140314679

Question: In reference to the patent: US20140314679
Would the following applications qualify as prior art for this?

US20100240990
CA2692570A1
Answer: I've down-voted vallismortis's answer because it falsely states that the claims of an earlier patent application are related to it's acting as prior art to a later patent application.  When it comes to prior art, what matters is what a publications teaches as a whole.  If the publication is a patent publication, that includes its full descriptions, claims, abstract, figures, title, etc.  So if a prior patent publication as a whole teaches or suggests what is claimed in a later filed patent application, then it can be cited as prior art against the later application.
I also disagree with vallismortis's advice to "not be overly concerned about any of these applications...".  Never underestimate the ability of a determined applicant to get a patent to issue on an important invention.  They can change or modify the claims as many times as they want until they find something the examiner can agree on.
If you want to track what happens to this patent application, you can follow it at http://portal.uspto.gov/pair/PublicPair  Type in the publication number and you can see if the claims have been rejected, what the prior art cited was and how the applicant has responded.
Answer: You need to compare the independent claims of the applications. Let's look at the independent claims of the earlier applications first:
US 20100240990 A1 and CA2692570 A1 were filed by the same inventors and have identical claims, which makes this analysis slightly easier. I will refer to these simply as 'the earlier application'.

Claim 1. A method of diagnosis and treatment of malignant tumours and comprising the steps of:

locating an area containing lymph systems including sentinel lymph nodes and lymph ducts which drain the area around a tumour;
injecting a magnetic particle-containing marker compound in the region around said tumour, said compound migrating into said sentinel lymph nodes and lymph system which drain the area around a tumour;
making images of such area, by methods selected from the group comprising, X-ray, Ultrasound and the like, and identifying locations of sentinel lymph nodes therein;
conducting biopsies of sentinel lymph nodes responding to said marker compound to determine the tumour status of such sentinel lymph nodes;
operating to remove both the malignant tumour and tumour-invaded lymph nodes.

Claim 1 comprises injecting a magnetic particle-containing marker compound in the region around a tumor, where the compound migrates into surrounding sentinel lymph nodes.

Claim 12. A compound for marking sentinel lymph nodes in a drainage area around a malignant tumour and comprising; magnetic particles containing marker compound consists of Co+2, Co+3, Fe+2, Fe+3 and/or their oxides including magnetite [Fe(FeO2)2] and/or complexes with Mn, Zn, Cr, and a carrier.

US 20140314679 A1

Claim 1. A hypoosmotic suspension for medical injection comprising:

about 13 mg/mL to about 200 mg/mL of magnetic particles;
and an osmolyte selected from either about 0.01% w/v to about 0.6% w/v of an inorganic salt or about 0.5% w/v to about 1.5% w/v of a glycol.

Claim 1 is limited specifically to the composition of a hypoosmotic suspension of magnetic particles and an osmolyte.
Compare this to the description of the earlier application:

The suspensions can have about 13 mg/mL of magnetic particles, about
  28 mg/mL of magnetic particles, 56 mg/ml of magnetic particles, 100
  mg/ml of magnetic particles, 140 mg/ml of magnetic particles or about
  200 mg/mL of magnetic particles.
The suspension can have an osmolality of about 80 mOsm/kg to about 160
  mOsm/kg.

The exact formula is reproduced in the later application, and should certainly be considered Prior Art.

Claim 26. A method of locating a lymph node in a patient, the method comprising the steps of:

providing a hypoosmotic suspension comprising magnetic particles;
injecting the hypoosmotic suspension into the patient;
and detecting a lymph node within 10 minutes of injection by detecting the location of the magnetic particles, the detecting sufficient to immediately begin a medical procedure on the lymph node based on the detecting.

Claim 26 is broader than Claim 1 of the earlier application because it does not specify the exact composition of the hypoosmotic suspension. It is also written more broadly than Claim 1 of the earlier application because it does not specify any of the following: the presence of a tumor, the location for injection, making images of an area containing lymph nodes, a biopsy or an operation. It is limited specifically to detecting a lymph node within 10 minutes using a hypoosmotic suspension containing magnetic particles. Therefore, Claim 1 of the earlier application should be considered Prior Art for Claim 26 of the later application.
In conclusion, given the independent claims and description of the earlier application, the independent claims of the later application are neither novel nor do they contain an inventive step.
That said, I wouldn't be overly concerned about any of these applications, since none of them have yet been granted. The examiners are usually pretty good about finding this material, and in the case of the later patent, I believe the claims are too broad to be considered novel even in the absence of the earlier applications.

Prior art for US20140314679


VNC Locking Up After Authentication Failures

Question: I have VNC server set up on a Mint machine and need to have 1 or 2 users access a program on the server.  It's all working except that the port is getting NUMEROUS attempts to login to VNC from all over the world, clearly not my 1 or 2 users.   After some number of failed attempts, VNC just shuts down and refuses all access attempts.  I then have to stop and restart the service.  The bogus logins usually cause VNC to lock up within a half hour of restarting.   I don't want to have to manually do this everytime a valid user tries to login and I already put a couple of kill/start instructions in crontab but having crontab doing this every hour seems wrong.  Is there a way to have VNC lockout bogus login attempts without locking everyone out?   Is there a way to whitelist specific IP addresses?
Answer: You could try changing the VNC server port to something different to prevent most of the bogus logins.
Additionally, use the firewall on the VNC server to whitelist only certain IP from connecting to the VNC ports


Why was the thief in jail when he could easily escape?

Question: When Finn and Rose Tico were in the jail cell where they met the thief, why was the thief even there, if he could just easily escape with basically no effort?
Answer: He got himself arrested so the police would stop bothering him.
Taken from p. 65 of The Last Jedi Visual Dictionary:

Already known to local authorities, DJ purposely arranges his own arrest for a petty crime. The jail is the only place he can grab some sleep with the assurance that he won't be pestered by the Canto Bight Police Department.
Comment: How canon are things like the cross-sections and the visual dictionaries?
Comment: @JasonK I would say very since they are often updated and give additional information--it's one reason a person would want to collect them. Wookieepedia uses them, especially the VDs, as a source often.
Comment: This is the most satisfying answer I've ever received to any question I've ever asked.
Answer: From my interpretation, DJ seemed to be bored before he encountered Finn and crew.  He had a very relaxed demeanor, indicating that he wasn't stressed out about where he was at all because, as we find out, he could leave at any time.
I think he was probably captured after breaking in somewhere, possibly stealing something, and was locked up and possibly awaiting further processing.  He also quite possibly could have been waiting for particular events to happen (changing of guards, casino slowing down for the night, etc.) before making his escape, and finding Finn and Rose accelerated his plans.
Answer: Well DJ is not actually the character's real name, but is an abreviation for the philosophy of what DJ believes in: Don't Join.

The Star Wars The Last Jedi The Visual Dictionary reveals "DJ" aren't
  his initials but actually stands for "Don't Join." Indeed, his cap
  bears a tin plate with the motto "don't join" stamped on it.
DJ is a cynical, opportunistic survivor who sees society as imbalanced
  in favor of the wealthy and holds little regard for the First Order,
  the Resistance, or the New Republic. "He thinks larger causes are for
  fools, since society is just a machine looking to turn everyone into a
  cog," according to the book.
  http://www.ign.com/articles/2017/12/17/star-wars-the-last-jedi-why-benicio-del-toros-character-is-named-dj

So although this does not explain this potential DJ "set-up" (juxtaposition to "Old Wookiee Prisoner Trick"), it may shed some light on where his mind is.
With the idea of being an anarchist, he may be willing to turn on anyone in order to achieve some goal of wealth-equality. On the other hand, "not joining" is another way to say, "doesn't belong to" and therefor there is an irony in that 'every man for himself' usually does not equivicate a better society, so DJ almost seems like a lost cause at this point...
Obvioiusly though, this is speculative and does not explain to what end DJ is working towards, which would give us a better reason why he was in the cell and if he was in fact waiting for Finn/Rose or any other "criminal" bystander. Perhaps the novelization, which is out in April may shed more light on this. Also there is a Canto Bight Novella, but I have not read it.
Comment: Just a theory to throw out there: When casting had first gone out and it was said that Gugu Mbatha Raw was in the running, the thought crossed my mind that Del Toro might be playing Kes Dameron as I could see them both being his parents (albiet aging-up GMR a bit) via Shattered Empire comic images--knowing DJ is not his name, I still wonder if that is possible?
Answer: DJ has a strange gait, way of talking, and general attitude, so what happens later throws this into question a bit, but I got the very distinct impression that he was thrown in there as a drunk and was sleeping off the alcohol. Finn and Rose being noisy woke him up, so he decided it was time to go.


Facebook Like taking root domain

Question: I'm trying to implement a Facebook Like button on my site. It's at a subdomain.
I've tried putting the link in the script tag of the Like button and now I'm trying to use Open Graph meta tags. Neither works. I have:
<meta property="og:title" content="My Site"/>
<meta property="og:type" content="article"/>
<meta property="og:image" content="http://www.example.com/image1.png"/>
<meta property="og:url" content="http://mysite.example.com/"/>
<meta property="og:site_name" content="My Site"/>
<meta property="fb:app_id" content="123123123"/>

And the button:
<fb:like show_faces="false" width="450"></fb:like>

It works, but when I like something it says:

John likes My Site on example.com.

How can I make it use the subdomain? I have the subdomain listed in the application settings as well.
Thanks
Comment: What do you mean by `I have the subdomain listed in the application settings as well` ?
Answer: Try adding the full url of the page to like as the href value on the fb:like element. Something like:
<fb:like href="http://mysite.example.com/" show_faces="false" width="450"></fb:like>

Facebook Like taking root domain


Why are tzadikim compared to myrtles?

Question: The gemarah (megillah 13b, sanhedrin 93a) states that tzadikim are compared to haddasim. We also know that of the four species the haddas is described as only having a pleasant fragrance but not a pleasant taste (as opposed to the esrog which has both). Why then are tzaddikim compared to this deficient plant and what lessons can be learned from their comparison to the myrtle?
Answer: Sefer Shaar Yosef Volume 2 Page 132 says that the word Hadas w/ the Kolel = 70, which is Ayin - since the Hadasim allude to the eyes and each leaf of the myrtle is shaped like an eye. This is the reason Tzadikim are compared to a Hadas since they protect their eyes from seeing things that are prohibited.

Why are tzadikim compared to myrtles?