Can/have bacteria been engineered to express ACE 2 receptors?

Question: In light of SARS-COV-2 binding to the ACE 2 protein in human cells, I was wondering if any bacteria exist or could exist that possess this membrane protein. If not, do you believe that an ACE 2 like protein https://www.jstage.jst.go.jp/article/jpssuppl/92/0/92_2-YIA-09/_pdf expressed by a bacteria could allow  the COVID-19 virus to successfully attach and be fused into the bacterium?
Comment: Could you edit your question so that it is clear whether you ask about expressing a functional membrane attached ACE2 receptor allowing for SARSCOV2 infection, or about simply producing ACE2 receptors with engineered bacteria.
Answer: Short answer is no, because the ACE2 receptor is only a trigger (and anchoring point) for endocytosis.
The endocytosis requires many enzymes/proteins which are (as far as I know) specific to eukaryotes. You'd need to express those too in your bacterium and the lack of adequate eukaryote-like transport protein in your bacterium will likely forbid the whole from functioning.
Comment: That makes perfect sense, thank you. Do you know of any attempts to get a eukaryote targeting virus to infect a prokaryote?
Comment: @user91617 It is not exactly my domain of expertise. If not for pure curiosity, I fail to see why such an attempt would be made. I also noticed I failed to answer the title question : can a bacteria express the receptor : yes, see http://www.ndsl.kr/ndsl/search/detail/article/articleSearchResultDetail.do?cn=NART51710590.
Comment: Thank you for the link. As you inferred, my ultimate question would be whether it is possible for the COVID-19 virus to infect a prokaryote such as E. coli (engineered or otherwise).


Is this site limited only to Web applications?

Question: We can see User Experience in our daily routine of life in many products. but I am seeing the questions here are only related to Web applications. Is this site limited only to Web applications?
Answer: Web applications is predominantly the focus, but that is only because the majority of the site users work with such applications on a daily basis. There are more web developers than board-game developers on this site, for instance.
However, take a look at the questions tagged as physical to see some questions on non-web UX.
A bit of variety on this site is always good, so provided questions are still suitable from a Q&A perspective then they're likely welcome here.
Answer: Most of the answers will be equally relevant to web and desktop applications, unless specified otherwise. Mobile apps are also a very common subject. So no, it's definitely not just web applications.
Answer: There are many people that monitor the physical-oriented tags.  Because they are not the volume of digital UX tags, the people the do answer are often quite eager to connect on non-digital topics.
You should feel welcome to engage with this part of the community.


How do I rename an mdadm raid array?

Question: I have assembled a new raid array to replace an old one. However, this new array got assigned an automatic name of /dev/md127 and I want to rename it to /dev/md3, so that I don't have to change various other settings. How do I rename an mdadm raid array?
Answer: Start with mdadm --detail /dev/md127:
Version : 0.90
Creation Time : Wed Apr 13 20:03:21 2011
Raid Level : raid10
Array Size : 656765952 (626.34 GiB 672.53 GB)
Used Dev Size : 437843968 (417.56 GiB 448.35 GB)
Raid Devices : 3
Total Devices : 2
Preferred Minor : 8
Persistence : Superblock is persistent

The first line shows the metadata version used by this array.
Now, stop the array:
mdadm --stop /dev/md127
mdadm --remove /dev/md127

And assemble it again using the new name. If the metadata version is 1.0 or higher, use this:
mdadm --assemble /dev/md3 /dev/sd[abcdefghijk]3 --update=name

For arrays using old metadata structure (most likely 0.90, as it allows for kernel auto-assembly), use this:
mdadm --assemble /dev/md3 --update=super-minor /dev/sd[abcdefghijk]3

Comment: I'm now using array UUID instead of name, as it proved to be much more reliable for me (e.g. dual-booting messed the names each time, and does not cause problems with UUIDs).
Comment: This procedure works fine for me until reboot. Then it's back to /dev/md127.
Comment: If that is the case, please consider updating your answer.
Comment: @briankb what I meant is that I no longer care what names I end up with, because I don't use them any more. I put UUID where I would put e.g /dev/md3 before. If the answer is outdated, please suggest an updated one and I'll be happy to accept it. But in general, I'd suggest avoiding the initial problem altogether by not using array names at all.
Answer: I was in a similar position--I had an array I created which was re-named to /dev/md127 after reboot.
The code
mdadm --stop /dev/md127
mdadm --assemble /dev/md3 /dev/sd[cdef]1
was enough to get the md array re-named /dev/md3 for me, but like everyone else, after a reboot, it would revert back to /dev/md127
I found that if I re-assembled the md array back to /dev/md3, and then re-created the initramfs file (dracut --force as I am on CentOS), then it would remember my array's name (/dev/md3) after reboots.
Comment: Assemble without `--name` or `--update` it will gives you md0, md1, etc. But if you want to name your RAID arrays, the kernel will start with `md126` as the first soft raid device.
Answer: The other answers work, but if you don't want to stop your array prematurely, see here: How-to change the name of an MD device (mdadm) (from superuser)

How do I rename an mdadm raid array?


Does the Apple Remote work on Windows 7 64bit?

Question: Has anyone succesfully used the Apple Remote under Windows 7 64bit?
It doesn't work on my machine (I'm still running Windows 7 RC).
I've installed the Boot Camp Services 2.1.0, and no... the remote is not disabled in the Boot Camp Control Panel.
Answer: with the apple remote, i can launch itunes when i press menu.  the apple remote controls itunes as well as windows media player if media player is open.  it also controls VLC media player, i didnt have to do anything differently.
Answer: I successfully used the Apple Remote on Windows 7 Pro 64bit using Bootcamp. It can at least control the volume, but not do much more I fear.
However, I noticed that the sound would sometimes just go up or down with no apparent reason. Switching the Apple Remote off on Bootcamp solved the issue. Since I didn't quite need it when running Windows I didn't try to have a deeper look. I have no idea whether it comes from the driver or from the actual remote/receiver but since I have no problem when running Mac OS, I more suspect the driver.
Answer: I don't have any experience with the Apple and you don't say what you're using it for.
I've had to install EventGhost to get my MCE remote working properly outside of mce. Maybe you need to try it out or possibly go with IR Server suite (don't have a download link handy)


ADB "screenrecord" not working when executed form device

Question: I recently found out about the screenrecord feature of ADB on Android since API19.
If I try and execute this from Android Terminal Emulator on my device, I get the response from the device I would expect (identical to what I get on my CMD window when executing from Windows) but the file it creates does not work. The file is always ~3.3kb in size and VLC gives me the error:
VLC can't recognize the input's format:
The format of 'file:///C:/Users/Jonny%20Wright/Downloads/videoo.mp4' cannot be detected. Have a look at the log for details.
(I have not checked the VLC log as from what has been happening it seems it is a problem with the recording of the video by the device as when executing from Windows it works fine.)
Answer: You need to run screenrecord as root, type su to switch to root (your phone needs to be rooted obviously)


Create a stored procedure in HSQLDB with Spring embedded databases API

Question: I am currently trying to create a testing environment using an in-memory HSQLDB instance, created using Spring, thanks to its embedded databases support:
Current set up

Creation of the "data source" for my unit tests:

db = new EmbeddedDatabaseBuilder()
         .addDefaultScripts()
         .addScript("stored_procedure.sql")
         .build();

Content of "stored_procedure.sql":

-- Mock of a more complex stored procedure in production environment
CREATE PROCEDURE GetFooById(IN fooId VARCHAR(12))
  READS SQL DATA DYNAMIC RESULT SETS 1
  BEGIN ATOMIC
      DECLARE resultSet CURSOR WITHOUT HOLD WITH RETURN FOR SELECT name, value FROM Foos WHERE id = fooId;
      OPEN resultSet;
  END

Problem
I am able to initialize my schema and insert my testing data from the "default scripts", without any issue.
However, when creating the procedure, I am seeing errors like the one below, even after different versions of the above SQL, with/without delimiters, and with delimiters in various positions:

java.sql.SQLSyntaxErrorException: unexpected end of statement:  required: ;
  at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
  at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
  at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
  at org.hsqldb.jdbc.JDBCStatement.executeUpdate(Unknown Source)
  at org.springframework.jdbc.datasource.init.ResourceDatabasePopulator.executeSqlScript(ResourceDatabasePopulator.java:169)

Resources and hints
I am using Spring 3.1.1 which provides HSQLDB 2.2.4, and based on the documentation, I would think I am doing the right thing.
However, discussions like:

This one
Spring's JIRA ticket SPR-8817

make me think it may be an incompatibility between HSQLDB and Spring / an error caused by the way delimiters are processed.
But I am a beginner at both Spring and HSQLDB, hence my below questions.
Questions

Has someone ever seen this before? And came up with a solution?
Is there an equivalent way of returning a result set using a select-from-where query in HSQLDB, given that the final stored procedure is called using {call GetFooById ?} ?
Could this effectively happen because of ResourceDatabasePopulator ? Is ResourceDatabasePopulator still causing troubles in Spring 3.1.1 ?
Any other pointer / hint?

Thank you very much in advance for your help.
M.

EDIT:
Conclusion & Solutions
Problems:

ResourceDatabasePopulator processes semicolons as query delimiters, which is not compliant with HSQLDB's syntax.
{call GetFooById ?} is a valid syntax for Sybase (my production database) but not for HSQLDB, which expects {call GetFooById(?)}. And of course the HSQLDB syntax isn't compatible with Sybase's one either. Besides, Spring's JdbcTemplate doesn't abstract away these differences.

Solutions:

Using Java stored procedures instead of SQL stored procedures can be a workaround as the query is written on the Java side and no semi-colon delimiters are involved.
Alternatively, I guess ResourceDatabasePopulator's logic could be changed and used to set up the embedded database, but I haven't tried this so far.
Spring's StoredProcedure class seems much more portable and can be used with both Sybase and HSQLDB, even if it is a bit more verbose than JdbcTemplate.

Source code: Available on my GitHub repository.
Comment: Spring has now implemented custom separators in the ResourceDatabasePopulator.  You should add that to your answer for one-stop shopping for others who have this problem.
Comment: May I just ask why you do not use the same DB for PROD and DEV, or what I would suggest is generate different *.sql files for different DBs. And well a workarround might be as mentioned in the link to create your own Populator, which you could even submit to Spring sourceforge to have a setDelimeter() or wtv.
Answer:
for stored procedures and object types you take care about JDBC driver of your database. For stored procedure, also for testing or other, create a package inside your database and call this for future test phase.
I used stored procedures and customization input/output object, using only Java SQL Stored procedure API, and customization where needed.

If you want explain your context and case, we can help you to find your best solution :-).


Apex tests that handle different workflows?

