Photoshop Layer -> SVG
Photoshop layers into SVG paths
"Like" versus "as" Does anybody of a way to access files and directories that have a % in their name (which is valid) from the command-line? Specifically, if there are two %’s and the text between them happens to correspond to an environment variable.  For example, if there is a file called C:\blah\%temp%.txt or a folder called C:\Program Files\%temp%\, none of the following will work because the variable gets expanded:  &gt; dir "c:\blah\%temp%.txt" &gt; dir "c:\blah\^%temp^%.txt" &gt; dir "c:\blah\%%temp%%.txt" &gt; dir "c:\blah\\%temp\%.txt"  &gt; dir "c:\program files\%temp%" &gt; dir "c:\program files\^%temp^%" &gt; dir "c:\program files\%%temp%%" &gt; dir "c:\program files\\%temp\%"    Using wildcards will work, but does not uniquely select the file/folder and may include others:  &gt; dir "c:\blah\?temp?.txt"        (also shows ztempz.temp, 1tempa.txt, etc.) &gt; dir "c:\program files\?temp?"   (likewise)    (This is frustrating because every now and then—usually when Explorer is restarted for whatever reason—the environment variables stop expanding and some places where they are used end up creating files or directories with the environment variable in it. For example, because I configured Chromium to store its cache in a subdirectory of %temp%, if the variable expands, it is fine, but when it doesn’t, Chromium creates a directory called %temp% under its own directory and stores the cache—which can get large—there. I want to add a line to my temp-/junk-file cleaning script to automatically delete that folder if it exists, but I cannot figure out how to access it from the command-line without resorting to wildcards.) How can I disable Amazon search results in the Dash? different possible definitions of the exterior derivative? In Helgason, "Differential Geometry, Lie Groups and Symmetric Spaces"  we have the formula for the exterior derivative  $(p+1)d\omega(X_{1}, \ldots X_{p+1})=\Sigma_{i=1}^{p+1} (-1)^{i+1} X_{i} \cdot \omega(X_{1}, \ldots , \hat{X_{i}}, \ldots X_{p+1})+\Sigma_{i&lt;j} (-1)^{i+j}\omega([X_{i}, X_{j}], X_{1}, \ldots , \hat{X_{i}}, \ldots \hat{X_{j}}, \ldots , X_{p+1})$  but in other sources on-line they have the same formula without the factor of $p+1$ on the left-hand side.  Are there two different definitions of the exterior derivative, or is there an error in Helgason? Is there a good word for a square-rectangle relationship? Any given square is always a rectangle, but a rectangle isn't necessarily a square, so squares and rectangles have a _ relationship. I've been noticing this sort of thing everywhere ever since I noticed that I didn't know a good word for it. I've been calling it a container relationship because one class of things is contained within a larger class of things. However, a "container" relationship doesn't sound very good and doesn't really convey the meaning on its own. A more elegant word would be helpful.  Edit: A specific definition would be something like: a is always b. b is sometimes a. Theoretically possible to run two operating systems simultaneously? A friend of mine asked a question that got me thinking. Is it possible (theoretically, I assume it hasn't been done) to run two operating systems simultaneously on the same computer? Not in the sense of multitasking in one window, but being able to quickly switch from one to the other without restarting. Could something low-level be created that would intercept system calls (or whatever needs to be done) to make each OS think it is running alone? Or hardware itself that would accomplish this?  I'm not talking about dual booting or using virtual machines, but actually running two OS's side-by-side. Can the Earth's magnetic field be used to generate electricity? Removing a list of characters in string A couple of months ago, I suggested a set of badges for . The responses were... mixed. The  can be summarized:  In practice, all this would do is encourage people to ask yet more stupid, worthless questions and we have quite enough of that as it is.  We believe that one of the main things holding back many of our beta sites is that when people have questions they aren't in the habit of asking on the site. Even our flagship site, Stack Overflow, doesn't get many questions from its most knowledgeable users. Perhaps they don't have questions, but far more likely they find answers without needing to ask. Our subtle bias against asking (questions =&gt; clueless) means we lose out on what might be our best source of excellent questions. So we went back to the drawing board and designed a badge set that should not encourage worthless questions:  Asked a well-received question on X separate days, and maintained a positive question record.  In order to award badges, we need to define our terms:  positive question record   (total questions - negative questions - closed - deleted)/total questions &gt;= 0.5  It triple counts a question that is downvoted, closed, and deleted. If you ask one that hits that trifecta, you'll need to ask three better questions to dig yourself out. My own record of asking does not meet the criteria:   (44 - 0 - 12 - 12)/44 = 0.4545...  My  looks a lot better; I had a bunch of questions from the beta period that have been subsequently (and rightfully) deleted. With care, I could bring my record into positive territory with 4 questions. The takeaway is that people can't sweep past indiscretions under the rug by deleting them. And they can recover from a bad start as long as they don't ask more bad questions.  well-received question on X separate days A well-received question is one that's open, not deleted, and has a score &gt; 0. If you ask at least one well-received question in a  and none of your questions that day are deleted, downvoted, or closed, you get one more day of credit toward the badge. Whenever the badge criteria is checked, previous asking days are re-evaluated so that there's an incentive to fix downvoted and/or closed questions. The no-deleted-questions criteria is to prevent people from asking several questions at once and deleting any that aren't upvoted or answered to ask another day. (Though this is a losing strategy in the long run.)   My proposed badge names and levels:  Asked a well-received question on 5 separate days, and maintained a positive question record.  Asked a well-received question on 30 separate days, and maintained a positive question record.  Asked a well-received question on 100 separate days, and maintained a positive question record. In addition, since some outstanding individuals ask on more than 100 days, the gold badge may be awarded multiple times. Over on English, Oishi-sama (now a ) would have a remarkable . Bronze and silver badges are only awarded once. We've decided to hold off on multiple awards for now. See the . Neither the names nor the levels nor even the descriptions are set in stone. Please play around with  to get an idea of how the badge works using our public data. Since the query does not account for deleted questions, it's a bit more generous than the actual badges would be. This version of the badge set should encourage a habit of well-received questions over time and encourage people to fix poorly received questions.  I'd like to express my gratitude to the Parenting community for participating in our . The units of $\mathbb Z[\sqrt{2}]$ I have forgotten my keystore password and I want to install my apk on Google Play. What do I do? How do I make a Theme from scratch for Unity? I'd like to make a theme from scratch for Unity.  What knowledge and information/skills are needed? Are there any tools or templates out there for something like this already? I don't have any Python experience so tools biased towards beginners are preferable. Ambiguity in Negation: "John did not come because of the rain" Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval. using the \lstlistoflistings always named as Contents in table of contents.  I did look into   and  but the solutions there did not work.  Example: (my complete preamble)  \documentclass[11pt, oneside]{Thesis}  \usepackage{tikz} \usepackage{pgfplots} \usepackage{pgfplots,filecontents} \usepackage{caption} \usepackage{subcaption} \usepackage{booktabs,colortbl} \usepackage{graphicx} \usepackage{rotating} \usepackage{listings} \usepackage{color} \usepackage{comment} \usepackage[official]{eurosym} \usepackage{colortbl} \usepackage{algorithm}  \usepackage{algpseudocode} \usepackage{indentfirst} \usepackage{latexsym} \usepackage{titlesec} \usepackage[square, numbers, comma, sort&amp;compress]{natbib}   \hypersetup{urlcolor=blue, colorlinks=true}  \renewcommand{\lstlistlistingname}{List of Code}   \begin{document}  \tableofcontents \lstlistoflistings \lstinputlisting[language=python,firstline=1,lastline=68,caption=some caption here., label=code:getbb]{Code/getBoundingBox.py} \end{document}   The renew command changes the header in the page but not in the table of contents. Any ideas?  EDIT x2:  Managed to get the naming correct by editing this in the Thesis.cls   }  \renewcommand\lstlistoflistings{  \btypeout{List of Listings}  \addtotoc{List of Listings}  \begin{spacing}{1}{ \setlength{\parskip}{1pt} \if@twocolumn   \@restonecoltrue\onecolumn \else   \@restonecolfalse \fi \chapter*{\lstlistlistingname   \@mkboth{       \MakeUppercase\lstlistlistingname}{\MakeUppercase\lstlistlistingname}} \@starttoc{lot} \if@restonecol\twocolumn\fi \cleardoublepage  }\end{spacing}   Now the name appears correctly in the TOC but the Listings do no show in the Listings page, its just empty..  A MWE can be found here: There are two vectors called $\vec{a}$ and $\vec{b}$. Vector $\vec{c}$ is the bisector and it can be given as  $$\vec{c} = |b|\vec{a} + |a|\vec{b}$$  How to prove that? I have used the dot product method. But there I can't find the angle between them. Then I tried to do this by using unit vectors. Then I got an answer like in the given picture. . Can you help me to get the correct answer Comma before which I'm not sure which of the following sentences is correct. Is the comma mandatory, optional or unnecessary? I've googled a bit about this topic, but I got confused.     Our mapping contains 2000 words, which map to more than one lemma.   or     Our mapping contains 2000 words which map to more than one lemma.   Context: In total, there are more than 2000 words.  I've read  . If I understand the answers correctly, my "which map to more than one lemma" is a defining clause and no comma is required. But is it wrong to add one? Changing Posts Per Page and offset with pre_get_posts I have a filter using pre_get_posts to change the number of posts per page from 4 on the news landing page to 8 on all other pages (page 2, 3, etc). However I don't seem to have got the offset correct, or something, because my get_next_posts_page_link doesn't show a page 3, even though it does exist if I go to the url manually. The current offset is something I somehow managed to conjure up accidentally, I thought it worked as page 2 was correct but as I added more test posts, I realised it didn't work.  function page_2_posts_per_page_filter( $query ) {      $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;      if ( !is_admin() &amp;&amp; $query-&gt;is_paged &amp;&amp; $query-&gt;is_main_query() ) {          $offset = 4 + (($paged - 2) * 8);         $query-&gt;set( 'offset', $offset );         $query-&gt;set( 'posts_per_page', 8 );      } else if (!is_admin() &amp;&amp; $query-&gt;is_main_query()) {          $query-&gt;set( 'posts_per_page', 4 );      }     return; } add_action( 'pre_get_posts', 'page_2_posts_per_page_filter', 1 );   EDIT: SOLUTION  function page_2_posts_per_page_filter( $query ) {      $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;     $offset = 4;      if ( !is_admin() &amp;&amp; $query-&gt;is_paged &amp;&amp; $query-&gt;is_main_query() ) {          $offset = (($paged - 1) * 8) - $offset;         $query-&gt;set( 'posts_per_page', 8 );         $query-&gt;set( 'offset', $offset );      } else if (!is_admin() &amp;&amp; $query-&gt;is_main_query()) {          $query-&gt;set( 'posts_per_page', 4 );      }     return; } add_action( 'pre_get_posts', 'page_2_posts_per_page_filter');  function found_offset( $found_posts, $query ) {      $offset = 4;      if( !is_admin() &amp;&amp; $query-&gt;is_main_query() ) {         $found_posts = $found_posts + $offset;     }     return $found_posts; } add_action( 'found_posts', 'found_offset', 10, 2 ); I have been looking at a few scripts other people wrote (specifically Red Hat), and a lot of their variables are assigned using the following notation VARIABLE1="${VARIABLE1:-some_val}" or some expand other variables VARIABLE2="${VARIABLE2:-`echo $VARIABLE1`}"  What is the point of using this notation instead of just declaring the values directly (e.g., VARIABLE1=some_val)?  Are there benefits to this notation or possible errors that would be prevented?  Does the :- have specific meaning in this context? I know that the -f means --fix-broken from the manual and that it attempts to fix problems with the packages, but what exactly does? How it decides how to fix the packages or if they need fixing and the method of fixing? And why sometimes it fails?