Where to use volatile? I read about volatile keyword, but I don't know in what situations I should use it.  When the memory (variable) is getting updated and process is not aware of that?  In what cases should drivers use volatile variables?
Why is volatile needed in C? Why is volatile needed in C? What is it used for? What will it do?
First off I did try the power options setting and it's on 'Never' but that did nothing. The drive still spins down after 15-20 seconds of not being used. I need it to spin all the time because it's more efficient with my way of using it. Also listening to music from that drive is absolutely destroying the drive making it spin up and down all the time causing immense wear and tear. Any ideas on how to stop it from spinning down? Please don't suggest bat files that keep creating editing a file.  &nbsp;  Oh and here is the model of the drive: wdc wd10jpvx-22jc3t0 and my OS is Windows 10 64 bit. show that if $n\geq1$, $(1+{1\over n})^n<(1+{1\over n+1})^{n+1}$ The statement is:     In a commutative ring with 1, every proper ideal is contained in a maximal ideal.   and we prove it using Zorn's lemma, that is, $I$ is an ideal, $P=\{I\subset  A\mid A\text{ is an ideal}\} $, then by set inclusion, every totally ordered subset has a bound, then $P$ has a maximal element $M$.  My question is why $M$ must contain $I$? I am running Ubuntu 14.04 and Notepad++ 6.6.4 (through WINE)  Under the 'Run' tab, I clicked on "Launch in Firefox" , but nothing happened   I uninstalled Notepad++ and WINE, then shutdown. I re-installed Notepad++ and WINE and still have the same problem.   Does anyone know what the problem is? Do not enumerate a section, but add it into table of contents How do I rid of number of a section in the way that it still would be in the table of contents.  If I use   ... \section{SN1} ...   then I see this section name in table of contents as   1 SN1  2 SN2  3 SN3  ...   If I use   \section*{SN}   I don't see it in the content:   1 SN2  2 SN3   How to get in content just   SN1  1 SN2  2 SN3   ? How symbol lookup actually works Deleting multiple elements from a list C# LINQ find duplicates in List Piping for loop output prevents local variable modification I'm trying to write a simple bash function that takes, as its arguments, a number of files and/or directories. It should:   Fully qualify the filenames. Sort them. Remove duplicates. Print all that actually exist. Return the number of non-existent files.   I have a script that almost does what I want, but falls down on the sorting. The return value of the script as it stands is correct, but the output is not (unsorted and duplicates). If I uncomment the | sort -u statement as indicated, the output is correct but the return value is always 0.  N.B. Simpler solutions to solve the problem are welcome but the question is really about why is this occurring in the code I have. That is, why does adding the pipe seemingly stop the script incrementing the variable r?  Here's the script:  function uniqfile {     local r=0       for arg in "$@"     do           readlink -e "$arg" || (( ++r ))      done #| sort -u    ## remove that comment      return $r } Creating Workflow -> Error How to move from screen 1 to screen 3 by moving cursor to the left and vice versa? If I have to move the mouse from the left screen all the way to the right screen, the distance is quite big.   Is there a way to virtually connect the sides of the screen as if they were arranged in a circle? I could then move from the left screen to the right screen, by simply moving the cursor to the left. Unitl now I haven't found the option to enable the curved representation of connectors between nodes. The  doesn't mention such an  option. Is there a keyboard shortcut? Clone internal HDD to new SSD I recently installed an SSD into my machine. The machine itself is a Lenovo thinkpad W520, and it previously had an internal HDD. I moved the internal HDD into an expansion bay (replacing the CD-ROM), and put the new SSD into the internal bay.   The problem I'm having is that I have my Ubuntu configuration EXACTLY the way I want it - I originally spent many hours configuring it to get it to the way it is now. I'd rather not do this again. But, I'd also like the boot-up gains I would get from the OS being on the SSD.  So, what I'd like to do is clone my Ubuntu partition onto the SSD. The catch is that the standard HDD is significantly bigger than the SSD. And it has a windows partition that I don't need on the SSD (I never use Windows, so if it boots off of the other hard drive, that's fine). The layout of my hard drives are as follows:  /dev/sda (SSD):     Model: ATA M4-CT256M4SSD2 (scsi)     Disk /dev/sda: 256GB     Sector size (logical/physical): 512B/512B     Partition Table: msdos  Number  Start   End    Size   Type     File system  Flags  1      1049kB  147GB  147GB  primary  ext4         boot   /dev/sdb (HDD): Model: ATA ST9500420AS (scsi) Disk /dev/sdb: 500GB Sector size (logical/physical): 512B/512B Partition Table: msdos  Number  Start   End     Size    Type      File system     Flags  1      1049kB  1259MB  1258MB  primary   ntfs            boot  2      1259MB  269GB   268GB   primary   ntfs  4      269GB   483GB   214GB   extended  5      269GB   416GB   147GB   logical   ext4  7      416GB   475GB   58.9GB  logical   linux-swap(v1)  6      475GB   483GB   8470MB  logical  3      483GB   500GB   16.8GB  primary   ntfs   What I've tried so far:  1) Resizing the partitions /dev/sdb5 and /dev/sda1 to be the same size. 2) Booting into Ubuntu 11.04 (from /dev/sdb5) and running dd if=/dev/sdb5 of=/dev/sda1 (of course this causes problems with booting, so I had to reinstall grub.. I can get it to boot, but then I have problems with initrd not finding some files ... presumably it can't load some partitions I think).  Now, I think those two steps are the wrong approach, because it will clone /dev/sdb5 EXACTLY - including references in fstab which point to the wrong hard drive. I'm not sure exactly how to rectify this. I could install Ubuntu 11.04 onto the SSD, then try and copy over all of my configurations, but I'm concerned that I'm going to lose something, or that I'm going to overwrite something like fstab that points back to the original hard drive.   Note that currently, I can still boot from the HDD, so it's not imperative that I get this figured out right away, but I do want it to be exactly how it is right now, so that I can maintain my current level of productivity (it's a work laptop).  Suggestions on how I might be able to overcome this difficulty?   Thanks in advance! Almost all passports I have seen have a place of birth field on them. For instance, on the US Passport,    Is there a specific reason to this? Is StringBuilder really faster than Aggreggate? What is the pythonic way to avoid default parameters that are empty lists? Sometimes it seems natural to have a default parameter which is an empty list. Yet . If for example, I have a function: def my_func(working_list=[]):     working_list.append(&quot;a&quot;)     print(working_list)  The first time it is called the default will work, but calls after that will update the existing list (with one &quot;a&quot; each call) and print the updated version. So, what is the pythonic way to get the behavior I desire (a fresh list on each call)? I'd like to understand  and its contents as to what it implies in a bit simpler terms. I am familiar with mathematics unto Calculus 1,2,3 and some linear algebra and group theory. I am familiar with that for each symmetry there is a conservation law.    Now is there a one-one correspondence between these two always? What about laws like conservation of charge?  And conservation of energy?  And conservation of mass?  Considering our view of nature was changed as Special Relativity was introduced and thus, what earlier the theorem would have asserted as mass and energy to be originating from different symmetries then how did we reconcile these two as just one symmetry? Execute PowerShell Script from C# with Commandline Arguments I need to execute a PowerShell script from within C#. The script needs commandline arguments.  This is what I have done so far:  RunspaceConfiguration runspaceConfiguration = RunspaceConfiguration.Create();  Runspace runspace = RunspaceFactory.CreateRunspace(runspaceConfiguration); runspace.Open();  RunspaceInvoke scriptInvoker = new RunspaceInvoke(runspace);  Pipeline pipeline = runspace.CreatePipeline(); pipeline.Commands.Add(scriptFile);  // Execute PowerShell script results = pipeline.Invoke();   scriptFile contains something like "C:\Program Files\MyProgram\Whatever.ps1".   The script uses a commandline argument such as "-key Value" whereas Value can be something like a path that also might contain spaces.  I don't get this to work. Does anyone know how to pass commandline arguments to a PowerShell script from within C# and make sure that spaces are no problem? Let $ P(x)=x^8 - x^7 +x^2 -x +15 $, Descartes' Rule of Signs tells us that the polynomial has 4 positive real roots , but if we group the terms as $$ P(x)= x(x-1)(x^6+1) +15 $$ we find that $ P(x) $ does not have any positive roots.  Where did I err ? One Object won't Show up in Final Render even though it shows up in the Preview Render