is a standard python3 module, thus I assume it should be shipped with python3 by default. That is not quite true on Ubuntu 16.04: to use venv you also need to install python3-venv. Why on Ubuntu venv is split into venv and python3-venv?

I am trying to make a virtual environment for the development of my Django application. The commando's which I am using:   vagrant@vagrant:/var/www/djangogirls$ python3 -m venv myvenv The virtual environment was not created successfully because ensurepip is not available.  On Debian/Ubuntu systems, you need to install the python3-venv package using the following command.      apt-get install python3-venv  You may need to use sudo with that command.  After installing the python3-venv package, recreate your virtual environment.  Failing command: ['/var/www/djangogirls/myvenv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']   vagrant@vagrant:/var/www/djangogirls$ sudo apt-get install python3-venv Reading package lists... Done Building dependency tree        Reading state information... Done python3-venv is already the newest version (3.5.1-3). The following packages were automatically installed and are no longer required:   javascript-common libjs-jquery libjs-sphinxdoc libjs-underscore python-pbr python-pkg-resources   python-six python-stevedore python3-virtualenv virtualenv virtualenv-clone Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 108 not upgraded.  vagrant@vagrant:/var/www/djangogirls$ python3 -m ensurepip ensurepip is disabled in Debian/Ubuntu for the system python.  Python modules for the system python are usually handled by dpkg and apt-get.      apt-get install python-<module name>  Install the python-pip package to use pip itself.  Using pip together with the system python might have unexpected results for any system installed module, so use it on your own risk, or make sure to only use it in virtual environments.   vagrant@vagrant:/var/www/djangogirls$ rm -r myvenv/   vagrant@vagrant:/var/www/djangogirls$ python3 -m venv myvenv The virtual environment was not created successfully because ensurepip is not available.  On Debian/Ubuntu systems, you need to install the python3-venv package using the following command.      apt-get install python3-venv  You may need to use sudo with that command.  After installing the python3-venv package, recreate your virtual environment.  Failing command: ['/var/www/djangogirls/myvenv/bin/python3', '-Im', 'ensurepip', '--upgrade', '--default-pip']   As you can see, I am trying to make a myvenv, which cannot be created due to the python3-venv missing. I have already installed this, but the ensure pip is missing. After searching it seems that the system (Ubuntu 16.04) discourages the usage of the package. Could someone help me work around this problem?


Have there been cases of errors in math papers, that were undetected for so long, that they caused subsequent errors in research, citing those papers. ie: errors getting propagated along. My impression is that this type of thing is extremely rare.  What was the worst case of such a scenario? Thanks.

I was just wondering whether or not there have been mistakes in mathematics. Not a conjecture that ended up being false, but a theorem which had a proof that was accepted for a nontrivial amount of time before someone found a hole in the argument. Does this happen anymore now that we have computers? I imagine not. But it seems totally possible that this could have happened back in the Enlightenment.   Feel free to interpret this how you wish!


I desperately need to find out how to colour or shade part of 3D text in blender 2.8. I want to change A's and D's colour  EDIT: It is text converted to mesh so this is ONE big object, and i cant ( i think) convert it back to 2d text becouse i lose progress. Also none of these soluttions works  EDIT: I cant change 2d text's colour as well ( i used mehtod shown linked below)

I want the text to have this sort of colouring   And this is the text.


When doing a backup of my Windows hard drive, I noticed some file names that had a bunch of seemingly random numbers in them. For example: .{ED7BA470-8E54-465E-825C-99712043E01C}   Does that mean something special in Windows? What is the purpose of these files?

On Windows 10, if I create a folder called whatever.{ED7BA470-8E54-465E-825C-99712043E01C} it opens a folder with every Control Panel command.  If I enter the location shell:::{ED7BA470-8E54-465E-825C-99712043E01C} in the Windows Explorer address bar, I enter the same place. What exactly is this? Are there any other "shortcuts" like this?  I have also found out {4234d49b-0245-4df3-B780-3893943456e1} opens an "Applications" folder.  Note: I don't mean to create a custom Control Panel, I just want further information about these type of shell "links".


Having plain text A , and  cipher text B. Can we somehow retrieve key , when we want to decrypt text C which was also crypted with the same key?

Is it possible to find the key if we know the plaintext and ciphertext with RC4. How should I write the algorithm?


The issue occurs using the 'Merge Selected Features' tool when there are geometrical errors in the features (not all are picked up by the 'check geometrical validity' tool).  In 2.2 Valmeria, the merge fails to complete. This is acceptable, as it alerts me that I need to fix geometrical issues with the features.  In 2.3 nightly build from 12th June, the merge fails to complete, and at least one of the features is deleted. This can be undone, but it is a worry, as the user might not notice on time.  Anyone experienced similar, or advice if I should report this somewhere?

I often find bugs in QGIS and its Plugins.   I would like to ask about this on the internet but I do not seem to find the proper place to address this issue.  Are there any instructions?


Is it optional to front the verb in sentences like the one below when an adverbial precedes?     In the film, appear two more girls who think that Dallas is quite rude.   I have already checked the answers to  but they do not exactly address my question.

The opening sentence to The Hobbit by J.R.R. Tolkien reads,     In a hole in the ground there lived [verb] a hobbit [subject].   I wonder if there are accepted stylistic purposes for such a structure.  When is it natural, and when is it unnatural?


I have a text file that contains entries shown below.    tag1start text1 text2 text3 text4 tag1end .. .. tag1start text5 text6 text7 text8 tag1end   I need to change entries only in the first set of tag1start tag1end  I have attempted using "range" but it affects both the sets. How do I limit it only to the first set ?   /tag1start/,/tag1end/c\ Some other text1\ Some other text2\ Some other text3\ Some other text4\ Some other text5\ Some other text6\ tag1end

I would like to update a large number of C++ source files with an extra include directive before any existing #includes. For this sort of task, I normally use a small bash script with sed to re-write the file.   How do I get sed to replace just the first occurrence of a string in a file rather than replacing every occurrence?  If I use  sed s/#include/#include "newfile.h"\n#include/   it replaces all #includes.   Alternative suggestions to achieve the same thing are also welcome.


I am struggling to understand the notation i.e. what does the bold 1 refer to? $\mathbf{1}_{A\cap B}(x)=\mathbf{1}_{A}(x)\times\mathbf{1}_{B}(x)$

I'm studying a course on probability and statistics and at some point this symbol comes up without introduction. It looks like the number one, but slightly bigger and with a double vertical line.  First time it comes up is when discussing stochastic/random variables that are neither continuous nor discreet in an example:   And somewhat later in a proof:    Anyone got an idea what this symbol represents?  EDIT: Thanks for the fast answers, I was still editing the question for better (larger) images :)


I am trying to create a letter and before hand I need to know rather or not to use a or an for a specific sentence. I know that U is a vowel, but because of the way the sentence sounds I re-framed from using an and used a.     while also ensuring a unique style.    Should I use the statement above or should I use this:     while also ensuring an unique style.

On a Physics specification, it says:     6.7 Know how to use two permanent magnets to produce a uniform magnetic field pattern.   Isn't it "produce an uniform magnetic field", or is the existing "produce a uniform magnetic field pattern" correct?


Ok so I'm pretty new to PHP and building a question/answer site.  I want a page where the user can search my questions table to find a question and after some research and work I've come up with this but my problem is common words.  If a user types "is" in the search every question with "is" in it turns up.  My question is either 1) Is my approach to this search function completely wrong?  or 2) is there a way I can inject an array of common words to be omitted from the query?    search_reslut.php:  <?php   $servername = "127.0.0.1"; $username = "dylan326"; $password = ""; $dbname = "questions87"; $port = 3306;  // Create connection $conn = new mysqli($servername, $username, $password, $dbname, $port); // Check connection if ($conn->connect_error) {     die("Connection failed: " . $conn->connect_error); }   echo "Your search results:
"; echo "
"; $query = $_POST['query'];  $query  = "$query $query $query"; $pieces = explode(" ", $query); $qindex0 = $pieces[0]; // piece1 $qindex1 = $pieces[1]; // piece2 $qindex2 = $pieces[2]; // piece3 $qindex3 = $pieces[3]; $qindex4 = $pieces[4]; $qindex5 = $pieces[5]; $qindex6 = $pieces[6];    echo $query;  $sql = "select q_id, question, username, q_date from questions where (question like '%$qindex0%' or question like '%$qindex1%' or question like '%$qindex2%' or question like '%$qindex3%' or question like '%$qindex4%' or question like '%$qindex5%' or question like '%$qindex6%')";    $result = $conn->query($sql);  if (mysqli_num_rows($result) > 0) {     // output data of each row     while($row = mysqli_fetch_array($result)){          $question = $row['question'];  echo ('' . $question .'Asked by:'.' '.$row['username'].' '.$row['q_date'] .' '  . '
');   }}  else {echo "No resluts found";}     ?>

I have a table with names of movies, and I want to be able to search for a movie in that table. But I want to be able to search for part of the title, and still return a result. For example, if there is a record with the name "The quantum of solace", then I want to be able to do a search for "quantum solace", or even "007: quantum solace" and I want to find that record. Is there a way to do this?  EDIT And how do I sort according to the matches? That is, the row that matches the most, should be returned first.


Hi I am new to Python and have an issue with using arrays in class.  When using array of strings, when I update one of the arrays with a string - all the other array entries get the same value.  Your kind guidance will be appreciated.  I am showing below the working code - without using arrays and then the same using arrays (which is not working). #Working Code:  class sessionData:     num_threads = 0     session_id = []     audio_check_audio_1 = []     audio_check_audio_2 = []     audio_check_audio_3 = []       def __init__(self, id, f1, f2):         self.id = id   #in main function later on:        if (session_id not in sessionData.session_id):             sessionData.audio_check_audio_1.append(wav_file_name1)             sessionData.audio_check_audio_2.append(wav_file_name1)             sessionData.audio_check_audio_3.append(wav_file_name1)             sessionData.session_id.append(session_id)         else:              i = sessionData.session_id.index(session_id)              if (recording_number == '1'):                 sessionData.audio_check_audio_1[i] = wav_file_name1             elif (recording_number == '2'):                 sessionData.audio_check_audio_2[i] = wav_file_name2             else:                 sessionData.audio_check_audio_3[i] = wav_file_name3  #Not working code:  class sessionData:     num_threads = 0     session_id = []     audio_check_audio = [[]*3]       def __init__(self, id, f1, f2):         self.id = id   #in main function later on:      if (session_id not in sessionData.session_id):          sessionData.session_id.append(session_id)         sessionData.audio_check_audio.append([wav_file_name[0],'',''])      else:           i = sessionData.session_id.index(session_id)           for x in range 3:               sessionData.audio_check_audio[i][x] = reg_wav_file[x]

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


