I've got an Ubuntu 14.04 PC with VirtualBox 4.3.10 installed and running OK. In there I have a Windows 7 guest OS running OK.  However, the issue is that USB devices cannot be seen by VirtualBox. I have successfully installed the necessary extension pack and even enabled USB 2 for the Win 7 guest OS, but USB just says "No devices available". The same USB devices like flash disks work perfectly OK in the Ubuntu host OS. I also have guest additions installed OK.  Would really appreiate some help on this, pls.
I'm using Ubuntu Maverick and Virtual Box 3+. I have Windows 7 Ultimate. The problem is that it doesn't detect USB drives in Windows 7, but USB peripherals (mouse + keybord) are working.  I followed , but I can't find the user group vboxusers. How can I continue? I would also like to upgrade to the latest version without any risk (without losing my virtual hard disk drive).
Parallelize Bash script with maximum number of processes Lets say I have a loop in Bash:  for foo in `some-command` do    do-something $foo done   do-something is cpu bound and I have a nice shiny 4 core processor. I'd like to be able to run up to 4 do-something's at once.  The naive approach seems to be:  for foo in `some-command` do    do-something $foo &amp; done   This will run all do-somethings at once, but there are a couple downsides, mainly that do-something may also have some significant I/O which performing all at once might slow down a bit. The other problem is that this code block returns immediately, so no way to do other work when all the do-somethings are finished.  How would you write this loop so there are always X do-somethings running at once? how to make a regex string reject a blank field Convert all text from uppercase to lowercase and vice versa? I'm working through some old integrals and I found one that's interesting. I can't quite remember how it's proved, so if someone could set me off in the right direction, it would be really helpful. Thanks!   $\int_{\mathbb{R}} e^{-ax^2 + bx} dx = \sqrt{ \dfrac{\pi}{a}} e^{\frac{b^2}{4a}}$  I've tried change of variable, but I'm not sure this is the right approach. Can't compile any c/ c++ program, linker problem It's my second post here, i have a huge problem which prevents me to study so i have to fix it as soon as it's possible ! My gcc was working fine and i had to work on FairThreads (in C). I downloaded the following archive :  As you can see, in /src there's a makeFile, i replaced the second line which was : LIB_DIR     = ../lib  by LIB_DIR     =  /usr/bin/ld and i compiled the makeFile by the command &quot;make&quot; And now, i cannot compile any c/c++ program anymore. Even a hello world program. I got the following error message on the terminal for every compiling attempt : /usr/bin/ld: 2: /usr/bin/ld: Syntax error: newline unexpected collect2: error: ld returned 2 exit status  I have found on the net this solution but it doesn't work for me : sudo apt-get autoremove binutils     sudo apt-get install binutils  I also tried to reinstall gcc, when executing : sudo apt-get purge gcc   i got : Des erreurs ont été rencontrées pendant l'exécution :   linux-firmware   linux-image-generic-hwe-18.04   linux-generic-hwe-18.04 E: Sub-process /usr/bin/dpkg returned an error code (1)  but when i trie a gcc --version it tells me that it is not found. So when i execute the command to reintall it : sudo apt-get install gcc   i also get : Des erreurs ont été rencontrées pendant l'exécution :  linux-firmware  linux-image-generic-hwe-18.04  linux-generic-hwe-18.04  linux-image-5.4.0-72-generic  initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1)  but gcc --version tellls that it's installed. Finally, when i trie to compile a program, i got : /usr/bin/ld: 2: /usr/bin/ld: Syntax error: newline unexpected collect2: error: ld returned 2 exit status  I hope that i explained well, and i'll get a solution for this :/, as a computer science student, i can't do anything without gcc :( EDIT 1 : When i try to remove bin/ld by executing : sudo rm -fr /usr/bin/ld;sudo apt-get install --reinstall binutils  i got : Des erreurs ont été rencontrées pendant l'exécution :  linux-firmware  linux-image-generic-hwe-18.04  linux-generic-hwe-18.04  linux-image-5.4.0-72-generic  initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1)  and this particular error message : WARNING: no ldd around - install libc-bin  EDIT : I have installed ldd by the command : sudo apt-get install libc-bin  still no changes... Points of a Measure Zero Sets Covered by Intervals Infinitely Many Times Given a measure zero set $E$, by definition we have forall $\varepsilon &gt; 0$, a covering of $E$ by intervals whose lengths sum to $&lt; \varepsilon$.  I want to prove that we can cover $E$ in intervals such that the sum of the lengths the intervals is $&lt; 1$ and each point in $E$ is contained in infinitely many of the intervals.  Do you know how to prove this? Thank you magit: how to diff the same file between two different commits on the same branch? Not able to execute a .sh file: /bin/bash^M: bad interpreter I wanted to execute a shell script:  -rwxr-x--x 1 root root   17234 Jun  6 18:31 create_mgw_3shelf_6xIPNI1P.sh   I tried to do a standard procedure, but I got this error:  ./create_mgw_3shelf_6xIPNI1P.sh  localhost 389 -l /opt/fews/sessions/AMGWM19/log/2013-06-06-143637_CLA-0  DEBUG   cd/etc/opt/ldapfiles/ldif_in ; ./create_mgw_3shelf_6xIPNI1P.sh  localhost 389 -l /opt/fews/sessions/AMGWM19/log/2013-06-06-143637_CLA-0 **ERROR  sh: ./create_mgw_3shelf_6xIPNI1P.sh: /bin/bash^M: bad interpreter: No such file or directory**   What does it mean? I was doing this as the root user under the root group.  Does it mean that the file does not have the correct permission for the root user? App question timer shouldn't kick in until submission I attempted to ask a question using the iOS app, but it was rejected due to lack of a required tag. On adding the tag I found that I wasn't permitted to submit the question for another 60 seconds, even though this wasn't a new question.  Is this timer intentional, or should it not kick in for edits of questions not actually accepted by the site? Eclipse is giving me this error when I try to copy an object back to the Force.com server: "unable to perform synchronize check with remote server Invalid username, password, security token; or user locked out Your project may be out of sync."  This is my first try at using Eclipse, so it may not be set up right.  Can anyone help?  Thanks!  Edit: screenshot of trying to deploy: When using the serial console of my system I always end up with $COLUMNS=80 and $LINES=24.  While I can change these variables manually it is somewhat annoying to do this any time when the client side terminal window has been resized.  Usually I'm connecting to the console using screen /dev/mytty baudrate.  Changing the $TERM environment variable to "screen" or "xterm" does not help.  Will I need to call getty with some of those instead of vt100?  Needless to say that all of this works fine, when I connect to the same machine using ssh. What are the differences between struct and class in C++? This question was .  Now I'd like to learn the differences between a struct and a class in C++. Please discuss the technical differences as well as reasons for choosing one or the other in OO design.  I'll start with an obvious difference:   If you don't specify public: or private:, members of a struct are public by default; members of a class are private by default.   I'm sure there are other differences to be found in the obscure corners of the C++ specification. In the book I'm reading at the moment () it says that if you don't declare a default constructor for a class, the compiler supplies one for you, which "zeroes out each data member". I've experimented with this, and I'm not seeing any zeroing -out behaviour. I also can't find anything that mentions this on Google. Is this just an error or a quirk of a specific compiler? Are the decimal places in a CSS width respected? Calculate limiting distribution of $\frac{\sum_{i=1}^n X_i}{\sum_{i=1}^n Y_i}$ rsync two existing directories copying everything I have two file servers in two locations. Currently both have the same data, which generally is unmodified (used for read only access).When the second server was set up (the one I'm sshing to) the data was copied over LAN and has since been moved geographically.  I'm trying to use rsync for the first time on the required directories. An example command;  sudo rsync -avz --ignore-existing -P --dry-run /media/Storage/OSs/ user@mydomain:/mnt/Storage/OSs/   I've tried using -c -t -u (Additionally went on the remote server and updated the timestamps to today) also but every time I execute a dry run it wants to copy everything!  Additionally the user is the same for both machines with the same UID.  *Edit  After playing around a bit more, I've found that rsync does not like the whitespace in the subdirectory names; For instance if I use ' to escape local shell &amp; \ to escape remote shell     sudo rsync -avz --ignore-existing -P '/media/Storage/OSs/Windows/Windows server 2011/' 'user@mydomain:/mnt/Storage/OSs/Windows/Windows\ server\ 2011/'   Then all is well, my theory is then that rsync does not like the subdirectories with whitespaces. I have thousands of subdirectories; the only solution I can think of is to write a small python/shell script to run each sub directory separately but is undesirable. Winter Bash 2014 Secret Hats Bypass GPG signature checks only for a single repository My request is simple: Many times, there will be a question where some people feel like it should be closed. At the same time, I'll feel like it's a perfectly legit question, and it should therefore NOT be closed. Right now, I have to wait till it gets enough close votes (which it always does for some reason, as soon as 1 or 2 people vote to close, e/o else decides to vote as well) and then vote to re-open. How about, as soon as there's one vote to close, there should be an option to counter the close vote, something like "vote not to close" or whatever. This would then bring the "Vote to close" number down by one. Only when the vote to close outnumbers the vote not to close by 5, that's when a question is indeed closed. Any thoughts? I am trying to create an spritz app. Everything was working fine, but since yesterday I keep getting this error:     ./spritz: line 176: syntax error: unexpected end of file   I have checked the script file and everything seems perfect. I am confused, I have an if statement at last and it looks correct! Here is the last portion:  #checks if speed is 150 157 if [[ $2 -eq 150 ]]; 158 then 159 starttime=$SECONDS 160      FS=$'\n' 161      for j in `grep --color=always -iP '\b[^aeiou\s]*[aeiou][^aeiou\s]*\K[aeiou]' $1`; 162      do 163            #Reads the text file in the centre of the screen 164            echo "                                                    ___________________" 165            echo "                                                             $j"; 166            echo "                                                    ___________________" 167            echo "                                                                               Speed 150 wpm" 168            sleep  0.9; 169            clear; 170       done 171 endtime=$(($SECONDS - $starttime)) 172            echo "You read $words_read words in $endtime seconds!" 173       exit 8 174 fi   What could cause that error?