Suppose $\sum a_n$ converges conditionally and $\sum b_n$ converges absolutely, then will $\sum a_nb_n$ converge absolutely?  I know that $\sum|a_n|$ does not converge while $\sum a_n$  does and that $\sum|b_n|$ does converge, and also that $\lim_{n \to \infty} |a_nb_n|=0$ but I'm not sure how to proceed from here.

Assume that $\sum a_n$ is convergent and $\sum b_n$ is absolutely convergent.To show that $\sum a_nb_n$ is  absolutely convergent  My try::Consider the sequence of partial sums of $\sum |a_nb_n|$  $S_n=|a_1b_1|+|a_2b_2|+......+|a_nb_n|$  Now $(a_1b_1+a_2b_2+......+a_nb_n)\leq ( (a_1^2+a_2^2+..+a_n^2))^\frac{1}{2}((b_1^2+b_2^2+..+b_n^2)^\frac{1}{2})$  How to proceed from here?


The MWE below shows that the \cellcolor command doesn't properly fill a table cell in revtex4-1 where it would do so in a simple article. Can anyone help me get fills that extend to the boundaries of my cells in revtex4-1?    \documentclass{revtex4-1} \usepackage{colortbl} \begin{document} \begin{tabular}{ |c|l|l| } \hline \rowcolor{red} A    & B     & C     \\ \hline Hello World         & other     & \cellcolor{blue}stuff\\ \hline \end{tabular} \end{document}


I have a C-1/D visa valid until 2019, but I am not working on a cruise ship right now. I work at the Atlantis in Nassau, Bahamas. I want to travel to India via a US airport. Would I be able to use the C-1/D visa to transit through the USA, or do I need a separate transit visa to make the trip?

I'm not a resident of USA. But I work on a cruise ship which required me to have C-1/D visa. I am leaving USA and traveling to Mexico but I will have a connecting flight somewhere in another US airport with 1-2 hours waiting for connecting flight to Mexico.   Do I need B1/B2 visa for that? Or my transit visa C-1/D will be enough as long as I am leaving USA?


Say I've started program and it continues writing some output to stdout.  Is there some way to add a pipe so that I can, for example, count the number of lines it has produced with wc -l?

I have left a script running on a remote machine from when I was locally working at it. I can connect over SSH to the machine as the same user and see the script running in ps.   $ ps aux | grep ipcheck myuser  18386  0.0  0.0  18460  3476 pts/0    S+   Dec14   1:11 /bin/bash ./ipchecker.sh   It is simply outputting to stdout on a local session (I ran ./ipchecker.sh form a local terminal window, no redirection, no use of screen etc).  Is there anyway from an SSH session I can view the output of this running command (without stopping it)?  So far the best I have found is to use strace -p 18386 but I get hordes of text flying up the screen, its far too detailed. I can stop strace and then sift through the output and find the text bring printed to stdout but its very long and confusing, and obviously whilst it's stopped I might miss something. I would like to find a way to see the script output live as if I was working locally.  Can anyone improve on this? The obvious answer is to restart the script with redirection or in a screen session etc, this isn't a mission critical script so I could do that. Rather though, I see this as a fun learning exercise.


I have a collection of values and associated probabilities for each value (all positive, but far from being equal). I would like to sample from this distribution many times. One technically correct way to do this is linear search, which would be like this:  def sample(xs,ps,p):      for i in xrange(len(ps)):         if ps[i] <= p: return xs[i]   in Python notation. Then for sampling you would take p=random.random(). This linear search approach is very slow if xs and ps are very large. Accordingly, I want to do something along the lines of binary search. My first idea was to build a binary tree, and sample by traversing the tree using a random bit sequence (go left if a bit is zero, right if it is one). I would build the tree by splitting the list of cumulative sums of probabilities in a way which resembles quicksort: the left part of the tree is the values <= 1/2, the right part of the tree is the values >1/2, and then I recurse, so that the LL part of the tree is the values <= 1/4, the LR part is the values >1/4 but <=1/2, etc.  I actually did implement this on a toy example, where the cumulative sum of the probabilities was [0.26,0.91,0.99,1]. (So 26% of the time you get the first value, 65% of the time you get the second, 8% the third, 1% the last).   I wind up with two problems. One problem I already fixed: there are certain nodes that only have one child based on the sorting mechanism above, such as the first movement to the right in my example. This was easy enough to fix: I just don't change the tree and appropriately update the splitting mechanism, applying it to what I already have.   But by doing it that way, all values that are located at a given level of the tree become equally likely. So the first value corresponds to L (1/2), the second value corresponds to RL (1/4), the third value corresponds to RRL (1/8), and the last value corresponds to RRR (1/8). These are very different from the probabilities that I wanted!  So my question is: how can I build an efficient data structure and traversal algorithm for a sampling procedure like the one above?

Recently I needed to do weighted random selection of elements from a list, both with and without replacement. While there are well known and good algorithms for unweighted selection, and some for weighted selection without replacement (such as modifications of the resevoir algorithm), I couldn't find any good algorithms for weighted selection with replacement. I also wanted to avoid the resevoir method, as I was selecting a significant fraction of the list, which is small enough to hold in memory.  Does anyone have any suggestions on the best approach in this situation? I have my own solutions, but I'm hoping to find something more efficient, simpler, or both.


Any idea what could be the problem and how to solve it?  Details:   HDD:  (P/N: WDBU6Y0020BBK-05) When first connecting the device to my ThinkPad T420si (), a dialog appeared stating that Windows is attempting to install a driver. The driver installation, however, failed. According to Western Digital, there is no driver anyhow, and the HDD should work without driver. In the Device Manager, the drive is displayed with an exclamation mark as Other devices / Elements 10B8:   In Disk Management, it is not displayed:   I tried all three USB ports on the machine, two USB 2.0, and one USB 3.0, all without success. Other USB HDDs work fine. When the HDD is connected, the status LED is shining, and the case vibrates, i.e. it appears to be running. An old ThinkPad T43 with Windows XP does detect the HDD. I called WD support. The support technician didn't know about this particular problem. He recommended that I reinstall the USB drivers of the machine, which I did. First, I uninstalled the driver for Elements 10B8, then uninstalled the drivers for the three USB controllers listed in Device Manager:    After restarting the machine, I installed the  available from Lenovo, then connected the WD HDD to the USB 3.0 port. Again I got a message about a failed HDD driver installation, and now everything is like before. Properties according to :

In an attempt to get a  I followed a suggestion to uninstall all devices of type Mass Storage using . Now, Windows 7 does not show any mass storage device, even the ones that worked previously. For example, a connected USB pen drive is listed in USBDeview as not connected:    In the Device Manager it appears with an exclamation mark:    It is not shown at all in Disk Managment.  I already tried reinstalling my  Intel chipset drivers, but to no avail.  How do I get USB mass storage to work again?


I might have a silly questions but I am new to math so don't judge to hard, is there a proof that there is no integer for which $a^n = b^2$ where $n>2$ ? PS The question excludes the case where (a=c^2$)  (b=c^n$). Example( 4 and 8, 16 should be excluded) also solutions a=b=0 or a=b=1 also to be excluded.

If $ a$, $ b$, $ x$, $ y$ are integers greater than $1$ such that $ a$ and $ b$ have no common factor except $1$ and $ x^a = y^b$ show that $ x = n^b$, $ y = n^a$ for some integer $ n$ greater than $1$.  I started this way: $x^a=y^b$ $=>$ $x=y^{b/a}=(y^{1/a})^b$. Thus $x$ is an integer, and so is $y^{1/a}$, so $y=n^a$ for some integer $n$ greater than $1$. Then from the given relation, we get $x=n^b$.   I am not very convinced with my solution, as I feel I did some mistake. Can anyone point out where the mistake is? Any other solution is also welcome :)


When trying to install ibus-avro in Ubuntu 14.04 the following results appear. What I should do?  The following packages have unmet dependencies:   ibus-avro: Depends: ibus (>= 1.4.1-3ubuntu1) but is to be installed            Depends: libibus-1.0-0 (>= 1.4.1-3ubuntu1) but it is not going to be installed            Depends: gjs (>= 1.32.0-1ubuntu1) but 1.40.1-0ubuntu0.3 is to be installed            Depends: gir1.2-gjsdbus-1.0 but it is not going to be installed

I used the instructions given  to install ibus Avro in my ubuntu 14.04 LTS (64 bit) but ibus avro was not installed. Can anyone help me to solve this case? After giving the commands in terminal nothing happens.


I cast the last close vote on . It had two unclear what you're asking, one lack of information and one too broad. I voted on lack of info and that's the reason that shows up in the on-hold message box.  More than once I noticed that the reason I'm voting is the one that shows up when the votes are split in this manner (2x2x1). IIRC, previously both double voted close reasons would show up in the box.  What's the logic behind this nowadays?

Possible Duplicate:                When a question is closed! It will highlight the reason for closure (ie, based on the maximum number of votes for a category is received)  considering the example below: if a question has received two close votes for being off-topic, two as well for not being a not-a-real question. Also someONE found it to be too-localized!  With total number of 5 close votes, question will be closed. But since both the number of off-topic votes and not-a-real question votes are equal ie 2. What will be the reason highlighted on the question after getting closed. Does it depend on the reputation of close voters?  like if (total reputation of close voters for off-topic > total reputation of close voters for not-real-question) then close question as off-topic  This scenario ideally shouldn't happen! But if it happens then how it is handled and is this how it works?     two users have voted for off-topic and two for not-real .. the last   person chose too-localized. Then what will be the close reason?


Recently I am studying the "ELEMENTS" of Euclid. It is a translation of SIR THOMAS L. HEATH. In the definition part of the first book, the second definition is, "A line is Breathless length". My question is what we understand by Length And Breadth? Is it not straight line? how we can define line with the help of the concept of straight line? Can we define a "Dimension" logically?

In the sources I can find, line is considered a primitive concept (a one without definition). There is something, however, in such an intuitive definition that doesn't sit well with me.  Were there any attempts to rigorously define line?  And if there weren't, why? What makes line a concept which shouldn't be defined rigorously?


I am trying to fill my container with rocks using physics. Is there a way that I can apply this? Similar in applying modifiers? Because I want to export this as OBJ for a prop.

Let's say I set up a Rigid Body simulation in Blender (not in GE), and then run the simulation for a number of frames. Is there a way to tell Blender to use the current state and position as the initial state? So that when I go back to frame 1, the rigid bodies stay in the same place they did in frame X.  For instance, if I want a pile of bricks, I first place the bricks in the air and then let them drop down on the ground, coming to rest. When they have come to rest, I want to use that position as the starting position.


