I'm new to programming world and i'm studying about pointers and array. and i read this code on a website. what does this line of mean?   int(*ptr)[10];   Is it a pointer or an array of size 10?
I have heard of some methods, but none of them have stuck. Personally I try to avoid complex types in C and try to break them into component typedef.  I'm now faced with maintaining some legacy code from a so called 'three star programmer', and I'm having a hard time reading some of the ***code[][].  How do you read complex C declarations?
Under what conditions does loot despawn? I have found that when my bags get full and I need to vendor loot I can sometimes leave loot on the ground and return to it.  Other times it seems to disappear almost instantly once I leave the area.  Is the loot despawn time based, based on my distance from the dropped loot, or some other factor(s)? How to capture ordered STDOUT/STDERR and add timestamp/prefixes? Line integration in complex analysis Finding an angle within an 80-80-20 isosceles triangle The following is a geometry puzzle from a math school book. Even though it has been a long time since I finished school, I remember this puzzle quite well, and I don't have a nice solution to it.  So here is the puzzle:    The triangle $ABC$ is known to be isosceles, that is, $AC=BC$. The labelled angles are known to be $\alpha=\gamma=20°$, $\beta=30°$. The task is to find the angle labelled "?".  The only solution that I know of is to use the sine formula and cosine formula several times. From this one can obtain a numerical solution. Moreover this number can be algebraically shown to be correct (all sines and cosines are contained in the real subfield of the 36th cyclotomic field). So in this sense I solved the problem, but the solution is kind of a brute force attack (for example, some of the polynomials that show up in the computation have coefficients > 1000000). Since the puzzle originates from a book that deals only with elemetary geometry (and not even trigonometry if I remember correctly) there has to be a more elegant solution. I am using a linux server which has 128GB of memory and 24 cores. I use top to see how much it is used. Its output is pasted at the end of the post. Here are two questions:  (1) I see that each of the running processes occupies a very small percentage of memory (%MEM no more than 0.2%, and most just 0.0%), but how the total memory is almost used as in the fourth line of output ("Mem:  130766620k total, 130161072k used,   605548k free,   919300k buffers")? The sum of used percentage of memory over all processes seems unlikely to achieve almost 100%, doesn't it?  (2) how to understand the load average on the first line ("load average: 14.04, 14.02, 14.00")?   Thanks and regards!  Edit:  Thanks!  I also really like to hear some rough numbers based on used percentage of memory to determine if a server is heavily loaded, since I once became the one who cramed the server without understanding the current load.  Is swap regarded as almost the same as memory? For example, when memory and swap are almost of same size, if the memory is almost running out but the swap is still largely free, may I just view it as if the used percentage of memory + swap is still not high and run other new processes?  How would you consider together CPU or memory (or memory + swap) usage? Do you become worried if either of them reaches too high or both?  Output of top：  $ top    top - 12:45:33 up 19 days, 23:11, 18 users,  load average: 14.04, 14.02, 14.00 Tasks: 484 total,  12 running, 472 sleeping,   0 stopped,   0 zombie Cpu(s): 36.7%us, 19.7%sy,  0.0%ni, 43.6%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st Mem:  130766620k total, 130161072k used,   605548k free,   919300k buffers Swap: 63111312k total,   500556k used, 62610756k free, 124437752k cached    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND  6529 sanchez   18  -2 1075m 219m  13m S  100  0.2  13760:23 MATLAB 13210 timothy   18  -2 48336  37m 1216 R  100  0.0   3:56.75 absurdity 13888 timothy   18  -2 48336  37m 1204 R  100  0.0   2:04.89 absurdity 14542 timothy   18  -2 48336  37m 1196 R  100  0.0   1:08.34 absurdity 14544 timothy   18  -2  2888 2076  400 R  100  0.0   1:06.14 gatherData  6183 sanchez   18  -2 1133m 195m  13m S  100  0.2  13676:04 MATLAB  6795 sanchez   18  -2 1079m 210m  13m S  100  0.2  13734:26 MATLAB 10178 timothy   18  -2 48336  37m 1204 R  100  0.0  11:33.93 absurdity  12438 timothy   18  -2 48336  37m 1216 R  100  0.0   5:38.17 absurdity 13661 timothy   18  -2 48336  37m 1216 R  100  0.0   2:44.13 absurdity 14098 timothy   18  -2 48336  37m 1204 R  100  0.0   1:58.31 absurdity 14335 timothy   18  -2 48336  37m 1196 R  100  0.0   1:08.93 absurdity 14765 timothy   18  -2 48336  37m 1196 R   99  0.0   0:32.57 absurdity 13445 timothy   18  -2 48336  37m 1216 R   99  0.0   3:01.37 absurdity 28990 root      20   0     0    0    0 S    2  0.0  65:50.21 pdflush 12141 tim       18  -2 19380 1660 1024 R    1  0.0   0:04.04 top  1240 root      15  -5     0    0    0 S    0  0.0  16:07.11 kjournald  9019 root      20   0  296m 4460 2616 S    0  0.0  82:19.51 kdm_greet     1 root      20   0  4028  728  592 S    0  0.0   0:03.11 init     2 root      15  -5     0    0    0 S    0  0.0   0:00.00 kthreadd     3 root      RT  -5     0    0    0 S    0  0.0   0:01.01 migration/0     4 root      15  -5     0    0    0 S    0  0.0   0:08.13 ksoftirqd/0     5 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/0     6 root      RT  -5     0    0    0 S    0  0.0  17:27.31 migration/1     7 root      15  -5     0    0    0 S    0  0.0   0:01.21 ksoftirqd/1     8 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/1     9 root      RT  -5     0    0    0 S    0  0.0  10:02.56 migration/2    10 root      15  -5     0    0    0 S    0  0.0   0:00.34 ksoftirqd/2    11 root      RT  -5     0    0    0 S    0  0.0   0:00.00 watchdog/2    12 root      RT  -5     0    0    0 S    0  0.0   4:29.53 migration/3    13 root      15  -5     0    0    0 S    0  0.0   0:00.34 ksoftirqd/3 How to return multiple objects from a Java method? Can I use Google Maps as a layer in ArcMap?  Is it possible? How to set up USB for Virtualbox? What would make a question popular with high views? I was wondering what might be making my questions less attractive to users?  I get very low views most of the time. What should be done to increase a question's popularity? I'm trying to recover a Windows system from backups and can't seem to find where Chrome saves its bookmarks.   Does anybody know where Chrome saves its bookmarks on Windows? can CakePHP automatically create tables from models? "[somebody]'s theme" vs "[somebody] theme" — Saxon genitive dillema When is it required to use 's in phrases like below (examples taken from Wikipedia)?   James Bond theme 007 theme Boba Fett motif Droids motif Yoda's theme ...   Are there any rules for eliding Saxon genitive?  How does the situation change if we have something instead of somebody? Explain why $E(X) = \int_0^\infty (1-F_X (t)) \, dt$ for every nonnegative random variable $X$ Let $X$ be a non-negative random variable and $F_{X}$ the corresponding CDF. Show,   $$E(X) = \int_0^\infty (1-F_X (t)) \, dt$$   when $X$ has : a) a discrete distribution, b) a continuous distribution.   I assumed that for the case of a continuous distribution, since $F_X (t) = \mathbb{P}(X\leq t)$, then $1-F_X (t) = 1- \mathbb{P}(X\leq t) = \mathbb{P}(X&gt;  t)$. Although how useful integrating that is, I really have no idea. Subsetting a 2D numpy array Trying to attach a file from SD Card to email I am trying to launch an Intent to send an email. All of that works, but when I try to actually send the email a couple 'weird' things happen.  here is code   Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.setType("image/jpeg"); sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Photo"); sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://sdcard/dcim/Camera/filename.jpg")); sendIntent.putExtra(Intent.EXTRA_TEXT, "Enjoy the photo"); startActivity(Intent.createChooser(sendIntent, "Email:"));   So if I launch using the Gmail menu context It shows the attachment, lets me type who the email is to, and edit the body &amp; subject. No big deal. I hit send, and it sends. The only thing is the attachment does NOT get sent.  So. I figured, why not try it w/ the Email menu context (for my backup email account on my phone). It shows the attachment, but no text at all in the body or subject. When I send it, the attachment sends correctly. That would lead me to believe something is quite wrong. Do I need a new permission in the Manifest launch an intent to send email w/ attachment? What am I doing wrong? Sed - unknown option to `s' When $f(x+1)-f(x)=f'(x)$, what are the solutions for $f(x)$? The question is:     When $f(x+1)-f(x)=f'(x)$, what are the solutions for $f(x)$?   The most obvious solution is a linear function of the form $f(x)=ax+b$. Is this the only solution?  Edit  I should add that $f:\mathbb R\to\mathbb R$ to the question. Is there a way to make a fullscreen on VirtualBox? I tried many ways to make a bigger screen in VirtualBox because I do not like the small size of the guest window? Is there is a way to make it big? I hava Lenovo g580 laptop. I want to change disk to SSD drive, but I'm not sure if my laptop support SATA 3 (6Gbps).  I write following output:  dmesg | grep SATA [    3.190743] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x5 impl SATA mode [    3.199450] ata1: SATA max UDMA/133 abar m2048@0xd3617000 port 0xd3617100 irq 43 [    3.199455] ata3: SATA max UDMA/133 abar m2048@0xd3617000 port 0xd3617200 irq 43 [    3.518365] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl 300) [    3.857921] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)   Is that means I Can use SSD disk in SATAa 6Gbps mode? How to check if a process is running via a batch script