std::advance behavior when advancing beyond end of container
What happens if you increment an iterator that is equal to the end iterator of an STL container
how to replace multiple strings together in Oracle I have a string coming from a table like "can no pay{1},as your payment{2}due on {3}". I want to replace {1} with some value , {2} with some value and {3} with some value .  Is it Possible to replace all 3 in one replace function ? or is there any way I can directly write query and get replaced value ?   I want to replace these strings in Oracle stored procedure the original string is coming from one of my table I am just doing select on that table   and then I want to replace {1},{2},{3} values from that string to the other value that I have from another table Rendering of Favorite/Ignored Tags in Firefox I have spotted a bug in rendering of Favorite Tags and Ignored Tags section in Firefox. This rendering issue is present on both stackoverflow.com and meta.stackoverflow.com sites.  I'm using Firefox 17.0.1 on Windows 7 x64. In Google Chrome page is rendered correctly.  Screenshots:  Firefox (please note cropped right part of both Add buttons)    Chrome (buttons are rendered correctly) How to use JACK and Pulseaudio/ALSA at the same time on the same audio device? Whenever I launch hydrogen it breaks my audio in all other applications which use Pulse, for example, I can no longer play videos in Chrome after having launched Hydrogen once, until I restart my PC or do sudo alsa force-reload. I have found people with similar issues, but no actual guide to fix this, often there are links to  (which has moved to  ) I am using Ubuntu Studio 14.04 64bit.  ALTERNATIVELY if this is truly impossible to achieve, can someone tell me how to use Jack on one soundcard and Pulse on another? This way I could plug in a USB sound card only when I need JACK.  Please don't make me use windows. using apt-cache search I am learning how to use apt. When I do an apt-cache search git to see all packages matching git, I see a bunch of packages whose descriptions have nothing to do with git. Why is this so and how can I fix it? (Ubuntu 12.04.2 LTS).  Also, why is the search functionality found in a command that has "cache" in its name? What does search functionality have to do with caches?  Thanks. Rendering an animation the way 3D view looks Is there some way to render exactly whats in the camera view in the 3D view? By that I mean just like a screenshot really, all paths, lamps, and cameras, just like things look in the camera view. The reason I can't just take a screenshot is that I need an animation and it would be too cumbersome to take 1000+ screenshots! When is matrix multiplication commutative? I know that matrix multiplication in general is not commutative. So, in general:  $A, B \in \mathbb{R}^{n \times n}: A \cdot B \neq B \cdot A$  But for some matrices, this equations holds, e.g. A = Identity or A = Null-matrix $\forall B \in \mathbb{R}^{n \times n}$.  I think I remember that a group of special matrices (was it $O(n)$, the ?) exist, for which matrix multiplication is commutative.  For which matrices $A, B \in \mathbb{R}^{n \times n}$ is $A\cdot B = B \cdot A$? How do I execute a string containing Python code in Python? how to concatenate string variables into a third? Is it possible to assign a base class object to a derived class reference with an explicit typecast in C#?.  I have tried it and it creates a run-time error. How to convince airport security that I am not dangerous when having metallic parts in my body? I had an operation some time ago and now I have small screws in my shoulder which will not be removed anymore. When I decided to fly for vacation, I supposed that these will may bring me into trouble at the airport when going through the metal detector.  So I asked my doctor and at the hospital if there is any kind of "passport" or something similar which confirms the screws in my shoulder so that I do not get into many problems. Unfortunately, they told me such things do only exist if you get a new knee or something, not if you just have a few screws in your body.  When I flew from Vienna to Amsterdam and back, my fears were confirmed: The security staff inspected me very precise, and I had to explain them my story. Thank god I have some scars left so they believed me!  However this is not a permanent solution for the future. Is there any international "passport" which my doctor and hospital do not know about? If not, what else are my possibilities?  I am not that afraid when travelling within the EU, however I fear that this situation might get quite dangerous when I'm in other countries... apt-get cannot connect to Ubuntu archives I just installed a fresh version of Ubuntu 19.10 today, and the first thing I decided to do was to install GNU Screen, using sudo apt-get install screen. my output was: Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package screen  I figured the package archives were not quite updated as it was a clean install so I tried sudo apt-get update. This is what I got: Get:1 http://security.ubuntu.com/ubuntu eoan-security InRelease [97.5 kB]       Err:2 http://au.archive.ubuntu.com/ubuntu eoan InRelease   Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable) Could not connect to au.archive.ubuntu.com:80 (202.158.214.106), connection timed out Err:3 http://au.archive.ubuntu.com/ubuntu eoan-updates InRelease      Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable) Err:4 http://au.archive.ubuntu.com/ubuntu eoan-backports InRelease   Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable) Fetched 97.5 kB in 31s (3,106 B/s) Reading package lists... Done Building dependency tree        Reading state information... Done All packages are up to date. W: Failed to fetch http://au.archive.ubuntu.com/ubuntu/dists/eoan/InRelease  Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable) Could not connect to au.archive.ubuntu.com:80 (202.158.214.106), connection timed out W: Failed to fetch http://au.archive.ubuntu.com/ubuntu/dists/eoan-updates/InRelease  Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable) W: Failed to fetch http://au.archive.ubuntu.com/ubuntu/dists/eoan-backports/InRelease  Cannot initiate the connection to au.archive.ubuntu.com:80 (2001:388:30bc:cafe::beef). - connect (101: Network is unreachable) W: Some index files failed to download. They have been ignored, or old ones used instead.  I'm really not sure why it would be doing this, other than maybe some first-use hiccups? The computer is definitely connected to the internet, as I am writing this from that machine, and I have tried running the commands after rebooting and it still gives the errors. I can't seem to be able to connect to au.archive.ubuntu.com at all. ping au.archive.ubuntu.com just sits there without a response. If anyone could help, that would be great! If any extra information is required I'd be happy to edit it into the question. Centrifugal force acting on ring Take for example the case of a rod rotating about an axis passing through its centre of mass and perpendicular to it. It has a ring hung from one of its sides. The rotation of the rod causes the ring to move out wards and ultimately fall off the rod.   I asked my teacher what causes the ring to move out wards and he said the centrifugal force acting in the frame of reference of the ring causes motion. What exactly is the ring reference frame? Is it a rotating frame? How would u visualize motion in this frame of reference? Opening Chromium on Ubuntu VPS Ubuntu noob here. I recently got a VPS running Ubuntu, and decided to install Chromium, my preferred browser, on it. After installation completed, I got a message stating that I cannot open Chromium with root privileges. How would I go about opening Chromium? How can I set Excel to always import all columns of CSV files as Text? Though I try to avoid it, I occasionally have to open a CSV file in Excel. When I do, it formats columns containing numbers, which makes them useless for my purposes. As far as I can tell, the only way to prevent this from happening on import is to rename the file so the extension isn't .csv and use the import wizard to specify the format of each column individually. For files with 50-60 columns, this is impractical.  Since every answer for this oft-asked question on the internet suggests either some means of converting the formatted numbers back once the file is open (which won't work for me - I want to solve the general problem, not a few specific cases) or manually selecting the format type of each column (which I don't want to do), I'm looking for a way to set a global preference or style such that all columns of all CSV files opened are always formatted as text.  I know about "armoring" the numbers with quotes, too, but the files I get don't come like that and I was hoping to avoid having to pre-process the files so Excel doesn't screw them up.  Is there a way to do specifically this: Always format all columns in opened CSV files as text, without manually selecting each column every time during import?  I'm using Excel 2003, but I'll take answers for 2007 if that's what you know. 555 Monostable Timer delay I have built numerous 555 circuits over the years. I recently had to built a Monostable 555 cct. as per this site :    The cct. is used in a motor vehicle. When the remote control is pushed to open the doors, it sends positive 12V to this Monostable cct. to initiate it and a 3 Amp Power Transistor pulses the siren momentarily to indicatse "unlocking" by audible means.   The issue I have is that Rt and Ct used to time the output pulse is not short enough. I replaced these components to the smallest values I could get, but the output is still "too long". Teh siren makes a "chooow" sound instead of "chow". Sounmds too unprofessional or after-market.  Any ideas to get a short pulse (nearly a few micro seconds) out of this old 555 cct. ? Instant e-mail notifications of answers to questions I'd like to have Instant notifications by email of answers to my questions.  Can this be implemented? Why have header files and .cpp files? Do the non-zero eigenvalues of AB and BA have the same algebraic multiplicity (for AB and BA not square)? I know that if A and B are square nxn matrices, then AB and BA have the same characteristic polynomial and thus the same eigenvalues (and same algebraïc multiplicity).   I'm wondering though if this can be generalized: if A is a nxm matrix and B a mxn matrix, then AB is a nxn matrix and BA a mxm matrix.  So my question is: will the eigenvalues of AB and BA, that differ from zero, have the same algebraïc multiplicity? Why does minimizing the MAE lead to forecasting the median and not the mean? From the , specifically :     A forecast method that minimizes the MAE will lead to forecasts of the   median, while minimizing the RMSE will lead to forecasts of the mean   Can someone give an intuitive explanation of why minimizing the MAE leads to the forecasting the median and not the mean? And what does this means in practice?  I have asked a customer: "what is more important for you to make mean forecasts more accurate or to avoid very inaccurate forecasts?". He said that to made mean forecasts more accurate have higher priority. So, in this case, should I use MAE or RMSE? Before I read this citation I believed that MAE will be better for such condition. And now I doubt. Distance Between Two Points in Matlab