Differentiate if an object is of type DateTime or Nullable (DateTime?)
Checking to see if a DateTime variable has had a value assigned
Recently I installed Ubuntu 12.10 x64 Server Edition on my PC. Unfortunately, I attempted to install a lightweight desktop but due to the fact that I have an old graphics card, the PC does not perform so well. I am thinking of re-installing an Ubuntu version but I do not want to lose the contents in my home folder. Is there any way to do that with a Live CD? How to use Boost in Visual Studio 2010 How to determine if string contains specific substring within the first X characters I want to check whether Value1 below contains "abc" within the first X characters. How would you check this with an if statement?  var Value1 = "ddabcgghh";  if (Value1.Contains("abc")) {     found = true; }   It could be within the first 3, 4 or 5 characters. How to apply multiple format to a list What is the Coandă effect? How is it defined, and what causes it? Can anybody explain to me the  well? I am finding that many definitions and explanations conflict.  I am particularly confused about the following points regarding the Coandă effect:   whether the Coandă effect is the same as normal boundary layer attachment to a surface whether the Coandă effect is only defined for convex surfaces over which a jet (of the same state as the surrounding fluid) is tangentially blown what causes the Coandă effect: the jet entraining the ambient fluid or a balance of pressure and centrifugal forces, or something else? In shell scripts used for unit testing with dynamic libraries in a directory other than the typical @rpath, I have previously been able to set DYLD_FALLBACK_LIBRARY_PATH to set the directory containing the libraries. Under 10.11.1, bash seems to ignore attempts to set this environment variable:  $ sh -x testscript.sh + DYLD_FALLBACK_LIBRARY_PATH=/Users/something/testinglibs + export DYLD_FALLBACK_LIBRARY_PATH + exec printenv   and DYLD_FALLBACK_LIBRARY_PATH is not present in printenv's output.  Is this a security-related hack in 10.11's shell? I haven't been able to find this change documented in man pages or online. Cleanest way to toggle a boolean variable in Java? Is there a better way to negate a boolean in Java than a simple if-else?  if (theBoolean) {     theBoolean = false; } else {     theBoolean = true; } 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. Is there a way to turn option strict off for just a single line of code?    I'm doing some maintenance work and I need to "cheat" in just one place and I don't want to lower the standard for the entire file. What is the purpose of -e in sed command? I can't find any documentation about the sed -e switch, for simple replace, do I need it?  e.g.  sed 's/foo/bar/'   VS  sed -e 's/foo/bar/' Is there a universal way to turn Windows 7 Aero desktop, all windows, etc into grayscale? I had an option to do this in Intel video drivers on my old laptop, now I have NVIDIA and don't know how to replicate this effect.   There might be a shader or filter that would cause Aero to render stuff into grayscale, but I was unable to find anything. Or must it be explicitly supported by video driver as a bonus? In D&amp;D 5e &quot;&quot; is a condition that can affect a creature during the first round of combat, only until the end of their turn:  [... T]he GM compares the Dexterity (Stealth) checks of anyone Hiding with the passive Wisdom (Perception) score of each creature on the opposing side. Any character or monster that doesn’t notice a threat is surprised at the start of the encounter. If you’re surprised, you can’t move or take an action on your first turn of the combat, and you can’t take a reaction until that turn ends. A member of a group can be surprised even if the other members aren’t. - PHB 189  Does the action that causes the surprise count as part of the round, though? Say Renee, a rogue, achieves a stealth check of 22, easily beating an orc sentry's passive perception. She sneaks directly behind him and stabs him in the back. Surely the orc isn't surprised at all until the dagger hits him (or if Renee misses, she fumbles around behind him or something). What I think it really boils down to in the end is: when is initiative rolled? If (in our example) initiative is rolled before Renee's attack hits (or misses) how can we justify the orc recovering from his surprise before the action that triggered said surprise even occurs, should he roll better than Renee on his initiative? I'd like to go with initiative is rolled immediately following whatever event began the encounter (which could be an attack, but is likely to often be something else wherever surprise isn't intended), but I can't find any documentation to support this stance.  Why Does Anyone Care? There are many reasons you might want someone to be surprised while you're attacking - in this example if Renee is over L3 (and took the Assassin archetype) she'll get 'Assassinate' if the orc is surprised, and 'Death Strike' if she's over L17. That's a lot of potential extra damage!  that if the orc is surprised, Renee will be able to retreat and hide, without having to take the disengage action as her bonus action to avoid an attack of opportunity. Of course, there's no way for her to know whether the orc is surprised or not at that stage, so trying this would be a bit of a gamble... Should you choose the MONEY or DECIMAL(x,y) datatypes in SQL Server? I'm curious as to whether or not there is a real difference between the money datatype and something like decimal(19,4) (which is what money uses internally, I believe).  I'm aware that money is specific to SQL Server. I want to know if there is a compelling reason to choose one over the other; most SQL Server samples (e.g. the AdventureWorks database) use money and not decimal for things like price information.    Should I just continue to use the money datatype, or is there a benefit to using decimal instead? Money is fewer characters to type, but that's not a valid reason :) In Ubuntu, I want to open a PDF document generated for Adobe Reader 10. Apparently the latest version which I can install is Adobe Reader 9.5.5. Is there a way to install version 10?  I installed Wine, but I don't know how to install acroread using Wine. Cartoon: 4 kids transform into video game characters to save the world from a hacker and an evil program There are 4 friends: 2 girls and 2 boys who play video games. A virus program escapes and, with the help of a programmer boy, transforms the world into a video game. But a good program in a white robe turns the four of them into video game characters to save the world.  The evil virus mostly looked like The Tick from the cartoon "The Tick". Big strong guy with muscles but in red spandex. Little head with antenas, BIG chin and evil mustache.  One hero is the typical blonde girl who can scream loudly with a microphone or headphones. The other chick was shorter, more a grumpy type and with her big metal boots she was able to rock / shake the ground. There was also a funny white boy with red hair, he was a cyber archer. And their black-skinned friend, a typical tech guy with maybe one laser eye.  The transformed world has always had a theme: a swamp, a volcano,  space, a cyber city, a sewer, once a pinball machine, and so on. For some game points they were able to summon different vehicles, weapons and reinforcements/buffs.  The story is made up of the usual repetitive events: every day the hacker guy transforms the world or just the city with a wicked program. Summoning new monsters and obstacles for stopping the good guys to defeat him.  But our heroes always win and the evil program comments what a loser he is and the guy get frustrated.  (In the end, they convince the hacker guy that it just using him and he chose the good side then they wiped out the evil program forever.) - NOPE XD  Not Code Lyoko, ReBoot, Linkers, Cyberchasers. There is no 3D; it was fully hand drawn. I think it was American, but was definitely not Japanese and there was no anime-like stuff. I was young when I saw it, i'm live in a foreign country Hungary. So i dont know when was it released, but maybe before 2005. The main group maybe has something "force" in their name. Unzip File: Permission Denied I am trying to unzip a file (Facebook download-your-info zip file), but here's what I got:   Is there a way I can force-unzip it?  Update: I tried sudo unzip file.zip -d destination_folder in terminal, and it unzipped the file, but what came out, all the files have size 0 bytes:   Update 2: I do have permission to the directory and the file.    (I'm really sorry if my question is asked badly. Let me know down in the comments :) ) Is list::size() really O(n)? Recently, I noticed some people mentioning that std::list::size() has a linear complexity. According to  , this is in fact implementation dependent as the standard doesn't say what the complexity has to be. The comment  says:     Actually, it depends on which STL you   are using. Microsoft Visual Studio V6   implements size() as {return (_Size);   } whereas gcc (at least in versions   3.3.2 and 4.1.0) do it as { return std::distance(begin(), end()); } The   first has constant speed, the second   has o(N) speed    So my guess is that for the VC++ crowd size() has constant complexity as Dinkumware probably won't have changed that fact since VC6. Am I right there? What does it look like currently in gcc? If it is really O(n), why did the developers choose to do so? Idiomatic expression for a difficult choice This has cropped up several times in the past couple of months, and I've been struggling to find  a fitting word to describe this phenomenon. I'll describe it:  You have two choices(no, it's not Hobson's choice). Both of them are desirable, yet both of them each have a tiny part which is most undesirable, such as a tough condition, or a demanding clause. You have difficulty deciding which one to pick.  Whenever something like that comes up, I think of the expression "Can't burn a candle at both ends", but I'm not looking for that.  I'm looking for an expression that describes a difficult choice. Any suggestions?  EDIT: It's idiomatic. I'm quite sure it is. It's an expression of some sort. And no, it isn't "dilemma" UTF8 to/from wide char conversion in STL Is it possible to convert UTF8 string in a std::string to std::wstring and vice versa in a platform independent manner? In a Windows application I would use MultiByteToWideChar and WideCharToMultiByte. However, the code is compiled for multiple OSes and I'm limited to standard C++ library. Starting services in batch file on windows 7