how to check if the first line of file contain a specific string?
How to print file content only if the first line matches a certain pattern?
How to enable iptables (instead of firewalld) services on RHEL 7 and Fedora 18? The newest fedora has firewalld as new firewall aplication. I liked old iptables services. I want them back but have no idea how to do that. I have tried :  systemctl disable firewalld.service systemctl stop firewalld.service systemctl enable iptables.service systemctl enable ip6tables.service systemctl start iptables.service systemctl start ip6tables.service   But it does not work! Didn't find any help on wiki or google.  Disabling firewalld work ok, but when I'm trying to enable iptables.service I get:  systemctl enable iptables.service Failed to issue method call: No such file or directory How do I remove repeated elements from ArrayList? How to contact Canonical? So I am doing a College research project for my Computer Information Systems department and it is about alternative Linux server distribution for small businesses. From my findings I would really like for this research to actually take off into a Distribution project (Using Ubuntu as a base OS).   However I would like to rename the distribution as "Bizbuntu" or something related to that ("Biz" being shorthand for business) however I don't know if I can name the distribution without consent from Canonical.   So my question is do I have to contact Canonical about this, if so, does anyone know a mailing list or email that I can contact them about this? I'm level 10 on Pokemon Go. I've caught at least 150 Pokemon, and had no problems. Now, every time I try to catch a Pokemon, no matter the level, it just rolls twice in the pokeball, breaks free, then runs away. Can anyone provide some insight on how to fix this problem? Will self-citation be viewed as self-promotion in academia? As we know, citation counts are important to judge one's research activity. Is it good to cite one's previous works? Will it be viewed as an act of advertisement or self-promotion? preventDefault when clicking bounty "cancel" link When you click "start a bounty" then "cancel," href="#" exiles you to the top of the page and you lose your spot near the end of the question's comments. Clicking anywhere else on the page simply closes the bounty popup; clicking "cancel" ought to do the same.  In case that wasn't clear:    Dramatization aside, it's a nuisance. Can the click event on that anchor be preventDefaulted? How to find out the variant of my Galaxy Nexus? Please do not "lie" that the Community user "modified" the question If the Community user bumps a question, It says It has modified it:    However, It did not really modify the question, It rather just visited it. The word "modified" is a bit unfortunate IMHO because it suggests that something changed in the question or its answers, which is not true. I therefore suggest that we look for another word which would be more descriptive and less confusing. Some come to my (and others') mind:   visited, poked, bumped, promoted, dredged up, brought up, ...   (Actually, "Bumped" is even officially used now:  and .)  I'm not a native speaker and maybe someone find a better word. To me, visited sounds the best, but that may be only me. It makes sense, too, since Community really just visits the questions, with the site-effect of them getting bumped. It shouldn't confuse anybody.  Actually, it can be harmful in some sense, since , and it is interesting to know that this has happened, so that more people can check that the edit makes sense. You therefore can't simply ignore all "edited by Community" messages. (Thanks to Monica Cellio for pointing it out.)  (Remark: I know this has been questioned before (    ) but I think it has never been requested to change the action title to something more descriptive. If I'm wrong, I apologize.) (The "lying" it the question title is meant as a sarcasm) Enumerate non-isomorphic graphs on n vertices In the following the graphs are assumed to be undirected and simple.  1.Enumerate the number of non-isomorphic graphs on $n$ vetrices where $n$ is fixed.  Here are some ideas I had:  The number of labeled graphs is $ 2^{\frac{n(n-1)}{2}} $.  So it is enough to find the number unlabeled graphs on $n$ vertices.I have no idea for this.  2.Enumerate the number of non-isomorphic graphs on $n$ vertices and $m$ edges where $n,m$ are fixed.   Can we find a closed formula for each of this?  Any help?   Thank you! What do you call a response which does not address the question? When some one is asked a question, sometimes if they are trying to avoid answering the question, they respond with something unrelated. What is the word for that response?  Eg. A: Why were you late?     B: This bagel tastes good.  What I am looking for is the name of that response, not the action. What makes someone deserving of a Ph.D.? Few days back while attending a thesis defense, one Professor was asking the defender why does he think, he deserves the degree. I was wondering since then, is there really any general answer for that? or the answer should be given describing my own work and then emphasis them how it is important for research field?  I asked the question here to know your opinion about it and to list down what could be the possible answers to this question. Interior of closure of open set in topological space If $U$ is an open set in a topological space, is it true that $U$ is the interior of the closure of itself?   If $U$ is open, it must be the interior of itself. But is it the interior of the closure of itself? In the closure, we include all points $x$ such that any open set containing $x$ also contains a point in $U$. In the interior of the closure, we take the union of all open sets contained in the closure. Cost Distance Analyst In QGIS? Are there any tools, plugins or methods in QGIS which allows for an analysis of the best path between two points using least cost path method? As shown below ArcGIS has several distance tools. I had an (extremely minor) identity crisis when I clicked on my username and saw a different identicon than I'd had previously. :)  According to , your identicon is based on a hash of your last known IP address.  Since a user's profile picture part of their identity, I would prefer if my profile picture only changed through deliberate action on my part.  Since the user's IP hash is already saved (the identicon has to be displayed to people even during the unthinkable periods when we're not actively browsing), I propose preserving the first one assigned to a user, and not updating it even if the user's IP address changes.  Are there any upsides to the current behavior that I haven't thought of? Browse an UNC path using Windows CMD without mapping it to a network drive C:\&gt; cd \\somewhere '\\somewhere' CMD does not support UNC paths as current directories.   What I usually do to get around this is to map that directory to a network drive and then I could easily access it from the command prompt.  But is there an easier way on how to get around this? while working with webservice quotes are not inserting may i know what i have to do. my code is     for(integer l=0;l&lt;reqquotes;l++){          qu = new Quote();          qu.Name = qName;          //opp.CloseDate =system.today();           qList.add(qu);             insert oppList;          insert qList;     } Beamer item balls go missing while compiling in XeLateX since yesterday's TeXlive update, however, the same code works with pdfLaTeX. Any solution, please. Here is my MWE: \documentclass{beamer}  \setbeamertemplate{itemize item}[ball] \setbeamertemplate{enumerate item}[ball]  \begin{document}  \begin{frame} \frametitle{A tested title} text \begin{enumerate}     \item this is an item \end{enumerate} text3 \begin{itemize}     \item this is an item \end{itemize} \end{frame} \end{document} Office 2016 Advanced Setup I just started the Office 2016 Setup/Installation on my Windows 10 PC. The installation worked fine and started automatically showing only this dialog:    But there are no additional settings possible! I need to choose which programs I want to install and also add additional tools that are often missing when doing a default installation.  How can I change the Office Installation Settings?   Choose programs to install Add/Remove Office Tools (Maybe) Office installation directory   When I check after the installation in the the windows settings, the Office can only be uninstalled - no modifications available: Invalid Topology [Topoengine error] from ArcGIS for Desktop? Using ArcGIS 10.1 for Desktop, I'm trying to run the Identity function on two large data sets but it fails every time. I don't think it is a lack of hardware as I can run other processes on the same data sets.   I've already updated software, and added the 64 bit geoprocessing add-in, checked and repaired geometry, and done the fix in  (set ARCTMPDIR env variable to a writable local folder).   Executing: Identity DudleyStamp OA2011 "D:\Case Studies\National2\National.gdb\DudleyStampOA11" ALL "1 Meters" NO_RELATIONSHIPS  Start Time: Wed May 08 21:11:43 2013 Reading Features... Processing Tiles... Assembling Tile Features... ERROR 999999: Error executing function. The table was not found. The table was not found. [DudleyStampOA11] The table was not found.   The table was not found. [DudleyStampOA11]   Invalid Topology [Topoengine error.] Failed to execute (Identity). Failed at Wed May 08 21:45:41 2013 (Elapsed Time: 33 minutes 58 seconds)   Based on comments so far I tried copying data to new file geodatabase, and running the tool from ArcCatalog still get exactly the same error.  I have ordered 16GB of the fastest RAM my computer can take (I current have 4GB). I also have a 6 Core AMD Phenom II X6 1090T, SSD, and AMD Radeon HD 6970 Graphics Card. So I'm not sure what more hardware I can add.  I've also tried increasing the size of the page file which was a suggestion I found on Google with no effect. Let's stop displaying a user's accept rate My feature request (or anti-feature-request perhaps) is the following: Let's stop displaying a user's accept rate.  For those of you who know "Fawlty Towers", the whole issue of a visible accept rate and our behavior towards it starts to feel like .   We generally seem to agree that harassing a user about it is not appropriate and that our decision to answer a question should not depend on it, yet we display it in varying terrorist-threat-levels of color. Yes dear users, please don't pay any attention to the brightly orange colored percentage you see there. And whatever you do, don't bring it up.  But as long as you're displaying the accept rate, people will comment on it, criticize users for it and possibly reconsider answering because of it. And while I'm of the opinion that a low accept rate should not stop you from answering (we're here to make the internet better after all) and that the possible reputation gain (or lack thereof) should not factor in either, I can't blame users for considering it. It's in their face after all. And we're only people.   So let's take the issue off the table. Or at least partially. Information about a user's acceptance behavior can still always be gathered from the profile. But at least that would be less in-your-face.   "But it helps me to see if a user is a help vampire!" I'm still wondering if those are of the sparkly variety as well, but I digress. So what? If the question is bad, downvote it. Evaluate a question on its individual value. There is no need to take a user's history into account. There might be a correlation between the quality of a question and a user's accept rate, but there doesn't have to be. And if there is, the bigger problem is the question's quality.  "Exactly! A user with a low accept rate might indicate there's a problem!" I'm not arguing we should get rid of the accept-rate value within SO/SE. After all, this Q&amp;A works based on up and downvotes, as well as the acceptance of an answer. But why not use it behind the scenes to (very occasionally) nudge the user with a statement like:      "You have received several answers to your questions, yet have not accepted an answer as correct or helpful in a while. You might want to evaluate them and where possible ".    After all, in the various questions with regards to comments on low accept rates, if any comments are encouraged at all, then they are of this soft variety. So why not let the system take care of that?  I feel this would take the whole issue of accept rate off the table, while still providing the user with the information he might have missed or needs. (As a bonus, it would reduce the frequency with which the topic is brought up here on Meta) And those users who would ignore this information are most likely not convinced by a displayed percentage either.