How to extract text inside first pair of colons I have a log file that saves this kind of lines every time a file cannot be extracted from a tar.  tar: foto/201802131354184186718718.xml: No se puede efectuar open: File exists tar: foto/201802131365468046840684.xml: No se puede efectuar open: File exists   I need to get the text inside the first pair of colons ":"  Example  foto/201802131354184186718718.xml foto/201802131365468046840684.xml   I've tried using grep but i get this:  $ grep -oP '\:\K[^\:]+' 20180213.tmp   foto/201802131354184186718718.xml  No se puede efectuar open  File exists  foto/201802131365468046840684.xml  No se puede efectuar open  File exists
extract string between double quotes I have requirement that i need to extract string using quotes. My string as follows.  "abcd efgh" "ijkl mnop" "qrst uvwxyz"   can you help me to get the string between second double quotes(ijkl mnop) using sed or grep command.  In other words if I say give me the string in first quotes I want the  first string; if I say second string it should give me string between second double quotes and similarly third one also.
Inline suggested edit reviews are truncated in medium-width windows When reviewing a suggested edit inline (not from the queue) on a site with the new “responsive” design, at a window width where normal content does fit, the diff window is truncated on both sides, as is the edit window after cliking “Improve Edit” or “Reject and Edit”.    This is from  which happened to have a pending suggested edit at the time, after clicking the edit(1) button. Note how the scroll bar is all the way to the left, but there's content that vanishes to the left of the window. That's in Chrome 67.0.3396.87 on Linux at zoom level 100%, with a window width of 800.  Note that I'm not complaining that the user interface isn't responsive yet (although now that this has been deployed to SO I'd expect it to be), but that the interface is completely unusable even with scrolling. In sites with the old UI, you can see all the content even if it requires scrolling.  Reviews done from the suggested edit review queue are ok (not responsive, but you can see the content by scrolling). Inline edits are ok. The problem is specific to inline suggested edit reviews. This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating? Does D&D 5e have a rule for character knowledge about monsters? In the 3rd and 4th editions of D&amp;D, there were explicit rules for determining if a character knew anything about a monster before them.  In 3rd edition, for example, use of the  skill with a general DC of 10 + the monster's HD allowed for determining one fact, plus one fact per 5 points over the check.  Looking at the Intelligence section of the 5e PHB, I don't see any similar notation.  Does 5e provide any guidance as to when a player could use their out-of-game knowledge about a monster, or when the player might be told things their character would probably know in-game? Unable to SSH to my virtual machine via Windows Power Shell ISE "C" sizeof with a type or variable After migration to MacOSX 10.11 "El Capitan", how to run simple utilities such as "texdoc" and "kpsewhich"? Last night, I migrated my MacBook's operating system from 10.10 "Yosemite" to 10.11 "El Capitan". Everything seemed to go smoothly. Happily, regarding my TeX-related work, I am able to use the GUI front ends "TeXworks" and "TeXshop" just fine since completing the OS upgrade. I use MacTeX2015, with all the latest updates installed.  Oddly, though, since completing the upgrade I can no longer run any MacTeX command-line utilities such as texdoc and kpsewhich. (Actually, as I just discovered, I can no longer run pdflatex either from a command line. However, I never do run pdflatex from a command line prompt, so that's not an urgent problem for me -- at least not for now.)  The suggestions given in the posting  do not seem to be applicable to this case, as they all seem to revolve around setting up /usr/texbin correctly -- /usr/texbin is no longer allowed under MacOSX 10.11. The document  by Herb Schulz deals in depth with adjusting settings in the GUI front ends, but it appears not to touch on what to do about /usr/texbin, which appears to be the now-missing link to TeX's command line utilities.   Pointers and solutions most welcome! I am visiting Vietnam in November 2015, I will entering the country on the 10th and my flight home is 14 days later, I will be leaving Vietnam and travelling to Cambodia in between the 2 weeks then travel back into Vietnam to get my flight home on the 24th November, do I need a visa? Can't get hold of anyone at Embassy and not clear about entering twice on the website. Alternating sum of binomial coefficients multiplied by (1/k+1) I'm trying to prove that  $$\sum_{k=0}^n {n \choose k} (-1)^k \frac{1}{k+1} = \frac{1}{n+1}$$  So far I've tried induction (which doesn't really work at all), using well known facts such as  $$\sum_{k=0}^n {n \choose k} (-1)^k = 0$$  and trying to apply identities like  $${n \choose k} = {n-1 \choose k-1} + {n-1 \choose k}$$  Would anyone be able to point me towards the right method? Should I be looking to apply an identity or is there a method I'm missing? How can I balance uniformity of style files against modularity? I'm using Windows/TeXworks/MiKTeX, and I would like to have one style file I can use anywhere in any document in my top-level folder. If I want to add a new command or renew an old one, I'd like that to be available in all documents recursively contained in my top-level folder. I have a very hierarchical structure to my top-level folder. So this would seem to point to having a single file that TeXworks knows about. Could I add a path in Preferences -> Typesetting -> Paths for TeX and related programs? I've tried that, possibly superficially, without any success. Adding the correct folder to the Windows PATH variable doesn't seem to do the trick, either.   On the other hand, suppose I want to send someone a TeX file? It would be nice in such circumstances to be able to have the style file in the same folder as the TeX file. If I do that, how could I ensure that it's always up-to-date? Is there a script available somewhere that could take my master style file and push it down to all pre-existing lower-level locations?   Just to reiterate: I want uniformity of my style files in my very hierarchical folder structure. However, I would also like modularity, in that each folder is self-contained. How can I achieve that?  Also, out of curiosity, since I may acquire a Linux computer soon, how would I do this in, say, *ubuntu with TeXlive? Delete specific line number(s) from a text file using sed? How to find out the terminal command of an application? How to get the Runtime-Type of an Object dynamically (for Primitive Data Types and SObjects) Is it possible to get the Type of an Object (it's not an SObject)?  String s = 'test'; doSomething(s);  public static void doSomething(o Object) {     // need to find out if o is a string or an integer     type = IsThereAMethodToGetTheTypeOf(o) // ?     if(type='String') {         // do something for strings here ....     } else {         // do something else ....     } }   I think the Type class can't help me, because it has no way to get the type of an existing object instance, right? Any there any other way?  Since there is most likely no perfect solution possible within the current platform limitations, I posted an Idea on IdeaExchange here:   For SObject I have already this  public static string getType(SObject obj) {     if(obj==null) return '';     return obj.getSObjectType().getDescribe().getName()+''; } I have noticed that some browsers (in particular, Firefox and ) are very zealous in using cached copies of .css and .js files, even between browser sessions. This leads to a problem when you update one of these files, but the user's browser keeps on using the cached copy. What is the most elegant way of forcing the user's browser to reload the file when it has changed? Ideally, the solution would not force the browser to reload the file on every visit to the page.  I have found  and  suggestion to be useful. It turns out there is a term for this: auto-versioning. I have posted a new answer below which is a combination of my original solution and John's suggestion. Another idea that was suggested by SCdF would be to append a bogus query string to the file. (Some Python code, to automatically use the timestamp as a bogus query string, was .) However, there is some discussion as to whether or not the browser would cache a file with a query string. (Remember, we want the browser to cache the file and use it on future visits. We only want it to fetch the file again when it has changed.) In many situations, JavaScript parsers will insert semicolons for you if you leave them out. My question is, do you leave them out?  If you're unfamiliar with the rules, there's a description of semicolon insertion on the . Here's the key point:     If the first through the nth tokens of a JavaScript program form are grammatically valid but the first through the n+1st tokens are not and there is a line break between the nth tokens and the n+1st tokens, then the parser tries to parse the program again after inserting a virtual semicolon token between the nth and the n+1st tokens.   That description may be incomplete, because it doesn't explain @Dreas's example. Anybody have a link to the complete rules, or see why the example gets a semicolon? (I tried it in JScript.NET.)   is related, but only talks about a specific scenario. jquery's append not working with svg element? I've tried to render my scene but there's an object that won't show up. I've checked the camera, I've checked the visibility, it isn't hidden and it's showing in the viewport. I feel like I've opened every setting and have achieved nothing. I’m trying to render a book with a cover, flipping pages and stacks of pages. I have no idea how to fix the fact that the book cover doesn’t render. If I create a plane and select both the book cover and the plane and join them with Ctrl+J, the render contains a book cover but it doesn’t turn as it’s rigged to do so because it’s now linked to the plane and loses all the animated properties. As soon as I unjoin them the book cover stops rendering and everything appears as you see it there, a book with binding, pages, but no cover. For the life of me I cannot figure out what’s going on. There's a link to the file here: Automating the scanning of graphics files for corruption Does anyone know of a way to check graphics files (particularly JPEG, GIF, and PNG) for corruption (preferably in an automated way)?    Explanation:  A few days ago, a command worked incorrectly and ended up deleting thousands of graphics files from a FAT32 volume that was practically out of space. I’ve used several different file/photo-recovery programs, but naturally, they are limited in how much they can recover (though fortunately the volume has 8KB clusters, which helps somewhat).  Anyway, some of the larger files, that were fragmented, are now corrupt. Some of them are not even real files at all (the recovery software merely dumped the clusters that were pointed to by now-overwritten directory entries), while others are broken because of fragmentation.  Moreover, because some picture formats embed a smaller version of the picture as a thumbnail, scanning the thumbnails for corruption is not reliable because it may be intact while the actual file (i.e., the picture when viewed full-size), could be corrupt.    Here are a couple of examples:      Here’s the second one. It’s so damaged that it doesn’t display anything.    (A third one wouldn’t even upload because it doesn’t even have the correct header!) Find a real function $f:\mathbb{R}\to\mathbb{R}$ such that $f(f(x)) = -x$? Why use sucrose rather than glucose in an injectable vaccine? Creating a large amount of convex polygons using existing coordinates