A binary operation on $G$ satisfies $a\cdot(b\cdot c)=(a\cdot b)\cdot (a\cdot c)$ and has an identity, is it associative? Is it a group?  I don't think it is associative but can't produce a convincing argument.  Any help would be appreciated!  Thanks,

I have a non-empty set $R$ with a binary operation $*$. If the pair has an identity element $e\in R$ and  $$(a*b)*(c*d)=(a*c)*(b*d)$$  holds for all $a,b,c,d \in R$, how do I then prove that this is associative?   I understand the concept that $x*(y * z) = (x * y)*z$, but I am unsure how to apply it here.


What does this kind of indexing refer to in case of recursion.  def is_palindrome(s): if len(s) < 1:     return True else:     if s[0] == s[-1]:         return is_palindrome(s[1:-1])     else:         return False  a=str(input("Enter string:")) if(is_palindrome(a)==True):     print("String is a palindrome!") else:     print("String isn't a palindrome!")

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


How to write "y^2" in latex ? I need that hook in mathmode. The error says to put the expression within $...$.

I need to display the symbol '^'  d <- dist(fascores, method = "euclidean")^2   How do I do that?


I notice that both OSes are using the same 'Open System Monitor'.  However, the one I installed on Ubuntu only has 1 indicator while Parrot has 3 for CPU, Memory and HDD/SSD utilization.  Picture description:    Left (VirtualBox Guest is Parrot) Right (VirtualBox Guest is Ubuntu)       Would it be possible to have similar outlook on Ubuntu?  This is the setting of 'Open System Monitor' in Ubuntu.

I installed the  GNOME extension on my Ubuntu 18.04, but for some reason, instead of showing a proper graph for CPU usage, it only shows a very thin line that seems to be a small portion of the actual graph. If I hover over it, the proper graph shows. How to make it show the whole graph all the time?


Before handing in my OnePlus 6T for repair, I want to create a full system backup and reset the phone to factory defaults. Afterwards, I want to restore the original state. My phone is rooted with Magisk. How do I do a full system backup? Note that this is different from a backup as part of migration to a new phone or a partial backup as part of fixing software issues.

Can anyone recommend a good way to backup Android devices? Ideally I would like to do this wirelessly and, not only backup my data, but also my user settings. Is it possible to backup an image of an Android device - so that one doesn't even need to reinstall apps? It would be particularly useful to hear from users that have restored backups, as to how easy, and complete, their processes were. Thanks


I am trying to illustrate a passenger travel flow map from a road terminal to several destinations on a road layer.  I have QGis and ArcGIS, but I don't know much on how to start the work.  I already have the road terminal and all the various destinations datasets. I also have data on the number of passengers moving to all the various destinations.  Can someone assist me with some guide?

I am trying to represent trade flows on a world map where the size and direction of arrows indicate the exports/imports of a given country.  This type of map is commonly found in magazines and newspapers. However, I find it extremely difficult to make.   Is there any function in ArcGIS for Desktop or any free software that would help me in making it?


I am using Ubuntu as my main OS and windows 10 is my secondary OS. I have a 500gb hdd.i want to create a new partition or resize my main Ubuntu partition.  How can I do it? Gparted partition don't give me access to resize my main partition.

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?


On my page here: , you can create a tutorial. If the tutorial author = ', the php code wont write the value's of the field's into the database. I checked the table of the database again and its 100% correct (varchar & 20 characters for the author). I collect all value's of the inputfield's with jquery and use Ajax to send it to my php code (that works too). Here is the code of the php page:     <?php  $step_counter = 1;  $tutorial_id = null;  print_r($_POST);  if(isset($_POST['input_tutorialtitle_name']) && isset($_POST['input_tutorialauthor_name']) && isset($_POST['input_tutorialdescription_name'])){      $title_value = $_POST['input_tutorialtitle_name'];   $author_value = $_POST['input_tutorialauthor_name'];   $description_value = $_POST['input_tutorialdescription_name'];    $insert = "INSERT INTO tutorial (tutorial_steps, tutorial_author, tutorial_title, tutorial_introduction) VALUES ('1', '$author_value', '$title_value', '$description_value')";   $insert_into_tutorial = mysqli_query($db, $insert);   if(!($insert_into_tutorial)){    print_r("Fehler beim eintragen des Tutorial's.");   }   else{          $tutorial_id = mysqli_insert_id($db);        }  }   $hit = true;   while($hit == true){      $input_title_name = "input_title_name" . $step_counter;   $input_description_name = "input_description_name" . $step_counter;   $input_image_name = "input_image_name" . $step_counter;    if(isset($_POST[$input_title_name]) && isset($_POST[$input_description_name])){     $input_title_value = $_POST[$input_title_name];    $input_description_value = $_POST[$input_description_name];     $input_image_width = 0;    $input_image_height = 0;    $input_image_value = 0;     if(isset($_POST[$input_image_name])){     $input_image_value = $_POST[$input_image_name];     list($width, $height) = getimagesize($input_image_value);      $input_image_height = $height;     $input_image_width = $width;    }     $insert = "INSERT INTO tutorial_step (tutorial_id, tutorial_step_number, tutorial_step_title, tutorial_step_image_name, tutorial_step_image_height, tutorial_step_image_width, tutorial_step_description) VALUES ('$tutorial_id', '$step_counter', '$input_title_value', '$input_image_value', '$input_image_height', '$input_image_width', '$input_description_value')";    $insert_into_tutorial_step = mysqli_query($db, $insert);    if(!($insert_into_tutorial_step)){     print_r("Fehler beim eintrages des Schrittes.");    }        $step_counter = $step_counter + 1;    $hit = true;   }   else{    $hit = false;   }  } ?>     And here is the image of the error (i used Firebug (if you try it too, you can see the entered value's)).     (line 14)  As example, I enter this value's:    , no error & php wrote it into the database table.

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


How can I install AMD Catalyst driver? (first time using ubuntu)  I was told to install fglrx but it froze when booting to desktop, so I fixed that issue and uninstalled fglrx. I followed , some commands were outdated/obsolete in addition to the posts being old and for versions before 13.10, I am on ubuntu 14.04. I was given this  and when I get to this partsudo apt-get install fglrx-legacy it cannot be found. I followed all the steps correctly previous to this part. I tried looking at other questions but they just take me back to these two links, there is the  on sourceforge does anyone have experience with it does it work? I'd rather do it myself, but I might try this.   My question is are there any up to date posts that I can follow to install this driver? Or could someone show me how to do it here step by step? Below is my graphics card info  01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] RV710 [Radeon HD 4350/4550]

I am planning on doing a fresh install of Ubuntu and want to know what is the correct way to install ATI Catalyst Video Driver?      There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience an index of each below:


I have Maverick and the option to Upgrade to OS X El Capitan pops up. I don't want to do this. Ever. How do I disable this notification?

When I have apps that need updating in OSX I get a notification on the top-right corner of my screen that does not go away until I click it (which opens the app-store). Is there a way to turn these notifications off?


I have an HP Notebook and I installed Ubuntu 16.04 beside Windows 10.  I checked for Additional Drivers, and I was shown (Processor microcode firmware for AMD CPUs from amd64-microcode).  When I select it, I am shown a message that tells me that the driver is proprietary, and that Ubuntu can't review nor update it.  I understand this, but I don't know if using such Updater affect my privacy, or if it is just a matter of quality and getting updates from a company other than Ubuntu.

Boy have been asking a bunch of questions on here lately, I have always been curious about this other driver called the CPU Microcode driver, I have an intel i3 Core Processor. I understand that this will increase your CPU performance with Ubuntu pretty well, but I'm not sure if I should install it.


The user can delete new field input rows by by clicking on the ‘-‘ button for that particular row. The user also has the ability to add new field input rows. The JS code that I've written works for the existing rows, but it doesn't work for any of the new dynamically created lines that are added by clicking the '+' button.  I've tried changing   $(".remove-current-ing").click(function() {...}  to  $(".remove-current-ing").on('click', function() {...}  HTML code:

 Ingredients
         {% for ing in recipe.ingredients %}
             <input id="ingredients" name="ingredients" type="text" placeholder="Ingredient (one per line)" class="form-control validate" value="{{ ing|capitalize }}" required>
         {% endfor %}                  <button type="button" class="waves-effect waves-light btn add-ing">                      </button>                   <button type="button" class="waves-effect waves-light btn remove-ing">                      </button>
   JS code:   let ingCount = $(".ingredients").length;     // Add new line     $(".add-ing").click(function() {         // Clone line, insert before add/remove btns and clear existing values         $(".ingredients:first").clone().insertBefore(".add-ing").find("input[type='text']").val("");         // Ensures original line is never removed         ingCount += 1;     });     // Remove last line     $(".remove-ing").click(function() {         // Ensure that the first line can't be removed         if (ingCount > 1) {             $(".ingredients:last").remove();             ingCount -= 1;         }     });  /* Remove the current ingredient (edit_recipe.html) */ /* CODE THAT ISN'T WORKING ON DYNAMICALLY CREATED ROW */ $(".remove-current-ing").on('click', function() {     // Ensure that the first line can't be removed     if (ingCount > 1) {         $(this).parent().remove();         ingCount -= 1;     } });```   The .remove-current-ing button works on pre-exisiting rows and removes them, but it doesn't work on new dynamically created rows (nothing happens when pressed).

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Imagine you have 12 balls. They are all the same color. We know that one ball is different in weight from the others but we dont know is it heavier or easier. You have a beam scale without measurements on it. Just two sides where you can put any number of balls on it. In three steps find the ball that is different in weight from other balls.

