So I have this which is supposed to be side by side in the middle before the media query hits and then when it hits it should stack on top of each other. I have no idea why it's behaving th way it is.  I tried making it centered when ti's at its full width but it doesnt want to center and when I make the browser less than 400px they stack weirdly, they do stack on top but not centered.    .wrapper {      margin-top: 15%;     border : 2px solid #000;      overflow:hidden;   }      .wrapper div {      min-height: 300px;      padding: 10px;   }   #one {     background-color: orange;     float:left;      display: inline;     margin-left: 30%;     height: 400px;     width:250px;     border-right:2px solid #000;   }   #two {      background-color: orange;     float:left;      margin-right:30px;     height: 400px;     width:250px;     border-right:2px solid #000;   }      @media screen and (max-width: 400px) {      #one {        float: none;       margin-right:0;       bottom: 10%;       border:0;      }      #two {          float: none;         margin-right:0;         bottom: 10%;         border:0;         }   } &lt;div class="wrapper"&gt;         &lt;div id="one"&gt;one&lt;/div&gt;         &lt;div id="two"&gt;two&lt;/div&gt;     &lt;/div&gt;
How can I horizontally center a &lt;div&gt; within another &lt;div&gt; using CSS? &lt;div id=&quot;outer&quot;&gt;   &lt;div id=&quot;inner&quot;&gt;Foo foo&lt;/div&gt; &lt;/div&gt;
paragraph numbering I am using the paragraph section head, i.e.,   \paragraph{This is a cool paragraph}    I would like it to compile with numbering. If I change the secnumdepth (i.e., \setcounter{secnumdepth}{4}) this will work, but produce the "wrong" type of numbering, i.e.,      1.1.1.1 This is a cool paragraph      1.1.1.2 This is another cool paragraph etc.   What I would like is      1 This is a cool paragraph      2 This is another cool paragraph   or, if not,      1.1 This is a cool paragraph      1.2 This is another cool paragraph   where the first 1 indicates the section number and suppresses the subsection and subsubsection numbers. Can this be done? There is no set of all sets.. So there are a few posts about this already, but they skip over the problem I have.  The proof of Cantor's theorem elegantly shows that if we consider $f:A\rightarrow \mathcal{P}(A)$, the set $B=\{x\in A : x\not\in f(x) \}$ by its definition cannot lie in the image of $f$, precluding it from being a bijection - hence power sets have strictly greater cardinality.  But now, I thought one (obvious) way to characterise the "set of all sets" would be $S=\mathcal{P}(S)$, as indeed, it contains all possible sets (perhaps here is the problem, but I don't immediately see how using this as a definition for the set of all sets is bad). Now consider simply taking the identity function $i:S\rightarrow S$. Then $B=\{x\in S : x\not\in x \}$ - the set of all sets which do not contain themselves. But this doesn't exist. It's exactly the set of Russell's paradox. If this isn't a set, and so is not in $S$, then the proof no longer offers an obstruction to $i$ being surjective.    Each other post I've seen on the matter uses Cantor's theorem to show such a set doesn't exist. My query is to find that something else that must be happening, since I think the proof has issues for this particular set. I'm expecting other issues to arise with the definition $S=\mathcal{P}(S)$... I have noticed that the smackpacks say on the package that the package is meant for a 5 gal. batch and that you should pour the pack directly into the wort.   On the otherhand - nearly everyone tells me to always make a starter.   Is this just because making a starter never hurts or does the package contain wrong instructions?   I would have guessed that the yeast producers would tell you on the package if you should need some extra steps to get a good product. When is the new ball due for all forms of cricket? Is there a standard time fixed in Test, ODI and T20 formats of Cricket, when a fielding side captain can ask for a new ball?  If the captain of the fielding side doesn't ask for a new ball, will he be forced to have it mandatorily after a certain point by the match umpires? There are some .exe and .dll files belonging to some programs on my laptop which communicate with the internet without my permission (for self-update generally). I want to prevent those files one by one from accessing the internet. I don't want to install any external firewalls. I'm using Windows 7 Home Pro and if this can be done by Windows Firewall, it's OK. I took a look at Windows Firewall but couldn't find a setting to disable file access. I am a final year PhD in UK in a scientific discipline and I am writing my thesis. I have already published 2 journal papers and I have submitted 2 more papers for publications. My department does not allow a "publications-based" thesis so I need to write a thesis in the context of a book etc.   As I write my thesis in a couple of places, especially in the literature review, I tend to reuse sentences from my publications. I try to restate them a bit, maybe change some words for their synonyms etc. but it is practically me writing about what I wrote before. It goes without saying that I cite/quote me at the end of a passage if I say something non-obvious (I found that slightly funny. :) ). The problem is that occasionally I am just explaining for instance how a certain estimation technique works; in that case I cite the original authors and not myself. The syntax in those occasions though is practically the same as the original passage I used in my publication; as I have explained it once and was consider good, I find no reason to reinvent myself (I do a mild rewording as I mentioned but that is quite insignificant). Same things goes for listings. I do cite my paper in the beginning of a big list as the list's source but the list itself is almost identical as the one in "my" paper; in those cases I don't use quotations, just attribution "[]".  Is there an obvious guideline? The basic definition of plagiarism "reproducing the work of another person's as your own" is not (directly) applicable to me because I am the other person (almost *); if I am using other people's work I do cite them but I don't cite myself, citing them, in quotation marks!  I am a bit "fuzzy" about how not to plagiarize myself in my thesis (I have had no problem regarding my journal publications).  (* In all publications mentioned I am the first -but not sole- author.) A book in which every species on earth was rendered intelligent The 'blurb' on the back of the book was that something had boosted the intelligence of every creature on earth, to the point that at least some animals were on par with humans. I'm not sure if humans were similarly enhanced or just animals. I'm not sure whether it was done by aliens, or a side effect of something humans did, or what.   This book was on the shelves in the mid/late 1980's, so it's nothing more recent than that. How to compute prediction bands for non-linear regression? Complicated FOR loop nesting. Having trouble cleaning up legacy code I am trying to tidy up some really bad legacy code from an old developer and I'm trying to get rid of these nested for loops. The code below shows what I'm currently working with. I've fixed this before with nested SOQL queries but nothing like this. How would this need to look to remove these for loops (except Trigger.New)? Would I use Maps? How would I do that?  map&lt;Id,SObject&gt; mapProperyIdBudDetail = util.GetObjFields(setPropertyId, 'Property'); map&lt;Id,SObject&gt; mapSpaceIdBudDetail = util.GetObjFields( PropertyMap.keyset(), 'Space');  for ( Lease__c l: Trigger.New ) {      if(mapProperyIdBudDetail.get(PropertyMap.get(l.space__c))!=null) {          lProperties = new List&lt;SObject&gt;{mapProperyIdBudDetail.get(PropertyMap.get(l.space__c))};              for ( SObject p: lProperties ) {                  for ( String fm: FieldMap.keyset() ) {                      if ( p.get(FieldMap.get(fm)) != Null) {                         l.put(fm,p.get(FieldMap.get(fm)));                     }                  }             }     } } Modified files in a git branch are spilling over into another branch How to open new tab in browser in selenium 3.0? I have tried multiple actions but it is not working.  It always close the first tab and then it open link in the same page.  // Driver is launched package WebBrowserCommands;  import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.interactions.Actions;  public class OpenBrowser   {     public static void main(String[] args) throws Exception {         System.setProperty("webdriver.chrome.driver","/Users/ss108/Desktop/Util/SELENIUM SUPPORT/chromedriver");          WebDriver driver = new ChromeDriver();          driver.manage().window().maximize();         // Driver is launched          //We have two ways         boolean Indriectway = true;         //Boolean to understand both method          if(!Indriectway){             //Using String to take value.             String URL = "https://www.google.com";             driver.get(URL);              String PageSourceFirst = driver.getPageSource();             //We have took title in PageSourceFirst             System.out.println(PageSourceFirst);              //Get Title Command             String TitleFrist = driver.getTitle();             //We have took title in TitleFirst             System.out.println("Tile of WebSite is " + TitleFrist);              //Get Current URL             String CurrentURLFirst = driver.getCurrentUrl();             System.out.println("Current URL is " + CurrentURLFirst);              Actions act=new Actions(driver);             act.contextClick(driver.findElement(By.linkText("Gmail"))).perform();             Thread.sleep(10000);             act.contextClick(driver.findElement(By.linkText("Gmail"))).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.RETURN).build().perform();                    // Try to open page using right click and action arrow down **but it is not working**              driver.close();          }else {             //Using directly             driver.get("https://www.facebook.com");             String PageSourceSecond = driver.getPageSource();             System.out.println(PageSourceSecond);              //Get Title Command             System.out.println("Tile of WebSite is " + driver.getTitle());             //Get Current URL             System.out.println("Current URL is " + driver.getCurrentUrl());             driver.quit();          }     } }   Second method  1- Same result getting   System.setProperty("webdriver.chrome.driver","/Users/ss108/Desktop/Util/SELENIUM SUPPORT/chromedriver");     WebDriver driver = new ChromeDriver();     driver.get("https://www.facebook.com")     Robot robot = new Robot();     robot.keyPress(KeyEvent.VK_META);     robot.keyPress(KeyEvent.VK_T);     robot.keyRelease(KeyEvent.VK_T);     robot.keyRelease(KeyEvent.VK_META);       driver.get("https://www.google.com")   Third method  String selectLinkOpeninNewTab = Keys.chord(Keys.CONTROL,Keys.RETURN);  driver.findElement(By.linkText("urlLink")).sendKeys(selectLinkOpeninNewTab);   however none of them work for what I am trying. Showing that a function is a tensor I am trying to solve question 4 in Munkres Analysis on Manifolds section 26.  The question is determine if the following is a tensor on $\mathbb{R}^4$ and express those that are in terms of the elementary tensors on $\mathbb{R}^4$.   $f(x,y) = 3 x_1 y_2 + 5 x_2 x_3$   I am trying to follow the definition of a tensor (which I don't think I fully understand) to show this. I know I must find a function $T: \mathbb{R}^4 \rightarrow \mathbb{R}$ that is linear on the $i^{th}$ variable. Since there are only 2, then I believe I have to somehow write $f$ as a projection. I'm just not sure where to  go from here.  Any hints would be great, thanks! I have 4 time series. One of them is stationary and rest of them are not. I need to find relation between them. I will use AIC to decide lag length.   Should I use VAR or VECM to find relation between them?  Will VAR or VECM give me relation in terms of equation which can be used for forecasting?  Do I need to perform Johansen's test of cointegration?  What good would it do? How do I remove the space between inline/inline-block elements? I don't understand this. These identities are given in the online notes for MIT's 18.01 calculus class. It's related to taking the sum of two trig functions and transforming them into a single trig function. I can use the formulas to do this, but I am having trouble finding anything on the internet to use a proof for my understanding.  Thanks for any responses!  EDITED (added after the first answer):  Sorry, the identity goes like this:  $A\sin{k(x-c)}=a\sin{kx}+b\cos{kx}$ ,  with the relationships  $a=A\cos{kc}$ , $b=-A\sin{kc}$ , $A=\sqrt{a^2+b^2}$ , and $\tan{kc}=-b/a$ Necessary and sufficient condition for the matrix $A = I - 2 x x^t$ to be orthogonal Let $x$ be a non zeo (column) vector in $\mathbb{R}^n$. What is the necessary and sufficient condition for the matrix $A = I-2xx^t$ to be orthogonal? Cursor hitting "border" between differently sized monitors Shuffling questions in exam How to determine best cutoff point and its confidence interval using ROC curve in R? I have the data of a test that could be used to distinguish normal and tumor cells. According to ROC curve it looks good for this purpose (area under curve is 0.9):    My questions are:    How to determine cutoff point for this test and its confidence interval where readings should be judged as ambiguous? What is the best way to visualize this (using ggplot2)?   Graph is rendered using ROCR and ggplot2 packages:  #install.packages("ggplot2","ROCR","verification") #if not installed yet library("ggplot2") library("ROCR") library("verification") d &lt;-read.csv2("data.csv", sep=";") pred &lt;- with(d,prediction(x,test)) perf &lt;- performance(pred,"tpr", "fpr") auc &lt;-performance(pred, measure = "auc")@y.values[[1]] rd &lt;- data.frame(x=perf@x.values[[1]],y=perf@y.values[[1]]) p &lt;- ggplot(rd,aes(x=x,y=y)) + geom_path(size=1) p &lt;- p + geom_segment(aes(x=0,y=0,xend=1,yend=1),colour="black",linetype= 2) p &lt;- p + geom_text(aes(x=1, y= 0, hjust=1, vjust=0, label=paste(sep = "", "AUC = ",round(auc,3) )),colour="black",size=4) p &lt;- p + scale_x_continuous(name= "False positive rate") p &lt;- p + scale_y_continuous(name= "True positive rate") p &lt;- p + opts(             axis.text.x = theme_text(size = 10),             axis.text.y = theme_text(size = 10),             axis.title.x = theme_text(size = 12,face = "italic"),             axis.title.y = theme_text(size = 12,face = "italic",angle=90),             legend.position = "none",             legend.title = theme_blank(),             panel.background = theme_blank(),             panel.grid.minor = theme_blank(),              panel.grid.major = theme_line(colour='grey'),             plot.background = theme_blank()             ) p   data.csv contains the following data:  x;group;order;test 56;Tumor;1;1 55;Tumor;1;1 52;Tumor;1;1 60;Tumor;1;1 54;Tumor;1;1 43;Tumor;1;1 52;Tumor;1;1 57;Tumor;1;1 50;Tumor;1;1 34;Tumor;1;1 24;Normal;2;0 34;Normal;2;0 22;Normal;2;0 32;Normal;2;0 25;Normal;2;0 23;Normal;2;0 23;Normal;2;0 19;Normal;2;0 56;Normal;2;0 44;Normal;2;0 Using the Terminal keybindings with bash on macOS I have been trying to learn the keyboard shortcuts for the shell on macOS, but when I tried using ALT+B, it did not work.  How do you discover, configure and use keybindings in the shell? Any cheatsheets would be helpful.