RegEx validation for numbers only with a minimum length
Minimum Length Regular Expression
shortcut for commands I use following commands very often, and they're too long.  sudo /etc/init.d/kerio-kvc start sudo /etc/init.d/kerio-kvc stop   how can I create a shortcut command for them? something like sudo kerio start or sudo kerio stop meaning of powers on trig functions I always forget this, when a trig function has an exponent does that mean multiply itself or apply itself to the result recursivly?  e.g. does $\sin(x)^2=\sin(x)\sin(x)$ or $=\sin(\sin(x))$? What about $\sin^2x$? Definition of complex number In many situations (problems as well as solutions) I encounter the complex number $i$ which many times is defined as $i^2=-1$ instead of $i=\sqrt{-1}$, since it is "more preferred". Does anyone know why? Is it because there are two solutions to the equation $x^2+a=0, \ \ a&gt;0$? In the Pottermore article on  it's mentioned that other fractional platforms exist (7 1/2, for instance). Is it ever stated elsewhere where these platforms lead? Perhaps you could get a connection from your hometown by accessing one of these platforms? Where did Harry's parents get all of their money from? Is there a way to access QGIS plugins in Python?   I'd like to write a script to do some geoprocessing, and I'd like to use the clip, regular points and convex hull tools in fTools, as well as the Road graph plugin. The latter is probably a different can of worms because it is a C++ rather than Python plugin. Is there a way to reorganize the fields/attributes in a data extension?  I've added some extra fields that relate to other fields in that extension.   I haven't found a way to regroup those fields. How to setup a restricted SFTP server on Ubuntu? How to install Chromium without snap? I just discovered that chromium will only be released as a snap package.  How can I continue to get chromium, without snap? Is this possible without building from source?  Notes:   Please let's keep to the question as stated - not "what do you have against snap?" I'm not asking how to remove snap (I realize that would break Ubuntu)... just how to use chromium as it is now, a deb.     Update  No, this is not a duplicate of that linked question. I don't need to know "why it's a snap". I want to know how to use it without snap.  Right now there is building from source, and some random PPA mentioned below. I hope someone can advise us of trustworthy alternatives. Some publications capitalize He, Him, etc., when referring to a god.    What is this practice called? 'Proper noun' is rather generic. Two friends who have unpredictable lunch hours agree to meet for lunch at their favorite restaurant whenever possible. Neither wishes to eat alone and each dislikes waiting for the other, so they agree that each will arrive at a random time between noon and 1 pm, and each will wait for the other for 15 minutes or until 1:00. What is the probability that the friends will meet for lunch on a given day? If $$Y=\sum_{i=1}^{N}X_i^2$$ where $X_i \sim \mathcal{N}(0,\sigma^2)$, i.e. all $X_i$ are i.i.d. normal random variables of zero mean with same variances, then $$Y \sim \Gamma\left(\frac{N}{2},2\sigma^2\right).$$  I know the chi-squared distribution is a special case of the gamma distribution, but could not derive the chi-squared distribution for random variable $Y$. Any help, please? Is there a power saving application similar to Jupiter? Should spam posts be edited? Greek pdf bookmarks I am puzzled with sections titled with Greek characters. They do appear in the pdf's Content list, though not correctly.  For example, in my thesis--written in English with LyX, based on the KOMA-script--I choose to include a translation of the summary in Greek (=Περίληψη). The "raw" code for the (unnumbered) chapter title reads: \addchap{\textgreek{Per\char208lhyh}}. In the final .pdf file (using pdflatex) the respective entry appears as Per208lhyh. Using the unicode option for the hyperref package does not fix the problem.  Update detail: the document (should) not only contain Chapter or Section titles in Greek, but normal text as well.  I have found some relevant references within tex.stackexchange and elsewhere (e.g., , the manual of the textgreek package, , ). However, I cannot extract a concrete answer.  How can Greek characters appear correctly as bookmarks in the .pdf's Content list?  Note, the information of this Q&amp;A applies to/under LyX as well. Execution of AfterInsert caused by: System.StringException: Invalid id: () - where have I gone wrong? We've had a community deployment and my brain is fried and I just whipped up a quick class that is throwing the below error. What have I done wrong here?     Error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, MSI_UserTrigger:   execution of AfterInsert caused by: System.StringException: Invalid   id: () : [] () : []: ()   What I am trying to accomplish is:   When a new user is created and is active, if they are linked to a ContactId and part of a specific profile (by name), add their ContactId to a Set&lt;ID> Then loop through contacts where the Id is in the set, and update the Community_User__c field to TRUE      Trigger:   trigger MSI_UserTrigger on User (after insert) {       if(Trigger.isAfter){          if(Trigger.isInsert){              MSIUserTriggerHandler.executeAfterInsert(Trigger.new);          }      } }      Class:   public with sharing class MSIUserTriggerHandler {     private static final String COMMUNITY_PROFILE = 'Community Knowledge User';     private MSIUserTriggerHandler() {}      public static void executeAfterInsert(List&lt;User&gt; newList){         setCreatedCommunityUsers(newList);     }      private static void setCreatedCommunityUsers(List&lt;User&gt; newList){         List&lt;User&gt; usersWithContacts = new List&lt;User&gt;();         List&lt;Contact&gt; contactsToUpdate = new List&lt;Contact&gt;();         Set&lt;ID&gt; contactIds = new Set&lt;ID&gt;();          for(User u: newList){             if(u.ContactId == null &amp;&amp; u.ContactId == ''){                 continue;             }             if((u.ContactId != null &amp;&amp; u.ContactId != '') &amp;&amp; u.Profile.Name == COMMUNITY_PROFILE &amp;&amp; u.isActive == true){                 contactIds.add(u.ContactId);             }         }          for(Contact c : [Select Id,Name,Community_User_Created__c from Contact where Id in :contactIds]){             if(!c.Community_User_Created__c){                 c.Community_User_Created__c = true;                 contactsToUpdate.add(c);             }         }         update contactsToUpdate;     } }   Am I not adding the ID correctly to the Set&lt;ID>, or am I querying wrong in my for(Contacts) loop? Execute a program at login I'm running Arch-Linux ARM on a Raspberry Pi.  My project goal is to have a barcode scanner attached to the Pi that forwards the scanned messages to a server in a LAN.  To harden the system against power outages etc. and minimize required user interaction, I wish to set it up so that a certain user is logged in automatically at startup (done and works) and a specific program is to be run at startup (done and works but not as intended).  I've done this so far by adding  exec mono scannerSoftware.exe 127.0.0.1 1234 randomString   to /home/certainUser/.bash_profile so it gets executed only once even when I'm switching back and forth to root (in contrast to bashrc).    The particular problem I am having: When I launch the system, it works as intended (login as certainUser, starting scannerSoftware.exe); BUT if I want to switch users and hit Ctrl+C, it restarts the login process, logging certainUser in again and running the program again => back to where I came from.  My guess as to why this happens is that the sys detects "login not complete, better start it again".  I could circumvent this by spamming Ctrl+C right around the login so that I practically interrupted it. Of course, this is not good practice. Suffice it to say it is not practical at all.  My question: How can I set it up so the program gets executed AFTER login is complete so that Ctrl+C'ing out brings me to a normal bash prompt as certainUser instead of beginning the endless login-cycle?  EDIT: I'm not using any graphical interface or such, only commandline (bash on tty), because when done the system won't even have a display. Sometimes it’s possible to use either a noun adjunct or the possessive case.     the shop door   the shop’s door   However, in certain phrases it’s not OK to do so.     the ship’s crew (the ship crew is wrong)   The questions are:   How can one find out what to use in such cases as “the shop(’s) door” when a noun adjunct option and the possessive case option are available?  How can one know which option is wrong in order to avoid the construction “ship crew”? Is there a difference in meaning between (a) the shop door (b) the shop’s door? I want to know, is there a way to make a tungsten lightbulbs filament withstand a mass amount of thermal shock while still producing a vast amount of heat? A conceptual doubt regarding Forced Oscillations and Resonance While studying about the Resonance and Forced Oscillations, I came across a graph in my textbook that is given below:-  Now, the author writes      As the amount of damping increases, the peak shifts to lower frequencies.   Why does this happen? And does this imply that at higher damping levels one cannot achieve a higher amplitude by setting the period of the forced oscillation to be equal to the natural frequency? This seems strange because, the highest amplitude is achieved when the natural frequency is equal to the driving frequency. But, I guess that the rules are somehow different for the damping case.