I have a method that returns the List of data for Kendo scheduler. My problem is, There are 39 unique records I can get from the DB.   Here also I got the 39 records but all records are the last indexed record data:  protected object GetData()         {             cal_details cal = new cal_details();             List&lt;cal_details&gt; lst = new List&lt;cal_details&gt;();             DataSet dSet = new DataSet();             try             {                 dSet = (DataSet) DAL.SC(1, 1, 0, 0, 0, "", "", "", 1, "tblCal");                 if (dSet.Tables["tblCal"].Rows.Count &gt; 0)                 {                     lst.Clear();                     for (int i = 0; i &lt;= dSet.Tables["tblCal"].Rows.Count - 1; i++)                     {                         cal.Description = "Test";                         cal.isAllDay = true;                         //cal.OwnerID = 2;                         cal.Start = Convert.ToDateTime(dSet.Tables["tblCal"].Rows[i]["working_date"].ToString());                         cal.End = Convert.ToDateTime(dSet.Tables["tblCal"].Rows[i]["working_date"].ToString());                         cal.OwnerID = dSet.Tables["tblCal"].Rows[i]["date_cat"].ToString();                         cal.TaskID =i;                         cal.Title = "Test Title";                         lst.Add(cal);                        }                 }                 return lst;                 }             catch (Exception ex)             {                 throw new HttpResponseException(new HttpResponseMessage() { StatusCode = HttpStatusCode.NoContent, Content = new StringContent("There were some Errors") });`enter code here`             }         }
I have a class like this:  public class myClass {   public List&lt;myOtherClass&gt; anewlist = new List&lt;myOtherClass&gt;;    public void addToList(myOtherClass tmp)   {     anewList.Add(tmp);   }  }   So I call "addToList" a hundred times, each adding a unique item to the list.  I've tested my items to show that before I run the "addToList" method, they are unique.  I even put a line in to test "tmp" to make sure it was what I was expecting.  However, when I do this (lets say myClass object is called tmpClass):  int i = tmpClass.anewList.Count(); for (int j = 0; j&lt;i; j++) {    //write out each member of the list based on index j... }   I get the same exact item, and it's the last one that was written into my list.  It's as if when I add, I'm overwriting the entire list with the last item I've added.    Help?  This makes no sense. I've also tried List.Insert, where I'm always inserting at the end or at index 0.  Still no dice.  Yes, I'm doubly source my indexing is correct and when I do my test I'm indexing through each of the elements.  :)  UPDATE: Okay, I tried this and still had the same problem:  foreach(myOtherClass tmpC in tmpClass.anewList) {         Console.WriteLine(tmpC.theStringInMyClass.ToString()); }   and still for each of the 100 items, I got the same string output... I'm sure I'm doing something completely stupid, but I don't know what yet. I'm still 100% sure that the right string is getting passed in to begin with.  -Adeena    Okay, I tried this and still had the same problem:  foreach(myOtherClass tmpC in tmpClass.anewList) {     Console.WriteLine(tmpC.theStringInMyClass.ToString()); }   and still for each of the 100 items, I got the same string output...  I'm sure I'm doing something completely stupid, but I don't know what yet. I'm still 100% sure that the right string is getting passed in to begin with.  -Adeena
For a CDF that is not strictly increasing, i.e. its inverse is not defined, define the quantile function   $$F^{-1} (u) =\inf \{x: F(x) \geq u \},\quad 0&lt;u&lt;1. $$  Where U has a uniform $(0,1)$ distribution. Prove that the random variable $F^{-1} (u)$ has cdf $F(x)$.  In case of a strictly increasing CDF the proof is quite easy because the inverse is defined. Define $X=F^{-1} (u)$  $$ P\left[X&lt;x \right]=  P \left [F^{-1} (U) \leq x \right]= P \left[U \leq F(x) \right] =F(x)  $$  But how do I accomondate the nondecreasing CDF whose inverse is given by the quantile function? I am a begginer so any help is welcome. Thank you. Nginx Subdirectory returning 404 I currently have a bunch of working static files at the domain name khairulslt.me (from NameCheap). Recently, I've tried setting up a subdirectory (khairulslt.me/RGBGame) as seen in the code below; However, I keep getting 404 errors. What am i missing out?  server {    server_name khairulslt.me www.khairulslt.me;    autoindex off;   location / {     root /var/www/khairulslt.me;     index circles.html;   }   listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/khairulslt.me/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/khairulslt.me/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot  location /RGBGame {     root /var/www/khairulslt.me/RGBGame;     index colorGame.html;     try_files $uri $uri/ /var/www/RGBGame/colorGame.html?q=$uri&amp;$args;     autoindex off;   }  location /robots.txt { return 200 "User-agent: *\nDisallow: /\n";    }  }   server { if ($host = www.khairulslt.me) {     return 301 https://$host$request_uri;   } # managed by Certbot   if ($host = khairulslt.me) {     return 301 https://$host$request_uri;   } # managed by Certbot   listen 80; server_name khairulslt.me www.khairulslt.me; return 404; # managed by Certbot }   I've tried all the different settings like (alias vs root), try_files, autoindex(on, off). My main website www.khairulslt.me works fine and is serving the html/css/js files in /var/www/khairulslt.me perfectly fine. I'm just not sure why I can't replicate the settings for my other app (html/css/js files in folder /RGBGame). Could it be that I've missed out something that isn't related to the nginx config? Why are rockets so big? I'm curious why rockets are so big in their size. Since both the gravitational potential one need to overcome in order to put thing into orbit, and the chemical energy burned from the fuel, are proportional to the mass, so if we shrink the rocket size, it would seem to be fine to launch satellites. So why not build small rocket say the size of human? I can imagine small rocket would be easier to manufacture in large quantities and easier to transport. And maybe someone can make a business out of small rocket, carrying one's own satellite. queries with db_select don't respect integers When I check "SHOW PROCESSLIST" in phpMyAdmin I can see lots of queries where argument-integers are being inserted as strings (with single quotation marks).  I'm wondering if this is due to the way phpmyadmin reports the queries (if it puts every argument between quotation marks) of if it is db_select that puts every argument between quotation marks.  An example of my code where integers are being used as arguments:  $select-&gt;join('taxonomy_index', 't_'.$key, 't_'.$key.'.nid = n.nid AND t_'.$key.'.tid = :tid_' . $key, array(':tid_'.$key =&gt; (int)$tid)); $select-&gt;condition('t_'.$key.'.tid', (int)$tid);   As you can see I explicitly write (int)$tid but in my query log I can see the following:  ... WHERE (t_0.tid = '10') ...   The big question is: How can I be sure that integers are being treated as integers in my queries? I don't want MySQL having to transform strings to integers. Movie: Creature crawls out of its current hosts mouth into next hosts mouth Which is the best way to install new hplip versions? Hplip is the software that drives most hp printers. Usually new printers are only supported in newer versions of the software. Canonical doesn't backport new versions packages to older Ubuntu versions, that means that newer drivers are not going to be available in the Software Center of older Ubuntu versions.  As an example yesterday I needed to hook a hp 1005p to a computer running 8.04. I was forced to install a newer hplip than the version available in the repositories. I installed it using the script from the hp page, but I'd like to know other alternatives.  Which is the best (technically, not the easiest) way to install it and why?. I installed Ubuntu 15.04 on the VM and I have downloaded Eclipse Luna. When I try to install it, this error occurs:      An error has occurred.   See the log file   /home/master/.eclipse/1473617060_linux_gtk_x86_64/configuration/1442224462970.log   Can you help me to fix  it? Thanks Can you please clarify if it's acceptable to use these terms interchangebly and if not point out to significant differences between these titles. It seems to me that it may be something with scale of an organization (perhaps, small/medium businesses have managing directors, and large corporations have chief executive officers) but I'm not sure. I do understand that a person may bear one or another of these titles formally, but what about real differences? Down vote changed to up vote caused reputation meter to pass daily maximum Confused about AMD/Intel When I go to the downloads page to get Ubuntu, it automatically downloads the AMD version, but my computer has no hardware with AMD on it. I only have Intel and Nvidia. Also, when I install this AMD version on my computer, it works (other than the constant random freezing of the computer when I use Ubuntu). I don't really understand why the amd version works on a computer with an intel processor. Is there a better name for this than "emphatic and"? In semi-poetic writing, I have had occasion to deviate from the standard prose list practice (interpose commas or semicolons between items, with an "and" preceding the final item), by utilizing a second or third and to separate three or four items.  That is,       Bob likes beer, wine and liquor.   The variant would be:     Bob likes beer and wine and liquor.   Now, the usage is obviously nonstandard and should be avoided in formal writing, but for those instances where poetic variation may be justified.    What is it called?  "Emphatic And" is the best I can coin on my own, but I wonder if there is a more established name for this variation. "Speed" of Gravity and Speed of Light Some threads here touching speed of gravity made me think about that. This lead to some questions.    The speed of gravity was not measured until today (at least there are no undebated papers to that effect). It seems common knowledge/belief among physicists that the speed of gravity is the same as the speed of light.    And this is my question: Is that speed of light = speed of gravity a result of GR or is that fed into the theory? Or is there some evidence from other sources than GR for this? Does the same speed imply some deep-lying relation between gravity and electromagnetism? What does it mean that GUIkit is being deprecated? How does a wheelie work? So I've been trying to create a mathematical model for an electric motorcycle and began to wonder about the maximum possible torque that could be supplied to the rear driven wheel without having the bike begin to lift up on one wheel.  I found ways to calculate this value online; however, the basic concept as to how the bike actually lifts escapes me.    My problem started when I began to think about what axis the bike will rotate about when it is doing the wheelie.  My first intuition was that the frame and front wheel, together, rotate about the rear axle.  But when I drew a free body diagram of the frame/front wheel system just at liftoff (see below) I made note that the only forces acting about the rear axle, point O, is the force of weight.  This means that an increase in applied torque and subsequently, the applied force Fa, should not effect the rotation about the rear axle.  I know that the applied force on the back wheel is indeed correlated with the propensity for a bike to wheelie, so I considered that the axis of rotation I was choosing was wrong.  If we take the free body diagram above and sum the moments about the center of mass, we would find that an increased applied force would in fact cause the solid body to rotate.  The problem with this understanding is that during rotation, the center of mass of the drawn system should actually rises relative to the surface the bike is moving across.  If the bike were to be truly rotating about its center of mass, then the back wheel would begin to dip below the surface of the road like you might see in a glitchy video game.    So I suspect that the bike is in fact rotating about the back axle, but I don't understand why, please help!  edit: I added the external torque from the back wheel to the frame, which would allow the bike to rotate about the back axle  edit 2:  I suppose that the torque acting on the frame via the engine should not effect the rotation as the movement of a motorcycle can be perfectly replicated by applying a force at the back axle.  A third possible axis of rotation might be the lowest point of the back wheel. On equations $m^2+1=5^n$ I am looking for integer solutions of Diophantine equation $m^2+1=5^n$. I found that $m=0,n=0$ and $m=2,n=1$. I could not find any other solutions. I try to prove this but I could not. Could anyone help me to solve this equation? The latex file coding is not there but the pdf file is there I wrote all my coding in the .tex file. The next day when I opened it the coding is all gone and the pdf file is opening with it and is displayed as an output. How do I bring back my coding? asp.net mvc put controllers into a separate project What are the scars on the face of Dryden Voss? Dryden Voss, the iconic villain in Solo: A Star Wars Story, has some pretty radical facial scarring.    I'm wondering if there is any evidence how he got these scars?  In particular is it possible he got the scars in battle, or from exposure to a particular substance or drug.  It also seems he is under the service of a Sith Lord (if not an apprentice himself) and if so, could this have come as part of an initiation into, or training with, the dark arts. Todo comments:Not include and left align? File: \boot\bcd Status: 0xc00000e9 windows 8 I am having this error for quite a few months. When the problem occurs, my windows freezes at boot time with black screen. After few reset attempts, sometimes it shows the entitled error. after few attempts, the windows starts but everything become slow. If I again restart, it works well. But at a point windows never starts and I have to reinstall it. I have already reinstalled 3/4 times in the past 2/3 months. I checked for any HDD errors with EASEUS Partition Master Home Edition with surface test, chkdisk at boot time etc for my C drive and F drive but no errors found. Startup repair also fails to solve the problem.  Windows Boot Manager   Windows failed to start. A recent hardware or software change might be the cause.   To fix the problem:  &nbsp;&nbsp;1. Insert your Windows installation disc and restart your computer.  &nbsp;&nbsp;2. Choose your language settings, and then click "Next." &nbsp;&nbsp;3. Click "repair your computer."  If you don't have this disc, contact your system administrator or computer manufacturer for assistance.   &nbsp;&nbsp;File: \Boot\BCD  &nbsp;&nbsp;Status: 0xc00000e9  My laptop's info:  Model: Dell n5110 corei5 OS: Windows 8 PRO 64 bit Anti-virus:  Avast Home edition  Additional info: My Program Files, Program Files (x86) and Users directory is located at F drive and linked with symbolic link (mklink). Also I have changed these basic locations from regedit. I also use eclipse android intelx86 emulator, virtualbox and Genymotion emulator most often.