I've read through many of the recommended questions regarding php, pdo and prepared statements, but I still find myself questioning if what I have is enough to prevent an sql injection or other attack. I have a single form that collects user emails and sends them to a table in my phpadmin database. The database connection is functional and the html form successfully sends the email input into the table, see the code below. My question is, is what I have sufficient to prevent sql attacks?? <?php $dbHost = ""; $dbUser = ""; $dbPassword = ""; $dbName = "";  try {   $dsn = "mysql:host=" . $dbHost . ";dbname=" . $dbName;   $pdo = new PDO($dsn, $dbUser, $dbPassword); } catch(PDOException $e) {   echo "DB Connection Failed: " . $e->getMessage(); }  $status = ""; if($_SERVER['REQUEST_METHOD'] == 'GET') {   $email = $_GET['email'];    if(!filter_var($email, FILTER_VALIDATE_EMAIL))  {       $status = "Please enter a valid email<br/>(no space at the end)";     } else {        $sql = "INSERT IGNORE INTO contactinfo (email) VALUES (:email)";        $stmt = $pdo->prepare($sql);              $stmt->execute(['email' => $email]);        $status = "Success! Please click the confirmation link in the email I've sent you. It will expire in 12 hours.";       $email = "";     }   } ?>

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Consider a Point A that moves linearly on the positive x-axis with the speed 1 m/s and another Point B at a distance L from A with position (L,0). With each forward motion of point A the Point B moves in an arc consistently maintaining the distance L from point A. As soon as Point A reaches x=L, the Point B is perpendicular to Point A and its position is (L,L). Both the points move at a constant speed.  How then do you determine the speed of B?  Note that in this problem I considered the Center of Mass of the objects as points.   Is it possible to determine the equation of the curve that point B traces and its arc length? If yes, then how?

Consider a Point $A$ that moves linearly on the positive $x$-axis with the velocity $1$ m/s and another Point $B$ at a distance $L$ from $A$ with position $(L,0)$. With each forward motion of point $A$ the Point $B$ moves in an arc upward (i.e. along positive $y$-axis) consistently maintaining the distance $L$ from point $A$. As soon as Point $A$ reaches $x=L$, the Point $B$ is perpendicular to Point $A$ and its position is $(L,L)$.  How do you then determine the equation and length of the path that $B$ traces during the period $A$ traverses from $x=0$ to $L$?


For example, like someone who is teaching people at a university. Is he still called a "teacher" or not?

A teacher at a university is still teacher or lecturer?    I'm a little bit confused in light of two different sources   The 1st source - (the book "Check Your English Vocabulary For Living In UK") says the following things:     But on the other hand,  states:   sity is still teacher, unlike what the first source says.  I must to say, that some universities that I know the lecture is the one who gives the lecture in a big hall for many classes of students while a teacher is the one who responsible for examination or practical part and he works with each class separately unlike the lecturer. In your countries do you have also such distinguishing?


I want to make some garlic and jalapeno infused oil. Maybe not jalapeno but some kind of Chile.

How should I approach peeling a clove of garlic to get the skin off most quickly?  Is it different if I'm doing a bulb whole?


I have to apply multiple styles to a div my code is as under:  $(".myDiv").css("background","none"); $(".myDiv").css("background-position","left top"); $(".myDiv").css("background-repeat","repeat-x");   I want to write them once rather than repeating .css() function...

Is there any syntactical way in jQuery to define multiple CSS attributes without stringing everything out to the right like this:  $("#message").css("width", "550px").css("height", "300px").css("font-size", "8pt");   If you have, say, 20 of these your code will become hard to read, any solutions?  From jQuery API, for example, jQuery understands and returns the correct value for both   .css({ "background-color": "#ffe", "border-left": "5px solid #ccc" })    and   .css({backgroundColor: "#ffe", borderLeft: "5px solid #ccc" }).   Notice that with the DOM notation, quotation marks around the property names are optional, but with CSS notation they're required due to the hyphen in the name.


I'm working in the United Arab Emirates. I want to know how to make a sentence describing my (city) location with the correct preposition.   For example, should I write:    I'm in Dubai  I'm on Dubai I'm at Dubai.    Which one is correct?

I am used to saying "I am in India.". But somewhere I saw it said "I am at Puri (Oriisa)". I would like to know  the differences between "in" and "at" in the above two sentences.


This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


We have given a list of numbers (a1,a2,a3,....,an).  For each value in list we can choose a non-negative number and multiply it with our value. Performing this for all values in list.  Doing sum of all values after performing above operation , we do modulo of sum with a number M which is given.   What can be maximum possible outcome ?  Example:  list = [4,2,6] and M = 2  So, output = 0 { (4*a + 2*b + 6*c ) % 2 } (here as 4,2,6 all are even and 2 is smallest even number so..)  list = [7,3,2] and M = 10 output = 9 { (7*a + 3*b + 2*c) % 10 } ( taking a= 2 , b=1 and c = 1)  How to predict value of a , b , c ..... ?  NOTE - ALL numbers in list and M are positive integers .

I am stuck in solving this math problem. I need to maximize  $$ (a_1\cdot x_1 + a_2\cdot x_2 + a_3\cdot x_3 + \dots + a_n\cdot x_n) \mathbin{\mathrm \%} b. $$ Here $a_i$ and $b$ are given and $x_i$ can be any nonnegative integer.