Possible Duplicate:          You have 12 balls and you know that they all weigh the same except for 1 which is heavier or lighter than all the others (you don't know which though). How can you make sure you know which ball is the heaviest/lightest in only 3 weighings?  The way I approached it was to split up the 12 balls into three sets of 4 and weigh two of the sets. If the sets balanced the scale, then I know the ball I am looking for must be in the set of 4 balls not weighed, else, I disregard said set and arbitrarily choose the heaviest set of 4 (as opposed to choosing the lightest set). I split the heaviest set of 4 balls into 2 and weigh that... etc.  Repeating this process until all 3 tries have been "used up", even if everything just so happened to be in your favor (the arbitrary choice you have in choosing the heaviest or lightest set happens to be the correct choice) in the end you still end up having to choose between 2 balls. A 50% chance is good, but I am wondering, is there a way to make sure 100%?


How could I check if a number is a perfect square?  Speed is of no concern, for now, just working.

I'm looking for the fastest way to determine if a long value is a perfect square (i.e. its square root is another integer):    I've done it the easy way, by using the built-in  function, but I'm wondering if there is a way to do it faster by restricting yourself to integer-only domain. Maintaining a lookup table is impractical (since there are about 231.5 integers whose square is less than 263).   Here is the very simple and straightforward way I'm doing it now:  public final static boolean isPerfectSquare(long n) {   if (n < 0)     return false;    long tst = (long)(Math.sqrt(n) + 0.5);   return tst*tst == n; }   Note: I'm using this function in many  problems.  So no one else will ever have to maintain this code.  And this kind of micro-optimization could actually make a difference, since part of the challenge is to do every algorithm in less than a minute, and this function will need to be called millions of times in some problems.    I've tried the different solutions to the problem:   After exhaustive testing, I found that adding 0.5 to the result of Math.sqrt() is not necessary, at least not on my machine. The  was faster, but it gave incorrect results for n >= 410881.  However, as suggested by , we can use the FISR hack for n < 410881. Newton's method was a good bit slower than Math.sqrt().  This is probably because Math.sqrt() uses something similar to Newton's Method, but implemented in the hardware so it's much faster than in Java.  Also, Newton's Method still required use of doubles. A modified Newton's method, which used a few tricks so that only integer math was involved, required some hacks to avoid overflow (I want this function to work with all positive 64-bit signed integers), and it was still slower than Math.sqrt(). Binary chop was even slower.  This makes sense because the binary chop will on average require 16 passes to find the square root of a 64-bit number. According to John's tests, using or statements is faster in C++ than using a switch, but in Java and C# there appears to be no difference between or and switch. I also tried making a lookup table (as a private static array of 64 boolean values).  Then instead of either switch or or statement, I would just say if(lookup[(int)(n&0x3F)]) { test } else return false;.  To my surprise, this was (just slightly) slower. This is because .


I write enum with custom ToString() method example     public enum MyEnum{         a,         b,   }   My = MyEnum.a;   Console.Write(My.ToString); // ---> output : aaaaa   and in code My.ToString() Do you have idea ?

My enum consists of the following values:  private enum PublishStatusses{     NotCompleted,     Completed,     Error };   I want to be able to output these values in a user friendly way though. I don't need to be able to go from string to value again.


Is it possible to take backup of certain table in mysql? Suppose I have 10 tables, and I want to take a backup of 8 tables through one command.   How can I do this?

How can I dump a specific table or set of tables without including the rest of the db tables?


If I run the code below that calls Test1(), VS2012 will break nicely at that line and show me exactly what's going on. If I comment out Test1 and put in Test2, then the try catch does not stop on the line, it just logs it out to the console.  How can I get VS2012 to stop on the error line, even when it is surrounded by a try catch statement?  private void Button_Click(object sender, RoutedEventArgs e) {   //Test1(); // No try catch - stops on error line dividing by zero.   Test2(); // Try catch - Just writes out to console. }  private void MakeError() {   int i = -1;   i += 1;   int j = 1 / i;   Console.WriteLine(j.ToString()); }  void Test1() {   Console.WriteLine("MakeError in Test1");    MakeError(); }  void Test2() {   Console.WriteLine("MakeError in Test2");   try   {     MakeError();   }   catch (Exception ex)   {     Console.WriteLine(ex.Message);   } }

I would like Visual Studio to break when a handled exception happens (i.e. I don't just want to see a "First chance" message, I want to debug the actual exception).  e.g. I want the debugger to break at the exception:  try {    System.IO.File.Delete(someFilename); } catch (Exception) {    //we really don't care at runtime if the file couldn't be deleted }   I came across  notes for Visual Studio.NET:     1) In VS.NET go to the Debug Menu >>   "Exceptions..." >> "Common Language   Runtime Exceptions" >> "System" and   select "System.NullReferenceException"      2) In the bottom of that dialog there   is a "When the exception is thrown:"   group box, select "Break into the   debugger"       3) Run your scenario. When the   exception is thrown, the debugger will   stop and notify you with a dialog that   says something like:              "An exception of type "System.NullReferenceException" has   been thrown.              [Break] [Continue]"       Hit [Break]. This will put you on the   line of code that's causing the   problem.   But they do not apply to Visual Studio 2005 (there is no Exceptions option on the Debug menu).  Does anyone know where the find this options dialog in Visual Studio that the "When the exception is thrown" group box, with the option to "Break into the debugger"?  Update: The problem was that my Debug menu didn't have an Exceptions item. I customized the menu to manually add it.


Hi,  I am getting "Structs cannot contain explicit parameterless constructor" error during build but i am able to compile the program with errors.  struct Program {     string Name;     string Degree;     string Dpthead;     //Constructor     public Program ()     {        Console.WriteLine("Enter the Program's Name: ");        Name = Console.ReadLine();        Console.WriteLine("Enter the Program's Degree Name: ");        Degree = Console.ReadLine();        Console.WriteLine("Enter the Head of Program : ");        Dpthead = Console.ReadLine();      }      public void PrintUProgramDetails()      {         Console.WriteLine("Program Name: {0} from {1}. Enrolled in {2} degree(s)", Name, Degree, Dpthead);      }  }   What are the possible ways to correct this error? Any help or guidance.

In .NET, a value type (C# struct) can't have a constructor with no parameters. According to  this is mandated by the CLI specification. What happens is that for every value-type a default constructor is created (by the compiler?) which initialized all members to zero (or null).  Why is it disallowed to define such a default constructor?  One trivial use is for rational numbers:  public struct Rational {     private long numerator;     private long denominator;      public Rational(long num, long denom)     { /* Todo: Find GCD etc. */ }      public Rational(long num)     {         numerator = num;         denominator = 1;     }      public Rational() // This is not allowed     {         numerator = 0;         denominator = 1;     } }   Using current version of C#, a default Rational is 0/0 which is not so cool.  PS: Will default parameters help solve this for C# 4.0 or will the CLR-defined default constructor be called?     answered:     To use your example, what would you want to happen when someone did:   Rational[] fractions = new Rational[1000];       Should it run through your constructor 1000 times?   Sure it should, that's why I wrote the default constructor in the first place. The CLR should use the default zeroing constructor when no explicit default constructor is defined; that way you only pay for what you use. Then if I want a container of 1000 non-default Rationals (and want to optimize away the 1000 constructions) I will use a List<Rational> rather than an array.  This reason, in my mind, is not strong enough to prevent definition of a default constructor.


I am able to successfully use wp.hooks.applyFilters() and wp.hooks.addFilter(), but I'm not able to render a React Component using wp.hooks.addAction(). However, the console.log() runs just fine within the callback for an action. This is my code:  import { createHooks } from '@wordpress/hooks';  let globalHooks = createHooks();  const Header = () => {     return (
Header Component
     ); }  const RevisedHeader = () => {     return (
Revised Header Component
     ) }  export default class App extends Component {      constructor( props ) {         super();          globalHooks.addFilter( 'replace_header', 'revisedHeaderCallback', this.revisedHeaderCallback );         globalHooks.addAction( 'after_replace_header', 'afterRevisedHeaderCallback', this.afterRevisedHeaderCallback );     };      revisedHeaderCallback( header ) {         return <RevisedHeader />;     }      afterRevisedHeaderCallback() {         return <RevisedHeader />;     }      render() {          return(
                 { globalHooks.applyFilters( 'replace_header',  ) }                 { globalHooks.doAction( 'after_replace_header' ) }
         );     } }


Are there any SIM cards with unlimited internet access available in New Zealand, for a stay period of 3 weeks?  Vodaphone counter at Auckland Airport don't offer any unlimited bundles, and I wonder if there are any available in Christchurch.

Next month I am traveling to country X, where I would need Y minutes of calls, Z text messages and most importantly Q megabytes of data. How can I find the cheapest/most reliable SIM card for my needs?


To start with I'm not 5 years old. I'm just getting started with Javascript, and I don't t seem to get what Json is.  I will appreciate anyone that can explain json to me in the simplest term...examples will be appreciated too.

I've looked on Wikipedia and Googled it and read the official documentation, but I still haven't got to the point where I really understand what JSON is, and why I'd use it. I have been building applications using PHP, MySQL and JavaScript / HTML for a while, and if JSON can do something to make my life easier or my code better or my user interface better, then I'd like to know about it. Can someone give me a succinct explanation?


I tried for several hours configuring a Bind server on Debian 7 in order to obtain this:  *.example.local.  I need that every third or fourth level for "example.local" (for example: abc.example.local, one.two.three.example.local, etc...) to go to a specific IP Address (ie.: 192.168.100.200).  I really can't find a way to obtain this, everytime the server answers me with a SERVWARN telling it can't find example.local.  Thank you

What is the best way to add a DNS wildcard record for a domain?  I want example.net, www.example.net, a.b.c.www.example.net, ... going to one server.  Now I use:  example.net.    60  IN  A       1.2.3.4 *.example.net.  60  IN  CNAME   example.net.   Is it possible to do it simpler?


I asked  about entry into Montenegro on the basis of a Schengen visa. One of the answers I received said:     Holders of travel documents containing a valid Schengen visa, a valid   visa of the United States of America, United Kingdom and Northern   Ireland and the Republic of Ireland, or a permission to stay in these   countries, may enter and stay, or pass through the territory of   Montenegro up to 30 days, and not longer than the expiry of visa, if   the period of validity of the visa is less than 30 days.   As per my trip across Europe, I will be applying for a Schengen visa with a validity of 34 days since my itinerary goes like this (in the same sequence):  - Milan, Italy                 (4 days) - Budapest, Hungary            (6 days) - Dubrovnik, Croatia           (5 days) - Mostar, Bosnia & Herzegovina (3 days) - Kotor, Montenegro            (3 days) - Brussels, Belgium            (6 days) - Paris, France                (7 days)   So I only intend to spend three days in Montenegro. Also, by the time I would have reached the entry point of Montenegro, I would have already utilised 10 days out of my validity of 34 days.  Will I get entry into Montenegro (since the paragraph on the visa page specifies that if the period of validity of the visa is less than 30 days)?  I already have my flight out of Montenegro booked to Belgium and hotel accommodation booked. Plus, I am really excited about visiting Kotor so I do not want to give up on the opportunity to visit Montenegro.  Do I need a separate visa or can I go in with a multi-entry Schengen visa with my itinerary?  Also, worst case if I do have to apply for a visa, the embassy for Montenegro is not present in my country (India) and they have said on their website to apply to the "Republic of Serbia" Embassy which is in Delhi. I live in Mumbai. It is not possible for me to go to Delhi just to apply for a Montenegro visa.  Are there alternatives?

There are countries in the Balkan area that allow entry if you have a Schengen visa but am not able find a definite list of all those countries. Knowing that will save me getting a visa for all those countries when I do my mega Euro trip.


"A person" or "an ornament" are normal instances of 'A' being followed by consonants or vowels. However the rule seems to have exceptions when a word sounds like it starts with the opposite, such as "an hour" or "a url" (when url is pronounced letter by letter).  Is there a name for this kind of exception?

In the following example, is it appropriate to use a or an as the indefinite article, and why?     He ate __ green apple.   I know that in the case of just "apple", it would be "an apple," but I've heard conflicting answers for "green apple," where the noun is separated from the article by an adjective.  Also, which is more appropriate in this case:     He ate  __ enormous Pop-Tart.


I recently used Gparted to resize my partition, so I have 200GB of unallocated space that I want to install Windows 7 to.   The problem is, my computer won't let me boot from USB. It let me boot Ubuntu from a USB, but not Windows.  I'd been having serious issues even creating a bootable Ubuntu USB. Startup Disk Creator, UnetBootin (and UnetBootin 494), WinUSB, etc all didn't work. I kept getting a black screen after the grub, and then returned to the grub.  Finally, p7zip via the Terminal did the trick, and let me boot into Try Ubuntu, so I could use Gparted to partition the HDD. Now that I have unallocated space, I want to install Windows 7.  I followed the instructions to put my Windows ISO on a USB via UnetBootin, but my computer doesn't detect the USB afterwards. The instructions say to format the USB as NTFS, and I did. It detects FAT32, but won't boot from it.  I tried WinUSB, but received an error message at the end of it that stated the USB wasn't an EFI device.  I've turned off Secure Boot, Fast Boot, and set the USB to boot priority.   Can I use p7zip again? I tried mounting the ISO, clicking and dragging the files onto the USB, and booting that way (which several instructions had said worked), but nothing happens.  I'm running out of tools and USBs. I've used 3 already, including a brand new one. Still nothing. I could use some advice!  EDIT: I tried WinUSB again with a fresh USB. Here's the error output:  Installation failed ! Exit code: 512 Log: Formating device... Mounting... mount: block device /home/zachary/Windows7Ultimate/Windows7Ultimate.iso is write-    protected, mounting read-only Copying... Installing grub... Installing for x86_64-efi platform. grub-install: error: /media/winusb_target_1407629458_2779 doesn't look like an EFI  partition. . Error occured ! Syncing... /usr/bin/winusb: line 78:  7228 Terminated              while true; do sleep 0.05; echo 'pulse'; done Cleaning... /usr/bin/winusb: line 78:  7371 Terminated              while true; do sleep 0.05; echo 'pulse'; done Umounting and removing '/media/winusb_iso_1407629458_2779'... Umounting and removing '/media/winusb_target_1407629458_2779'...   EDIT 2: When I use UnetBootin, the download completes and asks me to reboot. When I reboot and go into BIOS, the USB doesn't show as a bootable option. It's just not there. It should be noted that my computer came with Windows 8 pre-installed. Would that make a difference? I also can't change UEFI to Legacy from BIOS.

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?


For some reason, I have recently been having problems where my SanDisk 32GB Cruzer USB Flash Drive will mount as read-only. It was occasional at first, but now it is full blown and will not allow any writing. Here is the output of sudo hdparm /dev/sdb  /dev/sdb: SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 14 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  /dev/sdb:  multcount     =  0 (off)  readonly      =  0 (off)  readahead     = 256 (on)  geometry      = 30532/64/32, sectors = 62530624, start = 0  multcount     =  0 (off)   Yet if I try any task that involves writing to the drive- backup, touch /run/media/user/32GB/file it return an error about it being read-only. It is formatted as FAT32 (for windows compatability) and is around 1.5 years old.

When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch.  Why did this happen and what can I do about it? Is there a way to remove the write protection?  (Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives. In some cases, the system may report that the drive or card was formatted successfully even though it was never actually formatted; the original data reappears when the device is reinserted.)     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


How can I check for nulls in a deep lamda expression?  Say for example I have a class structure that was nested several layers deep, and I wanted to execute the following lambda:  x => x.Two.Three.Four.Foo   I want it to return null if Two, Three, or Four were null, rather than throwing a System.NullReferenceException.  public class Tests {     // This test will succeed     [Fact]     public void ReturnsValueWhenClass2NotNull()     {         var one = new One();         one.Two = new Two();         one.Two.Three = new Three();         one.Two.Three.Four = new Four();         one.Two.Three.Four.Foo = "blah";          var result = GetValue(one, x => x.Two.Three.Four.Foo);          Assert.Equal("blah", result);     }      // This test will fail     [Fact]     public void ReturnsNullWhenClass2IsNull()     {         var one = new One();          var result = GetValue(one, x => x.Two.Three.Four.Foo);          Assert.Equal(null, result);     }      private TResult GetValue<TModel, TResult>(TModel model, Expression<Func<TModel, TResult>> expression)     {         var func = expression.Compile();         var value = func(model);         return value;     }      public class One     {         public Two Two { get; set; }     }      public class Two     {         public Three Three { get; set; }     }      public class Three     {         public Four Four { get; set; }     }      public class Four     {         public string Foo { get; set; }         public string Bar { get; set; }     } }   UPDATE:  One solution would be to catch the NullReferenceException like this:      private TResult GetValue<TModel, TResult>(TModel model, Expression<Func<TModel, TResult>> expression)     {         TResult value;         try         {             var func = expression.Compile();             value = func(model);         }         catch (NullReferenceException)         {             value = default(TResult);         }         return value;     }   But I hate to incur the expense of catching an exception that is not, in my mind, exceptional. I expect this to be the case quite often in my domain.  UPDATE 2:  Another solution would be modify the property getters like this:      public class One     {         private Two two;         public Two Two         {             get             {                 return two ?? new Two();             }             set             {                 two = value;             }         }     }   Which is mostly ok for my domain, but there are times when I really to expect a property to return null. I checked the answer from Josh E as helpful since it comes pretty close to what I need in some cases.

C#6 Update  In :  // C#1-5 propertyValue1 = myObject != null ? myObject.StringProperty : null;   // C#6 propertyValue1 = myObject?.StringProperty;   The question below still applies to older versions, but if developing a new application using the new ?. operator is far better practice.  Original Question:  I regularly want to access properties on possibly null objects:  string propertyValue1 = null; if( myObject1 != null )     propertyValue1 = myObject1.StringProperty;  int propertyValue2 = 0; if( myObject2 != null )     propertyValue2 = myObject2.IntProperty;   And so on...  I use this so often that I have a snippet for it.  You can shorten this to some extent with an inline if:  propertyValue1 = myObject != null ? myObject.StringProperty : null;   However this is a little clunky, especially if setting lots of properties or if more than one level can be null, for instance:  propertyValue1 = myObject != null ?      (myObject.ObjectProp != null ? myObject.ObjectProp.StringProperty) : null : null;   What I really want is ?? style syntax, which works great for directly null types:  int? i = SomeFunctionWhichMightReturnNull(); propertyValue2 = i ?? 0;   So I came up with the following:  public static TResult IfNotNull<T, TResult>( this T input, Func<T, TResult> action, TResult valueIfNull )     where T : class {     if ( input != null ) return action( input );     else return valueIfNull; }  //lets us have a null default if the type is nullable public static TResult IfNotNull<T, TResult>( this T input, Func<T, TResult> action )     where T : class     where TResult : class { return input.IfNotNull( action, null ); }   This lets me us this syntax:  propertyValue1 = myObject1.IfNotNull( x => x.StringProperty ); propertyValue2 = myObject2.IfNotNull( x => x.IntProperty, 0);  //or one with multiple levels propertyValue1 = myObject.IfNotNull(      o => o.ObjectProp.IfNotNull( p => p.StringProperty ) );   This simplifies these calls, but I'm not sure about checking this sort of extension method in - it does make the code a little easier to read, but at the cost of extending object. This would appear on everything, although I could put it in a specifically referenced namespace.  This example is a rather simple one, a slightly more complex one would be comparing two nullable object properties:  if( ( obj1 == null && obj2 == null ) ||      ( obj1 != null && obj2 != null && obj1.Property == obj2.Property ) )     ...  //becomes if( obj1.NullCompare( obj2, (x,y) => x.Property == y.Property )      ...   What are the pitfalls of using extensions in this way? Are other coders likely to be confused? Is this just abuse of extensions?    I guess what I really want here is a compiler/language extension:  propertyValue1 = myObject != null ? myObject.StringProperty : null;  //becomes propertyValue1 = myObject?StringProperty;   This would make the complex case far easier:  propertyValue1 = myObject != null ?      (myObject.ObjectProp != null ? myObject.ObjectProp.StringProperty) : null  //becomes propertyValue1 = myObject?ObjectProp?StringProperty;   This would only work for value types, but you could return nullable equivalents:  int? propertyValue2 = myObject?ObjectProp?IntProperty;  //or  int propertyValue3 = myObject?ObjectProp?IntProperty ?? 0;


Other than the difference in the quality of the image (increased focal length will produce more quality than the equivalent cropping of the image), is there a difference? For example, if I  increase focal length and don't crop vs.  not increasing focal length and cropping image to be same size/view.   I am asking if there is a difference, distortion-wise, like when increasing focal length and backing up. Or will the images be the same other than quality? Particularly concerned with portraits.

If I take a photo by zooming in (optical) and cropping a photo without zoom. What would be the difference between the two?  I know cropping reduces the photo quality but I'm interested in other differences, if any.


When viewing a question on a site which I don't use (I never registered on it), I can't figure out how to get back to the list of questions of the site.  See this example  from the Stack Exchange Android app. Where should I click to see the list of questions? (I chose Mathematics Educators because it's the most recent site, it is very likely that most users don't have an account on this website)  Here is a random example:    When viewing a question, I don't know how to view the list of questions. This site can't be found in the sidebar since it's not in my Your Sites list. The top menu containing the site's title only opens the sidebar.

I typically like to browse through various Stack Exhange sites in which I'm not registered yet. And at times I want to see list of questions after I read one question on that site. Tapping on the site icon brings me to the left side panel, from which I cannot choose the site I'm currently at, since I'm not registered in it.  Is there a way to go to question list from the question view? Or am I missing something obvious here?


I'm trying to create a virtual machine to follow a course and I don't have much practice in Ubuntu. The machine in this case is VMWare Workstation and I don't know exactly how to do it.  I have seen several questions about this on this site, but they are old and from very earlier versions of Ubuntu. Is there any new way to install this machine on my PC?

I can't install VMwarePlayer 4.0.3 on Ubuntu 12.04 64Bit. For Version 4.0.2, I found a script that I have to run to patch VMware Player for it to work on my system to properly, and after that I could install 4.0.2.  Is there an similar solution for Version 4.0.3?


Edit:      explains that Stack Overflow has its own server due to sheer volume of traffic. However, it doesn't explain why Meta Stack Exchange has its own server, having only 5 active rooms compared to Stack Exchange's 60 active rooms.  To differentiate my question, I've changed my scope to specifically ask why Meta Stack Exchange has a separate chat server      Original Post  The Stack Exchange network has  for user chat.    (Stack Overflow)  (Meta Stack Exchange)  (Super User, Server Fault, Arqade, Ubuntu, Mathematics, Web Applications, and all other SE sites)   Why do Stack Overflow, Meta Stack Exchange, and Stack Exchange use separate, independent chat servers instead of sharing one subdomain?    Having separate servers means that users can have three separate chat accounts without even realizing. I only recently realized that, in addition to my  and per-site profiles, I also had separate accounts for , , and .  Profiles are fully separate with different profile settings, ignored user lists, favorited rooms, bookmarked conversations, and parent users. Each server has its own unique , , and .  I read a  speculating the servers may have been separated to improve performance. That reasoning could explain why Stack Overflow () is separate from Stack Exchange (). But if performance were the reason, why separate Meta Stack Exchange? As of posting, Meta only has   *Note: This question is not about unique per-site domain URLs. See

Recently, there was a user in the Tavern who was... um, either highly delusional or a bot. In any case, since unfortunately no employees were around at the time, it took us almost a full hour to get enough people to spam/offensive/abusive flag one of his messages in order to get a measly 30-minute chat ban.  All of us in Teachers' Lounge felt so helpless in that we could barely do anything in order to... well, be moderators. Even our custom "other" flags went unhandled since no employees were around at the time.  Therefore, I hereby propose that we assimilate chat.MSE into chat.SE!    , but it was from a long time ago, and things have changed.   chat.meta.SO is no more. The reasoning provided for having a separate meta chat was:     And MSO? hmm... well... er... hmmm... MSO is a curious beast; in part it discusses stackoverflow.com and in part it discusses the Stack Exchange Network.   That no longer applies after the MSO/MSE split. chat.SO is active enough to have a separate thing, but chat.MSE is much less so. (This is obviously true given the fact that it took over an hour for a single blue person to appear.) The above point is especially exemplary considering that most users with chat moderation privileges on Chat.SE don't have those privileges on Chat.MSE. In order to participate in Chat.MSE, users without the association bonus need to have explicit participation on this site. This is unlike Chat.SE, where any user whose combined rep across all sites is 20+ can chat in any chat room on any site (except Stack Overflow).  Meta isn't even as special as it used to be (yes yes I know, we're very special unicorns, but just listen to me), since it's now basically a "normal" site (in the technical sense. The users are... well, we're something different.). Since it's actually much less active than other *.SE.coms, I don't see why it's treated so differently.


I'm using amsbook style and I'd like first paragraphs to be not indented - what can I add to the header to do this?  I don't want to use /noindent as then I'd have to use it all the way through my 200 page document, I'd prefer to do it automatically.

I am writing a document in a class (elsarticle) that indents the first lines of all paragraphs, including the ones following headings.  However, I would like to revert back to the default Latex behavior indenting all but the first paragraphs.  Of course I can do this manually using \noindent, but isn't there a better way?


Can you please tell me what should be the quality of an encryption function using a key size of 256 bits... I realized from my previous question that a simple XOR of plaintext (256 bits) with a suitable key of same size is totally unsafe, as the key  can be totally recovered by a simple known plaintext attack.  I was trying to implement my own cipher as a project for fun ! Thankyou everyone in advance... !

I (and many others for that matter) have always been fascinated by the inner workings of the modern building block of cryptography: block ciphers.  Now, the ressources on the "black art" of design and analysis of these ciphers are sparse; especially for the entry level. Available information like  seems to be somewhat outdated (due to its age).  What's the general consensus of the “best” (read: recommended) strategy to start designing and/or analyzing modern cryptographical block ciphers?    Nota bene: Think of this as a general, wiki-alike question – for learning purposes only. (Besides that, this Q&A would represent a place we can point people to when alike algorithm design questions arise.)


Does one have to study algebra at a graduate level (master's degree) in order to do a Phd related to complex analysis and analytical number theory, or functional analysis and PDE? Is a master's degree in analysis and PDE sufficient?

Can I be admitted to graduate school in a different field from my degree?  Specific cases include:   If I've taken plenty of advanced courses in field X in the process of completing a degree in another field, can I apply to graduate school in X? What if I haven't taken many courses in X, but I have acquired a good grasp of X through self-study or working in a related field? What if I've never studied X, but I have done very well in an unrelated field?  Could I be admitted to graduate school in X on the basis of general intellectual promise, and then make up the missing background after enrollment?   Note that this question is an attempt to provide a comprehensive answer, to avoid the need for a profusion of field-specific questions on this topic (see the associated ). Please feel free to edit the question or answer to improve them.


Let $R$ be a commutative ring with identity.For each $a\in R$ there exist $n(>1)\in \mathbb N$ such that $a^n=a$.   Prove that every prime ideal of $R$ is maximal.  My try  Let $I$ be a prime ideal of $R$. Then $R/I$ is an integral domain. If I can show using the hypothesis that $R/I$ is a field then we are done.  Any hints to show this?

Let R be a commutative ring with an identity such that for all $r\in$ R, there exists some $n>1$ such that $r^n = r$. Show that any prime ideal is  maximal. (Atiyah and MacDonald, Introduction to Commutative Algebra, Chapter 1, Exercise 7.)    Any hints?


I should change MAC-address of a built-in Bluetooth adapter. Is there any way to do it in Yosemite (10.10.4)?  Please note - the question is about Bluetooth, not about Wi-Fi. ifconfig doesn't see Bluetooth device.  I've already tried to update my bluetooth adapter address in /Library/Preferences/com.apple.Bluetooth.plist (Root\PANInterfaces\Item 0):  # turn bluetooth off cp /Library/Preferences/com.apple.Bluetooth.plist ~/com.apple.Bluetooth.plist cp /Library/Preferences/com.apple.Bluetooth.plist ~/com.apple.Bluetooth.plist.backup # edit ~/com.apple.Bluetooth.plist  sudo cp ~/com.apple.Bluetooth.plist /Library/Preferences/com.apple.Bluetooth.plist cd /Library/Preferences sudo chown root:wheel com.apple.Bluetooth.plist defaults read /Library/Preferences/com.apple.Bluetooth.plist # turn bluetooth on   But it doesn't help.

I usually changed my MAC address with the following commands:  # Get a New MAC Address openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//' # Changing the MAC Address sudo ifconfig en0 ether d4:33:a3:ed:f2:12   When I enter:  ifconfig en0 |grep ether   I still get the old MAC address :( - Who can help? I would love to have a script or system to automatically change it on system boot.


While initializing an array by  int [][] mat = new int [3][3]   OR by  int mat[][] = new int [3][3]   there is no change.  Why it does not make any difference ? is it just Java style to give freedom to a developer or is there any internal functionality change based on how you initialize an 2d array or even a normal array. The question may be very silly but still I want to know about it.

I have recently been thinking about the difference between the two ways of defining an array:   int[] array int array[]   Is there a difference?


It's not a time issue, I refreshed the page a couple of times.  1 person = 1 vote.

Two close votes and only one person has viewed the question?    How did this happen?


I would like to use which with the system's default path, ignoring any embellishments from the user's shell configuration files.  Motivation  I am attempting to write a script to find the system's Ruby binary. Many Ruby developers use a Ruby version manager, which adds something like ~/.rvm/bin to the start of their $PATH. I want to bypass this and use the version of Ruby that came with the system, or was installed via the system's package manager.  Current solution  Here's what I've tried so far:  $ env -i sh -c "which ruby"   This gives no output, and exits with 1. I would expect it to work though, because the path includes /usr/bin, and my system came with a Ruby binary at /usr/bin/ruby:  $ env -i sh -c "echo \$PATH" /usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:. $ which -a ruby # ... /usr/bin/ruby   A few additional details:   env -s bash -c "which ruby" also doesn't find anything. env -i zsh -c "which ruby" does find /usr/bin/ruby, but I can't depend on zsh. Using the full path to which (to make sure I'm using the binary, not the shell built-in) doesn't make any difference.   My environment  I'm writing this in Bash on OS X, but would like it to be portable to other shells and operating systems.

When looking for the path to an executable or checking what would happen if you enter a command name in a Unix shell, there's a plethora of different utilities (which, type, command, whence, where, whereis, whatis, hash, etc).  We often hear that which should be avoided. Why? What should we use instead?


I have RHEL (virtual box) server that I need to install puppet modules from a puppet master. I was told to log in as root then run puppet agent command. So I ran following command.  sudo su puppet agent -t   Execution went fine without an error. Let's say file "A" was pushed down from the master to the target server but I noticed that file size of "A" did not match between the master and the target server. I thought that was odd....I removed the file "A" from the target server then logged out and logged back in as root BUT with hypen "-" this time then ran puppet agent command.  sudo su - puppet agent -t   Execution went fine without an error BUT this time the file size of "A" matched. I am curious to know why.

When I am working on our RHEL machines, I use sudo su - to switch to being root. One day, a typo meant I typed sudo su -- instead - it seems to me that everything was the same as with a single hyphen, except that I was in the same folder as before I issued the command (with a single hyphen I find myself in /root).  Are there other differences? Is it safe to use this in scenarios where I know I want to work in the same directory?


I would like to know how to change IP pool of Wi-Fi spot mode on on Nexus 5. Could you tell me about it?  I just want control this pool if it's possible.

When connecting my PC to Android Wi-Fi hotspot, it assigned a 192.168.42.x address to my PC. I really need to change this as it conflicts with one of our work subnets - is this possible?


What are some methods for proving that a group is cyclic?  For example, I found this link  for different ways to prove a group is abelian. Could anyone make a list like this for different ways to show a group is cyclic?

One question asking if $\mathbb{Z}^*_{21}$ is cyclic.  I know that the cyclic group must have a generator which can generate all of the elements within the group.  But does this kind of question requires me to exhaustively find out a generator? Or is there any more efficient method to quickly determine if a group is a cyclic group?


I'm currently on a chiffon-making spree but all my chiffon cakes keep on collapsing after cooling.  Here's the recipe I used: - 100g flour - 100g sugar, 50g for meringue and 50g for yolks - 1 tsp baking powder (4g) - 45g oil - 90g water - 3 eggs, separated  1) Preheat oven to 160C. Line bottom of 20cm cake pan with parchment paper (yes, not a chiffon cake pan; the original recipe called for a normal cake pan and reviewers have been successful with it). Sift together flour and baking powder, set aside.   2) Beat egg yolks and 50g sugar till thick and pale. Add in oil then whip till emulsified and thick. Add in water then mix till combined. Sift in flour mixture then mix till smooth. Set aside.  3) Beat egg whites with 50g sugar till firm peak stage. Fold into egg yolk mixture in 3 batches, banging the bowl occasionally to remove any big air bubbles.   4) Pour batter slowly, and a from a height, into prepared cake pan. Bake for 60 minutes. Once done, cool inverted.   Can someone see what I'm doing wrong?   **the cake also kind of deflated in the oven at around 45 minute mark. It had a slight dome that evened out.   Thanks in advance for all help!  edit: could it be the liquid flour ratio that is causing my cakes to collapse? I remember reading somewhere that if you have too much liquid, the cake once cooled will collapse under its own weight. But I sort of don't think this is the case since most of the liquid in this recipe is water; which almost all would evaporate during baking.

Recipe used:   75g flour 1/2 tsp baking powder 80g sugar + 15g sugar (for the meringue) 2 eggs (60g each) 35g oil 60g water   Instructions:   Place all ingredients except egg whites and 15g sugar in a bowl.  Beat egg whites until soft peaks. Slowly add the sugar while continuing beating to firm peaks.  Using the same beaters, mix the egg yolk mixture until just combined.  Fold the meringue into the egg yolk mixture in 3 batches. Pour into the prepared cake pans then bake in a preheated 160°C oven for 55-60 minutes.      I've noticed that the cake sets up on the sides very early into the bake. It then continues to rise in the middle to create a dome. Around the 40 minute mark the dome flattens. It further flattens once cooled and un-molded. When I flip the deflated cake upside down it looks like the cake sunk in the middle.   Does anyone know what I did wrong? Could it possibly the recipe that is failing me?


I recently have gone from IPhone to Android. And my Google Play store is under an old email that has deleted its self. I have a purchased app that I need for school on this account, is there a way that I can change the email on my GooglePlay account without having to make a new account?

On my Note 2 I have two accounts configured  my.email@gmail.com my.work.email@company.com  Usually I have the Play Store configured to buy/install apps under my.email@gmail.com but somehow it got changed to my work email a while back. Before I noticed this, I installed ~20 apps using the my.work.email@company.com  Is there a way for me to re-associate those purchases with my.email@gmail.com without manually reinstalling each app? And how will this be different for free vs paid apps that I installed while using my.work.email@company.com?


