Can't give myself NOPASSWD privelege for chmod/chown
How to run a specific program as root without a password prompt?
Can a script modify an environment variable of its calling shell? I am setting my JAVA_HOME in my ~/.bashrc file.  Now, I need to create a script that will change the JAVA_HOME just for the current terminal, so that I can start an app that needs java 5.  I have created this script to do this task, but after finishing, I can see that JAVA_HOME is not updated  export JAVA_HOME=/usr/lib/jvm/java-5-oracle/ export PATH=$PATH:$JAVA_HOME       Here is the result  $ ./javaHome5.sh $ echo $JAVA_HOME /usr/lib/jvm/java-6-oracle/   I think that the reason this is not being applied, is that a script is executing in it's own terminal, so when the script ends, the current terminal will not be affected.  Currently, the only way I've found around this is:   Edit my ~/.bashrc and change the JAVA_HOME var Run source ~/.bashrc to apply the changes in current terminal. Which again cannot be applied in a script, as the source command needs to be run in the current window.   Needless to say, this change applies to all new terminal windows, so I practically need to do this twice: One before starting my app, and one more time right after this, just to restore the environment vars to their default. That's not really convenient.  Do you have any ideas how can I change this var using a script? How do you collect valuable information from regular "User Group" meetings? The scenario:   You work on a SaAS application.  Some of your users use your application heavily each day. Every 2 weeks (or month or whatever), a "User Group" of your most avid users gets together to talk shop and see how their progress is going in the context of a larger project they are working on. You can participate and potentially direct some group activities aimed at improving the application.   How do you gather valuable user information in this group setting? How to show that a Banach space $X$ is reflexive if and only if its dual $X'$ is reflexive? This is what happens:  sudo apt-get install vlc Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package vlc   Please help. I would also like to know when this error occurs, I've seen it before too. Parental controls with different settings for different users Does anyone know of a good way to set up some sort of parental controls so that one user account is subject to them, but not another?  A couple of friends of mine use Ubuntu and have kids (7 to 10 years old) who use the family computer. They'd like to have some blocking of adult sites. They're not going to supervise all the time, which I know might be ideal, but there we go. And they're not particularly technical, so they don't want to have to run scripts to turn the parental controls on and off regularly, but they can cope with having different accounts for different people. I haven't found a great way of doing this. I am pretty technical, so I'm happy to spend some time at the command line to set it up, but then it needs to just work.  Please don't just link to DansGuardian. If your answer doesn't address the different user account aspect, I will vote it down. If you want to talk about general parental controls that apply to all users then please start a new question - I'm sure that plenty of people would be interested in it, and I'll link to it from this question. Showing range on hexagonal grid Here is the situation.  I have hexagonal board,and a unit on it,with speed or move value 4.Diffrent terrain has a diffrent cost.When i click on the unit,game should show me a move range.  My solution was to check each  hex in range of 4,with A* pathfinding,and if path cost was less than 4 then this hex was in range.Finally game nicely show me range of that unit.  My question is:   Is there other solution to search for range on hex grids or square grid,because even if i am really proud of what i did in my solution,i think,it is a little to exaggerated?:))  What make me ask this question?I noticed that when unit speed is 4 or 6 or even 8,time to computing range for my computer was really good,but when speed was 10 and more i noticed that i needed to wait few second to compute.Well in real games i rather dont see something like this and my A* pathfinding is rather well optimized,so im thinking that my solution is wrong.  Thanks for any replies. Show that if terms of a series have ratio less than the ratio of convergent series, then the series converges We have two infinite series $\sum a_n $ and $\sum b_n$, such that $a_n &gt; 0,\ b_n &gt; 0$ and $a_{n + 1}/a_n \leq b_{n + 1}/b_n$ for all $n$. Show that if $\sum b_n$ converges, then $\sum a_n$ also converges.   Any hints on how to prove this? I can sort of picture why this must be true, but I'm not sure how to prove this rigorously. I'm not sure using the ratio test would help here.. Formatting datetime2 in LaTex to 4th September, 2016 without the current day? I'm currently using  \usepackage[UKenglish]{babel} \usepackage{datetime}   and I'm getting  Sunday 4th September, 2016  with the commands \today or with \newdate{example}{01}{09}{2016} (outside of \begin{document}) and \displaydate{example} inside the document.  How can I reformat this date to not have the name of the day in it (Best would be with using datetime2)? So like 4th September, 2016. With the "th" as a high letter like this:   Full document example:  \documentclass[a4paper, 12pt, DIV=calc, headings=small]{scrreprt} %Used packages \usepackage[UKenglish]{babel} \usepackage[utf8]{luainputenc} \usepackage{datetime}  %Other definitions \pagenumbering{arabic}  \newdate{sample}{31}{01}{2017}   \begin{document} \displaydate{sample}\\ \today \end{document} I recently reviewed a paper (general applied mathematics context). During the review, I realized that the fairly general ideas introduced in the paper can potentially be applied to a specific problem in a similar context. The authors did not mention this application in their paper, so I suggested to add a short comment about it in my review.  I later started thinking about the application in more detail and tried out some things, which actually seem to work quite well for this application. Now, the paper is still in the review process and might take some time until it gets published. What is the proper way how to proceed here in order to use the ideas and results which I in my exclusive position as a reviewer saw? How can I refer to the paper that is still under review? How can I best discuss the ideas with my co-workers (and potential co-authors) without disclosing that I reviewed the paper?  The paper under review is not available online on any preprint servers such as arXiv etc I have written a small script to count number of occurrences of logs in a particular file. The following is my code:   #!/bin/sh count=1 while read line do     found=$( grep M $line )     OCCURENCE=$( grep M /log.txt)     if [ "$OCCURENCE" ]; then         echo $count")" $line &gt;&gt; filesave.txt     fi     count=$((count+1)) done &lt; log1.txt   but I am getting this error:  ./count.sh ./count.sh: syntax error at line 10: `found=$' unexpected How can I pass arguments to a batch file? I need to pass an ID and a password to a batch file at the time of running rather than hardcoding them into the file.  Here's what the command line looks like:  test.cmd admin P@55w0rd &gt; test-log.txt Change password on root user and user account notify-send not working under ssh Maybe this is answered somewhere else, but I didn't see it.  I am running Ubuntu 14.04. When I SSH into my machine, for example:  ssh &lt;user&gt;@&lt;machineip&gt; notify-send "Hello"   I don't see anything on the monitor where I am logged into the machine. If I prefix notify-send with DISPLAY=:0.0 or DISPLAY=:0 nothing different happens. I just never see any notification on the current session.  Is there some trick/switch to getting this working?  In case this isn't clear, allow me to reiterate: From Computer A, I SSH into Computer B. Within the SSH session, I wish to execute notify-send to run on Computer B. I expect a growl-type notification to appear on the monitor of Computer B. Applying Insufficient Explanation Post Notice to One-line Questions? Moderators currently have a tool to add a Post Notice that says:     insufficient explanation       We're looking for long answers that provide some explanation and   context. Don't just give a one-line answer; explain why your answer is   right, ideally with citations. Answers that don't include explanations   may be removed.   However, there seems to be no equivalent wording for one-line questions.  Could the wording be changed to something like below to cover both one line questions and one-line answers?     insufficient explanation       We're looking for longer posts that provide some explanation and context.          Don't just ask a one-line question; provide some background like a brief description of your research prior to asking   Don't just give a one-line answer; explain why your answer is   right, ideally with citations.          Questions and answers that don't include explanations may be removed.   Sometimes such questions can simply be closed for being unclear or too broad but on the two sites I moderate there is an aversion to closing questions from new users, so to give them some guidance about what is expected, without spending time writing the same comment over and over, a post notice like this would provide a good "couple of clicks" alternative. OS: Windows 7. I want install Linux Ubuntu on portable external Hard Drive USB 2.0. I read a variety of methods, but I'm confused by contradictory advices and methods. Actually, installing Ubuntu on anything other than clean PC looks much more complicated than installing Windows. I need to have Ubuntu package + Python 2.7 + C compiler installed. My external hard drive is partially filled, I need to keep all files.   Will Ubuntu run entirely on external hardrive, without writing anythinhg to Windows system folders and to registry?  Can anyone post detailed guide how install Ubuntu on external hard drive? Navigating lookup relationships with dot notations, to retrieve field values I need to access the value from a roll-up field on my Opportunities, from it's related Opportunity Product.  When I use oli.Opportunity.Software_Line_Item__c the value retrieved is always null.  So I've also tried oli.OpportunityId.Software_Line_Item__c which causes an error in the compiler     Invalid foreign key relationship: OpportunityLineItem.OpportunityId   &amp; just to make sure that it's not the roll-up field calculation that's not working as expected, I've tested oli.Opportunity.Name which is also returning null.  I know this is basic but I don't have Eclipse installed so I can't check the correct reference to use. Could someone please let me know how I can navigate this relationship, to retrieve the value from the Software_Line_Item__c field? How does IPv4 Subnetting Work? Dropping z dimension programmatically '₴' is a currency sign used for the Ukrainian Hryvnia. It's in Unicode since 2004. I want to use it in spreadsheets as a sign for money values, but Google Spreadsheets doesn't understand it as a number if I add it after or before my value in the cell. How do I make Google Spreadsheets understand it's currency and display it as a number in my desired format? MySQL Insert query doesn't work with WHERE clause What's wrong with this query: INSERT INTO Users( weight, desiredWeight ) VALUES ( 160, 145 ) WHERE id = 1;  It works without the WHERE clause. I've seemed to have forgot my SQL.