He treats her as property rather than an autonomous being.  or   He treats her as property rather than autonomous being.  Which of the above sentences is correct and why?

I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize?   The standard rule you always hear:     “If a person knows which item you are talking about then use "the"   . . . doesn’t clear things up for me, as I have no idea whether or not they know.


I have a generic method   bool DoesEntityExist<T>(Guid guid, ITransaction transaction) where T : IGloballyIdentifiable;   How do I use the method in the following way:  Type t = entity.GetType(); DoesEntityExist<t>(entityGuid, transaction);   I keep receiving the foollowing compile error:     The type or namespace name 't' could   not be found (are you missing a using   directive or an assembly reference?)   DoesEntityExist<MyType>(entityGuid, transaction);   works perfectly but I do not want to use an if directive to call the method with a separate type name every time.

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


I know how I can rotate but how can I move up and down or sideways? Google didnt found anything useful  I read I can do it with Ctrl + c or . but the first one just fixed the camera at a point where it made everything even worse and . just did nothing

Often I want to just point the camera to an object or a specific area in my scene to get an idea of how it'll look in the render. What's the most painless hassle-free way to do this in blender?  A quick search on the blender wiki does not lend itself to easy look-up due to all the noise in the search result.  This question could probably be broken down into these two main questions:   How do I point a selected camera to the current 3d-cursor location in the scene? How do I point the selected camera to the currently selected object(s) in the scene?


I have a main doubt here. I've heard that just a thin layer of coating is sprayed on one side of the glass due to which there are minute gaps between the molecules through which light passes.  But the same should happen on both sides, but it doesn't. Why?

How does a  work? If seen from the outer side, we can see through thinking it is transparent, while if seen from the inside, the glass acts as a mirror. How?


I'm a new dungeon master, and I'm looking to find out how to level up my players characters to level 2 after they defeated a few monsters. How would I go about doing this? I have no experience in the matter and am really only dungeon mastering my first game I have ever played because I have the time on my hands for research and love story building.

I made a post recently about Lost Mines of Phandelver (5e), and it's safe to say I'm less experienced than a beginner.  The characters are level 2 and I looked up how to level up, but since then I've watched some videos and there seems to be a lot of different things being done in every video, in a different way.  When we leveled up we rolled for max hit point increases, found out the level 2 attributes and passives, and the wizard got 2 extra spells (also his magic missile gained an extra missile).  Is there anything I have missed? If so, can you please give me a simple step by step on what I need to do when leveling. The adventurers are almost level 3 so I was looking for a heads up for tonights session.  We have the base 4 classes - Fighter, Cleric, Rogue, Wizard


Prove that $6$ divides $a+b+c$ if and only if $6$ divides $a^{3}+b^{3}+c^{3}$   Here's my attempt:  As $6$ divides $a+b+c$ , $a+b+c$ must be even. This implies,  $a^{3}+b^{3}+c^{3}$ is also even. Also, By Fermat's theorem $$a^3 \equiv a\pmod 3$$ Similarly $$b^3 \equiv b\pmod 3$$ and $$c^3 \equiv c\pmod 3$$. Therefore, $$a^{3}+b^{3}+c^{3} \equiv {a+b+c} \pmod 3$$ This implies that, $3$ divides $a^{3}+b^{3}+c^{3}$  and $a^{3}+b^{3}+c^{3}$  is even. Therefore , $6$ divides $a^{3}+b^{3}+c^{3}$. Does this look correct?  Also, Could you please help me write the proof for converse part. Thank you.


If a Muggle was born of a wizard/witch and a Muggle, is that person a Squib, or is that reserved to people born from pure-blood families?    (Related: )

‘And what on earth’s a Squib?’ said Harry.   To his surprise, Ron stifled a snigger.   ‘Well – it’s not funny really – but as it’s Filch ...’ he said. ‘A Squib is someone who was born into a wizarding family but hasn’t got any magic powers. Kind of the opposite of Muggle-born wizards, but Squibs are quite unusual. If Filch’s trying to learn magic from a Kwikspell course, I reckon he must be a Squib. It would explain a lot. Like why he hates students so much.’ Ron gave a satisfied smile. ‘He’s bitter.’   Chamber of Secrets - pages 110-111 - British Hardcover   If a Squib is 'kind of the opposite of a Muggle-born wizards' wouldn't that make a Squib more Muggle than wizard? Does a Muggle strictly have to be born to Muggle parents to be considered a Muggle, or can the lack of magic render a person, even of wizarding parentage, a Muggle?  Hermione can say in all truthfulness that she is a 'Muggle-born witch.' The nickname (albeit derogatory) for a Muggle-born is 'Mudblood.' Filch can say in all truthfulness that he is a 'wizarding-born non-magic person,' which, according to Hagrid is a Muggle.  'Squib' may be derogatory in the same way as 'Mudblood' is. Neville laments his family thought he was a Squib when he showed no magical tendencies as a child; the Longbottoms were so rattled at the thought of Neville being a Squib that they, among other things, threw him out a second-story window to see if he would bounce. So could 'Squib' actually be a derogatory term meaning the opposite of 'Mudblood'? After all, the Ministry doesn't allow Squibs to register as magical beings, and many Squibs are schooled and trained in Muggle professions. Squibs don't get a Hogwarts letter.    Wizards can be born to Muggles. Can Muggles be born to wizards?  ETA 11.22.14: In regard to this question, I was glancing through Philosopher's Stone, and I came across this, that Neville said:     ‘Well, my gran brought me up and she’s a witch,’ said Neville, ‘but the family thought I was all Muggle for ages. My great-uncle Algie kept trying to catch me off my guard and force some magic out of me – he pushed me off the end of Blackpool pier once, I nearly drowned – but nothing happened until I was eight.’   Philosopher's Stone - page 93 - Bloomsbury - chapter seven, The Sorting Hat   Could what Neville says contribute to the theory and/or conclusion that Squibs are, or are not, Muggles? How do we apply what Neville said?


I am totally a new user of Ubuntu 14.04.   My problem is that I installed Ubuntu through the USB drive. Now I want to use the pen drive on Windows. I tried to format the pen drive but failed.

I am new in Ubuntu. First I installed Ubuntu 12.10 on my USB stick which is of 16 GB. So, it installed with 2 partitions of 9 GB and 7 GB.   Now I want to format that USB. But when I try to format it, only ext4 one does get formatted but not the partition which is the swap memory. Now on other OS my USB shows only 8.5 GB.


