nested indentation of lines
Print programs with its proper syntax
I am working to integrate unit testing into the development process on the team I work on and there are some sceptics. What are some good ways to convince the sceptical developers on the team of the value of Unit Testing? In my specific case we would be adding Unit Tests as we add functionality or fixed bugs. Unfortunately our code base does not lend itself to easy testing. Brightness is reset to maximum on every restart The brightness of my laptop is reset to max on every restart. I tried the solution provided at  but had no luck.   This command   cat /sys/class/backlight/acpi_video0/max_brightness   Returns   cat: /sys/class/backlight/acpi_video0/max_brightness: No such file or directory   Then I found that I don't have a folder named acpi_video0, but a folder called intel_backlight:    Every time I increase or decrease the brightness using the brightness control keys, the values in brightness and actual_brightness get updated.  Is there any method I could follow to set the brightness to a fixed value on every boot and vary it as and when I need it using the brightness control keys? Is there a difference between installing an application via Ubuntu Software Center or a terminal? Headless linux install How do you do a headless install of linux? No monitor, no keyboard. Machine has floopy and cd drive. Can I configure a live cd to run sshd with a preconfigured pass or something similar and manage it via that?  Instructions for fedora 8+ would be ace but anything else also welcomed.  Cheers. How is it possible that quantum phenomenons (e.g. superposition) are possible when all quantum particles are being constantly observed? I don't understand how quantum mechanics (and therefore also quantum computers) can work  given that while we work with quantum states, particles that this quantum state consist of cannot be observed, which is the most fundamental requirement.  If I am not mistaken, by "observed" we mean interaction with any other particle (photon, gluon, electron or whatever else). So my very important questions:   Aren't the particles this quantum state consists of interacting with each other? Why doesn't that cause the state to collapse? Aren't all particles in the universe interacting with Higgs field and gravitons etc? Why doesn't that cause every quantum state to collapse?   I feel there is something very fundamental in quantum mechanics that I am not aware of, hence I would be very pleased to have these questions answered. When I do upgrade it gets stuck here:  user@plato:~# sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages will be upgraded:   bind9-host coreutils cpio curl dnsutils libbind9-90 libc-bin libc-dev-bin   libc6 libc6-dev libcgmanager0 libcurl3 libcurl3-gnutls libdns100   libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libisc95 libisccc90   libisccfg90 libjasper1 liblwres90 libplymouth2 libsepol1 libssl-dev   libssl-doc libssl1.0.0 linux-libc-dev mime-support multiarch-support ntp   ntpdate openssl plymouth plymouth-theme-ubuntu-text python3-distupgrade   ubuntu-release-upgrader-core unzip 39 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 16.0 MB of archives. After this operation, 12.3 kB of additional disk space will be used. Do you want to continue? [Y/n] y 0% [Connecting to us.archive.ubuntu.com (2001:67c:1562::15)] ░   When I do update it gets stuck here:  user@plato:~# apt-get update 0% [Connecting to us.archive.ubuntu.com (2001:67c:1562::14)] [Connecting to sec░   I'm able to ping us.archive.ubuntu.com just fine:  user@plato:~# ping us.archive.ubuntu.com PING us.archive.ubuntu.com (91.189.91.23) 56(84) bytes of data. 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=1 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=2 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=3 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=4 ttl=54 time=81.4 ms ^C --- us.archive.ubuntu.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 81.425/81.528/81.582/0.355 ms   What can i do to fix this?    What I have tried so far.  I've tried following directions on this blog:   To force apt-get to use IPv4 exclusively   Create a file in /etc/apt/apt.conf.d/99force-ipv4 Add this line to newly created file Acquire::ForceIPv4 false; Apt-get will now use IPv4 exclusively How do I cure Sanguinare Vampiris? I have Sanguinare Vampiris. I don't really want to become a vampire. How can I cure myself? How to remove lines included in one file from another file? I have two lists, a complete list and a partial list. I want a bash script that will search the complete list for any lines that are in the partial, if there are, they will be removed from the complete list. Can anyone help? I have a huge text file (~1GB) and sadly the text editor I use won't read such a large file.  However, if I can just split it into two or three parts I'll be fine, so, as an exercise I wanted to write a program in python to do it.    What I think I want the program to do is to find the size of a file, divide that number into parts, and for each part, read up to that point in chunks, writing to a filename.nnn output file, then read up-to the next line-break and write that, then close the output file, etc.  Obviously the last output file just copies to the end of the input file.  Can you help me with the key filesystem related parts: filesize, reading and writing in chunks and reading to a line-break?  I'll be writing this code test-first, so there's no need to give me a complete answer, unless its a one-liner ;-) Restore console session after remote desktop disconnects? The optical density of a medium is quantified by its refractive index $n$. Does it have any correlation with the mass/number density of the medium? In other words is an optically denser medium must have a greater mass density compared to an optically rarer medium? After my suspension period, my reputation was not returned On Stack Overflow, I have a suspension period of 7 days which ends today. But my actual reputation has not been returned to me as one of the moderators said it would. I have a message like this by @Andrew Barber:     Once your suspension period is over, you will be returned to your   correct reputation level, minus the votes from the accounts which have   been deleted. At that time, you are more than welcome to return, and   continue contributing your knowledge, and gaining legitimate   reputation points. Just please keep our rules in mind when you do.      Regards      Andrew Barber, Stack Overflow moderator   Can any moderator here help me or tell me what the rules are of getting back my reputation?  How can I get the attention of a moderator so that they can resolve my problem? Can we continue to show the "Take a tour" banner after a user has created an account? Keen eye for detail (or details?) Which one is correct? "To have a keen eye for detail" or "To have a keen eye for details"? How to draw a Sankey Diagram using TikZ Is there a Stack Exchange site for both technical and behavioural interview questions? Where I could ask questions about, for example:   Sample questions and solutions, experiences, or seeking advice for interviews A place where I could ask interview questions and what the best way to answer it (not just a correct way or the most efficient).   What to do in a certain situation such as negotiation, unfair interviews, etc.   Experiences interviewing at so-and-so company. SQL - Stored Procedure with Select Statement using IN (@Variable_CommaDelimitedListOfIDS) How can I remap keyboard keys in windows 8.1? I'm looking for a simple utility which will modify registry and would not require running at startup. I tried sharpkeys but, it does not seem to work in windows 8.1. Any other suggestions? Or a simple how-to tutorial for windows 8.1?  Edit: Keytweak isn't working either. Actually I want to map an unused key to function key (fn) and neither sharpkeys nor keytweak detect the keystroke for that key.   Thanks Is there an GUI Designer for python? Is there a GUI IDE for programming python just like java has netbeans?  I wanted one where we could drag &amp; drop test boxes &amp; labels just as we do in swing components using netbeans or eclipse.  Or is there an add-on present in either netbeans or eclipse itself? Is my baby's gender an example of Schrodinger's cat?