Is there a way to use XPath in Ruby without specifying the tag?  For example, I want to get all elements whose class contains 'trow1'. Not just tr, as the code below is doing:  doc.xpath("//tr[contains(@class,'trow1')]")
Given this XML, what XPath returns all elements whose prop attribute contains Foo (the first three nodes):  &lt;bla&gt;  &lt;a prop="Foo1"/&gt;  &lt;a prop="Foo2"/&gt;  &lt;a prop="3Foo"/&gt;  &lt;a prop="Bar"/&gt; &lt;/bla&gt;
What exactly fries the chip when you invert power supply? "batch" tag turns into "batch-file" When a user votes to close a question (for whatever reason), it would helpful to receive a notification (in the inbox) when the question is edited (either the text, tags, if it closes then is re-opened) so that the user can then modify his or her vote if the question is properly adjusted. Privacy leak in permalink? Update (Jan 8, 2019) This is now 8 years old, but still getting occasional upvotes/attention, so I thought it's worth giving a summary of the current state.  Despite originally being , over the last decade some changes have made the privacy implications much clearer.  You now click &quot;share&quot; instead of &quot;link&quot;, and the pop-up is very explicit that the link includes your user ID. There is a  asking that this user ID be anonymized or hashed, to allow users to earn publicity badges (the intention behind having the user ID present in the URL, as per ) while eliminating the privacy issue. Original Post It seems to me there is something of a privacy leak when permalinking to a question.  For what I would assume is the purposes of tracking which user is responsible for bringing traffic back to an SE site (for badges, etc.), the user ID of the user obtaining the permanent link . I wouldn't argue that this shouldn't be the case, but I find no warning or mention of this when I do these actions.  I'm sure I'm not the only one that doesn't desire anonymity on SO but would like at least pseudonymity on some places I might share a SO link, such as on a random blog.  As a user, I would not expect sharing a permanent link to leak my identity.   Unless you are familiar with Stack Exchange links or your own userID, it's certainly not obvious by looking at the link that it includes your personal info.  It'd be nice to have fair warning that using that feature will do so, and perhaps provide/describe the workaround: to simply remove the user-id segment from the URL.  Other features would be a preference that formats future permanent links to exclude the user id. Example (from this question)  Permalink:  Link to my user page: I want to debug a router that is giving strange DHCP settings, but I don't know how to check it without having to make my system take all the configurations. Isn't there a utility that returns all DHCP settings (like NTP, WINS, DNS, IP, router) whenever a client connects?  Preferably that is platform independent, and that won't require changing the client's configuration to trigger the DHCP. How to make a file (e.g. a .sh script) executable, so it can be run from a terminal What are the valid characters for macro names? I am a history teacher and I like to make my own maps (I can never find exactly what I want).  I am using QGIS 1.8 and .  I want to reproject their cross-blended hypso rasters into projections that are more familiar looking to my students, like Lambert Conic Conformal.  I have tried changing the crs for the whole project, and the warp and assign functions from the raster menu, and changing the crs for the raster layer itself.  None of these seem to work properly - the resulting maps are unrecognizable and extremely large (file size).  I feel like I am making some kind of basic mistake but I don't know where to begin with this.  Any help would be appreciated. Support for N-Gons (polygons consisting of more than 4 vertices) has been in Blender for a while now, but many of us still may not know when to use them, and how to do so effectively.  In what situations do N-Gons really come in handy? When should they be just plain left out? Do they have any place in finished models? Darth Vader threw Emperor Palpatine to a pit. Well, , but unlike other times, Palpatine wasn't injured or unconscious when he was thrown.  Why didn't he simply prevent his fall using his lightsaber (I have seen such action in Star Wars: The Clone Wars TV series lots of time) and make his way out? Error: mysqli_stmt::bind_param(): Number of elements in type definition string doesn't match number of bind variables Game Theory and Uniform Distribution question? In an Auction , two players are  bidding. Their bids will be a unknown fraction of their valuations. The valuations come from a uniform distribution $$[0,1] $$  If Player 2 bids $$ v/2 $$  and Player 1 bids $$b1&lt;1/2$$   What is the probability player 1 wins ? Clearly for player 1 to win,players 2 bid has to be less than player 1 bids. $$P(v/2 &lt; b1)$$  $$P(v &lt; 2b1)$$ I follow the question up to this stage. Now it says since its uniformly distributed the probability player 1 wins is $$2b1$$ Im confused how can you just get 2b1 from the inequality ?  Thanks in advance London Heathrow airport - do I need a transit visa? I am traveling from the US to India via London Heathrow on November 6. I will be at LHR on 7th at 6:20 am and departing at 9:25 pm. I'm an Indian national and have a valid US visa.  Do I need a transit visa to stay airside?  I have been scared that British Airways have stopped a few people from boarding flights (no details just rumors).  Do I need a transit visa to stay landside? I want to do some sightseeing. What are the chances of getting past officials using transit without visa concession?  Real stories will help a lot to calm the butterflies in my stomach. so there are some idiosyncrasies with the method they use to invert that part of the image which I can't figure out. It could be that they just invert the luminosity but I don't know how i would do that in a dynamic way. Effect on loading a DC motor - load torque Could someone give a (detailed) explanation (perhaps with formulas) of how the load (torque) affects the armature current of a DC motor (separately excited or shunt or series)?  As the load torque increases the speed of the motor decreases, and assuming the terminal voltage stays constant, the EMF will become lower and thus the armature current will increase.  But could someone give me the formula that shows the relation between load torque and armature current?  Is it something like:   \$T_\text{developed} = T_\text{shaft} + T_\text{friction windage} + T_\text{load}\$ ,   where \$T_\text{developed} = K \, \text{flux}_\text{pole} \,I_\text{armature}\$ ?  But then you have  \$P_d = P_s + P_{f_w} + P_l   \$  where \$P_d = K \,\text{flux}_\text{pole}\, I_\text{armature}  \,\omega_m\$  In the last formula you can't see that as the increase due to \$P_\text{load }\$ the armature current increases because maybe someone can say the speed \$\omega_m\$ increases.  And how come at no-load the armature current and thus the torque developed is zero? Is it really zero, or do I have to assume there is some current flowing?  Could also explain me the principle of torque developed. Because at no load, the shaft torque is equal to torque developed, right? Sum over all non-evil numbers Why is polyploidy lethal for some organisms while for others is not? is the multiplication of number of chromosomal sets from 2n to 3n (triploidy), 4n (tetraploidy) and so on. It is quite common in plants, for example many crops like wheat or Brassica forms. It seems to be rarer in animals but still it is present among some amphibian species like Xenopus.  As I know in mammals polyploidy is lethal (I don't mean tissue - limited polyploidy). I understand that triploidy is harmful due to stronger influence of maternal or paternal epigenetic traits that cause abnormal development of placenta, but why there is no tetraploid mammals? How do I add a directory to the $PATH in Ubuntu and make the changes permanent? Domain Controller etiquette after a crash between Server 2003 & Server 2008 I have 2 domain controllers on a non-Internet connected network running Windows Server 2008 R2. They running RAID 5 on a 8 Hard Drive server. Sometime last week the Boot Sector became corrupt on DC1 and I was unable to recover the server. I am not going to have to rebuild the server. I have been reading about the changes from Server 2003 to Server 2008. DC1 was the main domain controller and now that it won't but it is all falling to DC2. I know that in previous versions of Windows Server you had to make on the primary and one the secondary. Since DC2 does not see DC1 anymore is there anything I need to do to DC2 as it is now the one in control? I am thinking some kind of meta data clean up but I can't find any hard information on what procedure to do. I understand as of Server 2008 domain controllers are on an equal footing and provide replication to each other so they should be the same correct? 'as compared to' vs 'as compare to'