I'm creating some small lighting components for use with Quick Actions.  While "Never trust the client" means I will have backend validation, for a good user experience, I'd prefer to prevent bad data from even getting submitted.  The  seems to a convenient choice for receiving input and getting it take forward data to my server is working beautifully.  However, it isn't clear whether or how I might do any sort of validation on this data.  Or, if if I use some other input elements for the UX, will I be able to use them with lightning:recordEditForm?  (This question is different from the possible duplicate because the actual text of the question seemed to be about conditionally modifying the form to include additional fields instead of about validation.  And the provided answer was focused on the same goal.  Reading comments, I was able to glean enough information, but it a badly titled question and not a true duplicate.)
In a custom lightning component where one is using the recordEditForm tag, how can one validate fields that are filled by the user?  For example, in a quick action to create a Case record, we can have the following line inside the recordEditForm:  &lt;lightning:inputField aura:id="caseAccount" fieldName="AccountId"/&gt;   How can one enable or disable a button if certain fields are assigned by the user? Like if the account is specified, then a button on the component is enabled for the user.  Making the field required is not an option.
So I know umask can restrict privileged users, using this format umask ugo.  I understand that the read = 4, write = 2, and exec = 1. However, when I type umask, it returns 4 digits which is 0022 or 0073. I have no understanding of how does this work now because there is an extra digit. What is that extra digit and what does 0022 mean? Is it possible to send an email from my Java application using a GMail account?  I have configured my company mail server with Java app to send email, but that's not going to cut it when I distribute the application. Answers with any of using Hotmail, Yahoo or GMail are acceptable. I have a table tabName with the following rows:  id(PK) .. Created(datetime)     Resolved(datetime) Status(new/resolved/open) 1          2015-05-10 00:00:00   1970-01-01 ..       open 2          2015-05-10 ..         1970-01-01 ..       new 3          2015-05-10            2015-05-12          resolved 4          2015-05-11 ..         1970-01-01 ..       open 5          2015-05-11 ..         1970-01-01 ..       new 6          2015-05-11            2015-05-11          resolved 7          2015-05-12 ..         1970-01-01 ..       open 8          2015-05-12 ..         1970-01-01 ..       new 9          2015-05-12            2015-05-12          resolved   NOTE:  1970-01-01 .. is default time for all the tickets which are still open.  I have to frame a query to get the count of tickets still open, date wise. Say like on 10 May I have 3 tickets opened. Noting that for id = 3, resolved date is not 10 but it's closed on 12 May.  I framed a query like  SELECT DATE_FORMAT(Created, '%d-%m') AS createdd, COUNT(1) FROM tabName WHERE DATE_FORMAT(Resolved, '%d-%m') &gt; DATE_FORMAT(Created, '%d-%m')       AND YEAR(Created) = '2015' GROUP BY createdd;   The above query gets all the tickets whose Resolved date is greater than the date which is considered for the count. This may count newer tickets as well. And also if the older tickets which are not resolved yet is not counted.  Is there any other way to frame the required query? I have been juggling with this query from last 3 days. Not able to find out still.  Updated: As suggested by Abhik, i have tried in sqlfiddle site.  Here is what i created:  CREATE TABLE test    (idint,createddatetime,resolveddatetime, status varchar(15), PRIMARY KEY (id));    INSERT INTO test       (id,'created','resolved',status`) VALUES       (1,'2015-05-10 00:00:00','1970-01-01 00:00:00','open'),    (2,'2015-05-10 00:00:00','1970-01-01 00:00:00','new'),    (3,'2015-05-10 00:00:00','2015-05-12 00:00:00','resolved'),    (4,'2015-05-11 00:00:00','1970-01-01 00:00:00','open'),    (5,'2015-05-11 00:00:00','1970-01-01 00:00:00','new'),    (6,'2015-05-11 00:00:00','2015-05-11 00:00:00','resolved'),    (7,'2015-05-12 00:00:00','1970-01-01 00:00:00','open'),    (8,'2015-05-12 00:00:00','1970-01-01 00:00:00','new'),    (9,'2015-05-12 00:00:00','1970-01-01 00:00:00','open')    ;   `   When i run  ` select created_date, @open:= @open+open_ticket-resolved as open from(  select   date_format(created,'%d-%m') as created_date ,  sum( case when status='open' then 1 else 0 end )+  sum( case when status='new' then 1 else 0 end )+  sum( case when status='resolved' and ( date(resolved) > date(created) or  date(resolved) = date(created)) then 1 else 0 end ) as open_ticket,  sum(case when status = 'resolved' and date(resolved) = date(created) then 1   else 0 end) as resolved  from test  where  YEAR(Created) = '2015'  group by created_date )x,  (select @open:=0)r order by created_date ; `  I got following output  created_date   open 10-05   3 11-05   5 12-05   8  Here count of still open tickets for 12-05 must be 7. The above query includes ticket id "3" , which is closed on 12-05. So is there any way to exclude this? If i am able to get this right, then i will have full fledged query. What are the differences between $$, \[, align, equation and displaymath? How do I find out which dlls an executable will load? If I have a Windows executable, how can I find out which dlls it will load?  I'm just talking about which ones that will be loaded statically, not ones it might load dynamically with something like LoadLibrary. Is there a way to have a copy of any message sent from a Gmail account sent to another address?  I've got any messages coming to my address copied to another (see  for one solution, setting up filters is another), but I haven't yet found a way to have outbound messages automatically copied.  Is there a way? how to prove an element is non-zero in a tensor-product I was studying the following example from Atiyah &amp; MacDonald's Introduction to Commutative Algebra:   Let $x$ be the non-zero element in $N := \mathbf{Z}/ 2\mathbf{Z}$, $M := \mathbf{Z}$, and $M' := 2 \mathbf{Z}$. The element $2 \otimes x$ is zero in $M \otimes N$, but non-zero in $M' \otimes N$. I suppose this can be seen by the fact that $2 \otimes x$ generates $M' \otimes N$, and the tensor-product $M' \otimes N$ is non-zero.   However, I was wondering, what one would do if that element weren't a generator of $M' \otimes N$. So my question is:   What are the methods to prove that an element is non-zero in a tensor-product of modules?   Thanks a lot! Seatpost Overextension I've been riding with my very short seat post extended well past its maximum extension line for quite a while now. Looking at the seat post itself I don't see any signs of deformation or damage other than some very minor surface rust.   Could my bike frame have been damaged? Could the lever force have damaged the frame? I can post some pictures of the frame if needed. My bike is all aluminum. Is there a Pythonic way to have only one instance of a program running?   The only reasonable solution I've come up with is trying to run it as a server on some port, then second program trying to bind to same port - fails. But it's not really a great idea, maybe there's something more lightweight than this?    (Take into consideration that program is expected to fail sometimes, i.e. segfault - so things like "lock file" won't work) Abstract class with all concrete methods I want to change the default timeout in Chrome. In Firefox I can set the value of network.http.connection-timeout in about:config - but how can I do that in Chrome? How secure would github hosting be for private repositories? Will upgrading Windows 8 to 8.1 affect Ubuntu? It's a rather simple question (I hope). I currently have Windows 8 and I am dual booting it with Ubuntu 13.04.   If I were to install the latest update for Windows 8, that being 8.1, will it affect Ubuntu or will there be any conflicts between the two? I am a Ph.D. dropout with a one year of career gap. I want to return to academia, but now  I have realized that it was perhaps the biggest mistake to take a gap after quitting my Ph.D. The purpose of taking a gap was to work on my communication skills and get a  new perspective on my work and my career in science. This could have been done within a period of 2-3 months but it became one year long because of my own recklessness. I allowed myself to distract from my goal and I started working on my hobby i.e. Painting. I lost myself there and completely lost track of my time. I was really enjoying everything about this new venture. I took it as a challenge to become better at my skills in painting. Eventually, I became the best in my group and got lots of appreciation. But then, I lost my interest while realizing that there was no further challenge and all there was left is to work and work while crafting your art which was never going to be perfect. It made me realize that what I actually love is to take the new challenges and work on myself. To be an artist was never a career option for me, all I wanted was to learn the skills. That's it!   While counting my achievement in science, I  realized that it was an irresponsible thing to take a gap in doing something that has nothing to do with science. Earlier I had a scholarship and a very competitive mind that has led me to get a Ph.D. position in one of the best labs in the country. Now I don't have the scholarship. I want to go back to my world of research where I was accelerating exponentially. I want to tackle the challenges of science with a new perspective and better skills. I want to be productive more than earlier and ready to take all the tough challenges.  But I feel embarrassed about my past mistake. Because of this, I come across as someone who is not sincere about her career. But I can't help it because the truth is that I did behave insincerely by losing track of my time.  I should have been conscious enough to realize the consequences. Now, what do I do? The past has gone and the vision of the present is crying for a better future. How do I make things better like before? Should we sign-then-encrypt, or encrypt-then-sign? Frequently, we want to send messages that are (a) encrypted, so passive attackers can't discover the plaintext of the message, and (b) signed with a private-key digital signature, so active attackers can't make Alice think that a message came from Bob when it didn't. Is it better to (a) generate the digital signature from the (hashed) plaintext, and then encrypt a file containing both the plaintext message and the digital signature? Or is it better to (b) encrypt the message first, and then generate a digital signature from the (hashed) encrypted file? Or (c) combine encryption and public-key digital signatures in some other way? A closely related earlier question (  ) seems to focus on symmetric-key MAC authentication. As , Do the same issues with (symmetric-key) MAC-then-encrypt apply to (public-key) sign-then-encrypt? I just saw Death in Paradise Season 5 Episode 3, which features a photographer using a DSLR to shoot a fashion runway performance.  He had a flash that was a ring around the lens.   I thought that was for macro shots only, where the extreme close-up has trouble with normal flash placement.  For normal photos you want the flash far from the lens, like on a boom on a separate handle framing the camera.  I've seen some recent trendiness in having ring-shaped catch lights, but I supposed those would be positioned in the normal manner: off-angle from the lens.  I suppose if an on-camera had any effect at all it would be for some subtle fill flash.  Is this a realistic thing to see from a pro? Or is it just a cool-looking prop that doesn't really fit the situation? I'm trying to prove that if there are to numbers $n,m$ (natural numbers), and their smallest common multiple is $k$, so that $k = n·i$ and $k = m·j$ for some $i,j$ natural numbers, any common multiple $q$ of $n,m$ is a multiple of $k$, so that there exists a $g$ so that $q=k·g$.  Logically it seems correct, but I can't seem to prove it... Any help? Automatically fit the graphics in the remaining space of a Beamer slide Change the location of .bashrc Is it possible to change the location of .bashrc from /home/orhanc/.bashrc to some other directory? Do lens hoods need to be matched to focal length? Is it true that not all generic lens hoods work on all lenses (provided the filter diameter matches, of course)? I read that the focal length plays a role in it - but I cannot find such readings on any lens hoods I see available online.