In c code , return and exit from main behaving same ?  int main (int argc , char* argv[]) {     exit(2); }   and  int main (int argc , char* argv[]) {     return 2; }   when both of code called from another c , both of them will return 2 ?
Should I use exit() or just return statements in main()? Personally I favor the return statements because I feel it's like reading any other function and the flow control when I'm reading the code is smooth (in my opinion). And even if I want to refactor the main() function, having return seems like a better choice than exit().  Does exit() do anything special that return doesn't?
trigger AccountReplicate on Account (after delete, after insert, after update) {     if ( trigger.isInsert ) {         for ( Account acc : trigger.new ) {             AccountOne__c ac = new AccountOne__c();             ac.Fax__c = acc.Fax;             ac.Phone__c = acc.Phone;             ac.Name =acc.Name;             insert ac;         }     }      if ( trigger.isUpdate ) {         integer  i = 0;         list&lt;AccountOne__c&gt; a2 = new list&lt;AccountOne__c&gt;([SELECT Id                                                         FROM AccountOne__c                                                         WHERE Name =: trigger.old[i].Name ]);         for ( AccountOne__c c1 : a2 ) {             c1.Name = trigger.new[i].name;             c1.Fax__C = trigger.new[i].Fax;             c1.Phone__C = trigger.new[i].Phone;             i++;         }         update a2;     } }   I tried bulk trigger for the update operation, but it's not working can anyone help me? Is it "re-offend" or "reoffend"? I want to know whether there is a hyphen in the word re-offend, or if it is spelt reoffend. I looked in Oxford English dictionary and the word "reoffend" appears, but then I checked Merriam-Webster and the word is not in there.  So is reoffend a word or is it re-offend?  I'm in Australia where we observe UK English if that matters. Creating controls within a Loop I have have some code which adds new cells to a table and fills them with text boxes.   The way I've coded it so far works fine:          TableCell tCell1 = new TableCell();         TableCell tCell2 = new TableCell();         TableCell tCell3 = new TableCell();         TableCell tCell4 = new TableCell();         TableCell tCell5 = new TableCell();         TableCell tCell6 = new TableCell();         TableCell tCell7 = new TableCell();          TextBox txt1 = new TextBox();         TextBox txt2 = new TextBox();         TextBox txt3 = new TextBox();         TextBox txt4 = new TextBox();         TextBox txt5 = new TextBox();         TextBox txt6 = new TextBox();         TextBox txt7 = new TextBox();          tCell1.Controls.Add(txt1);         tCell2.Controls.Add(txt2);         tCell3.Controls.Add(txt3);         tCell4.Controls.Add(txt4);         tCell5.Controls.Add(txt5);         tCell6.Controls.Add(txt6);         tCell7.Controls.Add(txt7);          tRow.Cells.Add(tCell1);         tRow.Cells.Add(tCell2);         tRow.Cells.Add(tCell3);         tRow.Cells.Add(tCell4);         tRow.Cells.Add(tCell5);         tRow.Cells.Add(tCell6);         tRow.Cells.Add(tCell7);   As you can see there's basically 4 instructions getting repeated 7 times. I'm sure there has to be a way to accomplish this with just 4 lines of code within a FOR loop and having all the names dynamically assigned but I just can't seem to find anything that would point me in the direction of how to do it.  Something like the following is what I'm after:      for (int i = 0; i &lt; 6; i++)     {          TableCell tCell[i] = new TableCell();         TextBox txt[i] = new TextBox();         tCell[i].Controls.Add(txt[i]);         tRow.Cells.Add(tCell[i]);      }    Any help would be much appreciated. How to fix Permission Denied (Public key) error? While trying to communicate between my desktop Ubuntu 12.10 and Fedora 19 desktop, I am facing the error of Permission Denied (Public key). I am able to login through ssh from fedora to Ubuntu, but not vice-versa. I even performed telnet on both machines via port 22 and both machines are listening, but not through ssh. What to do? Any idea?  My sshd_config file is as follows:  # Package generated configuration file # See the sshd_config(5) manpage for details  # What ports, IPs and protocols we listen for Port 22 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key HostKey /etc/ssh/ssh_host_ecdsa_key #Privilege Separation is turned on for security UsePrivilegeSeparation yes  # Lifetime and size of ephemeral version 1 server key KeyRegenerationInterval 3600 ServerKeyBits 768  # Logging SyslogFacility AUTH LogLevel INFO  # Authentication: LoginGraceTime 120 PermitRootLogin yes StrictModes yes  RSAAuthentication yes PubkeyAuthentication yes #AuthorizedKeysFile    %h/.ssh/authorized_keys  # Don't read the user's ~/.rhosts and ~/.shosts files IgnoreRhosts yes # For this to work you will also need host keys in /etc/ssh_known_hosts RhostsRSAAuthentication no # similar for protocol version 2 HostbasedAuthentication no # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication #IgnoreUserKnownHosts yes  # To enable empty passwords, change to yes (NOT RECOMMENDED) PermitEmptyPasswords no  # Change to yes to enable challenge-response passwords (beware issues with # some PAM modules and threads) ChallengeResponseAuthentication no  # Change to no to disable tunnelled clear text passwords PasswordAuthentication yes  # Kerberos options #KerberosAuthentication no #KerberosGetAFSToken no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes  # GSSAPI options GSSAPIAuthentication no GSSAPICleanupCredentials yes  X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no  #MaxStartups 10:30:60 #Banner /etc/issue.net  # Allow client to pass locale environment variables AcceptEnv LANG LC_*  Subsystem sftp /usr/lib/openssh/sftp-server  # Set this to 'yes' to enable PAM authentication, account processing, # and session processing. If this is enabled, PAM authentication will # be allowed through the ChallengeResponseAuthentication and # PasswordAuthentication.  Depending on your PAM configuration, # PAM authentication via ChallengeResponseAuthentication may bypass # the setting of "PermitRootLogin without-password". # If you just want the PAM account and session checks to run without # PAM authentication, then enable this but set PasswordAuthentication # and ChallengeResponseAuthentication to 'no'. UsePAM yes   This is sshd_config of ubuntu system. Refereeing papers on behalf of a professor: should it be listed on a CV? My professor sometimes asks me to referee papers for him.  Should I list the corresponding journals in the professionals activity section of my CV? TikZ: Bend text so that it follows a line I have two arrows going from a node on the left to a node on the right. Both arrows are slightly bent. I want to label the arrows with text that is bent just like the arrows. This is as far as I've got:  \begin{tikzpicture} \node (One) at (-3,0) [shape=circle,draw] {One};  \node (Two) at (3,0) [shape=circle,draw] {Two}; \draw [-&gt;, thick] (One) to [bend right=45]  (Two); \draw [-&gt;, thick] (One) to  [bend left=45] (Two); \node (mental) at (0,1.75) {Some bent text}; \node (non-mental) at (0,-1.75) {Some more bent text}; \end{tikzpicture} I'd like to setup a WCF service to send emails. The System.Net.MailMessage doesn't seem to be serializable, and cannot be passed in a [DataContract]  The error I receive is      Type 'System.Net.Mail.MailAddress'   cannot be serialized. Consider marking   it with the DataContractAttribute   Any suggestions? Understanding Python super() with __init__() methods I'm trying to understand the use of super(). From the looks of it, both child classes can be created, just fine.   I'm curious to know about the actual difference between the following 2 child classes.  class Base(object):     def __init__(self):         print "Base created"  class ChildA(Base):     def __init__(self):         Base.__init__(self)  class ChildB(Base):     def __init__(self):         super(ChildB, self).__init__()  ChildA()  ChildB() Chain-calling parent initialisers in python How to connect an LED indicator to a circuit? I would like to know how can i add a safety switch with an LED indicator to a circuit , so that if the safety switch is on then the LED lights , and when i want to use the device , all what i have to do is to press the normally-open switch.   I have attached this schematic and im not sure if it will work correctly  ,as i am a very beginner in electronics   Thanks Is it possible to add multiple materials to a text object? I know that for a mesh you can go into edit mode and select vertices and assign a specific material to them quite easily. I want to know if it is possible to do this with a Text object (which has no vertices). Is it appropriate to put a comma before "which"? If you, for example, have to add a person to an application whilst that person is on the phone, how do you politely ask for that person's gender if the voice and/or name has not proven decisive?  To clarify why I posted this question on this site: I was looking for an answer within the context of the English language and usage. The given answers have proven that this question really isn't off-topic, other languages know different distinctions that are relevant to addressing this issue. Do I need to activate the firewall? I only use Ubuntu for a home desktop use? I have installed a package using snap and I need to modify one of the files but when I try to change its ownership or permissions, I always get the following message:  sudo chmod +x ./my_file.js chmod: changing permissions of '/snap/my_app/my_file.js': Read-only file system   How can I modify files that are installed via snap? Brie Cheese and expiration date I have a Brie Cheese that has not been opened. It shows an expiration date that is 6 weeks ago. Is it still safe to eat? How to convert int[] to Integer[] in Java? Sci-Fi Movie/Show Where a Soul is Captured in a Glass Vessel I remember very little of this, I was quite young -  It was on television in the mid 90's, but seemed older. My wife was telling me about the 21 grams experiment and the memory clicked into place. Setting Inside of a mad scientist sort of lab, with the plasma balls and everything else, a character (Who in my mind resembles Gene Wilder in Young Frankenstein) is conducting an experiment. The room is hazy, lots of hues of purple and red. He has an assistant present. They were conducting some sort of experiment to try to figure out the secrets of immortality (or possibly reanimation). I remember them &quot;trapping&quot; a human soul in a glass vessel to see what it weighed or what kind of volume it took up - I believe they shot someone in this vessel, and because their soul could not &quot;escape&quot;, they did not die. Why do we multiply the magnetic flux by the winding number? Is radioactive decay spontaneous or random? When it comes to radioactive decay, what is the difference between random and spontaneous?  For example, when the count rate of a radioactive isotope is measured, the readings fluctuate. Is this a demonstration of the randomness of the process, or of its spontaneous nature?