Using boundaries of city to cover world outside of it in solid color? I need to create a mask to cover the rest of the world outside of a single city. ().  I've been told by support to open those boundaries "create a new geospatial file that would be made up of a rectangle that covers the whole earth with a hole in the shape of your city in the middle."   From there, I need to upload that file to Mapbox Studio and add it to cover the rest of the world outside of my city. I'm looking to style OpenStreetMap in Mapbox afterwards for that city. So this is a workaround for not being able to edit a single city in Mapbox Studio.  How would I create this mask?
Using PyQGIS to transform layer of polygons into layer of holes inside bbox? I'm using python in QGIS. I have a layer of polygons (its a result of some earlier dissolving and has no overlapping polygons but some holes and islands in holes etc). I want to build a new layer which contains one polygon representing a bbox of the first layer with each polygon cut from it.  Essentially I want to "invert" the layer I have so that where the was polygon, now there is not, and where there was not polygon now there is. All inside a bounding box of the original layer.  I can build a bbox easily and I tried to "subtract" the polygon layer from my new bbox polygon layer but the process slows to a stop and then crashes my PC. Here's the algorythm  processing.runalg("qgis.difference","path/to/polygon.shp","path/to/bbox.shp","path/to/result.shp")   I dont care about attributes (obviously). I just need to cut one set of polygons from one larger polygon.  It seems so simple, I wish I could find a simple command or script to acheive this. As stated at the top I'm looking for a solution in python in QGIS.
How to forward specific log file outside of /var/log with rsyslog to remote server? How can I forward message from a specific log file like /www/myapp/log/test.log with rsyslog client to remote rsyslog server? This log file is outside of the directory /var/log. I setup my Nginx conf as per  , and now http2 is available...  But in Chrome (Version 54.0.2840.98 (64-bit))  Dev tool, it's always on HTTP 1/1 :  NAME             METHOD  STATUS  PROTOCOL shell.js?v=xx..    GET    200     http/1.1   my server is running Ubuntu 16.04 LTS which supports both ALPN &amp; NPN , and the openssl version shipped with it is 1.0.2g  I checked http2 support with and the result is :    Yeah! example.com supports HTTP/2.0. ALPN supported...   Also checking with curl is OK   $ curl -I --http2 https://www.example.com   HTTP/2 200    server: nginx/1.10.0 (Ubuntu)   date: Tue, 13 Dec 2016 15:59:13 GMT   content-type: text/html; charset=utf-8   content-length: 5603   x-powered-by: Express   cache-control: public, max-age=0   etag: W/"15e3-EUyjnNnyevoQO+tRlVVZxg"   vary: Accept-Encoding   strict-transport-security: max-age=63072000; includeSubdomains   x-frame-options: DENY   x-content-type-options: nosniff   I also checked with is-http2 cli from my console  is-http2 www.amazon.com × HTTP/2 not supported by www.amazon.com Supported protocols: http/1.1  is-http2 www.example.com ✓ HTTP/2  supported by www.example.com Supported protocols: h2 http/1.1   tested with openssl from my localhost  $ echo | openssl s_client -alpn h2 -connect www.example.com:443 | grep ALPN  depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3  verify return:1  depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3  verify return:1  depth=0 CN = example.com  verify return:1  ALPN protocol: h2  DONE   why Chrome is left behind it ? How can I check it also with Safari (v 10.0.1) I have installed Ubuntu 12.04-64 bit on my Lenovo IdeaPad laptop, and the wired Ethernet (LAN) connection doesn't work.  Running the lspci -vv | grep Atheros command from the terminal shows me I have the AR8161 Gigabit Ethernet controller:  02:00.0 Ethernet controller: Atheros Communications Inc. AR8161 Gigabit Ethernet (rev 08)   This looks like a new product whose drivers are not built into Ubuntu.  How do I install drivers to get the AR8161 working? ggplot2: facet_wrap strip color based on variable in data set The set of functions which map convergent series to convergent series Suppose $f$ is some real function with the above property, i.e.  if $\sum\limits_{n = 0}^\infty {x_n}$ converges, then $\sum\limits_{n = 0}^\infty {f(x_n)}$ also converges.   My question is: can anything interesting be said regarding the behavior of such a function close to $0$, other than the fact that $f(0)=0$? Is "you are welcome" more polite than "no problem"?  What is the general proper reply to a thank-you? One of the most commonly asked questions of beginners. How do ranks work in Go for amateurs?  Why do we start backwards? And why do we suddenly count upwards again? What is the difference between 9d and 9p? How is this related to rating? What are the basic differences between ranks used in different countries and different servers? How do I unlock the Dream Suite in Animal Crossing New Leaf? How can I get the list of available databases on a SQL Server instance? I'm planning to make a list of them in a combo box in VB.NET. Quick question to anyone who has used this LaTeX template:    Any ideas on how to change the left margin to get more words onto one page? E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) I'm trying to run this command in the terminal:  sudo apt install software-properties-common   This is the error message I get:  E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)   E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend),     is another process using it? What is the relation between normal extension and separable extension? What is the relation between normal extension and separable extension? Let F be the algebraic extension of K, if F is a separable extension of K,if and only if F is a normal extension of K? is this correct? Graphing y=x^2 and y=x I want to draw the region bounded by y=x^2 and y=x. Any ideas? I was hoping this would be somewhat simple. I've tried used a similar, with \begin{axis}..\end{axis}, but it doesn't like that. Did I not declare a package or something?   Also, if I wanted to show the solid this region creates by rotating it about the x-axis, is there a way to did this in latex? (If you had cal 2, think volume of a solid rotated about ...). I was given the files for a mini linux, that boots directly into firefox. It works for all it should be doing, only that I do not get an internet connection.  We have 3 DNS servers in the network, which all work. I can ping them, too. But when trying to ping google.de or wget google.de I get a bad address error.  nslookup google.de works for some reason.  I tracked the issue down to my resolv.conf on the booted system not having the same contents as the resolv.conf that I put into the .iso file.  I tried understanding all the factors that go into creating and modifying resolv.conf. I'm not quite sure I got it all, but I definitely didn't find my solution there.  So as a last ditch effort, I tried making the resolv.conf file immutable using   :~# chattr +i /etc/resolv.conf   When rebuilding and booting again to my surprise my file was renamed to resolv.conf~ and in its place was the same standard file that has been haunting me.   The file contents make me believe it gets the information from the network itself. When starting the .iso in Virtualbox without internet access, my file is being kept as it is.  I tried changing /etc/dhcp/dhclient.conf to not get the information from the net, by deleting domain-name-server and domain-name-search from the request part of the file.  Didn't work unfortunately.  I don't have the NetworkManager installed. The iso is based on Ubuntu 14.04.  There is probably vital information missing. I'm happy to provide it.  UPDATE:  I think I found the file that clears resolv.conf.  It seems to be /usr/share/udhcpc/default.script  #!/bin/sh  # udhcpc script edited by Tim Riker &lt;Tim@Rikers.org&gt;  [ -z "$1" ] &amp;&amp; echo "Error: should be called from udhcpc" &amp;&amp; exit 1  RESOLV_CONF="/etc/resolv.conf" [ - n "$broadcast" ] &amp;&amp; BROADCAST="broadcast $broadcast" [ -n "$subnet" ] &amp;&amp; NETMASK="netmask $subnet"  case "$1" in     deconfig)         /bin/ifconfig $interface 0.0.0.0         for i in /etc/ipdown.d/*; do             [ -e $i ] &amp;&amp; . $i $interface         done         ;;      renew|bound)         /bin/ifconfig $interface $ip $BROADCAST $NETMASK          if [ -n "$router" ] ; then             echo "deleting routers"             while route del default gw 0.0.0.0 dev $interface ; do                 :             done              metric=0             for i in $router ; do                 route add default gw $i dev $interface metric $((metric++))             done         fi          echo -n &gt; $RESOLV_CONF # Start ----------------           [ -n "$domain" ] &amp;&amp; echo search $domain &gt;&gt; $RESOLV_CONF         for i in $dns ; do             echo adding dns $i             echo nameserver $i &gt;&gt; $RESOLV_CONF         done         for i in /etc/ipup.d/*; do             [ -e $i ] &amp;&amp; . $i $interface $ip $dns          done # End ------------------         ;; esac  exit 0   It's part of the udhcpc program. A tiny dhcp client, that is part of busybox  Will investigate further.    UPDATE2 AND SOLUTION:  I commented the part out (#Start to #End), that seemingly overwrites the /etc/resolv.conf file and sure enough. That was the culprit. So an obscure script caused all this trouble.  I changed the question to reflect, what actually needed to be known to solve my problem, so it would be easier to find for people with the same problem and so I could accept an answer.  Thanks for the help here in figuring things out. How closely can a game legally resemble another? Isn't less just more? When I do more filename and less filename, it would seem that the resulting terminals are quite similar. I can navigate and search through my files identically (j, Space, /pattern, etc.).  I find it hard to believe that less is more and vice versa. Are there any differences between the two? Sci-fi book, blue critters than only some people can see, kids fight the critters as they feed off energy and are a threat I can't really remember how long ago it was, but I think the book was marketed towards children/teens.  All I remember is the basic premise of the story.  Some story about these unusual little blue electric critters that only certain people could see, and these kids took it upon themselves to go about destroying them since they fed off energy or something like that.  Not sure whether they fed off people or off electricity... or both maybe?  I think the dominant method of destroying them was an electric baton that was taken from law enforcement.  I wanna call them buzz batons, but that's probably thanks to Artemis Fowl. map collections I am new to Apex and just starting to understand using maps to avoid loops within loops and hitting limits. My trigger below updates opp line items with the internal cost from another object using a map and the one value - "Service_Name".  My issue is I need to update another field on the Opp line item with "Agent Fee" in the same way  - but there are 4 criteria to get the right Agent Fee from another object. I cant see how do so this other than have a loop of agent Fees object with the opp line loop? How else can I do this? Is it possible with Maps ?  trigger sectortest on Opportunity (after update) {          for (Opportunity eachopportunity : Trigger.new){                                        //Get costs for the Opps FY and put in map         List&lt;Internal_Costs__c&gt; costs = [SELECT Id, Financial_Year__c, Service_Name__c, Standard_Cost__c  FROM Internal_Costs__c WHERE Financial_Year__c =: eachopportunity.Financial_Year__c];          Map&lt;string, Decimal&gt; costmap = new Map&lt;string, Decimal&gt;();         for (Internal_Costs__c eachcost : costs){                                         costmap.put(eachcost.Service_Name__c, eachcost.Standard_Cost__c);                         }                 //Get Line Items for Opp         List&lt;OpportunityLineItem&gt; opplines = new List&lt;OpportunityLineItem&gt;();           opplines = [SELECT Id, DS_Status__c, Country__c, Product2Id, UnitPrice FROM OpportunityLineItem WHERE OpportunityId =: EachOpportunity.Id];           List&lt;OpportunityLineItem&gt; opplinesupdate = new List&lt;OpportunityLineItem&gt;();                //assign cost to line items              for (OpportunityLineItem EachOppline : opplines) {                                                                                              decimal cost = costmap.get(EachOppline.Service_Name__c);                                                                 EachOppLine.Internal_Cost__c = cost;                                                                             opplinesupdate.add(EachOppline);                                                                                                                                                        }              update opplinesupdate;                        }                       } Using Apple Script to Manage Sound Output Selection I am brand new here and I have an additional clarification or need additional help for an issue from this thread -   In my preference pane, in addition to Headphones and Digital out, I also have 2 apple monitors and would like the option of selecting one of them as out put (namely the first one in the list).   Basically I need help with adjust his solution to be able to select the third row or first monitor as sound output.  Or a way to accomplish this without knowing how to edit AppleScript for a different setup. Does "She had a brother" mean that her brother is dead? My Friend has sent me this riddle to solve:     "If you solve this, then you are a genius. Mr.Smith has 4   daughters🙍‍♀🙍‍♀🙍‍♀🙍‍♀ and each daughter had a brother.  How many   children does Mr. Smith have now?"   He said the answer is not 5, but 4 only as in the riddle it is mentioned as each daughter had a brother. So their only brother is dead.     Is he right?