I am making one big scroll page. And my nav is fixed positioned. I want to change the color (from black to white and vice versa) on the nav when it reaches specific sections on my page. It's because some of them are white, and some of them are dark - I want to make a contrast. I already made a class in css that should be toggled. But I am having difficulties using my code. Take a look at it:      $(window).scroll(function (event) {     var scroll = $(window).scrollTop();         $('nav').toggleClass('light-mode',             //add 'light-mode' class when div position match or exceeds else remove the 'light-mode' class.             scroll >= $('.section2').offset().top         );     });      //trigger the scroll     $(window).scroll();//ensure if you're in current position when page is refreshed body {   margin: 0px;   padding: 0px; }  nav {   width: 100%;   position: fixed;   text-align: center;   padding-top: 20px;   padding-bottom: 20px; }  .light-mode {     color: #fff; }  .section1 {    width: 100%;    height: 400px;    background-color: #fff;    color: #000;    padding: 100px; }  .section2 {    width: 100%;    height: 400px;    background-color: #000;    color: #fff;    padding: 100px; }  .section3 {    width: 100%;    height: 400px;    background-color: #fff;    color: #000;    padding: 100px; }
navigation links

     section 1

     section 2

     section 3
     The conclusion:  My navigation by default is dark colored. When I reach the section that is dark I want to tell jQuery to add class .light-mode to . But when user goes off the section, I want it to go back to normal (so delete the class). In my solution it has issues:   It seems to it is not going back to original when user is not on the section. The class is added just when user scrolls from top to bottom page. It looks on .offset().top. I want to make it more professional and universal. I want to add this class when each section is on screen not matter if its from bottom or top.

I'm loading elements via AJAX. Some of them are only visible if you scroll down the page. Is there any way I can know if an element is now in the visible part of the page?


I want to create a bootable usb flash drive with Windows. But whatever USB flash I use - with NTFS or FAT32 or EXT4, I always get this error: installation failed, 32512  The size of iso file is 4.3Gb, but that shouldn't be a problem for NTFS or EXT4.    What's the matter?  P.S. I figure the button Refresh isn't working properly, it just doesn't the refresh the list of devices when I click on it.

I'd like to create a Windows bootable USB stick, but I don't have a Windows machine with me at the moment to do so. How could I achieve the same using Ubuntu?


I wrote this simple Javascript for auto and manually hiding bootstrap alerts.  $(function () {     $.ajaxSetup({ cache: false });     $("[data-hide]").on("click", function () {         $(this).closest("." + $(this).attr("data-hide")).hide();     });     window.setTimeout(function () {         $(".alert").fadeTo(700).slideUp(700, function () {             $(this).hide();         });     }, 5000); });   I want to cancel the setTimeout when the cancel button is clicked. How can I do this?

I have a few places where I use the line below to clear out a status, for example.  I have a few of these that hang out for 10 seconds or more and if the user gets clicking around the action can occur at incorrect time intervals.  window.setTimeout(function() { removeStatusIndicator(); }, statusTimeout);   Is it possible to cancel or kill this with some jQuery or JavaScript code, so I don't have this process hanging around?


Can someone please explain to me why the following won't compile?, and hopefully the obvious thing that I have missed...  functions.hpp:  template<typename T> string vector_tostr(std::vector<T> v);   functions.cpp:  template<typename T> string vector_tostr(std::vector<T> v){     std::stringstream ss;     std::string thestring = "";     if(v.size() > 0){         ss << "[";         for(size_t i = 0; i < v.size(); i++){             if(i != 0)                 ss << " ";             ss << v[i];         }         ss << "]";         thestring = ss.str();     }     return thestring; }   main.cpp  #include "functions.hpp" int main(int argc, char *argv[]){    vector<int> thevector;    thevector.push_back(1);    thevector.push_back(2);     string result = vector_tostr(thevector);    //I have also tried vector_tostr<int>(thevector) }   The cryptic error I am getting as follows:     Undefined symbols for architecture x86_64:   "std::basic_string, std::allocator >   vector_tostr(std::vector >)", referenced   from:         _main in main.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make: * [main] Error 1

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


What's the difference between ambient lighting,ambient illumination and ambient occlusion ? What are they? What's the difference between them?

I've heard about ambient occlusion and it looks nice, but what exactly is it?


For any sets $X$ and $Y$, $\overline{X\cup Y}= \overline{X}\cap\overline{Y}$  [Sorry, the hat should be a horizontal bar ]  Same as the last two questions - this set theory stuff just isn't my walk in the park. Last question in my proofs homework, similar to both other questions I posted, not exactly the same How would I approach it?

Prove/Disprove: For any sets $X$ and $Y$, $\overline{X\cap Y} = \bar{X}\cup\bar{Y}$  Extra question in my proofs homework, similar to another question I posted, but not exactly the same I don't think. How would I start with this?


Calculate $$\int\limits_{-2}^{0} \frac{x}{\sqrt{e^x+(x+2)^2}}dx$$   First I tried the substitution $t=x+2$ and obtained $$\int\limits_{0}^{2} \frac{t-2}{\sqrt{e^{t-2}+t^2}}dt$$ and than I thought to write it as $$\int\limits_{0}^{2} (t-2)\frac{1}{\sqrt{e^{t-2}+t^2}}dt$$ and use the fact that $$2(\sqrt{e^{t-2}+t^2})'=\frac{1}{\sqrt{e^{t-2}+t^2}} \cdot(e^{t-2}+2t)$$ Using integration by parts we get that we have to calculate (excluding some terms we know) $$\int\limits_{0}^{2} \sqrt{e^{t-2}+t^2}\cdot \frac{6e^{t-2}-2te^{t-2}+8}{(e^{t-2}+2t)^2}dt$$ which is uglier then the initial problem. Do you have any idea how to solve the problem?

$ \int_{-2}^{0} \frac{x}{\sqrt{e^x+(x+2)^2}} dx $ = -$  2.887270... $  The function has no antiderivate and there's no symmetry here to help, if you solve this I would be thankful if you would for a highschooler ^^


My question  is regarding gravity in black holes. It is said that light can’t escape the enormous gravitational force in black holes; however, is it not true that gravity is directly proportional to the object’s MASS and inversely proportional to the distance between the two objects (Newtonian, I think). If so, light has no mass. So how would light be effected by this phenomenon? Please answer with as much detail as possible

As an explanation of why a large gravitational field (such as a black hole) can bend light, I have heard that light has momentum. This is given as a solution to the problem of only massive objects being affected by gravity. However, momentum is the product of mass and velocity, so, by this definition, massless photons cannot have momentum.  How can photons have momentum?   How is this momentum defined (equations)?


Let $f$ be a function $f:\mathbb{R}\rightarrow \mathbb{R}$ such that the derivative $f'(x)$ and all its successive derivatives exist everywhere and also $f(x)f''(x)\leq 0$ for all $x\in \mathbb{R}$. Let $\alpha$ and $\beta$ be two consecutive roots of $f(x)=0$. Prove that $f'''(\gamma)=0$ for some $\gamma \in(\alpha,\beta)$  I feel that the problem may not be true  I have been able to draw the curve of such a function..

Let $f:R\rightarrow R$ be a function such that all its successive derivatives exist in all $R$ and also $f(x)f''(x)\leq 0$ everywhere.  If $\alpha$ and $\beta$ be two successive roots of $f(x)=0$.   Then prove that $f'''(x)=0$ for atleast one $\gamma \in(\alpha,\beta)$.  My Attempt:  I began by taking an example $f(x)=(x-1)(2-x)$ and let $x=1$ and $x=2$ be its two successive roots.The statement is trivially true.  Then I took the function $f(x)=e^{-x}(x-1)(2-x)$.The statement is true here also so on and so forth.  But what would be the exact proof I wonder. It appears to be a question of Rolle's Theorem.


Which is bigger between $2018^{2019}$ or $\ 2019^{2018}\ $?  When taking logs of both sides and  I get:   $2019\log(2018)\ $ and $\ 2018 \log(2019)$  I know $\log 2019\gt \log 2018$ so does this mean that $2019^{2018}$ is the biggest one? And did I do it properly?

$1, 2^{1/2}, 3^{1/3}, 4^{1/4}, 5^{1/5}, 6^{1/6} , 7^{1/7}$. I got this question in an Application of Derivatives test. I think log might be used here to compare the values, but even then the values are very close to each other and differ by less than 0.02, which makes it difficult to get some specific answer to this question. How to solve this by a definite method?


Recently I had joined to  community. Though I have receive 100 association bonus point, wrong number was shown as notification.

Don't worry! I got all my 100 reputation :) It just didn't appear that way...    The notification says +100, but why does it say +97 at the top?  Edit  I created an account on server fault, and this time it says +96. I assume it's because of the down votes on this question; however, I thought down votes aren't shown in the rep you gain.


I'm writing a request letter to my and my sister's high school but I don't how to properly say it.  I, Rebecca Smith, would like to request a copy of my and my sister, Anna Smith's Transcript of Records.  or  I,Rebecca Smith, would like to request a copy of my and my sister's, Anna Smith, Transcript of Records.  if both are wrong, please tell me a better sentence and also, if something is wrong in this question, you can correct it. Thank you very much

I want to talk to someone about the house that my wife and I own.  Saying, for example, "My wife's and my house is awesome," sounds a bit funny to me.  What's the best way to express this?  Clarification  I'm asking specifically about the grammar of multiple nouns in possessive form.  I'm particularly curious if it's possible to do this with a first-person pronoun (me).  I am capable of rephrasing this in other ways - my question is not how to express the idea, but about this particular grammatical construction, if it is even legal.


I attached an auto email sender with the file name sendemail.inc.php to be sending auto welcome once registered but it lands on spam. Is there any advise that can help?

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


Example: Let's presume one was attempting to isolate m below:  A common mistake would be: $k^2 = m^2 + n^2 \to k = m +n$  Even though: $k^2 = m^2 + n^2 \to k \neq m +n$  If you apply a square root to both sides of the equation, you will have an inequality.  Why is this true?


I' getting NullPointerException when I'm trying to read a file and fill an array with the file's data.  I'm calling the method straight from the constructor, after creating a new object in a main function. i tried, moving the br.close() line after reading some comments of similar problem people had, but had no success in that.  public void readFile (String fileName){     // try read from the file     try {         FileReader fr = new FileReader(fileName);         BufferedReader br = new BufferedReader(fr);         String str;         str = br.readLine();         String[] s = str.split(" ");         int col = Integer.parseInt(s[1]);         int row = Integer.parseInt(s[2]);         this.a = new int[col][row];         for(int i = 0; i < a.length; i++) {             str = br.readLine();             String[] s1 = str.split(" ");              if (str != null){                 for(int j = 0; j < a[0].length; j++){                     a[j][i] = Integer.parseInt(s1[j]);                                       }             }          }         if(br != null){             br.close();             fr.close();         }     }     catch(IOException ex) {         System.out.print("Error reading file\n" + ex);         System.exit(2);     } }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Since the other question  is out of date, and I can't comment on them, ill ask a new question.  What are the fastest to date 4 seater and 2 seater cars available to purchase in Grand Theft Auto V at 27th April 2015?  Edit;     Since its 2015 and most of the flagged duplicate posts haven't been   touched since 2014, I'm pretty sure my post is relevant, if not kindly   tell me how to "bump" a post for up to date answers.

For a good getaway vehicle which is the fastest 4-seater car in Grand Theft Auto 5?  As @turbo mentions in the comments below acceleration is also an important consideration.


let $f(x,y)$ be a continuous function define $ \int_{a}^{b} f(x,y) \,dx $ as a function of y $g(y)$. Is $g(y)$ continuous ? I tried to link this by Fundamental Theorem of calculus by setting $F(x,y)=  \int_{a}^{x} f(t,y) \,dt $. However I could not show it is continuous or not with respect to y. Any help would be appreciated! Edit: Is this valid ? $\lim_{y \to y_0} \int_{a}^{b} f(x,y) \,dx = \int_{a}^{b}\lim_{y \to y_0}f(x,y)=\int_{a}^{b}f(x,y_0)=g(y_o)$ .

Suppose that $f : [a, b] \times [c, d] \to\mathbb R$ is a continuous function. Let $$G(y)= \int_a^b f(x, y) \, dx$$ $$H(x)= \int_a^b f(x, y) \, dy$$  Prove that $G$  is continuous on $[c, d]$ and $H$ is continuous on $[a, b]$.  So I know that the function will be uniformly continuous on the interval but I don't know where to go from there


In an  about whether closed questions should be deleted unless improved, a painful corner case has emerged: what to do with bad questions that have good answers?  Whatever the answer to this question, I think we should do our best to enlist those users interested in a question to improve it so that it may be reopened. Arguably, answerers should be on top of the list and upvoters directly afterwards; these are users who thought the question (and/or its answers) are worth keeping.  Now, as far as I know nothing prevents this from happening:   I find a question I like. I upvote and/or answer the question. I go on with my life. Some time later, the question is closed. Some time after that, the question is deleted. If I keep an eye on my rep, now I realise something has happened. Unless I can see deleted questions, I have almost no way of finding the deleted question. Only applicable for answerers; upvoters might never know the question vanished.   So, users that thought the question worthy are kept out of the loop. Why is that? I propose we should send users who upvoted a question and/or answered it a notification when it is closed, asking them to improve the question and vote/flag for reopening if they think the question should be saved.  Aside from improving the site by keeping more good content around, this extends some courtesy towards those who invest time to answer a question even if it is not stellar. It also creates awareness of the possibility for involvement in the quality control process.  Related question:  (old, no official reaction)

I think it would really help if you get notified that a question of yours was closed.  Especially for the multi-site power user, usually (at least for me) a question is asked and then left alone for while. I rely on the network-wide inbox to tell me when someone has commented or answered, but if I don't receive any messages then I tend to assume that the question wasn't answered or even noticed. It's only when I check the question a day or two later to see what I can add do I find out it was closed.  This would be especially helpful for duplicates, where the answers you need are already there. A message to the effect of, "Closed as duplicate of question" is just like notifying me that a new answer has been added!  Unfortunately, question closures can remain unnoticed by their askers until months have passed. By then, the questions may either be too old to migrate to the correct site, or may , depending on the specific closing reason. We should notify users of these question closures so that they can improve them and learn from their mistakes.  Could closed questions get added to the inbox?


EDIT: a solution is in this answer:   When using a dict:  d = dict() d['param1'] = 17 d['param2'] = 3   it's easy to print it with  print json.dumps(d). When using an object / class:  class z:      pass z.param1 = 17 z.param2 = 3   I can't manage to print all the attributes of z, neither with print json.dumps(z), nor with print z. How to do it?    Sidenote but important: why do I want to use a class / object to store parameters, when it would be logical to use a dict? Because z.param1 is much shorter and handy to write than z['param1'], especially with my (french) keyword [, ], 'are quit long to write because ALT+GR+5 (let's say 2 seconds instead of 0.5, but this really matters when you have a long code with many variables)

So what I'm looking for here is something like PHP's  function.  This is so I can debug my scripts by seeing what's the state of the object in question.


Based on my understanding when doing quantum mechanics we deal with a small set of mathematical objects: namely scalars, kets, bras, and operators. But then in the Schrodinger equation we have this time-derivative thing which looks an awful lot like an operator, but from what I've been told it's not considered an operator. My question, then, is what exactly is a time-derivative in quantum mechanics and why is it not considered an operator.  Edit: The issue that this is a possible duplicate of threads linked in the comments below has been brought up. I saw the threads linked below before I posted this question, and I thought this question was sufficiently different because I'm not interested in a time-operator per se, but rather what $\partial_t$ is mathematically. I've been told it's not an operator in the same way the momentum operator is, but it does look like an operator that scales the state vector proportional to its energy.

In the time-dependent Schrodinger equation, $ H\Psi = i\hbar\frac{\partial}{\partial t}\Psi,$  the Hamiltonian operator is given by  $$\displaystyle H = -\frac{\hbar^2}{2m}\nabla^2+V.$$  Why can't we consider $\displaystyle i\hbar\frac{\partial}{\partial t}$ as an operator for the Hamiltonian as well? My answer (which I am not sure about) is the following:   $\displaystyle H\Psi = i\hbar\frac{\partial}{\partial t}\Psi$ is not an equation for defining $H$. This situation is similar to $\displaystyle F=ma$. Newton's second law is not an equation for defining $F$; $F$ must be provided independently.   Is my reasoning (and the analogy) correct, or is the answer deeper than that?


As we all know GPU is a sleeping beast. And we are also familiar with Intel's Turbo Boost technology which is really great.  But, Intel's Turbo Boost technology works only on CPU by overclocking CPU automatically when there is an overload.  I was wondering, it would be great if we can use GPU automatically to support CPU whenever there is an overload.  I don't know if there is research going on this topic cause I found nothing (may be I haven't used proper keywords). So, please let me know if it is possible.

I know what a CPU is(I think). It's the thing who's speed is measured in GigaHertz(these days).  However, you hear a lot about a GPU, and letting the GPU take over, not letting the CPU but the GPU do it, GPU-based rendering, etc...  What is this GPU anyway? How can I access it and use it to my advantage? What am I missing out on here?


Let $f$ be a continuous mapping of a compact metric space $(X, d)$ onto a Hausdorff space $(Y, \tau_1)$.  If $d$ is a metric on $X$, how to show that  $$d_1(y_1, y_2) := \inf\{d(a, b) : a \in f^{-1}(y_1)\text{ and }b \in f^{−1}(y_2)\}$$ is a metric on Y?  I can see that it is never $0$ when $y_1$ is not equal to $y_2$. But how should I go about showing that it satisfies the triangle inequality?  I am actually reading the following page from a book.

Let $f$ be a continuous mapping of a compact metric space $(X, d)$ onto a Hausdorff space $(Y, \tau_1)$. Then $(Y, \tau_1)$ is compact and metrizable.   In one proof the following metric is constructed:  $d_1(y_1, y_2) = inf\{d(a, b) : a \in f^{-1}\{y_1\},\ b \in f^{-1}\{y_2\}\}$, for all $y_1$ and $y_2$ in $Y$.  I'm thinking about how to prove that triangle inequality holds for $d_1$, s.t. $d_1(x, z) \leq d_1(x, y) + d_1(y, z)$  And how about the case when triangle inequality does not hold?    Update: @daniel-schepler suggested to use metric $d_1(x, y) = inf\{d(x^*, x_1) + d(y_1, x_2) + \cdots + d(y_{n-1}, x_n) + d(y_n, y^*)\}$ where $f(x^*) = x$, $f(y^*) = y$, and $f(x_i) = f(y_i)$ for each $i$.  Now we need to prove 3 property of metric: positivity, symmetry and triangle inequality. This is my sketch:   Positivity. Chose two points $x,y \in Y$ s.t. $x \neq y$. Singleton sets $\{x\}$ and $\{y\}$ are disjoint closed sets by Hausdorfness of $Y$ and their preimages are also disjoint closed in $X$ by continuity of $f$. $X$ is compact metric space by hypothesis and therefore a normal space. In normal space every two disjoint closed sets have disjoint open neighborhoods. Let $f^{-1}(x) \subseteq U$ and $f^{-1}(y) \subseteq V$ s.t. $U,V$ are open and $U \cap V = \varnothing$. Therefore there exists an $\varepsilon > 0$, s.t. $x^* \in B_\varepsilon(x^*) \subseteq U$ and $y^* \in B_\varepsilon(y^*) \subseteq U$ and distance between any two closed sets is strictly positive and $d_1$ is positive and zero iff $x = y$. Symmetry. Clearly $d_1$ is symmetric. Triangle inequality. For triangle inequality we can show that in the "worst" case $d_1(x, z) = d_1(x,y) + d_1(y, z)$.


I will be needing to decide if I should roll my 401k from a previous job into the 401k at my current job.  Are some companies which the employer has a 401k through much less appealing than others, or are they all similar?  I'm wondering how likely it would be that the rate of return drastically decreases after rolling over into a similar fund with a different provider.

Are there any valid reasons to not rollover a former 401(k) when changing jobs?  I have several little ones that I never quite got around to rolling together - with an upcoming job change, should they all be combined into my new employer's retirement plan?  If not, what else might be considered?


Which of the two is more correct, when one wants to make sure whether he/she is a subject of the statement (ex. the sentence is addressed at two people, and one of those two people wants to make sure, whether the sentence is addressed at him/her).  You have beautiful eyes. Me?  or  You have beautiful eyes. I?

With the enthusiastic question of "Who wants ice-cream?", what is the more correct response?         (Not) I.   (Not) me.      Neither response is a sentence. The first response of "(not) I" sounds stuffy, like it should be followed with an indignant sniff. The second sounds like American idiom and acceptable for casual speech.    What do you say?


I would like to use start arguments when launching my program. Eg:  c:\my.exe -arg1   Like some programs use arguments like:  -silent   If searched for information but could not find anything to help. Thanks!

When building console applications that take parameters, you can use the arguments passed to Main(string[] args).   In the past I've simply indexed/looped that array and done a few regular expressions to extract the values. However, when the commands get more complicated, the parsing can get pretty ugly.    So I'm interested in:   Libraries that you use Patterns that you use   Assume the commands always adhere to common standards such as .


This is an issue that I run into quite frequently, and which I would love to know how to work through.   I'm writing a report/query that is simple enough, but when run, returns rows with duplicate values. I know the reason these "duplicates" are returned is because there is a column that has differing data between the two rows, but say I only want to see 1 row returned with a specific ID number. It doesn't matter which row is selected, just that only 1 row is returned for each ID_NUM.   Simplified example of returned data:  ID_NUM  |  PHASE  |  DATE  |  NOTE   ---------------------------------- 30329   |  Phase1  | 1-1-20 | example note 30329   |  null    | 1-1-20 | example note 21928   |  Phase1  | 1-2-20 | another note 21928   |  Phase1  | 4-3-19 | another note   What I have tried:   SELECT DISTINCT - returns same result as simple SELECT SELECT DISTINCT MIN(ID_NUM) - still returns duplicate ID_NUM values, I'm guessing because they are the same, there is no min. GROUP BY ID_NUM - requires that I include every column in the group by, and still returns same result.   Actual Example: While the above is a simplified example, the below shows my actual query. cases.casenum is the field/column that I need only 1 row returned for each unique value. This is a sybase database, which follows mssql/t-sql syntax.   SELECT cases.casenum, cases.case_date_5,  cases.class,  user_tab6_data.trial_phase,  user_tab6_data.maximizer_completed,  user_tab6_data.maximizer_scheduled,  cases.case_title,  cases.open_status, cases.case_date_9,  user_tab6_data.maximizer_necessary,  cases.staff_1,  cases.staff_8,  user_tab6_data.county_of_suit,  insurance.how_settled,  insurance.policy_type,  insurance.date_settled,  user_tab6_data.value_set_date,  user_tab6_data.status_note,  user_tab6_data.minimum_value  FROM cases, user_tab6_data, insurance  WHERE (cases.casenum = user_tab6_data.case_id)  AND (cases.casenum = insurance.case_num)  AND (cases.class like 'A' OR cases.class like 'B' OR cases.class like 'C' OR cases.class like 'D' OR cases.class like 'E' OR cases.class like 'F' OR cases.class like 'G' OR cases.class like 'H' OR cases.class like 'I' OR user_tab6_data.trial_phase like 'Phase 1' OR cases.case_date_5 is not NULL )  AND insurance.policy_type = 'Liability'  AND cases.open_status = 'O'  AND cases.case_date_9 is not NULL

I often need to select a number of rows from each group in a result set.  For example, I might want to list the 'n' highest or lowest recent order values per customer.  In more complex cases, the number of rows to list might vary per group (defined by an attribute of the grouping/parent record). This part is definitely optional/for extra credit and not intended to dissuade people from answering.  What are the main options for solving these types of problems in SQL Server 2005 and later? What are the main advantages and disadvantages of each method?  AdventureWorks examples (for clarity, optional)   List the five most recent recent transaction dates and IDs from the TransactionHistory table, for each product that starts with a letter from M to R inclusive. Same again, but with n history lines per product, where n is five times the DaysToManufacture Product attribute. Same, for the special case where exactly one history line per product is required (the single most recent entry by TransactionDate, tie-break on TransactionID.


Prove that if all edge-costs are different, then there is only one cheapest tree (minimum spanning tree or MST). (Use contradiction and make sure to keep track of the costs of the different trees involved.)  Here is my attempt: Proof by contradiction Assume that there is more than one cheapest tree, A and B. Assume that tree A and B are different and have the same weight. Let says that the smallest difference in edge cost between A and B is 1. Now, change one of the random edge (not contain in B) in A by half. This does not affect the path or order. However, A is cheaper than B now. This is contradiction. Thus, the original statement still hold. Is this the correct logic? How do I write it out formally?

Show that there's a unique minimum spanning tree (MST) in case the edges' weights are pairwise different $(w(e)\neq w(f) \text{ for } e\neq f)$.   I thought that the proof can be done for example by contradiction, saying that we have $2$ different MST meaning that somewhere was possible to pick from more edges, so $w(e) = w(f)$ for $e\neq f$, contradiction. Apparently this is not correct.   How would you show that a graph has a unique MST if all edges have distinct weights?


Having recently migrated from Vista 32bit to Windows 7 64bit, one of my programs now requires admin rights.  I use a rather exotic text editor (Crimson Editor). Although not designed for Vist/Win7 it worked well with Vista. But under Windows 7, the program executable gets this UAC shield added to its icon (even though the "Run as administrator" flag in the compatibility tab is not set) and prompts for elevation whenever I run it.  How does Win7 determine that this notepad-like application needs admin rights? How can I override this false heuristic?

Is there any way that I can force a program that normally requires administrator privileges (via UAC) to run without them? (ie: no UAC prompt and no system-wide access.)  Added: Without modifying the executable itself.    In spite of James's answer, I have found a few ways that it can almost be done:   By modifying the executable I can remove the trustInfo entry from the manifest (or the manifest entirely, so I can use an external one), allowing the program to start without UAC. Unfortunately this modifies the executable, so it exits shortly after due to an internal checksum test. By using Process Explorer I can launch it as a Limited User. However this seems to limit it significantly more than I would like (it runs like Protected Mode IE and so can access significantly less than what my standard un-elevated user can).


The only thing I could think was to use the Cauchy Theorem. So I know that exists a $h \in G$ such that $o(h) = p$. Also I can consider the subgroup $H = <h>$ that all the elements have the same property and $|H|=p$.   I think that $h \in C(G)$. But if I take $g \in G$, I'm not being able to prove that $g*h*g^{-1} = h$. To take an example I thought of $\mathbb{D}_4$, where $|\mathbb{D}_4|=8=2^3$ and I can see there that $r^2 \in \mathbb{D}_4$ has order 2 and $r^2 \in C(\mathbb{D}_4)$

I know this is a very common corollary of the class equation. And I know how to do it by using class equation.   But can you do it bu using group action, maybe find a nice set for G to act on?


As far as I am aware, R gives the output of a logit model, of the form: glm.logit=glm(model,binomial(),Data.df)  as the log-odds ratio. I would like to obtain the distributional function $\frac{exp(\beta'x_i)}{1+exp(\beta'x_i)}$ from my model

I'm trying to use the command predict() to be able to obtain my $x_i\hat{\beta}$ in R predict(logitmodel,type='response')  As long as I'm not specifying any coefficients for the function to predict, does it simply just give me $x_i\hat{\beta}$ or does it return $y_i$? What if I have specified a logit distribution, say logitmodel=glm(y,binomial(),data)  Does it then return the transformed $x_i\hat{\beta}$, i.e. $F(x_i\hat{\beta})$? Which for a logistitic distribution is, $\frac{exp(\hat{\beta}'x_i)}{1+exp\hat{(\beta}'x_i)}$.


I am writing a list sorting extension method. My input is the list and a string with property name and sort direction. This string can have multiple properties like so: "Name ASC, Date DESC" etc.  I already implemented the string parsing and used reflection to get the property itself from the string, but what I am stuck on now is how do I dynamically chain the orderby methods.  something like: _list.orderBy(x=>x.prop1).thenBy(x=>x.prop2) etc.  Is there any way to build this dynamically?

I found an example in the  for Dynamic LINQ that allows you to use a sql-like string (e.g. OrderBy("Name, Age DESC")) for ordering. Unfortunately, the method included only works on IQueryable<T>. Is there any way to get this functionality on IEnumerable<T>?


I wrote the word "old" on my passport main page, thinking it was my old outdated passport. (I looked at the issued date and thought it was the expired date.) The added word doesn't overlap with any passport information. It's on a blank part of the page. However I'm wondering if I should now get a new passport? Will I be denied entry because of that word written in? Thanks!

There are many times when I'd like to jot a short note in my passport. For example, the business purpose of an entry into a country -- or for countries with automatic passport control and when I don't get a stamp, I'd like to notate my entry and departure.   Can one write in one's own passport? I wouldn't of course write over any stamps, but I might write near them. Or could I use a back page as entry and departure dates?  Yes, I could use a separate piece of paper or a computer file, but having them all in my passport would be handy -- especially when a border officer asks where I've been and why.   And if the laws vary by country, can you note this in your answer? Would it matter if my notations were in ink or pencil? These aren't doodles but business-like annotations and lists.


How to extend Ubuntu installation partition size? I have accidentally given Ubuntu less hard disk size then I know I need. I need more size because I do web development and often use heavy IDE like PyCharm. I have an extra free 22 GB partition and want to add it to the Ubuntu partition. Is there any way to do this? I have previously tried gparted but on boot Ubuntu primary partition is not resizing. How can I do this ? here is snapshot of partitions:

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


Given $R>0 , M>0$ Let $f(z)$ be a entire function such as $|f(z)|\leq M|z|^m$ for evey z such as $|z|>R$. Show that $f(z)$ is a polynomial of degree m or lower.

Suppose that an entire function $f(z)$ satisfies $\left|f(z)\right|\leq k\left|z\right|^n$ for sufficiently large $\left|z\right|$, where $n\in\mathbb{Z^+}$ and $k>0$ is constant. Show that $f$ is a polynomial of degree at most $n$.


I have 3 accounts in my pc, i would like as the admin of the pc to limit the internet speed (upload/download) for the other 2 accounts, is there a way to do this?

I am getting complaints that I consume lots of internet bandwidth.  Is there any software that can limit internet bandwidth on my computer from my own computer? I use Firefox as browser and use bittorrent and download software from software center.  (Is there also a way to monitor it?)


To establish a LAMP stack with Ubuntu one could execute in an Ubuntu command line:  sudo apt-get install lamp-server^ -y   The caret indicated it's not a common installation command but rather a command that encapsulates a set of commands.  Where can one learn the structure of caret sign command sets as in install lamp-server^ ?

Tasksel or plain Apt?  In the past I've always used tasksel to install so-called "tasks". It seems, however, that this has been integrated in APT:  apt-cache dumpavail | grep ^Task [...] snip Task: lamp-server [...]   and that I can install such "tasks" by appending a caret (^) to it, like this:  sudo apt-get install lamp-server^   Is this equivalent to the following?  sudo tasksel install lamp-server   And which is preferred?  Metapackages  Additionally, how do metapackages come into play here? Some tasks seem not to be a metapackage while others are:  apt-cache show lamp-server N: Unable to locate package lamp-server  apt-cache show kubuntu-desktop Package: kubuntu-desktop [...] Task: kubuntu-desktop     So, using the last example, what is the difference between the following three possible ways to install?   sudo apt-get install kubuntu-desktop sudo apt-get install kubuntu-desktop^ sudo tasksel install kubuntu-desktop


how to make dual boot windows 8 and UBUNTU in ACER ASPIRE E1-572.Please help me ...I have usb bootable with Universal-USB-Installer-1.9.4.9 and when try to install it in system ,it halts.. plz help me to resolve it.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


Good Morning,  I have a scientific article to discuss and present in class, the article is about the positif benefit of the standard ISO 9001 on medium and large companies. By doing a multiple regression analysis they have the table below:   For the intercept of all the variable (except the last one) they have a p-value greater than alpha, so we should reject the null hypothesis thus the model should not have an intercept,  But in scientific article they put the models as follow and add the intercept in each one even if the p-value is greater than alpha.    Can we accept the intercept even if it p-value is greater than alpha?  Thank you very much for you help

I am running linear regression models and wondering what the conditions are for removing the intercept term.   In comparing results from two different regressions where one has the intercept and the other does not, I notice that the $R^2$ of the function without the intercept is much higher. Are there certain conditions or assumptions I should be following to make sure the removal of the intercept term is valid?


Prove that the following closures of the following subsets of the $[0,1]\times [0,1]$ are true:  (a) $B=\left\{(1-\frac{1}{n})\times \frac{1}{2}|\ n \in Z_{+})\right\}$ has $Cl(B)= B\cup \left\{1\times 0\right\}$  (b) $C=\left\{x\times 0\ |\ 0<x<1\right\}$ has $Cl(C)= C\cup [0,1)\times 1$  (c) $D = \left\{x\times \frac{1}{2}\ |\ 0<x<1\right\}$ has $Cl(D) = D\cup (0,1]\times 0\cup [0,1)\times 1$  (d) $E = \left\{\frac{1}{2}\times y\ |\ 0<y<1\right\}$ has $Cl(E) = E\cup \left\{\frac{1}{2}\times 0, \frac{1}{2}\times 1\right\}$  I have thought of the proof for a while, but I couldn't get how we can obtain the extra points in those closure formulas above. Can someone please help me with this part?

I need to find the closure of these sets on the ordered square: $$A = \{(1/n)\times 0 | n\in \mathbb{Z}_+\}$$ $$B = \{(1-1/n)\times \frac{1}{2}| n\in \mathbb{Z}_+\}$$ $$C = \{x\times 0 | 0<x<1\}$$ $$D = \{x\times \frac{1}{2}| 0<x<1\}$$ $$E = \{\frac{1}{2}\times y | 0<y<1\}$$ I know that the closure is just the set itself united with its limit points. For $A$, the set of limit points, I imagine, are $\{<1,0>\}$, that is, the $x$ coordinate is $1$ and the $y$ is $0$. But  is says the reverse. What am I getting wrong? Following the same reasoning, $B' = \{<1,\frac{1}{2}>\}$ $C' = \{<0,0>,<0,1>\}$ What am I doing wrong?


Let $X>0$ but do NOT assume $E(1/X)< \infty$. Show that   $$\lim_{y\downarrow 0} yE(1/X ; X>y)=0$$.   I tried to use Jensen Inequality but this is not working.  There was another problem which was $$\lim_{y\rightarrow \infty} yE(1/X ; X>y)=0$$  It was easy since $\lim_{y\rightarrow \infty} yE(1/X ; X>y)< \lim_{y\rightarrow \infty} P(X>y)=0$. But this trick not working on the above problem.  Need Help!!

Let $(\Omega,\mathcal{F},\mathbb{P})$ be a probability space, and let $X$ be a nonnegative random defined on this space. For any $A\in \mathcal{F}$, let $\mathbb{E}[X;A]:=\mathbb{E}[X\mathbb{1}_{A}]$, where $\mathbb{1}_{A}$ denotes the indicator random variable on $A$. Without assuming $\mathbb{E}\left[\frac{1}{X}\right]<\infty$, show that  \begin{eqnarray} \lim\limits_{y\downarrow 0} ~~y~\mathbb{E}\left[\frac{1}{X};X>y\right]=0. \end{eqnarray} Any initial ideas will be greatly appreciated.


EB at higher levels makes multiple beams. Can you choose targets after each beam, move in between them, and use bonus actions as well? Case in point, level 5 Warlock casts EB. Decides to target Alice first, hits first beam on Alice, and downs her. Warlock then moves 10ft, casts Hex on Bob with a bonus action, and hits second beam on Bob as well. Is this legal?

Similar to  I am curious about whether RAW you can use a bonus action between a spells attacks.   Unlike in the case of movement, bonus actions do not have a section specifying that they can occur in between parts of a particular type of action. The rules section on  reads (PHB, 189):     You choose when to take a bonus action during your turn, unless the bonus action’s timing is specified, [...]   The answer to this question is very relevant to Warlocks who might use Eldritch Blast against the target of their Hex but slay the target before every blast of Eldritch Blast has been used. The Warlock would then want to target a new creature with the remaining blasts (see  on changing targets during a spell) but first use their Bonus Action to move Hex to the new target.  If the particular bonus action is relevant to your answer, you can use the moving of Hex to a new target as the use-case - but I would also appreciate a general understanding of when, if ever, bonus actions can split up a spell's attack.    Related:


Well I do not remember my id and password as I never used it and all of sudden the activation lock pops up I have an I phone 6 plus i searched every where now I need some help.

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


My friend has installed Ubuntu but I know nothing about the system and she is no longer around.  How do I install an application that would allow me to view things on Youtube,Netflix or things like tennis streaming on the net or in general viewing anything video wise? It keeps asking me for plug-ins and then won't let me to download anything. Also, can I download Microsoft Internet Explorer to replace Mozilla Firefox?  Any help would be appreciated.

I would like to install the restricted extras package, which I didn't select during the install. How can I do that?        is a meta-package that installs:         Support for MP3 and unencrypted DVD playback   Microsoft TrueType core fonts   Flash plugin   codecs for common audio and video files


Is there an appropriate place to suggest new Stack Exchange based sites, perhaps a place for them to be voted upon?  I wish there was a Stack Exchange site for Aviation (both real-life and simulated).

I have an idea or subject that should have a Q&A, and want to propose a new site. How can I do this?  Related:


I want to write protect and unprotect it to keep files from being formatted whenever people use it in a windows PC. I don't want people to delete my school work and I bring this to school and use it with a live CD of Lubuntu 12.04 in my moms laptop. People have got into my backpack while I went to the bathroom and plugged it into a PC (the flash drive had ex4 file format) and when it asked to format it they clicked yes assuming nothing will be deleted.

Can you help me? I want to make my flashdisk write protected. So no one can format my flashdisk because the data inside the flashdisk is important.


I would like to know more about this command:  sudo apt-get dist-upgrade

I was wondering why upgrade sometimes doesn't want to upgrade certain parts of the system, while dist-upgrade does. Here's an example after running apt-get upgrade:  apt-get upgrade:  rimmer@rimmer-Lenovo-IdeaPad-S10-2:~$ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done The following packages have been kept back:   linux-generic linux-headers-generic linux-image-generic 0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.   versus apt-get dist-upgrade:  rimmer@rimmer-Lenovo-IdeaPad-S10-2:~$ sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following NEW packages will be installed:   linux-headers-3.0.0-13 linux-headers-3.0.0-13-generic   linux-image-3.0.0-13-generic The following packages will be upgraded:   linux-generic linux-headers-generic linux-image-generic 3 upgraded, 3 newly installed, 0 to remove and 0 not upgraded. Need to get 48.5 MB of archives. After this operation, 215 MB of additional disk space will be used. Do you want to continue [Y/n]?   In other words, why can't this be performed by upgrade?


In JSF, I would like to have a date helper attached to an h:inputText tag. The input text could either be a string or a date. I would just like something that would help the user input a correct date if thats what they are choosing.

Is there any ready-to-use component for JSF that allows to chose the Date + the Time of an event? All components I know only allow for date. adding time manually is tedious.


A while ago I asked my boss to write me a letter for a specific school, and he responded asking me if I could draft it, and he showed me the edits and final draft before sending it out. Now I asked him to send me letters for some other schools too and he agreed, I'm assuming he'll just use the same letter. But I just now realized that one of the schools explicitly states that I am to not be involved in the letter in any way. What should I do? Is this a common thing? Should I just let it slide? How seriously do schools take this situation anyways? and from what I've seen from the letter I drafted it doesn't look like any sentences overlap with anything in my personal statement. I would also feel bad asking him to rewrite a letter thats already perfectly well written. At the same time I just feel, well, kinda bad. Idk, not saying anything to my boss about the school letter guidelines doesn't sit right with me.

If a student needs a reference letter for graduate admissions or that sort of thing, some profs will ask the student to write a reference letter for themself before sending it off to the prof for minor edits and finalization. This seems to be a somewhat common practice given that some graduate schools ask for several letters of recommendation even when it is not reasonable for the student to have developed deep connections with that many professors, and that most professors are just too busy to write quality letters for all the students that ask them to.  Is it acceptable to write most of the reference letter and have the prof make minor edits? Do academic institutions frown upon this practice? Would it be considered an academic offense if a student wrote a reference letter for themselves and had a prof sign it?


If I run the assoc command-line utility for an extension, it shows the file type/description for the extension I set in the registry. But if I go to Control Panel -> Default Programs - Set Associations then I see a different description and default program.  It used to be that setting the two keys:   HKCR\.ext (default) = Identifier Identifier (default) = "File Description"   \DefaultIcon (default) = Some icon \Shell\Open\Command (default) = Some editor    But now it appears there is an override elsewhere, which is what gets displayed in the Default Programs listing.  My question is, where i this overridden association information stored? I'm assuming it is in the registry, but I don't see it in the keys I expect it to be. I believe this was changed in the Vista time frame, but it may have been in XP too.  Update: Since there is some confusion, do the following test. Rename a file to some new extension. Create an association in the registry keys mentioned above. Then right click on the file, Open With and select a different program (checking to make it the default). Now check the registry. It is unchanged, but now the file is associated with a different description, icon and default program.

After installing Adobe PDF reader, it opens files with the .PDF file extension. Ones' default web browser opens .html files and notepad opens .txt files, etc.  Where exactly in the registry are these filetype - program associations stored in the registry?   In other words, how does Windows know with which software/program it must open a certain file(type)?


Code: let myClassFellows=[ ['Noor',1],['Jawaria',2]]; console.log(myClassFellows[0]);

I have a one-dimensional array of strings in JavaScript that I'd like to turn into a comma-separated list. Is there a simple way in garden-variety JavaScript (or jQuery) to turn that into a comma-separated list? (I know how to iterate through the array and build the string myself by concatenation if that's the only way.)


This remains an old concern of mine, and something I have never been able to wrap my head around. For instance, I have never understood why using your own sentences that you have crafted without citing yourself counts as plagiarism. That being said- I am currently working on a paper and describing the data section, and the dataset is common enough that I see myself using it in the future for another paper. The efficient thing to do here would be to use the same description for both papers. This would, however, be considered as plagiarism. How can one reasonably be accused of plagiarism here? The data section is ancillary to both papers, is not based on a 'novel' idea, but is purely descriptive. To describe the data again using different words just for the sake of not plagiarizing from myself seems to be waste of time. Now imagine this happening to thousands of researchers over many years. It seems to me that productive hours that are wasted for such a strange, and honestly, unnecessary formality. Am I missing something here?

I am planning to write several papers exploring various aspects of the same scientific question. Each of these papers must have an introduction which motivates it and explains the relationship between the problem and what others have studied in the past. It would be fantastic if I could simply copy-and-paste the same introduction, or, at least, 90% of it.  This seems to me to be ethically unproblematic. After all, I need to say the exact same things every time, and I certainly don't mind the self-plagiarism. Am I hurting the reader in any way? I suppose I might be, if the reader desired an introduction which consists of original material, but that is an odd desire, isn't it? Its the research, the stuff that follows the intro, that is original. Sadly, I have gotten wind that the majority of the research community apparently does not agree with the sentiments expressed in the previous paragraph. This leads me here to ask a series of related questions:  To what extent is self-plagiarism in non-technical bits considered acceptable? I often see authors recycle paragraphs but I have never seen anyone cut-and-paste the entire section outright. I'd be particularly interested in learning whether norms on this vary across different scientific communities.  How often do scholars find themselves trying to same the same thing in different words to avoid self-plagiarism?  Supposing I insert a sentence to the effect of: "The introductory section 1.2 is taken verbatim from the author's earlier paper [1]." How likely are journal editors and reviewers to complain about this?   By the way, I am fairly certain they would be very likely to complain about a sentence to the effect of "We refer the reader to [1] for motivation to study this problem and a discussion of its relation to prior work."


Some of my folders are highlighted in green   What does the green highlighting means? How can I remove the highlight and make them look similar to others?  terminal : gnome-terminal.  system : Ubuntu 16.04

What do the different colours in Ubuntu's ls command mean? For example, when I type the ls command in one of my folders, I get one of the files in light green, the other (which is a folder) in blue with green highlighting.   What do those colours mean, and there is any manual about all the colours?


I've always said, for example, "Achilles' shield" as "Achilles-es shield". However, I've noticed others don't pronounce the plural, simply just keep it as "Achilles". Should you pronounce the '-es', or is it not necessary?

Is there a rule regarding the pronunciation (or lack of) of the apostrophe? I have seen this on tv:     "Enchantress' wrath" pronounced as "Echantresses wrath"      "Gus' schedule" pronounced as "Guses schedule"   According to that the following examples should be pronounced the same:     Jones's car as "Joneses car"      Jones' car as "Joneses car"   Just to make it clear, this is not a question regarding the use of the apostrophe, it's one regarding the apostrophe's pronunciation.


I'm having a problem with the SM Bus controller. it appears with an explanation mark in Device manager. I would install the driver manually but i'm not sure which is the right one. I don't know what device is that actually. How can i know? It seems like it's a known problem but i didn't find a good answer for my question.  I'm using Windows 8.1 64-bit:  Gigabyte Z97-d3h MoBo.  Intel CPU 4790k.  Kingston HyperX 16GB RAM.  MSI gtx970 4G GPU.  Kingston 3TB HDD.  Samsung Evo 250GB SSD.  EVGA 650W Gold PSU.

I reinstalled windows on a new machine and the drivers are not present for the product network card.   When in device manager all I get is the question mark and I am unable to figure out the actual name of the vendor or model of the card. This is making my search to find the correct driver hard.   Anyone know how I to find out more about the hardware that does not have drivers?


New theories must in some approximation must reduce to older approximately correct theories. In what approximation exactly does the angular momentum quantization condition from Schroedinger's equation reduce to that of Bohr? According to wave mechanics, $$L=\sqrt{\langle\hat{L}^2\rangle}=\sqrt{\ell(\ell+1)}\hbar$$ According to Bohr model,$$L=n\hbar.$$ I tried equating the two and expected that Bohr model will give one of the subshells, but got impossible relations between $n$ and $\ell$. In what mathematical approximation will the two $L$s coincide?

I came across a discussion of atomic Rydberg states, which appear to be defined as having their outer electron in a highly excited state. In the same text, it mentioned that these excited electrons could be modeled rather well by the Bohr model.  I don't see why this should be the case. The Bohr model treats the electron as a circularly orbiting body around the nucleus, whereas the electron cloud model seems to produce orbits which are highly anisotropic. In my understanding, the Bohr model also proposes electron orbits with fixed radii.  I don't see how this can be deduced from taking the limit of large $n$. How is Bohr's model related to electron cloud models via the correspondence principle?  On a further side note, I am curious why the different orbital energy splitting as a result of atomic effects (Fine structure, Hyperfine etc) which causes non-degenerate orbitals wrt $\ell$ is ignored for high $n$, where orbital energies are only dependent on the principal quantum number.  References:   Randall G. Hulet and Daniel Kleppner, Rydberg Atoms in "Circular" States, Phys. Rev. Lett. 51 (1983) 1430  R.J. Brecha, G. Raithel, C. Wagner, H. Walther,  Circular Rydberg states with very large n,


I tried to expand everything into a power series but I'm not sure how to get the answer out of that. Every corresponding product seems to be a coefficient of $1/z$

Consider the function,   $$f(z) = \frac{\sin(\frac{1}{z})}{z^2+a^2} \text{ where } a>0$$  I know that this has two simple poles at $z = \pm ia$ and an essential singularity at $z = 0$ because of $\sin(\frac{1}{z})$ in the numerator. For $\operatorname{Res}(f,ia)$ and $\operatorname{Res}(f,-ia)$, it is relatively easy to find the these values using   $$a_{-1} = \lim_{z\rightarrow z_0} ((z-z_0)f(z))$$  However, I am finding it much more difficult to determine the residue at an essential singularity.  From what I have read, it seems that the easiest way to determine the residue is to explicitly find the Laurent Expansion and then get it from there. Would this be the case for this function as well?


I want to know a user friendly company email such as:   support@example.com | Doesn't address sales/business enquiries business@example.com | Too specific  billing@example.com | Too specific hello@example.com | Human-like and friendly (probably not usable for things like email confirmation emails & notifications) myname@example.com | Too many emails to my personal email.   Is it possible to combine all the above in a single email or would I have to use multiple emails? (obviously my own personal company email but besides that)  Notes:   I need to send user registration confirmation emails, notifications, support emails, sales emails, business partnership emails, marketing emails + more   What emails would you suggest and which ones for what?

I've noticed an increasing trend among companies (especially smaller companies and agencies) to have a "hello@domain.com" email address as the initial point of contact. My understanding of this is that it helps to promote a friendly, human side to the address.  My question is - has there been any research done to back this up? Has anyone shown that this makes people more comfortable (and therefore more likely to get in touch), or is it simply another fad?


I'm trying to work my way through the following problem.  Let $n$ be a natural number, $p$ a prime, and $d$ a divisor of $(n + 1)^p - n^p$. Show that $d \equiv 1 \textrm{ (mod } p \textrm{)}$.  I'm not sure where to start on this. I can see $(n + 1)^p - n^p \equiv 1 \textrm{ (mod } p)$ and ofcourse $(n + 1)^p - n^p \equiv 0 \textrm{ (mod } d)$. So definitely $p, d$ are coprime. Also $(n + 1)^p - n^p \equiv 1 \textrm{ (mod } n)$. This feels like it shouldn't be too hard a problem but I'm not entirely sure what I'm missing.

Attempted Proof:  Let $S = \{k: n^k-1 \equiv 0 \pmod{p}, k\in \mathbb{N}\}$. Minimal element $r$ exists by Well-Ordering. we show $r=q$.  We note, $\gcd(p,n)=1$, otherwise $p \mid n^q-1 \implies p \mid 1$.  We have:  $n \not\equiv 1 \pmod{p}\implies n^2 \not\equiv n \pmod{p}$ ; [since $p , n$ are coprime and  $p$ prime ]. Now, for any $0<j< i < r,$  $n^i \equiv n^j \pmod{p} \implies n^j(n^{i-j}-1) \equiv 0 \pmod{p} \implies (n^{i-j}-1) \equiv 0 \pmod{p} $, contradicting the minimality of $r$.   Now, we proceed to show that, all elements of $S$ are integral multiples of $r$. (Claim 1)  We have, $n^{tr} \equiv 1 \pmod{p} \implies n^{tr+l} \equiv n^l \pmod{p} $, for $0\leq l <r$. Now, for any two such $l$, say $c$ and $d$, with $d<c$ ,   $n^{tr+c} \equiv n^{tr+d} \pmod{p} \implies n^{tr+d}(n^{c-d}-1) \equiv 0 \pmod{p}$, which again contradicts our assumption that $r$ is the least element of $S$. Hence, Claim 1 is established. But, it implies that $q$ is composite (an impossibility); hence $r$ must be equal to $q$ .   Finally, by Fermat's Little Theorem, we have $n^{p-1} \equiv 1 \pmod{p}$ [ it holds, since $\gcd (p, n) =1$].   Therefore, $p-1$ must be an integral multiple of $q$, i.e. $q \mid p-1$.   PS: I am aware of the duplicates, but I want my solution checked. Thank you.


How do we find Maclaurin Series of $e^{t^2/2}$? I see one way on one book to do it is applying the fact that $e^x = \sum_{n=0}^{\infty}\frac{x^n}{n!}$, then $$e^{t^2/2} = \sum_{n=0}^{\infty}\frac{(\frac{1}{2}t^2)^n}{n!}$$ But I cannot really understand why can we directly subsitute $\frac{1}{2}t^2$ into $e^x$ equation since it is not a constant. May someone explain to me? I am really confused.

I have two questions:  A. I know the taylor series for $\arctan(x)$ and for $e^x$. How do I find the series for $\arctan(x)\cdot e^x$ ?  B. Say I want to find the series for $\arctan(g(x))$, do I just subtitue $x$ with $g(x)$, Or do I have to start the process of finding the series from the beginning?  Thanks!


Whenever I move the camera/light around I get these harsh shading on these polygons. Any ideas?

While rendering a mesh with smooth shading on, I get a dark region/shadow on certain faces. The effect is more evident when smooth shading is applied to a mesh containing ngons, with the ngons turning black when rendered.   The blackening effect is visible in the viewport too.  How can I solve this problem?


java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Boolean com.pregbodan.preglogistics.DBHelper.checkusername(java.lang.String)' on a null object reference i keep getting this error on this page     reg_btn.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 final String fullname, email, username, password, verpassword;                 fullname = String.valueOf(reg_name.getText());                 username = String.valueOf(reg_username.getText());                 email = String.valueOf(reg_email.getText());                 password = String.valueOf(reg_password.getText());                 verpassword = String.valueOf(reg_verpassword.getText());                  if (email.isEmpty()) {                     reg_email.setError("Please enter email id");                     reg_email.requestFocus();                 } else if (password.isEmpty()) {                     reg_password.setError("Please enter your password");                     reg_password.requestFocus();                 } else if (fullname.isEmpty()) {                     reg_name.setError("Please enter your password");                     reg_name.requestFocus();                 } else if (verpassword.isEmpty()) {                     reg_verpassword.setError("Please enter your password");                     reg_verpassword.requestFocus();                 } else if (username.isEmpty()) {                     reg_username.setError("Please enter your password");                     reg_username.requestFocus();                 } else if (username.equals("") || password.equals("") || email.equals("") || fullname.equals("") || verpassword.equals(""))                     Toast.makeText(register.this, "Please enter all the fields", Toast.LENGTH_SHORT).show();                 else {                     if (password.equals(verpassword)) {                         Boolean checkuser = DB.checkusername(username);                         if (checkuser == false) {                             Boolean insert = DB.insertData(username, password, fullname, email);                                 if (insert == true) {                                     Toast.makeText(register.this, "Registered successfully", Toast.LENGTH_SHORT).show();                                     Intent intent = new Intent(getApplicationContext(), MainActivity.class);                                     startActivity(intent);                             } else {                                 Toast.makeText(register.this, "Registration failed", Toast.LENGTH_SHORT).show();                             }                         } else {                             Toast.makeText(register.this, "User already exists! please sign in", Toast.LENGTH_SHORT).show();                         }                     } else {                         Toast.makeText(register.this, "Passwords not matching", Toast.LENGTH_SHORT).show();                     }                 }             }         });

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I hold a valid Indian passport. My passport expires on 29 September 2020; my Canadian visa also expires on 29 September 2020.   I am getting my passport renewed next month as I will be travelling to Europe in May, and to Canada from June to August.   So my query is: will the Canadian visa in the old passport be valid for my travel to Canada, or do I have to get a new valid visa?

I recently renewed my passport. I also have an expired passport which has my Canada visa (visitor's) valid for another three years. I have already used my Canadian visa which is multiple entry. I am planning to visit Canada this summer.  Since my valid Canadian visa is in my old/expired passport, do I need to renew/transfer my Canada visa or can I simply travel with valid visa in old passport?


I recently got a laptop for uni work, I had trouble with installation of the normal supported versions of Ubuntu and had to use Trusty 14.04 to get running, my question now is how can I set it to Unity-2d if possible. My laptop gets severe framerate issues with Unity-3d due to low end specs. Any alternative answers are welcome I just want to move onto a low-end shell but Unity-2d is preferrable.  Thanks.

How to change Unity 3D to 2D on Ubuntu 14.04? And, will I get any improvements in performance if do that? What software utilities will I lose if I switch to from Unity 3D to 2D?


I'm using an old pc as a storage space and I have two 2TB HDD drives. I want to use them in a way that when I place a file or a picture in hard drive 1, the same files are saved in hard drive 2 in real time. How can I do that?

EDIT:  The main recommendations for Windows that were offered in answers to the question cited as the reason for closing this one as a duplicate, do not work in real-time.  I've downloaded Yardis and although it's been set up to recognize changes real-time, it does not do so. Same problem with DSynchronize, whose documentation indicates that this feature is "experimental".  So if we could re-open this question, that would be good.  Whenever I save or update a file to a particular designated folder on my C:\drive I would like to make or update a copy on my network-attached storage device, ideally saving the copy to the NAS as a version rather than overwriting a copy there, if possible.  I have Windows 7 x64 Ultimate. Is there any feature built-in that can accomplish this?  It has to be a real copy, not merely a pointer. I'm trying to achieve some redundancy for especially critical documents (in a variety of formats) that change frequently throughout the day.  P.S. I am looking for folder-level granularity; I wouldn't want this to happen for every file on the C: volume.


If you look at  of  on Chrome 34 / Windows 7, you should see the following:    The behavior of the title in revision 7 is probably not by-design.

In edit revisions where a long enough title has been edited, the side-by-side  markdown view shows a large overlap when the title wraps:    This is a repeat of  specific to the new Meta design. Looks like a line spacing adjustment is needed.  See this .


My issue is that I have 2 objects in edit mode, I want to use the second object to cut the first one to make a hole.  I hope the image can make what I want a little clear because I don't find the right words to explain that.  Thank you~

Coming from SketchUp one of the tools I miss most is the circle draw tool which lets you draw a circle on any face and then you could extrude it in/out. The only tool that I know of that comes close to this is the knife tool but this would be very impractical to cut out with the knife  Example:    Is there any tool in blender that can match this function? also how could you do this with squares?


I'm working on a chrome extension, where I have an iframe pop up when user is on a certain website. I have the iframe html document saved as a web accessible resource, and I'm trying to figure out how I can access and manipulate an element in that iframe document from the content script. Basically I want to be able to update information on the iframe popup based on the web page the user is on. Is there a way to somehow access it directly from the content script? Or can I have a separate js file manipulating information on the html page? Looking for any ideas/guidance anyone can offer. Thanks! Edit: This is what I'm trying, I can't figure out where it's going wrong. iframe.html               <title>My extension</title>                  <meta charset="UTF-8">         <meta name="viewport" content="width=device-width, initial-scale=1.0">

Trying to get some text here!

        iframe.js var testHeaderElement = document.getElementById("testHeader"); console.log(testHeaderElement.innerText);  In iframe.js, it's telling me that it can't log testHeaderElement.innerText because it's null. Why isn't it finding the element?

When embedding JavaScript in an HTML document, where is the proper place to put the <script> tags and included JavaScript? I seem to recall that you are not supposed to place these in the <head> section, but placing at the beginning of the <body> section is bad, too, since the JavaScript will have to be parsed before the page is rendered completely (or something like that). This seems to leave the end of the <body> section as a logical place for <script> tags.  So, where is the right place to put the <script> tags?  (This question references , in which it was suggested that JavaScript function calls should be moved from <a> tags to <script> tags. I'm specifically using jQuery, but more general answers are also appropriate.)


totalArray = {"BWM": {"1Seris": ["118d", "120d"], "2Seris": ["m2", "220d"]},               "Audi": {"A4": ["a4 tsfi", "a4tdi"], "A6": ["a4 tsfi", "a4tdi"]}}  totalList = list(totalArray.values()) totalList2 = list(totalList[0].values()) print(totalList2[0][0])   I want to get value "118d" by use "totalList2[0][0]"  I tried. it was receive the ramdom value.   like something. It was change value 118d, m2, a4 tsfi when it start again  I want to get only "118d" by using the position number  How can i do that?  or   Have have ever know another method?  I want to use map at for loop

Here is the dictionary I have  propertyList = {     "id":           "int",     "name":         "char(40)",      "team":         "int",     "realOwner":    "int",      "x":            "int",     "y":            "int",      "description":  "char(255)",      "port":         "bool",     "secret":       "bool",     "dead":         "bool",     "nomadic":      "bool",      "population":   "int",     "slaves":       "int", }   But when I print it out with "\n".join(myDict) I get this  name nomadic dead port realOwner secret slaves team y x population id description   I know that a dictionary is unordered but it comes out the same every time and I've no idea why.


I can't post a question when logged in via OpenID on Stack Overflow. How can I do it?

If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you  to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see:  We are no longer accepting questions from this account. See  to learn more.  Likewise, for answers:  We are no longer accepting answers from this account. See  to learn more.   Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked?


I am new to blender and installed it for the first time in my computer.   And when i started it  showed a error "Error AL lib: UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead.". And the error closed automatically and blender did not open at all.   I looked around on internet and found the most common solution to this problem was deleting the config files in appdata. But the thing is there is no Blender Foundation folder in my appdata\Roaming  What should i do?. My blender is 2.79

I have Win 10 and when I open Blender I have the error:     AL lib: UpdateDeviceParams: Failed to set 44100hz, got 48000hz instead


Let $X_1, X_2, \dots , X_n$ be a random sample of size $n$ from the uniform distribution $U(2\theta)$ whose pdf is $f(x;\theta)=(2\theta)^{-1}$ , if $0<x<2\theta$ , zero otherwise. i) We can see that the MLE estimator is $\hat{\theta}_{MLE}=\frac{1}{2}\underset{i}{\max} \ x_i$ ii) Also we can find that $Z_n = n (\theta-\hat{\theta}) \overset{d}{\to} \exp(\theta^{-1})$ I would like to construct a confidence interval with approximate $(1 − \alpha)$-confidence level based on  $\hat{\theta}_{MLE}$. $\textbf{I wondered if both of these approaches are correct or if one is not, what is the problem?}$ $\textbf{A}$: We would like to have $\mathbb{P}[a<\hat{\theta}<b] = 1-\alpha$, where $a$ and $b$ are constants. $$1-\alpha = \mathbb{P}[a<\hat{\theta}<b] = F_{\hat{\theta}}(b)-F_{\hat{\theta}}(a)   \ \ \ \ \ \ \ , \text{where} \ F_{\hat{\theta}}(x)=(\frac{x}{\theta})^n $$ We can find $a$ and $b$ by solving: $$1-\frac{\alpha}{2}= F_{\hat{\theta}}(b) =(\frac{b}{\theta})^n \implies b = (1-\frac{\alpha}{2})^{\frac{1}{n}}\theta $$ $$\frac{\alpha}{2}=F_{\hat{\theta}}(a) = (\frac{a}{\theta})^n \implies a = (\frac{\alpha}{2})^{\frac{1}{n}}\theta$$ A confidence interval with $1-\alpha$ confidence level is $$\text{CI}_\theta(1-\alpha) \equiv \Bigg[  \hat{\theta}(1-\frac{\alpha}{2})^{\frac{1}{n}} \ , \  \hat{\theta}(\frac{\alpha}{2})^{\frac{1}{n}} \Bigg]$$ $\textbf{B}$ We would like to have $\mathbb{P}[a<\theta-\hat{\theta}<b] = 1-\alpha$, where $a$ and $b$ are constants. $$1-\alpha=\mathbb{P}[a<\theta-\hat{\theta}<b] = \mathbb{P}[na<n(\theta-\hat{\theta})<nb]$$ So give (ii): $$na = \theta \log(1-\alpha/2)$$ $$nb = \theta \log(\alpha/2)$$ So ; $$\text{CI}_\theta(1-\alpha) \equiv \Bigg[  \hat{\theta}-\frac{\hat{\theta}}{n}\log(1-\frac{\alpha}{2}) \ , \  \hat{\theta}-\frac{\hat{\theta}}{n}\log(\frac{\alpha}{2}) \Bigg]$$  Update: I got my answer from this  So both give a confidence interval with the same confidence level.

Suppose   $$ (a,b) $$   is a $(1-\alpha)$ level confidence interval for a parameter $\theta$. Suppose $\eta$ is a monotone invertible transformation. Then, is   $$ \left (\eta(a), \eta(b) \right ) $$   a $(1-\alpha)$ level confidence interval for $\eta(\theta)$? Assume the parameter and the confidence interval endpoints are all real numbers.   The answer seems intuitively to be "Yes" for similar reasons to why you can transform random variables do things like, if $Y = g(X)$, then  $$ P( Y \leq y ) = P( g(X) \leq y ) = P(X \leq g^{-1}(y) ) $$   Might also be related to the continuous mapping theorem, as applied to MLEs.   This is not homework and is coming up in the context of whether or not I can nake a 95% for the log odds, then back-transform it and call it a 95% for the probability.   Thanks


I am making a 'pet shop' and I am selling cats dogs and slimes. Of course, the cats and dogs don't de-spawn, but slimes do.  I tried to gave them names (using name tags) and I thought that would work, but it didn't. Does anyone know another way of stopping them from despawning?

I am using Spigot, some plugins, and I want to make like a zoo on a map, with mobs behind glass cubes. The problem is that when I load my map, every time some of the mobs just vanish, empty cages. I put eggs again, they spawn, I go to my other map in the multiverse (/mv tp my_other_map) and when I come back, empty cages again, always the same ones...   I've  read it's a question of distance of me (distance in cubes unit), if I'm too far away, the mobs will despawn... Is there a way for them to stay?


I have to generate a key, RSA v2 in OpenSSH format. I am a bit confused. I am trying to generate it using Putty Key Generator. There I see an option SSH2-RSA, SSH1-RSA. So is SSH2-RSA the RSA2 key or it means something else?  Also is this key in the OpenSSH format? I see that there is a conversion tab with 2 options: export OpenSSh Key and export ssh.com key. So I am not sure if the keys I have generated are in OpenSSH format.

I have to generate a key, RSA v2 in OpenSSH format. I am a bit confused. I am trying to generate it using Putty Key Generator. There I see an option SSH2-RSA, SSH1-RSA. So is SSH2-RSA the RSA2 key or it means something else. Also is this key in the OpenSSH format. I see that there is a conversion tab with 2 options:  export OpenSSh Key and export ssh.com key. So I am not sure if the keys I have generated are in OpenSSH format.  Regards Ankur