I created an empty react project and I only added a materializecss for styles. &lt;div className=&quot;App&quot;&gt;     &lt;header&gt;         &lt;nav/&gt;     &lt;/header&gt;      &lt;div className=&quot;row category__list&quot; /&gt;      &lt;footer className=&quot;page-footer&quot;&gt;         &lt;div className=&quot;footer-copyright&quot; /&gt;     &lt;/footer&gt; &lt;/div&gt;  I added a styles for my blocks. .App {   height: 100vh; }  .category__list {   margin: 0;   height: 100%; }  .page-footer {     padding: 0; }  Why my block App and the block category__list have the same height? And I have a scroll and my footer not see without use the scroll. As I see it, the category__list block should set all free space and my footer haven't to be outside the display. For example
I am working on a web application where I want the content to fill the height of the entire screen.  The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom.  I have a header div and a content div. At the moment I am using a table for the layout like so:  CSS and HTML    #page {     height: 100%; width: 100% }  #tdcontent {     height: 100%; }  #content {     overflow: auto; /* or overflow: hidden; */ } &lt;table id="page"&gt;     &lt;tr&gt;         &lt;td id="tdheader"&gt;             &lt;div id="header"&gt;...&lt;/div&gt;         &lt;/td&gt;     &lt;/tr&gt;     &lt;tr&gt;         &lt;td id="tdcontent"&gt;             &lt;div id="content"&gt;...&lt;/div&gt;         &lt;/td&gt;     &lt;/tr&gt; &lt;/table&gt;     The entire height of the page is filled, and no scrolling is required.  For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work.  Is there a way to achieve the same effect without using the table?  Update:  Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%.  Update 2:  For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.
This is a continued discussion from () by return count only.     Problem      Given four lists A, B, C, D of integer values, compute how many tuples   (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero.      To make problem a bit easier, all A, B, C, D have same length of N   where \$0 \le N \le 500\$. All integers are in the range of \$-2^{28}\$ to \$2^{28} - 1\$   and the result is guaranteed to be at most \$2^{31} - 1\$.      Example:      Input:  A = [ 1, 2] B = [-2,-1] C = [-1, 2] D = [ 0, 2]       Output:  2       Explanation:      The two tuples are:         (0, 0, 0, 1) -> A[0] + B[0] + C[0] + D[1] = 1 + (-2) + (-1) + 2 = 0   (1, 1, 0, 0) -> A[1] + B[1] + C[0] + D[0] = 2 + (-1) + (-1) + 0 = 0      I'm wondering if there are any ideas to have a solution less than \$O(n^2)\$ time complexity.  Source code in Python 2.7,  from collections import defaultdict def four_sum(A, B, C, D):     sum_map = defaultdict(int)     result = 0     for i in A:         for j in B:             sum_map[i+j] += 1     for i in C:         for j in D:             if -(i+j) in sum_map:                 result += sum_map[-(i+j)]      return result  if __name__ == "__main__":     A = [1, 2]     B = [-2, -1]     C = [-1, 2]     D = [0, 2]     print four_sum(A,B,C,D) Using proof by contradiction vs proof of the contrapositive What is the difference between a "proof by contradiction" and "proving the contrapositive"? Intuitive, it feels like doing the exact same thing. And when I compare an exercise, one person proves by contradiction, and the other proves the contrapositive, the proofs look almost exactly the same.  For example, say I want to prove: $P \implies Q$ When I want to prove by contradiction, I would say assume this is not true. Assume $Q$ is not true, and $P$ is true. Blabla, but this implies $P$ is not true, which is a contradiction.  When I want to prove the contrapositive, I say. Assume $Q$ is not true. Blabla, this implies $P$ is not true.  The only difference in the proof is that I assume $P$ is true in the beginning, when I want to prove by contradiction. But this feels almost redundant, as in the end I always get that this is not true. The only other way that I could get a contradiction is by proving that $Q$ is true. But this would be the exact same things as a direct proof.   Can somebody enlighten me a little bit here ? For example: Are there proofs that can be proven by contradiction but not proven by proving the contrapositve? How can I set the maximum amount of characters in a UITextField on the iPhone SDK when I load up a UIView? How to prove $\hat{p}|x\rangle=i\hbar\frac{\partial}{\partial x}|x\rangle$,using $[\hat{x},\hat{p}]=i\hbar$? How to prove $$\hat{p}|x\rangle=i\hbar\frac{\partial}{\partial x}|x\rangle,$$ using $$[\hat{x},\hat{p}]=i\hbar~?$$ The question seems to be uncomplete because for any $f(x)$ $$[\hat{x},\hat{p}+f(x)]=i\hbar.$$ But that's my homework. Can someone add some appropriate assumptions and prove the question?  Here is a seemingly right answer:  $$ \hat{Q} = e^{-i \frac{u}{\hbar} \hat{p}},[\hat{x},\hat{Q}]=u \hat{Q} $$ $$ \hat{x}\hat{Q}|x\rangle = (x+u)\hat{Q}|x\rangle $$ $$ \hat{Q}|x\rangle = |x+u\rangle $$ $$ \hat{T} = e^{i \frac{u}{\hbar} \hat{x}},[\hat{p},\hat{T}]=u \hat{T} $$ $$ \hat{p}\hat{T}|p\rangle = (p+u)\hat{T}|p\rangle $$ $$ \hat{T}|p\rangle = |p+u\rangle $$  Therefore  $$ \langle x | p \rangle = e^{i\frac{px}{\hbar}} \langle 0 |_x |0 \rangle_p $$  $$ \delta(p-p') = \langle p | p' \rangle  = 2\pi \hbar |\langle 0 |_x |0 \rangle_p|^2 \delta(p-p') $$ $$ \langle 0 |_x |0 \rangle_p = \sqrt{\frac{1}{2 \pi \hbar}}$$ $$ \hat{p}|x\rangle = \int \hat{p} |p\rangle\langle p |x\rangle= \int \hat{p} |p\rangle e^{-i\frac{px}{\hbar}}\sqrt{\frac{1}{2 \pi \hbar}} = i\hbar\frac{\partial}{\partial x}|x\rangle $$ Which assumption is made here? Unknown Column In Where Clause Ok, so PHP isn't the best language to be dealing with arbitrarily large integers in, considering that it only natively supports 32-bit signed integers. What I'm trying to do though is create a class that could represent an arbitrarily large binary number and be able to perform simple arithmetic operations on two of them (add/subtract/multiply/divide).  My target is dealing with 128-bit integers.  There's a couple of approaches I'm looking at, and problems I see with them. Any input or commentary on what you would choose and how you might go about it would be greatly appreciated.  Approach #1: Create a 128-bit integer class that stores its integer internally as four 32-bit integers. The only problem with this approach is that I'm not sure how to go about handling overflow/underflow issues when manipulating individual chunks of the two operands.  Approach #2: Use the bcmath extension, as this looks like something it was designed to tackle. My only worry in taking this approach is the scale setting of the bcmath extension, because there can't be any rounding errors in my 128-bit integers; they must be precise. I'm also worried about being able to eventually convert the result of the bcmath functions into a binary string (which I'll later need to shove into some mcrypt encryption functions).  Approach #3: Store the numbers as binary strings (probably LSB first). Theoretically I should be able to store integers of any arbitrary size this way. All I would have to do is write the four basic arithmetic functions to perform add/sub/mult/div on two binary strings and produce a binary string result. This is exactly the format I need to hand over to mcrypt as well, so that's an added plus. This is the approach I think has the most promise at the moment, but the one sticking point I've got is that PHP doesn't offer me any way to manipulate the individual bits (that I know of). I believe I'd have to break it up into byte-sized chunks (no pun intended), at which point my questions about handling overflow/underflow from Approach #1 apply. How can I 'join' an array adding to the beginning of the resulting string the first character to join? Here's my code:  x = 1.0 y = 100000.0     print x/y   My quotient displays as 1.00000e-05.  Is there any way to suppress scientific notation and make it display as 0.00001? I'm going to use the result as a string. I got a situation where i need to invoke future method from batch class. And i know that it is not possible to do. But there might be some workarounds to achieve it, right? And i dont want to invoke future method using shedule apex as my requirement will hit governor limits of "Total number of schedule jobs exceed". So i tried in below ways, but still fighting with same issue.  My design is  Scenario 1 :   Schedule Apex ===> 2. BatchClass (Runs every hour) (Generates a map with "N" records for every batch context, and passes it to Future method in an apex class)  ===> 3. Future method ( then it will login to a salesforce account and generates an attachment and sends an email to a corresponding email address) .   Scenario 2 :  Since, It is not possible to invoke future method from batch, i tried implementing an apex class with a normal static method  invoking future method and in a batch class, for every context i.e., execute() method, it will invoke a normal method which in turn invokes future method, but still got the same error      FATAL ERROR: Future method cant be called from future or Batch   ie.,   global class BatchClass implements Database.batachable&lt;Sobject&gt; {    global Iterable&lt;ScheduledReport__c&gt; start(Database.BatchableContext BC)  {         query=[];        return query;  }  global void execute(Database.BatchableContext BC, List&lt;ScheduledReport__c&gt; scope) {      FutureClass.normalMethod(mapRecords);   }    global void finish(Database.BatchableContext BC){   }  }   Future Class:   global class FutureClass {  global static void normalMethod(Map&lt;&gt; mapR) {      futureMethod(mapR);  }  @future(callout=true)  global static void futureMethod(Map&lt;&gt; m) {      //some code;   }  }   Scenario 3 :  Instead of invoking future class method from batch i tried updating list of records and done checkbox value to true and i've implemented after update event trigger to get the all the records in which checkbox values are true and from trigger i tried invoking future method , still didnt work , i got an error      FATAL ERROR: Future method cant be called from future or Batch   Please help me out.   Thanks ! What would happen if two wizards made each other a Horcrux? Would they be invincible? How would you kill one of them? How do I print my Java object without getting "SomeType@2f92e0f4"? I am trying to balance underbraces in the equation below, how can I ensure that both underbraces at the same depth?  \begin{equation} y = \underbrace{ \left [ x^2 + r^2 (a^2+\frac{a^{0.3}}{b}) \right]}_\text{growth rate} \times  \underbrace{ C_0}_\text{initial} \end{equation} Proving that $m+n\sqrt{2}$ is dense in $\mathbb R$ I have found that for only one page (so far) the spacing between the header and content is different from the spacing on all the other pages. You can see this behavior in the images below (from pages 2 and 3 of the document):     My .tex file contents are shown below.  \documentclass[a4paper]{report} \usepackage{fullpage} \usepackage{lipsum} \usepackage{fancyhdr} \pagestyle{fancy} \setlength{\headsep}{0.5cm}  \begin{document} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\chaptermark}[1]{\markboth{\thechapter. #1}{}} \fancyhead[L]{\bfseries \leftmark} \fancyhead[R]{\bfseries \rightmark}  \chapter{Version Control} \lipsum \lipsum \lipsum \lipsum  \end{document} I know that its is the possessive and it's is the contraction, and know when to use them.  But why doesn't the possessive have an apostrophe?   "The bear's eating a fish." [contraction] "The bear's coat is brown." [possessive] "It's eating a fish." [contraction] "Its coat is brown." [possessive] "One's eating a fish." [contraction] "One's coat is brown." [possessive]    lists the etymology as "From  +‎ ", and  says that this is actually the original form:     Originally written it's, and still deliberately spelled thus by some writers until early 1800s.   So what happened to the apostrophe?  When did people stop using it, and why did they?  It seems that it's as the possessive is more natural, as most people do this until they're taught that it is wrong (or even after).  Update: Online Etymology Dictionary has been updated to include two potential explanations:     The apostrophe came to be omitted, perhaps because it's already was established as a contraction of it is, or by general habit of omitting apostrophes in personal pronouns (hers, yours, theirs, etc.).   Can anyone back up either of these arguments?  The possessive one's still has the apostrophe, despite these. I’m running Ubuntu 14.04. When I run:   sudo add-apt-repository ppa:ubuntu-wine/ppa   I get the following error:  sudo: add-apt-repository: command not found   I tried to run  sudo apt-get install software-properties-common   but it shows:  software-properties-common is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. Do the topologies with the same convergent sequences coincide? Do the same sequential convergence in two topologies the result are the same topologies? Let $X$ be topological  space with topologies $\tau$, $\tau'$. Let $(x_{n})\in X$ and $x\in X$ and $(x_{n})\rightarrow x$ with $\tau$ if and only if $(x_{n})\rightarrow x$ with $\tau'$. Do the two topologies on $X$ coincide? How to set mount point of boot partition to /boot/efi? Let $G=\langle a\rangle$ be a cyclic group of order $n$. Show that, for every divisor $d$ of $n$, there exists a subgroup of $G$ whose order is $d$. Create any number of paragraph fields in a multiple value field on node create form I have a paragraphs field that takes a term reference.  I need to count how many terms there are for a specific vocabulary and then create that many instance of the paragraphs multiple value field for when creating a node of a certain type. Can this be done with Hook_form_alter ?  It is important that these fields are loaded when the node creation form is loaded rather than the user having to click add more  Any help would be greatly appreciated  I have tried this but when saving the node it doesn't save the new fields  function hook_form_alter(&amp;$form, $form_state, $form_id) {    if ($form_id == 'my_form') {    $item = $form['field_features']['widget']['0'];    // get taxonomy terms   $query = \Drupal::entityQuery('taxonomy_term');   $query-&gt;condition('vid', "my_voc");   $tids = $query-&gt;execute();   $terms = \Drupal\taxonomy\Entity\Term::loadMultiple($tids);    $count = count($terms);    $i = '1';   foreach($terms as $term){     $form['field_features_para']['widget'][$i] = $item;     $form['field_features_para']['widget'][$i]['#delta'] = $i;     $form['field_features_para']['widget'][$i]['#weight'] = $i;     $i ++;   }  } }