I can hear the sound from my laptop speakers on the startup but after that when I try to play any music on VLC I don't hear any sound. I can't even hear any sound on youtube so it's not the problem with VLC. If I try running any sound by Guest user then it works.
I installed Ubuntu 12.04 a month ago and am using it till now. I failed to notice that all this time there was no sound at all while running Ubuntu, even while playing a game in Wine. The weird thing is that only the startup sound comes when I log in (Indian/African drum tone), then comes the utter silence.  I tested both Digital Output (S/PDIF) and the speakers in the sound settings but can hear nothing.  Any help?
Sophomore's dream: $\int_0^{1} x^{-x} \; dx = \sum_{n=1}^\infty n^{-n}$ In the solution of the so-called , one of the key steps is to compute $$\int_0^1 x^n (\log x)^n~\mathrm dx$$ using the change of variables $x = \exp\left(-\frac{u}{n+1}\right)$ to obtain the Gamma function.  This substitution to me, looks like it was pulled out of thin air. Can someone help me motivate it? How would I have thought of this substitution? I'm building a quick csv from a mysql table with a query like:  select DATE(date),count(date) from table group by DATE(date) order by date asc;   and just dumping them to a file in perl over a:  while(my($date,$sum) = $sth-&gt;fetchrow) {     print CSV "$date,$sum\n" }   There are date gaps in the data, though:  | 2008-08-05 |           4 |  | 2008-08-07 |          23 |    I would like to pad the data to fill in the missing days with zero-count entries to end up with:  | 2008-08-05 |           4 |  | 2008-08-06 |           0 |  | 2008-08-07 |          23 |    I slapped together a really awkward (and almost certainly buggy) workaround with an array of days-per-month and some math, but there has to be something more straightforward either on the mysql or perl side.   Any genius ideas/slaps in the face for why me am being so dumb?    I ended up going with a stored procedure which generated a temp table for the date range in question for a couple of reasons:   I know the date range I'll be looking for every time The server in question unfortunately was not one that I can install perl modules on atm, and the state of it was decrepit enough that it didn't have anything remotely Date::-y installed   The perl Date/DateTime-iterating answers were also very good, I wish I could select multiple answers! I'm new to Ubuntu. What's the application extension for development reasons? I know Windows is mainly .exe and Mac is .dmg or .app. Does Linux have an unique one? Where does top command get all the data for CPU Utilization? Calculating the average area of the states listed in states.txt Need someone to calculate the average area, in square miles, of the states listed in states.txt. States.txt (file): State           Population   SqMi      Region  ------------------------------------------ California           39.37   163.7       West Texas                29.36   268.6      South Florida              21.73    65.7      South New_York             19.33    54.7  NorthEast Pennsylvania         12.78    46.1  NorthEast Illinois             12.59    57.9    Midwest Ohio                 11.69    44.8    Midwest Georgia              10.71    59.4      South North_Carolina       10.60    53.8      South Michigan             9.97    96.7    Midwest  Output should look like this: Average Area: 82.85 square miles  Note my awk program will be ran like this: awk –f &lt;file.awk&gt; states.txt I want to create a 2D game but I'd like to have the character to wear tons of different equipments on different combinations, like a RPG or something.  So let's say the user changes his/her shoulders and pants, this must be shown to the player and all these different equipments must follow the different characters action (hitting, being hit, spelling magic, etc.).  I see a few problems that I'd like to know the best approach/algorithm/architecture to solve.  1 - Sprites or Animations  Should I create different sprites for each equipment in each action animation?  Is it better to just have the equipment sprite and animate it directly on code like rotating and translating (using something like tween on Flash)?  Is there any other better option? (I really don't like the ideas above)  2 - Positions  Let's say during one of the character's move he starts looking directly in front to the player's view but ends his movement showing his right side to the player (like if he swings his sword from one side to the other).  If we consider one part of the user, like his head for example, it starts in front and then turns left.  It means at least 3 different positions for each head equipment (helmet, cap, whatever).  This surely influence the answer of #1 question. How is the best way to achieve that?  3 - Layers  Let's consider a character move where he spins 360 degrees with his arms open. At the beginning of the animation, his right hand is close to the user's view and then, at the middle of the movement, this is probably behind the character's body on the animation.  Whatever is the option on #1 question, you surely needs to use some kind of layer model to make this sprite or animation to starts closer to the player's view and later change to far away from player's view.  Is there any good way to do that?  I know the question is quite long and difficult to understand. Let me know if you think it's better to have some drawings to try to explain which one and I'll try to do that. I often see $I(t)\propto |E(t)|^2$. What is the exact form ? Which constants are missing to make this an equality and why are they so often omitted ? How do I specify unique constraint for multiple columns in MySQL? I have a table:  table votes (     id,     user,     email,     address,     primary key(id), );   Now I want to make the columns user, email, address unique (together).  How do I do this in MySql?  Of course the example is just... an example. So please don't worry about the semantics. 'help' link is located lower than the other items It shows like this on Firefox 25 and Internet Explorer 11 (minus the red line of course):    Chrome seems to be fine. I opened the PC in the morning, and this is what I got:      As is visible the icons of the UWA apps were no affected and the start menu also is unaffected.    When Control Panel is in category view the entire page is empty and in large/small icons the name is visible, no icons.  I deleted the iconcache.db in %USERPROFILE%\AppData\Local folder. Following the instructions here: . But to no avail and now windows is not rebuilding the cache.   I also ran sfc /scannow but no changes took place.  What should I do?  (01/01/2016 8:00PM GMT +5:30) Edit: I tried opening the system properties and I got 0x8000ffff error and this:        Then I closed the popup and pressed the OK button on the System Properties Windows and I got 0x8007057A error:      Opening the Image Backup Control Panel page I again got an 0x8007000E error:        I tried using system restore via advanced startup but once again I got 0x800FFFF error.  P.S.: I did try restarting, didn't work. Can't plot with gnuplot on my Mac Using a naked black hole as a mirror? The YouTube video is a good example how the gravity of this merging binary black holes bend light around themselves. How do I set access permissions per field? What I need to do  I have some user account fields that should be administrator-only (read/write/edit).  For example, the IP address used to register.  So, I want to restrict access to administrators.  Current state of field permissions in Drupal 8 (as of Feb 19, 2016)   In Drupal 7, I used the  module.  However,  There is a , but this has been going on for seven years and is marked as "postponed." As I understand it, anything created with an alloc, new, or copy needs to be manually released. For example:  int main(void) {     NSString *string;     string = [[NSString alloc] init];     /* use the string */     [string release]; }   My question, though, is wouldn't this be just as valid?:  int main(void) {     NSAutoreleasePool *pool;     pool = [[NSAutoreleasePool alloc] init];     NSString *string;     string = [[[NSString alloc] init] autorelease];     /* use the string */     [pool drain]; } Pretty printing XML with javascript I would like to think that some of the software I'm writing today will be used in 30 years. But I am also aware that a lot of it is based upon the UNIX tradition of exposing time as the number of seconds since 1970.  #include &lt;stdio.h&gt; #include &lt;time.h&gt; #include &lt;limits.h&gt;  void print(time_t rt) {     struct tm * t = gmtime(&amp;rt);     puts(asctime(t)); }  int main() {     print(0);     print(time(0));     print(LONG_MAX);     print(LONG_MAX+1); }   Execution results in:   Thu Jan  1 00:00:00 1970 Sat Aug 30 18:37:08 2008 Tue Jan 19 03:14:07 2038 Fri Dec 13 20:45:52 1901           The functions ctime(), gmtime(), and localtime() all take as an argument a time value representing the time in seconds since the Epoch (00:00:00 UTC, January 1, 1970; see time(3) ).      I wonder if there is anything proactive to do in this area as a programmer, or are we to trust that all software systems (aka Operating Systems) will some how be magically upgraded in the future?  Update It would seem that indeed 64-bit systems are safe from this:  import java.util.*;  class TimeTest {     public static void main(String[] args) {         print(0);         print(System.currentTimeMillis());         print(Long.MAX_VALUE);         print(Long.MAX_VALUE + 1);     }      static void print(long l) {         System.out.println(new Date(l));     } }    Wed Dec 31 16:00:00 PST 1969 Sat Aug 30 12:02:40 PDT 2008 Sat Aug 16 23:12:55 PST 292278994 Sun Dec 02 08:47:04 PST 292269055   But what about the year 292278994? Evaluating the nested radical $ \sqrt{1 + 2 \sqrt{1 + 3 \sqrt{1 + \cdots}}} $. How does one prove the following limit? $$   \lim_{n \to \infty}   \sqrt{1 + 2 \sqrt{1 + 3 \sqrt{1 + \cdots \sqrt{1 + (n - 1) \sqrt{1 + n}}}}} = 3. $$ When does a complex matrix have a square root? What is the neccessary and sufficient condition for a matri$A \in C^{n  \times n}$ so that it has a "square root" , that is there is a matrix $B \in C^{n \times n}$ such that $A=B^2$.  I am not quite sure but I was thinking that it would be that A and B are similar. What should I do if I want to be able to run a given program regardless of my current directory? Should I create a symbolic link to the program in the /bin folder? Prove that $\mathbb Z^n$ is not isomorphic to $\mathbb Z^m$ for $m\neq n$ Prove that $\mathbb Z^n$ is not isomorphic to $\mathbb Z^m$ for $m\neq n$.   My try:  Let $\mathbb Z^n\cong \mathbb Z^m $. To show that $m=n$.  Case 1: Let $m&gt;n$. Now that $\mathbb Z^m$ has $m$ generators whereas $\mathbb Z^n$ has $n$  generators and an isomorphism takes a generator to generator ; that is the contradiction.  Please correct me if I am wrong.  The case  $m&lt;n$ also follows similarly.