I have found here some questions about my problem, but I can't use it. I will change a css property of  during click on them via JS, JQuery   <!DOCTYPE HTML>       <meta charset="utf-8">          <link rel="stylesheet" type="text/css" href="../css/styles.css">
 Green

     Red
      and my javascript.js  function uploadcss() {$(".osb").css("border","15px solid blue")}; function downloadcss() {$(".osb").css("border","5px solid red")};  function addcss (csslink) {     var csslink = document.cretaeElement ("link");     csslink.rel = "stylesheet";     csslink.type = "text/css";     csslink.href="../css/test.css"; }   And it's doesn't work :( Why?

Is it possible to import css stylesheets into a html page using Javascript? If so, how can it be done?  P.S the javascript will be hosted on my site, but I want users to be able to put in the <head> tag of their website, and it should be able to import a css file hosted on my server into the current web page. (both the css file and the javascript file will be hosted on my server).


I was rendering my video and while doing so moved files in my computer. I deleted folders, renamed them, moved them etc. The render had blank parts in it and now when I tried to render again it is completely black and videos don't even show in the preview. It is quite impossible for me to restore all the deleted folders/renamed files on my laptop, is there any other way to recover my work? I read this is a usual behaviour for Blender when the footage doesn't exist in its original Folder anymore. Thanks so much! Ginta

I have multiple characters linked to a blender file, but i moved the original character files and now blender is sating they're missing.  Is it possible to get blender to find the missing blender files like it finds missing image files so that i can preserve the previously made animation?  On a side note is there a way to also view a list of all the missing files?


I have a table with has many rows, I want to set unique constraint for this table, but the column that must be unique, has data is not unique. Is any way to set unique constraint for this table for this column or unique constraint for any insert or update next time?  I can't delete data because is real

I have a table which currently has duplicate values in a column.  I cannot remove these erroneous duplicates but I would like to prevent additional non-unique values from being added.  Can I create a UNIQUE that doesn't check for existing compliance?  I have tried using NOCHECK but was unsuccessful.  In this case I have a table which ties licensing information to "CompanyName"  EDIT: Having multiple rows with the same "CompanyName" is bad data, but we can't remove or update those duplicates at this time. One approach is to have the INSERTs use a stored procedure which will fail for duplicates... If it was possible to have SQL check the uniqueness on its own, that would be preferable.  This data is queried by company name. For the few existing duplicates this will mean that multiple rows are returned and displayed... While this is wrong, it's acceptable in our use case. The goal is to prevent it in the future. It seems to me from the comments that I have to do this logic in the stored procedures.


For me the following two are identical. Are there difference or they can be used interchangeably?     How long you have been teaching English?      How long have you been teaching English?

“So you can do what with it?”   ( by Sarah Blake, p.118)      And the focus of your research right now, Charles, is what?    (, Mon, 28 Apr 14, 14'18")   Can above questions, not having subject-auxiliary inversion, be used as the same meaning as their normal syntactic forms: “So what can you do with it?”, “And what is the focus of your research right now, Charles?”   I find no differences between the two forms above, yet I’ve only read in  that those types have some epistemic bias towards a positive or negative answer. Or they are used when what you heard is not clear or surprising (p,881;p.886). The questions above are or can be just simple, unbiased, questions or not?


I'm a new I.T. guy in my company, and while I was checking the servers,  I found that, to my surprise, the server is using a 32-bit version of Ubuntu, but is using almost all of the installed 8GB of RAM.  I remember from my "Computer Architecture" classes that only 64-bit operating systems can use more than 4GB of RAM.  The question that follows is: Will it be able to use 16GB of RAM if I were to upgrade it?  (I can't test, because this is the core production server)  uname -a:  Linux bachue 3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:19:42 UTC 2013 i686 athlon i686 GNU/Linux   Output from top:

I need to use a large software package (Xojo) that requires the 32-bit architecture to run. Try as I might, I can't seem to install the 32-bit libraries on my 64-bit installation of 15.04.  I don't have a problem running a 32-bit version of Ubuntu (I'm only using this computer for Xojo) but the computer has 8GB of RAM and I'd like to be able to use it all. Is there a way to utilise all 8GB of RAM with a 32-bit Ubuntu install? Does Ubuntu do this out of the box?


How to configure my c# app to run in elevated mode from Standard User Account?  Generally i would like to add permission for a program to run in elevated mode under standard user account without popping up the window:  "Do you want to allow the following program from an unknown publisher to make changes to this computer?" And The administrator password is required...

When I start SQL Server Management Studio 2008, I get an error that's been around forever and is documented .  One of the suggestions to fix it that actually worked was to start SSMS with Run as Administrator. So I modified the properties of the shortcut to always run it as the administrator.  The only annoyance is that I get a prompt every single time asking whether I really want to do it. Is there a way to tell just this one program (SSMS) to not pop up the prompt, while keeping this behavior for other apps?


Anyone who can tell me how to vertically align an image in a DIV without a fixed height for the container DIV? With a fixed height I can do this:  HTML

   CSS  .sensorimage {     height: 100px; /* max-height does not work*/     min-width:190px;     position: relative;     margin-bottom:10px; }  .sensorimage img {     max-height: 100%;       width:auto;      position: absolute;       top: 0;       bottom: 0;       margin-bottom: auto;     margin-top: auto;    }   This gives me almost what I want. The images are vertically centered in the DIV. But since the DIV with the class .sensorimage must have a fixed height, certain images appears too small. I want the images to have their natural height and width. I have tried with "max-height" but that hides all images for some reason. I have also tried to fiddle with display:table for the outer div and display:table-cell and vertical-align:middle for the image (or the inner div), with no luck. Anyone?  Edited: for ex. if 2 images are 30 px high and one image in the same row is 100 px high, the smaller images should still be vertically centered.

How can I horizontally center a
 within another
 using CSS?

Foo foo


I'm used to have a vector of wstring. I need to store the line number for each string, so I refactored the vector to be vector<pair<wstring, size_t>>. If possible, I'd still like to use this vector like a vector<wstring> in some contexts. This is my code:  typedef std::pair<std::wstring, size_t> LineNoPair; typedef std::vector<LineNoPair>         LineNos; LineNos lines; // Split lines, but don't split at line continuations boost::split_regex(lines,  // <-- I'd like to use `lines` as the split target                    contents,                     boost::wregex(L"(((?<![_])\\r\\n)|((?<![_\\r])\\n))"));  for (LineNoPair& line : lines) {     // remove line continuations from string     boost::replace_all_regex(line.first,                               boost::wregex(L"(_?[ ]*\\r?\\n)"),                               std::wstring()); }   I could simply use a vector of strings and a separate vector of line numbers, but I'd like to be able to iterate over these items together.   So, the general question is: Is there a thing which lets me use a vector of tuples like a vector of one of the tuple's types?  This question is different from  as I need a vector-compatible interface (including swap) whereas the other question is only about iterator adaptors.

I have a container filled with pairs. I want to iterate in it using the STL generic algorithms (in my case it would be inner_product, but consider it as a generic problem). The algorithm I am using expects iterators first and last. Can I provide special iterators first and last that will iterate not on the pairs but on the first element of each pair?   I know i can do it manually, providing a hand-made function object that will be a wrapper around the standard container iterator, deferencing it to the first member of the pair intend of the pair itself,but I think there is also a clever one-liner to do it for me. What would it be?


It is possible to have a ring $A$,  with identity,  such that $A^m\cong A^n$ as left $A$-modules and with $m\neq n$?   I have that for commutative rings this is not possible, but I have no idea of the proof.

How can i show that two $R$-modules of finite rank are isomorphic if and only if they have the same rank, i.e., $R^n \cong R^m$ iff $n=m$.


What's a clean and efficient JavaScript implementation to strip leading and trailing spaces from a string?   For example:  " dog"  "dog "  " dog "  "           dog "  all get turned into  "dog"

How do I trim a string in JavaScript? That is, how do I remove all whitespace from the beginning and the end of the string in JavaScript?


If $R$ is the ring of every continuos functions $f : [0,1] \to \mathbb{R}$  For every $a\in [0,1]$, how I can proof that, the set   $M_{a} = \lbrace f \in R : f(a) = 0 \rbrace$ is a maximal ideal for R?

Let $R$ be a ring of the real functions with "+" and "x" and let $I_1:=\{f(x)\in R\mid f(1)=0\}$, $I_1$ is a maximal ideal?   I think yes, but don't know how to prove it.


I am on Debian Testing  How do I enable auto-login to i3 instead of GNOME    Update  I followed the answer provide by jasonwryan, but it did not solve the problem  I did  $ update-alternatives --install /usr/bin/x-session-manager x-session-manager /usr/bin/i3 60   Then I did   $ update-alternatives --config x-session-manager  There are 2 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager).    Selection    Path                    Priority   Status ------------------------------------------------------------ * 0            /usr/bin/i3              60        auto mode   1            /usr/bin/gnome-session   50        manual mode   2            /usr/bin/i3              60        manual mode  Press <enter> to keep the current choice[*], or type selection number: 0   As you see when it asked me to <enter> my choice, I chose 0   Then I did a reboot, but it still logged me in GNOME instead of i3.

How do I change the default session I get when I log in? I'm on Debian jessie. I tried changing settings on gdm3, tried installing lightdm and following  but it's just not working.  For more specificity, I'm trying to default to gnome-classic instead of gnome. I want to turn on the computer, log in as any arbitrary user, and see gnome-classic, not gnome3 (preferably I'd remove the gnome3 default session, if there's a way to do that).


I have Ubuntu 14.04, and I'm trying to install wine:i386 to use PlayOnLinux, following . However, when I run:  sudo echo "foreign-i386 architecture"> /etc/dpkg/dpkg.cfg.d/multiarch  I get this error /etc/dpkg/dpkg.cfg.d/multiarch: Permission denied  Being still new to Ubuntu I don't know how safe it is (or advisable) to manually change permissions to overcome this. What should I do to solve this?  EDIT The main objective of this question is to install Wine, not the syntax itself (although the syntax was the problem), the accepted answer provided a better way of solving this.

When using sudo to allow edits to files, I regularly get 'permission denied'.  For example, my mouse is jittery and sluggish, so I want to disable polling:  sudo echo "options drm_kms_helper poll=N">/etc/modprobe.d/local.conf   I'm prompted for a password, and then get:  bash: /etc/modprobe.d/local.conf: Permission denied   So I tried to do a temporary change to disable polling by using:  sudo echo N> /sys/module/drm_kms_helper/parameters/poll   Yet again the system responded with:  bash: /sys/module/drm_kms_helper/parameters/poll: Permission denied   Any ideas?


I want to know a book on Probability theory (Measure-theoretic) for self-study, like at the level of Terence Tao's analysis and measure theory book (he does not have any prob. th. book I guess).  I found P. Billingsley matching this criteria to some extent, but any book other than this.   Thanks

I am from mathematical background, and I always hated the way they teach elementary probability theory in schools without giving any clue about measure theory.   I want a theoretical book in probability theory, which starts with measure theory and defines everything in mathematical terms. I am also not looking for a measure  theory book. If there is such a book that instead of giving only an intuitive introduction to probability theory, it rather defines everything in details, I would be really grateful to know it.  I would be happy to hear about any reading experience. Being exact in mathematical  language and maybe exercises.  Thanks a lot.


If $B$ has eigenvalues $1, 2, 3$ and $C$ has eigenvalues $4, 5, 6$, and $D$ has eigenvalues $1, 8, 9$, what are the eigenvalues of the $6 x 6$ matrix $$A = \begin{bmatrix} B & C \\ 0 & D \end{bmatrix}$$ $'0'$ means zero $3 x 3$ matrix So far I am only able to figure out that the trace of matrix $A$ is $30$ by adding eigen values of $B$ and $C$. Stuck after that can't use the determinant property as we don't know the other values of matrix $A$.

It is known that all $B$, $C$ and $D$ are $3 \times 3$ matrices. And the eigenvalues of $B$ are $1, 2, 3$; $C$ are $4, 5, 6$; and $D$ are $7, 8, 9$. What are the eigenvalues of the $6 \times 6$ matrix  $$\begin{pmatrix} B & C\\0 & D \end{pmatrix}$$ where $0$ is the $3 \times 3$ matrix whose entries are all $0$.  From my intuition, I think the eigenvalues of the new $6 \times 6$ matrix are the eigenvalues of $B$ and $D$. But how can I show that?


EDIT: This question is not addressed by , if I'm wrong, then please provide a link to a particular answer or comment that does address my question. (Such links appear in timestamps.)  In Writing: Grammar, Usage, and Style, Jean Eggenschwiler & Emily Dotson Biggs advocate a serial comma in the following sentence:     He bought a dishwasher, microwave, refrigerator, and washer from the outlet.   Yet, the inclusion of a serial comma seems to introduce an ambiguity: It seems unclear whether all items (i.e., the dishwasher, microwave, refrigerator, and washer) were bought from the outlet, or just the washer. Would omitting the serial comma be better? I.e., does sentence     He bought a dishwasher, microwave, refrigerator and washer from the outlet.   improve upon the original?

According to the Wikipedia page for the , "Use of the comma is consistent with conventional practice" and "Use of the comma is inconsistent with conventional practice." Did the Oxford Comma come before its omission, or was the Oxford Comma traditionally omitted?  It makes logical sense that every item in a list would be separated in the same way: by a comma. If the Oxford Comma is conventionally correct, when and why did people begin to omit it?


I'm configuring some minimal Lubuntu installs, which will run within VMs. They do not have window managers, and I do not intend to install any. I would like to increase the TTY font size so that 4 of these VMs can be tiled on a single display, and yet still be usable, but I can't figure out how to do this.  I assume there's just a conf file somewhere (/etc/....?) where this can be set. If someone could point me at that, it would be much appreciated!

I have a Unix-like OS installed without a windowing environment; i.e., just a text-mode console and no GUI.  Is it possible to change the font used by the console?  To be clear, I am not talking about the terminal emulator that comes with a desktop environment like KDE or GNOME.


I can find references to each in many online dictionaries, but few will reference both of them. So the question remains:  What is with the difference in spelling between "Locator" and "Locater"? Is one proper and the other a popular misspelling, or is there a nuanced difference between the two words? (Or, even more interestingly, both)

What’s the rule to decide whether you add -er or whether you add -or when creating an agent noun from a verb?    Sometimes it’s -er:      read > reader hate > hater hit > hitter   But other times it’s -or:    meditate > meditator collect > collector


Gravitational force means"the force experienced between two heavenly bodies".A body falls on any planet due to gravitational force.But smaller planets are not attracted by larger planets or stars(sun) due to this force. What is the reason for this?

Why doesn't the Moon fall onto the Earth? For that matter, why doesn't anything rotating a larger body ever fall onto the larger body?


I have taken a course in applied Cryptography. I do not understand the hardness problem underlying AES (or DES).   As in RSA is based on the RSA assumption. ElGamal is based on the hardness of descrete logarithm problem. Most of the lattice crypto is based on the LWE assumption which itself is based on the hardness of BDD problem. What is the hardness problem that guaranties the security of AES? (Or DES)   In other words if there is an oracle R that can break AES. Can I use this oracle as a subroutine to solve some really hard problem? If yes, what is the reduction?

The security of RSA is based on the integer factorization problem, which is a very well defined and understood mathematical problem. This problem must be solved in order to fundamentally break RSA.   What about AES (and others based on the same idea)? Why is it difficult to break? Is there any mathematical principle that ensures its security?


Before the fellowship of the ring broke and Frodo and Sam decide to go on alone, Gandalf lead the group. I've been wondering which way he meant for the group to choose into Mordor.   There seem to be only two known ones, Black Gate and Cirith Ungol. The Black Gate seems insurmountable, at least in the movies, and Gandalf, again in the movie, seemed shocked at the foresight of Frodo taking the path of Cirith Ungol. So I wonder what was his intention.

I'm currently re-reading Lord of the Rings for the umpteenth time, and a question occurred to me.   When Gandalf hears from Faramir that Frodo and Sam were heading for Cirith Ungol, he is shocked. Obviously, he hadn't planned to take them that way if he had survived Moria. So, what was his plan? We know he couldn't have got into Mordor via the Morannon. Is there any clue anywhere of the route he had been planning to take to get to Mount Doom?


An airline has a plane with 400 seats. The probability that a passenger fails to turn up for their flight is 0.04. The airline has an overbooking policy. Find the largest number of passengers this airline can book and still be at least 85% sure that everyone who shows up has a seat.  Working: Need to find a value $x$ when $1 - \text{cumulative probability}$ is at least 0.85 or more, but as close to 0.85 as possible. If we call this $x$-value $Z$ we need: $[1 – P(X = 0) + P(X = 1) +…+ P(X = Z)]   $ So $n=400 p=0.04 q=0.96 x=0,1,2,...$ Can't seem to add a picture of the answers but I got it as $411$. Would anyone be able to verify that this method is correct ?

Here's the problem:  A Flight has 20 seats and enough demand to sell out all flights (not enough to justify buying bigger plane). All seats sell for $200.   Probability a passenger with reservation shows up = p.  The probability of “No show”=1-p. The occurrence of “Show/No show” is independent among passengers. Passengers who are turned away due to “overbooking” are given $240 (the purchase price plus a 20% penalty to airline)  The number of reservations made for each flight is chosen by airline (not random): n   The number of booked passengers who show up is a random variable: X   What is the probability distribution of X? Write out the Revenues to the airline for a flight as a function of X Write out the expected Revenues to the airline What is the effect of increasing n on expected revenues for a given p? What is the effect of increasing p on expected revenues for a given n? When would it make no sense to overbook flights?   My thoughts: I think the answer to the first part is that it is a binomial distribution (since we have two distinct outcomes and a constant and independent probability of success). However, I am facing problem in the remaining parts. Can someone please explain it to me? Thanks so much :)


I have a basic sort and search loop. At the end I want to thank the user and display the name of the function used. Is there a format call for doing this?  def arr_sort_binsearch(ar):      item = 8      ar.sort()     l=0     r=len(ar)-1      while l<r:         if (ar[l] + ar[r] == item):             print("{} and {} is: {}".format(ar[l],ar[r],item))             l += 1             r -= 1         elif (ar[l] + ar[r] < item):             l += 1         else:             r -+ 1     print("Thanks for using {}".format(name_of_function?)

In Python, how do I get a function name as a string, without calling the function?  def my_function():     pass  print get_function_name_as_string(my_function) # my_function is not in quotes   should output "my_function".  Is such function available in Python? If not, any ideas on how to implement get_function_name_as_string, in Python?


When I was learing Brute Force in DVWA, I read the High Brute Force Source. It use stripslaches( $user ); function before use mysql_real_escape_string( $user ); function. I know mysql_real_escape_string() can escape special character so that it is safe in SQL statement. But I don't understand the function stripslaches(). Does it also make a safe SQl statement?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I have general questions about the PDF output format for a novel (text only), written using LaTex/LuaTex/Komascript(book):  Is it possible to obtain a PDF/A or PDF/X format? Or do I need to add code to the style file (the preamble) to obtain this format?  Many thanks

I have heard about PDF  PDF/A (for archival) and PDF/X (for printing). How to generate LaTeX documents like that?  I'm also interested in answers with plain TeX and ConTeXt, and hopefully with both pdfTeX and XeTeX engines.


I want to convert a rather big ext4 volume into btrfs. How long will the process will take?

I want to convert the 3TB 80% full ext4 block device into btrfs and I want to estimate the time it will take. I understand that this process is disk-bound rather then cpu- or memory-bound. So can anyone explain me how long it will take in units of time it takes to read/write the whole volume?


I need a repeatable diagonal line pattern, but I'm not quite sure how to achieve this. I made the stripe 3px wide, then transparent spacing 6px wide, then rotated the canvas 10° (which is what I need). How can I make this into a tileable pattern?    So I followed the second answer in the duplicate question and ended up with what I needed.

I have a geometric pattern – say, a cross:    Which I want to repeat with some overlap and tile … easy:    The blue square marks the 100×100 px unit tile.  However, here comes the catch: I want to rotate the image by about 30° and then tile it. This has proved surprisingly hard; of course rotating the image is easy – but finding a perpendicular unit tile (the blue block in the above image) isn’t:    Clearly the 100×100 unit tile won’t cut it. How do I choose the correct unit tile? The position presumably doesn’t matter, only the size is important, but I don’t know how to calculate that. Intuitively I expect that the rotation angle and the  will feature heavily but that’s as far as I got1. What’s worse, the rotation for arbitrary angles isn’t exact due to the inherent discreteness of pixels so even if I calculate the mathematically correct size it won’t necessarily result in a seamless tile.  So how can I calculate an optimal angle/size combination given the size of the perpendicular unit cell (here, 100×100) and an approximate desired angle?    1 My thought was that (using Wikipedia notation), since we want the projection of A onto B to be as long as B, we have |B|=|A|·cosϑ, and thus |A|=|B|/cosϑ. Which, in my case, would yield the new length |A|=115.470 but a simple try shows that this cannot be correct by a long shot, besides yielding an ugly non-integral number. In fact, just looking at the above rotated picture we can see that the whole 200×400 picture doesn’t contain a repeating perpendicular unit.


Consider the fraction $1+\frac{2}{3+\frac{4}{5+\frac{6}{7+\frac{8}{9+\frac{10}{11+\frac{12}{13+...}}}}}}$. This fraction approaches about $1.54$ as you continue it. My question is simple. Does anyone have any idea why this converges to this specific number?   I’ve tried algebraically messing with it, (saying that “$x=1+\frac{2}{3+\frac{4}{5+...}}$” then seeing where it goes.) but to no avail.  I tried to cut off the fraction at different points to try to find patterns in the fractions,( Like cutting off at 7 and solving $1+\frac{2}{3+\frac{4}{5+\frac{6}{7}}}$) but that didn’t work either.  I cannot seem to express it in terms of anything else, either.

How does one find the value of   $$1+\cfrac 1 {2+\cfrac 2 {3+\cfrac{3}{4+\cfrac{4}{5+\cfrac{5}{\ddots}}}}} \  \text{ or }\ 1+\cfrac{2}{3+\cfrac{4}{5+\cfrac{6}{7+\cfrac{8}{9+\cfrac{10}{\ddots}}}}}$$  Is there any way to find a continued fraction that is not necessarily periodic, but has a definite pattern to it?


This is a longshot, and probably not worth it for a feature that's only available for a short period. However, it would still be cool to allow us to use hats as equipment. The different hat selection gets nicer year after year. It would be nice if I can have the sword, belt, and a hat for example. It can be something like:  1 handheld (ex. guitar, sword, flag) 1 headgear (ex. hats, hair, face accessories) 1 body gear (ex. bouncer, belt) 1 misc - anything that doesn't fit in the previous categories (ex. , , )

I earned two hats on a site, and I think it would be great if we can wear both at the same time.  Can this please be made possible?


I need to do factory reset of my phone, but don't want my applications to lose data.  Is it possible to somehow move the apps to SD card and, later, back to the phone?

I ran into a serious SMS bug, which knowledgeable users seem to be saying means the SMS message database is corrupt (, ).  This is consistent with my current experience.  In my case I lost all ~1000 messages and still have some issues after that.  So I want to factory reset my phone.  While I have not rooted my phone, I have performed significant customization, and have somewhere around 150 apps installed, including a few paid apps (UltimateJuice, ...).  What things do I need to explicitly backup?  What can I do to minimize the pain?  I don't care about save points in games.  Surprisingly, I cannot find any good documentation of this using any obvious Google search terms.  (I am aware of , which doesn't really offer an answer to my question.)  For Google cloud things such as contacts, do I need to backup the cloud version just in case, so the phone doesn't wipe them from the cloud?  Fortunately, most of my personal notes are stored in cloud applications like Catch and Evernote.  I presume these should be unaffected.         As far as I can tell the BackupMySettings option is not available for my phone (Samsung Epic running 2.1).  My paid apps come back from Market anyway, right?  I guess I could pay $4 for MyBackupPro if it really made things simpler, but there would need to be some way to NOT backup the corrupted SMS database files.  Also I am assuming carrier-bundled apps such as Swype will automatically work.    P.S.  I have Marigold Android Backup and backed up to the SD card (except SMS/MMS).  I also have mIQ but I'm not sure I trust that to do a restore.  Factory resetting the phone will not affect the SD card, correct?  P.P.S.  I have AppBrain.  Is that automatically remembering all apps I have on the phone, so it will suggest installing all of them if I just install AppBrain?  Or will it only do that for apps installed through AppBrain?


using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class Death : MonoBehaviour {     private void OnTriggerEnter2D(Collider2D collision)    {         if (collision.gameObject.tag == "koza")         Time.timeScale = 0;         if (Time.timeScale < 1)         Canvas.gameObject.SetActive(true); //error is here    } }  I need a canvas like death screen I am new at unity and c# and know nothing, Thank you for your time.

Consider:  namespace WindowsApplication1 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          private void button1_Click(object sender, EventArgs e)         {             //int[] val = { 0, 0};             int val;             if (textBox1.Text == "")             {                 MessageBox.Show("Input any no");             }             else             {                 val = Convert.ToInt32(textBox1.Text);                 Thread ot1 = new Thread(new ParameterizedThreadStart(SumData));                 ot1.Start(val);             }         }          private static void ReadData(object state)         {             System.Windows.Forms.Application.Run();         }          void setTextboxText(int result)         {             if (this.InvokeRequired)             {                 this.Invoke(new IntDelegate(SetTextboxTextSafe), new object[] { result });             }             else             {                 SetTextboxTextSafe(result);             }         }          void SetTextboxTextSafe(int result)         {             label1.Text = result.ToString();         }          private static void SumData(object state)         {             int result;             //int[] icount = (int[])state;             int icount = (int)state;              for (int i = icount; i > 0; i--)             {                 result += i;                 System.Threading.Thread.Sleep(1000);             }             setTextboxText(result);         }          delegate void IntDelegate(int result);          private void button2_Click(object sender, EventArgs e)         {             Application.Exit();         }     } }   Why is this error occurring?     An object reference is required for the nonstatic field, method, or property 'WindowsApplication1.Form1.setTextboxText(int)


So I have this script:  #!/bin/bash # Flips the screen (hopefully)  syntax_error=0 orientation=0  current_orientation="$(xrandr -q --verbose | grep 'connected' | egrep -o  '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')" case $current_orientation in         normal)                 current_orientation=0         ;;         left)                 current_orientation=1         ;;         inverted)                 current_orientation=2         ;;         right)                 current_orientation=3         ;; esac  if [ $current_orientation -eq 0 ]; then         orientation=2 fi  if [ $current_orientation -eq 2 ]; then         orientation=0 fi method=evdev  # LENOVO S10-3t CHANGE ==> Hard Coded my device number to 11!!!!!!!!  device=11  swap=0 invert_x=0 invert_y=0 real_topx=0 real_topy=0 real_bottomx=4020 real_bottomy=4020  case $orientation in         0)                 swap=0                 invert_x=0                 invert_y=0                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomx                 bottomy=$real_bottomy         ;;         1)                 swap=1                 invert_x=1                 invert_y=0                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomy                 bottomy=$real_bottomx         ;;         2 )                 swap=0                 invert_x=1                 invert_y=1                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomx                 bottomy=$real_bottomy         ;;         3 )                 swap=1                 invert_x=0                 invert_y=1                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomy                 bottomy=$real_bottomx         ;; esac  if [ $method = "evdev" ]; then         xinput set-prop "$device" "Evdev Axes Swap" $swap         xinput set-prop "$device" "Evdev Axes Swap" $swap         xinput set-prop "$device" "Evdev Axis Inversion" $invert_x $invert_y         xinput set-prop "$device" "Evdev Axis Calibration" $topx $bottomx $topy $bottomy         if [ $orientation = 2 ]; then                            xrandr -o inverted         fi         if [ $orientation = 0 ]; then                 xrandr -o normal         fi fi  #   It's for flipping screen in my Lenovo S10-3t. I copied it from the netbook's wiki page, and added the #!/bin/bash at the top. The filename is flipscreen.sh. How can I make it work?

Whenever I open a .sh file, it opens it in gedit instead of the terminal. I can't find any option similar to Right Click → Open With → Other Application... → Terminal.  How do I open this file in the terminal?


In table tennis, the serve changes after every 5 serves. But I don't understand that rule. If A wins a rally, A get 1 point. After that, if B wins a rally, B get 1 point. Now, who should do the next serving, A or B? I don't understand what "after every 5 serves" means.

I have never understood who serves first, and when it switches, in table tennis.    Could anyone explain it?


I was inspired to ask this question by   Basically, are they aware that they are basically godlike beings of immense power and wisdom on a mission of utmost importance, given to them by their god[s]. And if so, why not act like it?  I understand that Gandalf would never seek any role beyond giving advise, but why are the Elves not falling over themselves to help him? They treat him as an equal, and possibly not even that at times, when should they not be worshiping him (to some extent)?  Similarly, all elves are immortal. They are all like lesser angels, and unlike the Istari are not even garbed in mortal men, so are not really as corruptible as Saruman turned out to be. So why do they not act like it? From things I have read, it sounds like they sort of even lack some of the freewill of mortal men (a similarity to christian angels). So how are they so uncaring of the outside world? Why are they not every much as obsessed with Gandalf's mission as he himself is?

In the Middle-earth universe, there are a handful of wizards who work in various ways to fight evil. Out of universe, we know these wizards to be Istari, Maia who are in Middle-earth working to defeat Sauron, and we know this thanks to The Silmarillion which explains the origins of Middle-earth.  In universe though, I'd expect this sort of knowledge to be pretty rare.  Do we know how rare it is?  Who in Middle-earth knows that these wizards are Istari, and the ramifications of this?  I'm not looking for a list of specific individuals here, I seek more a list of groups of people.  For example, I'd expect the Noldor who remain in Middle-earth to know what's up with the Istari, since it's part of their personal past.  But do any dwarves know?  Do any humans?  What about Rohan's royalty?  The Stewards of Gondor?


I need to show that there is no subsets of $\mathbb{R}$ of order type $\omega_1$.  This is a very tricky one, because I was first trying to prove that there are no subsets with cardinality $\omega_1$ by showing that every uncountable subset of $\mathbb{R}$ has cardinality of $P(\omega)$ and thus not $\omega_1$, but I that was not true as there are subsets with cardinality $\omega_1$. The trick for me is to work with order type instead of cardinality.

I know that the usual ordering of $\mathbb R$ is not a well-ordering but is there an uncountable $S\subset \mathbb R$ such that S is well-ordered by $<_\mathbb R$?   Intuitively I'd say there is no such set but intuitively I'd also say there is no well-ordered uncountable set at all, which is obviously wrong. I still struggle to grasp the idea of an uncountable, well-ordered set.


While this is an old problem, it's one that will only increase with time.  As Stack Exchange sites gain in popularity, more and more users are coming to the sites in search of answers to their specific problems.  Unfortunately, not all of them understand the basic operating principals behind Stack Exchange, and ask questions, or start discussions as separate answers.  Deleting these answers is fine, but more often (I would argue almost always) than not, a new user doesn't understand why.  Granted, comments are a way of doing this, but there are drawbacks to comments:   They require extra, replicated effort on the part of the moderator for something that they do repetitively The message will be inconsistent; messages like this would be consistent, cite the relevant resources that guide the user in the right direction The larger size would have a higher chance of grabbing the user's attention, as well as put more weight behind the action (as it's officially attached to the answer in a consistent manner). The banner will serve as an example of what not to do to other users who can see the deleted post.   Additionally, there are tools that can help with auto-commenting on posts, but these have their drawbacks as well:   Not all moderators use these tools The messages that are delivered by the tools are ultimately generated initially by the moderators, so the message will not be consistent These tools are not always available on other devices (e.g., mobile platforms)   It would be helpful to the user if they had a reason indicating why the answer was deleted.  Something along the lines of:    In order to accomplish this, I propose an additional (not a replacement) button in the moderation tools labeled "delete with reason".  Mods would still be able to delete answers outright, they just have the option now of stating why in an easy manner which will allows for more time to moderate harder.  Placement is not important (screen real estate is valuable, yes), but I envision it looking something like this in the moderator tools:    When clicking "delete with reason", a dialog, much like the "close" dialog will appear with options:    Initial options for the reasons could be:   Asking a new question Starting discussion   A mechanism like this has the potential for other benefits as well:   Users with an answer deleted with a reason might actually be directed to perform the right action now, and in the future (creating better site denizens) Users who wish to contest the deletion of an answer on meta can cite that specific reason, which mods can specifically address (which actually might reduce noise on meta about "why was my answer deleted?") Can reduce flags on answers asking "why was this deleted?" (admitted, I've not personally experienced this to be a pervading problem on Stack Overflow, but this might be the case for other mods on other Stack Exchange sites) Other Stack Exchange sites which don't have that many users will give a better experience to their users when their first action isn't ideal for a Stack Exchange site; this will enhance the chance that the site will retain the user and get good contributions from them (as per Farseeker's comments: , ).   Additionally, if this works well for the moderator tools, I imagine that it would not be such a leap to eventually have this graduated to users with the rep to cast delete votes, thus allowing non-mods to deliver a more clear message to new users about how to best participate on a Stack Exchange site.

In the past few weeks, I've received a few emails from users asking me why I deleted their posts. It's almost always for answers deleted after being correctly flagged as "not an answer". Typically, the user just doesn't fully understand the Stack Exchange format, and thinks they're leaving a comment or reply. After linking them to the  page and the  page, they typically understand. Now, deleted posts already show a link to the deleted answers help page, which I guess people don't click much. So, I'm suggesting that we make it more obvious by specifically telling them why their post was deleted. I'd like to see some way for moderators to optionally select a deletion reason when removing posts. Something similar to the rejected suggested edits reasons, which would show the user why their post was deleted with relevant links. Here are some of the reasons I'd suggest:  Your post was deleted because...   Comment as answer:  it would be more appropriate as a comment. You can always comment on your own posts, and can comment everywhere once you earn 50 reputation points.   Question as answer:  it appears to be asking a related question. Instead of leaving an answer, you can . Make sure to refer back to this original question, explaining what answers you've tried and why they didn't work.   Me-too answer:  it appears to be re-stating the original question. If you have the same problem as the original question, you can         (if rep >= 15){up vote it to show your support} (if rep >= 50){or start a bounty} (if rep < 15){use the "was this post helpful yes/no" links to support it}.   Thanks answer:  it appears to be a response to another answer. If you'd like to show appreciation for an answer, you can         (if rep >= 15){vote up the answer}  (if rep < 15){use the "was this post helpful yes/no" links under the answer} to support the answer that helped you.   Other:  it does not fundamentally answer the question.     ... For more information, see the  and "".  I think these cover all of the situations under which I would delete an answer and feel like the user deserves an explanation (albeit a canned message). If it's spam, gibberish, or otherwise obviously not genuine content, then the user shouldn't really be surprised when it's removed, or it might be appropriate to leave a comment. It's too much work to constantly be writing comments though (even with the pro forma comments script, it's kind of unofficial and inconsistent), so I think this would help a lot for making deletion more transparent to the user. Example:  To avoid making this too difficult for the moderator should they not wish to add a reason, the deletion could still happen instantaneously, but a box could show up after the deletion occurs, asking if they'd like to select a reason. If they don't choose a reason, it would just remain with the current default.


What is correct:     1) Books and music makes life even better   or     2) Books and music make life even better   (saw a quote #1 and t-shirt with #2)

I was surfing the internet the other day when I found this phrase: Instead your precious time and attention is wasted. To my ears, it sounds wrong. But I'm not a native English speaker, so I consulted with a number of them, and some of them said that it was "is" because the adjective modifies only the noun "time" and not "attention". Others said it "is" because that's just how it is. But I still believe it should be "are". Any help is appreciated.


Is it possible to change email account and transfer all items to the new account?

I've been playing the game a while now and have ranked up considerably. I'm wondering if there is any way to change to a different Google account and still keep all of my Pokemon/items etc, as I stupidly used my university gmail account when I first downloaded the app (which will be automatically deleted in September).   Is there any way to transfer my trainer/Pokemon/items etc to a different Google account?


I have a little problem on my site, the text from the content div is going over the footer.  HTML:
 test

text

text2

tex3

E-mail: text4; text5; text6

website

   CSS:  .content{ padding-top : 121px; position: absolute; width : 100%; display:inline-block; } .footer {    display: inline-block;    position: absolute;    left: 0;    bottom: 0;    width: 100%;    text-align: center; }   If I write a lot of text, with
 included, it goes over the footer. Thanks a lot for helping!

I have a simple 2-column layout with a footer that clears both the right and left div in my markup.  My problem is that I can't get the footer to stay at the bottom of the page in all browsers.  It works if the content pushes the footer down, but that's not always the case.


This picture from another thread online relates to my situation:    ()  I have a transformer from 240v ac to 18vac but need to step it further down to 12vac. What size resistor should I use in the above diagram?  Required output 12 VAC 5 W from current scrap transformer output of 18 VAC

When would you use a voltage regulator vs a resistor voltage divider?  Are there any uses for which a resistor divider is particularly bad?


Let $$M = \begin{bmatrix} -7 & 8 \\ -8 & -7 \end{bmatrix}.$$ Find   formulas for the entries of $M^n$ where $n$ is a positive integer.    (Your formulas should not contain complex numbers.)  Your answer   should be in the form of a matrix.   I diagonalized to the form $M = P D P^{-1}$  and $M^n = P D^n P^{-1}$  where $P$ is my matrix of eigenvectors and $D$ is my matrix of  eigenvalues.     My final answer after diagonalization was $$M^n = \begin{bmatrix} > .5((-7+8i)^n+(-7-8i)^n) & (i/2)(-(-7+8i)^n+(-7-8i)^n) \\  >(.5/i)(-(-7+8i)^n+(-7-8i)^n) & .5((-7+8i)^n+(-7-8i)^n) \end{bmatrix}$$      I had a hard time finding an answer not in terms of complex numbers. Can someone show me what I'm missing?   I asked this question  a couple of days ago and I finally had time to correct it. Can someone check my solution, Every value I can think of works for it but it was an online homework assignment and my solution isn't being accepted.  After using De Moivre's formula as BaronVT suggested I came up with the solution  $$M^n = \begin{bmatrix} \sqrt{113^n}\cdot\cos\left(n\cdot\left(\tan^{-1}\left(\frac{8}{-7}\right)+\pi\right)\right) & \sqrt{113^n}\cdot\sin\left(n\cdot\left(\tan^{-1}\left(\frac{8}{-7}\right)+\pi\right)\right) \\ -\sqrt{113^n}\cdot\sin\left(n\cdot\left(\tan^{-1}\left(\frac{8}{-7}\right)+\pi\right)\right) & \sqrt{113^n}\cdot\cos\left(n\cdot\left(\tan^{-1}\left(\frac{8}{-7}\right)+\pi\right)\right) \end{bmatrix}$$

Let $$M = \begin{bmatrix} -7 & 8 \\ -8 & -7 \end{bmatrix}.$$ Find formulas for the entries of $M^n$ where $n$ is a positive integer.  (Your formulas should not contain complex numbers.)  Your answer should be in the form of a matrix.  I diagonalized to the form $M = P D P^{-1}$  and $M^n = P D^n P^{-1}$ where $P$ is my matrix of eigenvectors and $D$ is my matrix of eigenvalues.  My final answer after diagonalization was $$M^n = \begin{bmatrix} .5((-7+8i)^n+(-7-8i)^n) & (i/2)(-(-7+8i)^n+(-7-8i)^n) \\ (.5/i)(-(-7+8i)^n+(-7-8i)^n) & .5((-7+8i)^n+(-7-8i)^n) \end{bmatrix}$$  I can't seem to find an answer not in terms of complex numbers.  Can someone show me what I'm missing?


We are having multiple business sites hosted on Windows 2008 r2 server. We do own a static IP. We want to have all of the sites work under SSL. However it is kinda not possible to have separate certificate purchase for each site. We were thinking to purchase certificate for static IP we have and apply that certificate to all of the site.  Is this possible? If yes, are there any security risk attached with this approach?

I just tried buying a Comodo Positive SSL but it was rejected due to not supporting a public IP address, but instead they only support a domain name.  Does anyone know any SSL certificate provider that supports public IP address instead of a domain name?  My company has a dedicated server hosted with a web hosting company, which is used for running a bugtracker for multiple projects (for multiple clients). Since it's only used for a bugtracker, we don't need a domain name (our clients access it by typing the public IP in their browser).


Not a Duplicate Claim:  Before you flag this question as a duplicate of , please consider that I'm not discussing if such a warning is useful (I fully agree that it's useful), but instead I have problems following the advice given in the warning because I seem to have ran into a special case (deleted questions which I can't see anymore). This topic might need attention from an SE developer.  Question:  When I go to  then I get the warning     Wait! Some of your past questions have not been well-received, and   you're in danger of being blocked from asking any more.   along with some helpful links for resolving this issue.  However, when I go to my profile, I see only one question, and it's currently upvoted with 2. I think that this can't be the reason for the warning, so I don't understand why the warning is there.  Maybe in the past I had bad style questions on android.stackexchange.com which were deleted, but now I barely remember and I can't find them and I can't improve them. So the warning is there for a reason which I can't reconstruct. So ultimately, the warning is almost useless for me, except that it vaguely tells me to do better.  I think that this warning shouldn't be there, or that it should give me more information what I have been doing wrong. Can I switch it off somehow or do something else about it?

Another "miséricorde":  Consider  (emphasis added):  I think its okay, please dont take any efforts for me. I personally do not feel the system helps ask good questions. I dont know why asking for a software in this case is bad. Basically I needed a command that would give me this data. There is no other way I could have asked the question. I could have changed the question just for the sake of changing. I feel I am better off elsewhere. Thanks for your very very prompt responses. Regards. Bye. – user1744649  We just lost another user due to inadequate guidance on what questions are allowed.  The  by the time they are banned has been proven incorrect. Given that , we need a better way to make sure that users can understand how to ask good questions and what types of questions are allowed. I suggest that we warn newcomers, in a clear but positive tone, when one of their questions has been closed, downvoted (to a score of -2 or lower), or deleted, so that they don't repeat the same mistake.  This is probably best done the next time the user asks a question, and should appear as an "interstitial" page prior to reaching the actual Ask Question form.  The page should not appear to users:  with at least 50 (or perhaps 75 or 100) reputation that have asked a good question since the last downvoted/closed/deleted question that have fixed a bad question and had it reopened/undeleted/upvoted.  The content of the page should be adapted based on the specific problem with the previous question.  I would imagine something similar to the following (example for a question closed as off topic on Super User):  Before you ask another question... One or more of your previous questions have been closed as off topic. The scope of on-topic questions is defined in the , as follows:  What kind of questions can I ask here? Super User is for computer enthusiasts and power users. If you have a question about …  computer hardware, computer software, or personal and home computer networking  and it is not about …  programming and software development, video games or consoles, websites or web services like Facebook, Twitter, and WordPress, electronic devices, media players, cell phones or smart phones, except insofar as they interface with your computer, issues specific to corporate IT support and networks, asking for a shopping or product recommendation,  … then you’re in the right place to ask your question!  Please make sure that the question you are about to ask is on topic as described above. If you need help determining whether your question can be asked on this site, you can ask for advice on  or . You may also want to edit your previous question to address any problems associated with it. To ensure a high standard of content quality and prevent disruption to the community, users who repeatedly post low-quality questions  Continue  The  doesn't address this issue as it is shown only to users with 10 reputation or less (rather than up to 50 and possibly higher) and does not address the specific problem with previous low-quality questions.  The point of this feature request is to provide a easily understood targeted message that actually teaches the user about what happened with the previous question he or she asked.  The EULA is generic and may not have conveyed the intended message clearly if the user still asked a low-quality or off-topic question. For reference,  currently has 143 reputation and the proposed message would probably have been shown after the first closed or deleted question. I know this can be a complex feature to implement, since it needs to be adaptive, but this should help eliminate confusion on what the rules are and minimize the incidence of good-faith users getting post-banned.


Originally my farm (sheep and chickens) was at ground level with fences around it. I noticed that when logging into the game the animals would teleport themselves outside the fences. They don't seem to do it if you stay logged in for long periods of time but as soon as you go out and then back in there is potential for it to happen. In an attempt to fix this problem I dug the pen down two blocks deep   This seems to keep them from freeing themselves but now they glitch into the wall and suffocate. At least this what I assume is happening, I've seen them go into the wall and turn a very dark almost black color before, but when I am watching it happen they always pop back out after a second or two. But I am definitely losing them (I used to have many more), and I just found some lime green wool on the ground when I returned back to the pen after spelunking for a while so I know the lime sheep died.  My question is: What design can I use for my pen that will prevent my animals from escaping and keep them from dying randomly as well.

After I downloaded the newest Minecraft patch the animals are still escaping their pens. What do I have to do in order to keep my animals from escaping? They seem to be glitching out of the pens. How can I prevent this?  Below is a video of how my pens are set up.  All types of animals are escaping their pens. The pens are just constructed using fences in a 4x6 block. I'm on Minecraft version  1.6.4.  The cow in the video glitched into the solid dirt enclosure.


Compute $3^{2003}\pmod {99}$ by hand?    It can be computed easily by evaluating $3^{2003}$, but it sounds stupid. Is there a way to compute it by hand?

How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .


I have the following linear model in R:  model <- lm(response ~ v1*v2 + v3*v2 + v4, data=df)   v2 is number of hours spent sleeping  v4 is ordinal (7 pt likert) measuring subject rating of sleep quality  v1 and v3 are 3 level factors measuring time spent on different activities (0-10mins, 11-20, 20+)  response is a count variable ranging from 1-6. This measures number of correct items on a 6 item quiz  I'm wondering what criteria is used to decide whether poisson regression should be used instead. I've considered the following:   I've read that in a poisson model the mean and variance of the response should be equal, which is not true in this case (mean = 5, variance = 1.1, mode = 6).  The distribution is negatively skewed, which works in favour of using a poisson model. What types of transformations are possible if I wanted to use OLS? The range of the variable is 1-6. I believe one reason to use a poisson is due to the bounding at 0, however, I dont have any 0 values and the majority of the values are in the upper range (6) Does poisson regression require a larger sample size than OLS to gain sufficient power? My N is ~120 I've tried running ncvTest() to check for heteroscedasticity and the test results are in favour of using OLS (no assumption violation)   Many say that poisson regression should be used to count data no matter what, but OLS doesn't seem unreasonable given some of the points above. What should my primary considerations be and how should I weigh the points outlined above? Is there anything that could be used to argue against the use of a poisson model in this case (maybe sample size?)?  EDIT:  To address the duplicate post concern: I don't believe the other post is asking the same thing (or at least the answer provided there doesn't really help in this case):   The other post is dealing with extensive variables, but in this case we have intensive Given intensive variables, the other post suggests a linear model is OK but doesn't explain why The response variable in the other post is unbounded at the upper end (i.e. number of patents). In this case, the response measures number of correct items on an exam. Given there is a maximum value to that (i.e. the value cant be greater than the number of items on the exam), the response here is bounded at both ends, with no respondents touching the lower bound of 0   So my question here is really asking about how to correctly handle positive integer (discrete) response values that are bounded at both ends

I need some advice regarding two main dilemmas in my research, which is a case study of 3 big pharmaceuticals and innovation. Number of patents per year is the dependent variable.  My questions are    What are the most important criteria for a good model? What is more/less important? Is it that most or all of the variables will be significant? Is it the prob of "F STATISTIC"? Is it the value of "Adjusted R squared"? Second, how can I decide the most appropriate model for the research? Besides patents which are a count variable (so maybe a Poisson count) I have explanatory variables such as return on assets, research and development budget, repeated partner (% not a binary variable), company size (employees) and a couple more. Should I do a linear regression or Poisson?


Suppose I have the following class:  class Dummy {     public static Dictionary<int, int> dict = new Dictionary<int, int>();  // (1)      static Dummy()   // (2)     {         dict.Add(1, 100);         dict.Add(2, 200);     }         }   This type will be accessed by multiple threads. When will the (1) and (2) be executed? Will they be executed for each thread? Is it possible that a key duplication exception will occur?

In other words, is this Singleton implementation thread safe:  public class Singleton {     private static Singleton instance;      private Singleton() { }      static Singleton()     {         instance = new Singleton();     }      public static Singleton Instance     {         get { return instance; }     } }


I have installed Ubunut 12.04 using WUBI. The "Installation size" options I chosen was 18GB i.e the amount of space you want to "give up" for WUBI. That is the space wubi's Ubuntu install is able to use. Wubi creates a disk image (loopmounted device) on your host system in/on which Ubuntu is installed. Now, I am running out of memory in primary partition.   Could anyone help me out to extend/stretch the partition size?

Every time update manager prompts an update I get a message saying that there is not enough space available, however  the partition with Ubuntu installed  has over 10 GB of free space available.  I'm lost as to what needs to be done.  df -h returns:  Filesystem            Size  Used Avail Use%   Mounted on /dev/loop0            5.6G  5.1G  237M  96% / udev                  2.0G  4.0K  2.0G   1% /dev tmpfs                 786M  792K  786M   1% /run none                  5.0M     0  5.0M   0% /run/lock none                  2.0G  332K  2.0G   1% /run/shm /dev/sda6              20G  6.7G   13G  34% /host /dev/sda5             175G  120G   56G  69% /media/DATA   It would be great if someone could help me out on how to solve this problem. I'm a newbie to Ubuntu.


I use currently the function hclust() for Dendogram in R. It looks like:  res.hc <- hclust(d, method = "ward.D2" )   My special interest is to understand, what the method I have to use for my data and where is a difference.  I already took a look to the R Documentation ?hclust  The documentation is very poor, I could find only this part:     A number of different clustering methods are provided. Ward's minimum   variance method aims at finding compact, spherical clusters. The   complete linkage method finds similar clusters. The single linkage   method (which is closely related to the minimal spanning tree) adopts   a ‘friends of friends’ clustering strategy. The other methods can be   regarded as aiming for clusters with characteristics somewhere between   the single and complete link methods. Note however, that methods   "median" and "centroid" are not leading to a monotone distance   measure, or equivalently the resulting dendrograms can have so called   inversions or reversals which are hard to interpret, but note the   trichotomies in Legendre and Legendre (2012).      Two different algorithms are found in the literature for Ward   clustering. The one used by option "ward.D" (equivalent to the only   Ward option "ward" in R versions <= 3.0.3) does not implement Ward's   (1963) clustering criterion, whereas option "ward.D2" implements that   criterion (Murtagh and Legendre 2014). With the latter, the   dissimilarities are squared before cluster updating. Note that   agnes(, method="ward") corresponds to hclust(, "ward.D2").   Can anybody provide me better introduction to this method and probably try to explain, how I can select the right method for my data (my data is very similar to ibis setosa dataset).

I am performing hierarchical clustering on data I've gathered and processed from the reddit data dump on Google BigQuery.   My process is the following:   Get the latest 1000 posts in /r/politics Gather all the comments Process the data and compute an n x m data matrix (n:users/samples, m:posts/features) Calculate the distance matrix for hierarchical clustering Choose a linkage method and perform the hierarchical clustering Plot the data as a dendrogram   My question is, how do I determine what the best linkage method is? I'm currently using Ward but how do I know if I should be using single, complete, average, etc?  I'm very new to this stuff but I can't find a clear answer online as I'm not sure there is one. So what might be a good idea for my application? Note the data is relatively sparse in the sense that the n x m matrix has a lot of zeroes (most people don't comment on more than a few posts).


I thought this has been asked before but couldn't find it.  In the movie, Rey first scenes included one where she just added water to a pile of powder and poof it transforms into bread.  Out of curiosity, is this a kind of newfangled technology that is already reality on Earth or in the process of becoming so?  Edit: I don't think McDonald's powdered scrambled eggs count...don't troll ok?

In The Force Awakens, we see Rey pouring some flour-like polystarch rations into water so that the flour amazingly transforms into something that looks like bread. What are these rations? Is there any documentation of the fictional chemistry and biology that makes the starch rations behave as they do?


Bikes are more efficient than walking, but that's only because roads are flat so wheels make sense, right?  Does it make sense to say that this fact is simply gained by putting a lot of energy into making the earth flat, into making tarmac and putting it there?

Most people can ride 10 km on their bike. However, running 10 km is a lot harder to do. Why?  According to the law of conservation of energy, bicycling should be more intensive because you have to move a higher mass, requiring more kinetic energy to reach a certain speed. But the opposite is true.   So, to fulfill this law, running must generate more heat. Why does it?  Some things I can think of as (partial) answers:   You use more muscles to run. While running, you have more friction with the ground; continuously pouncing it dissipates energy to it. While you move your body at a slow speed, you need to move your arms and legs alternately at higher and lower speeds.


I'm wondering if anyone knows of a document viewer that has a menu of some kind that shows all my open documents.  I typically have anywhere between 5 and 20 PDFs open when I'm doing research, and using Super-W or clicking the dock icon to "explode" all the windows is totally useless.  On my Mac, most applications have a "Window" menu that shows all open documents in a nice list, like this:   Any thoughts?

Is there any reason why this is missing from Unity? It's a really helpful thing to have when you have a lot of windows open.


I think I understand what convection does, and (some) of the benefits, such as eliminating hot/cold spots, and being more efficient overall.  Does this mean that I should always take advantage of it?  If not, which circumstances are better for convection, and which are better for regular bake/broil?

Are there any general rules to follow when choosing between bake and fan bake to cook something in the oven? What effect does each have and what are the advantages and disadvantages of both?


The iOS app is great, but I can't use it to perform diamond functions like handle flags. I would love to have a table view of all the flags on my site, with the buttons we currently have in the normal flag queue.  Also of use, but much more work, would be the ability to destroy users and such. I would settle for just plain flag handling, though.

I'm using the official Stack Exchange mobile app for iOS or Android, and  My app crashed! It doesn't look good on my new smartphone. It won't run after I updated my device. I noticed another bug. I have an idea for a new feature which is currently not in the app.  How do I report bugs with or request features for the iOS and Android apps? Also:  I've used the built-in functionality of the app to report a bug or submit a feature request. Did I do the right thing? The app prompted me to post on Meta after an error occurred. Should I post about it here? I'm wondering why the latest version is from 2017. I've heard rumors that the apps are no longer supported; is that true? I can't find the app on my device's app store anymore! Where did it go?     We get a lot of bug reports from users about the mobile apps, which are unsupported, and at the moment, there is no centralized Q&A pair for those to be closed as duplicates of (the relevant answers are spread across multiple unrelated questions). This question is an FAQ proposal, to serve as a directly-related duplicate target for those questions.


I'm trying to run my .sh file but when I try to execute it it doesn't work. I did echo '#!/bin/bash' > cadetkpgm.sh in order for the .sh file to be executable but when I use ./cadetkpgm.sh or bash cadetkpgm.sh to run the file t it doesn't work... any ideas?

So I have this script:  #!/bin/bash # Flips the screen (hopefully)  syntax_error=0 orientation=0  current_orientation="$(xrandr -q --verbose | grep 'connected' | egrep -o  '\) (normal|left|inverted|right) \(' | egrep -o '(normal|left|inverted|right)')" case $current_orientation in         normal)                 current_orientation=0         ;;         left)                 current_orientation=1         ;;         inverted)                 current_orientation=2         ;;         right)                 current_orientation=3         ;; esac  if [ $current_orientation -eq 0 ]; then         orientation=2 fi  if [ $current_orientation -eq 2 ]; then         orientation=0 fi method=evdev  # LENOVO S10-3t CHANGE ==> Hard Coded my device number to 11!!!!!!!!  device=11  swap=0 invert_x=0 invert_y=0 real_topx=0 real_topy=0 real_bottomx=4020 real_bottomy=4020  case $orientation in         0)                 swap=0                 invert_x=0                 invert_y=0                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomx                 bottomy=$real_bottomy         ;;         1)                 swap=1                 invert_x=1                 invert_y=0                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomy                 bottomy=$real_bottomx         ;;         2 )                 swap=0                 invert_x=1                 invert_y=1                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomx                 bottomy=$real_bottomy         ;;         3 )                 swap=1                 invert_x=0                 invert_y=1                 topx=$real_topx                 topy=$real_topy                 bottomx=$real_bottomy                 bottomy=$real_bottomx         ;; esac  if [ $method = "evdev" ]; then         xinput set-prop "$device" "Evdev Axes Swap" $swap         xinput set-prop "$device" "Evdev Axes Swap" $swap         xinput set-prop "$device" "Evdev Axis Inversion" $invert_x $invert_y         xinput set-prop "$device" "Evdev Axis Calibration" $topx $bottomx $topy $bottomy         if [ $orientation = 2 ]; then                            xrandr -o inverted         fi         if [ $orientation = 0 ]; then                 xrandr -o normal         fi fi  #   It's for flipping screen in my Lenovo S10-3t. I copied it from the netbook's wiki page, and added the #!/bin/bash at the top. The filename is flipscreen.sh. How can I make it work?


My current laptop has no os installed and I would like to install Ubuntu onto it by tranferring a file/files from my android tablet and booting the setup off of the USB. Any help please?

I would like to see a full how-to guide on how to install Ubuntu.


I am running Ubuntu 12.04 LTS.  I have downloaded several programs (, , ) and they all come in ZIP format. Once I uncompress them I can use them, but I cannot access them via the Dash Home Menu, like I explain in this thread:      In that thread the answer was in creating a XXX.desktop file, populate it with random fields, and then move that file to a specific folder.   I now want to do the same for my Eclipe and SmartGit programs (as well as to any other programs I may end up using) so now I believe I need to learn how to create an XXX.desktop file with the correct fields and the correct instructions.   Where can I find the information to do that?

Will Unity allow making custom launcher icons from .desktop files or via menu editing system? (Right now the launcher doesn't give the option to "keep in launcher" on all programs.  For some programs I use, I have to make custom launchers or .desktop files.  For instance, daily blender builds are generally just folders with an executable.  In basic Gnome or KDE, I can make a new menu entry with the menu editing system. Then, I can also add it to Docky either from the menu or by dragging a .desktop file to it. Unity launcher doesn't support drag and drop, so thats not a bug or anything, but when I open a .desktop file, it has unpredictable results. Most time it will not have "keep in launcher". Sometime it will have a pinnable item without the .desktop's icon, and if I pin the item to the launcher, it will not call upon the program again after closing it. I've also gotten it to just work with a .desktop file for celtx.


Every instance I've found of printf(1) (that is, the command-line version; as opposed to printf(3), the C library) repeats its format-string to consume more when presented with too many arguments, allowing for constructions such as printf '%s\n' "${headers[@]}" "" "${body}" > http_client_socket  However, is this platform-specific? If so, which platforms does it differ from this on? Additionally (and regardless of the answer to the previous question), is it in the spec, or is it an undefined behavior?

Why is this shell script printing inputs twice?  I expected the script to ignore the inputs after 5.  Script:  #! /bin/bash echo "Enter 5 words : " read  a b c d e  printf "> %s %s %s %s %s <" $a $b $c $d $e   Output:  user@linux:~$ pico ifs2.sh user@linux:~$ ./ifs2.sh Enter 5 words :  1 2 3 4 5  > 1 2 3 4 5 <user@linux:~$ ./ifs2.sh Enter 5 words :  1 2 3 4 5 6 > 1 2 3 4 5 <> 6     <user@linux:~$ ./ifs2.sh Enter 5 words :  1 2 3 4 5 6 7 8 9 0 > 1 2 3 4 5 <> 6 7 8 9 0 <user@linux:~$    And, the following script works no matter what is set to $IFS. Why?  #! /bin/bash     old="$IFS" IFS=":" echo "IFS = $IFS" echo "Enter 5 words : " read  a b c d e  printf "> %s %s %s %s %s <" $a $b $c $d $e     IFS="$old"   Output:  user@linux:~$ ./ifs2.sh IFS = : Enter 5 words :  1 2 3 4 5   > 1 2 3 4 5      <user@linux:~$ ./ifs2.sh IFS = : Enter 5 words :  1 2 3 4 5 > 1 2 3 4 5     <user@linux:~$ ./ifs2.sh IFS = : Enter 5 words :  1:2:3:4:5 > 1 2 3 4 5 <user@linux:~$


If I purchase a signed certificate for example.com, can I then produce sub-certificates for a.example.com and b.example.com?  These sub-certificates would have PEM files whose privacy cannot be assured.  Can I do this, maintaining the privacy of the root certificate while generating an unlimited number of disposable sub-certificates that would still be recognized as valid by the original signing authority?

I have written a small program to run on a Windows computer that serves SSL/TLS web pages through port 443 to visiting web browsers. I want it to be easy for non-technical people to install and run this program. I have made it easy for them to create a self-signed certificate or a certificate signing request in the program, but I think they are going to struggle getting the CSR signed and connected to a domain name which points at their server. I want to reduce the technical difficulty of this process to a minimum.  Can I purchase an SSL certificate which can sign certificates for subdomains of my domain name? Something like customer1.mydomain.com, customer2.mydomain.com etc and then I could point my DNS subdomains at their servers and sign their certificates for them and automate the entire process. Or maybe this would be very expensive?  If not, apart from hosting all their web applications on my own server with a *.mydomain.com certificate, what is the simplest solution I can give them for setting up the SSL certificates and domain names?


I tried updating my ubuntu today from 12.04 to 13.10 and am now unable to update anything and have what is basically a useless system. Whenever I try to launch update manager I get not all updates can be installed, run a partial upgrade  Cannot upgrade  An upgrade from 'raring' to 'precise' is not supported with this tool.  When I try things from terminal they're no better. When trying apt-get update I get an  W: Failed to fetch gzip:/var/lib/apt/lists/partial/au.archive.ubuntu.com_ubuntu_dists_saucy_multiverse_i18n_Translation-en  Encountered a section with no Package: header  E: Some index files failed to download. They have been ignored, or old ones used instead.  Trying to run apt-get upgrade gives me  You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  libdrm2 : Breaks: libdrm2:i386 (!= 2.4.43-0ubuntu0.2) but 2.4.43-0ubuntu0.0.3 is installed  libdrm2:i386 : Breaks: libdrm2 (!= 2.4.43-0ubuntu0.0.3) but 2.4.43-0ubuntu0.2 is installed E: Unmet dependencies. Try using -f.  and trying apt-get -f install   dpkg: error processing libdrm2:i386 (--configure):  libdrm2:i386 2.4.43-0ubuntu0.0.3 cannot be configured because libdrm2:amd64 is in a different version (2.4.43-0ubuntu0.2) dpkg: error processing libdrm2 (--configure):  libdrm2:amd64 2.4.43-0ubuntu0.2 cannot be configured because libdrm2:i386 is in a different version (2.4.43-0ubuntu0.0.3) No apport report written because MaxReports is reached already                                                               Errors were encountered while processing:  libdrm2:i386  libdrm2

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


I am not doing a physics degree but an engineering degree but i am planning using my free time to self study all the math in preparing myself to self study subjects in theoretical physics. (I've always wanted to do theoretical physics but there are no scholarships offered in my country for the subject and my family is not rich so I had no choice but to self study)   By "self studying" I mean buying books and reading online materials on my own and try to understand everything I can.  So far this is my plan,   Analytic geometry -> Single Variable Calculus -> Advanced Calculus (basic Linear algebra + multivariable and vector calculus) -> Linear Algebra -> ODEs -> but here I am stuck as to where do I go from here?   Well first of all is this plan okay? If it is : how do I continue? Should I continue to real and complex analysis and do more things from pure math? Or should I just stick to the more computational part of math and learn more advanced techniques in solving differential equations or learn more algebraic techniques? How about geometry? Topology? Group theory and more things from pure Math?   If its not : what is the better way of doing it? Should I learn all the basic math first before reading Goldstein's classical mechanics ? Or should I just start with the physics and just pick up the math along the way?   And I also have the time issues to worry about how I wish I can just do a physics degree but unfortunately things don't always go your way. Due to imminent time constriants (engineering has lots of projects im sure) i would like my self study and learning to be as efficient as possible. Hence good advice from all experienced physicists would be very much helpful. Thanks in advance.

Note: I will expand this question with more specific points when I have my own internet connection and more time (we're moving in, so I'm at a friend's house).  This question is broad, involved, and to some degree subjective.  (I started out as a physics-only student, but eventually decided to add a mathematics major. I am greatly interested in mathematics; the typical curriculum required for physics students is not deep or thorough enough; mathematics is more general (that means work!); and it only requires a few more classes. Naturally, I enjoy  immensely.)  This question asks mainly of undergraduate-level study, but feel free to discuss graduate-level study if you like.  Please do not rush your answer or try to be comprehensive. I realize the StackOverflow model rewards quick answers, but I would rather wait for a thoughtful, thorough (on a point) answer than get a fast, cluttered one. (As you probably know,  produces clear, useful writing; and a properly-done comprehensive answer would take more than a reasonable amount of time and effort.) If you think an overview is necessary, that is fine.  For a question this large, I think the best thing to do is focus on a specific area in each answer.    Update: To Sklivvz, Cedric, Noldorin and everyone else: I had to run off before I could finish, but I wanted to say I knew I would regret this; I was cranky and not thinking clearly, mainly from not eating enough during the day. I am sorry for my sharp responses and for not waiting for my reaction to pass. I apologize.  Re: Curricula:   Please note that I am not asking about choosing your own curriculum in college or university. I did not explicitly say that, but several people believed that was my meaning. I will ask more specific questions later, but the main idea is how a physics student should study mathematics (on his or her own, but also by choosing courses if available) to be a competent mathematician with a view to studying physics.  I merely mentioned adding a mathematics major to illustrate my conclusion that physics student need a deeper mathematical grounding than they typically receive.   And now I have to run off again.


I’m flying in on American Airlines from Charlotte, NC, to Madrid with a layover in Munich, and have booked two separate flights on Iberia airlines with only a 1 hour connection. We do not have any checked luggage. I’ve read all over the internet that connecting through Munich is a breeze, but every scenario is Terminal 1 to 2 or terminal 2 to 2. Does anyone have experience with terminal 1 to terminal 1? How long does passport control take? Do we have to go through security again?  Note: This is not a duplicate of  as:   This question states terminal 1 specifically  The other question does not mention being on separate tickets

I'm heading to India next week and have a connection in Munich, Germany. I made the mistake of booking a flight with only an hour and a half layover (freaking out!) and I'm wondering if I'll have to go through customs in Munich or if I can pass right on through.


I am trying to prevent multiple copies of an application starting in C# on Windows 8.   bool isMutexNotExist; var mutex = new Mutex(true, "name", out isMutexNotExist);  if (!isMutexNotExist) {      SystemSounds.Beep.Play();      Application.Current.Shutdown(); }  mutex.WaitOne(); GC.KeepAlive(mutex);   This code works fine on Windows 7 (Dell Laptop) in Debug and Release mode (Visual Studio 2013) with .Net 4.5 but on Win 8 (Microsoft Surface 3) it lets another copy start. I couldn't find any reference to the Mutex's working different on Win7 & Win8 so i'm not really sure what is going on. The code didn't work on Windows 7 in release mode without the mutex.WaitOne().

Using C# and WPF under .NET (rather than  or console), what is the correct way to create an application that can only be run as a single instance?  I know it has something to do with some mythical thing called a mutex, rarely can I find someone that bothers to stop and explain what one of these are.  The code needs to also inform the already-running instance that the user tried to start a second one, and maybe also pass any command-line arguments if any existed.


Slightly tongue-in-cheek, but thinking about it I can't think of a single* main character in any of the Star Trek shows who is married with kids. And yet in the traditional Navy (and other armed forces) it's common-place. In TNG we even know Enterprise is bigger to hold families but they are 'civilians'.  *OK as I write this I think of some exceptions, but none are a full family unit:   Beverly Crusher obviously has a son... but is she married? Neelix has a normal family setup, for his species, but it is shown as a novelty due to so many differences to our norms Sisko has a son but again isn't he separated?   The main characters are typically not in their early twenties but mature, established officers. People who often would have families even though they might not feature in the show.  Are there any happily married Star Trek characters? It seems the only time characters have families or spouses, these are in some way dysfunctional or sources of strife, for the purposes of narrative.

It just occurred to me that hardly anyone in any of the series is married! What's up with that? O'Brien is married, Dr Crusher and Cpt Sisko are widowed, Tom Paris and B'Elanna Torres get married - those are the only examples I can think of. Other than the characters listed, and not counting marriages that take place after the time of the respective series (Crusher and Picard) or alternate reality stories (Troi and Worf), are any recurring characters in any of the series married?


Website in question:   Screenshot of ServerHit:    First question on ServerHit is taken from Ask Ubuntu:    I have already utilized the contact form, however, I am additionally submitting here for visibility.

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


What is the difference between a 1Ghz ARM mobile processor and a 1Ghz x86 processor?. I mean both are 1Ghz right. Then how is it differs in performance other than the architecture?. why if we compile one-same application for 2 architecture it gives 2 different outputs (performance).

I just read about the new Samsung Galaxy Note Edge having a 2.7 GHz quad-core processor and 3GB of RAM.  The laptop I bought last year by HP is 4 GB of RAM and 2.3 GHz quad-core and my iMac is even older and is 2.5 GHz i5.  Does this mean that the new Samsung gadget is more powerful than my desktop?  Is the 2.7 GHz the same kind of GHz as non-mobile devices (is it scaled up, or compared, etc.)?  Why, in terms of power, do modern computers not have two of those Samsung quad-core processors running in parallel pushing out 5.4 GHz processing power for the amount of electrical energy as two Galaxy Note batteries?


Let $\lim\limits_{n\to\infty}a_{n+1}-a_{n}=\alpha$. Show that $\lim\limits_{n\to\infty} \frac{a_n}{n}=\alpha$.   Since $\lim\limits_{n\to\infty}a_{n+1}-a_{n}=\alpha$, we have that for all $\epsilon>0$ there exists $N\in\mathbb{N}$ such that  $$|(a_{n+1}-a_n) - \alpha| < \epsilon \quad \forall n>N.$$ We wish to show that for all $\epsilon>0$ there exists $M\in\mathbb{N}$ such that  $$\left|\frac{a_n}{n} - \alpha \right| < \epsilon \quad \forall n>M.$$ So, \begin{align*} \left|\frac{a_n}{n} - \alpha \right| &= \left|\frac{a_n}{n} - \frac{a_{n+1}}{n} + \frac{a_{n+1}}{n} - \alpha \right| \\ &= \left| \frac{1}{n}(a_n - a_{n+1} - \alpha) + \frac{a_{n+1}}{n} + \sum_{j=1}^{n+1} \frac{\alpha}{n} \right| \\ \end{align*} I tried continuing with this pattern, but I did not get anywhere.

I have the following problem.   I have to find the limit of $b_n = \frac{a_n}{n}$, where $\lim\limits_{n\to\infty}(a_{n+1}-a_n)=l$  My approach:  I express $a_n$ in terms of $b_n$, i.e. $a_n=nb_n$ and $a_{n+1}=(n+1)b_n$  We look at the difference: $a_{n+1}-a_n=(n+1)b_{n+1}-nb_n$  Assuming that $b_n$ converges to a real number m, we see that:  $l=(n+1)m-nm$, from where I conclude that $m=l$.  What I'm left with is proving that $b_n$ is convergent which I'm not sure how to do.  Thanks in advance!


My lenovo A1000 tablet runs the ARM cortex A9 processor based on the ARMv7 architecture,can i install ubuntu touch on it?

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions