What is difference between a DateTime and a DateTimeOffset object?   And when should we use each one?   In a web-application that may change the server's area, storing date and time.  Which one is better, or is there any other suggestions?
A few months ago I was introduced to the new  type and was glad 's flaws with regard to time zones were finally taken care of.  However, I was left wondering if there were any overhead or problems that could occur from using this new type.  I work on a multi-locale web application. Does anyone know of anything that could sway me from just using it for all my date/time work? Is there a window for abuse here?  Reference:
How should I use quotation marks in sections of multiline dialogue? If I want to introduce a “pause” between lines of dialogue from the same person by inserting a spacing line, how should I use the quotation marks correctly to indicate continued dialogue? I really don’t want to write it in a gossipy “he said, she said” way!  I have noticed that closing quotations aren’t always placed on the end of a line.  What are the rules? Schengen area 90 days limit: Can I leave on the 91st day? Can anyone tell me if the 90 days is in fact 90 nights? Can you leave the Schengen area on the 91st day? Or are you only allowed 89 nights and you are required to leave on the 90th day? What are the prerequisites to studying general relativity? This question recently appeared :     Slashdot posts a fair number of physics stories. Many of us, myself included, don't have the background to understand them. So I'd like to ask the Slashdot math/physics community to construct a curriculum that gets me, an average college grad with two semesters of chemistry, one of calculus, and maybe 2-3 applied statistics courses, all the way to understanding the mathematics of general relativity. What would I need to learn, in what order, and what texts should I use? Before I get killed here, I know this isn't a weekend project, but it seems like it could be fun to do in my spare time for the next ... decade.   It seems like something that would be a good addition to this site: I think it's specific enough to be answerable but still generally useful. The textbook aspect is covered pretty well by , but beyond that: What college-level subjects in physics and math are prerequisites to studying general relativity in mathematical detail? "Single ampersand used with wrong catcode" error using tikz matrix in beamer Ubuntu system is broken after accidentally uninstalling many packages I accidentally removed all the packages starting with the name jpeg with:  sudo apt-get remove jpeg*   This screwed up a lot of things, removed Unity, Firefox, Flash player etc.  I somehow managed to recover the desktop and unity but then a lot of things are still buggy. For example .rpm files and .tag.gz just won't open up at all.  What I want is a way to fix everything that's amiss. Something that is the equivalent of a 'repair installation' with a windows disc.  Any tips, anyone? How to make a div 100% height of the browser window Don't delete comments with link to duplicate if they are modified A user just posted his question a second time here on meta after the first was closed as a duplicate. I wrote a comment on the second post, explaining that the answer to his question is in the linked duplicate and that he shouldn't circumvent the closure process by asking a second identical question.  When the second post was closed as a duplicate my comment was automatically deleted. As far as I understand this is a heuristic that removes obsolete comments, which it considers every comment that contains a link to one of the duplicates.  This heuristic is too aggressive and removes comments that go beyond "Duplicate here: link". I suggest that it should be changed to only remove the default duplicate comment, and not any comment that was edited by the owner nor any free-form comment that happens to include a link to the duplicate.  This also triggers for any comment that contains the word "duplicate" and link to any question, not only the question being chosen as duplicate, which makes this much worse. How to urlencode data for curl command? I am trying to write a bash script for testing that takes a parameter and sends it through curl to web site.  I need to url encode the value to make sure that special characters are processed properly.  What is the best way to do this?    Here is my basic script so far:  #!/bin/bash host=${1:?'bad host'} value=$2 shift shift curl -v -d "param=${value}" http://${host}/somepath $@ In C++, what is a virtual base class? I want to know what a "virtual base class" is and what it means.  Let me show an example:  class Foo { public:     void DoSomething() { /* ... */ } };  class Bar : public virtual Foo { public:     void DoSpecific() { /* ... */ } }; What websites or other resources do users of Blender have available to them to report bugs or problems with the program?  I would like to get this issue cleared in Q&amp;A format so that we can link new users with bug-report-style questions to this post. Cannot refer to a non-final variable inside an inner class defined in a different method What are the eigenvalues of $\operatorname{ad}x$? Let $x\in \operatorname{gl}(n,F)$ have $n$ distinct eigenvalues $a_1,\ldots,a_n$ in $F$. Prove that the eigenvalues of $\text{ad }x$ are precisely the $n^2$ scalars $a_i-a_j$ ($1\leq i,j\leq n$), which of course need not be distinct.   So we can represent $x$ by an $n\times n$ matrix $X$. We have $Xv_1=a_1v_1,\ldots, Xv_n=a_nv_n$ for eigenvectors $v_1,\ldots,v_n$.   Now, $\operatorname{ad}x$ takes $y\in \operatorname{gl}(n,F)$ to $xy-yx$. I need to show that some $y$ is taken to a scalar multiple of itself, where that scalar is $a_i-a_j$. What could be that $y$? Prove that $g$ is tangent to the graph of $f$ So I had these two functions and the following exercise:  $f(x)=x^3-2x^2$ $g_p(x)=px$ Prove that $g_{-1}$ is a tangent line to the graph of $f$. How many points do $g_{-1}$ and $f(x)$ have in common?  So yeah, the points in common are fairly simple to figure out:  Points in common: $x=1$ and $x=0$  So to see if it's actually tangent to the graph, I took the derivative of both functions at the points where they meet. The result:  $f'(x)=3x^2-4x$ $g'_{-1}(x)=-1$  So $f'(1)=-1$ and $f'(0)=0$ So I'm not sure why I get this answer? By the question, we are supposed to prove that its tangent to the graph of $f$ but by my calculation, it seems like only $f(1)$ is tangent with $g_{-1}(1)$. Help is appreciated! (Please avoid hint answers). DIY.Blogoverflow.com is redirecting to stackexchange.com/blogs I seem to be the unlucky recipient of a 302 redirect from the blogoverflow site, and was asked by Grace Note to upload the issue here. While trying to access the DIY blog site, I'm getting bounced over to the generic SE blog page. I've tried resolving this by changing DNS servers, clearing my browser cache, and trying a different browser. Others going to the same site aren't experiencing the issue, but I'm at a loss for what's different on my system that would cause this. Here's the wget output of the redirect:  --2014-02-18 14:59:28--  http://diy.blogoverflow.com/ Resolving diy.blogoverflow.com (diy.blogoverflow.com)... 67.228.172.87 Connecting to diy.blogoverflow.com (diy.blogoverflow.com)|67.228.172.87|:80... c onnected. HTTP request sent, awaiting response...    HTTP/1.1 302 Found   Date: Tue, 18 Feb 2014 19:59:28 GMT   Server: Apache   X-Powered-By: PHP/5.4.22   Location: http://stackexchange.com/blogs   Content-Length: 1001   Connection: close   Content-Type: text/html; charset=UTF-8 Location: http://stackexchange.com/blogs [following] --2014-02-18 14:59:28--  http://stackexchange.com/blogs Resolving stackexchange.com (stackexchange.com)... 198.252.206.140 Connecting to stackexchange.com (stackexchange.com)|198.252.206.140|:80... conne cted. HTTP request sent, awaiting response...    HTTP/1.1 200 OK   Cache-Control: private   Content-Type: text/html; charset=utf-8   X-Frame-Options: SAMEORIGIN   Date: Tue, 18 Feb 2014 19:59:28 GMT   Content-Length: 16775 Length: 16775 (16K) [text/html] Saving to: ‘index.html.1’       0K .......... ......                                     100% 1.04M=0.02s Logging into Ask LibreOffice with my Stack Exchange OpenID If I'm on , I click on OpenID and then enter  and click Log In, I get a page that says:  An error occurred on the server  This event has been recorded.  If you believe you encountered this message in error, please report it.   I clicked report it and here I am reporting it! Using Firefox 26 How to Configure Launcher Placement in Multi-monitor Setup I use a large monitor as primary and laptop screen as secondary. Is it possible to move the launcher to my big monitor or do I have to turn off my laptop monitor?   "Monitor Preferences" (Launcher search -> "Monitors") does not have a way to set the default/primary monitor. nvidia-settings which I just installed says "You do not appear to be using the NVDIA X driver. Please edit your X configuration file (just run nvidia-xconfig as root), and restart the X server.  sudo nvidia-xconfig says sudo: nvidia-xconfig: command not found.  I guess I don't have an AMD driver because I don't have "AMD Catylist Control Center" in the launcher search. Validity of maximising log-likelihood for maximum likelihood estimation For reasons owing to mathematical convenience, when finding MLEs (maximum likelihood estimates), it is often the log-likelihood function---as opposed to the standard likelihood function---which is maximised.  From what I've gathered, this approach is deemed valid as a result of the monotonically increasing nature of the (natural) logarithm function.  My understanding of a monotonically increasing function is: for all $x$ and $y$ (defined on a subset of the reals), if $x \leq y$ then $f(x) \leq f(y)$.  This, however, does not appear to be the case for all log-likelihood functions; for example: for the log-likelihood $\text{Gamma}(3, 5)$ function, if $x = 0.15$ and $y = 0.46$, then $f(x) = -0.59$ and $f(y) = -1.19$.  Clearly, I've misunderstood this concept. Fundamentally, I guess I'm asking can somebody (preferably mathematically) demonstrate why:  $$ \hat{\theta} = \text{argmax} \text{ } L(\theta) = \text{argmax} \text{ } \text{log} \text{ } L(\theta) $$  where $\hat{\theta}$ is the MLE for a given likelihood function. I have a directory with ~1M files and need to search for particular patterns. I know how to do it for all the files:  find /path/ -exec grep -H -m 1 'pattern' \{\} \;   The full output is not desired (too slow). Several first hits are OK, so I tried to limit number of the lines:  find /path/ -exec grep -H -m 1 'pattern' \{\} \; | head -n 5   This results in 5 lines followed by  find: `grep' terminated by signal 13   and find continues to work. This is well explained . I tried quit action:  find /path/ -exec grep -H -m 1 'pattern' \{\} \; -quit   This outputs only the first match.  Is it possible to limit find output with specific number of results (like providing an argument to quit similar to head -n)? Are human chromosomes connected or separate molecules? Do the 46 human chromosomes form a single unbroken DNA helix?  Or is it rather that a human's genome consists of 46 disconnected helices?    If it is the former, does the common numbering scheme for the chromosomes have any correlation to their actual ordering in the one large strand?  If is the latter, is there a convention on how the chromosomes are ordered in genomic datasets?  Also, is there a clear understanding of how sister chromosomes "find" each other in Meiosis I?  Generally, during periods when Mitosis/Meiosis are not occurring,  what's a good physical picture for how the chromosomes are physically arranged (e.g. a bowl of 46 spaghetti noodles, or maybe the sister chromosomes always stay close together, etc)  thanks! test fails because of TestMethod do not support getContent call My below test fails because of Run Failures: TestRangehoodObjectionSheet.RangehoodObjectionSheetTest Methods defined as TestMethod do not support getContent call. I added the Blob thinking it might resolve but it doesn't work. What could be the problem here? Have I used the Blob correctly?  @isTest public with sharing class TestRangehoodObjectionSheet {      static testMethod void RangehoodObjectionSheetTest() {             String Build                = NBATRecords.getIdFromDeveloperName('Plan_Reviews__c','Building_Plan_Review');             Account a = new Account(Name = 'Test1' ,Type = 'Lead Acct',BillingState = 'CA',Industry = 'Business Services');             insert a;              Establishment_Record__c er = new Establishment_Record__c(Account__c=a.Id ,Project_Name__c = 'TestPreet',PremiseStreet__c='Manhattan ave',PremiseBorough__c='Manhattan',PremiseState__c='NY',PremisePostalCode__c='11102',Referral_Source__c='311',Data_Source__c='CAMIS',Phase__c='Initiate',Business_Status__c='Open' );             insert er;              Application__c ap = new Application__c(Establishment_Record__c=er.Id,Job_Number__c='222222222');             insert ap;              Plan_Reviews__c pr = new Plan_Reviews__c(Application__c =ap.Id ,DOB_Job_Number__c='222222222',RecordTypeId =Build,Objections__c='Pipe size not indicated');             insert pr;             PageReference pageRef = Page.RangehoodObjectionSheet;              Test.setCurrentPage(pageRef);               Blob content = Test.isRunningTest() ? Blob.valueOf('UNIT.TEST') : pageRef.getContent();              Plan_Reviews__c              p   = new Plan_Reviews__c(id=pr.Id);                ApexPages.StandardController sc  = new ApexPages.standardController(p);             System.assertNotEquals(sc,null);             RangehoodObjectionExtention    ext = new RangehoodObjectionExtention(sc);              ext.Savecopy();       } }   Actual class for the test:  public with sharing class RangehoodObjectionExtention { private final ApexPages.StandardController controller; private final Id                           planreviewID; public String imageURL{get;set;} public List&lt;String&gt; objlist {get;set;}  public string currentdate {get; set;}    public RangehoodObjectionExtention (ApexPages.StandardController stdController) {         controller   = stdController;         planreviewID = (Id)controller.getRecord().get('Id');         Date dt = Date.today();         currentdate = dt.format();         list&lt;Plan_Reviews__c&gt; prlist = [select FDNY_Objections__c from Plan_Reviews__c where id = :planreviewID limit 1];         string obj;         for(Plan_Reviews__c pr: prlist){            obj = pr.FDNY_Objections__c;             }         if(obj!=null){            list&lt;string&gt; objections = obj.split(';');             integer i =1;            objlist = new list&lt;string&gt;();            for(string o : objections){               objlist.add(i++ +'. '+o);            }         }         imageURL='/servlet/servlet.FileDownload?file=';         List&lt; document &gt; documentList=[select name from document where Name='RangehoodObjectionLogo'];         if(documentList.size()&gt;0)         {            imageURL=imageURL+documentList[0].id;         }       }          public PageReference Savecopy(){       PageReference p = Page.RangehoodObjectionSheet;       blob b = ApexPages.currentPage().getContentAsPDF ();       Attachment a = new Attachment();       a.body = b;       a.name = 'Rangehood Objection sheet Issued '+currentdate+'.pdf';       a.parentid = planreviewID;        insert a;        PageReference pref = new PageReference('/'+planreviewID);       return pref;    } }