What exactly does a motor driver do? Why do we need an additional power supply for motors?

Question: What exactly does a  motor driver do? Why do we need an additional power supply for motors? I'm a hobbyist and making a line follower from scratch.
Answer: At a high level, a motor driver takes a "logic-level" input (desired "effort") and delivers a corresponding "high-side" output to the motor. Exactly what is inside the motor driver depends on the motor and driver (for example brushed and brushless motors are driven very differently).  Larger motors like the ones in quadcopters or higher end remote control cars tend to be brushless motors, which are driven using carefully offset sinusoidal inputs (very roughly speaking).  A smaller line-follower robot will typically use a brushed motor, which can be controlled using simpler circuits such as an H-bridge.
There are several reasons to "isolate" the motor and control power supplies.

Motors have a lot of electrical "inertia" (inductance) which translates into a lot of electrical noise pushed back into the power supply. Microcontrollers are built assuming that the input supply is reasonably "clean", and this noise can reset your control circuitry (best case), or burn out internal components (worst-case).
Motors often have higher voltage and current requirements than control circuitry. For example the digital outputs of an aruino can put out around 100mA at 5 volts (which might be enough for a small line follower). A brushless motor used on a small fixed wing aircraft such as the Zephyr II can draw 100 amps at 12 volts.

Note that you do not need a separate battery for the controls and motor power, but you should have separate circuitry which "cleans" the raw battery voltage (such as an LDO or buck converter) before sending it to the control circuitry.
Answer: If a DC motor is being connected to something like a microcontroller's I/O, the I/O pins usually are only capable of supplying currents in the order of mA. Motors need much higher current to actuate themselves, so typically a motor driver is used. A motor driver is merely a current amplifier, even a push-pull transistor pair can be used to achieve that. Another function that motor drivers commonly perform is to isolate low power electronics from the high power supply that usually runs a motor. A more commonly used implementation is called an H-bridge: https://en.wikipedia.org/wiki/H_bridge
If you're talking about stepper motors though, this becomes a more complicated process. Stepper motor operation involves attraction between rotor and stator magnets, and a reversal of stator poles is one of the things that takes place. But the motor winding, being a coil, usually has its own inductance, and high drive voltages are necessary to overcome this inductance and cause the reversal. Hence, stepper motor driver circuits are usually more complicated, which are responsible for both generating high voltages and also controlling current to each winding, making sure it doesn't exceed a certain value etc.
So mainly, any motor usually needs a driver circuit because its voltage/current requirements are different from the device that's trying to control it.
Answer: Main work of motor driver is to supply power to motor from external source by taking inputs from logics from microcontroller because microcontroller output will be in milliamps.Another use is to change the direction of rotation of motor


isomorphic graphs adjacency lists

Question: Is there an algorithm which will allow me to find an isomorphism between two graphs if I have their adjacency lists?
Comment: The graph isomorphism problem is unusual in that it is NP but probably not NP-complete and no polynomial-time algorithm is known. The Wikipedia article has references for some state-of-the-art algorithms: http://en.wikipedia.org/wiki/Graph_isomorphism_problem
Answer: As requested, my comment as an answer:
The graph isomorphism problem is unusual in that it is NP but probably not NP-complete and no polynomial-time algorithm is known. The Wikipedia article has references for some state-of-the-art algorithms.
Comment: Even more than that, the graph isomorphism problem is still not even know to be P-complete (even though it most likely is).
Answer: There is the naive algorithm which tries all permutations of the vertices of 1 graph to map to the other, and then for each permutation, checks if the mapping is an isomorphism. There are $V!$ permutations and checking the mapping takes $O(V+E)$ (why?). So the runtime is exponential.
There are theoretical algorithms that are sub-exponential but super-polynomial and use pretty etherial assumptions (the classification of finite simple groups).
For actual practical efficient software that decides isomorphism, see Brendan McKay's nauty software. As usual, software for hard problems usually turn out to be pretty fast on most instances, because of convenient optimizations employed, and, if the algorithm is adaptive enough, most examples really are pretty easy. (the above naive algorithm is not adaptive at all, you have to go through all permutations to be sure.)

isomorphic graphs adjacency lists


Is symmetric encryption vulnerable to known plaintext attack?