Question: I provide a standardized but unmanaged package to clients who have different workflow needs.  The workflows sometimes interfere when I deploy new standard code.  Does it make sense to turn them off?  That would mean that after deployment when I turn them back on again, the tests would fail.
Example: My clients use validation rules that accept only certain amounts for membership dues.    They all have different amounts.  On top of it they sometimes change the amounts.  When I test code for the online payments module, I insert opportunities with random amounts, but if those amounts aren't the same as the ones the client instance accepts, the test fails.  I could modify the test amounts to fit the current validation rule, but later the organization could change the accepted amounts and the test would fail again.
Any guidance on this?
Thanks,
Baird
Answer: One thing you could do is create a custom setting where the clients would enter their limits. Then in your tests (using seealldata=true) you could query for those settings and adjust your test records accordingly. You would have to be careful in your implementation to ensure that all tests are returning only records your test have inserted since seel all data is set to true.
Another possible solution is when inserting records in your tests, parse out the errors to understand what the limits are for the field and readjust the record being inserted to account for the errors. This may be a bit more tricky depending on what type of asserts you have in your test classes...But is would be more streamlined...


Is video editing off-topic?

Question: The FAQ currently says this website is for people who use Blender to create 3D graphics, animations, or games. However, Blender is a full-featured and very competent video editor. Especially since the release of Tears of Steel, the software is a state-of-the-art special effects tool for live action film. Should questions related to non-animation video and compositing be allowed, since this is a very large (although lesser-known) feature of Blender?
Comment: This was asked eight years ago and the help center page https://blender.stackexchange.com/help/on-topic still suggests that only questions about modeling and animation are on-topic. This should probably be fixed, as the non-modeling uses of blender are now well established.
Answer: No it is not, the site is about Blender, if topics such as the compositor, tracker and the game engine are on topic, so is the vse. However, the question must relate to a problem within Blender or with Blender's VSE and not about just video editing or video editing techniques etc.
Answer: NO
The FAQ is still WIP, so don't let that define your view of what the site is for. If you have good Video Editing questions or knowledge, feel free to add them/it.
(The yes I had originally was answering the question in the body of your question).

Is video editing off-topic?


How to tell if my wifi maintains a constant connection

Question: I'm looking for how to tell whether or not my wifi is constantly connected. I've tried pinging google over a long period of time, and I didn't see any packet loss. Does this actually confirm it, or might there be some small periods where the wifi disconnects where internet traffic is buffered and resent to me once the connection to the gateway is reestablished?
Answer: Wi-Fi WPA2 connection requires quite some time to be established (I guess up to a second), so if you ran a script which pinged your Wi-Fi router each 0.2 seconds (must be done under root since 1 second is the lowest for a normal user) you'll be able to tell whether reconnections occur. You can also follow the journalctl -f output which is easier and must be available for all users - all Wi-Fi reconnections must be logged in there (at least they are in Fedora 32 - can't say the same about other Linux distros).
As to:

internet traffic is buffered and resent to me once the connection to the gateway is reestablished?

This is the normal mode of operation for TCP and such things occur even without Wi-Fi disconnects. See https://en.wikipedia.org/wiki/Bufferbloat


Best way to measure similarity of two quantum circuits?

Question: Suppose you have some unknown circuit X. You don't know the structure of circuit X, but you do have a set of inputs and corresponding outputs, i.e. you know what the circuit does. Then suppose you have another circuit, circuit Y, where you have both inputs and outputs, and circuit structure. What's the best way to determine how close the structure of circuit Y is to that of circuit X? One idea I've tried so far is to compare the output vectors of the two circuits (using something like taking the norm of the difference of each pair of output vectors). Is there perhaps a better solution?
Comment: Well, you cannot really know. Given input and output states you can try to reconstruct the quantum process and then try to implement it. However, this is black box learning and it does not tell you anything about the inner workings of the circuit. Two circuits might be related by symmetries or simply do the same job, albeit, one of them to do it much more efficiently (i.e. to be a shallower circuit with less number of gates etc). The circuit it self is not as important as the actual operation that is supposed to be performed using those circuits and that can definitely be reconstructed.
Comment: @Stare100 - Classically, given two boolean functions $f$ and $g$ acting on the same number of bits, both presented as black-boxes, how could you learn whether $f=g$?  This is [polynomial identity testing](https://en.wikipedia.org/wiki/Polynomial_identity_testing) and the [Schwartz-Zippel lemma](https://en.wikipedia.org/wiki/Schwartz%E2%80%93Zippel_lemma).  Your putative algorithm is basically the same as PIT but I'm pretty sure it's far from efficient quantumly, although if you know from when your circuits $X$ and $Y$ are drawn you might have some luck.
Answer: This answer is for a more restricted case than in the original question, when our knowledge of unitaries $\hat X$ and $\hat Y$ applies to a single input reference state in the computational basis $|z_0⟩$.

We know that $\hat X|z_0⟩=|Ψ_X⟩$, and that $\hat Y|z_0⟩=|Ψ_Y⟩$. As the OP suggested, one measure of the similarity of $\hat X$ and $\hat Y$ is to compare the two output vectors. We can obtain the overlap $|⟨Ψ_Y|Ψ_X⟩|^2$ with a fairly straightforward procedure.
Let's say we start with a quantum computer in the state $|Ψ_X⟩$, and we know enough about $\hat Y$ to construct its quantum circuit. We can also construct the inverse of $\hat Y$ (ie. $\hat Y^†$) by inverting each gate in its quantum circuit and reversing the order.
We can prepare the quantum state $|Ψ'⟩=\hat Y^† |Ψ_X⟩$ by applying the circuit for $\hat Y^†$ to the quantum state $|Ψ_X⟩$, and then we can measure $|Ψ'⟩$ in the computational basis. Let $p_0$ be the empirical probability of measuring the basis state $|z_0⟩$, which should converge to $|⟨z_0|Ψ'⟩|^2$ for enough measurements. Expanding this quantity,
$$ p_0 \rightarrow |⟨z_0|Ψ'⟩|^2 = |⟨z_0|\hat Y^† |Ψ_X⟩|^2 = |⟨Ψ_Y|Ψ_X⟩|^2$$
Therefore, $p_0$ estimates the desired overlap.

For further intuition: we have "computed" $\hat X$, and then we "uncompute" $\hat Y$. If $\hat X$ and $\hat Y$ are similar (with respect to this one reference state!), the "uncomputation" should return us exactly to the original reference state. The extent to which it hasn't returned us to the original reference state tells us the extent to which $\hat X$ and $\hat Y$ are not similar.
Comment: +1 but have you thought about how many different basis states $z_i$ will need to be tested to conclude that $\hat X=\hat Y$ with high confidence?  I think it's way worse than what we can do classically.  That is I think there are way too many circuits that are "inverses" of each other for a handful of basis states but are otherwise completely unrelated.
Comment: Right - my answer is applicable only when we care only about the similarity of our circuits with respect to a particular reference state - often true in my work with variational algorithms, but certainly not in general!
Answer: Although @jecado and the OP are right in that you can test a handful of basis states, in general it is QMA-complete to test for circuit identity for all such states, as Janzing, Wocjan, and Beth provide in Identity check is QMA-complete.
From their abstract:

Given two descriptions of quantum circuits and a description of a common invariant subspace, decide whether the restrictions of the circuits to this subspace almost coincide. We show that equivalence check is also in QMA and hence QMA-complete.

I haven't studied the paper in any detail - the introduction looks very readable, but I think this shows that the generalization to the OP's question is likely outside of anything that can be done efficiently.


Can I change just my motherboard with windows 7 oem and the os still work?

Question: ASUS P8H77-V LE is the motherboard model I have.
When I built my computer I hadn't realized that the mother board supports crossfire but not SLI and I put a GTX 560Ti in it.  I didn't learn that I cannot SLI the cards together until 4 months later when I started looking into adding a second GTX 560Ti to my build.  I want to change the motherboard to a better one that supports SLI and higher quality graphics cards then get the other GTX 560Ti and SLI them together.  Would I need to get another Win 7 OEM or would the existing install work because I'm only changing the motherboard and not the CPU etc.?
Comment: Your Windows 7 OEM license cannot be transfered it is permenantly tied to the motherboard in question.
Answer: It should, however, you may need to reactivate it with Microsoft.  The system fingerprint that is used to activate Windows relies on several pieces of hardware and the MB is one of them.  While I haven't had any issues, I have heard that it is a simple process, but may be time consuming.
Comment: Thank you, hopefully it works out well, this is my first computer build and it's been a learning experience through and through.
Comment: When login in after such hardware change, windows will ask for the key again. After inserting the key again your done.


Prove: If $\phi:R\rightarrow R'$ is a ring homomorphism, then $image(\phi)$ is a subring of $R'$

Question: Do I have to use the regular axioms for proving something is a subring? i.e. closed under subtraction and multiplication.
If so, can I say $$im(r-s)=r-s\in R$$ $$im(rs)=rs\in R$$ Therefore $im(\phi)$ is a subgroup of $R'$? Do I have some notation mixed up? Or am I just thinking about it completely wrong?
Answer: You have your notation a little mixed up.  I'll get you started by showing that $\operatorname{im}(\phi)$ is closed under addition.
Assume $x, y \in \operatorname{im}(\phi) \subseteq R'$.  Then $\exists r, s \in R \text{ such that } \phi(r)=x, \phi (s)=y$.  Since $\phi$ is a homomorphism, $\phi(r+s)=\phi(r)+\phi(s)=x+y$, so $x+y \in \operatorname{im}(\phi)$.  Thus, $\operatorname{im}(\phi)$ is closed under addition.
Can you finish off the proof from there?
Comment: I think so, multiplication and subtraction follow similarly, right?

$\phi(rs)=\phi(r)\phi(s)=xy$, so $xy\in\operatorname{im}(\phi)$

$\phi(r-s)=\phi(r+(-s))=\phi(r)+\phi(-s)=x+(-y)=x-y$, so $x-y\in\operatorname{im}(\phi)$?
Comment: All correct.  You've got it.
Answer: So, in other words this image is not necessarly a subring, but, instead, is an ideal of $\mathit{R'}$.
Comment: I don't think so because I'm not necessarily saying that it will absorb product from $R'$, just that subtraction holds.


How do I install Python 3.3?

Question: I have downloaded Python 3.3 from the official site but no idea how to install it.
I'm using Ubuntu 12.04
Comment: [Why can't I update applications without upgrading the whole OS?](http://askubuntu.com/questions/95336/why-cant-i-update-applications-without-upgrading-the-whole-os) explains *why* it's not available. In short: other packages are relying on an older (still maintained!) version. And please keep your personal thoughts about how this site works for yourself or post it on [meta](http://meta.askubuntu.com/) where you can post once you've gained [enough reputation points](http://askubuntu.com/privileges/participate-in-meta). But first: [FAQ](http://askubuntu.com/faq) on how the site works.
Answer: Python 3.3 has been released on 29 September 2012, several months after Ubuntu 12.04 was released. It is included in Ubuntu 12.10 though as python3.3 package
If you want to install Python 3.3 on Ubuntu version which does not have it in its repositories, you have the following options:
Use a PPA
There's a PPA containing Old and New Python versions maintained by Felix Krull. See Luper Rouch's answer for installation instructions.
Compile Python from source
This is very easy and allows you to have multiple Python versions without messing with system python interpreter (which is used by a lot of Ubuntu own programs). On my dev machine I have literally dozens of different Python versions from 2.4 to 3.2 living happily in /opt.
we need C compiler and other stuff to compile Python
sudo apt-get install build-essential

SQLite libs need to be installed in order for Python to have SQLite support.
sudo apt-get install libsqlite3-dev
sudo apt-get install sqlite3 # for the command-line client
sudo apt-get install bzip2 libbz2-dev

Download and compile Python:
wget http://www.python.org/ftp/python/3.3.5/Python-3.3.5.tar.xz
tar xJf ./Python-3.3.5.tar.xz
cd ./Python-3.3.5
./configure --prefix=/opt/python3.3
make && sudo make install

Some nice touches to install a py command by creating a symlink:
mkdir ~/bin
ln -s /opt/python3.3/bin/python3.3 ~/bin/py

Alternatively, you can install a bash alias named py instead:
echo 'alias py="/opt/python3.3/bin/python3.3"' >> .bashrc

And this is it. Now you can have any Python version, even an alpha, or, say, to have a few copies of Python 3.3 compiled with different settings... not that many people need that though :)
Use pyenv
There's a software called pyenv which may help you to automate the procedure - what it essentially does is compile Python from source, installing it in your home directory. Its goal is to help you manage multiple Python versions.
Comment: After installation, how would one *use* this alternative Python installation? Say I have some `.py` files with the `#!/usr/bin/env python` shebang line (executable bit set), how would I make them to use this installation in `/opt/python3.3` without modifying all of them? Or even system-installed ones.
Comment: @gertvdijk: the whole point is *not* to replace the default interpreter - if you do that, then *every* python app ran from your account will use Python 3.3, including Ubuntu apps, such as Software Centre ect. We don't want that. To run a script, just use `py myscript.py` (where `py` is a symlink we've created at the end of the exercise). I also normally use virtualenv or buildout for my projects.
Comment: @gertvdijk You can keep multiple python environments manageable using virtualenv.
Comment: `mkdir ~/bin
ln -s /opt/python3.3/bin/python ~/bin/py` doesn't work for me.

I found that `/opt/python3.3/bin/python` should be `/opt/python3.3/bin/python3`, but still getting `py: command not found`. Any suggestions.
Comment: @gertvdijk Are you aware that python 3.x and python 2.x are incompatible?  If you were to point all your existing scripts at python 3.3 they'd probably break.  Simply shebang your new python scripts as #! /opt/python3.3 and the correct interpreter will be addressed when you run it.
Comment: @TonyMartin Yes, I'm totally aware of it and just pretended not to know this. I develop stuff in Python. :) My comment was merely a way to get this into the answer as well. Some people might expect it to be replaced.
Comment: @gertvdijk then I'll leave my comment for the same readers. :-)
Comment: @TamilVendhan: if you didn't have `~/bin` before you need to log out and then log back in for the directory to be added to PATH.
Comment: On Ubuntu 13 it's `/opt/python3.3/bin/python3.3`
Comment: These instructions also work for Python 2.7.5 on Ubuntu 10.04.
Comment: @Nick: yes, they should work for any Python version with only minor modifications (changing the version in the pathnames)
Comment: @Nick Based partly on Sergey's answer and my own experience, I have written a script in the answer further below that automates the whole process, and it should be useful for any Python version.
Comment: After building Python3.3, we can create a Python3.3 virtualenv by `mkvirtualenv -p /opt/python3.3/bin/python3.3`
Comment: [Pythobrew is deprecated](https://github.com/utahta/pythonbrew#deprecated), use [pyenv](https://github.com/yyuu/pyenv) instead.
Comment: From my experience, downloading python and compiling from source beats all other alternatives.
Comment: Excellent answer (+1). It's already mentioned in the comments, but I'd mention explicitly that users that don't have the directory `~/bin` already should add it to the `PATH` (making sure it's in the right place of course).
Comment: @MarcvanDongen: Last time I checked Ubuntu was adding `~/bin` to PATH automatically on login if present. So all you need is to log out and then log in back to have it added. I mentioned it in the comments above a couple of years ago :)
Comment: @Sergey Thanks. It definitely seems to do this for normal users. (I just tried.) Personally, I find this astonishing: this should never have happened. Mind you, I _do_ have a `${HOME}/bin` directory but I don't think an OS should have put such directory in a user's path.
Comment: Modern versions of Python have pip included inside, so if you want it too, you should `sudo apt-get install libssl-dev`, or else Python will be compiled without pip.
Comment: I'd personnally not choose `/opt/` for the installation directory, since it is supposed to be for self-contained third party applications. `/usr/local` should be used instead, and that's the default of `./configure`, so why not leaving the default?
Comment: Does is work for debian?
Answer: Here is what I did to install Python 3.3 on Ubuntu 12.04:

Install dependencies:
sudo apt-get build-dep python3.2
sudo apt-get install libreadline-dev libncurses5-dev libssl1.0.0 tk8.5-dev zlib1g-dev liblzma-dev

Download Python 3.3.0:
wget http://python.org/ftp/python/3.3.0/Python-3.3.0.tgz

Extract:
tar xvfz Python-3.3.0.tgz

Configure and Install:
cd Python-3.3.0
./configure --prefix=/opt/python3.3
make
sudo make install

Test if it worked:
/opt/python3.3/bin/python3

You should see something similar:
Python 3.3.0 (default, Jan 31 2013, 18:37:42)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

Some Additional things that are useful... you can create a virtual environment in your home and just activate Python 3.3 on demand..

Create a Virtual Environment in your home:
/opt/python3.3/bin/pyvenv ~/py33

Activate the virtualenv:
source ~/py33/bin/activate

Install distribute tools:
wget http://python-distribute.org/distribute_setup.py
python distribute_setup.py

Install pip:
easy_install pip

Install any python packages you want (i.e. bottle)
pip install bottle

Enjoy!
Comment: @StamKaly : nope. `build-dep` is not a package, it's an `apt-get` **verb** (like `install`). It means "_install all packages necessary to build the requested source package(s)_"
Comment: `sudo apt-get build-dep python3.2`? You probably forgot `install` in between :)
Answer: The deadsnakes PPA has packages for old and new python versions:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.3

