I'm a student trying to learn C and C++, I've got a problem with the specifier %d I dont't understand the exception that is written in the console, It's writing The format %d expects argument of type 'int', but argument 2 has type 'long long unsigned int' [-Wformat]  Here is the code : #include&lt;stdio.h&gt; #include&lt;stdlib.h&gt;  int main() {     short int u=1;     int v=2;     long int w=3;     char x='x';     float y=4;     double z=5;     long double a=6;     long b=7;     printf(&quot;short int:%d\n&quot;,sizeof(u));     printf(&quot;int:%d octets\n&quot;,sizeof(v));     printf(&quot;long int:%d octets\n&quot;,sizeof(w));     printf(&quot;char:%d octets\n&quot;,sizeof(x));     printf(&quot;float:%d octets\n&quot;,sizeof(y));     printf(&quot;double:%d octets\n&quot;,sizeof(z));     printf(&quot;long double:%d octets\n&quot;,sizeof(a));     printf(&quot;long:%d octets\n&quot;,sizeof(b));     return 0; }
I'm trying to print types like off_t and size_t.  What is the correct placeholder for printf() that is portable?  Or is there a completely different way to print those variables?
Why are the even and odd Regge trajectories degenerate? Stacking Multiple Ternary Operators in PHP What is the difference between "Build and view" and "Compile"? How can I get back to Blender's default theme? I replaced a non-protected receptacle with a GFCI type and now my circuit tester trips the GFCI as soon as it is plugged in.  The receptacle tested fine before replacement, ground, neutral, hot, etc.  I've double checked the hot/neutral/ground connections.  I've also tried it with the downstream load disconnected.   The GFCI trips the moment I plug in my circuit tester (before pushing the test button).  Otherwise things check out OK.  I can plug in a power tool without it tripping.  Also, the integrated test/reset button work correctly.   I've read that the integrated test button is the only one that truly matters. Is this correct or should I be concerned? I'm sure a home inspector will red flag this if their tester has the same result.  Update  My tester is by "Commercial Electric".  The tester is one of the palm sized three prong type with three leds to indicate the condition of the circuit and a button on top to test GFCI. It's new from the local box store. I got a bunch of files in some directory (along with many other files) that I want to move.   Luckily, all the files I want to move contain a certain identifier in their names, so I can ls | grep IDENTIFIER to get the exact list of files to move.   But, how can I execute mv file /path/to/dest/folder/ at once, and not one by one (there's a lot of files to move)? How to execute a program or call a system command from Python Word caption style -- different style for label and number? This should be a common problem for anyone involved in technical writing.  When you insert an image (or table etc.) caption in Word, you get  dialog. You enter your caption,  "A happy bicycle" (in yellow).  This might be fine for a happy bicycle, but I want to have captions that have one style for the "enumeration" (label and number) and one style for the description (caption text, as called by Word), as such:    I have tried searching for this but I haven't found anything yet... Finding all solutions for a system of equations with constraint on the sum of absolute values I am looking for a fast algorithm to find all integer solutions for the following system of linear equations ($c_1,\ldots,c_n \in \mathbb{Z}$ and $r\in \mathbb{N}$ ):  $x_1+x_2=c_1$  $x_3+x_4=c_2$  ...  $x_{2n-1}+x_{2n}=c_n$  $|x_1|+|x_2|+\ldots+|x_{2n}|=r$  $x_1,\ldots,x_{2n} \in \mathbb{Z}$   Also can we find the number of solutions before solving the system? Reference book on measure theory I post this question with some personal specifications. I hope it does not overlap with old posted questions.  Recently I strongly feel that I have to review the knowledge of measure theory for the sake of starting my thesis.  I am not totally new with measure theory, since I have taken and past one course at the graduate level. Unfortunately, because the lecturer was not so good at teaching, I followed the course by self-study. Now I feel that all the knowledge has gone after the exam and still don’t have a clear overview on the structure of measure theory. And here come my specified requirements for a reference book.   I wish the book elaborates the proofs, since I will read it on my own again, sadly. And this is the most important criterion for the book. I wish the book covers most of the topics in measure theory. Although the topic of my thesis is on stochastic integration, I do want to review measure theory at a more general level, which means it could emphasize on both aspects of analysis and probability. If such a condition cannot be achieved, I'd like to more focus on probability. I wish the book could deal with convergences and uniform integrability carefully, as Chung’s probability book.    My expectation is after thorough reading, I could have strong background to start a thesis on stochastic integration at an analytic level.  Sorry for such a tedious question.  P.S: the textbook I used is Schilling’s book: measures, integrals and martingales. It is a pretty good textbook, but misprints really ruin the fun of reading. Obtain user and kernel time of a running process? Is there way to determine using standard Linux/Unix tools how much a process has spent in User mode and how much waiting for kernel?  In other words, exactly the "user" and "sys" values that you get when using time, but during process runtime?  NOTE: one way is to use WBEM and enumerate Linux_UnixProcess, but I need to use other tool than this; my aim is to verify what WBEM provider tells me, i.e. I need to use different tool. As the title suggests, I have some kit which is 200m from our current infrastructure (outdoors).  What is the cheapest way to establish a reliable connection across a 200m stretch (Cat 5e ethernet only works up to about 100m from our tests)? In Data Extension one field 'HTML' have Data that I have shown below, Now I have to Find the 'Href', and and at the last of URL append some text like '&amp;MC='. It may have Multiple 'Href'. Please help me on this.   &lt;table width="540" style="margin: 0px; padding: 0px;" bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="0"&gt;  &lt;tbody&gt;   &lt;tr&gt;    &lt;td valign="top"&gt;    &lt;h5 style="margin: 0px; padding: 0px 0px 2px; line-height: normal; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, Verdana, Arial, Helvetica, sans-serif; font-size: 16px; font-weight: normal;"&gt;    &lt;a style="text-decoration: none;" href="https://test.4.com/testRegistration/testLobbyServlet?target=reg20.jsp&amp;eventid=897605&amp;sessionid=1&amp;key=2F3D1EB963D9DB7738BF2877DFFDBA01&amp;partnerref=Social&amp;sourcepage=register&amp;loc=zOTlocz&amp;prod=zWAz&amp;tech=zsecz&amp;prog=zOTprogz&amp;type=zOTtypez&amp;media=zWCz&amp;country=zUSz" alias="Success with Enterprise Mobility: Making email and Office 365 secure on mobile devices"&gt;    Success with Enterprise Mobility: Making email and Office 365 secure on mobile devices     &lt;/a&gt;    &lt;/h5&gt;    &lt;p style="margin: 0px; padding: 0px; line-height: 20px; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal;"&gt;    &lt;span style="color: rgb(103, 103, 103);"&gt;    &lt;em&gt;December 9, 2014, 10:30 A.M.&amp;ndash;11:30 A.M. Pacific Time&lt;/em&gt;&lt;br&gt;    An enterprise mobility strategy involves identity, management, and productivity. In this session featuring Brad Anderson, you will learn about the integration and the Office mobile apps while enabling secure mobile productivity.    &lt;/span&gt;    &lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td valign="top"&gt;&amp;nbsp;    &lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td valign="top"&gt;    &lt;h5 style="margin: 0px; padding: 0px 0px 2px; line-height: normal; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, Verdana, Arial, Helvetica, sans-serif; font-size: 16px; font-weight: normal;"&gt;    &lt;a style="text-decoration: none;" href="http://test.TTr.com/?Wt.mc_id=IG15W2NWTN&amp;loc=zOTlocz&amp;prod=zWAz&amp;prod=zWSz&amp;tech=zCLz&amp;prog=zOTprogz&amp;type=zEVz&amp;media=zOTmediaz&amp;country=zUSz" alias="Test: Everything about enterprise technology under one roof"&gt;    Test: Everything about enterprise technology under one roof    &lt;/a&gt;    &lt;/h5&gt;    &lt;p style="margin: 0px; padding: 0px; line-height: 20px; font-family: &amp;quot;Segoe UI&amp;quot;, &amp;quot;Lucida Grande&amp;quot;, Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal;"&gt;    &lt;span style="color: rgb(103, 103, 103);"&gt;    &lt;em&gt;May 4&amp;ndash;8, 2015, Chicago, IL&lt;/em&gt;&lt;br&gt;    If you&amp;rsquo;re serious about technology, you don&amp;rsquo;t want to miss Test. This event will be the intersection of everything in enterprise technology. Get ahead in your job and your career.    &lt;/span&gt;    &lt;/p&gt;    &lt;/td&gt;   &lt;/tr&gt;  &lt;/tbody&gt; &lt;/table&gt; I am trying to automate these steps so that I don't need to do this on every machines manually. I need to install latest app server software (abc.tar.gz) on all the unix boxes.  I need to do this in around 12 machines - "machine1" ... "machine12". I have a master machine "machine0" which has abc.tar.gz file so I was thinking to run my script from this machine only and install abc.tar.gz software by following below steps in all those 12 machines one by one. My unix account id is david and my process runs as golden user.  This is the steps I follow if I am installing abc.tar.gz in "machine1":  david@machine1:~$ sudo scp david@machine0:/home/david/abc.tar.gz . david@machine1:~$ sudo stop test_server david@machine1:~$ sudo su - golden golden@machine1:~$ cd /opt/process golden@machine1:/opt/process$ rm -rf * golden@machine1:/opt/process$ exit david@machine1:~$ sudo cp abc.tar.gz /opt/process david@machine1:~$ sudo chown -R golden /opt/process david@machine1:~$ sudo su - golden golden@machine1:~$ cd /opt/process golden@machine1:/opt/process$ tar -xvzf abc.tar.gz golden@machine1:/opt/process$ exit david@machine1:~$ sudo start test_server   How can I automate this so that it can do the same steps in all 12 machines one bye one? I mean install abc.tar.gz in machine1 first, then install on machine2 and go on..  I want to run this script from machine0 only.  Is there any way to automate this? Intuitive reason why the Fisher Information of Binomial is inversely proportional to $p(1-p)$ It confuses/blows my mind that the Binomial has variance proportional to $p(1-p)$. Equivalently, the Fisher information is proportional to $\frac{1}{p(1-p)}$. What is the reason for this? Why is the Fisher Information minimized at $p=0.5$? That is, why is inference most difficult at $p=0.5$?  Context:  I'm working on a sample size calculator, and the formula for $N$, the sample size needed, is an increasing factor of $p(1-p)$, the result of a variance estimation in the derivation. `http_proxy` not showing up with `printenv` on WSL I am having trouble getting pip to work behind a corporate firewall. I added the http and https proxies to my /etc/environment file, and if I execute echo "$HTTP_PROXY" it prints the right thing. However, if I execute env or printenv none of the proxy variables show up. I think this is why pip is failing too. Any insight would be appreciated. My /etc/environment file looks like  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" http_proxy="http://&lt;stuff&gt;.&lt;stuff&gt;.org:80" HTTP_PROXY="http://&lt;stuff&gt;.&lt;stuff&gt;.org:80" https_proxy="https://&lt;stuff&gt;.&lt;stuff&gt;.org:443" HTTPS_PROXY="https://&lt;stuff&gt;.&lt;stuff&gt;.org:443"   And I added the same lines to my ~/.bashrc file as well. hard disks spin up by processes / applications that simply get a list of disks? How to prevent? I have a 24/7 always-on Debian Jessie based headless home server that has a large 1TB SSD for the OS and all of my frequently accessed files. This same system has 4 larger hard disk drives in a SnapRAID array. These are mainly for archiving infrequently accessed Blu-rays and want those drives to remain spun down in standby unless I actually read or write to them. They are all formatted as ext4 and mounted with noatime and nodiratime enabled.  So even though no process or program should be regularly accessing those drives in any direct way, the hard drives constantly get spun up from standby. It seems to be related to graphical programs that provide a gui file browser, even something like Chromium. If I don't even browse into those drives, I'm thinking that these processes by simply getting a list of available drives spins up the hard disks. Much like blkid does. The problem is, it's hard to determine the root cause of this since none of these processes are actually reading or writing the filesystem on those drives, so no files are actually changing or being touched. Is there some sort of cache that I can populate or a buffer to prevent these programs from spinning up the hard drive simply by getting a list of available disks? This is honestly driving me insane, since I can't find a reliably way to keep these disks spun-down even though there is no direct access of the filesystem.  UPDATE: Thanks to Stephen's answer, I was able to trace the disk activity to gvfs and udisks. It's a real shame that these processes insist on waking up disks in standby when they aren't actually being accessed to do any real I/O with the filesystem. So far I just uninstalled them, knowing that it will remove some functionality from PCManFM and the like. Background: This question relates to versions of Delphi below 2009 (ie without Unicode support built in). I have a specification that requires me to transmit a Unicode encoded string over a TCP connection but I do not have Delphi 2009.   Question Is there a single function or very small library (I don't need too much bulk) that I can use to encode a single string into UTF-8 immediately prior sending over the wire? As a second part of my question: if there are UTF-8 encoded strings being sent back as a response, I guess I would then need another function to get it back into a Delphi string format. I understand the limitations of such Unicode support in this way. Ephemeral error message: "cryptsetup: unknown fstype, bad password or options?" I'm looking to schedule 16 players to play a round robin tournament with each other such that there are 4 players at each table.  I'd like for each player to play with each other player exactly once over the course of 5 rounds.  I just took a look at this post:  , and I was wondering if anyone knows if the case n=m=4 has been solved, and if so what that solution is.