Null Pointer Exception when trying to take a screenshot with selenium
What is a NullPointerException, and how do I fix it?
Kernel of a substitution map When using custom path style in a tikz graph the quotes label isn't printed I would like to use pgfplots to create a figure where I plot curves that have a recursive formula. I tried a very simple case that uses the declare function command to see whether this is possible, and I can't compile (TeX capacity exceeded). Is it even possible to do this?  \documentclass{standalone}  \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture}[   declare function={test(\p)=ifthenelse(\p&gt;1, test(\p-1), 0.5);}, ]     \begin{axis}[]     % use TeX as calculator:     \addplot [mark=none] {x};     \addplot [mark=none] {test(0)};     \end{axis} \end{tikzpicture}  \end{document} OS is openSUSE 12.1, PostgreSQL - 9.1, PostGIS - 2.0. Postgre/PostGIS are installed from Application:Geo repository.  After recent updates when I try to connect to my database I get the following error:      ERROR:  could not load library "/usr/lib/postgresql91/lib64/postgis-2.0.so":  /usr/lib/postgresql91/lib64/postgis-2.0.so: undefined symbol: pj_get_spheroid_defn   I searched the web for this error (, ) and seems that it may have something to do with ld.so.config (or ldconfig command). But I can't figure out what I have to do in my case. In , they give rules so that players can make all the rolls, rather than the DM sometimes rolling for enemies. In one section, there are specifically , which the players roll against, rather than the DM. However, after doing some math, I think they've made a mistake. They say that you convert a Saving Throw into a Saving Throw Check by adding 11 to the defender's saving throw modifiers, and using that as the DC for the check.  The player then rolls against this DC, adding their spellcasing ability modifier and proficiency bonus.  However, according to the following math, this conversion does not produce the same results. In this math, I compare the chances of a player succeeding on a saving throw check, using the rules in the UA article, and of a monster failing its saving throw using the standard PHB rules. If the math is correct, both of these results should have the same chance. These are the formulas I used.  Chance to succeed Saving Throw Check = (20 - DC + 1 + proficiency + casting mod) / 20 Chance to FAIL a Saving Throw = (DC - 1 - save proficiency - save mod) / 20  Assuming a proficiency bonus of +2, +0 for all ability mods, and no save proficiency:  Monster's Saving throw Check DC = 11 + save mod = 11 Chance to succeed a saving throw check DC11: (20 - 11 + 1 + proficiency + casting mod) / 20 = 12/20 = 60% Player's Saving throw DC = 8 + proficiency + spellcasting ability mod = 10 Chance for monster to fail saving throw DC10: (10 - 1 - save proficiency - save mod) / 20 = 9/20 = 45%  If this were a valid conversion, both formulas would result in the same chance of success for the player, and failure for the monster respectively, however, they are off by 15%. This suggests that the unearthed Arcana's rules are not a valid conversion. Are the Unearthed Arcana rules wrong, or is my math wrong? Are Android OS updates region specific? Well, I have a Galaxy Ace with 2.3.3, build XWKPY and Samsung Kies doesn't show an update to 2.3.4 yet.  I'm thinking of manually updating it through Odin and I need to know if I can just download any Gingerbread 2.3.4 update file or is there anything else that I need to be worried about? Categorical Quotient and group actions I am trying to practice calculating categorical quotients and I ran into this example. I am unable to get the answer and was wondering if someone can help?  Let $G = Z/3Z =$ $\{1, \omega, \omega^2\}$, where $\omega$ is a cube root of unity. Let $G$ act on $𝔸^{2}$ via $\omega(x, y) = (\omega x, \omega y)$. Find the categorical quotient of $𝔸^{2}$ by G. I have many tags marked as "interesting" and others as "ignored". (I use Java at work, I'm a Cocoa guy by night, any anything dealing with Windows/.NET/C# simply doesn't apply to me.) When tags are added to the list in the right navbar, they appear in the order in which they were added. There are several problems with this:   It can be difficult to visually locate a tag quickly, unless you have memorized its location. The tags appear as the same gray boxes like everywhere on SO, but with a small "x" afterward, and they wrap based on size. This tends to leave a ragged right margin and wasted space. Ordering based on when the tag was added is not always the most intuitive default. Various users might prefer to view them alphabetically, by popularity, recent activity, etc.   It would be nice to introduce a tabbed interface to switch between various orderings, and remember the value in the cookie, profile, etc. Coupled with this, perhaps users could specify a custom ordering that works best for them? (Currently the workaround is to copy all the tag names, remove them all, and re-add them in the desired order, but this is obviously annoying.)  Thoughts? In a multiple regression, the regression coefficient of the two subsamples is opposite to that of the full sample. Both coefficients are significant. The sum of the number of obs in the two subsamples is equal to that of the full sample. Is this normal? What are the possible causes? Thanks. He is loved.   This is something that I've always kind of wondered.  In a sentence like this, is loved a verb or an adjective? Can it be considered either? In Java, I'm dynamically creating a set of files and I'd like to change the file permissions on these files on a linux/unix file system.  I'd like to be able to execute the Java equivalent of chmod. Is that possible Java 5? If so, how?  I know in Java 6 the File object has setReadable()/setWritable() methods. I also know I could make a system call to do this, but I'd like to avoid that if possible. Can a university revoke one's degree for his minor misconduct? Can't run a shell script So I have this script:  #!/bin/bash # Flips the screen (hopefully)  syntax_error=0 orientation=0  current_orientation="$(xrandr -q --verbose | grep 'connected' | egrep -o  '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')" case $current_orientation in         normal)                 current_orientation=0         ;;         left)                 current_orientation=1         ;;         inverted)                 current_orientation=2         ;;         right)                 current_orientation=3         ;; esac  if [ $current_orientation -eq 0 ]; then         orientation=2 fi  if [ $current_orientation -eq 2 ]; then         orientation=0 fi method=evdev  # LENOVO S10-3t CHANGE ==&gt; Hard Coded my device number to 11!!!!!!!!  device=11  swap=0 invert_x=0 invert_y=0 real_topx=0 real_topy=0 real_bottomx=4020 real_bottomy=4020  case $orientation in         0)                 swap=0                 invert_x=0                 invert_y=0                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomx                 bottomy=$real_bottomy         ;;         1)                 swap=1                 invert_x=1                 invert_y=0                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomy                 bottomy=$real_bottomx         ;;         2 )                 swap=0                 invert_x=1                 invert_y=1                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomx                 bottomy=$real_bottomy         ;;         3 )                 swap=1                 invert_x=0                 invert_y=1                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomy                 bottomy=$real_bottomx         ;; esac  if [ $method = "evdev" ]; then         xinput set-prop "$device" "Evdev Axes Swap" $swap         xinput set-prop "$device" "Evdev Axes Swap" $swap         xinput set-prop "$device" "Evdev Axis Inversion" $invert_x $invert_y         xinput set-prop "$device" "Evdev Axis Calibration" $topx $bottomx $topy $bottomy         if [ $orientation = 2 ]; then                            xrandr -o inverted         fi         if [ $orientation = 0 ]; then                 xrandr -o normal         fi fi  #   It's for flipping screen in my Lenovo S10-3t. I copied it from the netbook's wiki page, and added the #!/bin/bash at the top. The filename is flipscreen.sh. How can I make it work? In chrome, most of the time, when i middle click on a link (text or image), it opens a new tab and the current tab does not change. This is the expected behaviour.  However, some websites have links (i'd say 5%) that also switches the current tab to the new one. For example: on this , the name of the players in the main list have the problem.  By looking at the source, i didn't find anything anormal (the link is a standard html tag). But if i disable javascript, i have not the problem. I looked at the source, and didn't find the problematic script... Note also that if i open the tab with right click > open link in new tab, there is no problem.  I'd like to know if you find the reason of the problem and how i can fix it. I am running chrome 10.0.648.204 on windows 7 x64.  EDIT: the website above does not exhibit the behavior anymore, but I sill have the problem sometimes on other sites (which I don't remember) Houston, we have a porblem Since  in titles, and there's not even a way  (or ) we all know users just get around that filter by typing various permutations of the word "problem".  The filter has . The bottom line there was:     "Hacking around" the filter is in fact very very rare.   I beg to disagree. I tried searching Stack Overflow for the following variations of the title:  problme probelm probeml probmle probmel prolbem prolbme prolebm prolemb prolmbe prolmeb proeblm proebml proelbm proelmb proembl proemlb   These are just a couple of permutations from 5040 possible ones. I also tried searching for variations with left out letters, like proble, or prblm. Here's just a graph of a subset from maybe 20 searches—but in reality, there might be more ways to get around the filter:    Was this ever intended? I know it saves a lot of bad titles from being created, but on the other hand it enforces even worse titles as well. 3% based on the  aren't much, but they're 3% crap the filter actively provokes.  Now, my questions up for discussion are:   What are we going to do about this large number of porblematic posts? It seems almost impossible to fix all those. We now have a really good review system that allows people to dig through low quality posts the entire day, so that'd be a way to address this of course. Are there any plans of getting rid of the filter again? This, at least, would give you a good indicator of poor quality. If a post title contains the word "problem" you instantly know something's off. Why not have it reviewed? I understand that some people will choose a better title after being blocked, but I don't even want to start looking at the number of those who merely did a s/problem/issue, or even worse, just used "problems" (because that's not blocked, just sayin').   In the end I'm just thinking if there was a way to clean up the back log on this, or how to prevent more posts of this sort in the future, even with a title filter in place if it has to be. How can I add a new user as sudoer using the command line? After I add a user using adduser, I can't see it via System > Administration > Users and Groups unless I log out and then log in again. Is that normal?  Also, can I set a newly added user as a sudoer or do I have to change that only after adding it? How can I do that via the shell?  Finally, can I delete the original user that was created upon initial installation of Ubuntu, or is this user somehow 'special'? Why does parameter expansion with spaces without quotes work inside double brackets "[[" but not inside single brackets "["? I'm confused with using single or double brackets. Look at this code:  dir="/home/mazimi/VirtualBox VMs"  if [[ -d ${dir} ]]; then     echo "yep" fi   It works perfectly although the string contains a space. But when I change it to single bracket:  dir="/home/mazimi/VirtualBox VMs"  if [ -d ${dir} ]; then     echo "yep" fi   It says:  ./script.sh: line 5: [: /home/mazimi/VirtualBox: binary operator expected   When I change it to:  dir="/home/mazimi/VirtualBox VMs"  if [ -d "${dir}" ]; then     echo "yep" fi   It works fine. Can someone explain what is happening? When should I assign double quotes around variables like "${var}" to prevent problems caused by spaces? How to serve static files in Flask How to create animated GIFs of prototype mockups, like the ones on Dribbble? I'm sure you've seen Dribbblers upload animated mockups of their designs.   Here's an example:     I can create mockups on Photoshop and even apply simple Tween Animations to them but I can never get my GIFs to look like the example here.   What are Dribbblers using to create these animations?   Notice that the animations also include touch points and perfect motion. I would like to convert my Photoshop mockups to do the same.  How can I create an animated example of my mockups, similar to the ones created by Dribbblers? Why does my user number show up in the search box when clicking my profile information? Hey all-  I just noticed that if you click on your username on the top bar, when your profile shows up, in the search bar at the top you'll find an explicit search for your user account.  For my meta account, for example, I see user:157031 whenever I click on my profile.  Is this deliberate?  If so, can I suggest removing that text?  It means that I have to manually delete the contents of the search field if I want to do a search from my profile screen.  Thanks!