Comment: Yes, that installed something alright, but how do I invoke it? Typing 'python' gives methe python 2 interpreter and typing 'python3' suggest that its not installed and can be installed from ubuntu repos.
Comment: Ah..I see the executable is called python3.3 (or pythonX.Y, for whatever version of python installed :-)
Comment: ppa:fkrull/deadsnakes is archived. Use ppa:deadsnakes/ppa instead.
Answer: Ubuntu 14.04 and earlier:
Python2.7 comes default, Use the package manager to install python3 on top of regular python on Ubuntu, Ubuntu can handle both 2.7 and 3.2 at the same time without a virtualenv:
sudo apt-get install python3
python3 --version
Python 3.2.3
python --version
Python 2.2.3

Ubuntu 18.04:
Python3 comes default with the OS and Python2.7 isn't available unless you specifically install.
Three package names to choose from: python, python-minimal, python-all.  Default is minimal.  These words are just flags to the Ubuntu repositories to include extra stuff or not.  To see exactly what subpackages are and aren't included, drill down on the subpackages of: https://packages.ubuntu.com/bionic/python
sudo apt install python-minimal
python --version

Or to try to upgrade the python3:
sudo apt install python3-minimal
python --version

To try to force a specific version, you can try passing a version parameter:
sudo apt-get install python 3.3.3

Comment: Python 3.3 is only available from the default repositories in Ubuntu 12.10 and later. OP is using 12.04
Comment: How do you update the python3 version from 3.2.3 to 3.3.5?
Comment: If you want more than 2 versions of python available on one computer (other than the default 2.7 and 3.2 that your OS chooses for you), then each new version of python should be in its own virtual environment (`virtualenv`).  Google search: "Use virtualenv to isolate version of python".  If you don't use some kind of container, then you expose yourself to a labyrinth of problems since python takes a giant shit all over your computer, occupying every nook and cranny, and they fight each other in John Cleeseian fashion.
Answer: Warning: Pythonbrew has been deprecated in favor of pyenv. Updated instructions are here
Also you can use something like pythonbrew:
curl -kL http://xrl.us/pythonbrewinstall | bash
echo "[[ -s $HOME/.pythonbrew/etc/bashrc ]] && source $HOME/.pythonbrew/etc/bashrc" >> ~/.bashrc
pythonbrew install 3.3

It's quite easy to use, and another benefit, that it's possible to install any python version you need. Please see their docs for mode details
Answer: I have written a script to automate all of the downloading, compiling and installing of non-package Python versions. The script installs the Python version in /opt safely away from the package manager and system versions of Python.
It even fetches the dependencies as well for most versions of Ubuntu. It should work on all currently supported Ubuntu versions (10.04, 12.04, 12.10, and 13.04), and probably on other versions.
I include it below, and have posted it also at my Github repository, which is the master location.
The script should be copied and saved into a text editor as, for example, build_python, and made executable (chmod u+x build_python) and then can be run with two parameters, where the first parameter must always be the Python branch, and the second parameter must always be the Python version.
See python.org for the listings for the version you wish to compile.
Here are a couple of example of the script's usage:

For the stable release, after having checked the listings, it can be run as
./build_python '3.3.2' '3.3.2'

For the development release, where the two parameters are different in the listings, it can be run as:
./build_python '3.4.0' '3.4.0a1'