I have Acer Aspire E1-571 laptop and I am using ubuntu 18.04 but it is slow and  someone recommand for me ubuntu 16.04 on this post  but in the ubuntu website i found   Recommended system requirements:  2 GHz dual core processor or better 2 GB system memory 25 GB of free hard drive space Either a DVD drive or a USB port for the installer media Internet access is helpful   Is it a good recommendation?   Will Ubuntu 16.04 be faster with my devices?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


It used to be that the first author (meaning, the author whose name comes before the others) is thought to have contributed most to the publication.  But in the last couple of decades, it seems that the first author no longer matters AT ALL, instead the last person has become the most important.   I attribute my observation to two things,   The first author is typically a student, someone with no name recognition, or someone who is getting advised or funded by the last author. The last author is typically the director or advisor of the project. In recent years many of these people have become ultra famous through things like TEDtalks and other media hype. It didn't use to be this way before the internet.    Nowadays whenever I evaluate how potentially interesting a paper is in my field (stem), before I even read it, I almost always look at the last author, especially if it is someone famous. If I don't recognize anyone, I am quick to assume that the paper is not interesting. I am trying to fight back against my bias.   Does being the "first author" still carry any weight in today's academic culture?

In my field (theoretical computer science), authors of any paper are always listed alphabetically; our papers .  (Well... hardly ever.)  In most other disciplines, at least within science and engineering, the ordering of authors is a signal about their relative contributions to the paper, with the first author indicating the most significant contributor.  Hiring and promotion committees do give extra weight to "first-author papers" (and sometimes have to be reminded that not all areas have them).  As an outsider, I find this practice confusing.  What does first authorship actually mean in your discipline? I understand vaguely that the first author is supposed to be the one who "", but what counts as "work" in this comparison?  Does "most" mean "more than all the other coauthors together" or just "more than any other coauthor"?  What happens when the comparison is unclear?   How often is "did the most work" the actual truth, versus a cover story for a more complex political decision?  I realize that the precise answer is different for every paper.  I'm looking for general guidelines for how an outsider (like me) should interpret first authorship in your field.  Pointers to guidelines from journals or professional societies would be especially helpful.  Please give only one answer per discipline.


