Weird screen output
Colored borders around windows after update
$f$ is surjective iff it has a right inverse: using the axiom of choice and errors in ProofWiki How to find out the default file manager in the terminal? PyQGIS couldn't import processing with standalone script I have read post on that problem (). The problem is even with a sys.path.append it couldn't import processing. It's very frustrated. Here the code I used:  #!/usr/bin/python  def main():     layer = QgsVectorLayer('/path/to/file.shp', "BAT","ogr")     QgsMapLayerRegistry.instance().addMapLayers([layer])      # Testing processing     try :         Processing.runalg("qgis:creategrid")     except:         print "Processing module has not been loaded"      #Check the QgsMapLayerRegistry for the layers     print QgsMapLayerRegistry.instance().mapLayers()     # Check if they are valid     print layer.isValid()  if __name__=="__main__":     import sys     from PyQt4.QtGui import *     from qgis.core import *     app = QApplication([])     QgsApplication.setPrefixPath("/usr", True)     QgsApplication.initQgis()      sys.path.append('home/qsuser/.qgis2/python/plugins')      # try to load processing     try:         from processing.core.Processing import Processing         Processing.initialize()      except:         print "unable to load processing"      main()      QgsApplication.exitQgis()   I could load QGIS and layer is valid that's ok, but processing resist to me. I am on Ubuntu 14.04 I use Pycharm to do it.  I tried on terminal with the python console, it raised this error:  Traceback (most recent call last):   File "&lt;stdin&gt;", line 1, in &lt;module&gt;   File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 572, in _import     mod = _builtin_import(name, globals, locals, fromlist, level)   File "/home/qsuser/.qgis2/python/plugins/processing/__init__.py", line 28, in &lt;module&gt;     from processing.tools.dataobjects import *   File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 572, in _import     mod = _builtin_import(name, globals, locals, fromlist, level)   File "/home/qsuser/.qgis2/python/plugins/processing/tools/dataobjects.py", line 35, in &lt;module&gt;     from processing.core.ProcessingConfig import ProcessingConfig   File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 572, in _import     mod = _builtin_import(name, globals, locals, fromlist, level)   File "/home/qsuser/.qgis2/python/plugins/processing/core/ProcessingConfig.py", line 30, in &lt;module&gt;     from PyQt4.QtCore import QPyNullVariant, QCoreApplication, QSettings ImportError: cannot import name QPyNullVariant   I don't know what I am missing.   Settings :  Qgis 2.12.1-Lyon Ubuntu 14.04 Trusty IDE : Pycharm 5 community Processing : 2.12.2   -- Edit -- And with the changes suggest by mathias kuhn  #!/usr/bin/python  def main():     layer = QgsVectorLayer('/path/to/file.shp', "BAT","ogr")     QgsMapLayerRegistry.instance().addMapLayers([layer])      # Testing processing     try :         Processing.runalg("qgis:creategrid")     except:         print "Processing module has not been loaded"      #Check the QgsMapLayerRegistry for the layers     print QgsMapLayerRegistry.instance().mapLayers()     # Check if they are valid     print layer.isValid()  if __name__=="__main__":     import sys     from qgis.core import *             from PyQt4.QtGui import *     app = QApplication([])     QgsApplication.setPrefixPath("/usr", True)     QgsApplication.initQgis()      sys.path.append('home/user/.qgis2/python/plugins')      # try to load processing     try:         from processing.core.Processing import Processing         Processing.initialize()      except:         print "unable to load processing"      main()      QgsApplication.exitQgis() How do I recursively create a folder inside another non-existent folder? I want to create this folder: $HOME/a/b/c/d while $HOME/a has not yet been created! Is it possible with one line in Terminal? Let me edit a post in the close review, then vote to close it I think we need a button that says Edit and Close added to the Review Close button options.  Many of these closed posts will be around forever (and should be, closed should not just be a path to deletion), so they need editing.  If I edit it now it goes away, with the only option being a back click to get back to the review, and then click into the post and edit it.  We have an Edit and Reopen button, so this would fit in just fine. Knowing which java.exe process to kill on a windows machine When a java based application starts to misbehave on a windows machine, you want to be able to kill the process in the task manager if you can't quit the application normally. Most of the time, there's more than one java based application running on my machine. Is there a better way than just randomly killing java.exe processes in hope that you'll hit the correct application eventually?  EDIT: Thank you to all the people who pointed me to Sysinternal's Process Explorer - Exactly what I'm looking for! VBA array sort function? I'm looking for a decent sort implementation for arrays in VBA. A Quicksort would be preferred. Or any other  other than bubble or merge would suffice.  Please note that this is to work with MS Project 2003, so should avoid any of the Excel native functions and anything .net related. How do I get breading to stick to pre-cooked chicken for pan frying? Is there a functional difference between the modern police station and classic police station? Suppose k is an integer such that $6k + 1$, $12k + 1$, $18k + 1$ are primes. Show that $n = (6k + 1)(12k + 1)(18k + 1)$ is a Carmichael number.  This is a question on a past exam that I find difficulty to answer. Can anyone help? Fastest way to move Collection from Sharded MongoDB Cluster to a another Sharded MongoDB Cluster How can I show or hide boot messages when Ubuntu starts? What is the physical significance of the off-diagonal moment of inertia matrix elements? The tensor of moment of inertia contains six off-diagonal matrix elements, which vanish if we choose a reference frame aligned with the principal axes of the rotating rigid body; the angular momentum vector is then parallel to the angular velocity. But while considering the general case, what are the off-diagonal moment of inertia matrix elements? That is, do they have any physical significance as [say] the components of a vector? Or is it merely a mathematical construction with no definite physical meaning (which seems rather wrong to me)?  A similar thread exists  but they are more interested in the principal axes of the body. It also says:     The physical significance of the off-diagonal components is that   you're using a coordinate system not aligned with the principal   directions of the object. They tell us nothing interesting about the   object itself.   Is that all or is there more to it, perhaps related to properties of tensors in general? AJAX: Check if a string is JSON? Configure Postfix to use external MX servers for delivery of local mail if user is unknown Evaluate $\prod \frac {2k - 1} {2k}$ I came across to this: evaluate $$\prod_{k = 1}^{n} \frac {2k - 1} {2k}.$$  I brought it to a closed-form expression in asymptotics but I suspect my asymptotics is bad and I also want to see different solutions, hence the question.  My original solution: Write   $$\begin {eqnarray} \prod_{k = 1}^{n} \frac {2k - 1} {2k} &amp; = &amp; \exp \left (\sum_{k = 1}^{n} \log \left (1 - \frac {1} {2k}\right) \right) \nonumber \\ &amp; = &amp; \exp \left (- \sum_{k = 1}^{n} \sum_{m = 1}^{\infty} \frac {1} {(2k)^m m}\right). \end {eqnarray}$$  Let $$S = \sum_{m = 1}^{\infty} \frac {1} {(2k)^m m} \tag {1}.$$ Multiply both sides of $(1)$ by $2k$ to get $2k S &lt; S + 1$, and by $4k$ to get $4kS &gt; S + 2$. Hence, $$\frac {2} {4k - 1} &lt; S &lt; \frac {1} {2k - 1}.$$ Then, $$\frac {1} {2} \left( \log (4n - 1) - \log 3 \right) - 2 + O \left(\frac {1} {n^2}\right) &lt; \sum_{k = 1}^{n} \sum_{m = 1}^{\infty} \frac {1} {(2k)^m m} &lt; \frac {1} {2} \log (2n - 1) - 1 + O \left(\frac {1} {n^2}\right).$$ Hence, $$\sqrt {\frac {c} {2n - 1}} &lt; \prod_{k = 1}^{n} \frac {2k - 1} {2k} &lt; \sqrt {\frac {3 c^2} {4n - 1}},$$ where $c$ is a constant. Any better approach? $|G|>2$ implies $G$ has non trivial automorphism Well, this is an exercise problem from Herstein which sounds difficult:   How does one prove that if $|G|&gt;2$, then $G$ has non-trivial automorphism?   The only thing I know which connects a group with its automorphism is the theorem, $$G/Z(G) \cong \mathcal{I}(G)$$ where $\mathcal{I}(G)$ denotes the Inner- Automorphism group of $G$. So for a group with $Z(G)=(e)$, we can conclude that it has a non-trivial automorphism, but what about groups with center? Use feature as module? Does anyone have experience with using a feature as a module? The usage I am talking about is strictly placing hooks inside the .module file. Can that trigger any sort of bug? How to run scripts without typing the full path? Identify story: Overpopulation problem causes people to live one day a week This story is about a man that is able to live every day of the week, while everybody else has a single day of wakefulness assigned to them. Due to overpopulation, each human spends 6 out of 7 days of the week in stasis, and has jobs assigned to them in daily shifts. 1/7 of the population works on Monday. 1/7 works on Tuesday, &amp; so on. The main character has found away to circumvent the process and illegally live out his days consecutively by skipping the stasis program that is imposed on the general population and by working a different job everyday. Can somebody name this scifi story?