The body of the script is reproduced below (no syntax highlighting here. For that, see my Github page:
#!/usr/bin/env bash

# by mik, aka Exactus29, https://github.com/Exactus29
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

##########

# a script to compile the latest stable version of Python and place in /opt

(( $# == 2 )) || { printf "Please provide a version branch (e.g. 3.4.0) and a version release (e.g. 3.4.0a1) in that order.\n"
                   printf "The official site is python.org, see the ftp server at: http://python.org/ftp/python.\n" >&2 ; exit 1; }

# a splew of variables, so that just the version number can be given on the cmd line
# and then then the script can do the rest, including verifying the packages using gpg

# need different branch and version as sometimes the two are different, particularly for dev releases
py_branch="$1"
py_version="$2"
shift 2

# check if install target already exists in /opt, and exit so user can decide what to do
if [[ -d /opt/python-${py_version} ]]; then
    printf "Target directory for the build already exists, please rename or remove.\n" >&2
    exit 1
else
    :
fi

# use tar.bz2 as that is what most of the older releases used, i.e. in case user tries to build an older release
py_url="http://python.org/ftp/python/${py_branch}/Python-${py_version}.tar.bz2"
py_asc="http://python.org/ftp/python/${py_branch}/Python-${py_version}.tar.bz2.asc"
py_dir="$HOME/src/python_build" # checked to exist later, etc

# first check if user requested file exists on server
wget --spider ${py_url} >/dev/null 2>&1
(( $? > 0 )) && printf "No such version, version ${py_version} does not exist\n" >&2 && exit 1

# now very important before we do anything else, to check if asc file exists, as it  doesn't for some downloads
# if we don't check and it doesn't exist it causes the script to exit

wget --spider ${py_asc} >/dev/null 2>&1
# set a flag re whether asc file exists, so can check later and avoid problems
(( $? > 0 )) && no_asc=1 || no_asc=0

# set up more variables
py_tarbz2="${py_url##*/}"
(( no_asc == 0 )) && py_tarbz2_asc="${py_asc##*/}" # only set this if there is an asc file
py_folder="${py_tarbz2%.*.*}"
py_gpg_key=""

# check other build dependencies are installed, beyond build-dep, sqlite support, readline, ncurses, build-essential
dependencies_check() {

    local installed=()
    local to_be_installed=()
    local dependencies_list=(build-essential wget libreadline-dev libncurses5-dev libssl1.0.0 tk8.5-dev zlib1g-dev liblzma-dev
libsqlite3-dev sqlite3 bzip2 libbz2-dev)

    for package in "${dependencies_list[@]}"; do
        if grep -iq '^ii' < <(dpkg -l "$package"); then
            installed+=("$package")
        else
            to_be_installed+=("$package")
        fi
    done 2>/dev/null

    if (( ${#to_be_installed[@]} > 0 )); then
        printf "If you have recently elevated your privileges with sudo, you will not see a "
        printf "prompt here, before the apt-get update and install of packages occurs.\n"
        sleep 2
        sudo -p "We need to install some dependencies, please enter your password: " apt-get update && sudo apt-get -y install "${to_be_installed[@]}"
        return 0
    else
        printf "\nNothing to install, proceeding.\n"
        return 0
    fi

}

# tailor build-dep to new python version we want to build, basically either 2x or 3x versions
# should work with at least lucid/precise/quantal/raring/saucy, the currently supported versions
if (( ${py_branch:0:1} == 3 )) && grep -iq 'precise' /etc/lsb-release 2>/dev/null; then
    sudo -p "Please provide your password to install dependencies: " apt-get build-dep python3.2 && dependencies_check
elif (( ${py_branch:0:1} == 3 )) && grep -Eiq '(raring|quantal|saucy)' /etc/lsb-release 2>/dev/null; then
    sudo -p "Please provide your password to install dependencies: " apt-get build-dep python3.3 && dependencies_check
elif [[ ${py_branch:0:3} == 2.7 ]] && grep -iq 'lucid' /etc/lsb-release 2>/dev/null; then
    sudo -p "Please provide your password to install dependencies: " apt-get build-dep python2.6 && dependencies_check
elif [[ ${py_branch:0:3} == 2.7 ]]; then
    sudo -p "Please provide your password to install dependencies: " apt-get build-dep python2.7 && dependencies_check
else
    printf "\nProceeding, but make sure you have the correct build deps installed.\n\n"
    sleep 2
fi

# dir checks
if [[ -d $HOME/src ]]; then
    cd $HOME/src || exit 1
else
    mkdir $HOME/src && cd $HOME/src
fi

if [[ -d ${py_dir} ]]; then
    mv "${py_dir}" "${py_dir}_old_$(date '+%F_%H_%M_%S')"
    mkdir "${py_dir##*/}" && cd "${py_dir##*/}"
else
    mkdir "${py_dir##*/}" && cd "${py_dir##*/}"
fi

# finally, download python
printf "\nNow downloading version ${py_version} from branch ${py_branch} ....."
wget "${py_url}" -P "${py_dir}" >/dev/null 2>&1
(( $? == 0 )) && printf "Done.\n"
# only download asc if it exists, set flag earlier
(( no_asc == 0 )) && wget "${py_asc}" -P "${py_dir}" >/dev/null 2>&1

# gpg tests

gpg_test() {
    # if error returned, extract gpg key from error message
    py_gpg_key="$(gpg --verify "${py_tarbz2_asc}" "${py_tarbz2}" 2>&1 | awk '{ print $NF }' | grep -v found)"

    # now check with gpg_key (should be Python release signing key)
    printf "\nReceiving keys.. "
    gpg --recv-keys "${py_gpg_key}" >/dev/null 2>&1
    (( $? > 0)) && printf "Key could not be received\n" || printf "Done.\n"

    printf "\nVerifying download... "
    gpg --verify "${py_tarbz2_asc}" "${py_tarbz2}" >/dev/null 2>&1
    (( $? > 0 )) && printf "The download could not be verified.\n" || printf "Done.\n"

}

if (( no_asc == 0 )); then
    gpg --verify "${py_tarbz2_asc}" "${py_tarbz2}" >/dev/null 2>&1
    if (( $? > 0 )); then
        gpg_test
    else
        printf "\nDownload verified\n\n"
    fi
else
    printf "\nProceeding even though asc file is not available for gpg to verify download\n\n"
    sleep 1
fi

# unpack and cd to the python folder
printf "Unpacking archive...."
tar xvjf "${py_folder}.tar.bz2" >/dev/null 2>&1
(( $? == 0 )) && printf "Done.\n" || { printf "Problems occured when unpacking, exiting\n" >&2; exit 1; }
cd "${py_folder}" || exit 1

# tailor the build to your machine here with configure and make

printf "\nNow for the configure (default prefix is /opt/python-${py_version})...."
sleep 2
./configure --prefix=/opt/python-${py_version} >/dev/null 2>&1
# as configure and make will exit anyway on error, no need to add || alternatives to the tests below
(( $? == 0 )) && printf "Done.\n\n"
sleep 1

printf "\nNow for the compile. (If necessary, please add your own specifications to the make command line and run the script again)\n"
printf "\nPlease wait for the compile to finish: it may take a while...."
make >/dev/null 2>&1
(( $? == 0 )) && printf "Done.\n\n"

printf "\nWe are installing with make install into /opt, instead of using checkinstall.\n"
sudo make install >/dev/null 2>&1
installcode=$?
(( $installcode == 0 )) && printf "\n${py_version} succesfully installed in /opt/python-${py_version}\n\n"

if [[ -d $HOME/bin ]]; then
    ln -s /opt/python-${py_version}/bin/python${py_version:0:3} ~/bin/py-${py_version}
    (( $? == 0 )) && printf "\nSymlink created, run py-${py_version} in the terminal to launch the interpreter\n"
else
    mkdir $HOME/bin && ln -s /opt/python-${py_version}/bin/python${py_version:0:3} ~/bin/py-${py_version}
    (( $? == 0 )) && printf "\nSymlink created, run py-${py_version} in the terminal to launch the interpreter\n"
    printf "\nHowever, you will not be able to call py-${py_version} until you have logged out and in again, as bin will not"
    printf " have been added to your path just as $HOME/bin is created.\nn"
fi

# important info re setting up pyvenv re distribute tools and pip etc
cat <<extra_info

            See also a program called pyvenv with your installation in /opt,
            with which you can create a virtual environment and use tools
            such as pip, etc. See the official documentation at:
            http://docs.python.org/3.3/using/scripts.html#pyvenv-creating-virtual-environments

extra_info

sleep 2
exit ${installcode}

Answer: For anyone who is interested, I wrote a more verbose step-by-step article on how to install Python 3.3.2 locally from source on Ubuntu 12.04, mostly based on reading @sergey's excellent answer above: http://nicholsonjf.com/blog/install-python3-locally-from-source
Answer: Here are the steps that I followed:
wget http://python.org/ftp/python/3.3.2/Python-3.3.2.tar.bz2
tar -xvjf ./Python-3.3.2.tar.bz2
cd ./Python-3.3.2
./configure --prefix=/opt/python3.3
make && make install
mkdir ~/bin
ln -s /opt/python3.3/bin/python ~/bin/py
echo 'alias py="/opt/python3.3/bin/python3"' >> .bashrc

How do I install Python 3.3?


Cannot log in Ubuntu 14.04

Question: I installed NVIDIA driver(346.22) to my machine in Ubuntu 14.04. In order to install, I used console(clt+alt+f1) for my operations. After the installation, I would like to go back to the GUI(Ubuntu Desktop). I pressed clt+alt+f7. It asked me to enter the password to log in. However, it does not accept my password. Thus, I cannot log in.
Comment: installing the driver shouldn't do affect on your password... obviously you're doing or did something wrong. Did you try to reboot after you installed the nvidia driver? And does it take you to a normal login screen after the reboot?
Answer: Press simultaneously Ctrl+Alt+F1,
Login with your user name and password, and enter following command:
sudo mv .Xauthority .XauthorityBak

then
sudo reboot

After that try again.
Comment: I tried your solution. It didn't work.

Cannot log in Ubuntu 14.04


Is it possible to force BIOS mode (as opposed to UEFI) in the installer?

Question: On a laptop where I already have elementary OS 5 installed in BIOS mode (no /boot/efi partition), I am trying to install elementary OS 6 from USB, and I would like to keep the system booting in BIOS, not UEFI, mode. However, the installer always insists on a separate /boot/efi partition in the partitioning step. (This is not the case on another laptop where I tried installing, where just a / partition was sufficient.) I checked the BIOS boot settings, and it's set to Legacy Support (Legacy First). I tried searching for an installer boot option to force BIOS mode but did not come to something. Any pointers are appreciated.
Answer: After researching, it seems that remastering the ISO and deleting the EFI directory would have been the simplest approach. However, I admit my issue turned out to be that the boot USB was showing up twice in the boot menu, and I was selecting the one that boots in UEFI mode, not legacy mode.


A person who comes to stay in a hotel is said to be

Question: A person who comes from a far off place and stays in a hotel is said to be a guest in my view. But another of our senior teacher rejected this word. So, Is it a right term? Or any other proper word could be there.
Comment: The word for a person who stays at a hotel is **guest**, but the guest might live in the same city where the hotel is located, or the guest could have traveled across an ocean.  The word **guest** is agnostic about the distance the guest has traveled.  Your teacher may be emphasizing the travel, and may be looking for **tourist**.  But there's no guarantee that a tourist will stay at a hotel. A tourist might stay at a B&B.  :)
Comment: _A hotel guest_ is a good word.
Answer: If it's a hotel and you have visitors who might come there and possibly stay there are called many things, out of which 'guests' is the best word. You could use a few words such as:

Customer
Traveler
Tourists
Tenant

But all these suggestions have conditions that may not qualify them as a perfect synonym for the word 'guests' in this context.
I have to disagree with your teacher and I suggest you ask him what he would've used for that particular context. Maybe you didn't interpret what he meant properly.
Answer: While the alternatives can be useful in some circumstances, I personally would prefer the word patron most of the time. A patron is

a person who is a customer, client, or paying guest, especially a regular one, of a store, hotel, or the like. (Dictionary.com)


PHP get seeders/leechers of .torrent file

Question: I need an easy to use torrent tracker that I can input the torrent file, and the PHP library will send me back seeders and leechers of the torrent file?
Comment: Do you understand what "tracker" means in the context of BitTorrent?
Answer: You need to use a tracker to get this information, there are a couple out there now XBTT was the most popular for years, now a private site has written their own in house tracker known as ocelot.  XBTT responds to a torrent clients http requests and stores information about that torrent in a database.  If you are interested in writing your own tracker the point to start is by inspecting the packets that a tracker sends and receives.
All torrent communication is handled via a RESTful GET request so packet inspection is easy.


Blender 2.8 Beta (Linux Mint 19.1): No compatible GPUs found - Vega 64 Nitro+

Question: I can't find any working information, how to fix this, and before I was trying to install some other drivers for my Vega, but i accidentally broke my previous installation.
Answer: You most probably have installed the open source driver stack that comes with Mint.
On any GNU/Linux distribution, Blender only supports the official AMD proprietary drivers for rendering with OpenCL, meaning you will need to install one of the following AMD OpenCL drivers:

AMDGPU
AMDGPU-PRO

For Linux Mint, this might be a good start
There might be another method to just install the OpenCL part of the AMMDGPU-PRO driver, which is described here, but I don't have the  means to test it.
Answer: When you are installing your AMD-Pro drivers you have to type
<code>./amdgpu-pro-install --opencl=pal,legacy,rocm</code>.
I was facing the same problem for a long time but this solved it.


Where do electrons in electricity come from?

Question: Where do the electrons come from when an electric generator is making electricity?  Is from the air?  Would a generator work in a vacuum?  Electrons have mass so where would they be pulled from if there is nothing?
Comment: Well Gerry, Its from the [free-electrons](http://en.wikipedia.org/wiki/Electric_current#Metals) I think so...
Comment: Yes.  The electrons that are responsible for currents from a generator are the free electrons in the wires themselves; all solid matter is partly made of electrons, so if you have a generator, you have lots of electrons.
Comment: You can read about the [Valence and Conductive Bands](http://en.wikipedia.org/wiki/Valence_band) of orbiting electrons to answer your question.
Answer: One can get electrons ( negative charges) and positive ions in static electricity. It demonstrates clearly that the neutral atoms are not indivisible.
Friction can supply the force to extract electrons and leave the ions behind with positive charge as happens often when walking on rugs.
In electric generators

Faraday disk, the first electric generator. The horseshoe-shaped magnet (A) created a magnetic field through the disk (D). When the disk was turned, this induced an electric current radially outward from the center toward the rim. The current flowed out through the sliding spring contact m, through the external circuit, and back into the center of the disk through the axle.

it is the electrons in metals that are being manipulated by the magnetic forces in the design, again separating the charges into an electron motion and positive ions. Metals have very loosely bound electrons which collectively belong to the Fermi sea and can generate the current of the electric generator.
So the answer is, atoms supply the electrons from their outer electron shells. It is the atoms in the generator that supply the electrons and yes, it would work in vacuum.
Answer: just like your water pump does not generate water the electric generator does not generate electrons it simply drag the electrons from one place to the other.
Comment: Currently, your answer isn't really helpful and it's much smaller than the previously existing answers. Maybe you could elaborate in it?
Answer: A conducting material is one through which electrons are free to flow.
A voltage is a difference in electrical potential energy per unit charge -- if I have a 10 V source, and I let +1 C of charge flow from the positive terminal to the negative terminal, I will have imparted 10 J of energy to that charge.  An electrical generator generates a potential difference between two terminals (either as DC Voltage or as AC Voltage, usually).  In common household appliances, this voltage is attached to a wire, and the electrons in the conducting wire are what the potential energy in the battery is transferred to.


What do '4eCe' and '2eCe' mean in Lalo's Symphonie Espagnole?

Question: May I know what does '4eCe' & '2eCe' mean in this context?
*I got this sheet music from imslp.
Comment: Please be more specific about where this image comes from. I've made a guess in my answer, but there are many options to search through on IMSLP, and the more specific you are, the easier it is to get quick and accurate answers.
Comment: sure, maybe I can put the link down here, but I'll have to check if there's any info about the publisher
Comment: @Vehrnesto - It's from IMSLP. That website *will* have information about the publisher.
Answer: They're abbreviations for the French "quatrième corde", meaning "fourth string", and "deuxième corde", meaning "second string".
It appears that the posted excerpt comes from the solo violin part, first movement, to the French piano/violin edition. In that edition, see, for example, measure 13:
Comment: (And, to clarify further, the "fourth string" is G and "second string" is A, meaning that the snippet in the answer above is in sixth position. The dashed lines after the indication mean you continue on G string; the 2e Corde indication allows you onto A string, at first in first position, then into 3rd. This would have been the obvious interpretation even without the marking, but the 2e Corde in the second line is needed to tell the difference between the "3" finger indicating 1st position on E or 5th on A.


Do foods with water exceed 100° celsius in the oven?

Question: I was thinking that water in liquid state can't normally be much above 100 degrees celsius because it boils, so probably foods with lots of water like vegetables don't warm more than 100 degrees. Does this make sense? Suppose the oven is set at 200 degrees for example.
Comment: Perhaps some of the water remains trapped inside the food, turns to vapor, and continues to rise in temperature past 100 degrees?
Comment: You have to distinguish between oven temperature and the temperature of the food in the oven. They normally aren't the same in practical cooking. For example, you normally wouldn't want to cook meat so that its internal temperature rises to a temperature of 100C or 212F. That would be way over-cooking it.
Comment: Have you tried a search on boiling point elevation?
Comment: @D.Ennis Thanks, no i haden't tried I wasn't aware of that concept.
Answer: In the absence of added water to the food the temperature of food will not be uniform and can rise above the boiling point of water and most cooking is finished when the internal temperature of the food is below the boiling point of water.  With the added water the temperature is dictated by the temperature of the boiling water which can be elevated to up to about $120 ^\circ \rmC$ but adding salt only increases the boiling point by a few tenths of degrees.
In a conventional oven the rate at which heat is transported into the food depends on the temperature difference between the food the temperature of the oven.
The latent heat of vapourization of water is quite large.
Assume that the water is present just in the food.
The temperature of the food will rise with its outside temperature greater than that of the inside.
The water in the food is converted into vapour at the surface first and then deeper down in the food.
This evaporation slows down the rise in temperature but the food can reach temperatures above the boiling point of water because parts of the food will then contain water vapour rather than liquid water.
An example of the slowing down of the rate of temperature rise is the BBQ stall.
When meat is cooked in a BBQ its temperature steadily rises and then dwells for a time at about $70^\circ \rm C \; /\; 160 ^\circ \rm F$ and the temperature then starts rising again.  The explanation of this is that during the stall the rate at which heat enters the meat is equal to the rate at which heat is used to evaporate water from the meat and hence the temperature of the meat does  not rise.
Too rapid a rate of evaporation can be a problem and so food liked baked potatoes and baked apples is often cooked in foil to reduce the rate of evaporation.  In such cases the temperature of the food rises more rapidly.
Answer: To give a more complete answer to your specific question, the boiling point is when the molecules in water have enough energy to "escape" the liquid and become gaseous. When water boils in a pot the temperature will be 100C, which is measured by the average kinetic energy of the water molecules. The molecules that "break free" will be the ones that have the most energy at any given time. So as the more energetic molecules escape they take a disproportionate amount of energy with them causing the average energy of the boiling water to decrease. This prevents the specific situation that you are describing.
There is also the phenomenon of super-heated waterwhich is not what you are describing but is a way to raise liquid water to higher than boiling point temperatures.


Quality Assurance tools discrepancies

Question: It is a bit ironic, yesterday I answered a question related to this topic that was marked to be good and today I'm the one who asks. These are my thoughts and a question:
Also let's agree on the terms: QA is a set of activities that defines and implements processes during SW development. The common tool is the process audit. However, my colleague at work agrees with the opinion that reviews and inspections are also quality assurance tools, although most sources classify them as quality control.
I would say both sides are partially right: during inspections, we evaluate a physical product (clearly QC) but we see it as a white box so we can check its compliance with set processes (QA). Do you think it is the reason of the dichotomy among the authors? I know it is more like an academic question but it deserves the answer :)
Answer: To my experience, there is a difference between the academic or Wikipedia definition of QA, and the way the term is used in the real world. In the real world, QA, especially software QA, is most times used synonymously with "testing", and in many companies the "QA team" is nothing than a test team. That is clearly not the definition you have in mind.
However, having worked some years in that field, I have also seen often "QA" to be meant as a generic term for all kinds of activities to ensure quality in a production process. This can be testing activities (which you would call a QC activity), constructive measures (like using the right tools for the job), or measures to inspect and improve the production process itself. By this use of term "QA", quality control is just a subset of QA.
Of course, QM systems like ISO 9000 focus only on the quality of the process, and probably your definition of QA here was inspired by a system like that. But that does not mean that this is the "only true definition" of QA; there are different definitions used in literature and between different kind of people. If I were you, I would learn to live with that. Just listen carefully when someone uses the term QA, which of the various possible definitions he has in mind.
Comment: Yes, unfortunately, working in the really large SW company, if I said QA=Testing I would be fired most likely :)) Sure QC is a subset of QA. But I t am trying to follow the authors of literature and why they differ in their view of the tools used for either of activity.
Comment: @Roudak: authors differ about tools because they differ in what they mean by "QA". But does it really matter how you call it? Choose the activities you need for your production process, and call it however you like it.
Comment: The only reason it does not matter in software after we perform QC on one 'part', we then ship a million exact clones.
Answer: Personally, I think worrying about the distinction between quality control and quality assurance means you're more concerned about process than producing quality code. Frankly, the distinction between the words doesn't really matter.
All of the activities that relate to helping prevent defects and all of the activities that help catch defects before they go out the door are all related to quality. Call it "assurance", call it "control", it's really all the same.
Comment: Sure, becasue quality process leads to right and quality product. Code can be good but it is useless if everything else is bad.
Comment: -1: Although I agree with the overall sentiment of the answer, dismissing the distinction as trivial and insignificant is discarding a hundred years of learning experience. There is actually quite a large difference between the two.

Quality Assurance tools discrepancies


Infinite scroll on real-time data

Question: I am trying to implement infinite scrolling in a web application, records maybe added or deleted from the server, sorted in alphabetical order of their id, also the associated data can also change at any time and I have to show the latest data. I understand how infinite scrolling works and how to show the latest data for a fixed set of objects (in my case, polling on it repeatedly and dumping the data in view), but I am unable to understand how to integrate both. The API uses a cursor and sends me 20 records each time. Please help
Comment: If you can understand what comes into view and what goes out of view, you can use FCM (Firebase Cloud Messaging) to subscribe and unsubscribe topics (posts) as it is designed to scale to billions of users. A post that is updated through the server would then send out to that "topic" and people could then see the post update if you put logic to update your data.
Answer: I think I understand what is your main concern. Infinite scrolling with real time updates is very hard to achieve. You have to think it thru and figure out what really you want to achieve. There are couple situations to consider, to simplify, let's assume we use a grid with rows:

Visible row has changed (edit)
A new row was added between visible rows (add)
An existing row was removed from visible rows (delete)
Loaded row has changed (edit)
A new row was added between previously loaded rows, but they're not visible - we scrolled down (add)
An existing row has been removed from loaded rows (delete)
Any change in not loaded row is trivial - as we still have to load it

I think the biggest problem here is to operate with rows which are loaded and aren't visible. Any change made won't be visible for a user. Since that's the case, have you considered virtual scrolling? So show only 10 rows and replace them when user scrolls up / down. If you really want to have infinite scrolling, the good way would be notifying users, that the data has been changed, and you have to re-render the whole infinite scrolling. In that case, user decides to refresh already loaded data. You can grab what's visible and try to compute what to show to him (to reflect the previous state with added/removed/edited rows)
Answer: Essentially you would need to setup the records in a scrollable container. Then use some jquery to scroll the container down as more rows are added from the API callout.
This is some javascript code that I have that scrolls a list down. The css will need to have the overflow property set to achieve this.
<code>   function scrolllist(){

            //get the current width of the screen
            var width = document.body.clientWidth;
            var channelPanelWidth = 120;

            //get the height of the info container of the current video
            var elem = document.getElementsByClassName("listInfoContainer")[0];

            $('#listContainer').animate({scrollLeft: nextScroll + "px"}, {duration: 1000, specialEasing: { width: 'linear', height: 'easeOutBounce'},
            complete: function (e) {

                //debug print
                //console.log("animation completed");
            }

        }

  #listContainer{
  display: inline-block;
  vertical-align: top;
  width: 196px;
  position: relative;
  overflow-y: scroll;
  overflow-x: hidden;
  height: 510px;
  left: 0px;

}
</code>
The nextscroll variable will control how much the box is scrolled. If you would like to give it the appearance of continuous scrolling, then you just need to adjust the duration and the nextscroll variables so that they haven't reached the end of the list by the time the next update comes in from the API.
Answer: Socket.io or Google Cloud Messaging with Infinite Scroll
I'm coming here for ideas myself but consequently, when there are no answers to suite your needs you must improvise and come up with one yourself.
The typical infinite scrolling behavior
Doing infinite essentially is making queries on a paged set of data, fetching rows prior to showing them ahead of scroll momentum (up or down). I have this working perfectly in my web and ios/android.
To get real time per post
After doing this in socket.io and getting it to work just fine using "room" concepts, I've now decided to move to GCM Google Cloud Messaging (or now Firebase Cloud Messaging FCM) instead.
The approach
What I'm doing now is fetching 20 records at a time ahead of momentum and subscribing the user to 20 topics (posts) and as they move out of view I unsubscribe them from the topics not viewed behind momentum. If the momentum delta is too great, I disable this until it is within bounds as it makes no sense to subscribe/unsubscribe super quickly and could be considered as abuse to FCM.
Then, I have a hash lookup on the page/device for the posts I have loaded based on post id which matches the topics subscribed to and the post updates have the post id on the message packets so I can quickly update stats on the page / app based on this approach.
I was worried this would overload FCM but it seems to be amazingly scalable thus far. By the way, Firebase (anything) pretty much rocks but the FB DB is very limiting in terms of querying which is a bit disappointing so I used other cloud DBs.

Infinite scroll on real-time data


Enable Access to Programs in Guest Account in Windows 7

Question: I have a default administrator account with Open Office installed. I've recently enabled the Guest-Account for others to use. Open Office isn't available in the Guest-Account. How can I grant access of Open Office to the Guest Account?
Comment: So did you try any of the presented solutions bellow ? Did it work ?
Answer: 1) Login in to  your admin user account.
2) Click on Start and then right click on 'All Programs' then select 'Open all Users'.  Here you will find links to programs available to all users.  Leave this window open.
3) Click on Start again and right click on All Programs then select 'Open'.  Here is where are programs that only you can run.  Notice the file path at the top of this screen.
4) Click in the open gray area to the right of 'Start Menu'.  You can edit this line to jump to the guest or other users you have set up, and then when done editing hit return to move you to their start button directory.
5) Now you can drag and drop and/or drag a copy of program items between these various directories to allow or disallow various users access to your programs.
Comment: Unfortunately this method does not work in Windows 8.
Comment: Interesting.  Thanks for the heads up about that.
Answer: There is a way to allow all programs in Guest account.

Log on to Admin profile.
Open Windows Explorer. Right Click on C drive icon. Go to Properties.
Click on Security. Click Edit. Click Add. Click Advanced.Then click Find Now. 4. After clicking this,various types of user profiles will be shown below. Select the user profile in which you want to get access to all programs, like Guest profile.After selecting press OK.
Then your desired profile is shown in a box. Click OK again.
Now you will find yourself in a previous box. Just select your desired profile and then in the box below check Full Control. Then press OK.
Then the Security tab appears and you can see that your profile has been allowed.Then press OK and you're done.

For C drive,after clicking OK some error or faults may appear.You just keep on click "Continue". Repeat the same process for D & E drives as well.
Comment: Is your spacebar broken?
Comment: **Danger!** This is very likely to break Windows components because it overwrites all files' DACLs. Additionally, this procedure effectively makes that user an administrator because it can then modify all documents and important system files.
Answer: Find the program or file you want to make accessible to the Guest Account, in our example Open Office. Right click on the program icon and go to the tab security. Now you will see Group and Names, click Edit and then click Add. Now in the Box <code>"Enter the object names to select write"</code> write Guest and click Check Names. If you get it right Windows will write the Full Path  of the Guest Account. And now in the Permissions for Guest Account you can give the Account Full Control, just check the box of your choice and click Apply. Put a icon of the program on the Desktop. Try this method out and tell me if it worked cause I am interested too.
Comment: Hi - I found the instructions for the other answer easier to follow (step by step numbering), used that and it worked. Cheers.
Comment: If it worked its ok. There are no steps because it is just one click on the program and then adding the Account to grand access.


Proof for Kolmogorov complexity is uncomputable using reductions

Question: I am looking for a proof that Kolmogorov complexity is uncomputable using a reduction from another uncomputable problem. The common proof is a formalization of Berry's paradox rather than a reduction, but there should be a proof by reducing from something like the Halting Problem, or Post's Correspondence Problem.
Answer: You can find two different proofs in:
Gregory J. Chaitin, Asat Arslanov, Cristian Calude: Program-size Complexity Computes the Halting Problem. Bulletin of the EATCS 57 (1995)
In Li, Ming, Vitányi, Paul M.B.; An Introduction to Kolmogorov Complexity and Its Applications it is presented as an exercise (with a hint on how to solve it that is credited to P. Gács by W. Gasarch in a personal communication Feb 13, 1992).
** I decided to publish an extended version of it on my blog.
Comment: Furthermore, Chaitin's proof (in that link) shows that the oracle queries can be made in parallel. $\;\;\;\;$
Comment: Are these proofs are really Turning reductions (one to one (or) one to many) ?

I am confused !! please help me
Comment: @KrishnaChikkala: the first is surely a [Turing reduction](http://en.wikipedia.org/wiki/Turing_reduction). I found it not so clear, so I decided to [publish an extended version of it on my blog](http://www.nearly42.org/cstheory/halting_to_kolmogorov/). If you want take a look at it (and tell me by email if you think that it can be improved). Also note that Turing reductions are different from many-one reductions (which are "stronger" reductions); indeed Joe Bebel's answer proves that such reduction cannot exist.
Answer: This was a fun question to think about. As described in the other answer and the comments below, there is a Turing reduction from the Halting problem to computing Kolmogorov complexity, but notably there is no such many-one reduction, at least for one definition of 'computing Kolmogorov complexity'.
Let's formally define what we're talking about. Let $HALT$ denote the standard language of TM's that halt when given a description of themselves as input. Let $KO$ denote $\{ \langle x,k \rangle \mid x \text{ has Kolmogorov complexity exactly } k \}$.
Assume that $HALT \le KO$ by some many-one reduction. Let $f: \{0,1\}^* \rightarrow \{0,1\}^*$ denote the function that this reduction computes. Consider the image of $HALT$ under $f$, which I will denote $f(HALT)$.
Note $f(HALT)$ consists of strings of the form $\langle x,k\rangle$ where $x$ has Kolmogorov complexity exactly $k$. I claim that the $k$'s that occur in $f(HALT)$ are unbounded, as there are only a finite number of strings with Kolmogorov complexity exactly $k$, and $f(HALT)$ is infinite.
Since $HALT$ is recursively enumerable (aka Turing-recognizable in some books) it follows that $f(HALT)$ is recursively enumerable. Combined with the fact that the $k$'s are unbounded, we can enumerate $f(HALT)$ until we find some $\langle x,k\rangle$ with $k$ as large as we want; i.e. there exists a TM $M$ that on input $k$ outputs some element $\langle x,k \rangle \in f(HALT)$.
Write a new TM $M'$ that does the following: first, compute $|M'|$ using Kleene's recursion theorem. Query $M$ with input $|M'|+1$ to get $\langle x, |M'|+1\rangle \in f(HALT)$. Output $x$.
Clearly the output $x$ of $M'$ is a string with Kolmogorov complexity at most $|M'|$ but $\langle x, |M'|+1\rangle \in f(HALT)$ which is a contradiction.
I believe you can also substitute in the problem "Kolmogorov complexity exactly $k$" with "Kolmogorov complexity at least $k$" with minor changes.
Comment: A few places claim that Kolmogorov complexity is Turing equivalent to the Halting problem, for example Miltersen's notes http://www.daimi.au.dk/~bromille/DC05/Kolmogorov.pdf. If that's true, there must be a Turing reduction. By the way a Turing reduction from Kolmogorov complexity to the Halting Problem is easy and gives a different proof that halting is undecidable.
Comment: But what about a Turing reduction?
Comment: Let me throw out this idea in a comment because I haven't thought through the idea. Let the decision problems be the same but the reduction is now a Turing reduction $R$. Consider the set $S$ of all $\langle x,k\rangle \in KO$ such that there exists some TM in $HALT$ that causes $R$ to query the $KO$ oracle on input $\langle x,k\rangle \in KO$. I claim $S$ has the same unbounded $k$ property (this needs to be justified a bit more than I am stating) and $R$ can be used to construct such unbounded $\langle x,k\rangle$, which is always a contradiction.
Comment: Actually I retract that $R$ can be used in that way. It is not so clear in the Turing reduction context.
Comment: $HALT\le_T KO$ follows from the arguments given in the link in the other answer. In fact, since the other reduction is (almost) trivial, we have that $HALT\equiv_T KO$.


Problem With Database Design For MVC - 1 Table Per Model

Question: My biggest hurdle with getting started with an MVC framework has to do with with the 1 model to 1 DB table concept. To me it's overly simplistic and unrealistic for anything beyond a simple app. Yet, MVC is in use everywhere, including this awesome StackOverflow site. As is typical, all of the code examples and tutorials i come across are very simple and the 1 to 1 relationship works fine in those cases. But, what i'm looking for is a solid real world example of an MVC model that address table joins. In the case of stackoverflow, i would imagine a DB design with tables like Questions, Tags, Users, etc. In my DB design I may have a Question_Tag link table to to look up all tags associated with a given question. How does MVC deal with this?
Comment: Yea, you are getting confused.  ORMs and a MVC pattern can be used together, but really, are mutually exclusive
Answer: I don't believe that there is anything about the MVC design pattern that states that there should be one database table per domain class. In fact, there is nothing about the MVC design pattern that even says that your model should be or has to be persisted in a relational database.
This is just the strategy that some popular frameworks (Ruby on Rails - maybe ASP.NET MVC too?) have taken on, for what appears to be convenience sake. But it is not a requirement of MVC.  Spring MVC (for the Java world) has no inherent concept of how to map the model components to a database, in fact it's beauty is that it doesn't care - you just need to supply the model data to use, and where you get it from the MVC framework doesn't care about.
So in other words, you don't need to assume that the MVC pattern means that you have to use one database table per model component. Heck you don't even need to use a database, your model could come just as well from a flat file or web services (and what's great about MVC is that if you design your app properly, you could swap different data layer implementations in and out of your application and the View or Controller won't even know).
Comment: It's not even a requirement in Rails, more like a default starting point.
Comment: Matt you are correct. After another week of digging deeper I get this now. There's a lot more flexibility allowed in the model component than i had thought. It seems you can write your DAL however you like and even have seperate BLL and DAL layers or neither.
Answer: I think you are confusing MVC with ORM. ORMS bind you one to one with Database Tables and Objects.
What you need to do is send your Model objects from your MVC to a DAL layer that can populate them for you from SQL queries and return you the objects. Similarly you can send the populated objects with changes back to the DAL layer to be persisted.
This is a much cleaner and flexible design that you can use with the MVC pattern and you do not have to couple your objects to database tables, while using the join capabilities of SQL.
Comment: "ORMS bind you one to one with Database Tables and Objects."

This statement is not true at all.  Every .NET ORM solution has the capability to map complex joined queries to single objects.  ORMs solve the impedance mismatch problem with is exactly the opposite of a one to one relationship.
Comment: *which is exactly the opposite, sorry, typo
Answer: OK Ahmad that makes sense. But in all of the MVC examples I've seen, the model is something of a combined BLL/DAL. What you're talking about is keeping the Model as a pure BLL and creating a separate DAL. I thought one of the main features of using an existing mvc framework was to speed up development. If I'm going to have to create a DAL on top of MVC I may as well stick with my existing non-MVC development process of a creating pages with separate business logic and data access layers.
Comment: You could use a code generator to generate your DAL the way I mentioned if you think it is too much work. But keeping your DAL separate from your Model is key to a flexible design and keeping data access logic out of your MVC.


Losing connection to servers after 5 min (different ports)

Question: A month ago I moved and made a new contract with a new ISP (Claro Peru). Since I switched from ISP I noticed that my connections to servers are always cut after 5 minutes of inactivity (Connections to ports 20, 22, 5432, 3306). This happens on my two computers (linux mint eth-interface, ubutu wlan interface). How can I determine if it is the ISP or the modem-router(device) that makes these cuts?
Answer: Its pretty difficult to do.  There are a few things to understand to help -

IP packets are packet switched, meaning changes in routing may have a temporary effect on connection but won't break them.
NAT rewrites the IP (typically the source IP) - and a change to IP address will break your connection.  Connection tracking tables overfilling can also.
Many ISPs use Carrier Grade NAT. This can break your connection.
It is possible (but a lot less likely) that TCP connection are deliberately being closed by a router sending packets (FIN or RSTpackets I think).

If you check your router WAN interface and it has an address starting 100.64 (or 10. or 192.168 or 17.16-31.) Then your ISP is deploying some kind of NAT and is most likely the culprit.
If the timeout is fairly consistent and/or happening even if you are the only one using your Internet connection, and you are only doing 1 type of thing, the chances become very high that its an ISP fault.
You can try an alternative router recommended by your ISP and if the problem goes away , well, it was your router. If you are using the same router as before and the problem started when you moved ISP its the ISP.
If this fails, it becomes hard. You need to start looking at tcpdumps / data traffic logs in the client and server to see what happened.  That takes quite a lot of work.
You can work around the issue by setting up a (for example OpenVPN) VPN between your computer and server. In this way the connection the VPN uses can fail and restart  the connection to the server will continue - this is true even if you move between ISPs! VPN abstracts your connection to your provider from your connection to the server.
Comment: [http://i.imgur.com/Zb6M0zq.png] So. This a CG NAT Connection.
Comment: Based on the Internet vlan being in the 10.168 network, your ISP is incompetent, and is most likely the cause of the issue.  (They should not be using 10.x.x.x to connect to you except by mutual agreement.  Arguably they are not even doing proper CARRIER grade NAT because they  are in breach of RFC6598 section 3.
Answer: Use BitviseSSHClient instead. It auto reconnects.


Why does the sum of $N$ Bernoulli random variables have a Poisson distribution if $N$ is Poisson distributed?

Question: Assume those $N$ Bernoulli random variables are i.i.d. with probability $p$, where $N \sim \operatorname{Poisson}(\lambda)$. The finite sum of them is Poisson distributed with $p\lambda$. I read a book claims that but without proof.
Comment: Alternatively to the MGF proof, you can calculate the distribution directly from the law of total probability: $P(Y=j)=\sum_{n=0}^\infty P(Y=j|N=n)P(N=n)$, where $Y=\sum_1^N X_i$, $N$ is Poisson $\lambda$ and $X_i$ are iidrv Bernoulli. All one must know is the conditional distribution—which should be an extremely familiar distribution of a discrete RV related to sums of Bernoulli variables...
Answer: Here's a pedestrian way:
Let $j\in \mathbb N$,
$$\begin{align}
P\left( \sum_{k=1}^N X_k = j \right) &= \sum_{l=j}^\infty P\left((N=l)\;\cap \left(\sum_{k=1}^l X_k = j\right)\right)\\
&=\sum_{l=j}^\infty P\left(N=l\right)P\left(\sum_{k=1}^l X_k = j\right) \quad \text{by independence of $N$ and $X_k$}\\
&=\sum_{l=j}^\infty e^{-\lambda}\frac{\lambda^l}{l!} \binom lj p^j(1-p)^{l-j}\\
&=\frac{e^{-\lambda}p^j\lambda^j}{j!} \sum_{l=j}^\infty \frac{\lambda^{l-j}(1-p)^{l-j}}{(l-j)!}\\
&= \frac{e^{-\lambda p}(\lambda p)^j}{j!}
\end{align}$$
Hence $\sum_{k=1}^N X_k$ follows a Poisson distribution with parameter $\lambda p$.
Comment: @Smarty77 $$\sum_{l=j}^\infty \frac{\lambda^{l-j}(1-p)^{l-j}}{(l-j)!} = \sum_{l=0}^\infty \frac{\lambda^l(1-p)^l}{l!} = e^{\lambda (1-p)} $$
Comment: @Smarty77 To be precise this is more related to the power series expansion of $\exp$: $e^z = \sum_{k=0}^\infty \frac{z^k}{k!}$. I just reindexed the sum. If you wanted to be formal you could write $$\sum_{l=j}^\infty \frac{\lambda^{l-j}(1-p)^{l-j}}{(l-j)!} = \lim_{N\to \infty} \sum_{l=j}^{N+j} \frac{\lambda^{l-j}(1-p)^{l-j}}{(l-j)!} = \lim_{N\to \infty} \sum_{l=0}^N \frac{\lambda^l(1-p)^l}{l!}=\sum_{l=0}^\infty \frac{\lambda^l(1-p)^l}{l!}$$ where the reindexing is done on finite sums.
Comment: Could you please provide explanation to the last rewrite of equation? Where did the summation go? And how did u get p to the exponent of lambda?
Comment: ah, the Taylor Series! Thank you! And can we rewrite any j to 0 like that, because it is constant and it gets lost in infinite series, or is there some other reason?
Answer: You can prove by showing that the moment generating function of $\sum_{i=1}^{N}{X_i}$ is that of a Poisson.
\begin{align*}
 E\left[\exp\left(t \sum_{i=1}^{N}{X_i}\right)\right]
 &= E\left[E\left[\exp\left(t \sum_{i=1}^{N}{X_i}\right)\bigg|N\right]\right] \\
 &= E\left[\prod_{i=1}^{N}E[\exp(t X_i)]\right] \\
 &= E\left[(p\exp(t)+(1-p))^{N}\right] \\
 &= \sum_{i=0}^{\infty} \frac{(p\exp(t)+(1-p))^{i} \exp(-\lambda)\lambda^{i}}{i!} \\
 &= \exp(-\lambda) \sum_{i=0}^{\infty}\frac{(\lambda(p\exp(t)+(1-p)))^{i}}{i!} \\
 &= \exp(\lambda(p\exp(t)+(1-p)-1)) \\
 &= \exp(\lambda p(\exp(t)-1))
\end{align*}
Note that $\exp(\lambda p(\exp(t)-1))$ is the moment generation function of a Poisson($\lambda p$).
Comment: This works only if you have a theorem that says a distribution with the same moment-generating function as a Poisson distribution has a Poisson distribution.


How do I enable wifi channels 12-14 when traveling outside the United States?

Question: For whatever reason, the United States' FCC doesn't allow wifi users to broadcast on channels 12-14. However, I'm sure the hardware supports it (RTL8188CE). If I'm traveling outside the United States, is there a way to enable the other wifi channels over 11?
Comment: I'm Australian and I think we're allowed to use 12 and 13 from memory, but many of our devices still default to only using 1 to 11 just in case they're used in the US, I guess.  Remember that you are still using the neighbouring 5 or 11 channels as well (depending on 20/40MHz bandwidth), so using channel 13 you're still overlapping the same frequencies as someone using 11.  IMO enabling those channels doesn't give all that much benefit.  Your base stations would also need to be configured to use those channels too.
Answer: I'm not entirely sure, but I think the CRDA (Central Regulatory Domain Agent) should change itself based on your localization in system.
To change it manually use:

% iw reg set <country code here, e.g. JP>

Read this for more info.


Would it be possible to put V-22 Osprey engine/props on a PBY Catalina Flying Boat

Question: The larger props of the Osprey may have greater efficiency over smaller props.  The high wing of the Catalina seems to have enough room for larger props.  The original PBY had a range of over 2000 miles and was amphibious.  Could this old design find use today with modern technology?
Comment: "The larger props of the Osprey may have greater efficiency over smaller props." why?
Comment: See question regarding power requirement comparison of helicopter vs plane.  We established that a higher aspect, slower (airfoil) prop is more efficient.  See also wing tip vortex cancelling concept of Vought V-173.  This work was stopped with the onset of the jet age, but may find application in the high cost of fuel age.
Answer: The engines on a PBY-5A Catalina are spaced only about 15' apart. The V-22 Osprey rotors (propellers) have a diameter of 36.1 feet and are much too large.
The engines would have to be moved more that 36' apart for the 18' blades to clear each other. The "high wing" of the Catalina is only about 10' from the water during water operations, and about 14' from the ground during ground operations, so that presents additional clearance problems.

To scale, putting V-22 props/engines on a Catalina, would look like this:
Comment: The drawing shows a prop diameter of 12' 1 ".  But more importantly, the distance between engines is approximately 15' which is less than the 18' radius of the Osprey prop blades. The props hitting the water would be trivial compared to the damage to the fuselage and the other engine.
Comment: The engines would only need to be 18' and some change apart for the radius of the left prop to miss the right engine nacelle. They _could_ be sync'd to interleave to avoid blade collision as they are on the Chinook (and they're linked on the Osprey itself, so the mechanicals are there). However, all the point for "why this won't work" are quite valid.
Comment: Good point.... I have edited my answer in order to improve it. Thanks.
Comment: If the nacelles were mounted on the wings an adequate distance apart the rotors could be tilted to avoid striking the ground or water.  The V-22 can not land with rotors pitched down either.  Also, smaller rotors may be considered.  The Vought V-173 "flying pancake" also bears similarities.
Comment: @qq jkztd ok, please lower the nacelles to wing level and a little farther out to avoid striking the fuse.  Also, superimpose 25 foot rotors.  Thanks.


Is it possible to make a profit in inter day trading using penny stocks(1$ to 3$), given that commission is 0.005 for buying and selling?

Question: If I can get an average profit of 0.5% per trade, and there is a commision of 0.005 per share, can it ever be profitable to trade penny stocks(1$ to 6$)?
Comment: The way to make a small fortune in day trading is to start with a large one.
Answer: Are you asking if you aim for a profit of 0.5% profit on each trade if you can be profitable? That means for every $1000 of capital you trade you only expect to make $5 in profits.
Even if you could achieve a 95% success rate, one or two losses would wipe you out.
Successful trades achieve their profitable results by letting their profits run and taking small losses early. Most successful traders only achieve around a 50% success rate, but have average profit size at least 2x to 3x their average loss size.
So no, I don't think you will be successful and profitable trying to make many small profits, nor by trying to trade penny stock (which by definition are less than $1).
Comment: If I'm buying and selling select stocks at the close of each day, and make an average profit of 1% and get a profit 70% of the days, we can almost double the initial amount in 70 trades. But the problem is, this 1% profit can be taken away by commisions and I'll be getting something like only 0.3% profit. Which is why I'm asking if it can ever be profitable
Comment: @Victor - In the US, the SEC defines a penny stock as one which  trades at less than $5 per share.
Comment: @BobBaerker - well we don't know if the OP is in the US, as in Australia penny stocks are worth just that - pennies not $$$.
Comment: @RishiSwethan - there is no way you will get a success rate of 70%, like I said the best traders aim to get around 50%. Also you will never make any profit by trying to aim for such small profits.
Comment: @Victor - Since we don't know where the OP is located, that's why I specifically noted that the  location  for penny stocks being under $5 was for the US, something that you failed to do in your Answer.
Answer: Small correction: Your title asks about trading $1 to $3 stocks but the body  talks about trading $1 to $6 stocks.  It doesn't really matter mathematically since both upper limits  are above the threshold for gain.
Given the percent gain and the commission fee that you provided, you must trade stocks that cost more than $2 in order to make a profit.  Otherwise, it's a guaranteed loss, no matter how many shares you trade because the commission will exceed the profit. The one exception to this would be 100 shares at $2.01 which would yield  no gain.
Comment: Thanks for the input, Do you know any brokers that provide commission lower than this with API support?


How should SessionFactory instances be handled within (Spring MVC) web requests?

Question: This is a very basic question yet I need help. Suppose we make a singleton bean in spring, then spring ioc would make a single instance of that specific bean and when some sort of code needs it that would be injected.That's fine. But I am confused about how will it be managed by multi threading environment. Like if we make a sesssionFactory bean in spring as singleton then making many requests to a specific rest url which needs sessionFactory bean. How spring framework will provide that single instance of bean to that many requests.
Answer: Are you talking about a persistence provider session factory, e.g. the Hibernate SessionFactory?
This factory should exist once for every DataSource, because it is not really cheap to create (connection handling, memory consumption) and should definitely be reused for the whole application lifetime, so a singleton is the way to go at this point. The factory is immutable (threadsafe) and there will be no concurrency issues.
Every incoming thread (created by a web request) should reuse this factory to create it's own session and this session should be used for this thread no matter how often it's accessed (e.g. stored in a thread local variable).
E.g. if we now move up in the abstraction layers to JPA level, the JPA EntityManagerFactory is wrapping the Hibernate SessionFactory and if you  want to use the JPA pendant to a Hibernate Session - the EntityManager - and you would like to let Spring manage it, you would get a EntityManager proxy like this:
<code>@PersistenceContext
private EntityManager entityManager;
</code>
This would provide the EntityManager proxy (wrapped Session) for the current thread to your business code.
Same is valid for the next level of abstraction if you use Spring Data JPA, it's repositories and <code>@Transactional</code> methods. In this case Spring also handles that for you.
Comment: If it is a singleton (it's the default) it is of course shared by all threads. If it is your own Bean and it has a state (members) you have to care about thread safety / immutability. Otherwise you can have side effects / concurrency issues.
Comment: Thank You..You explained it very well. Now I understand how SessionFactory is used as a singleton bean. But I also want to know, How a singleton bean (generated by @Component annotation) is used when concurrent web requests are made?
Comment: If I use a class very often, and this class have some local variables.Can I declare it as a bean and autowire it to every class where I need it without caring about concurrency issues?
Comment: If the methods of your bean only use local variables, yes. If the class has members, no, because the members are shared between threads. That is a general (Java) concurrency thing and it does matter how the singleton is created, not related to Spring / DI. Maybe try to start gaining more information here: http://docs.oracle.com/javase/tutorial/essential/concurrency/


Why is the syllable division in "experience" different from its pronunciation

Question: Why is the syllable division in the word "experience" ex-pe-ri-ence, and not ex-per-i-ence?
Comment: Because the rules of dividing written words into "syllables" only apply to letters, not to real syllables with real sounds. English spelling does not represent English pronunciation in a regular way. Sorry about that, but it's the truth. English spelling is good for Middle English, but it sucks for Modern English.
Answer: Because when Webster first came up with the system of dividing words into syllables, experience was pronounced ex-pee-ri-ence and not ex-peer-i-ence, the way many of us do today. And they haven't bothered changing it since.
From Webster's 1892 dictionary:

Experience: (ĕks-pē′rĭ-ens) — /ɛksˈpiː.rɪ.əns/.
  Experiment: (ĕks-pĕr′ĭ-ment) — /ɛksˈpɛr.ɪ.mənt/.

I've translated Webster's notation into IPA, as nobody uses their 1892 phonetic notation anymore.
The American Heritage Dictionary's syllabifications are quite strange. They have:

ex·pe·ri·ence,
  ex·per·i·enced,
  ex·per·i·enc·ing,
  ex·per·i·enc·es.

I would guess they kept the original syllabification of experience for the sake of consistency, but they have updated all the inflections of the word to match the current pronunciation.
Comment: I'm having a hard time producing contrasting pronunciations of *experiment* where there's an open /piː/ syllable in one and a closed /piːr/ one in the other. Shouldn't tense vowels be open syllables, checked ones closed? That said, there are definitely East Coast folks who pronounce this word differently than I do. They seem to strangely say "eggzbeeramint" — which sounds more like a failed hangover concoction of "eggs, beer, and mint" than it does the word I'm familiar with. I think I have a tense /per/ rather than lax /pɛr/, and I know I don't have /piːr/.
Comment: @tchrist: right: the difference between *mirror* and *nearer* disappeared in most American English accents a long time ago. *Experience* used to have the *nearer* vowel rather than the *mirror* vowel, which is why it was syllabified the way it was. (And I can't tell you exactly how *nearer* was pronounced in 1892.)
Comment: I don't believe I ***ever*** have a lax vowel before /r/, whether in *marry–merry–Mary*, *mirror–nearer*, or *horse–hoarse*. Of those, only that first triplet can I easily perceive and produce the non-merged version of; the others I'm hazy on. I perceive my own production of all those [before /r/](https://en.wikipedia.org/wiki/English-language_vowel_changes_before_historic_/r/) as [**tense monophthongs** (so /er/, /ir/, /or/)](https://en.wikipedia.org/wiki/Phonological_history_of_English_vowels#Tense.E2.80.93lax_neutralization), which is originally from the eastern Wisconsin–Illinois border.
Comment: The real pronunciation of _experience_ in American English syllabifies into /ɛk.spi.ri.əns/. The fact that the letter X represents a consonant cluster /ks/, and that the actual syllable boundary falls between the /k/ and the /s/ makes any syllabification scheme involving the letter X unsatisfactory. That's what I meant in my previous comment.
Answer: Why do you assume ex-pe-ri-ence is wrong?  That is how I say it. Therein lies the answer to  your question. Because of different dialects and regional variances, there is no one true syllable division. Lexicographers basically choose the pronunciation they believe to be most common. They are usually correct, and their guidance is helpful. But 5 years from the dictionary's release, pronunciation may well have changed.
English is defined from the ground up. There is no governing body to declare standards. English educators, style guides, grammarians, lexicographers, etc., do their best atop constantly shifting sands.
Comment: Not 5 years from the dictionary's release ... more like 125 years from the dictionary's release. Webster hasn't changed most of their syllabifications for over a century.
Comment: @PeterShor It seems I was unclear. My point was that the language keeps changing while the book sits on its shelf.  I'll edit that part for clarity.