I am looking for a way to dynamically set the urxvt window title based on the command input.  Let's take an example.  If I run mplayer http://66.197.229.245:8082 in an urxvt window, I would like the  title of this window to be set to mplayer http://66.197.229.245:8082 or even better Terminal | mplayer.  Or if I run journalctl -b I want the window title to be set to Terminal | journalctl -b or better Terminal | journalctl.  Is this possible?
My Bash Prompt is currently setting the xterm titlebar using the following sequence:  PS1='\033]0;\u@\h&gt;\w\007'   Is there an easy way to display the current command in the titlebar. For example, if I am tailing a file using tail -f foo.log, I want my titlebar to say tail -f foo.log.
How to change row color based on a single cell's value? Possible Duplicate:          I have a spreadsheet where I have cell within a row that will contain specific text via data validation. So for instance a cell could contain the text "Due in 7 Days", "Past Due", or "Closed".  I want the row color to change depending on the text that appears in the cell. So if the text "Past Due" appears in the cell I want that entire row to turn red, if "Due In 7 Days" appears the row should turn yellow, and if "Closed" the row would turn gray.  How can I do that? How many combinations are possible in the game tic-tac-toe (Noughts and crosses)?  So for example a game which looked like: (with positions 1-9)  A1   --   B1  A2   --   B2  A3   --   --   [1][3][4][6][7] would be one combination How to flash a BIOS when only a Windows binary is provided? Are there recommendations or pitfalls for playing an archer cleric? In my 4E game, a player is going to try an elven cleric with a longbow (and a mace, just in case). She chose mostly ranged powers. Are there any caveats to playing such a character, or any builds that I could recommend for her? Prove that $x-1$ divides $x^n-1$ In algebra &amp; polynomials, how do we prove that $$x-1 \mid x^n -1?$$ "The Struts dispatcher cannot be found" error while deploying application on WebLogic 12.1.3 An interesting exercise about converging positive series, involving $\sum_{n\geq 1}a_n^{\frac{n-1}{n}}$ Stopping a Thread in Java? I'm in the process of writing a piece of code that connects to a server spawns a bunch of threads using that connection and does a bunch of "stuff".  There are certain instances where the connection fails and I need to stop everything and start from scratch with a new object.  I wanted to clean up after the object but calling thread.stop on the threads, but this method is seemingly deprecated.  What is the recommended alternative to doing this? Should I write my own cleanup and exit method for each of the threads? Set the thread to null? or something else? Running programs in the background from terminal Fluent and Query Expression — Is there any benefit(s) of one over other? There was this cool tv show I used to watch as a kid (in the 1990's I think). It was about a world where water was extremely rare and people used to fight over it, however there was this person who had this large 3D polyhedron shaped device (big enough to fit a few people in it) that could synthesise water.  Now, this device was either a time travel device or could just make water (not sure but I remember some time travel aspect as they could either remember the world the way it was where water was plentiful or could travel back to it on occasion).  Anyway, would love to know if this rings any bells?????  It was on in the UK (but maybe the US too, not sure). In comments, moderators have their diamonds in the OP rectangle:        And in the review (suggested edits), mods have their diamonds outside the blue OP background highlight rectangle:        Of course, it Doesn't Really Matter At All, but it is a small discrepancy (I am not saying that in the review, OP rectangles have a bigger padding). What Hogwarts classes are taught to two houses at once? I remember from my mumble about nine mumble rereads of the Harry Potter series that the following classes Harry took were taught to more than one house in the same lesson:   Potions with the Slytherins  Herbology with the Hufflepuffs  Care of Magical Creatures with the Slytherins  broomstick riding with at least the Slytherins (maybe other houses, too?)    I don't remember any student from a house that isn't Gryffindor being mentioned in the sections on Transfiguration, Charms, Defense Against Dark Arts, History of Magic, or Divination. That would mean McGonagall had to teach twice as many classes as Snape, if both subjects got the same number of lessons (which I think I recall).   Were any subjects other than Potions, Herbology, and Care of Magical Creatures taught to more than one house in the same lesson? And do we know why some subjects are taught to more students at the same time than others? finite elements-exercice We consider in $\mathbb{R}^2$ the set of points $$\{M_1(-1,1),M_2(0,1), M_3(2,1),M_4(-1,0),M_5(1,0),M_6(2,0)\}$$  Let $\Omega$ a rectangular structure consisting of the heads $\{M_4(-1,0),M_6(2,0), M_3(2,1),M_1(-1,1)\}$  Let the two polygons $\sum_1 = \{M_4,M_5,M_2,M_1\}$ and $\sum_2 = \{M_5,M_6,M_3,M_2\}$   let the mesh $\{(e_1,\sum_1,Q_1),(e_2,\sum_2,Q_2)\}$ such $$Q_1=\{f : \mathbb{R}^2 \rightarrow \mathbb{R} , f(x,y) = a + bx + cy + d xy , a , b, c , d \in \mathbb{R}\}$$  1- Prove that $(e_1,\sum_1,Q_1)$ and $(e_2,\sum_2,Q_1)$ are two finite elements of Lagrange.  2- Let $V$ the finite-dimensional space that corresponds to the mesh. Prove that $V \nsubseteqq H^1(\Omega)$  My problem is to prove 2. Breadboard Confusion I just received the following breadboard in a electronics starter pack I purchased.    I am a little confused in how I would go about prototyping on this board, all the tutorials I have read state that the breadboard should have a positive and negative  input on it. But it appears this one doesn't.  Could anyone help clear my confusion? Creating or adding geometry colunm fails even with postgis enabled Virtual box ubuntu: Internet not detected on guest(Ubuntu) in host(winXp) How can I install .exe files of Windows 7 or more in Ubuntu? I want to run/install .exe files that require Windows 7 or higher in Wine on Ubuntu.   When I try to install a specific .exe file on Wine, it says      Windows version is not supported! You can install it in Windows 7 or higher.   How can I configure which Windows version (XP, Vista, 7, 8, ...) Wine emulates? Clear 301-redirect cache in Firefox Is it possible to clear only 301-redirects from Firefox's cache? CTRL+F5 doesn't do the job since you just reload the target without caching but do not clear the cached redirect.  An option to disable caching of those redirects completely would be fine, too - but some way (possibly through an extension) to remove those cached redirects would be better.  Note: I'm not looking for answers that disable all caching (including CSS, JS, etc.) Java ReentrantReadWriteLocks - how to safely acquire write lock? I am using in my code at the moment a  to synchronize access over a tree-like structure.  This structure is large, and read by many threads at once with occasional modifications to small parts of it - so it seems to fit the read-write idiom well.  I understand that with this particular class, one cannot elevate a read lock to a write lock, so as per the Javadocs one must release the read lock before obtaining the write lock.  I've used this pattern successfully in non-reentrant contexts before.  What I'm finding however is that I cannot reliably acquire the write lock without blocking forever.  Since the read lock is reentrant and I am actually using it as such, the simple code  lock.getReadLock().unlock(); lock.getWriteLock().lock()  can block if I have acquired the readlock reentrantly.  Each call to unlock just reduces the hold count, and the lock is only actually released when the hold count hits zero.    EDIT to clarify this, as I don't think I explained it too well initially - I am aware that there is no built-in lock escalation in this class, and that I have to simply release the read lock and obtain the write lock.  My problem is/was that regardless of what other threads are doing, calling getReadLock().unlock() may not actually release this thread's hold on the lock if it acquired it reentrantly, in which case the call to getWriteLock().lock() will block forever as this thread still has a hold on the read lock and thus blocks itself.  For example, this code snippet will never reach the println statement, even when run singlethreaded with no other threads accessing the lock:  final ReadWriteLock lock = new ReentrantReadWriteLock(); lock.getReadLock().lock();  // In real code we would go call other methods that end up calling back and // thus locking again lock.getReadLock().lock();  // Now we do some stuff and realise we need to write so try to escalate the // lock as per the Javadocs and the above description lock.getReadLock().unlock(); // Does not actually release the lock lock.getWriteLock().lock();  // Blocks as some thread (this one!) holds read lock  System.out.println("Will never get here");   So I ask, is there a nice idiom to handle this situation?  Specifically, when a thread that holds a read lock (possibly reentrantly) discovers that it needs to do some writing, and thus wants to "suspend" its own read lock in order to pick up the write lock (blocking as required on other threads to release their holds on the read lock), and then "pick up" its hold on the read lock in the same state afterwards?  Since this ReadWriteLock implementation was specifically designed to be reentrant, surely there is some sensible way to elevate a read lock to a write lock when the locks may be acquired reentrantly?  This is the critical part that means the naive approach does not work.