[FindsBy(How = How.XPath, Using = "//input[@id='Username']")] private IWebElement txtUsername;  public void EditTxtUsername(string text) {     txtUsername.Clear();     txtUsername.SendKeys(text); }   Is there a way in C# to chain the two actions into txtUsername.Clear().SendKeys(text);?
When interacting with different elements and applying multiple actions it  may be quite convenient in some situations if we could do:  WebElement myInput = driver.findElement(By.id("my-input-id")); myInput.clear().sendKeys("test");   Instead of:  WebElement myInput = driver.findElement(By.id("my-input-id")); myInput.clear() myInput.sendKeys("test");   But, the problem is , sendKeys() and other "action" methods cannot be chained as is - they return void and not the current WebElement.  What would be the easiest way to achieve chaining multiple actions?
I've been making a map for 1.10 and it's going great, but 1.11 shows great mobs to use for it. However, most things have channged in command syntax. For example, /kill @e[type=ArmorStand,r=6] is now /kill @e[type=Armor_Stand,r=6]  What about /testfor? I can't find a way to testfor a player to stand on a block and give them an effect.   What's is going on in this image is that a redstone clock is running into this command /testfor @a[1117,20,507,r=1] (if I was to stand on them cords the comparator would turn on and power that command block), but it only works in 1.10... from 1.11 snapshots, I've seen some errors of it, like it now needs to have {} at the beginning and end of it. (e.g. /testfor @a{[1117,20,507,r=1]})   It's still not working, though, so does anyone know how to get it to work? Explanation behind Second Derivative of a Parametric Equation Formula I am looking to find out how the second derivative formula works.  I can blindly apply it but I don't have a grasp of what is going on or why. The first derivitive has the formula $\frac{dy}{dx} = \frac{\frac{dy}{dt}}{\frac{dx}{dt}}$. I told this was because if you divide them you cancel out the dts and get dy/dx. The second derivative has the formula $\frac{d^2y}{dx^2} = \frac{d}{dx} \left(\frac{dy}{dx}\right) = \frac{ \frac{d}{dt}\left(\frac{dy}{dx}\right) }{\frac{dx}{dt}}$. Is this something that can be explained with only a knowledge of calculus or is this something I would have to take on faith until I learn more. Any help would be greatly appreciated. Why do "df" and "du" commands show different disk usage? I cannot access ubuntu system on my pc, the error message: "the system is running in low graphics mode" and I tried some commands I searched from internet.   I found out a problems seems there is no available disk space. I used "df" and "du" commands to check, the results are as follow:  du -j --max-depth=1 23G  ./home 3.3G ./usr  ......  28G   and  df -Th  filesystem   Type   size    used   available   use%    mounted on  /dev/sda5    ext4   68G     68G    0           100%    /   how would I clean up the system for more disk space? Why are there so many bottomless pits in Star Wars Why Doesn't a Bootable USB Boot Interference between strokeopacity and fillopacity I have a few circles in a drawing, and want to highlight some of them.  \begin{tikzpicture}  \coordinate (A1) at (0,0); \coordinate (A2) at (1,0); \coordinate (A3) at (1,1); \coordinate (B)  at (1,0);  \draw (A1) -- (A2); \draw (A1) -- (A3); \draw (B)  -- (A3);  \foreach \point in {A1,A2,A3,B} {    \fill [black,draw=white](\point) circle (3pt); }  \pgfsetstrokeopacity{.3} \pgfsetfillopacity{.3} \fill [red,draw,rounded corners,line width=9pt] (A1) -- (A2) -- (A3) -- cycle; \pgfsetstrokeopacity{1} \pgfsetfillopacity{1} \end{tikzpicture}   I would like the whole area surrounding the A points to be of the same color, but the strokeopaticy and the fillopacity interfere.  Is there some ay I can prevent this?  Note: in my actuall use scenario, there are too many coordinates for manual adjusting to be an option (otherwise I would just do with a fill with rounded corners, with points calculated manually). Standard purpose of favorites I am wondering if my behavior regarding favorites is typical.  More importantly, if it isn't typical, does my behavior conflict with an internal metric designed to reward favorite'd questions?  I mark a question as a favorite for a few reasons:  A -- I find the question/answer(s) remarkable enough that coming back to them time and time again is of benefit to me.  B -- I am waiting to see if a sub-par quality question is going to be revised enough for me to come back and answer it.  Either way, I eventually remove my favorite.  C -- I have answered a question (of any quality) and am wanting to be notified of any competing answers.    Situations B and C are the most common for me and they typically mean I will go back and remove my favorite star later; I don't remove it because the quality of the question degraded, I merely don't want to be notified any longer.  Even stranger, I am often favoriting questions that are rather low-quality (reason B) making me wonder if low-quality posts are being rewarded via some invisible metric because I (at least temporarily) have given it what looks like a stamp of approval akin to an up-vote.    I suppose the feature being called "Favorite" makes me confused because most of the questions I select are not my favorite.  Am I accidentally messing with an invisible metric that is drawing attention to posts when that isn't desired behavior? Update: Now that it's 2016 I'd use PowerShell for this unless there's a really compelling backwards-compatible reason for it, particularly because of the regional settings issue with using date. See @npocmaka's     What's a Windows command line statement(s) I can use to get the current datetime in a format that I can put into a filename?  I want to have a .bat file that zips up a directory into an archive with the current date and time as part of the name, for example, Code_2008-10-14_2257.zip. Is there any easy way I can do this, independent of the regional settings of the machine?  I don't really mind about the date format, ideally it'd be yyyy-mm-dd, but anything simple is fine.  So far I've got this, which on my machine gives me Tue_10_14_2008_230050_91:  rem Get the datetime in a format that can go in a filename. set _my_datetime=%date%_%time% set _my_datetime=%_my_datetime: =_% set _my_datetime=%_my_datetime::=% set _my_datetime=%_my_datetime:/=_% set _my_datetime=%_my_datetime:.=_%  rem Now use the timestamp by in a new ZIP file name. "d:\Program Files\7-Zip\7z.exe" a -r Code_%_my_datetime%.zip Code   I can live with this, but it seems a bit clunky. Ideally it'd be briefer and have the format mentioned earlier.  I'm using Windows Server 2003 and Windows&nbsp;XP Professional. I don't want to install additional utilities to achieve this (although I realise there are some that will do nice date formatting). Proving that this function is continuous on $G\times G$ How to start applications such as xcompmgr at start up? I've been trying to make xcompmgrto autostart in Lubuntu 11.10 but it just doesn't, I have to start it manually.  I have added the next lines to the autostart script in ~/.config/openbox/  #Run a composite manager xcompmgr &amp;   But whenever I log in it doesn't do anything, I don't really need any special parameters for it I just want it to start at log in.  How can I make it run automatically at login? Probability of first actor winning a "first to roll seven with two dice" contest? I am making the check for update script for my theme  I have 2 text files. First one is called "current.txt" and contains the current version. There is 4.1.1 string in that text file.  Second one is called "latest.txt" and contains the latest version. There is 4.2 string in this text file.  So here is the code  echo "Checking update"; x=$(cat ./current.txt) y=$(cat ./latest.txt) if [ "$x" -eq "$y" ] then        echo There is version $y update else        echo Version $x is the latest version fi   What it mean is if current.txt is NOT the same with latest.txt then it will say "there is version 4.2 update". If not, it will say "version 4.1.1 is the latest version"  But when I try to run it. I get this error  Checking update ./test.sh: line 4: [: 4.1.1: integer expression expected Version 4.1.1 is the latest version   So what am I doing wrong with this? From where do the permanent magnets get energy from? I have a doubt about permanent magnets. If a magnet is permanent it can attract some materials permanently.  Attracting something involves energy. If a permanent magnet can do this forever, from where does this energy come from? How can it not run out of energy? Doesn't it contradict with the laws of energy? Do Triggered effects stack? Case insensitive 'Contains(string)' Is there a way to make the following return true?  string title = "ASTRINGTOTEST"; title.Contains("string");   There doesn't seem to be an overload that allows me to set the case sensitivity.. Currently I UPPERCASE them both, but that's just silly (by which I am referring to the  issues that come with up- and down casing).  UPDATE This question is ancient and since then I have realized I asked for a simple answer for a really vast and difficult topic if you care to investigate it fully. For most cases, in mono-lingual, English code bases  answer will suffice. I'm suspecting because most people coming here fall in this category this is the most popular answer.  answer however brings up the inherent problem that we can't compare text case insensitive until we know both texts are the same culture and we know  what that culture is. This is maybe a less popular answer, but I think it is more correct and that's why I marked it as such. Proving Geometric Hahn-Banach Implies Analytic Hahn-Banach I've come across a proof online of the H.B theorem using the goemetric version.   There is a step in the proof which im not sure why is true and it is as follows:   Let $X$ be a linear space and $M \subset X \times \Bbb R$ be a maximal subspace.  Then $M = G(F)$ for $F :X \to \Bbb R$ linear.   Someone can show me why this is true?   Maybe I misunderstood the proof, its the last paragraph of Matrin's answer here -.   Thanks a lot for helping! Are there any good tools besides SeleniumRC that can fetch webpages including content post-painted by JavaScript? Why do prisms work (why is refraction frequency dependent)? It is well known that a  can "split light" by separating different frequencies of light:    Many sources state that the reason this happens is that the  is different for different frequencies.  This is known as .  My question is about why dispersion exists.  Is frequency dependence for refraction a property fundamental to all waves?  Is the effect the result of some sort of non-linearity in response by the refracting material to electromagnetic fields?  Are there (theoretically) any materials that have an essentially constant, non-unity index of refraction (at least for the visible spectrum)? Right place to ask a "discussion" question (I'm setting up a blog, what should....) What is the function of the "Sticky edges" on/off setting in displays? I have installed Ubuntu 12.04 (Precise Pangolin). If I open System Settings &gt;&gt; Displays there is a new (?) on/off button for a setting named Sticky edges.  Can someone tell me what this setting is supposed to control?