Show $E(X)= \int_{[0, \infty)} P[X>t] dt$, without using density argument
Show that $E(X)=\int_{0}^{\infty}P(X\ge x)\,dx$ for non-negative random variable $X$
What is a "static" function in C? The question was about plain  functions, not  static methods, as clarified in comments.  I understand what a static variable is, but what is a static function?  And why is it that if I declare a function, let's say void print_matrix, in let's say a.c (WITHOUT a.h) and include "a.c" -  I get "print_matrix@@....) already defined in a.obj", BUT if I declare it as static void print_matrix then it compiles?  UPDATE Just to clear things up - I know that including .c is bad, as many of you pointed out. I just do it to temporarily clear space in main.c until I have a better idea of how to group all those functions into proper .h and .c files. Just a temporary, quick solution. Execute command from file in current shell I want to executed command from file (which is script) in current shell in terminal.  Example: I have file ch_dir contains following:  #!/bin/bash cd /usr   Now if I execute file usually as following then it executes commands in different shell:  pandya@pandya-desktop:~$ ./ch_dir pandya@pandya-desktop:~$   Here cd /user is executed in different shell.  But I want to execute in Current shell. How do I do that?  Note: Here cd is only used to explain. Question's aim is to execute any command in current shell It often occurs to me to add an edit summary to a question-edit immediately after submitting the edit, especially if the changes aren't obvious (formatting etc.). So I:   Click "edit" again. Fill in the summary Click on "Save Edits".   The 'edit' (no actual change has been made to the title/body/tags)  is accepted, but the summary doesn't show up, i.e. it is silently rejected.   I don't think it should work this way because the summary has been added by the original editor within the original edit's edit-window. In fact if I remember correctly, it to used to work as expected earlier; so perhaps this is a recent change. match first column of file a with paragraphs of file b I have 2 files. The first, fileA looks like  TCONS_00000066  XLOC_000030     -       u       q1:XLOC_000030|TCONS_00000066|0|0.000000|0.000000|0.000000|0.000000|- TCONS_00000130  XLOC_000057     -       u       q1:XLOC_000057|TCONS_00000130|0|0.000000|0.000000|0.000000|0.000000|- TCONS_00000395  XLOC_000206     -       u       q1:XLOC_000204|TCONS_00000393|0|0.000000|0.000000|0.000000|0.000000|-   FileB looks like:  &gt;TCONS_00000001 gene=XLOC_000001 AGATGAGCTGGTGGGGATGCTCTAAGAGAACGAGAGAAGCACAGAGCAGATAAACCACACCCACAGGCAC CACCGTCCTTGTTGGTAATGAAGAAGACGAGACGACGACTTCCCCACTAGGAAACACGACGGAGGCGGAG ATGATCGACGGCGGAGAGAGCTACAGAAACATCGATGCCTCCTGTCCAATCCCCCCATCCCATTCGGTAG TTGGATTGAAGACTACCGAATAAGAGAAGCAGGCAGGCAGACAAACCCTTGAACCAAGGAGTCCTCGCTG AGGAAGCTTTGGATCCACGACGCAGCTATGGCCTCCCCGCCCACCAGGCCGCCAGCCACAACCAGCTGAC TAGGTCGCATGCATCATCAGATTTCAATCTCCCTTCGTTCCCTGTCCCTAATCCAATACCAATAGGGAGC AATCAGCTGCTCCTCGACGGCGAGGGAGATGTCGTCGGCCGCGGGCCAAGACAACGGAGATACCGCTGGG GACTACATCAAGTGGATGTGCGGCGCCGGTGGCCGTGCGGGCGGCGCCATGGCCAACCTCCAGCGCGGCG TTGGCTCCCTCGTCCGTGACATTGGCGACCCCTGCCTCAACCCATCCCCCGTTAAGGGGAGCAAAATGCT CAAACCGGAAAAATGGCACACATGTTTTGATAATGATGGAAAGGTCATAGGTTTCCGTAAAGCCCTAAAA TTCATTGTCTTAGGGGGTGTGGATCCCACTATTCGAGCTGAAGTTTGGGAATTTCTTCTTGGCTGCTATG CCTTGAGTAGTACCTCAGAGTATAGGAGGAAACTAAGAGCTGTTAGAAGGGAAAAATATCAAATTTTAGT TAGACAGTGCCAGAGCATGCACCCAAGCATTGGTACAGGTGAGCTTGCTTACGCTGTTGGATCAAAGCTA   Now, fileA contains selected transcript numbers in the first column and fileB contains sequences of all transcripts. I want to scan fileB for the first column of fileA and print the trailing sequences of matching transcripts along with the transcript number. Extract data from a file and place in different files based on one column value We will generate a csv file with below values  yp1234,577,1,3 yp5678,577,3,5 yp9012,132,8,9   I need to extract data and create files based on second column. If it's 577 then the whole line has to be extracted and placed in a separate file. I mean I need a file having lines with second column as 577 alone and another file with second column as 132 alone  I tried using IF but didn't work Scorched3d worked then stopped. Unistalled and reinstalled did not help. Running Ubuntu 16.04.04LTS. I think it was after installing new release.  I think the problem is the Ubuntu 16.04.4LTS. The newer version has no Scorched3d in the Ubuntu Software Center. I have 3 systems. After updating to new version. Scorched3D will not install and work after updating.  ron@RonsComputer:~$ sudo objdump -p $(type -p scorched3d) | grep NEEDED  NEEDED libwx_gtk2u_adv-3.0.so.0  NEEDED libwx_gtk2u_core-3.0.so.0 NEEDED libwx_baseu-3.0.so.0 NEEDED libfreetype.so.6 NEEDED libz.so.1 NEEDED libSDL-1.2.so.0 NEEDED libSDL_net-1.2.so.0 NEEDED libexpat.so.1  NEEDED libstdc++.so.6 NEEDED libm.so.6 NEEDED libgcc_s.so.1 NEEDED libpthread.so.0 NEEDED libc.so.6   ron@ron-desktop ~ $ objdump -p $(type -p scorched3d) | grep NEEDED | awk '{print $2}' | xargs -n 1 dpkg -S  libwxgtk3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_adv-3.0.so.0.2.0 libwxgtk3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_adv-3.0.so.0 libwxgtk3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0.2.0 libwxgtk3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0 libwxbase3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0.2.0 libwxbase3.0-0v5:amd64: /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0 libfreetype6:amd64: /usr/lib/x86_64-linux-gnu/libfreetype.so.6.12.1 libfreetype6:i386: /usr/lib/i386-linux-gnu/libfreetype.so.6 libfreetype6:amd64: /usr/lib/x86_64-linux-gnu/libfreetype.so.6 libfreetype6:i386: /usr/lib/i386-linux-gnu/libfreetype.so.6.12.1 zlib1g:i386: /lib/i386-linux-gnu/libz.so.1.2.8 zlib1g:amd64: /lib/x86_64-linux-gnu/libz.so.1 zlib1g:i386: /lib/i386-linux-gnu/libz.so.1 zlib1g:amd64: /lib/x86_64-linux-gnu/libz.so.1.2.8 libsdl1.2debian:amd64: /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0.11.4 libsdl1.2debian:i386: /usr/lib/i386-linux-gnu/libSDL-1.2.so.0 libsdl1.2debian:i386: /usr/lib/i386-linux-gnu/libSDL-1.2.so.0.11.4 libsdl1.2debian:amd64: /usr/lib/x86_64-linux-gnu/libSDL-1.2.so.0 libsdl-net1.2:amd64: /usr/lib/x86_64-linux-gnu/libSDL_net-1.2.so.0 libsdl-net1.2:i386: /usr/lib/i386-linux-gnu/libSDL_net-1.2.so.0 libsdl-net1.2:amd64: /usr/lib/x86_64-linux-gnu/libSDL_net-1.2.so.0.8.0 libsdl-net1.2:i386: /usr/lib/i386-linux-gnu/libSDL_net-1.2.so.0.8.0 libexpat1:i386: /lib/i386-linux-gnu/libexpat.so.1.6.0 libexpat1:amd64: /lib/x86_64-linux-gnu/libexpat.so.1 libexpat1:amd64: /lib/x86_64-linux-gnu/libexpat.so.1.6.0 libexpat1:i386: /lib/i386-linux-gnu/libexpat.so.1 libstdc++6:amd64: /usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21-gdb.py libstdc++6:i386: /usr/lib/i386-linux-gnu/libstdc++.so.6 libstdc++6:amd64: /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++6:amd64: /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.21 libstdc++6:i386: /usr/lib/i386-linux-gnu/libstdc++.so.6.0.21 libstdc++6:i386: /usr/share/gdb/auto-load/usr/lib/i386-linux-gnu/libstdc++.so.6.0.21-gdb.py libc6:amd64: /lib/x86_64-linux-gnu/libm.so.6 libc6:i386: /lib/i386-linux-gnu/libm.so.6 libgcc1:amd64: /lib/x86_64-linux-gnu/libgcc_s.so.1 libgcc1:i386: /lib/i386-linux-gnu/libgcc_s.so.1 libc6:i386: /lib/i386-linux-gnu/libpthread.so.0 libc6:amd64: /lib/x86_64-linux-gnu/libpthread.so.0 libc6:i386: /lib/i386-linux-gnu/libc.so.6 libc6:amd64: /lib/x86_64-linux-gnu/libc.so.6 ron@ron-desktop ~ $ My problem is that I have only one reference. So I would like the head of this part to appear "Reference" instead of commonly "References". More generally, could we change the title "References" to an arbitrary name?  Thank you very much for your help! Can you make a bonus-action attack from Two-Weapon Fighting before you take your action? Why can I modify a read-only file? Short Question:  Why can we manipulate a read-only file in Vim using : + w + q + ! even without being an administrator?  Long Question:  I have a text file (myFile.txt) which is read-only for everyone:  navid@navid-ThinkPad-T530:~/ubuntuTest$ ls -l myFile.txt  -r--r--r-- 1 navid navid 26 Aug 22 21:21 myFile.txt   I can open it with Vim without having admin privileges:  navid@navid-ThinkPad-T530:~/ubuntuTest$ vi myFile.txt    I modify it and press: Esc + : + w + q + Enter and I see this error message:  E45: 'readonly' option is set (add ! to override)   So far, everything makes sense.  But when I press: Esc + : + w + q + ! + Enter, Vim saves the changes.  I'm using Ubuntu 16.04 and VIM 7.4. Is there an easy way to delete an element from an array using PHP, such that foreach ($array) no longer includes that element?  I thought that setting it to null would do it, but apparently it does not work. How can DMs effectively telegraph specific dangers in D&D? There are some play-styles of D&amp;D in which the spectre of player-character death is considered a feature of the game rather than a bug. For my own reasons (which aren't the point of the question), I see them as a feature especially in exploration-focused games (e.g., sandboxes, old-school dungeon-crawling) where there are lots of ways for players to arm themselves with enough information to make informed decisions about the dangers they're willing to tackle.  Even with players that play strategically, seeking that intel and using it to pick their battles strategically, it is still on the DM's shoulders to provide good clues and tell-tales during play. How well the DM does this will significantly impact the players' ability to make informed decisions on where to go, how to prepare, what to fight, and what to avoid. If the players don't catch the clues, it should be because they weren't paying attention or didn't put 2 and 2 together, not because the DM's descriptions suck.  What techniques can the DM use to effectively telegraph to the players the existence and/or nature of the dangers they face?  These assumptions are inherent in the question:   The players are already playing strategically, and don't need to be "trained" in this play-style. Senseless, random PC death is a real possibility, not just threat to set the tone of the game or generate fearfulness in the players. Characters almost always die when players put them in dangerous situations they're not prepared to deal with. Characters might live when players are observant, know what dangers to expect, are well-prepared, and don't take on dangers that are beyond their ability—and even then, the dice have to go in their favour. Knowledge is the edge they need to bend the odds in their favour. The players don't necessarily have access to stat blocks or other, out-of-game information on in-game dangers. Players are relying on the DM's descriptions to understand the world, including its dangers and rewards.   (This isn't an invitation to argue whether an exploration, frequent-PC-death play-style is good or not. That's just background to the question.)   Related: Have red shifted photons lost energy and where did it go? I think the title says it. Did expansion of the universe steal the energy somehow? What are Covering Indexes and Covered Queries in SQL Server? Can you explain the concepts of, and relationship between, Covering Indexes and Covered Queries in Microsoft's SQL Server? Modular arithmetic: division, fractions, solving linear congruences I want to ask a question about modular arithmetic. I know, that modular multiplicative inverse exists only if modulo and integer are relatively prime. I want to know, are there any ways of division in modular arithmetic, if modulo and integer aren't relatively prime? I tried to find info about that, but failed. Disable StringBuilder optimisation in javac Prove that $a^2 + b^2 \geq 8$ if $ x^4 + ax^3 + 2x^2 + bx + 1 = 0 $ has at least one real root. If it is known that the equation $$ x^4 + ax^3 + 2x^2 + bx + 1 = 0 $$ has a (real) root, prove the inequality $$ a^2 + b^2 \geq 8. $$  I am stuck on this problem, though, it is a very easy problem for my math teacher. Anyway, I can't figure out. Why can't I install iOS 9.3? I saw an update for my iOS 9.2.1 device to iOS 9.3.  However, it said that the update cannot be verified, although it was downloaded.  I even deleted all data and applications from the device, but I still cannot update the device to 9.3; it just says "Your software is up to date" on iOS 9.2.1.  Can you force an update to 9.3? Prevent Adobe Reader from switching to "Fit Page" zoom when bookmark is clicked Calling Python in PHP I have a Python script I recently wrote that I call using the command line with some options. I now want a very thin web interface to call this script locally on my Mac.  I don't want to go through the minor trouble of installing mod_python or mod_wsgi on my Mac, so I was just going to do a system() or popen() from PHP to call the Python script.  Any better ideas? Thanks in advance! I believe in Windows Vista, we could use linkd command. However, I cannot find this command in Windows 7. I know I can use Windows Explorer and delete the junction, but I wonder if this can be done in Command Prompt.  I can use mklink command to create a junction from a Command Prompt, so, what is the opposite of it (something like linkd)?