Explanation: I've following problem statement at hand, I came across an interesting 2 liner, C solution for it under leedcode discussion section. I tried to decompose it to understand what it means, and except one small line, I understood the rest. My question is at the end. Leetcode Problem Statement: Given an array arr of positive integers sorted in a strictly increasing order, and an integer k. Find the kth positive integer that is missing from this array. Example 1: Input: arr = [2,3,4,7,11], k = 5 Output: 9  Explanation: The missing positive integers are [1,5,6,8,9,10,12,13,...].  The 5th missing &gt;&gt;positive integer is 9.  Example 2: Input: arr = [1,2,3,4], k = 2 Output: 6  Explanation: The missing positive integers are [5,6,7,...]. The 2nd missing positive integer is 6.  Constraints:  1 &lt;= arr.length &lt;= 1000 1 &lt;= arr[i] &lt;= 1000 1 &lt;= k &lt;= 1000 arr[i] &lt; arr[j] for 1 &lt;= i &lt; j &lt;= arr.length   Two liner C solution:     int findKthPositive(int* arr, int arrSize, int k){         for (int arrCurrIndex = 0, counter = 1 ; (k &amp;&amp; (arrCurrIndex &lt; arrSize) ? ((arr[arrCurrIndex] != counter) ? k-- : ++arrCurrIndex) : k--) || (k = counter-1, 0) ; counter++);         return k;     }   For reference: Following is a similar algorithm that's being deployed, but its just cleaner to understand.      int findKthPositive(int* arr, int arrSize, int k){          for (int counter=1, arrCurrIndex=0; counter&lt;10000; counter++) {              // exceed arr limits              if (arrCurrIndex &lt; arrSize) {                  if (counter == arr[arrCurrIndex]) { // found element in array                      index++;                      continue;                  }              }              // missing element              k--;              if (k==0) {                  return counter;              }          }          return 0;      }    My question: What does following line in solution #1 means exactly? (k = counter-1, 0) ======UPDATE ON ANSWER======= I modified solution #1 in question slightly to make it more readable. It highlights what is going on with the given statement in question. Here is the modified solution: int findKthPositive(int* arr, int arrSize, int k){     // move counter out of the foor loop     int counter=1;     for (int arrCurrIndex = 0;      (k &amp;&amp; (arrCurrIndex &lt; arrSize) ?      ((arr[arrCurrIndex] != counter) ? k-- : ++arrCurrIndex)      : k--); counter++);     return counter-1;     }
What does the , operator do in C?
Problem statement  Prove that if $A$ is an uncountable set and $B$ is a countable set, then $A\setminus B$ must be uncountable.  What I think  The statement does not mention $A$ and $B$ relationship. I think there are two possibilities:   If $A \cap B = \emptyset $, then $A\setminus B$ is trivially uncountable If $A \cap B = B$, then $B \subset A$ and as a bijection can not be made between $A\setminus B$ and $\mathbb{N}$, $A\setminus B$ is uncountable.   And there is where I'm stuck. How can I prove that a bijecton can't be made?  TIA. Finding the remainder of $\overbrace{11\ldots1}^{123 \text{ times}}$ divided by $271$ What are the correct version numbers for C#? Is StringBuilder really faster than Aggreggate? How do I ignore ampersands in a SQL script running from SQL Plus? I have a SQL script that creates a package with a comment containing an ampersand (&amp;). When I run the script from SQL Plus, I am prompted to enter a substitute value for the string starting with &amp;. How do I disable this feature so that SQL Plus ignores the ampersand? Why is it that Android still can't be installed as regular OS? If $f:U\to V$ is holomorphic and $f'(z)\neq 0$ for all $z\in U$, then$f$ is locally bijective. I am trying to solve the following problem:     Let $f:U\to V$ be a holomorphic function such that $f'(z)\neq 0$ for all $z\in U$. Show that for all $z_0\in U$, there exists a disc $D_\varepsilon(z_0)\subseteq U$ such that $f:D_\varepsilon(z_0)\to f(D_\varepsilon(z_0))$ is bijective.   Atempt:  I am trying to use Rouche's Theorem, but I am stuck on a particular step. Let $z_0\in U$. Since $f'(z_0)\neq 0$, there is a disc $D_r(z_0)\subseteq U$ such that $$f(z)=f(z_0)+(z-z_0)h(z),\quad\forall z\in D_r(z_0)$$ where $h$ is holomorphic on $D_r(z_0)$ and $h(z)\neq 0$ for all $z\in D_r(z_0)$.   Let $0&lt;\varepsilon&lt;r$ to be defined later and fix $w\in D_\varepsilon(z_0)$. To show that $f$ is injective in $D_\varepsilon(z_0)$ is to show that the function $f(z)-f(w)$ has exactly one zero in $D_\varepsilon(z_0)$. But $$F(z):=(z-z_0)h(z)$$ has exactly one zero in $D_\varepsilon(z_0)$, so we might want to apply Rouche's Theorem with $F$ and $$G(z):=f(z)-f(w)-(z-z_0)h(z)=f(z_0)-f(w)=-(w-z_0)h(w)$$ to conclude that $F$ and $F+G$ have the same number of zeros and hence $f$ is injective. But that means that we need to find $0&lt;\varepsilon&lt;r$ such that $|G(z)|&lt;|F(z)|$ on $\partial D_\varepsilon(z_0)$. That is, $$|w-z_0||h(w)|&lt;|z-z_0||h(z)|$$ for all $w\in D_\varepsilon(z_0)$ and $z\in\partial D_\varepsilon(z_0)$.  Can we find such $\varepsilon&gt;0$?  It seems intuitive since if we expand $h$ in a power series at $z_0$, $h(z)=\sum_{n=0}^\infty a_n(z-z_0)^n$, then $$|w-z_0||h(w)| = |w-z_0|\sum_{n=0}^\infty a_n|w-z_0|^n &lt; |z-z_0|\sum_{n=0}^\infty a_n|z-z_0|^n.$$ for $w\in D_\varepsilon(z_0)$ and $z\in\partial D_\varepsilon(z_0)$. But this is of course not a proof. I haven't been writing C for very long, and so I'm not sure about how I should go about doing these sorts of recursive things... I would like each cell to contain another cell, but I get an error along the lines of "field 'child' has incomplete type". What's up?  typedef struct Cell {   int isParent;   Cell child; } Cell; Converting Linux into a Router- Traffic from eth0:0 to eth0 So I have been trying to convert my linux box which is running Mint into an router. eth0 has a public address that has 71.xx.xx.xx for an IP addr. I created an eth0:0 and set it an IP address , 10.0.0.100. I started a DHCP server that is on eth0 ( because it wont use eth0:0) and that's giving out addresses between 10.0.0.101 and 10.0.0.200. I can ping between eth0 and eth0:0 on the same machine. I have a another laptop connected to the linux via a switch and its able to receive an ip addr via the DHCP server. Problem is how do I route traffic from and to eth0:0 to eth0 and vice versa so that computers on the private network that is 10.0.0.x can access internet via the static IP on eth0. Background Video is shown in Rendered mode but not when szene is rendered i have a 3D Object and want to add a background image( if possible even a movie) to this 3D Object. I use Cycles to render and tried a plane with the  image as texture. When i go into render mode, it looks like this(picture with background) and when rendered, it has no background. The key also looks into  a different direction.  Should i even use Cycles for this or use motion tracking? i tried to use that but had several problems.     Rendered mode   When scene is rendered Time Dilation When In Orbit Imagine a space ship orbiting the sun at near relativistic speeds, when compared to Earth (say from the reference frame of the sun) there would be x amount of time dilation.  This would mean people on the ship could live for 100's of Earth years.  My question is what would happen if a second ship flew directly away from the Sun and back (ignoring acceleration) at the same speed the orbiting ship is travelling, would the time dilation for the ship that travels in a straight line be the same as that moving in a circle?  The reason I ask is that I was imagining a scenario where intergalactic travel is possible as time dilation means even a journey of light years only ages the crew a fraction of that time, with space stations orbiting certain star systems at similar speeds so that people that don't work on ships can live a similar length of time. I understand that time dilation is all linked to a certain reference frame but working with a reference frame of the sun what would the time dilation be for the different objects taking different paths but at the same speed relative to the sun? If the ship docked back with the space station would they both say the same amount of time had passed? The stress tensor can be written as: $$\sigma_{ij}=-p \delta_{ij}+\sigma'_{ij}\label{1}\tag{1}$$ where $\sigma_{ij}'$ is called the extra stress tensor.   From what I understand pressure is pressure is force per unit area, so that the force acting on the surface $d\vec A$ is given by:  $$\vec F=-p d\vec A\label{2}\tag{2}$$ (This has the effect that the force on an infinitesimally thin surface due to a continuous pressure is zero). However, $\sigma_{ij}$ represent the force in the $i$ direction on a surface with normal in the $\hat e_j$ direction. So the force acting on a surface $d \vec A$ must be: $$F_i=\sigma_{ij}dA_j\label{3}\tag{3}$$ Equations (2) and (3) clearly do not agree (even if we look soley at the force in the $d\vec A$ direction they don't agree). So my question is what is the exact meaning of pressure in expression (1) and why do we not have: $$\sigma_{ii}=-p$$ How to avoid pressing Enter with getchar() for reading a single character only? Why does editing posts on SO require a minimum of 6 charaters? I have just recently started editing the post on Stack Overflow.  I found some posts which only required 2-3 character changes like they had correct grammar but some mistakes in spelling.  When I tried to correct the spelling mistakes, and clicked on "edit", it said:  Edits must be at least 6 characters   I don't know why Stack Overflow added this limit. How can I edit only 3-4 characters in a post? Salesforce1 on focus scroll to the top Extracting Data Between two Characters in Excel I have the following format in Excel and I am trying to extract the data between the characters:  First Last &lt;flastname@xxxx.com&gt;   I need to extract the email address between &lt; and > into its own cell  Thanks! How to reduce AWS EBS root volume size? Recently as per this       For individuals who have chosen to receive automatic updates through   Windows Update, we help upgradable devices get ready for Windows 10 by   downloading the files they’ll need if they decide to upgrade.   but Microsoft seems to be downloading hidden update in windows 7 :  according to this  :     An INQUIRER reader pointed out to us that, despite not having   'reserved' a copy of Windows 10, he had found that the ~BT folder,   which has been the home of images of the new operating system since   before rollout began, had appeared on his system. He had no plans to   upgrade and had not put in a reservation request.   As per the above two articles there was hidden update for windows 10 with respective to windows 7 and 8 machines ,whats the effective way to stop this hidden update?  right now i cant disable windows update since i wish to patch my system with latest updates,  i checked the question which was marked as possible  :     inorder to clarify how it differs it talks about the cancelled update   ,but this was latest issue which was araised two days before,i didnt   dig much about that and believe both were different ,apart from that   it was about after the cancellation of update a   nd this one was about preventing such an update from downloading to my pc  any suggestions to avoid this update? for normal user I get :     /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/monty/google_appengine   which is actually the content of /etc/environment  For root I get:     /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin   what's the reason behind this and which file contains this line? Title of short story: God granting immortality to others to find a way to kill himself