We are currently saving for a mortgage deposit, I have already sent off my help to buy application as a first time buyer.   We are unsure as to whether my girlfriend is eligable. She previously had a mortgage under shared ownership and the flat was sold a while ago. Does this count as her previous investment in a property or does the mortgage being shared ownership have any sway?  We are aware that we can still use my isa to get a house together, more whether she is able to get her own help to buy isa (as they are per person) having only had a shared ownership mortgage before  Many thanks

this is a follow on from my previous question:      So the Help to buy ISA has arrived. Having had a read though the documents though I'm still unclear on whether my girlfriend is eligible for a help to buy ISA (for use with a joint purchase), even if I'm not:     Taken together I think that means that your girlfriend can get one of   these ISAs and use it towards a jointly-purchased house. But you'd be   wise to check that with the ISA provider.   Reading though (for example) the   It states:     Accounts are limited to one per person rather than one per home so   those buying together can each claim a bonus.   So does this mean she can open and use a help to buy ISA even if I can't?


An $i \in [n]$ is called a fixed point of a permutation $\sigma \in S_n$ if $\sigma(i) = i$. Let $D(n)$ be the number of permutations $\sigma \in S_n$ without any fixed point.  Prove that  i) $D(n) = n \cdot D(n-1) + (-1)^n$ for $n \geq 2$ ii) $D(n) = (n-1)(D(n-1) + D(n-2))$ for $n \geq 3$   First I tried to write down all fixed point-less permutations (in one-line notation): $n \leq 1 \rightarrow$: none $n = 2$: (2 1) $n = 3$: (2 3 1) (3 1 2) $n = 4$ (2 1 4 3) (2 3 4 1) (2 4 1 3) (3 1 4 2) (3 4 1 2) (3 4 2 1) (4 1 2 3) (4 3 1 2) (4 3 2 1) Unfortunately I didn't find any way of constructing these permutations by using the ones from $(n-1)$. Could you please help me a little bit? Thank you in advance!

I am trying to figure out how many permutations exist in a set where none of the numbers equal their own position in the set; for example, $3,1,5,2,4$ is an acceptable permutation where $3,1,2,4,5$ is not because 5 is in position 5.  I know that the number of total permutations is $n!$. Is there a formula for how many are acceptable given the case that no position holds its own number?


Let $(x_n)_{n\in\mathbb{N}}$ be a sequence in $\mathbb{R}$. Let $r\in (0,1)$ and suppose that $|x_{n+1}-x_n|<r^n \forall n\in \mathbb{N}$. Show that $(x_n)_{n\in\mathbb{N}}$ converges.  I know that it is sufficient to show that the sequence is Cauchy. So, this is very similar to this past question () but I don't completely understand the answers given so I'm hoping someone can help me out.

Past final exam question for an intro to Real Analysis course:  Let $C > 0$, $0<r<1$ and suppose that $\forall n\in \mathbb N, |x_{n+1} - x_n| \leq Cr^n$. Please help me prove that $(x_n)$ is a Cauchy sequence. (We can assume the $\lim\limits_{n\to\infty} r^n=0,$ for $0<r<1$)  So, I know that a Cauchy series must satisfy $|x_{n}-x_m| < \epsilon$ for any $\epsilon>0, \in \mathbb R$ and for all $n,m \gt H(\epsilon) \in \mathbb N$ Note that there can't be any conditions on n and m (I saw somewhere else someone required $m>n$ which you can only do if you're proving its not at Cauchy sequence, right?)  Another way of doing this is showing that it is contractive (and thus a Cauchy series) if there is a constant $a$ such that $|x_{n+1}-x_n| \leq a|x_n-x_{n-1}|$   Clearly I'm supposed to make use of $\lim\limits_{n\to\infty} r^n=0,$ for $0<r<1$... But I don't even know how where to start with this. As I am bumbling through this problem, a more thorough answer would be much appreciated. Thanks!


here is a sample the array I have  Array ( [57] => 0 [58] => 0 [59] => 0 [60] => 0 [61] => 0 [62] => 0 [63] => 0   The value names are randomly generated I want to get the name of each pair out of the array and the value I can get the value using   foreach ($_POST as $songvalue) { print $songvalue;   }  But how do I get the name of the value

Is it possible to find the foreach index?  in a for loop as follows:  for ($i = 0; $i < 10; ++$i) {    echo $i . ' '; }   $i will give you the index.  Do I have to use the for loop or is there some way to get the index in the foreach loop?


I'm writing my degree thesis in LaTeX and I have some chapters and sections which I didn't write yet.   Is there any way to put a tag to specify that there is a TO DO there so I remember to fill it ? (I mean something similar to @TODO in Java comments)  It would be great if LaTeX compiler raises a warning in the logs if it has found that tag.

Is there a simple way to add todo notes to LaTeX documents ?  I would like to have these notes in red in the generated pdf and a simple syntax to write them.


I'm interested in seeing which OSes and browsers developers use and I'm sure Stack Overflow has some interesting data. Has any ever been released anywhere?

Google Analytics (and some log parsers) will give you breakdowns on usage of different browsers, different versions of those browsers and screen resolutions.  I'm just curious to know what SO users user. Any chance we could get some stats on that? You may view this as commercial information, in which case I understand (as i'ts relevant to marketing/advertising).  I'm also curious to know the # of users who read and/or post from mobile devices and if so which ones.  UPDATE: Please refrain from personal anecdotes ("I use..."). I'm interested in actual usage, not personal stories. Thankyou.