Question: If Bob sends some plaintext to Alice for encryption before sending the ciphertext to Carol, can Bob deduce the key by comparing the plaintext and ciphertext assuming only Alice and Carol knows the key and it is a symmetric encryption scheme?
Comment: Edited the question to make it clearer, but i would think its a better fit for crypto stackexchange.
Answer: It sounds like you're describing a "chosen plaintext attack" where Bob can craft a series of special messages that he can use to break the encryption through differential cryptanalysis.
(You might also be thinking of the "known plaintext attack" where Bob knows the plaintext and the ciphertext but can't make special ones - e.g. if Alice is reading the plain texts then she might notice Bob is sending weird messages.)
(And as a0video points out, there are also attacks where the attacker can encrypt the same plain text with different keys.)
Some symmetric encryption algorithms are indeed vulnerable to these attacks.
On a practical note, though, if you are properly using a modern, well established symmetric algorithm, such as AES - and you should be! - then you have little to worry about. The best crypto attacks on AES still don't reduce the time needed to break them to anything remotely do-able.
Answer: It depends on what construction you are using. For example Graham mentioned AES, which its known to be a semantic secure block cipher. However, all ciphers are vulnerable to exhaustive search attack and in the case of AES, even four times better key recovery attack is known - this paper from BKR '11
Comment: Ah, good point, if the attacker is able to encrypt the same plaintext with keys they choose, they can do more. I'll update my answer.
Answer: This kind of attack would work no problem if the key is not strong. So the weak key, the known plain text does help a lot.
I mean, with AES and truly random key the known plain text would not help.
Comment: This is incorrect. Even if you encrypt plaintext using a null key, a known plaintext attack would not be any better able to break it than if the key were truly random.


The origin of the color wheel

Question: Is there a reason for why were the five colors of MTG ordered, clockwise, white, blue, black, red and green?
Answer: The colors adjacent to each other on the pentagon are "allied" and often have similar, complementary abilities. For example, Blue has a relatively large number of flying creatures, as do White and Black, which are next to it. The two non-adjacent colors to a particular color are "enemy" colors, and are thematically opposed. For instance, Red tends to be very aggressive, while White and Blue are often more defensive in nature.
I don't think that white is on the top has a reason though.
Comment: @0kelvin They can not change it anymore, because all cards must have identical backs. That's why the "Magic The Gathering" still has a ™ symbol even though it is a ®egistered trademark by now and why it still reads "DECKMASTER" even though that product series doesn't exist anymore.
Comment: I guess that the creator summarized the mood for each color and placed them on a pentagram. And he made it right, because they never changed it.
Comment: @0kelvin Yes, pretty much: http://markrosewater.tumblr.com/post/77670999325/who-began-the-idea-of-color-pie-philosophy He certainly had a philosophy in mind for all of them, even if it wasn't completely explicit, and things matured from there.
Comment: In MTGO they can, because there is no paper there.
Comment: @Philipp Well, he also made it right in the sense that they didn't really have to drastically shift the identities of any of the colors, so the order makes sense still (in terms of ally/enemy colors), and so there wasn't a real reason to change it even if the card backs weren't an issue.

The origin of the color wheel


How can a processor handle 10 Gigabit per second or more data rate?

Question: I do not know if it is the right place to ask. It may be a very silly question. I assume that some processor has to process data frames for switching/routing. Modern processors have speed of few GHz. How do they handle data that is coming at a rate faster than they operate?
Comment: Common CPUs process many bits within a single cycle - the data bus transports between 64 and 512 bits with a single cycle, commonly up to 3,2 billion cycle/s (as of 2016). CPUs are usually superscalar with up to 32 operations per clock cycle per core and more than 4 billion cycle/s. Overall, that's plenty of processing and throughput capability for 1.2 GB/s. But all that is pretty off topic here.
Answer: You are totally correct, if we have to use an instruction cycle per bit then 10Gbps would be unachievable. So the first thing to note is that we handle a word per CPU instruction -- 64 bits.
Even then the worst thing we can do for performance is to have the CPU access all of the words of a packet. Thus the focus on "zero-copy" handling of packets. Some of that trickery is in the interfaces themselves: they have DMA ("Direct memory access") so that the ethernet controller chip copies the data into RAM; they calculate the checksums so that the CPU doesn't have to access all the words in the packet to do so. Some of it is in the data structure design: we are careful to align packet buffers so we can move them by changing the ownership of a page table entry. Some of it is just careful programming to ensure that packet data is accessed the least number of times, and preferably not accessed at all until the receiving application program.
Once we've done all of this the next limitation is the overhead of handling packets one at a time. Thus there are a heap of "segmentation offload" features both in the ethernet controller and in the kernel so that we handle groups of packets. We even delaying retrieving data from the ethernet controller so that these groups are larger.
Finally we have special-case shortcuts, such as the kernel's sendfile() call which is an express path from disk to network using the minimal amount of work.
We can even use special-case routing (the forwarding of packets from one interface to another) using the hardware features of the network interface cards and treating the PCI bus as a bus between the cards rather than getting the CPU involved. That can't be done in general purpose operating systems, but vendors like Intel provide software libraries to implement such features on their ethernet controllers.
Moving away from CPUs altogether, we can even build special-purpose routers where all forwarding tasks happen in hardware. Since the PCI bus would then be a limitation, they run multiple parallel busses; or even multiple parallel busses to multiple parallel crossbar switch assemblies. At one end of the market a small TCAM-based ethernet switch would be one example; at the other end of the market the Juniper M40 would be a canonical design.
A typical switch will start to receive a packet, look up the destination address in the TCAM, attach a tag with the egress-port to the packet, and then DMA the still-incoming packet to the egress port's controller. Note that if the output port is congested then all that can be done on this simple switch is to throw away the ingress packet. Thus simple switches do not make a good choice for when links change speed and some queuing is desirable. Of course more sophisticated switches exist, for which you pay more.
A typical router will receive a packet and hold it in a short queue. The destination IP address will be looked up in static RAM, the packet will then be exploded into cells to reduce latency, and each cell sent to a cross-bar switch to the egress card. That card will reassemble the cells into a packet, and queue the packet out the egress interface.  The queuing on the egress interface can be sophisticated.
Comment: Great answer. Can you elaborate on `the packet will then be exploded into cells to reduce latency`?
Comment: In a router design you could simply send a packet from one line-card to another via the cross-bar switching (or some other sort of inter-card bus). But then the latency is bound by the length of the packet -- you would have another complete packet transmit delay as the packet is sent through the crossbar switching. To avoid that we can have multiple parallel links into the crossbar switching and split the packet across those links. Then the latency for large packets is much reduced. A part of a split-up packet is called a 'cell'.
Comment: I know this answer is from two years ago, but THANK YOU SO MUCH.  I had the same question as the original poster, and found your answer in my search.  It is VERY well written and thorough.  Thanks!
Answer: Today, almost all switching, and much of routing, is handled in hardware, so the processor speed comes into play for exceptions. For things like servers, it is possible that the processor isn't fast enough. This has been the case in the past. When 1 Gbps ethernet first came out, the bus used in PCs and servers could only handle 400 Mbps.
What happens when the processor isn't fast enough is that traffic gets dropped. A lot of traffic may be dropped, anyway, since that is how congestion is handled, if done correctly. RED (Random Early Detection) is a method used to randomly drop packets in queues in order to prevent them from filling and tail-dropping packets. This can help to prevent TCP synchronization. A lot of drops occur on switches, where multiple ports of a speed may need to send to another single port of the same speed.
Comment: This confuses ingress discards with egress drops. Discards typically happen when the ring-buffer of the ethernet interface is over-filled -- as happens when a CPU can't keep pace with the arrival rate of data. That ring-buffer is too small for RED to be implemented.
Comment: @vk5tu, you missed my point that traffic gets dropped all the time, whether ingress or egress. If any part of the system can't handle the amount of traffic, some will be dropped, and some is dropped on purpose.


Can I use expired subcutaneous fluids (lactated ringers) on my cat?

Question: I use lactated ringers to deliver fluids subcutaneously on my cat with kidney disease. I noticed today that one of the bags' expiration date has already passed.
Is it safe to use? What are the risks/dangers?
Comment: Related: [How long do subcutaneous fluids keep?](http://pets.stackexchange.com/questions/6220/how-long-do-subcutaneous-fluids-lactated-ringers-keep)
Answer: tl;dr
If the lactated ringers have been sealed and kept in controlled conditions (stable temperature, humidity, etc), there is a high probability that they are safe to use. If there is any question about the history of product (it sat in someone's car for a few hours), there is no data on the likely performance and it is probably better to discard the solution.
Details
In the United States, the Food and Drug Administration has administered the Shelf Life Extension Program (SLEP) for the Department of Defense for over 20 years. The goal of SLEP is to reduce government spending by testing medications (and other materiel) that have passed their manufacturer's expiration date to determine if the materiel is still useful (so the DoD does not have to dispose of it and repurchase replacement materiel). In 2006, a paper summarized the data that had been collected so far.

Pharmaceutical drug products sealed in original container closures are stored under controlled conditions by the military services.

When the expiration date approaches, a sample (subset) of the lot is sent for testing.

For injectable solutions, the attributes [assessed] were potency, impurities, pH, preservatives, and physical appearance (color, particulates).

During the 20 years reported in this study, 59 lots of lactated ringers were tested. 95% of these lots (56) had acceptable attributes at the time of this study. The expiration date of these lots had been extended a minimum of 23 months and maximum of 125 months. The lots that failed had improper levels of calcium and sodium (the report doesn't say how far off and in which direction the levels were incorrect).

Reference
Lyon, R. C., Taylor, J. S., Porter, D. A., Prasanna, H. R. and Hussain, A. S. (2006), Stability profiles of drug products extended beyond labeled expiration dates. J. Pharm. Sci., 95: 1549–1560. doi: 10.1002/jps.20636
Answer: I have given many cats many doses of subcutaneous fluids and as long as the bags are stored at an even, average room temperature and kept out of the light, the fluid will be fine.
However, if you detect even a slight clouding or milkiness in the bag, ditch it right away.
As to expired mediation in general. Most medicat6ions will remain effective far beyond the marked date. In fact, the military has done research and they keep large supplies of some types of expired medications because they know they will be safe and effective.
When Eli Lilly discontinued Humulin Lente insulin in 2005, we stocked up, kept it in the refrigerator, and used insulin which was over five years past the "expiration" date. I think we accumulated something like twenty vials of that insulin preparation before we could find no more on the market.
Most, if not all, medications don't turn into poison over time, if they change at all, they simply become less effective or totally ineffective.
We were confident with the expired insulin because we always do a blood glucose measurement on a diabetic cat before giving insulin and we do other spot checks at various times on various days. If the insulin was declining in effectiveness we would have known right away by the change in the numbers.
But, back to IV fluids - store them carefully and throw out any that are even a bit clouding and you and your cat should be just fine.
SimonT


Can police officers practice law like lawyers (defence attorney, prosecution) and judges?

Question: I was reading an old NYT Article, and it suggested that there is value in that police officers who are cross-trained as lawyers. Although rare, the article suggested that most who go through this route are retained as in-house counsel rather than practicing lawyers and judges. So I ask, can these police-lawyers ultimately practice law in the sense that they have the powers to investigate, arrest, try, and (if possible) judge?
Comment: In-house counsel *are* practicing lawyers.
Comment: In Australia minor crimes are prosecuted by "Police Prosecutors" who are general duties officers assigned to the role (usually at their request). The receive minimal training and are definitely not lawyers.
Comment: @cpast but are they lawyers first, or police officers? Would one see them more in court or patrol/investigation?
Comment: Historically, most FBI agents were either attorneys or accountants in addition to being law enforcement officers (with the attorney or accountant credential earned first). I don't know if that continues to be the practice. Part of this was to make sure that there was specialized knowledge for financial crimes and evidence.
Answer: Lawyers neither try nor judge cases; they advise and argue them. Criminal cases in jurisdictions based on British law (which seems to be what you are asking about) are tried by prosecution and defence both putting their best arguments to the court (either a judge or a jury) who then reaches a verdict.  There is no reason why the prosecuting lawyer should not be a police officer (assuming he is properly qualified), though in reality 'prosecuting advocate' is a full-time job, so the officer would need to transfer to the District Attorney's office or something similar.
Actually, such an officer would be wasted by a transfer to advocacy. Somebody who knows not only what evidence is inadmissible and the leading cases on permitted searches but also where the local crime blackspots are and which officers, likely to fall apart on creoss-examination, should not be put up as the only witness is valuable enough that the authorities (whoever they may be) will make considerable efforts to use these talents to best effect.
Comment: My understanding of your answer is that even if a person is cross trained as both an officer and lawyer, it would be a poor allocation of scarce resources  (skilled labor in either) and trial procedure (cross examination) for an officer to try criminals in court and vice-versa.
Comment: Under U.S. law, it would be common to say that all cases in court are tried by lawyers. "Arguing" would be one of the several tasks that lawyers perform while trying a case.
Comment: @TimLymington lawyers argue a case, but not try? Based on your comment, I presume the two are not equivalent. Might I ask what is the distinction? I've always thought the two as the same.
Comment: @Frank: In British and Commonwealth English, trying a case is done by the court (judge and possibly jury) this trial produces a verdict. Lawyers, though their functions of advocacy, finding witnesses, and so on are certainly important to the trial, would be usurping if they presumed to try a case, as English barristers' code of conduct specifically reminds them. Ohwilleke says that American usage differs, though I am not sure how that works: is a defendant *pro se* simultaneously trying and being tried?


Install Ubuntu on a separate hard drive?

Question: I am running Windows 7. I would like to dual-boot Ubuntu, but minimize risk of something going wrong. In the past I have encountered an issue with the bootloader getting corrupted and having to reformat the whole drive. The magic bootloader recovery tools did not work. Thus, I want to install Ubuntu on a separate drive.
My question is, is it possible to have multiple bootloaders? If install Ubuntu on a clean drive while not having any other drives connected, can I choose which OS to boot by using the motherboard's boot priority (i.e., place Windows disk higher to boot that)?
Answer: You should use WUBI  if you want to minimise the risk.


Is tool safety on-topic?

Question: On this question, the first comment was asking whether tool safety is on-topic. I would think that it would be, as woodworkers without fingers aren't very efficient or effective.
Comment: I believe that question asking for the (tips / guide) of using safely some tools to work with wood should be on-topic.
Comment: I was hoping the answers would be objective, which BrownRedHawk did a good job of providing a concrete answer of "it's unsafe because X".
Comment: As question **and** comment OP, I'd like to establish why I asked if it was on-topic: Obviously at least one person considered this jig "safe enough" to build and use it, introducing a bit of subjectivity to the nature of its safety.
Answer: I personally think they should be on topic for just the reason you have mentioned. I don't think there will be very many of these, though, as many of them will have large overlap, which could probably be closed as a duplicate once a large enough base of the answers come to fruition. Ultimately, though, it's all in how you utilize a tool whether it's safe or not. If you use the tool as it's meant to be used, you can be pretty sure it's safe (common sense, which it appears is lacking in some cases). It's when you get outside of those bounds where it becomes unsafe. Doesn't mean people aren't going to use it that way, but hopefully they'll ask the question first and not end up as a Darwin Award Winner.
Answer: I agree with previous answers, and would add that safety should be a top priority on this site, and allowing questions around that subject seems like a clear requirement for that to be the case.
If we are seen flagging safety questions as "off-topic" then when the general public sees those questions as flagged, it will decrease the respect they have for this community (at least, it would diminish my respect for this community).
I vote on topic as well.
Answer: I vote 'on topic'. Any discussion of woodworking involves discussing tool use and that includes tool safety. I'm all for preserving my ability to count to 10 :)
Answer: Tool safety in my opinion is very important, most of the tools we use can be very dangerous if not used properly.  I would think that adding in special care should be a good idea in many answers, even if it isn't asked for.

Is tool safety on-topic?


Trigonometry - heights and distances

Question: The angle of elevation of a cliff from a fixed point A is $\theta$. After going up a distance of k metres towards the top of the cliff at an angle of $\phi$ it is found that the angle of elevation is $\alpha$. Show that the height of the cliff in metres is $k(\cos\phi -\sin\phi\cot\alpha)/(\cot \theta- \cot \alpha)$.
Answer: Let $h$ be the height from $A$, and let $d$ be the  horizontal distance from $A$ to the base of the cliff. Then
$$\frac{h}{d}=\tan\theta.$$
When we walked a total distance $k$ at an angle $\phi$, we  gained $k\sin\phi$ in altitude, so the height from where we are is now $h-k\sin\phi$. Our horizontal distance from the base decreased by $k\cos\phi$, so is now $d-k\cos\phi$. It follows that
$$\frac{h-k\sin\phi}{d-k\cos \phi}=\tan\alpha.$$
We want to eliminate $d$. The first equation can be written as $d=h\cot\theta$, and the second as $d=(h-k\sin\phi)\cot\alpha +k\cos\phi$. Thus
$$h\cot\theta=h\cot \alpha-k\sin\phi\cot\alpha +k\cos\phi.$$
This is a linear equation in $h$. Solve. We get the desired expression.

Trigonometry - heights and distances


Prevent mouse from deactivating screensaver in OSX

Question: In OSX, when the screensaver is activated, I don't want to be able to deactivate it with a mouse, just with a keypress. But I don't want to enter a password. I just want to be able to deactivate the screensaver with any keypress but mouse movements should not have an effect. Can that be setup?
Answer: The only quick and easy way to do this would be to disconnect the mouse.
According to this its impossible for the computer to differentiate between USB mice and USB keyboard button clicks, when asleep.
However, according to AndrewLyle on http://forums.macrumors.com...
if you are somewhat crafty and technical, and If you don't mind using a hardware/analog approach... here is my quick suggestion..
imac>switch>usb hub>mouse/key
if you dont mind taking apart a $10 usb hub and soldering a rocker switch, then before you leave you can flip the switch, (which unplugs the usb hub) and let the computer fall asleep on its own...
waking it back up would just mean flipping the switch, you computer would recognize that your usb hub and thus your mouse and keyboard were plugged in and wake up
See this Question on the http://apple.stackexchange.com part of StackExchange.
Comment: I don't put the computer to sleep, I just activate the screensaver.
Comment: regardless, the computer can't tell the difference.


Is it safe to store raw meat alongside pre-cooked produce (ie. ready-made pies) in the fridge?

Question: Simply, as the title says I'd like to know if it is safe to store raw meat alongside pre-cooked produce (ie. ready-made pies) in the fridge. Given the ready-made pies still need to be cooked to a high temperature – would this be considered safe?
Answer: Ideally, you'd store all meat tightly wrapped and/or in air-tight containers. Further, you'd store the meat on the bottom shelf of the fridge, and the ready-to-eat food above it—just in case the meat leaks juices out, it won't be able to drip onto the ready-to-eat foods. That's perfectly safe, and indeed is what's required in a commercial fridge.
The idea is to avoid any chance of cross-contamination. You don't want juice from the meat dripping or splashing (when you move it, for example) onto anything else.
You also want your pies tightly wrapped, to avoid them drying out or picking up off flavors.
Now, if cross-contamination were to occur, you'd want to use that pie quickly, and when reheating it, you need to make sure to bring its internal temperature—measured with a food thermometer in a few spots—up to 165°F/74°C (just like if you were cooking chicken). I suspect your normal pie reheating doesn't do that.
Answer: You can keep it when you keep them separately in separate container. Try to arrange an airtight container otherwise the fridge will stink from the raw meat's smell.
Answer: As long as there is no contact (each food is in its own container), you are fine.
Answer: That's a no no.  Unless any item next to the meat is not cooked to 165-172 prior to eating you may end up with a belly ache.  That is why they invented Tupperware. Never store meats above produce and always make sure they are in a sealed container if you do not have that option.


How to access Raspberry Pi over wifi?

Question: I have to use Raspberry Pi with Arduino on a mobile robot and access Raspberry Pi on a PC through WiFi. Is it possible? Please explain how to do it?
Comment: @jsotola Actually, I want to know how to do it
Answer: To access your RPi over the WiFi, you can use any SSH client like PuTTY.
Once you have established a connection between your RPi and computer, then you can control  GPIOs through a TCP connection. Use Socket Library in Python for this. You have to set a static IP for your RPi though, and use it in your code. Hope it would help.
Answer: If you haven't yet connected your pi to wifi, follow this guide first.
If you are on Windows, then you will need to install an ssh client such as PuTTY.
If you are on MacOS or Linux, simply open a terminal and use the ssh command. (ssh pi@raspberrypi).
By default, raspberry pis flashed with raspbian have the hostname raspberrypi, user pi, and password raspberry.
Answer: You can operate your RPI via your computer's  Remote Desktop Connection app. You will need some access to your RPIs HDMI cable for a short time however, or access to it via SSH while setting up. And will obviously need to have network connection or WiFi connection.
Step 1 - Get IP address of RPI
Open Terminal and execute the following command:
hostname -I
(Note that this is with a capital I)
Step 2 – Install xRDP
Enter these commands into the terminal:
sudo apt-get install xrdp
(If it says the package does not exist, then enter this command): sudo apt-get update
Step 3 - connect via Remote Desktop

Start your operating systems Remote Desktop Client (if you are using Windows, open RDP Client)
Enter IP address of your RPI.
Click OK
You will be taken to the XRDP login screen, unless you have already entered it into your Remote Desktop client before connecting (if that is the case, skip step 5).
Enter the RPIs username and password and click "OK"
You can now access your RPI via Remote Desktop!

How to access Raspberry Pi over wifi?


Why is there a Miscellaneous chapter in the Dhammapada?

Question: Chapter 21 of the Dhammapada is titled Miscellaneous or Varied Verses or similar depending on the exact translation. Why do all the other chapters have descriptive headings and themes such as Flowers and Chapter 21 just has this generic title and generic theme?
Comment: thank you for you kind expression of faith however i can't answer this question definitively
Comment: Great question. I'm really interested in hearing the answer. I think @Dhammadhatu might know the answer. He has a vast scholarly knowledge.
Comment: @ruben2020 thanks for that. I didn't realise that the chapter headings were added so much later. I guess that makes sense as it was an oral tradition for a long time and headings are more of a written thing
Answer: I can only speculate. If we examine the preceding & proceeding chapters:

Maggavagga is about the Path and verses 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 285 and 289 all include the word "the path", while verses 283, 286, 287 & 288 are about when the path is not practised.

Nirayavagga is about Hell and every verse is related to the chapter title of hell.

As for the Pakinnakavagga: Miscellaneous, I would classify its verses as follows:

Verses 290 to 295 appear related to each other, which appear to be about higher happiness and freedom from cankers, unwholesomeness & suffering.

Verses 296 to 301 appear to be about another collection of related general practices.

Verses 302 appears to be about a separate topic of certain unique difficulties & sufferings.

Verses 303 to 305 appear to be related to the fruits of virtue.

In conclusion, at least unlike the preceding & proceeding chapters, it appears there are four different categories of teachings in the Pakinnakavagga; thus it is called Miscellaneous.
While I do not know the Dhammapada very well, similarly, I always wondered why verses 153 and 154 were included in the Jaravagga about Old Age.
As Ruben2020 said, often sutta titles are not directly related to the sutta subject matter. For example, the 2nd sermon (SN 22.59) is called Anatta-Lakkhana Sutta yet the word "lakkhana" is not found in the sutta or in any related sutta. While the term "Three-Characteristics" is inherently used in Buddhist discussion, this term actually never exists in the suttas. Based in AN 3.136, the "Three-Characteristics" should probably be called the "Three Natural Lawful Elements" (dhammaniyāmatā sā dhātu) or similar.
Comment: Thank you for this.
Comment: You're welcome. Regards
Comment: I up-voted this answer over the answer by @ruben2020 because of the details included. However, in my opinion, both say essentially the same thing: 'Noone knows'. The monks who organized the Dhammapada did it for reasons that are now lost in time.
Answer: The Dhammapada was organized by the monks within a few centuries after the Buddha's passing away. They also wrote the commentaries.
There is no mystical or supernatural or significant reason for the naming of the chapters, other than the reason that it was named so because the monks who compiled the Dhammapada decided to use this name.
They probably called it "Miscellaneous" because they put verses into it that did not fit into other themed chapters.
I do not have credible historical sources to back this claim.
Answer: My person thought maybe also give another smart opinion one could buy in, but then thought maybe just tell that it would be good to have a "Miscellaneous" tag for questions...
Maybe

In those who leave undone what should indeed be done but do what should not be done, who are conceited and unmindful, moral intoxicants increase....

...helps to gain some heartwood from the answer.
[Note that this isn't given for stacks, exchange, other world-binding entertainments but for release from this wheel]


Need to change default movie players in Kubuntu 12.04

Question: I've recently installed Kubuntu 12.04 on my computer, and the Dragon movie player doesn't work very well for me. So I installed the Totem movie player (which I've used in both Ubuntu and Lubuntu with no issues) but I need to get the computer to default to opening with the Totem player. I tried changing it through "Settings" and then "Device Actions", but apparently I need to know the proper command to put in the setting. The command listed under the Dragon player is: "dragon --play-dvd", so what do I need to enter to make it open with the Totem player? And, is that all that needs to be done? Thanks!
Answer: Right click any file that you want its type to open with Totem and select Properties
Next to the "Type: " row, you will see the settings icon that says Edit file type when you hover your mouse on it.
Click it and you will see list of applications in the bottom half, move Totem or add it if its not shown.
OK, close, you are done for all file types.
Answer: Select any of the video file with any extension you want to make default then right click and select properties->open with-> show other applications and then select totem player
Comment: I don't have that option. which filemanager are you using?
Answer: Open systemsettings. Click on File Associations. Find the file format you are interested in and move totem to the top.
Comment: I tried that, but it never even showed the Dragon player as an option, only the Totem player. But it still defaults to Dragon.
Answer: You can right click on a file, go to the last entry (Properties) and select in the new window the 'Open with' tab.
There you see the standard-application, the recommended app and other apps for opening this file.
In the list of other applications, you can select which application to use for opening the movie. (Totem)
Now the file should be opened by Totem.
I think it works try
All the best


Is it important to have a road bike shoes and pedals or it won't make a difference?

Question: I bought a Giant TCR Composite road bike yesterday and since it comes without a pedals i bought a MTB clipless pedals but i don't feel comfortable with this pedals, so should i buy a road bike specific pedals and shoes -as it is a clip pedals- or it is just a matter of time then i will be used to it ?
Comment: I would say that SPD "mountain" pedals are used on the majority of road bikes, with mainly the purists going for the full-size "road" pedals (like the Shimano SL).  The main advantage of the "mountain" SPDs is that the shoes are, to one degree or another, "walkable".
Comment: Do you mean you bought platform pedals or MTB clipless pedals?
Comment: @Slovakov MTB clipless pedals
Answer: First, note that if you're new to clip/clipless systems, it takes a while to get used to it.
A lot of non-racers prefer mountain bike clipless pedals (e.g. Shimano SPD) since you can clip in on both sides of the pedal and the shoes often allow the cleats to be recessed (so you can walk around). Mountain marketed shoes generally tend to be more comfortable as well.
An example SPD pedal is:

Note that some SPD pedals also double as platform pedals, so you can use regular shoes.
Road pedals (e.g. Look/ Shimano SPD-SL) have larger support for the shoe but only allow you to clip in on one side of the pedal. An example of SPD-SL is:

However, at the end of the day, the pedal-shoe combination is completely up to you. You could use road platforms, toe clips, mountain bike clipless, road clipless, etc. - do what makes you most happy.
See this excellent question as well for comparison of pedal-shoe systems.
Comment: Yes, spot on: *do what makes you most happy*. I've been a riding road bikes using SPD pedals for over 20 years. Most people don't even notice, unless it's because with SPD's you're clipped in and across the intersection before the rest of the bunch have got themselves started. So, I find them easier to get into, and I think they are easier to get out of also.
Comment: I would add that the day you find yourself 10 miles from a cell signal, two flat tubes, and no more patches or CO2 cartridges, you'll be damned glad you're wearing SPD shoes.
Comment: Ditto to @andy256's comment.
Comment: @Carey Isn't that the truth! Been there ... Maybe we should get T shirts printed :-)
Answer: A lot of causal riders appear to prefer SPD's, which is a great place to start, but I here is the argument for SPD-SL like systems. Which I personally prefer and even on dirty muddy roads.
Road bike specific pedals (e.g., SPD-SL) are designed for a single purpose, road cycling, and the pedals do this job well.  Road cycling has a lot of repetitive motions (you often sit in the same position for a long period of time) so fit can be key to reducing repetitive stress injuries. If you get into long rides, high mileage or fast and hard rides you will notice the difference over mountain bike pedals.  Because you change your position quite often in mountain biking the small nuance issues of fit in road cycling are often a non-issue in endurance mountain biking.
Pros - Road Pedals (SPD-SL and others)

Smooth float - Pedal float is the ability to allow the shoe to swivel (and shift laterally in some systems) slightly during the pedal stroke.  This can be important to reducing certain types of injury (and optimizing alignment) as your foot can shift slightly in the pedal stroke.  Mountain bike pedals use the shoe tread as the contact point, while road pedals use a specialized cleat as the contact point.  As such, road specific pedals can choose materials and control the contact patch better allowing a much smoother float (and often more float) than mountain bike systems.

Note - Some claim that float reduced power, but there is no real evidence for this idea. See the myth section in Phil Burt's Bike Fit.

Wider Contact Area - Because they do not require the same ability to shed mud and dirt, road pedals have a large interface surface with the cleat.

Reduced Hot spots - The wide contact area distributes pedal force over a larger proportion of the shoe, which in turn better supports the foot.  Assuming your shoe fits properly, this will result in reduced likelihood of hot spots.  Hot spots can occur over long periods of riding, where a pressure point exists under a small potion of your foot which causes discomfort.
Better force transfer - The wider contact area allows for a more efficient transfer of force as there will be less flexing

Lower Profile - Because the tread block is not required the road shoes can often be placed closer to the pedal axel.  This can allow less rocking (more efficient power transfer) and allow for more clearance (aka harder cornering)
Lower Weight/Lower Rotating mass  If you care about such things (many do) the road pedal/shoe combo is typically lighter.  This can provide minor performance gains.

Cons

Lousy to walk in

This can cause accidents - After using road shoes for nearly 20 years I finally had my first accident, which hand me sliding across the kitchen floor (while avoiding small children) and crashing into the stove, where as luck would have it my hand landed on a red hot stove element! I still went for a ride though...
No hike a bike - Suppose you use up all your tubes (@CareyGregory), your frame is cracked and can't be welded because you are out riding across some African plain and there are no good TIG welders around, you are running out of water and you still have 10 miles to go. Well now add your shoes to your list of problems because you are not walking in them.
They sound funny - Depending if you look hot or like a stuffed sausage when you stop in for your pre-ride caffeine binge, the ensuing clickety-clack caused by road shoes may cause you horrendous humiliation!
Comment: I forgot to add, most well sorted SPD-SL like pedals are weighted such that they present the correct side when clipping in.  Mountain (SPD like) pedals are smaller, more symmetrical and as such required double sided entry.  Finally, disengagement force is typically less with mountain (SPD like) pedals... although not always - Time ATAC come to mind (although I still love those pedals to death).


DeathStar maintenance

Question: I have a LEGO Deathstar and have already built stage one of four. However, I haven't been able to get to it lately and it has become rather dusty. How should I clean it? And I travel a lot, so is there any way I can carry it with me by flight without dismantling it?
Comment: @StephaneDelcroix : Hahaha thanks. Funny that Darth Vader is cleaning the Death Star ;)
Answer: Which Death Star?
Either way, I can't imagine trying to travel with either Death Star model that LEGO has produced.
Removing dust can be done with a mini-vacuum or some sort of blower, like a hair drier. Canned air is advised against as it has icky propellants that get on your bricks.
Comment: Ah Alright. By the way, why was this marked as duplicate? I understand that the method is similar... but I asked for a travel case too.
Comment: @Artemisia - It's better to ask two single questions especially when they are very distinct, rather than have one question with two very different aspects which might result in two people answering each part, and no real way to mark either one as "the answer". For some suggestions on transporting models, see [this question](http://bricks.stackexchange.com/q/129/56)

DeathStar maintenance


Analog Phase Locked Loop Design

Question: I am trying to design a phase locked loop in MATLAB's Simulink. For this, I am following this basic block diagram design:

My original message signal is ~12 seconds long, has a bandwidth of approximately 22.05kHz, and has been sampled at 44.1kHz. I have imported it into Simulink using the 'from workspace' block with a sample time of (1/44100). For testing purposes, I am only simulated .25 seconds of time.
I then run my message through a 'zero-order hold' block which has a sampling time of (1E-7) which is then used throughout the rest of the system.
From the output of the Zero-Order Hold, I input my signal into an FM modulator with a Kf = 77017.868 and a carrier frequency of 1MHz. The Kf has been chosen due to a constraint that my peak frequency deviation must be 75kHz, and the maximum amplitude of the 12 second message signal is .9738V.
To model the phase detector, I have used a product block and a LPF to cutoff the frequencies at twice my carrier frequency. I have implemented the LPF using MATLAB's 'butter' function to generate the coefficients for a butterworth function. The following code is here:

The loop filter is implemented with a transfer function of (s+a)/s, where '1/a' I have calculated must be less than 1E-7 (my sample rate). I do this because I need the phase error to decay to zero (or near zero) in a time-span that is less than the time difference between samples. Therefore in my head, any value where a > 1E7 should suffice. My work for how I calculated various components is here:
EDIT: (I have re=calculated these values below, but I will leave these old ones here for documentation)

Finally, the continuous-time VCO has a carrier frequency of 1MHz as well as a Kv = 77017.868. Below is a image showing how I have configured the simulation in Simulink: (where the amplifier normally has a gain of u calculated above)

I believe I must have some fundamental misunderstanding of how the phase locked loop behaves, as I know for a fact that if I choose my values correctly this system design will demodulate the signal correctly. Instead, I see behavior that I cannot even describe properly or make any sense of. For instance, below will be a graph of the original waveform before undergoing FM modulation next to a graph of the output of the phase locked loop. What am I simply not understanding?
If there is any information that I can provide I will be happy to do so.
.25 seconds of original waveform:

.25 seconds of output of pll:

EDIT:
I re-calculated the values for the loop filter transfer function, where a is the constant in the loop filter transfer function (s+a)/s, and I made sure that 1/(Zeta * Wn) < Ts. Where my Ts is 1e-7.

Okay, so I decided to simplify the process a bit so it would be easier to troubleshoot. I have since removed my audio waveform and replaced it with a 16Hz sinewave with an amplitude of 0.95 (I did not want to exceed the maximum value of my message). This yielded the following result, where the blue line is the output of the phase locked loop and the yellow wave is the original input.

Next, and I have no idea why this does anything, I changed the carrier frequency from 1MHz to 10Mhz (without changing any sampling rates). If anyone could explain why this is the new result having ONLY changed the carrier frequency of the FM modulator and VCO, I would appreciate it:

Next, I decided to play with the order of the LPF that follows the mixer. In the picture above, the order of the butterworth filter is 13. I actually simulated with all filter orders between 1 and 50, and I thought these were the most interesting results:
Butterworth LPF Filter Order 17:

Butterworth LPF Filter Order 19:

Butterworth LPF Filter Order 27:

Butterworth LPF Filter Order 35:

I certainly do not understand this behavior. The order of the filter seems to heavily affect the accuracy of the phase locked loop, which does not make sense to me. I had an understanding that the Phase Detector's LPF only cutoff the higher frequency components after the two signals are multiplied together. I thought that the following loop filter controlled stability, oscillations, etc..
What also seems strange is that there seems to be a "sweet" spot of the filter orders around 17. If the order becomes too high or too low, effectively no signal is produced at the demodulator output.
Comment: Filter controls group delay in the forward path. At high order, this will lead to instability and indeed chaotic behaviour. (Also, it becomes absurdly difficult to realise in real analog circuitry. Try limiting yourself to order 4 or 6. (Also bring the passband down to about 0.4* sampling frequency). Stabilising loops around even order 2 filters can be tricky.  So you'll apparently have to fix something else too.
Comment: Would the phase response of higher order filters be the reason it creates instability in the system? Also do you mean the passband FM modulator sampling rate? Would the system not be able to correctly sample the modulated waveform if the sampling rate is much lower than the modulated frequency?
Comment: In lines with what @BrianDrummond said, make the lowpass filter only a 1st, or maximum 2nd order, and try adding a constant, reference \$\omega\$ with a summer before the loop filter. Some time might be needed for the PLL to lock on, also.
Answer: You want MEMORY of the prior frequency information, in the Loop Filter.
Give the loop filter 10uSecond timeconstant, so you begin to learn what depends upon what.
Comment: Is the time constant you are referring to 1 / (Zeta * Wn) ?

Analog Phase Locked Loop Design


What is the difference between omnidirectional and non-directional?

Question: As I understand it, omnidirectional and non-directional both indicate that something:

...is not affected by direction in any way

Is the meaning of these two words equivalent.
Comment: *Unidirectional* is only one direction, so you may be thinking of *omnidirectional*.
Comment: Omnidirectional means "lots of directions."  e.g. An omnidirectional microphone is one that can pick up sound waves in lots of different directions.  Unidirectional means "one direction."
Comment: @Guffa: Yes! That's the word! I'll edit my question.
Answer: Omnidirectional and nondirectional are very similar, but they emphasize different things. If I say something is omnidirectional, I'm emphasizing the fact that all directions are equal. For example, I could be in front of, behind, to the right or left, on top of, or underneath an omnidirectional microphone and it could pick up sound just as equally from any of those directions. On the other hand, nondirectional carries a connotation that direction isn't that important—a sidewalk is nondirectional because I can walk either way without coming upon restriction, but there's no reason to emphasize the fact that I could walk any which way I wanted to.1
1 Which would, for the record, be a very bad idea, because of the narrow width of the sidewalk and the proximity of the actual road with motor vehicles bearing down upon you.


Who pronounced the Curses?

Question: In the blessings and curses in Ki Tavo, who pronounced the curses: the Levi'im, Yeshoshua, or both?
Comment: @SAH That they should do it is in 11:26-32. What they should say is in 27:11-26. When they actually say it is about a month later, in Yehoshua 8:33-35.
Comment: Didn't Moshe say the Tochacha?
Comment: Based on your tagging this with [tag:parshat-reeh] as well, I'm gonna go out on a limb and say you mean the curses on Har Eival, not the Tochacha? Likewise [here](https://judaism.stackexchange.com/q/94548/9682) and [here](https://judaism.stackexchange.com/q/94547/9682)?
Comment: @DonielF I thought this incident was also called the tochacha? (Or does the tochacha refer only to what was said after?)
Comment: @SAH The term Tochacha refers specifically to Vayikra 26:3-46 and Devarim 28:1-69. Hence DoubleAA's comment that only Moshe spoke the Tochacha, as he was the speaker in the latter of the two (it was Hashem in the former).
Comment: @DonielF Devarim 28:1 I think I see now.
Answer: As explained in Rashi, Rav Hirsch, and the Art Scroll Chumash, the words of the blessings and the curses were spoken by the Kohanim and Leviim in the middle.
The command on what to do and what to say was given in the Torah. When it was actually carried out, in Yehoshua 8:33](https://www.chabad.org/library/bible_cdo/aid/15792#showrashi=true&v=33) the navi emphasizes that they carried it out exactly as commanded.

33 And all Israel, and their elders and officers and their judges,
  stood on this side of the Ark and on that side, before the priests the
  Levites, the bearers of the Ark of the covenant of the Lord, the
  stranger as well as the native born, half of them over against Mount
  Gerizim and half of them over against Mount Ebal, as Moses the servant
  of the Lord had commanded, to bless the people of Israel first.

After this was done, Yehoshua read the Torah to the Bnai Yisrael so that they would hear everything that they had been commanded.

34 And afterward he read all the words of the law, the blessing and
  the curse, according to all that is written in the book of the Torah.
35 There was not a word of all that Moses commanded, which Joshua did
  not read before all the congregation of Israel, with the women, and
  the little ones, and the strangers that walked among them.

Part of what he read included the commandment about the blessing and the curse which had just been fulfilled. Since the actual words that had been said were in the Torah, they were included in the reading.
Comment: @SAH according to Yehoshua, they said the blessings and curses at Har Grizim and Har Eival which are inside Eretz Yisrael. Thus it was after they crossed the Yarden and Yehoshua arranged it as the leader. That is why it says that Yehoshua arranged for everything to be done as Moshe had commanded just before he died.
Comment: Could you explain when in the chronology they say the blessings and curses? Is it after Moshe's death?
Comment: Oh, I didn't realize this whole place was in Israel. Thanks.

Who pronounced the Curses?


Cleaning E3D hotend and tuning with Cura?

Question: I just received my E3D v6 hotend and I am installing it on the open source design of a Prusa i3. How do I clean my hotend after each print and after using different filaments?
Answer: Usually there is no need to clean the hotend, as filament sticks well to itself rather than to the inside of the hotend. If there are remains - the simplest way to clean it up is to extrude 5-10 cm of new filament, which will gather all remainings clean the hotend.
The above concerns changing filament in the same group of plastic. So if you print PLA you can switch colors/manufacturers and so on without issues. The same goes for ABS.
There is also usually no problem when switching from PLA to ABS.
The worst scenario is to switch from ABS to PLA. This is because the extruding temperature of these two materials is different. Unfortunately ABS can have such a high melting temperature that the PLA will burn. So having a dirty hotend with ABS remainings, there is no way to extrude PLA to clean the hotend because the PLA temperature will not result in melting ABS. It can eventually lead to total plug of HE.
So what can you do when you are in such a situation (ABS -> PLA)?
You can clean the hotend first with ABS. Extrude some, wait until it is cold, ease the springs and pull or tear out the filament from the hotend.
If you are stuck you can use special drills to clean the nozzle.
But to totally omit the issue you can have two hotends :) One for ABS and one for PLA ;) But I think you can manage cleaning if you apply what I've written above.
Comment: You are overstating the issue of switching from ABS to PLA quite a bit. I find it works fine to heat my hotend up slightly hotter than I would normally extrude PLA, and then push the new filament through. It's still hot enough to (partially) melt the ABS. There's no issue here. Also, you should use a spelling checker and perhaps not abbreviate "hotend".
Comment: I took care of the english as far as I could without changing the content in directions that might not reflect the authors intentions.
Comment: @TomvanderZanden you are right - issues with switching ABS>>PLA are not such common but I wanted to cover pesimistic scenario. So questioner would have bigger picture what can appear.
Comment: There's no problem with ABS->PLA, most ABS is printed at 200-250C (according to RepRap wiki, I use 240C) it's hotter then you would usually print with PLA but PLA does not burn at those temperatures, just yesterday I successfully printed an 8 hours job with PLA at 240C (on purpose, needed to test something), to switch from ABS to PLA just set your hotend to 230-240C and replace the filament normally, extrude until you see only PLA coming out of the nozzle then cool down to you preferred PLA printing temperture
Comment: @Nir it really depends on filament. I had one which were burning with smoke @ 240C. Nevertheless I've never had any problems cleaning extruder as I performed mentioned steps. And another 2 cents - when you do print then you can even exceed temperature as filament flows continuesly (vase). It gives curious effects ;) and sticks layers extraordinarily.
Answer: As Anton mentions, cleaning your nozzle is commonly done using a cold pull (or atomic pull). This process involves pulling out your filament from the nozzle while it is still semi-hot. (PLA, for instance will often be pulled at 80-90 celsius, which is the temperature at which it will slowly start to soften.)
The reason why this works is because the filament will stick better to itself when semi-hot, than to the nozzle, and pulling it out in this manner will most likely bring any residue along with it.
This question debates it further, while the video Anton posted demonstrates it well.
Answer: I've found a blow torch to work pretty well for clogged nozzles. Note: If your hotend use PTFE tubing internally DONT DO THIS or it may melt and ruin the nozzle.
Answer: Or you can use atomic nozle clianning!It woks fine for me :)
https://www.youtube.com/watch?v=04T8zdgyh3E
Comment: Okay, I'll do that next time :) Nice chance to develop your skill to explain!
Comment: Hi, Anton. Here on SE we try to avoid [link only answers](http://meta.3dprinting.stackexchange.com/questions/156/answer-based-on-links-case-how-to-enlarge-a-sketchup-model) as much as possible. Please consider making your answer readable without visiting the link. I made an example of this in a separate answer: feel free to use what I wrote, and I will delete my own answer.


What was the density of the universe when it was only the size of our solar system?

Question: What was the density of the universe when it was only the size of our solar system?  Did it approach neutron star density?  Is it physically correct to even ask such a question?
Comment: The universe may well be infinite in size, in which case it was always infinite in size even at the moment of the Big Bang. So there was no point when the universe was the size of the Solar System.
Comment: There was the old "one universe per solar system" unit, which is recursive. There should be a new definition in the renormalization of SI.
Comment: @JohnRennie Maybe he is thinking on the size of the observable universe?
Comment: Probably. ..but I am not sure what the difference is between the 'universe' and the 'observable universe' in such discussions.
Comment: The observable universe is everything we can see (by any means, Hubble, radio-telescopes, etc) - anything within 13.5 billion years time.  Due to expansion, the size is larger than that now, but we have a pretty good idea of how big and a fairly good idea how massive the observable universe is.  The entire universe - that's a much bigger question and there's at least a pretty good chance it's infinite.
Answer: Your question can't be answered because the qualifier when it was only the size of our solar system is meaningless. The size of the universe is a rather vague concept. The universe may well be infinite (it's unlikely we'll ever know for sure) in which case it was always infinite and it doesn't have a size. You could ask about the size of the observable universe i.e. the bit we can see, but even that is tricky. We can see about 13 billion light years, but the bits we see 13 billion light years away we're seeing as they were 13 billion years ago. The current distance of those bits is about 46 billion light years. So is the size (radius) of the observable universe 13 billion light years or 46 billion light years?
But I think we can address the spirit of your question if not the exact text. There is a well defined measure of size that works even for an infinite universe called the scale factor. If you take two points in the universe then the distance between those points changes with time according to the equation:
$$ d = a(t) d_0 $$
where $a(t)$ is called the scale factor and $d_0$ is a constant. It's conventional to define $a(t)$ to be $1$ at the current time, in which case $d_0$ is the current distance. The average density of the universe is then given by:
$$ \rho(t) = \frac{\rho_0}{a^3(t)} $$
where $\rho_0$ is the current average density. We can use this equation to work out at what time the density of the universe was equal to that of a neutron star.
The scale factor is calculated by solving Einstein's equation for a homogenous isotropic universe, and the result is the FLRW metric. As you would probably expect for anything related to general relativity this doesn't give a simple answer. As Pulsar explains here the scale factor is given by:
$$ \begin{align}
t(a) &= \int_0^a \frac{a'\,\text{d}a'}{a'^2H(a')}\\
&= \frac{1}{H_0}\int_0^a
\frac{a'\,\text{d}a'}{\sqrt{\Omega_{R,0} + \Omega_{M,0}\,a' + \Omega_{K,0}\,a'^2 + \Omega_{\Lambda,0}\,a'^4}},
\end{align} $$
You have to calculate $a(t)$ by numerically integrating this expression, but this isn't as hard as it looks and I did it in Excel (see link here) to get:

There are some interesting features to this. Up to about 6Gyrs after the Big Bang the expansion was slowing as you'd expect because the mutual gravity of all the matter is decelerating it. However more recently dark energy has been causing the expansion to accelerate, and you can just see the line beginning to curve upwards. This curvature will get more pronounced in the next few tens of billions of years.
Anyhow, back to your question. The current radius of the observable universe is about 46 billion light years, and the radius of Neptune's orbit is about $4.5 \times 10^{12}$ m, so the ratio of the two is about $9.7 \times 10^{13}$. The current density (including dark matter and dark energy) is about 5 hydrogen atoms per cubic metre, so the density when the observable universe was the size of Neptune's orbit was about $5 \times 10^{42}$ atoms of hydrogen per cubic metre. This is about $7.5 \times 10^{15}$ kg/m$^3$. The density of a neutron star is around $5 \times 10^{17}$ kg/m$^3$ so actually the density of the universe at this time wasn't that far off neutron star densities.
We can use our calculation of $a(t)$ to work out what time the universe had this density, and it comes out to be about $10^{-25}$ seconds. However I'd be cautious about this number because the calculated time lies within the range that the electroweak symmetry breaking was happening, and this may include new factors that influence the scale factor.
Comment: I added a link to your excel spreadsheet: on first reading my reaction was "lemme get this straight: you used WHAT?". On looking at the method though, and thinking about the kind of integrand we have, one realizes trapezoid integration is quite reasonable as long as one's stepsize is small enough compared with $\Omega_{R,\,0}$
Comment: @WetSavannaAnimalakaRodVance: I can't remember putting the spreadsheet on Google Docs. Where did you find the link? Did I put it somewhere in my question that I now can't find or did you get from somewhere else? Oddly, I now can't find it in my Google drive account.
Comment: You linked to it in another answer which was referred, along with this one, from a third answer of yours. I can't find it now!
Comment: Here it is: http://physics.stackexchange.com/a/136057/26076
Answer: I think, John Rennie's answer is far far better than anything I can do, but I'm going to give you the "universe for dummies" answer anyway.
Mass of the observable Universe:   10^53 KG
Density of the observable Universe:   9.9×10−30 g (equivalent to 6 protons per cubic meter of space - not very dense.)
Source (Wiki):  http://en.wikipedia.org/wiki/Observable_universe
Density of a Neutron Star:  3.7×1017 to 5.9×1017 kg/m3
Source (Wiki):  http://en.wikipedia.org/wiki/Neutron_star
So, 10^53 KG / 5.9x10^17 kg/m3 = 1.7 x 10^35 cubic meters, or about 550 billion meters on a side (square) or about 680 billion meters diameter.   That's 340 million KM radius - a fair bit past the orbit of Mars, less than half the orbit of Jupiter.
That's less than I thought it would have been, but there's your answer, for the observable universe anyway.  The answer is no - not when the observable universe was the size of the solar system.
Was the very young/early universe ever denser than a Neutron Star, you know, when the observable universe was even smaller? - probobly, since they say the (observable) universe used to be the size of a baseball , but that occurred early in the expansion phase and expansion moved faster than gravity (which can only pull things at the speed of light) - so the that much mass at that density wasn't a problem like it would be in conventional physics (it would form a black hole).
A lot of this probobly happened before the Higgs field formed, so there might have been no mass when the universe was that "dense" - or hot is perhaps a better term.
(Corrections on my universe for dummies version are welcome)
If you haven't read it, I've enjoyed the Wiki writeup on the chronology of the Universe, which doesn't talk much about size, but otherwise it's related:  http://en.wikipedia.org/wiki/Chronology_of_the_universe
Answer: One of the most troublesome of the anomalies with which the Big Bang is marred, is that it is not possible to physically describe the Big Bang process in an infinite universe. The reason for this impossibility is that it is equally impossible to speak of the concept of concurrency everywhere in such a universe. Yes, in such a universe even the concept of "everywhere" has no other meaning than a metaphysical one. And even if the universe is assumed to be finite, but very large, we have to deal with the problem that all around us, just beyond the event horizon, there would seem to be a continuous Big Bang still in full swing, which certainly would have had such an impact on the event horizon that it would be displaced and moved billions of light years further out in space. The COBE and WMAP satellites (and more recently Planck) found that the back-ground radiation in the universe follows a black body spectrum with a temperature of 2.73 K. With a Big Bang in full career next door, such a low back-ground radiation temperature would certainly be impossible.
Bo Widarsson Soderquist
Comment: The background radiation has a "temperature" of 2.73 K because of the expansion. As the space expands, so does the wavelength of the photons travelling in it - they are "red-shifted". When the "primordial photons" were still young, they were incredibly "hot" - they just lost most of that already.


toilet troubles

Question: I have a brass tube for water coming into a toilet in my very old farmhouse.  The shut off valve failed and I had to cut the tube and am now trying to fix it... to no avail.  We are three days without water in the house and the kids and I are going stir crazy without showers.  I can't seem to find a 5/8 OD 1/2 ID fitting, shark bites don't work and regular compression fittings don't either, as they are all made for copper pipe these days.  Can someone help me find an unthreaded, weldable cap for this stupid thing? I have three or four months til the new house is done, I just have to make it til then... Thanks!
Answer: This fitting here:
https://www.amazon.com/Generic-Brass-Compression-Connector-Fitting/dp/B00CHHZTGY
It comes in a size for 5/8" O.D. with 1/2" NPT threads so you can put a standard 1/2" pipe cap on it. Make sure you clean the brass pipe first so their is no leftover paint or dirt. Use teflon tape to seal the threads on the NPT side.
You should be able to find this fitting at a big box store but if not, have Amazon overnight you one.
Good luck!
Comment: I like @Michael Karas's idea also. I guess I was thinking you were just trying to cap off this pipe but if not, you could adapt the 1/2" NPT side to feed the toilet.
Comment: It was recommended to me to just cap the pipe and stop using that toilet unless I wanted to bring in water jugs to flush it.  I definitely need a non-threaded cap for this, but thank you for the advice.  I'll search amazon more carefully.
Answer: Since this water line feeds into a toilet there is less concern about the type of repair used as a temporary fix for this situation. You should consider getting a suitably sized rubber pressure hose that can slide over the brass tubing and secure it in place using one or two gear type hose clamps.
On the other end you can adapt the hose to replacement valve as needed even if such valve is left somewhat free handing for the few months it is needed.
Comment: I may have to try this. I have amazingly strong water pressure, though...  I did call in a friend who used to do contract plumbing and now does commercial hvac... we'll see what he thinks.  Thank you for the advice.
Answer: If you are sure that the 5/8OD is the exact size of the tube you are working with, then that is the size of standard copper tubing used today. They do sell compression fittings that size. If this tubing is not that exact size you may have tubing 1/2" OD or 3/4 "OD. Copper water tubing comes in  sizes 1/2", 3/4" and 1" ID, while refrigeration tubing comes in sizes 1/2", 5/8", 3/4", 7/8",OD.
Comment: I have tried every fitting in the plumbing section, maybe I will try another section.  I'm just positive this tube coming up out of the floor is brass - it's very thick-walled stuff, and does not bend or crimp. thanks for the advice.
Comment: Is the pipe threaded into the fitting or valve beneath it or is it soldered? Can you post a picture of it and what it connects to. There has to be a fitting that fits it.
Comment: https://www.facebook.com/photo.php?fbid=10211563593799010&set=pcb.10211563594079017&type=3
Comment: Still waiting for photo of pipe,etc.
Comment: sorry, i couldn't upload photos, wasn't in the mood to figure that out in addition to everything else.  Finally took up part of the floor in desperation, that solved the problem.  Took out the brass tube and replaced it with copper, everythings good now.  Thanks for all the help

toilet troubles


Was drinking coffee with milk illegal under the Ottoman Empire?

Question: Did the Ottoman Empire ever ban the consumption of coffee with milk? I know Sultan Murad IV banned drinking coffee by itself, but was there any laws on drinking coffee with milk? If so, what was the punishment for it?
Comment: @twosheds Well, im thinking about the Ottomans, and i read somwhere about that law a few years ago but i cant remember none of the specifics. I think that it was ilegal because it was causing lepra allegedely.. And tnx for your reply!
Answer: You may be mixing Murad IV's short-lived ban on coffee with a general distaste for coffee and milk in many late medieval/early modern cultures. The origins of this distaste for coffee and milk may have stemmed from Islamic alchemy. Taking from Stewart Lee Allen's The Devil's Cup:

The second part of [an ancient Ethiopian] ceremony, where the roasted beans are added to milk and imbibed, indicates it predates
  Islam (A.D. 600) because Islamic alchemists believed that mixing
  coffee and milk caused leprosy (a belief that lies at the root of
  the disdain many Europeans have for coffee with milk).

Adding milk to coffee seems to have become popular among Europeans in the 17th century:

According to Diglas, Vienna is also where adding milk or cream in
  coffee first became common. This, however, is conjecture. All we know
  is that it was a European innovation, because the Turks (like the
  Hindus) believed that combining milk with coffee caused leprosy. We
  also know that early London coffee society did not generally use milk.
  This leaves the Italians or the Viennese as the most likely
  innovators, since both were among the earliest coffee drinkers in
  continental Europe. Diglas pointed out that the two countries have
  milk-based brews, both completely different but bearing similar names—
  cappuccino from Italy, and Vienna's kapuziner.

Allen notes that coffee was banned in Mecca in 1511 and 1525, Cairo in 1539, and of course in the Ottoman Empire in 1633 by Murad IV. However, the motivation for these bans is a combination of social control (as Yannis Rizos pointed out) and Islamic restrictions on intoxicating beverages. Allen discusses the 1511 and 1633 bans in some detail, and milk does not come up in anyone's reasoning. It therefore seems unlikely that the Ottomans ever specifically banned drinking coffee with milk.

Note: The internet is filled with references to Islamic alchemists believing that milk and coffee cause leprosy. Some pages cite Allen, some cite no one. Unfortunately, Allen doesn't cite a source for this claim either, and in fact only mentions it in the two asides quoted above. I'd really like to see some Islamic sources supporting this claim.
Comment: You are the king, thats it, i mixed those things up most definitely, i tought it was baned by law, but it was a beleif! Thank you very much sir!
Comment: @user9968: Glad I could help!
Comment: @twosheds Do you have a source for "the motivation for these bans [on coffee] is [...] Islamic restrictions on intoxicating beverages"? I've seen some claims that coffee could be *haram*, but never because it was considered intoxicating (causing of *sukr*, intoxication).
Answer: Sultan Murad IV banned coffeehouses in order to prevent possible plots against him as people gather in coffeehouses and criticize the Sultan and his practices. Purely political reason.
Comment: This answer would be improved with some source references.


Why this "WebDriver driver = new ChromeDriver();" Not this "ChromeDriver driver= new ChromeDriver();"

Question: Why we always do:
WebDriver driver = new ChromeDriver();

Not this:
ChromeDriver driver= new ChromeDriver();

Any special reason, except object size ?
Comment: It is about OOP/Interface. Take a look at this https://docs.oracle.com/javase/tutorial/java/concepts/interface.html
Answer: We generally do it this way because usually we want to be able to run our tests on multiple browsers.  If we declare the driver as a specific driver type, we are then anchored to only that driver.  This is not a problem if you only ever need to test on say Chrome for example.  But what if you later want your tests to also be able to work with IE, Opera, Firefox, etc.?
These are extended classes of the WebDriver interface.
If your main tests and other classes define the commonly shared driver as simply WebDriver instead of specifically being tied to ChromeDriver, then the same tests can be run without change to the test code itself simply by initializing the shared driver object with a different driver extended class.
Answer: Absolutely right, Good explanation provided by @Bill Hileman, I was already upvoted it.
In addition to clear this doubt you need to understand What is WebDriver and ChromeDriver/Firefoxdriver.
ChromeDriver driver= new ChromeDriver();

With the use of above line, The script works perfectly on chrome browser but things are getting complicated in future if I want run my same script on Firefox or IE or some different browser.

How can we modify the same script to work for multiple browsers (Selenium Grid) instead of having a script for each browsers like ChromeDriver, FirefoxDriver, IEDriver?
Why can WebDriver be used instead of FirefoxDriver and ChromeDriver?

Because, in comparison with FirefoxDriver() and ChromeDriver() which are classes so objects can be created for them, WebDriver is an interface.
An interface is just a template that is implemented by a class.
It specifies what fields and methods the class should have but without providing more details.
The classes that implement the interface will provide the methods implementations.

So WebDriver is an interface and FirefoxDriver and ChromeDriver classes that implement the WebDriver interface.

Keep in mind, Just method declarations and no method implementations.
What about FirefoxDriver()?
FirefoxDriver()/ChromeDriver() is not really implementing the WebDriver interface.
It is inheriting instead from the RemoteDriver class which implements the WebDriver interface.
Below is some content of the RemoteDriver class:
public class RemoteWebDriver implements WebDriver, JavascriptExecutor,FindsById, FindsByClassName, FindsByLinkText, FindsByName, FindsByCssSelector, FindsByTagName, FindsByXPath,
HasInputDevices, HasCapabilities, TakesScreenshot {

private static final Logger logger = Logger.getLogger(RemoteWebDriver.class.getName());
private Level level = Level.FINE;

private ErrorHandler errorHandler = new ErrorHandler();
private CommandExecutor executor;
private Capabilities capabilities;
private SessionId sessionId;
private FileDetector fileDetector = new UselessFileDetector();
private ExecuteMethod executeMethod;

public void get(String url) {
execute(DriverCommand.GET, ImmutableMap.of("url", url));
}

public String getTitle() {
Response response = execute(DriverCommand.GET_TITLE);
Object value = response.getValue();
return value == null ? "" : value.toString();
}

public String getCurrentUrl() {
Response response = execute(DriverCommand.GET_CURRENT_URL);
if (response == null || response.getValue() == null) {
throw new WebDriverException("Remote browser did not respond to getCurrentUrl");
} else {
return response.getValue().toString();
}
}

Lots of method implementations are available in RemoteDriver.
This is why, we could not create the WebDriver object, because WebDriver is an interface and not a class.
It is possible to create an object for an interface and instantiate it using any of the classes that implements the interface.
like this: WebDriver driver = new FirefoxDriver();  OR
WebDriver driver = new ChromeDriver();

By using above code, your scripts are now flexible and can use any WebDriver object which is required to invoke particular browser.

Here reference variable of type WebDriver allows us to assign the driver object to different browser specific drivers. Thus allowing multi-browser testing by assigning the driver object to any of the desired browser.
Answer: This is what is called Polymorphism.  Either you are using your first or second code line the object size will remain the same because ChromeDriver object is being placed in memory in both the cases.
The pattern you're talking about is worth using if you are going to pass that driver to some functionality that can work with the only WebDriver implementations (and knows nothing about more specific implementations like ChromeDriver) or if your code supports several browsers and does some tricky initialisation of the particular browser type (and hence using some particular WebDriver implementation).
You should also remember that in the case of WebDriver driver = new ChromeDriver(); you would not be able to invoke the methods of ChomeDriver unless you use the explicit type casting because there are no Chrome-specific methods described in WebDriver. Due to the same reason you would not be able to pass your driver to any method that expects any specific browser implementation without a direct type casting. Below is the example of available methods for a simple WebDriver and for ChromeDriver. It can be seen that ChromeDriver has a lot more available methods than WebDriver defines.

Nevertheless since ChromeDriver implements WebDriver interface it can be used in Selenium framework thanks to polymorphism conception.
Answer: package test.a1;

import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;

public class testDriver {

public static void main(String[] args)
{
    // TODO Auto-generated method stub
    String browser="FireFox";
    if(browser=="Chrome")
    {
        System.setProperty("webdriver.chrome.driver",
        "C:\\Users\\LL\\chromedriver_win32\\chromedriver.exe");

        ChromeDriver driver = new ChromeDriver();
        driver.get("https://www.gmail.com");
    }
    else if(browser=="IE")
    {

        System.setProperty("webdriver.ie.driver","Drivers\\IEDriverServer.exe");

        InternetExplorerDriver driver = new InternetExplorerDriver();
        driver.get("https://www.gmail.com");
    }
    else if(browser=="FireFox")
    {

        FirefoxDriver driver = new FirefoxDriver();
        driver.get("https://www.gmail.com");
    }
}

}
We can do this ..so kindly let know why ..we are doing this Webdriver driver=new FirefoxDriver();
Comment: The reason for using an interface here is that you end up with much tighter, more maintainable code which is less prone to issues. You can see the replication in this code - you have multiple calls to driver.get(). If you were running with multiple browsers (e.g. via selenium grid) and you implement tests using the WebDriver interface, your testDriver class will look a LOT simpler, and be easier to maintain.
Answer: We use
Webdriver driver = new Chromedriver ();
For invoking chrome browser
So for Chrome you will use Webdriver driver = new Chromedriver();
For Firefox
Webdriver driver = new Firefoxdriver()
You can use respective browser name
But you will only able to work with single browser only whereas Webdriver is an interface which will provide you the liberty to deal with multiple browser specific classes
Like Chromedriver driver = new Chromedriver ();
But once you create the driver reference of Chromedriver you cannot use same  driver reference name for Firefox you need to write
Firefoxdriver driver1= new Firefoxdriver();
and then again you need to write the separate piece of code for driver1
So to avoid that we need to use Webdriver interface for cross browser compatibility


Ubuntu xrandr rotate issue

Question: I've just bought a second monitor for my PC which happens to be a pivot monitor. I've already read lots of forums related to my problem but haven't come across a solution - I have the same symptoms as dozens of posts but no matter whatever I try it just doesn't work.
I've already changed the xorg.conf file and added in the device section just under Driver "nvidia" the following for my second monitor:
Option "RandRRotation" "on"

When I save and reboot I try to rotate my screen with the nvidia X server settings by choosing the second monitor and clicking either "left" or "right" for the rotation. It immediately exits the nvidia settings window and does nothing.
I tried within the terminal by typing:
xrandr -o right

I get the following error:
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 154 (RANDR)
Minor opcode of failed request: 2 (RRSetScreenConfig)
Serial number of failed request: 14
Current serial number in output stream: 14

I actually manage to rotate it with Option "Rotate" "CCW" instead of "RandRRotation". The problem with this solution is that you get the second monitor in the right position, but any window you open on that screen is practically unchangeable. You can't change the size nor move it, making it useless for reading PDFs, which is the main reason why I bought this second screen to help me write my thesis.
Any help is really appreciated.
sudo lshw -c video
hiram@hiram-linux:~$ sudo lshw -c video
*-display
description: VGA compatible controller
product: nVidia Corporation
vendor: nVidia Corporation
physical id: 0
bus info: pci@0000:01:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
configuration: driver=nvidia latency=0
resources: irq:16 memory:f8000000-f9ffffff memory:d8000000-dfffffff memory:d4000000-d7ffffff ioport:dc00(size=12 memory:fbd80000-fbdfffff

Answer: Same problem on Linux Mint 11 Katya / Ubuntu 11.04.
xrandr -o right doesn't work anymore, but unlike previous Ubuntu /Mint versions, the "Monitors" (or "Displays" dialog of Ubuntu/Mint allows the rotation.
You still have to add Option "RandRRotation" "on" to xorg.conf, though.

Ubuntu xrandr rotate issue


When viewing an svn repository through Apache in a web browser, is there a way to specify an old revision in the URL?

Question: I think the question says it all. I am using a server that exposes an svn repository through HTML, and am wondering if I can specify a previous revision of files when linking to it. I believe the server uses Apache and mod_dav, but am not sure as I don't administer it.
Answer: Here's an old thread on the SVN mailing list asking a similar question. Tacking on the <code>!svn/bc/###/</code> bit seems to work on one repo I have access to, but it seems it's implementation-specific.


What information do I need to size a sawn or hewn beam?

Question: I have a load bearing wall in my house that a previous occupant decided to cut a hole in to make things feel more open. They did not add a header, much to my chagrin. I'm planning to put an exposed beam in to bear the load. What information will I need to size the beam? I've found many beam sizing calculators, but none of them seem to be able to work with hewn or sawn timbers; they all require the use of dimensional or engineered lumber.
Comment: One of the challenges of real timber is that it's not uniform, and so one particular beam may have weak spots, whereas an engineered beam is designed to be uniform. I am not sure of the cost comparison, but you can get faux coverings ([example](http://www.azfauxbeams.com/products/faux-beams/detail/25-hand-hewn/flypage/34-hh16-44-hand-hewn-16-lengths?sef=hcfp)) that will allow you to install an engineered beam and then clad it so it looks like it's hand hewn or whatever.
Comment: Thanks for your input. I should mention that I have a strong dislike for anything artificial. I can certainly see the utility in it, but it's not for me. If I end up having to go with engineered lumber, I'll drywall over it rather than going for the exposed beam look.
Answer: It depends on what kind of wood you're using. Different woods have different strength characteristics. You may want to swing by the local library and grab a copy of a "Timberframing: Design, Construction, Finishing" by Ted Benson, which has tables of wood characteristics.
Note: If you live in a town where a permit is required to do the work you're planning, you're going to have to get sign-off by a structural engineer - in which case, you might as well ask the engineer what dimensions you need for the wood you're planning to use.
Comment: Found it at my local library. Thanks! Also, I'm speaking with the town about permits, etc. I will get an engineer involved if need be.
Answer: In order for calculations to mean anything, you need to know what the actual dimensions of a beam are. A beam that has a single spot where it is undersized will be considerably weaker than a uniform beam. So at best, you should assume the beam is no stronger than the minimum dimensions of the beam. The problem is, a hewed beam is non-uniform. So how rough is it? Exactly how non-uniform is it?
Worse, mechanics studies will tell you that a corners and sharp edges are stress concentrators. A strong beam will have continuous parallel fibers along its length. In fact, this is a one of the reasons why a glue-lam beam is strong. So what happens in a beam that is hewn? Broken fibers along the edge in tension will be points of possible future failure.
All of this means you want to use a hewn beam that is a bit oversized for the application. How much oversized is something that only a structural engineer will know. Therefore, take the advice from liantics, and have someone size the beam for you.
Answer: The rule of thumb framing carpenters use for headers is "one inch of (doubled or tripled 2 inch) header height for every foot of span". So an 8 foot opening would call for an 8 inch tall header. Also, the ends of the header must rest on posts (typically doubled 2x4's) which transfer the ceiling load to the foundation. The easiest way to build install the header is to:
1) build a temporary support wall a couple feet back from the header location. A 2x4 on the floor and ceiling with doubled vertical 2x4's every two feet should do. This structure should be toe-nailed together.
2) Buy an engineered beam (gluelam or equivalent) or construct a built up beam from dimensional lumber ( 8 foot long 2x8 in the example). Fit the first 2x into the opening (resting on temporary support blocks, and then sandwich a second 2x8 and glue and screw it to the first. Make sure the inevitable bow of the wood faces up. Add a third plank or scale up to 2 or three 2x10's if you want to overbuild the header. A 10 inch plank on edge is stiffer than an 8 inch plank on edge. More strength is always good.
3) Jack your new beam up into place. A hydraulic jack with doubled 2x4 post works well, and fit doubled studs under the ends. This step will also allow you to correct any sag which might have occurred.
4) Now remove the temporary wall and trim out your new header.
Be careful! Remember that gravity sucks and these chunks of wood are heavy and can cause injury when they fall. It is always best to get approval from you local structural engineer/permitting agency.
Good luck.
alesponge


How to have server turn on only when being accessed?

Question: If I use my mac as a server, is there a way to have it wake up only when someone is trying to access it?  I don't want to have it on all the time just in case someone wants to look at the site (it won't be used very often).  I also have a PC I might use as a server.  Any way to do this with either of these machines, or any other server software?  And then also go back to sleep if it's not being accessed for a certain amount of time?  Thanks.
Answer: If you have your Mac connected to an Airport base station, you can enable "wake for network access" in the Energy Saver preference pane, and any network activity detected that is bound for your Mac will cause the Airport to send a wake-on-LAN (WOL) packet automatically.  If your Mac is asleep, it will wake and provide the requested service, which should include the built-in Apache web server ("Web Sharing" in the Sharing preference pane.)
Support for this depends on your Mac hardware model.  Some models can send the packet over wireless, others (like my Mac mini that does this) requires a Ethernet connection.
More info: http://support.apple.com/kb/HT3774
Answer: This (OSX v10.6.4) screen has a "Wake for network access option. I've never tested it myself, but it's probably a good place to start.
Comment: Hmm...I'm on 10.6.4 and it just says "wake for ethernet network access".  It's a macbook btw
Comment: That should probably work still. The above screenshot was taken on a Macbook Pro. I don't know this for sure, but perhaps the MBP supports this on both the wired and wireless network cards, and the Macbook only supports this on the wired port.
Answer: You ask two questions:
Question:  How can I wake up a Computer by accessing it via the Network?
Answer: Your NIC needs to support Wake On LAN http://en.wikipedia.org/wiki/Wake-on-LAN. On Generic PCs this is configured in the BIOS. For Mac see answer of ErikA.
Question: How can I send an unused computer to sleep?
Answer: Configure the Energy Settings of your OS appropriately to send the computer to sleep.
Answer: A potential problem with this approach is that the client's system may timeout and give up before your Mac has had a chance to get ready to receive and respond to the packets.  If they know about this and know how to work around it that might be ok.  You've also got to figure in the security issues of using your personal system as a server. I hope you've thought of that already.
Older systems can be pretty energy efficient.  You might want to measure your old PC and see.  I've got a web/file server that's an AMD/64 X2 with 3 Gig RAM and 400 GB HD and it idles at around 45 watts.  In this state the monitor is off but everything else on the server is still active and ready to go instantly. Where I live that costs about $2.00 per month in electricity.


Shaving on Rosh Chodesh when it is Erev Shabbos

Question: Is one who has the minhag of Reb Yehuda Hachassid to not shave or take a haircut on rosh chodesh (as outlined in his will) allowed to shave and or take haircuts when Rosh Chodesh comes out on Erev Shabbos?
Comment: Very similar: http://judaism.stackexchange.com/q/35221
Answer: The Mishna Berurah (OC 260 end of sk 7 quoting the Magen Avraham 260 sk 0) says that those who follow the Will of Rabbi Yehuda HaChasid do not trim their fingernails of take haircuts on Rosh Chodesh even if it is on Friday.
Comment: Is anyone aware of  other opinions?
Comment: Double AA, he doesn't say everyone who follows _RY hachasid_ doesn't shave on Friday _rosh chodesh_. He only says some, following _RY hachasid_, don't shave on Friday _rosh chodesh_. That doesn't mean there aren't those who follow _RY hachasid_ and shave Friday _rosh chodesh_.
Comment: @msh210 Logically correct, but I think you may be reading too closely. Certainly I would now say the burden of proof is on the other side.
Comment: Why is it a sakana


Could a moon orbit two planets at once?

Question: Let's say you had a binary planet system of two earth-sized worlds with about the same mass. Could a stable moon orbit around the barycenter of both planets? If so, is there a limit to the mass of such a moon? Would it have to orbit in a Lagrangian point?
Answer: The Pluto-Charon system is similar to this.

It's unlikely that you'd have two planets of nearly the same mass because some variation is far more common, but a moon orbiting a binary planet system is certainly possible.   It's easier if it's not that close to the sun, for the same reason that it's difficult for Mercury and Venus to have moons.   A larger hill-sphere and less solar gravitation would make your system more stable in the long term.
And the Moon couldn't be in a Lagrange point in your system because, for starters, L1, 2 and 3 are never stable and the potentially stable Lagrange points, L4 and L5 require a large central planet and a significantly less massive object, (less than 1/26th the mass) orbiting the central planet.   The L4 and L5 points are to the orbiting object.  That doesn't work in a binary system of 2 objects of similar mass.
Any working Lagrange point scenario you'd have two moons and one planet, not binary planets and one moon.    You could, in theory have two moons at Lagrange points to each other orbiting a binary planet system but that would be adding even more improbabilities, but theoretically possible and stable for some time.
Comment: Small nitpick: Is there maybe fig. 1, but with the position of the CMS of the Pluto-Charon system included?
Comment: @AtmosphericPrisonEscape at risk of showing my ignorance, what's CMS?
Comment: The Center of mass system, or barycenter. I guess there's one 's' too much when you say 'CMS system', but somehow people do that.
Comment: @AtmosphericPrisonEscape That was my guess, I just hadn't heard it called CMS.   This site seems to address it with a gif:  http://mathscinotes.com/2015/06/barycenter-of-pluto-and-charon/  Pluto's distance to barycenter + Charon's distance to barycenter = pluto's distance to Charon (by center of mass, not surface).    The barycenter orbital diameter ratio is also the same as their mass ratio, about 8.5 to 1.   So it's a bit less than 1 Pluto radius away from Pluto's surface.
Answer: Yes, but.
Circumbinary configurations can be stable over long time periods, but in general they are a less stable configuration than "two moons orbiting one planet"
To increase the likelihood that the configuration will be stable, the two planets should be in a tight orbit (which can be unstable itself) and the moon should be distant and small. To get the moon to be distant enough the whole system should be distant from the sun.

Could a moon orbit two planets at once?