Concatenating labels with some NULL values in QGIS? I am trying to concatenate two fields into one label, where the second field sometimes has a NULL value.  The first field is a numerical street address (ADR_NO) the second field is a text string (ADR_NO_SFX).  I want to combine them like this:  13, 13A, 14, 15, 15A, etc  I tried the solution here  but the expression dialogue throws an error.  I also tried this, but I get empty labels whenever "ADR_NO_SFX" is NULL.   CASE WHEN  "ADR_NO_SFX" = NULL   THEN "ADR_NO"   ELSE "ADR_NO" || '-' || "ADR_NO_SFX" END
Displaying multiple fields as labels if one field is null in QGIS? I am having some issues trying to show multiple fields for a single label in QGIS. In QGIS2.6, attempting to display labels for a feature consisting of multiple fields results in an empty label if one of the fields is null. So for example, in the label expression dialog:  concat("Temp Site",'\n',"Notes",'\n',"Function")   will function normally unless one of the fields is null, then it results in no label being shown. Using the '||' operator instead in the expression dialog also results in the same behaviour:  "Temp Site" || '\n'  ||  "Notes" || '\n'  ||  "Function"   Is there a way to display the labels even if one of the fields is null?
Is the set of points in the plane whose coordinates are either both irrational, or both rational connected? How do I simulate flip of biased coin? In unbiased coin flip H or T occurs 50% of times.  But I want to simulate coin which gives H  with probability 'p' and T with probability '(1-p)'.  something like this:  def flip(p):    '''this function return H with probability p'''    # do something    return result  &gt;&gt; [flip(0.8) for i in xrange(10)] [H,H,T,H,H,H,T,H,H,H] A fellow player is uncooperative with the group and gets GM favoritism. How do I handle this? I actually have two situations but they are interconnected. Our group is currently playing a Dresden game. The GM and one of the players are married. Along with that, he is a new member to the group. I can understand her (the GM) wanting to make him feel welcome but it has gone into the the realm of blatant favoritism. A few examples:   Every idea he has is deemed fantastic, wonderful, awesome and is always successful. Most of the time he doesn't have to roll to see if he succeeds; he just does. After a series of major setbacks to the other player's characters, I joked that her husband was the only one left to mess with. Her answer to that was that she would absolutely not be messing with him in the game. He and his character were safe from that. In the last session, he and another player had to make the same roll using the same skill for the same information. He needed a fair to succeed. The other player needed a great. Not the first time that has happened.    The second part of this has to do with him as well. As I said, he is new to the group. When we were discussing a game to play, it was made clear that it would be cooperative. We would all be working together to a common end. However, he will not- I mean ever- share any information with the rest of the group. No matter how vital or needed that information is to advance the story, he just smiles and says he's got nothing. To try and get around this problem, a group aspect was created. That way if a situation or information that everybody needed to know came up, a fate chip could be played and anyone who wanted to be a part of it could be present. He is totally abusing it. Now, instead of just not telling us anything, he adds give me a fate chip and maybe I'll tell you something. It's like he is trying to beat us at the game and that is not the way it was set up.    So, the question to these two situations is what do I do? How do I handle this in a rational and sensitive way? To complicate things further, the GM is my best friend. He is her husband. I don't want to put her in the middle but I am about ready to quit the game. I am tired of it being his game and everyone else being bit players. Should I talk to her or should I talk to him? If anyone has had experience with this, any advice would be appreciated. Offline update of Windows? What options, if any, exist for offline update of Microsoft  Windows?  If a solution exists please list your experience using it.    Background:  If for any reason a computer does not have a connection to  the Internet or the connection is too slow to download  several hundreds of megabytes every so often some kind of  offline Windows Update is required.  In a multi-computer environment a lot of bandwidth (and thus in some cases money) and/or  time could also be saved if it is possible to update in an  offline manner. I have the following validation rule:  AND(  $Profile.Name &lt;&gt; 'System Administrator',  OR(  ISPICKVAL(PRIORVALUE(Level__c), "Archived"),  ISPICKVAL(PRIORVALUE(Level__c), "Closed")  )  )   This validation rule is on the opportunity object, and what I want to achieve is, if the picklist Level__c is either set to Archived or Closed, the opportunity record can only be edited by the System Administrator.  For some reason though, the validation rule also triggers, when I want to set the Level__c to Archived or Closed. But this is not what I want.   Any idea what's wrong with the validation rule? How Do I Allow A Standard User to Install Programs? I want to extract infromation from logs using a shell script for a particular time range . A line in logs looks like this:  [14:58:27:176][15-10-2015]: testing1-vidya-Thu Oct 15 11:49:27 IST 2015 [14:59:27:178][15-10-2015]: testing2-vidya-Thu Oct 15 11:49:27 IST 2015 [15:00:27:179][15-10-2015]: testing3-vidya-Thu Oct 15 11:49:27 IST 2015 [15:01:27:180][15-10-2015]: testing4-vidya-Thu Oct 15 11:49:27 IST 2015 [15:01:27:181][15-10-2015]: testing5-vidya-Thu Oct 15 11:49:27 IST 2015 [15:02:27:182][15-10-2015]: testing6-vidya-Thu Oct 15 11:49:27 IST 2015 [15:02:27:183][15-10-2015]: testing7-vidya-Thu Oct 15 11:49:27 IST 2015 [15:02:27:184][15-10-2015]: testing8-vidya-Thu Oct 15 11:49:27 IST 2015 [15:02:27:191][15-10-2015]: testing9-vidya-Thu Oct 15 11:49:27 IST 2015 [15:03:27:192][15-10-2015]: testing10-vidya-Thu Oct 15 11:49:27 IST 2015 [15:03:27:193][15-10-2015]: testing11-vidya-Thu Oct 15 11:49:27 IST 2015 [15:03:27:208][15-10-2015]: testing12-vidya-Thu Oct 15 11:49:27 IST 2015 [15:04:27:209][15-10-2015]: testing13-vidya-Thu Oct 15 11:49:27 IST 2015 [15:49:27:210][15-10-2015]: testing14-vidya-Thu Oct 15 11:49:27 IST 2015 [13:02:17:209][15-10-2015]: testing13-vidya-Thu Oct 15 11:49:27 IST 2015 [15:04:27:209][16-10-2015]: testing13-vidya-Fri Oct 16 11:49:27 IST 2015 [15:49:27:210][16-10-2015]: testing14-vidya-Fri Oct 16 11:49:27 IST 2015   I need to extract data in specific intervals. for example in between 14:59 to 15:03 on 15-10-2015 as shown below:   [14:59:27:178][15-10-2015]: testing2-vidya-Thu Oct 15 11:49:27 IST 2015 [15:00:27:179][15-10-2015]: testing3-vidya-Thu Oct 15 11:49:27 IST 2015 [15:01:27:180][15-10-2015]: testing4-vidya-Thu Oct 15 11:49:27 IST 2015 [15:01:27:181][15-10-2015]: testing5-vidya-Thu Oct 15 11:49:27 IST 2015 [15:02:27:182][15-10-2015]: testing6-vidya-Thu Oct 15 11:49:27 IST 2015 [15:02:27:183][15-10-2015]: testing7-vidya-Thu Oct 15 11:49:27 IST 2015 [15:02:27:184][15-10-2015]: testing8-vidya-Thu Oct 15 11:49:27 IST 2015 [15:02:27:191][15-10-2015]: testing9-vidya-Thu Oct 15 11:49:27 IST 2015 [15:03:27:192][15-10-2015]: testing10-vidya-Thu Oct 15 11:49:27 IST 2015 [15:03:27:193][15-10-2015]: testing11-vidya-Thu Oct 15 11:49:27 IST 2015 [15:03:27:208][15-10-2015]: testing12-vidya-Thu Oct 15 11:49:27 IST 2015   I am new to shell script.I have tried with grep command . Can anyone suggest me how to do this ? "The queen of England's crown" or "The queen's of England crown"? Possible Duplicate:          What is the correct way of these two sentences?   The queen of England's crown The queen's of England crown   Strictly linguistically, sentence 2 should be the correct one, since the crown belongs to the queen and not to England but it sounds really awkward to pronounce. Automatic field should take the required entry Questions with mathjax don't fit in the box This bug is intermittent, only showing up on some answers, but not others.  Sometimes, posts that have mathjax equations expand the math, but don't resize the text box, cutting off some text on the bottom.  Note that this is on the IOS public beta, so that may partially have caused the problem.     App Version: 1.5.3.5 Device: iPhone 5s (GSM) OS Version: Version 10.0 (Build 14A5322e) Why didn't James' love and sacrifice for Lily protect her? We know that Harry survived Voldemort's killing curse because Lily loved him so much that she sacrificed herself in an attempt to protect him. This resulted in a very powerful charm that pretty much rendered Harry immune to Voldemort (until Voldemort figured out the work-around). Then there's this passage describing that night:  [Voldemort] was over the threshold as James came sprinting down the hall. It was easy, too easy, he had not even picked up his wand ... &quot;Lily, take Harry and go! It's him! Go! Run! I'll hold him off -&quot; Hold him off, without a wand in his hand! ... He laughed before casting the curse ... &quot;Avada Kedavra!&quot; Harry Potter and the Deathly Hallows Chapter 17: Bathilda's Secret  So James Potter, fully aware that he was sacrificing himself (he said &quot;I'll hold him off,&quot; not &quot;I'll get rid of him&quot;) ran to face Voldemort because of his love for Lily and Harry. This seems to be very similar to how Lily tried to protect Harry from Voldemort even though she knew she would die. It seems to me that the same charm should have been cast upon Lily when James died, but just moments later Voldemort killed her too. Apparently James' sacrifice did not result in a charm that protected Lily, even though he did it from love for her and Harry. Why is this? Was something different in the circumstances? Storing datetime values in Shapefiles using QGIS? I have a shapefile with date in a string field. I create a new field with date type and use the calculator to make the conversion. But the result only provide the date part, the time part is removed. Even when the preview show the correct conversion.  Here you can see the original string field time and the result date time2. And the use of the conversion function to_datetime() and the preview result at the end    If you go to the layer properties you can change the edit mode to date/time. Then if go to the data and try to edit time2 you get the current date/time. So is possible save date and time in the same field. But the update tool still doesn't work as expected      As J.R said. Even when you can change QGIS edit to allow Date/Time the save to shapefile will discard the time. What is wrong with defining \bal as \begin{align}? Is there a VB.NET-Like operator in C#? Is a time series the same as a stochastic process? A stochastic process is a process that evolves over time, so is it really a fancier way of saying "time series"? Use a shell variable in awk Is $2^{|\mathbb{N}|} = |\mathbb{R}|$? Prove that $\int_0^1t^{p-1}(1-t)^{q-1}\,dt=\frac{\Gamma(p)\Gamma(q)}{\Gamma(p+q)}$ for positive $p$ and $q$ I'm trying to prove that for $p,q&gt;0$, we have $$\int_0^1t^{p-1}(1-t)^{q-1}\,dt=\frac{\Gamma(p)\Gamma(q)}{\Gamma(p+q)}.$$    The hint given suggests that we express $\Gamma(p)\Gamma(q)$ as a double integral, then do a change of variables, but I've been unable thus far to express it as a double integral.  Can anyone get me started or suggest an alternate approach?  Note: This wasn't actually given to me as the $\Gamma$ function, just as a function $f$ satisfying $$f(p)=\int_0^\infty e^{-t}t^{p-1}\,dt$$ for all $p&gt;0$, but I recognized that. This is in the context of an advanced calculus practice exam. I have a dual boot laptop (Windows 10). I ran general updates and now my Ubuntu won't boot.   I ran in recovery mode and still it freezes in the same place.      Kernel panic – not syncing: Attempted to kill init! exit code=0x00007f00 C# equivalent to wildcard imports in Java Is there a way in C# to import everything inside a namespace like there is in Java with the wildcard character?  import java.awt.*;