This might not sound like a good idea to many of you. Also I do not want to criticise the rest of on-topic sites and the community.  Off late, it has become increasingly difficult to find a Stack Exchange site which has an interest in answering your question. It is not easy to choose from a variety of Stack Exchange sites and decide where exactly to ask the question. Here is my idea:   Have a site called techmology.stackexchange.com. (Ali G reference. ) The FAQ should say ask any question related to programming. Really anything. No offence will be taken for the stupidest of questions. it can be open ended etc. It is like a regular tech forum with all stackoverflow features. In case a question qualifies as a non-off-topic question on one of the other sites, such as stackoverflow, serverfault, etc, it will get migrated there. The site is not meant for future references to other people. It is meant for people who need help now. And for people who care less about what the site rules are and more about helping other people. Downvoting and user banning if only the question is not related to technology in anyway. Any question marked as off topic on any of the other techmology sites get migrated here.   This would make it much easier for people like me who need help.  What happens currently is that the moment I ask a question, I get downvoted. The question has to conform to a very strict set of rules.   IMHO, Internet is meant to be for free people according to me and conformism surely leads to decline. Let us start a stackoverflow site which is free again.

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 was solving a problem using python2 and I used  'seq= [[]]*2' because I wanted this '[[],[]]. But I got wrong answer. Then I tested it in IDLE like this:  >>>s=[[],[]] >>>seq=[[]]*2 >>>seq [[], []] >>>s[0].append(5) >>>s [[5],[]] >>>seq[0].append(5) >>>seq [[5],[5]]   I am totally confused. Can anyone help me? Please.

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?


I have two related questions regarding behavior of aperture area/diameter with respect to various focal length in a zoom lens, like, Canon EF-S 18-135mm f/3.5-5.6 (with variable aperture and variable focal length).  Please note this question is not for "constant aperture" zoom lens rather it is for a zoom lens with variable aperture.   In case of zoom lens, for example, Canon EF-S 18-135mm f/3.5-5.6 (with variable aperture and variable focal length). At any particular F-number (F-stop), for example at f/5.6 , does the diameter of the aperture increase with increases in the focal length? I mean, will the diameter of the aperture at 18mm and f/5.6 would be smaller than that of at 135 mm and f/5.6? In the above case (i.e. Canon EF-S 18-135mm f/3.5-5.6 ), What is amount of light that would enter the camera at 18mm and f/5.6 compared to that of at 135 mm and f/5.6? Will the amount of lights be same or different?

What I have learned from the definition of F-number is that;  The F-number (sometimes also called focal ratio, f-ratio, f-stop, or relative aperture) of a lens is the ratio of its focal length divided by the diameter of the aperture. And F-numbers are expressed as f/1, f/1.4, f/2, f/2.8, f/4, f/5.6, f/8, f/11, f/16, f/22, f/32 etc. Hence F-number (F-stop) depends on two variables; that are diameter of aperture and focal length of the lens.  Aperture diameter/size is one of the component which governs the amount of light that enters to the camera. As far as I known, at different F-stops values (f/1, f/1.4, f/2, f/2.8, f/4, f/5.6, f/8, f/11, f/16, f/22, f/32) the amount of light allowed to enter the camera is fixed and are with either 1/2 or 1/3 stop increment.  This concept is very easy to understand, in case of prime lenses (with a  fixed focal length and variable aperture), where F-stop is inversely proportional to the aperture diameter. For lower F-number (F-stop) the aperture would be bigger allowing more light and for higher Hence F-number (F-stop) the aperture would be smaller allowing less light in to the camera.  F-numbers (F-stops) have been evolved to allow a definite/fixed amount of light in to the camera (As far as I known). In case of zoom lens (with variable aperture and variable focal length), I am not able to understand the what would be the relationship between F-stop and the diameter/area of aperture at different focal length.  I have two related questions  1 . In case of zoom lens,  for example, Canon EF-S 18-135mm f/3.5-5.6  (with variable aperture and variable focal length). At any particular F-number(F-stop), for example at f/5.6 , does the diameter of the aperture increase with increases in the focal length? I mean,  Is the diameter of the aperture at  18mm and f/5.6 would be smaller than that of at 135 mm and f/5.6?   In the above case (i.e. Canon EF-S 18-135mm f/3.5-5.6 ), What is amount of light that would enter the camera at 18mm and f/5.6 compared to that of at 135 mm and f/5.6? Will the amount of lights be same or different?


We have generics in java using which we can generalize a class. I know that Object class is the parent class of every class.  When I can typecast to and from Object then why generics are needed?  class Response<T>{     T data; }   class Response{     Object data; }   Both of the above code snippets will work the same way.

I thought I'd offer this softball to whomever would like to hit it out of the park. What are generics, what are the advantages of generics, why, where, how should I use them? Please keep it fairly basic. Thanks.


How to get the remote name from a local branch?  Note that I do not want the remote tracking branch name but just the remote name.   Consider this contrived example. How do I get prefix/github?  $ git status -b ## dev...prefix/github/rm/dev  $ git remote github prefix prefix/github   So prefix/github is the remote and local branch dev is tracking remote branch rm/dev.  So far I know this way but it is not fullproof.  $ git rev-parse --abbrev-ref @{u} 2>/dev/null | cut -d'/' -f1 prefix   The prefix/github remote name is intentional. I can live with keeping my remote without forward slash (in which case the above would work) but wanted to know if I'm missing something.   fyi: I have a bash script where this eventually would be used.  Update:  See this comment for why this question is not a dupe:

See also:         How can I find out which remote branch a local branch is tracking?  Do I need to parse git config output, or is there a command that would do this for me?


I have a Nikon COOLPIX P7700 and because it has been losing function due to wear and tear after 6 years, and I wanted a better zoom range for wildlife, I decided to get a Canon 77D DSLR so I could get myself a more powerful camera that could have a really long zoom range and be of high quality. Although the kit lens isn't telephoto, it advertises a mm range of 18mm to 55mm range while the Nikon advertises 6mm to 42.8 mm. Although 55 on Canon isn't much more than 42.8 on Nikon, I thought it would still be a little further optical zoom than the Nikon's. Yet the Nikon displays an image much more zoomed in than the Canon's (keep in mind I've disabled digital zooms for both cameras but am pushing them to their maximum zoom). How/why could this be? I'm completely lost because I thought more mm = more zoom, and in fact you're supposed to multiply 1.5x on Nikon and 1.6x on Canon, so Canon should be significantly stronger.  This picture is a comparison between the two. I've digitally zoomed into both photos to show them at equal size. As you can see there's more grain and warp on the Canon photo because I had to digitally zoom in more, as the optical zoom was weaker (and my question is: why was it weaker if it was 55mm vs Nikon's 42.8mm?)  Thanks for the help!

I'm reading that a 50mm lens is recommended as a first prime lens for DSLR owners as it's supposed to give a 'natural' perspective, but when used on (most) DSLRs, the view is cropped, as if you were zoomed in by 1.5-1.6x, so it's more of a telephoto lens when used on a DSLR. I've also read however that the 50mm lens gives the same perspective on a DSLR and a 35mm, and shouldn't really be considered to be 'equivalent' to an 80mm lens as the crop factor isn't really a magic focal length changer.  Can someone explain how the image is different from (for example) a 50mm lens on a DSLR and an 80mm lens (assuming 1.6x crop factor) on a 35mm camera?


I'll start with the fact that I'm noob to Puppet, I have 2 servers; one is called puppetmaster and the other is called puppetclient. I've installed puppet-3.2.2 and created some basic nodes.pp file, the nodes.pp file includes settings for both puppetmaster and puppetclient. When i apply the relevant manifest the changes are only affecting the puppetmaster but not the client. On the server I see the next error:  [root@puppetmaster puppet]# puppet apply manifests/nodes.pp  hostname: Unknown host dnsdomainname: Unknown host hostname: Unknown host dnsdomainname: Unknown host hostname: Unknown host dnsdomainname: Unknown host Notice: Finished catalog run in 0.71 seconds [root@puppetmaster puppet]#   Even though a DNS server is configured on /etc/sysconfig/network-scripts/ifcfg-eth0 and in /etc/resolv.conf. While checking the puppetmaster log i see the next error:  [2013-08-08 11:03:00] ERROR OpenSSL::SSL::SSLError: SSL_accept returned=1 errno=0 state=SSLv3 read client certificate A: tlsv1 alert unknown ca     /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:34:in `accept'     /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:34:in `listen'     /usr/lib/ruby/1.8/webrick/server.rb:173:in `call'     /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'     /usr/lib/ruby/1.8/webrick/server.rb:162:in `start'     /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'     /usr/lib/ruby/1.8/webrick/server.rb:95:in `start'     /usr/lib/ruby/1.8/webrick/server.rb:92:in `each'     /usr/lib/ruby/1.8/webrick/server.rb:92:in `start'     /usr/lib/ruby/1.8/webrick/server.rb:23:in `start'     /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'     /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:32:in `listen'     /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:31:in `initialize'     /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:31:in `new'     /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:31:in `listen'     /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:28:in `synchronize'     /usr/lib/ruby/site_ruby/1.8/puppet/network/http/webrick.rb:28:in `listen'     /usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:92:in `listen'     /usr/lib/ruby/site_ruby/1.8/puppet/network/server.rb:104:in `start'     /usr/lib/ruby/site_ruby/1.8/puppet/daemon.rb:137:in `start'     /usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:215:in `main'     /usr/lib/ruby/site_ruby/1.8/puppet/application/master.rb:165:in `run_command'     /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:364:in `run'     /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:456:in `plugin_hook'     /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:364:in `run'     /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:504:in `exit_on_fail'     /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:364:in `run'     /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:132:in `run'     /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:86:in `execute'     /usr/bin/puppet:4 [root@puppetmaster ~]#   The puppet log on the client is blank. I investigated a little bit on the internet and saw that there's some command called puppetca in older version but as it seems, it's not part of the 3.2.2 version. Anyone knows how to get it to work?

