How do I clip a shapefile with a raster file with gdalwarp?    Input: a shapefile Cutter: a raster file Output: a cut shapefile    I can only find the answer of cutting the raster file by a shapefile but not vice versa.
I need to clip a vector layer to the extent of a raster. It has to be very precise that's why I would not want to draw a polygon myself (and clip the two polygons). There seem to be some ways to clip a raster to a polygon but I have difficulties to find a solution to clip a polygon to a raster. I already tried to create a polygon out of my raster several times in ArcGIS and R, so I could clip the result. But every time it crashes because the raster is to big. There must be a simple way to solve this, and somehow I can just not see it at the moment.  How can I do this using GDAL?
Save site as template using client object model Problem with clickable archive.org URLs chown -R root.root / So I was working and there was a directory that I was periodically changing to my user in  a root terminal so that I could open the files in text editors, but I accidentally pressed / instead of . and this was the command I put out:  chown -R emil.emil /   Then immediately panicked ^C and put in another command, as I thought I could always change back the files I needed to access:  chown -R root.root /   So now I can't do su from emil to even try to fix this, as I'm getting permission denied error. I'm on Ubuntu could someone tell me if there is a way I could fix this, without absolutely reinstalling the whole thing.  TIP  If you are trying to get root access, and are getting this permission denied error when using su try this command:  gksu gnome-terminal   It will prompt you for the root password and open a new root terminal for some reason this works and gives me root access, when su doesn't. Does more reflective aluminum foil make a room cooler compared to less reflective foil? Aluminum foil is said to be not absorbing light at all. It reflects light. So, does it mean that a more shiny aluminum foil will reflect more light and thus make the room more cooler as compared to less shiny foil?  If yes, then where does unreflected light go in case of less shiny aluminum foil?  Does less shiny and more shiny actually make a difference? Why?  In order to keep whole room cool will it help if I stick the foil to the outside of wooden door (exposed to the sunlight) too? Typeerror: object.__new__() takes no parameters (help) What is the $n$ times iterate of $f(x)=\frac{x}{\sqrt{1+x^2}}$? Suppose you have 2 circles that intersect each other in such a way that each circle passes through the other's center. What is the area between the circle(or common area) i.e. area between the centres of the circles? How is double negation interpreted in English? Ramsey Number Inequality: $R(\underbrace{3,3,...,3,3}_{k+1}) \le (k+1)(R(\underbrace{3,3,...3}_k)-1)+2$ I want to prove that:  $$R(\underbrace{3,3,...,3,3}_{k+1}) \le (k+1)(R(\underbrace{3,3,...3}_k)-1)+2$$  where R is a Ramsey number. In the LHS, there are $k+1$ $3$'s, and in the RHS, there are $k$ $3's$. I really have no clue how to start this proof. Any help is appreciated! Well, luckily I got this error on my test environment. I'm so scared about this error that I disabled all logon triggers I was using on production environment.   I created the famous logon trigger, and I put a database in offline mode just to mess with something else. Then I discover that because the trigger can't find the table, I can't access the instance anymore. There are plenty of questions related to this, but even doing everything I could find, I still can't acces the instance, not even with SQLCMD.  I'm doing this:  sqlcmd -S server\instance -U sa -P &lt;pass&gt;  -A   If I don't use -A I receive the famous error:  logon failed for sa due trigger execution.   If I use -A:     Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : SQL Server   Network Interfaces: An error occurred while obtaining the dedicated   administrator connection (DAC) port. Make sure that SQL Browser is   running, or check the error log for the port number [xFFFFFFFF]. .   Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : Login timeout   expired. Sqlcmd: Error: Microsoft ODBC Driver 11 for SQL Server : A   network-related or instance-specific error has occurred while   establishing a connection to SQL Server. Server is not found or not   accessible. Check if instance name is correct and if SQL Server is   configured to allow remote connections. For more information see SQL   Server Books Online..   Why i'm not able to connect to the sql server    sql server express here.  I could enable SQL Browser, but I still can't access it.  I don't think this question is duplicated because is not about the trigger, is about Why I can't access the server with SQLCMD. I pretty much know how to fix this. I just don't know how can I acces sql server without triggering the trigger. sir, problem about a host file sir, over department created a host file to run over office program in windows, but they give us dell system having operating system ubuntu 16.4 now my question is that how this add file in ubuntu to run the program. the windows command is given below  TO ACCESS FIORI - Please Follow the Instructions in this Video  Path:- C:\Windows\System32\drivers\etc  Copy attached Hosts File in the above path.  Fiori Link to access SAP in Google Chrome: Why do adult insects have 6 legs? Apparently, there is an advantage to having 6 legs in the insect world. What is that advantage, if anything? Why would such an advantage exist for insects, but not for other, larger land animals?  What do those middle legs do that the front and hind legs cannot, if anything? Are they really essential, or do they just generate more muscle power? Uncountable ordinals without power set axiom Assume $M$ is a set, in which all axioms of $ZF - P + (V=L)$ hold. Does then $M$ believe that there exists an uncountable ordinal? I mean, why should the class of all countable ordinal numbers be a set? Propose Newbie-Overflow site or section Because the perl section is looking like that right now. I believe that Stack Overflow is going out of it's charter in becoming a newbie FAQ when as far as the original reasoning it was meant to be something along the lines of an expert site.   is a good example of what I mean in Perl. It probably could be closed because it's a duplicate, or some other reason.   I would also like to indicate that I don't hold back answering newbie questions. It's just when I think of an obscure "stack overflow" error that's beating you some 3 am close to deadline, that's not "Howcum Perl print ..." and follows with something that causes a vast majority of Perl programmers to say oops, because they know exactly what's going on.   So the proposal is   A new site. "Move to Newbieville" A new "section" A new status somewhat similar to Closed ("Newbied") but still can be updated all the same as an open question.   I'm not against giving some newbies an assist, but I feel a FAQ for rank newbieism is not something that SO started out to be, based on the original concept of a Expert Site.   Including comment to Gnoupi:   I said nothing about making newbies unwelcome. Like I said. I answer them--heck, I think I've even answer homework questions. I've answered on the vague impressions that I can glean from posts that have 4 close votes. It can even lead to avoiding downvoting or yelling at newbies by more established curmudgeons if there is a special action you can do to gently inform newbies that this is a real newbie question.  However, you have to know that to some people newbies are already unwelcome. There is a site ethic, but the individual is also going to decide how much they welcome newbies. And people do post RTFM answers already.   Anyway, I'm one vote away from a peer pressure badge it seems. (Nope, nailed it.)    EDIT  For somebody jumping to the conclusion that I'm hostile to newbies:  just earlier Prove that there is no retraction (i.e. continuous function constant on the codomain) $r: M \rightarrow S^1 = \partial M$ where $M$ is the Möbius strip.  I've tried to find a contradiction using $r_*$ homomorphism between the fundamental groups, but they are both $\mathbb{Z}$ and nothing seems to go wrong... Overriding the final destination of the OAuth2.0 flow from a custom OAuth2.0 Auth provider Background:  I have created a custom Auth. Provider in Salesforce to reach out to an authorization server that isn't on the default list of Provider Types. I used  as a good starting point to extend the Auth.AuthProviderPluginClass. Once appropriately added to my org, it then became an option on the list of Provider Types. I was able to create an Auth. Provider using that new provider type and it works to initiate the OAuth2.0 flow. I am appropriately able to get the access token and refresh token from the authorization server.  The Problem:  As it currently stands, we will have users click on a button that will send them to the provided "OAuth-Only Initialization URL" link that was generated when I created the actual Auth. Provider record. The trick is that when the OAuth2.0 flow is completed, the user is redirected back to the Salesforce Setup Home page, and I don't see a good way in the documentation to override the final destination to be something else (like a success page or something).  Question:  Does anyone know of a way to override the final destination of the OAuth2.0 flow from a custom OAuth2.0 Auth provider?    UPDATE: I tried using the startUrl (and also tried retUrl for good measure) as query params, but doing so didn't change the behavior after the OAuth2.0 flow finished.  Meaning, both of the following URLs gave me the same final destination as not having any query params at all:  https://&lt;scratch org random url&gt;.my.salesforce.com/services/auth/oauth/MyCustomAuthProvider?retUrl=lightning%2Fpage%2Fhome   https://&lt;scratch org random url&gt;.my.salesforce.com/services/auth/oauth/MyCustomAuthProvider?startUrl=lightning%2Fpage%2Fhome     Another Update: This WORKED:  https:/&lt;scratch org random url&gt;.my.salesforce.com/services/auth/oauth/MyCustomAuthProvider?startURL=%2Flightning%2Fn%2FCustomPage   Apparently, it was important to add the leading /, (of course, url encoded to be %2F) and %2Flightning%2Fpage%2Fhome gets interpreted as the setup home and sends you there.    (Parallel posted to Salesforce Dev Forum: ) I'd like to know if there is a way to run  program/shell script without typing full path:  /opt/idea/bin/idea.sh How do I load an mp4 video with multiple audio tracks into blender? Varnish cache with Nginx SSL termination How can I use varnish cache with nginx SSL termination for my SSL-Only (Https only) website? I use ubuntu 18.04 and I am currently running a wordpress site on my server. -Bash command not found appearing every time I start terminal every time I start my terminal, it always says "-bash:  .: command not found" twice.  Does anyone know how I can get rid of that?