I want to use routing for all incomming calls to my server and then only use the routing on some of these (depending on values in my database).  I know how routing is done, what I don't know is how to abort routing inside my IRouteHandler.  ex  if (routing)  {   // do routing      var page = BuildManager.CreateInstanceFromVirtualPath(VirtualPath, typeof(IHttpHandler)) as IHttpHandler;     return page; } else  {   // proceed as if no routing has been made }
Is it possible to have an ASP.NET MVC route that uses subdomain information to determine its route?  For example:   user1.domain.com goes to one place user2.domain.com goes to another?   Or, can I make it so both of these go to the same controller/action with a username parameter?
Can a coin with an unknown bias be treated as fair? Is there a simple method of parsing XML files in C#? If so, what? Windows 10 April 2018 Update added an extra Language and I cannot remove it I have just updated to Windows 10 April 2018 Update (1803 / 17134.1)  I had my laptop configured completely as UK with only a UK keyboard layout  Since the update, a US keyboard has been added so I now see the switch icon in my task bar    It appears that all the keyboard language settings are now migrated to the new Settings app and no longer in the old Control Panel    However, as can be seen from the screenshot above, the Remove button under the newly added US layout is greyed out (as is the UK one)  How can I remove the US layout?  UPDATE 1: I just updated my desktop and it hasn't added a US keyboard!  UPDATE 2: I added a third language (French) and was able to remove it, the button was enabled. The US remove button remained disabled both after adding French and after removing it.  UPDATE 3: I added another English language (Australian) and this cannot be removed! Button is disabled  UPDATE 4: I followed this  except I removed the values from the keys for all users and also the values under the Substitutions key. The task bar switch icon is gone but I still have all 3 languages in Settings still Does a Warlock receive the benefit of their familiar's Magic Resistance trait? The Warlock has access to special forms for their find familiar spell through the Pact of the Chain feature. I'm wondering if these special forms, the Quasit, Imp, and Pseudodragon in particular, allow the player character to share the familiar's Magic Resistance feature. In the Monster Manual each of these creatures has a sidebar that states that the familiar shares its Magic Resistance feature with the companion they are bonded to, but the PHB doesn't mention this in any of the creatures' stat blocks.   For example, in the Variant: Pseudodragon Familiar sidebar on page 254 of the MM it says:     "While the pseudodragon is within 10 feet of its companion,        the companion shares the pseudodragon's Magic Resistance trait."   This feature seems clear in the MM but I'm led to believe that it wasn't intended for Player Characters since mention of it is absent from the stat blocks in Appendix D of the PHB (pages 307-309).  Would a 3rd level warlock who chose one of these familiar forms through the Pact of the Chain feature benefit from advantage from saving throws from spells and other magical effects due to these special forms, or was this feature only meant for powerful NPCs and enemy spellcasters who had made this link with these familiars themselves? Zero search results when searching for [tagOne] [or] [tagTwo] score:-2 I'm able to search for the newest questions tagged with [xcode] and [ios] and score >= -2.    But I see 0 results when searching for the newest questions tagged with [xcode] or [ios] and score >= -2. What's the difference between eq, eql, equal and equalp, in Common Lisp? What's the difference between eq, eql, equal and equalp, in Common Lisp?  I understand that some of them check types, some of them check across types an all that, but which is which?  When is one better to use than the others? 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() Sometimes, others just inform us about things without us asking them, other times they do not do that even if we ask them. I want a verb for when others do not give us information — whether because they do not like to or they just don't give it, but we cannot directly ask them to — but we actively extract the information from them sometimes without them being aware of it.   So the word I am looking for shouldn't be only for cases where we coerce or force others to give us information, and it shouldn't be only for cases where others do not like to give us information.  Example:     I needed that information. But I couldn't ask her for it, or most   probably she would not give to me even if I asked her. So, I ....   the information I wanted.   It could be a phrasal verb and so not just a single word, but I couldn't devise a  blank suitable for all possibilities!   Two verbs I've already had but I think are not suitable:  to give someone the third degree   To prize something from/out of somebody Rotation and Scale have suddenly stopped working? I was working quickly, (making mistakes), and suddenly rotation and scale transforms stopped working. I think I hit some shortcut or button by accident. Translate still works though. I checked that the transforms weren't locked and such, to no avail. What could be the cause? What to do when you find a bad link in an answer? If a link has gone stale in an answer, what is the correct way to report this in the SO universe?  e.g. Jon's first link in    I have added a comment but not found the correct link yet. With powershell get exactly the same application list as in Add/Remove programms There are various methods to find installed applications on the system but to my knowledge none returns exactly the same list as control panel item Add Remove Programs. Some of the ways I tried are:   WMI via Win32_Product and Win32Reg_AddRemovePrograms Registry, both x32 and x64 branches   For instance, I have 217 entries in AR and   gwmi  Win32_Product   returns 261 items.  gp HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | ? {![string]::IsNullOrWhiteSpace($_.DisplayName) } | select DisplayName   returns 119 items.   (gwmi Win32Reg_AddRemovePrograms) + (gwmi Win32Reg_AddRemovePrograms64) | sort DisplayName -Unique    returns 107 items.  I tried to nail it down with more complex filter that included InstallLocation, InstallSource, InstallDate etc without success. Why am I constantly running out of space on my Galaxy S2? Saving for retirement without employer sponsored plan I'm considering moving to a new job that doesn't have any sponsored retirement plans.  I'd like to continue saving on my own though, but it seems that IRAs have a $5,000 contribution limits.  What are some other options to save in addition to an IRA?  I'm not interested in the obvious "put more into your bank savings account," I'm looking for options fairly close to an IRA (trading stocks on etrade also out) to save more.  Also, would contributions to the 401k prior to rolling into an IRA count against the contribution limit to the IRA? What is the best filesystem to use cross-platform (Linux, Windows, OS X) which supports disk sizes of at least 2TB and file sizes >4GB?  I'm planning to use it on a USB drive on different computers.  Are there any filesystems that can be used on all the named OSes without installing additional drivers? I don’t actually need to run the command below, and I am aware of ssh keys if I did want to log in without typing a password. I would just like to know how ssh seems to circumvent my file redirection.  Running the following command, ssh prompts me for a password:  ssh nobody@192.168.1.151 &gt; /dev/null 2&gt; /dev/null &lt; /dev/null   How does this work? stdin, stdout, and stderr are all redirected, but ssh still manages to print a prompt on my screen and read what I type. I tried adding the ssh arguments -t -t and -T (not both at once), to enable or disable pseudo-tty allocation, but it made no difference.  I also tried closing all input and output this way, although I don’t know if I typed it correctly. Still, ssh prompts for a password:  (exec 0&lt;&amp;- 1&lt;&amp;- 2&lt;&amp;- 0&gt;&amp;- 1&gt;&amp;- 2&gt;&amp;-; ssh nobody@192.168.1.151) How to calculate hash value of a file in Java? I'm trying to write an automated test of an application that basically translates a custom message format into an XML message and sends it out the other end.  I've got a good set of input/output message pairs so all I need to do is send the input messages in and listen for the XML message to come out the other end.  When it comes time to compare the actual output to the expected output I'm running into some problems.  My first thought was just to do string comparisons on the expected and actual messages.  This doens't work very well because the example data we have isn't always formatted consistently and there are often times different aliases used for the XML namespace (and sometimes namespaces aren't used at all.)  I know I can parse both strings and then walk through each element and compare them myself and this wouldn't be too difficult to do, but I get the feeling there's a better way or a library I could leverage.   So, boiled down, the question is:  Given two Java Strings which both contain valid XML how would you go about determining if they are semantically equivalent?  Bonus points if you have a way to determine what the differences are. Read two column CSV as dict with 1st column as key Is there a word for someone who won't think critically? Is there a word for someone who won't think through issues and instead comes to others hoping that they will think for them and solve problems for them?  A word that is more specific to a lack of critical thinking skills than "lazy"? Where in the world is tikzlibraryhobby.code.tex? I was trying to reproduce Claudio Fiandrino's answer to .  However, I do not have the hobby package by Andrew Stacey in my local distribution.  After reading  and , I looked at the latest  (build on December 7, 2012) but could not located the hobby package in it.  I found  but do not know where each file is supposed to go in my distribution.  How do I add the hobby package? In general, what would be the easy way to get any new TikZ package installed in a Mac?  EDIT:  I have used the drag-and-drop (mac) method as described below.  (1) Drag pml3array.sty file to /Users/Username/Library/texmf/tex/latex folder. (2) Drag hobby.code.tex file to /Users/Username/Library/texmf/tex/generic/pgf/math folder. (3) Drag pgflibraryfpu.code.tex to /Users/Username/Library/texmf/tex/generic/pgf/libraries folder. (4) Drag tikzlibraryhobby.code.tex to /Users/Username/Library/texmf/tex/generic/pgf/frontendlayer/tikz/libraries folder.  I no longer get the hobby cannot be found error message.  But, is this correct?