I installed the puppet master and agent on the same machine. When the client is started, I got the following error message.  puppet agent --server=agent.com --no-daemonize --debug    err: Could not retrieve catalog from remote server: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed.  This is often because the time is out of sync on the server or client


I'm trying to figure out an approach (or a formula) to determine if a point (x,y) is inside the bounds of a rotated rectangle.    For this test we can assume that the rectangle is centered on the axis, has a width of w and a height of h, and an angle of θ.  I need a test to see if a point (A or B in the graphic) are inside the rectangle or not.  In the graphic A is not and B is.  The actual goal though is to constrain a point to stay inside the rectangle.  I'm not a straight up mathematician.. I'm a software guy. So I deal with math all the time but  I often come up with a coding approach to solve a problem.  One idea I have for an approach here is this: When the box isn't rotated it's a simple bounds test..  if B.x > w/2 then B.x=w/2 if B.x < -w/2 then B.x=-w/2 if B.y > h/2 then B.y=w/2 if B.y < -h/2 then B.y=-w/2   So I could rotate B (around the center of the rectangle) by -θ which essentially rotates the 'world' so that the rectangle isn't rotated.  Basically move things into an unrotated space.  Then do the above simple tests on the modified B.  Then after bounding it inside the rectangle, rotate the point back by θ to put it back in the original space.  The other idea I had was to do something with vectors.  Consider that B is a vector from the center of the rectangle.  Then shorten the length of the vector (like normalize it) to a length that constrains it inside the rectangle.  That seems more complex because it would require that I calculate the length vector B can be at each rotation.  Any ideas?

I need some maths help for a 2D game I am programming. In this game I have a rectangle, specified by its centers' X and Y coordinates, and its width and height. I then rotate this rectangle via  halfWidth = width / 2; halfHeight = height / 2;  rad = angle * TO_RADIANS; cos = FloatMath.cos(rad); sin = FloatMath.sin(rad);  x1 = -halfWidth * cos - (-halfHeight) * sin; y1 = -halfWidth * sin + (-halfHeight) * cos; x2 =  halfWidth * cos - (-halfHeight) * sin; y2 =  halfWidth * sin + (-halfHeight) * cos; x3 =  halfWidth * cos - halfHeight * sin; y3 =  halfWidth * sin + halfHeight * cos; x4 = -halfWidth * cos - halfHeight * sin; y4 = -halfWidth * sin + halfHeight * cos;  x1 += x; y1 += y; x2 += x; y2 += y; x3 += x; y3 += y; x4 += x; y4 += y;   That is working fine.   Additionally I have a point in the same Cartesian coordinate space, specified by pointX and pointY. Now I want check whether or not this point lies within the boudaries of the rotated rectangle -- but unfortunately I do not have a clue how to achieve this :)  Can you help me with this question? Thanks in advance!  Kind regards, Matthias


I'm struggling to georeference a .jpg map. When I load it in to ArcMap, I cannot see the picture at all, so I cannot georeference it. (I tried to zoom to the map layer but the map just does not appear).  Does anyone have a solution for this?

I have only a jpg map but don't have any digital data for georeferencing that jpg.  So is there any way for georeferencing my map (like googlemaps)?


I am having some trouble finding out the formula for this sum:  $$\text{?} = \frac1{1\cdot2} + \frac1{2\cdot3}+  \frac1{3\cdot4} + \cdots + \frac1{n\cdot(n+1)}$$  I am not sure where to start finding the formula. I know the answer is $1/(n+1)$ but how do you get that without using INDUCTION.

How can I find the formula for the following equation?  $$\frac{1}{1\cdot 2}+\frac{1}{2\cdot 3}+\frac{1}{3\cdot 4}+\cdots +\frac{1}{n(n+1)}$$  More importantly, how would you approach finding the formula? I have found that every time, the denominator number seems to go up by $n+2$, but that's about as far as I have been able to get:  $\frac12 + \frac16 + \frac1{12} + \frac1{20} + \frac1{30}...$ the denominator increases by $4,6,8,10,12,\ldots$ etc.  So how should I approach finding the formula? Thanks!


I was doing some abstract algebra exercises and I noticed that we if we assume there exists some homomorphism $\phi : \mathbb{Q}[\sqrt{n}] \rightarrow \mathbb{Q}[\sqrt{m}]$. Then if we want an isomorphism then $\phi$ must be surjective which means that $\phi(1) = 1$. Which means that $\phi (a) = a $ for some $a\in$ $\mathbb{Q}$.  Then for some $(a + b\sqrt{n})$ we get that  $$\phi(a + b\sqrt{n}) = a +b\phi(\sqrt{n})$$ Now we also have that, $$\phi (n) = n = \phi ((\sqrt{n})^2) = (\phi(\sqrt{n}))^2$$ Then if $\phi(\sqrt{n}) = c + d\sqrt{m}$ we get that $$n  = (\phi(\sqrt{n}))^2 = (c + d\sqrt{m})^2$$ $$ n = c^2 + 2\sqrt{m}cd + md^2$$ we get that $cd = 0$ so we have that if $c = 0 $ $$ n = md^2 \Rightarrow  d  = \sqrt{\dfrac{n}{m}}$$ which is a contradiction as $d\in \mathbb{Q}$ similarly we get that if $ d = 0$ $$ n  = c^2 \Rightarrow c  = \sqrt{n} $$ which again contradicts that $c\in \mathbb{Q}$ which means that we cannot construct an isomorphism. Is there something that I am assuming that I shouldn't be or is this correct?

Page 105 of D. Burton's A First Course in Rings and Ideals reads     It is not difficult to show that if (I'll call them $n$ and $m$ instead of $n_1$ and $n_2$) $n$, $m$ are square free integers, then $\mathbb{Q}(\sqrt{n}) \cong \mathbb{Q}(\sqrt{m})$ if and only if $n=m$.   Well, it is getting difficult for me, any help or would be appreciated.    My progress so far: Suppose $\phi :\mathbb{Q}(\sqrt{n})\to\mathbb{Q}(\sqrt{m})$ is an isomorphism. Then $\phi(u)=u$ for every $u \in \mathbb{Q}$, so that $\phi(\sqrt{n})^2=\phi(n)=n$. If $\phi(\sqrt{n})=a+b\sqrt{m}$ for some $a,b\in\mathbb{Q}$, then $(a+b\sqrt{m})^2=a^2+b^2m + 2ab\sqrt{m}=n$ implies $$a^2+b^2m = n$$ and $$2ab=0.$$  Then $b=0$ cannot happen since that would imply that $\sqrt{n}\in\mathbb{Q}$, where $n$ is a square-free integer. Also $a=b=0$ cannot happen. Hence $a=0$ and we have $$b^2m=n.$$ If $\psi:\mathbb{Q}(\sqrt{n})\to\mathbb{Q}(\sqrt{m})$ were an isomorphism then there would exist some $s\in\mathbb{Q}$ such that $$s^2m=n,$$ then $s=b$ or $s=-b$. Therefore the only isomorphisms from $\mathbb{Q}(\sqrt{n})$ to $\mathbb{Q}(\sqrt{n})$ are $\phi(u+v\sqrt{n})=u+vs\sqrt{m}$ and $\psi(u+v\sqrt{n})=u-vs\sqrt{m}$.    I don't know if there's an easier way and I don't know if I'm in the correct way here. Thanks beforehand :)


I have to solve this sequence:  $$a_n = \frac{1+\sqrt2+\sqrt 3+ \cdots +\sqrt n}{n\sqrt n}$$  As a tip I've been told to use Stoltz-Cesaro for sequance of this form : $a_n = \dfrac{x_n}{y_n}$  So I did Stoltz-Cesaro $\dfrac{x_n - x_{n-1}}{y_n-y_{n-1}}$ and I end up with: $\dfrac{\sqrt{n}}{n\sqrt{n}-(n-1)\sqrt{n-1}}$. I am stuck at this point, can you please give me some tips on what to do next? Thank you.

$$\lim_{n \to \infty} \dfrac{\sqrt 1 + \sqrt 2 + \dots + \sqrt{n}}{n\sqrt{n}}$$   $$\lim_{n \to \infty} \dfrac{\sqrt 1 + \sqrt 2 + \dots + \sqrt{n}}{n\sqrt{n}} =\lim_{n\to \infty} \dfrac1{n}\sum^{n}_{k = 1} \sqrt{\dfrac k n} $$  While searching this question I found, .   Like in the accepted answer I first compared my series to LRAM,    $$\int_a^b f(x)\,dx=\lim_{n\to\infty}\frac 1n\sum_{i=1}^n f\left(a+\frac{b-a}n i \right)$$  I got $a = 0$, $b = 1$ and $f(x) =\sqrt{x}$ so,  $$\int_0^1 \sqrt{x}\ dx = \dfrac2 3$$ should be the answer.  Is there any simpler method to do this sum ? I have not learnt this method to do infinite sums so I can't use it.


I started seeing this error msg     W: Problem unlinking the file lists - Clean (21: Is a directory)  whenever I tried to update using apt.  I have already tried sudo apt-get autoremove && sudo apt-get clean && sudo apt-get  autoclean  but still the problem persists.  Need help pls. I'm running Ubuntu 16.04.1 64-bit

I've recently moved to xenial ubuntu. After upgrading, I was no more able to run  sudo apt-get update   The output is the following:  Get:1 http://it.archive.ubuntu.com/ubuntu xenial InRelease [247 kB] Hit:2 http://it.archive.ubuntu.com/ubuntu xenial-updates  InRelease              Hit:3 http://it.archive.ubuntu.com/ubuntu xenial-backports InRelease            Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease               Hit:5 http://archive.canonical.com xenial InRelease                             Hit:6 http://repository.spotify.com stable InRelease                            Fetched 247 kB in 0s (307 kB/s)                                                 Reading package lists... Done W: Problem unlinking the file backup - Clean (21: Is a directory)   I've tried googling for this particular problem but with no success. Thank you for your help


I am using Windows 10 with the Creators Update (version 1703). Since horizontal screen real estate is scarce these days, I wanted to try moving the taskbar to either side of my screen. This makes the taskbar unnecessarily large to my taste, even though I use the "small icon" setting. It does not help to turn off the clock, as that is the largest icon/item. I think the taskbar could be half as small, but it won't let me resize it with the taskbar unlocked, I can only make it larger.  See this screenshot:

I have 14" 16:9 notebook and would like my Windows 10 taskbar have on the (left) side. Unfortunately, although I set it to small icons the bar is pretty wide. Do not you know how to make it thinner?  This is how I would like to have it: