MySQL: What's the best to use, Unix TimeStamp Or DATETIME
Should I use the datetime or timestamp data type in MySQL?
How do I create a deb package for a single python script? I have a single python script that I want to distribute as a deb package. It is a  which shows local date in Unity panel. I did follow  but I could not create a deb package because it fails.   Can someone give me a step-by-step instruction on what I should do? As far as I know this script depends on python-appindicator.   NOTE: I do not want any links to Debian/Ubuntu packaging instructions. I have seen most of them. I don't find them beginner friendly. $\sum_{i=1}^n(a_i)\sum_{i=1}^n(\frac{1}{a_i})\ge n^2$ is what I want to prove, where $a_i&gt;0$ and I need to showwhen equality holds.  I have tried using Cauchy-Schwarz, where inside the sums I multiply each value by 1 to do it but it doesn't work out.  I have also done  $\sum_{i=1}^n(a_i)\sum_{i=1}^n(\frac{1}{a_i})=\sum_{i=1}^n \sum_{i=1}^n(\frac{a_i}{a_i})=\sum_{i=1}^n\sum_{i=1}^n(1)=\sum_{i=1}^n(n)=n^2$, but this proves an equality.  Am I not allowed to do the first step I did in my work? Should my flair be including sites with less than 200 reputation? I took a look at my profile, where I stuck my flair. Here's the flair:    However, I don't have 28k rep. According to chat, I have 19.7k.  Note: I know about the combined flair - I've had this in my profile for at least a year. It had been showing me the same as in chat, now it isn't.   What is going on here?  Edit: I'm reporting a bug here, that the combined flair is not showing the correct number, as it has in the past. Show *realtime* mouse cursor coordinates? (Cursor mod / overlay) Also, copy to clipboard? I'm looking for a solution that would display the current mouse cursor coordinates in realtime (i.e. NOT xdotool and NOT xev).  I need to move the mouse to a certain position, then press Alt-Tab to flip to another window and record the coordinates there. (This would not move the mouse, so the coordinate display would stay the same).  There's a Windows program that works BEAUTIFULLY for this purpose -   ...but it doesn't even start up in Wine.  Alternately, instead of displaying the coordinates, if this solution could copy the coordinates (in XXX,YYY format) to the clipboard, upon pressing a hotkey, that would be even better.  Any suggestions would be much appreciated!  P.S. I'm running Ubuntu 12.04 LTS. How can I find the XY coordinates of an HTML element (DIV) from JavaScript if they were not explicitly set? How can I find a saved Wi-Fi password? Why XML-Serializable class need a parameterless constructor I'm writing code to do Xml serialization. With below function.  public static string SerializeToXml(object obj) {     XmlSerializer serializer = new XmlSerializer(obj.GetType());     using (StringWriter writer = new StringWriter())     {         serializer.Serialize(writer, obj);         return writer.ToString();     } }   If the argument is a instance of class without parameterless constructor, it will throw a exception.     Unhandled Exception:   System.InvalidOperationException:   CSharpConsole.Foo cannot be serialized   because it does not have a   parameterless constructor.    at   System.Xml.Serialization.TypeDesc.CheckSupported()   at   System.Xml.Serialization.TypeScope.GetTypeDesc(Type   type, MemberInfo sourc e, Boolean   directReference, Boolean throwOnError)   at   System.Xml.Serialization.ModelScope.GetTypeModel(Type   type, Boolean direct Reference)    at   System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type   type , XmlRootAttribute root, String   defaultNamespace)    at   System.Xml.Serialization.XmlSerializer..ctor(Type   type, String defaultName space)    at   System.Xml.Serialization.XmlSerializer..ctor(Type   type)   Why must there be a parameterless constructor in order to allow xml serialization to succeed?  EDIT: thanks for cfeduke's answer. The parameterless constructor can be private or internal. If you copy the contents of   httpd.conf   and then paste it into a cat command.. such as this one..  #!/bin/bash cat &gt; /test &lt;&lt; EOF pasted here.. EOF   you run into this error:  -bash: command substitution: line 1: unexpected EOF while looking for matching `'' -bash: command substitution: line 4: syntax error: unexpected end of file   perhaps the solution is to escape the dollar signs and maybe even quotes and so on..  but given that this is such a large file.. can dollar signs be automatically be escaped ?  is my only option to escape them via another program and then give it to the cat command ? Is it possible to kill Ulfric after joining the Stormcloaks? So I've been thinking if it's possible to join the Stormcloaks only to realize Ulfric's an ass and kill him after that at some point of the game (I know you can't just go and kill him at first because he's an important NPC for the main story quests).  I don't want to join the Empire and - in my mind - what would make sense in my character's storyline would be him joining the Stormcloaks at first (because of how the game starts and my character being a Nord and having escaped with Ralof), but later realizing how Ulfric is only after power and how his fight against the Empire might even benefit the Altmers by weakening both forces (Empire and Rebellion). His Talos talk is just an excuse for his actions, as I see it. I really don't like this guy (he's a crazy racist who would do anything for power), but I also don't like what the Empire has become.  Please note that I don't really want spoilers about the plot, I just want to know if it is possible to challenge Ulfric to one-on-one combat "in the Old Nord Way" or just take the Rebellion for myself by assassinating him. Range of values of skewness and kurtosis for normal distribution I want to know that what is the range of the values of skewness and kurtosis for which the data is considered to be normally distributed.   I have read many arguments and mostly I got mixed up answers. Some says for skewness $(-1,1)$ and $(-2,2)$ for kurtosis is an acceptable range for being normally distributed. Some says $(-1.96,1.96)$ for skewness is an acceptable range. I found a detailed discussion here:  regarding this issue. But I couldn't find any decisive statement.   What is the basis for deciding such an interval? Is this a subjective choice? Or is there any mathematical explanation behind these intervals? Could not make temporary scratch layer permanent I want to make a temporary scratch layer permanent but it shows  Could not make temporary scratch layer permanent. Error: Creation of field addr:street_1 failed (OGR error: Can't create field addr_str_4 in Shape DBF file, reason unknown.) How can I fix this error?  This is my attribute table. I am having trouble understanding the estimation of an AR process. In some textbooks, the AR(1) process is defined as follows: $y_{t}=\theta y_{t-1}+ϵ_t$ (which does not contain a constant). So the OLS estimator is biased. I am confused about the cause of the bias. It is explained that $y_{t-1}$ is dependent on $ϵ_{t-1}$ although it is independent of $ϵ_t$. However in linear regression, if the equation does not contain a constant, we cannot make sure the expectation of disturbance is zero. So the OLS estimator is bias without a constant. Does it mean that the OLS estimator is unbiased if I add a constant in AR process? In the Tiny Tina DLC "The Beard Makes the Man" quest, the objectives are (1) Crush five drunk dwarves, (2) Pick up five beards, and (3) Get five dwarves drunk. (The last one's optional.) I found the miner dwarves in the mine on the minimap, but they won't follow me into the crusher machine. How do I lure them? Does it have to do with getting them drunk, and how can I do that with no alcohol around? I thought getting drunk was optional? For a distribution function $F(x)$ and constant $a$, integral of $F(x + a) - F(x)$ is $a$. For any distribution function and any $a \geq 0$, $\int_{-\infty}^{\infty} (F(x+a)-F(x))dx = a$.   In this case, "distribution function" means a right continuous function F with $F(-\infty) = 0$, $F(\infty)= 1$.   This problem comes after a section in the book on mathematical expectation, so I suspect I should use some property of expectation to prove it. Expectation appears to be something that applies to random variables, so I think I should be somehow transforming the problem into something in terms of expectations of random variables, but I'm not sure how. I know that given a distribution function, I can get a probability measure, but I'm not sure how to go from there to a random variable and actually get a relation between the expectation of the random variable and this integral. I'm sure whether this is the right way to go about this problem, but if it is, I'm missing a connection somewhere. How to log source file name and line number in Python Is black a color or absence of color? I would like to configure Apache 2 running on Kubuntu to execute Perl CGI scripts. I've tried some steps that I came across by googling, but nothing seems to work.  What is the right way of achieving this? Why do we use encrypt-decrypt-encrypt (EDE) in 3DES, rather than encrypting three times? I'm wondering why we use encrypt-decrypt-encrypt (EDE) sequence in 3DES (also known as DES-EDE, TDES or TDEA) with three keys instead of three times encryption (EEE) with three different keys? Old title - "change resolution to 1280x1024 using xrandr gives: X Error of failed request: BadValue (integer parameter out of range for operation)"  I have installed a fresh Ubuntu 17.10 and have a monitor with 5:4 resolution. settings has no resolution higher than 1024x768. But I need the resolution 1280x1024 (5:4).  I use the default motherboard graphics card:  # lspci|grep VGA 00:02.0 VGA compatible controller: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03)   Also xrandr gives the following:  $ xrandr Screen 0: minimum 320 x 200, current 1024 x 768, maximum 8192 x 8192 XWAYLAND0 connected 1024x768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm    1024x768      59.92*+   I tried to add the 1280x1024 resolution using xrandr. so first created the resolution information using gtf:  $ gtf 1280 1024 60    # 1280x1024 @ 60.00 Hz (GTF) hsync: 63.60 kHz; pclk: 108.88 MHz   Modeline "1280x1024_60.00"  108.88  1280 1360 1496 1712  1024 1025 1028 1060  -HSync +Vsync   Then added to resolutions:  xrandr --newmode "1280x1024_60.00"  108.88  1280 1360 1496 1712  1024 1025 1028 1060  -HSync +Vsync   then again did the command: xrandr --addmode XWAYLAND0 1280x1024_60.00  Then nothing changed. When I tried to change it using xrandr --output XWAYLAND0 --mode 1280x1024_60.00 --rate 60 But an error occurred:  $ xrandr --output XWAYLAND0 --mode 1280x1024  --rate 60 X Error of failed request:  BadValue (integer parameter out of range for operation)   Major opcode of failed request:  140 (RANDR)   Minor opcode of failed request:  7 (RRSetScreenSize)   Value in failed request:  0x0   Serial number of failed request:  21   Current serial number in output stream:  22   I don't know what did I do wrong. Or how to change resolution to the correct one: 1280x1024 I remember watching this sci-fi movie where a huge metallic capsule gets dropped from a few hundred meters. The capsule had a chamber inside where only one person could be seated. During the drop, time dilated and the person would transcend to another world, lasting for days, even meeting dead people. Kind of a parallel reality.  It was an amazing movie, but I cannot recall its name.