VirtualBox network configuration There is a host PC that runs VirtualBox. There are 3 Virtual Machines installed. An Ubuntu Server, an Ubuntu Desktop and a Windows 7. I have te be able to access the Ubuntu Server from a totally different PC. Not the host, not any of the guests, another one. So it has to get a fix IP. This Ubuntu Server has to function as a server in the virtual network. It has to be a DHCP and DNS server for the two other VMs. The two other VMs also have to access the internet, but across the Ubuntu Server. So that's the problem. I just have no idea what network cards and configuration file settings are needed to achieve this.
What are the main differences between VirtualBox networking types? I'm trying to use VirtualBox to host a couple of VMs.  Each VM should be able to connect to the Internet (this is needed primarily to install software) My Host browser should be able to connect to the Guest VMs.  Also I need to be able to ssh to the Guest VMs.     This is why I want each VM to have a static IP address.     This will also allow the VMs to connect to each other, say for database connectivity.  I have done this with VMware Fusion.  However, VMware has lately bitten me too often and destroyed so much work that I want to try VirtualBox.  But I'm not a network guru and don't know which type of networking I want.  So what I'm asking is simple:  What are the main differences between networking types. This could help me find out which type of networking I should use in my case.  And of course if anyone has a link to any documentation of how to do what I want, that would be greatly appreciated.  Thanks, ge
Indentation shortcuts in Visual Studio Theorem style with name as argument Is there some way to get a theorem type which will make a theorem with the name passed as a parameter? In other words, is there a way to define "named" such that   \begin{named}[NAME] text \end{named}   will print   "NAME: text"?  I tried using the definition \newtheorem*{named}{}, but that results in   "(NAME): text", which is quite different from what I am trying to do.  I know that I could also create a new instance of \newtheorem for each named theorem I want to use, but that is clunky and inconvenient. Is there a better way? Sum of Cosine/Exponential I try to simplify to get rid of sum $$ \sum_{k=0}^{n-1}\cos(2 \pi fk)$$  I discover I shall use euler equation to form:  $$ \sum_{k=0}^{n-1}\frac{1}{2}(e^{2 \pi fki}+e^{-2 \pi fki})$$  but how to sum exponentials? Microsoft Exchange 2013 is not receiving internet email A. These kinds of problem are to be avoided. B. These kind of problems are to be avoided.  Are both A and B grammatical? If not, why not? If so, after having noticed the parallelism between A and C, and between B and D, could we say that C and D are &quot;standard&quot; English, too?  C. These kinds of problem are ones to avoid. D. These kind of problems are ones to avoid. Need polite phrases expressing disagreement with the information/conclusions of another person, especially an educator Proving that a normal, abelian subgroup of G is in the center of G if |G/N| and |Aut(N)| are relatively prime. "How it works?" vs. "How does it work?" What is the difference between:        "How it works?"      and        "How does it work?" Is there a way to hide pictures from being shown in Gallery How can I install Ubuntu on a headless machine? I have a headless storage server with preconfigured Windows Home Server. How can I install Ubuntu without a display?  Do I have to build a custom install flash drive? If so, what would be the basic procedure? Is there a program (like unetbootin) to do this? How to redirect output of an entire shell script within the script itself? Is it possible to redirect all of the output of a Bourne shell script to somewhere, but with shell commands inside the script itself? Redirecting the output of a single command is easy, but I want something more like this: #!/bin/sh if [ ! -t 0 ]; then     # redirect all of my output to a file here fi  # rest of script...  Meaning: if the script is run non-interactively (for example, cron), save off the output of everything to a file.  If run interactively from a shell, let the output go to stdout as usual. I want to do this for a script normally run by the FreeBSD periodic utility.  It's part of the daily run, which I don't normally care to see every day in email, so I don't have it sent.  However, if something inside this one particular script fails, that's important to me and I'd like to be able to capture and email the output of this one part of the daily jobs. Update: Joshua's answer is spot-on, but I also wanted to save and restore stdout and stderr around the entire script, which is done like this: # save stdout and stderr to file  # descriptors 3 and 4,  # then redirect them to &quot;foo&quot; exec 3&gt;&amp;1 4&gt;&amp;2 &gt;foo 2&gt;&amp;1  # ...  # restore stdout and stderr exec 1&gt;&amp;3 2&gt;&amp;4 Probability, quantum physics, and why (can't it/does it) apply to macroscale events? Quantum physics dictates that there are probabilities that determine the outcome of an event, ie: the probability of a quark passing through a wall is X, due to the size of the quark in comparison to the wall), but couldn't macroscale events be predicted this same way, assuming all variables were accounted for (lets hypothetically say we have a computer powerful enough to take into account all factors).  My understanding is that as the scale of an object increases, the probability of it doing anything other than what classical physics dictates is almost 0%, but could conceivably do something not predicted (Example: a human being cannot pass through a wall, but given an infinite timescale, eventually s/he would because of probability not being 0). Is this accurate? If so, then shouldn't we, (except as a tool for conceptualization, like how we round 9.8 m/s^2 or pi to 3.14), use only quantum mechanics to explain events in any scale (for more accuracy)? How do I make the method return type generic? Consider this example (typical in OOP books):    I have an Animal class, where each Animal can have many friends. And subclasses like Dog, Duck, Mouse etc which add specific behavior like bark(), quack() etc.  Here's the Animal class:  public class Animal {     private Map&lt;String,Animal&gt; friends = new HashMap&lt;&gt;();      public void addFriend(String name, Animal animal){         friends.put(name,animal);     }      public Animal callFriend(String name){         return friends.get(name);     } }   And here's some code snippet with lots of typecasting:  Mouse jerry = new Mouse(); jerry.addFriend("spike", new Dog()); jerry.addFriend("quacker", new Duck());  ((Dog) jerry.callFriend("spike")).bark(); ((Duck) jerry.callFriend("quacker")).quack();   Is there any way I can use generics for the return type to get rid of the typecasting, so that I can say      jerry.callFriend("spike").bark(); jerry.callFriend("quacker").quack();   Here's some initial code with return type conveyed to the method as a parameter that's never used.   public&lt;T extends Animal&gt; T callFriend(String name, T unusedTypeObj){     return (T)friends.get(name);         }   Is there a way to figure out the return type at runtime without the extra parameter using instanceof? Or at least by passing a class of the type instead of a dummy instance. I understand generics are for compile time type-checking, but is there a workaround for this? For example, you're a fashion designer who wants to get the opinion of both a professional and someone who doesn't know much about fashion. What's a term for the latter person? $M /K \land L /K$ algebraic $\implies ML/K$ algebraic? Why isn't the product rule used in the definition of mechanical work? Let $X\subset \mathbb{R}$ Lebesgue measurable, $|X|<|\mathbb{R}|$, is it true that $X$ is null? I am writing a document for which I need the margin to be exactly as follows: left, right, top and bottom text margin all equal to 1in, distance from bottom of the paper to page number equal to 0.75in (I don't have any footnote or header to set).  I tried to use the fullpage package in LaTeX but it does not give me the 0.75in to the page number. Is there a way to force that? I tried to set manually the margins for a 8.5x11 paper but I am not succeeding.    I tried but after writing:  \documentclass[PhD]{class_file} \usepackage[margin=1in,footskip=0.25in]{geometry}   I get the error message \paperwidth (0.0pt) too short.  I don't see the \paperwidth is set to 0.0pt anywhere though..  Also it seems to me that depending on which machine I use to compile my tex file, I get different margins, even when I set them up manually (without using geometry). Is it possible?    Using the geometry package things seem to work a bit better now (I changed machine and the problem with the paper width previously mentioned disappeared).   \usepackage[margin=1in,footskip=0.25in]{geometry}   gives me without problem upper, right and left margin of 1in. But the lower margin is 1.2in and I can't change it to be 1in even by using bottom=1in or bottom=0.8in. I really don't see how this can happen. Maybe a problem with the spacing between lines? The class files I am using can be fund at   I erased the margin settings of uclath12.clo as the margin I need are different from the ones that this file gives. Thank you. Hiding winforms app from taskbar How do I loop through or enumerate a JavaScript object? I have a JavaScript object like the following:  var p = {     "p1": "value1",     "p2": "value2",     "p3": "value3" };   Now I want to loop through all p elements (p1, p2, p3...) And get their keys and values. How can I do that?  I can modify the JavaScript object if necessary. My ultimate goal is to loop through some key value pairs and if possible I want to avoid using eval.