I have installed ubuntu 12.04 on my laptop with all the packages. I am finished with it, everything is up and running.   Now i want to install Ubuntu on my desktop but don't want to download all the stuff again and install it one by one. Is there any way to clone my ubuntu from laptop to desktop.

I am going to change my machine: from a laptop with Ubuntu to another laptop where I am going to install Ubuntu...  I am quite happy with the current system, what I am afraid of is having to rebuild everything from 0.  So what do people often do to clone an Ubuntu system? That may include the data, packages, shortcut settings, etc...


How can I repeat a text box below a table in every page?   More specifically, if the table breaks, I have to repeat the same text box below the table at every page and not only in the last page.   I cannot use footer for this implementation because in case the table is only few rows I want to display the text box immediately after the table and not at the bottom of the page.  A sample doc has been .

I have a table that is longer than one page. I have found the option to make the header of the table to be added to the second portion of the table after the page break. Is there a way to do the same thing with a footer on the table? I want to add a footer so that if my table was 1000 entries long (12 pages), that the first and last row of each page would be consistent; a header and footer for the table. If I edit the rest of the document (above the table) the table will shift up/down and I want to header and footer of the table to remain at the page breaks. Any ideas?     PAGE BREAK   HEADER OF TABLE TBL TBL TBL TBL TBL TBL TBL TBL TBL TBL TBL TBL FOOTER OF TABLE      PAGE BREAK   HEADER OF TABLE TBL TBL TBL TBL TBL TBL FOOTER OF TABLE  TEXT TEXT TEXT TEXT TEXT TEXT      PAGE BREAK


HTML select list with height values as follows. When button btn-change-height clicked i want to change select value as 500 and text as 5'0". but text is not changing. why?   $("#btn-change-height").click(function() {     $("#heightSelect1").val('5\' 0\"').change();   });   <select class="btn nav-height-select" id="heightSelect1" autocomplete="off">     <option value="400">4' 0"</option>     <option value="401">4' 1"</option>     <option value="402">4' 2"</option>     <option value="403">4' 3"</option>     <option value="404">4' 4"</option>     <option value="405">4' 5"</option>     <option value="406">4' 6"</option>     <option value="407">4' 7"</option>     <option value="408">4' 8"</option>     <option value="409">4' 9"</option>     <option value="410" selected="selected">4'10"</option>     <option value="411">4'11"</option>     <option value="500">5' 0"</option> </select>

I have a drop-down list with known values. What I'm trying to do is set the drop down list to a particular value that I know exists using jQuery.  Using regular JavaScript, I would do something like:  ddl = document.getElementById("ID of element goes here"); ddl.value = 2; // 2 being the value I want to set it too.   However, I need to do this with jQuery, because I'm using a CSS class for my selector (stupid  client ids...).  Here are a few things I've tried:  $("._statusDDL").val(2); // Doesn't find 2 as a value. $("._statusDDL").children("option").val(2) // Also failed.      How can I do it with jQuery?     Update  So as it turns out, I had it right the first time with:  $("._statusDDL").val(2);   When I put an alert just above it works fine, but when I remove the alert and let it run at full speed, I get the error     Could not set the selected property. Invalid Index   I'm not sure if it's a bug with jQuery or Internet Explorer 6 (I'm guessing Internet Explorer 6), but it's terribly annoying.


Is there a closed formula for:  $\sum_{i=1}^{N}{\binom{i+k}{i}}$   ( k is a constant whole number )

What is the sum of number of ways of choosing $n$ elements from $(n+r)$ elements where $r$ is fixed and $n$ varies from $1$ to $m$ ? Can this be reduced to a formula ?  $$ \sum ^m _{n=1} \binom{n + r}n $$


So I'm trying to take a series of "scores" from a text file to put into an array and then sort in order, rows of four, and write other methods to get the highest, lowest, average, etc. The println commands are in there but I haven't written the methods yet. I've been working all day and I'm starting to confuse myself, and now I'm getting a NullPointerException error in the main method. Any help?  package arrayops1d;  import java.io.*; import java.util.*;  public class ArrayOps1D {      static int scores[];     public static void main(String[] args) throws Exception{         FileReader file = new FileReader("C:/Users/Steve/Documents/"                 + "NetBeansProjects/ArrayOps1D/Scores.txt");         BufferedReader reader = new BufferedReader(file);          String scores = "";         String line = reader.readLine();         while (line != null){             scores += line;             line = reader.readLine();         }           System.out.println(scores);         System.out.println(getTotal());         System.out.println(getAverage());         System.out.println(getHighest());         System.out.println(getLowest());         System.out.println(getMedian());         System.out.println(getPosition());         System.out.println(getDeviations);         System.out.println(getStdDev);   }

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


I finished my undergraduate studies in Mechatronics Engineering and have a low CGPA. The main reason is that I'd been developing web application and doing small projects (creating robots). I have interested in doing Masters in computer science, because it would help me to get better understanding and I have a huge interest in artificial intelligence systems. Do Universities in USA accept undergraduates, who don't have CS and have less CGPA? Please share your ideas. It will, really, help me a lot.

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.


I have merged three external pdf files. Now I want to create table of contents of this resultant pdf file. Here \tablesofcontentsis not working.  \documentclass{article} \usepackage{pdfpages} \begin{document}  \includepdf[pages={1,2,3-30}]{myfile1.pdf} \includepdf[pages={1,2,7-40}]{myfile2.pdf} \includepdf[pages={990}]{myfile3.pdf}  \end{document}

How to make Table of Contents for a set of PDF files?  Here's my code!  \documentclass{book} \usepackage{pdfpages} \usepackage[pdfauthor={<somename>},pdftitle={<sometitle>},pdftex]{hyperref} \usepackage{fancyhdr} \usepackage{tocloft} \usepackage[margin=0.5in,bottom=0.75in,top=0.75in]{geometry}   \pagestyle{fancy} \renewcommand{\headrulewidth}{0.4pt} \fancyhead[L]{X Y Z} \fancyhead[R]{} \begin{document}  \tableofcontents \newpage  \clearpage \phantomsection \includepdfset{pages=-,pagecommand=\thispagestyle{fancy}} \addcontentsline{toc}{chapter}{SAMPLE PDF 1\\ \textit{description}} \includepdf[pages=-]{template1.pdf}  \clearpage \phantomsection \addcontentsline{toc}{chapter}{SAMPLE PDF 2\\ \textit{description}} \includepdf[pages=-]{template2.pdf}  \clearpage \phantomsection \addcontentsline{toc}{chapter}{SAMPLE PDF 3\\ \textit{description}} \includepdf[pages=-]{template3.pdf}  \clearpage \phantomsection \addcontentsline{toc}{chapter}{SAMPLE PDF 4\\ \textit{description}} \includepdf[pages=-]{template4.pdf}  \clearpage \phantomsection \addcontentsline{toc}{chapter}{SAMPLE PDF 5\\ \textit{description}} \includepdf[pages=-]{template5.pdf}  \end{document}   Here's the output.    My problem is that the page number is not aligned with the title, it is aligned with the description. Also I'd like to put dots.   My desired output looks like this:


I have a 2130 bounty in the reach. A Bounty Hunter approached me and I paid him and then killed him. Now, every time I try to clear my debt outright, the game freezes. Is there any way to prevent this?  I have my weapon sheathed when they approach.

I accidentally killed a noble, now every guard wants to kill me. Is there any way I can get rid of the bounty?


there I'm trying to installing Ubuntu 18.04 LTS on HP Pavilion G series notebook but it shows message of faulty DVD/CD ..etc. And not installing please help me....

This is the third time I've tried to install Ubuntu Server 14.04.03 64-bit on the same laptop, and each time it caused different problems.  Each time I wrote the same iso image to a USB flash drive by using a different application and OS.   Universal USB Installer (pendrivelinux.com) from Windows WinImage writer from Windows built-in image writer from Linux Mint 17.2    The iso image is the same in all three cases, the USB flash drive is the same, and the laptop is the same. However each time the installation of Ubuntu gave me different installation options. For example, the last time I installed Ubuntu, it didn't show all the packages to choose while installing (Basic Ubuntu server, etc.).


I was reading about the Miyaguchi-Preneel scheme and had difficulty in understanding why the compression function, $h(H,m)=E(H, H \oplus M) \oplus M \oplus H$ can be called secure. The only resource I could find about this was .  Again, I am having trouble with the explanation provided there. So, if someone could please clear my doubt, that would be great, thanks!

The Davies-Meyer compression function $h(H, m) = E_m(H) \oplus H$ is said to be secure.  So too is the Miyaguchi-Preneel compression function $h(H, m) = E_m(H) \oplus m \oplus H$.  Why are these secure?  How do we know that they are secure?  (Here $E$ is a block cipher with $n$-bit key and $n$-bit plaintext; $E_k(x)$ denotes encryption of plaintext $x$ under key $k$.  This question is based upon  by .)


I wonder if there is any package that produces a  \mathbb{} symbol for lowercase letters.  Thanks in advance!

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I am aware of the format using (yyyy-MM-dd) but the inputted date must be in yyyy/MM/dd and i am having trouble formatting it cause java wont read the format yyyy/MM/dd how to do this cause in model its in date format and i cannot set it when im returning string so return value must also be in date??  My request parameter from JSP  String HireDate = request.getParameter("hireDate");     emp.setDoh(DateUtil.StringToDate(HireDate));   MY JQuery  $( function() { $( "#hireDate" ).datepicker({ dateFormat: "yy/mm/dd" }).val(); });   My Model  private Date doh; public Date getDoh() {   return doh; }  public void setDoh(Date doh) {   this.doh = doh; }   DateUtil Class  public static Date StringToDate(String date) {   SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd", Locale.ENGLISH);   java.util.Date date1 = null;   try {     date1 = sdf.parse(date);   } catch (ParseException e) {     // TODO Auto-generated catch block     e.printStackTrace();   }   Date sqlDate = new Date(date1.getTime());   return sqlDate;   }    public static String DateToString(java.util.Date date) {   String convertedDate = "";   if(date != null){   Format formatter = new SimpleDateFormat("yyyy/MM/dd");   convertedDate = formatter.format(date);   }   return convertedDate;   } }   I would like to make a static boolean function in another class which i will call to know if its a valid date whenever im using format yyyy/MM/dd in parsing it always returns the whole date including CST year etc,any suggestions??

I find it curious that the most obvious way to create Date objects in Java has been deprecated and appears to have been "substituted" with a not so obvious to use lenient calendar.  How do you check that a date, given as a combination of day, month, and year, is a valid date?  For instance, 2008-02-31 (as in yyyy-mm-dd) would be an invalid date.


I am learning Java and there's something bothering me and the textbook doesn't explain it. I understand that you use modifiers to declare methods inside classes and all. But I suddenly got to a class declared like static void(){ }  Why is there no public or private modifier and it still works? Can I avoid using the public modifier everywhere else or how does that work? I understand that static means member of the class and void that it doesn't return a value. Yet why not public or private for that matter.

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


Please tell me why fun(k++) is wrong while fun(++k) is okay in the following code. The error information is error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int' #include <iostream>  using std::cout;  void fun(int &k) {     cout << k; }  int main() {     int k = 1;     fun(k++); // error     fun(++k); // good      return 0; }


Some free applications on Google Play are limited to the United States so the rest of the world has to use dodgy sites to get them. However the security of such sites are questionable as the apps might be modified and contain some kind of malware. Is there a way to get the SHA or MD5 hash of the apk file from the play store so it can be compared with the downloaded one to make sure that it's safe?

The latest update of Google Maps is unavailable in my country, so I downloaded a version by googling for "Google Maps 5.4.0 apk".  I did in fact find it, but now I wonder how I can tell if this is in fact the same version as in the market.  How can I be sure that it hasn't been tampered with? Are apps signed in any way? Is there any way of checking the signatures?


I'm confused about why this proposition is true if this property is not true at all.  $Proposition$  2.1.11.  A certain property $P(n)$ is true for every natural number n.  Proof. We use induction. We first verify the base case $n = 0$, i.e., we prove $P (0)$. (Insert proof of $P (0)$ here). Now suppose inductively that n is a natural number, and $P(n)$ has already been proven. We now prove $P$(n++). (Insert proof of $P(n++)$, assuming that $P(n)$ is true, here). This closes the induction, and thus $P(n)$ is true for all numbers n.   Thanks.

I am reading "Analysis I" by Terence Tao.       Axiom 2.5 (Principle of mathematical induction).   Let $P(n)$ be any property pertaining to a natural number $n$. Suppose that $P(0)$ is true, and suppose that whenever $P(n)$ is true, $P(n++)$ is also true. Then $P(n)$ is true for every natural number $n$.     Next he wrote this proposition:       Proposition 2.1.11.   A certain property $P(n)$ is true for every natural number $n$.   Proof. We use induction. We first verify the base case $n=0$, i.e., we prove $P(0)$. (Insert proof of $P(0)$ here). Now suppose inductively that $n$ is a natural number, and $P(n)$ has already been proven. We now prove $P(n++)$. (Insert proof of $P(n++)$, assuming that $P(n)$ is true, here). This closes the induction, and thus $P(n)$ is true for all numbers $n$.     What is this proposition? I cannot understand why Tao wrote this proposition. Isn't it obvious from Axiom 2.5?    I cannot understand.


Assume $f$ is continuous. For some fixed $a\in(0,1)$ and some real number A, $$\lim\limits_{x\to0}\frac{f(x)-f(ax)}{x}=A.$$ Prove that $f$ is differentiable at $x=0$ and compute the value of $f’(0)$. I do not know how to use the condition. Can someone help me?

Problem:   If $f(x)$ is continous at $x=0$, and $\lim\limits_{x\to 0} \dfrac{f(ax)-f(x)}{x}=b$, $a, b$ are constants and $|a|>1$, prove that $f'(0)$ exists and $f'(0)=\dfrac{b}{a-1}$.   This approach is definitely wrong:    \begin{align} b&=\lim_{x\to 0} \frac{f(ax)-f(x)}{x}\\ &=\lim_{x\to 0} \frac{f(ax)-f(0)-(f(x)-f(0))}{x}\\ &=af'(0)-f'(0)\\ &=(a-1)f'(0) \end{align}  I will show you a case why this approach is wrong:     \[f(x)= \begin{cases} 1,&x\neq0\\ 0,&x=0 \end{cases}\]   $\lim_{x\to0}\dfrac{f(3x)-f(x)}{x}=\lim_{x\to0} \dfrac{1-1}{x}=0$   but $\lim_{x\to0}\dfrac{f(3x)}{x}=\infty$,$\lim_{x\to0}\dfrac{f(x)}{x}=\infty$   Does anyone know how to prove it? Thanks in advance!


How to install Virtual box in Ubuntu 16.04?

I downloaded VirtualBox OSE from the Ubuntu Software Center but it seems that that version is limited. I prefer to have the complete version and don't really care if it's closed source or not.  Can I install it via a terminal or do I have to download something from a website?  I don't know how to install software I download from the web. So far I've only used the Software Center.


I've already done open the billing information , but the thing is "none" doesn't exists , there only "visa , master and Amex"

I already have an Apple ID, made at Apple.com. Now, when I want to access the App Store from my iPad, I am told that I have to review my information. On the credit card page, I am not presented with a "None" option, even though I am in the United States.   What can I do to proceed without entering this information?


Consider positive integers $m>n$ and function $\phi (x)$ from $Z_m$ into $Z_n$ equal to the remainder when $x$ is divided by $n$. Is $\phi$ a homomorphism? I.e is $\phi(x+y)=\phi(x)+\phi(y)$ for every $x,y \in Z_m$  Fraleigh asks a number of these questions with concrete $m,n$ that can be proved by inspecting cases but this is messy and it seems that if $n|m$ than $\phi$ is a homomorphism but I am not sure how to prove it in the general case. I can prove that if gcd(m,n)=1 that it is not a homomorphism.

Let $m$ and $n$ be two given positive integers such that $m<n$. Then what are the necessary and sufficient conditions for the groups $(\mathbb Z_m,+_m)$ and $(\mathbb Z_n,+_n)$ to be homomorphic under the map $\phi \colon \mathbb Z_n \to \mathbb Z_m$ such that $\phi(x)$ is the remainder when $x$ is divided by $m$, for each $x$ in $\mathbb Z_n$.   I know that if one of these integers is a divisor of the other, then the groups are homomorphic.


How do I resize & replace a layer that is displaced & too big?     The purple background above is actually a layer representing a state. I have tried using "Define Projection" and "Project" tool, but I wasn't successful with it.  I am really new to this software.

I put 4 different layers into my ArcMap document, but only one of them will show up on the map! I should be seeing the other 3 layers as well. When I do a Zoom to layer, I can see one layer, but I cannot figure out how to make the other 3 show up at once on top of each other.  Before I opened ArcMap, I used ArcCatalog where I right-clicked 3/4 of the shapefiles and  clicked Properties → Coordinate system → Import and then clicked on my Trees layer, which has the coordinate system I want the other 3 to have. But when I opened ArcMap the 4 layers did not overlap, nor could I move them above or below each other.


If I wanted to combine these two sentences with and.  There are five documents on the table. There are five pens on the table. Might I say There are five documents and pens on the table? Would the first five here represent the second so that I would not need to say five twice?

I gave him 10 iPads and Computers Does this mean I gave him 10 ipads and 10 computers or Computers + Ipads = 10? Sources if any?


Python has an if operator '?' like Java?  Example in Java:  String res = (2 > 1) ? "yes" : "no";

If Python does not have a ternary conditional operator, is it possible to simulate one using other language constructs?


So what I want to do is animate a texture on an object using a camera's view of other objects in the same .blend file (possibly in another Scene.) As the animated objects under the texture camera move, the rendered texture is applied to a main object that is rendered on a main camera for the main animation.  In other words, as the objects under one camera move, the rendering of their movement is applied as a texture to another object while THAT object is rendered as part of a bigger animation.  Anybody have any ideas on how to pull this off? I can try to elaborate more if needed.

Kind of like a TV, CCTV, or the portal for Portal and Portal 2, so I can see what the camera is seeing on an object. I don't care whether its a material or a modifier, or something like that, even if someone will make a script that is a node or whatever as long as it works, nothing specific as in how I would go about it.


Question:  Six friends hold a Christmas present swap. Each person brings a present, and puts it into a sack. Once all six presents are in the sack, each participant in turn then draws out a present at random (presents are not replaced once drawn). The swap is deemed lucky if no participant draws out the present that he or she put in. What is the probability that the swap is lucky?   Where I am at so far:  Let A B C D E F be the 6 people. Let $A_P$ $B_P$ $C_P$ $D_P$ $E_P$ $F_P$ be the 6 gifts.  The set {A, B, C, D, E, F} has 6! permutations. Now each permutation gives the order in which order people choose presents from the sack. Let's call the set of all these permutations R.  There are also 6! permutations of {$A_P$ , $B_P$ , $C_P$ , $D_P$ , $E_P$ , $F_P$}. Each one of these permutations give the order in which present are chosen from the sack. Let's call the set of all these permutations S.  R x S gives the set of all possible ways the 6 people choose presents. For example, ( (A, B, C, D, E, F), ($B_P$ , $A_P$ , $D_P$ , $C_P$ , $F_P$ , $E_P$) ) means A chooses first and selects $B_P$, B chooses second and selects $A_P$, C chooses thirds and selects $D_P$ etc.  Counting the number of unlucky swaps  Now all I can count so far are the number of possibilities where the 6 people choose their own presents. That's just $720$. But I know there are more but I don't know how to count them.  Counting the number of luck swaps  I was thinking if I figured out how many ways there are to rearrange the first row of the following table so that A does not appear in column A more than once, B does not appear in column B more than once, C does not appear in column C more than once etc. Then may be I could figure out how many lucky swaps there are. But again I don't know how many permutations like this exist.  \begin{array}{|c|} \hline \hline A& B& C& D& E& F&\\ \hline B& C& D& C& F& E&\\ \hline C& E& A& F& B& D&\\ \hline D& E& F& A& B& C&\\ \hline E& C& B& F& A& D& \hline  & & &\\ \hline.  & & &\\ \hline.  & & &\\ \hline. \end{array}

I understand the whole concept of Rencontres numbers but I can't understand how to prove this equation  $$D_{n,0}=\left[\frac{n!}{e}\right]$$  where $[\cdot]$ denotes the rounding function (i.e., $[x]$ is the integer nearest to $x$). This equation that I wrote comes from solving the following recursion, but I don't understand how exactly the author calculated this recursion.  $$\begin {align*}  D_{n+2,0} & =(n+1)(D_{n+1,0}+D_{n,0}) \\ D_{0,0} & = 1 \\ D_{1,0} & = 0  \end {align*} $$


I have two static procedures in one class that are called at various points during real time.  Both procedures access the same list. One adds to the list, the other removes items from the list.  The problem is that they are both conflicting with each other and I repeatedly receive the message:  "Collection was modified; enumeration operation may not execute"   Forgive my ignorance. But I believe I need to lock the collection somehow, whilst one task is working on it. But I also want the other process to immediate take over once the other task has finished.  Thanks in advance

I'm getting the error below when trying to loop through a listbox and then remove the item.     List that this enumerator is bound to has been modified. An enumerator can only be used if the list does not change.   foreach (string s in listBox1.Items) {     MessageBox.Show(s);     //do stuff with (s);     listBox1.Items.Remove(s); }   How can I remove the item and still loop through the contents?


Let   $$  a_n =  \left( 1 - \frac{1}{\sqrt 2} \right)  \dotsm  \left( 1 - \frac{1}{\sqrt {n+1}} \right),  \quad  n\geq 1. $$   Then $\lim_{n \to \infty} a_n$         is $1$,   is $0$,   does not exist,   is $\frac{1}{\sqrt\pi}$.      I tried this using the sandwich theorem as $$  0 \leq \sum_{r=1}^{n} \frac{-1}{\sqrt r+1} \leq \frac{-n}{\sqrt {n+2}} $$  which goes to zero. I am not sure though.

Let $$a_n=\left(1-\dfrac{1}{\sqrt2}\right)\dots \left(1-\dfrac{1}{\sqrt{n+1}}\right),n\ge1$$ Then find $\lim_{n\to \infty} a_n$.   How can I proceed? I am stuck at the first step. Please help.


I'm new to the software, using blender 2.78 on an iMac with OS X 10.6.8. I've been working on a file for a few days now, when a important panel to the right suddenly disappeared.  This is how it looks right now:     The panel marked in red in this picture is the one i need:    Notice how the three lines in the corners that you can grab to change the size of view windows/panels also is gone in the file I'm working on. Marked with green circle in top right corner.  Edit: Solved the problem by opening the file with "load UI" unchecked. Still wonder why the three lines in the corners of the panels disappeared though.

I am new to Blender and I am trying to find my way through its interface. I want to have several windows (I mean OS windows, not Blender windows). So I create a separate window by dragging splitter widget while holding Shift.  The problem is there are no splitter widgets in the newly created OS window. So I can't have multiple blender windows in it. The new window does not have a Layout type drop down menu either. So how do I add new Blender windows in a new OS window? (Sorry if I'm using the wrong terms, but hopefully its clear what I am trying to achieve).


Regularly, I have seen the following syntax:  awk 'stuff' <file sort <file   The thing is, I usually write:  awk 'stuff' file sort file   And things work perfectly. So if both syntaxes are roughly equivalent (or are they?), is there any benefit from using <file syntax ?  EDIT  Existing threads cover some of my interrogations (using < implies that the shell opens the file first and then passes it as standard input to the command), but I feel that some remain:   POSIX compliancy ? Is it to dissipate any ambiguity concerning the nature of file argument ? Is it specific to a certain type of shell ? Is it considered deprecated ? Performance-wise, is there a notable difference ? Any example where you would use one against the other is welcome.

I used the following two commands to produce the same results:-  [root@localhost ~]# grep line comments The line should start with a single quote to comment in VB scripting. Double slashes in the beginning of the line for single line comment in C. [root@localhost ~]#  [root@localhost ~]# grep line <comments The line should start with a single quote to comment in VB scripting. Double slashes in the beginning of the line for single line comment in C. [root@localhost ~]#   Could any please explain to me any pros/cons if any of these 2 approaches over each other.


Does turning airplane on and off constantly on my iPhone 6s ruin my hardware or ruin the iPhone in any way?

I want to try to save my iPad batteries, so I turn on the airplane mode when I don't use the iPad during the day and at night. I could toggle airplane mode on/off for more than 12 times in a day.  Do you think it's worth it to put iPad into airplane mode when I don't use it during the day? and is frequently toggling ipad airplane mode on/off harmful to iPad hardware (shorten hardware life)?


When I insert some scratched CDs or DVDs and try to read them, the whole operating system (Win7 in my case) seems to hang. Looks like all hard drive I/O is also paralized and most Windows OS hangs. Why does this happens? Is there any other OS or configuration that does not have this issue?  I'm unable to test this on my newer systems because they dont have optical drives...   This may be related to either Windows architecture, the driver model, a problem with PATA/SATA design, but I am not sure which one is the culprit.

Why does a hard drive which is known to have bad blocks (verified in HDTune and HDDScan), freezes down my entire system?  It is not the OS drive; it is attached to another SATA port, and I'm trying to copy files from it to another healthy drive.  I have experienced this issue with almost every damaged hard drive and every Windows PC.  I would expect to see freezing only for the program I'm using to copy the files (Windows Explorer, etc.), but instead my entire PC gets jerky, and I cannot browse web or watch movies while copying files from the damaged drive.  The long story.  I live in a rural area where there are problems with electricity (brownouts, etc.). I myself am using a UPS and my own hard drives are perfectly fine. But my neighbors often ask for help with their PC issues, and I often find that their hard drives are damaged, most probably because of electricity issues. Of course, after replacing the damaged drive I suggest my neighbors to buy an UPS.  I have always wondered, why my PC freezes entirely while retrieving data from damaged drives. Is it a hardware issue? Is it caused by the way OS reads data? Is it something Windows-specific, and I won't experience it on *nix?  Anyway, from now on I will use some dedicated software (such as Roadkil's Unstoppable Copier) instead of Windows Explorer, although I'm not sure if this will work differently, without freezing entire PC.  It is not a request for help, it is more for educational purposes, so I know why the things work that way.


I just faced this question in interview. Is it possible to escape character within single quotes in ruby?  The confusion is in following code  puts '\\'   # Output: \ puts '\n'   # Output: \n   It seems that backword slash is escaped but the newline character isn't.  I am aware of  but I am not asking about difference between single and double quote. I am asking about whether it's possible to escape characters in single quotes or not? And why only backslash is allowed to escape?

If I add a backslash+space to the start of double and single quoted strings, I get different results:  "\ text" '\ text'    In the output for the double quoted string I see only a space. In the output for the single quoted string I see backslash+space.  What's happening there? Is this because '\ ' is interpreted as a special character in the double quote string but in the single quoted string the characters are preserved as is?  If I change the strings to this, I see the same output, namely a single slash followed by a space and then the text:  "\\ text" '\\ text'    In both cases the backslash is escaped. I'm confused why they work the same way in this situation.   Is there some rule that would help to explain the fundamental difference between how single quoted strings and double quoted strings handle backslashes in Ruby?


I see that the 1.3 Dev package is found in the 11.10 version of Ubuntu but I am wondering if it still needed to use the PPA maintained by Scott or was it merged somehow to the Ubuntu repositories by default. For what I see the wine 1.3 that comes with Ubuntu is the 1.3.28 version and the one Scott has in his PPA is the latest 1.3.30. So my questions regarding this are:   Will the Ubuntu version update soon to be in sync with the PPA or latest wine version. Is the Ubuntu version of wine 1.3 a different version of Wine that is maintained separate from the PPA one (Which is also a 1.3 version and this is the confusion). What happens if I add the PPA to the repositories. Will it create some conflict between both 1.3 or will the latest be the one selected.

I am looking for a step by step instruction to guide me in the ways of installing, configuring and debugging many of the issues new users have when dealing with Wine in Ubuntu.  What is the recommended way of installing Wine, some of the key issues that it has and how to solve them?  If I have a specific problem with an App in Wine, how do I go about solving it? What are the recommended steps to ensure that I can fix a problem related to an app I wish to use?


I unintentionally unlocked one drive from launcher ? How to add again ?

My dualboot-system (win7 / ubuntu 12.04) has a ntfs-formatted partition called "/share" for files I use both in win7 and ubuntu (e.g. pictures, music etc.).  I'd like to have a symbol of this drive in the launcher.  But although the partition is mounted (Mount point: /media/share) and shown in the left side bar of a folder, there is no Icon in the launcher! How can I add this Icon to the launcher?  (CompizConfig Setting manager >> ubuntu unity plugin >> Experimental >> show devices always" will only show  win-Partition, not the /share -partition)


Let $\mathbb{K}$ be a field, and consider $\mathbb{K}[[x]]$, the ring of formal power series with coefficients in $\mathbb{K}$, i.e. the set of expressions of the form $$\sum_{n=0}^{\infty}a_n x^n,\quad a_n\in\mathbb{K}$$ with the usual rules for addition and multiplication. How to show that $\mathbb{K}[[x]]$ is local ring ?  Thank you in advance

So, I was trying to find a counter-example that shows not every local ring's lattice of ideals is a chain. I think $F[[x_1,\cdots,x_n]]$ is a good counter-example but I'm not able to show that $F[[x_1,\cdots,x_n]]$ is a local ring. I read somewhere that $F[[x]]$ is indeed a local ring.  So here comes the question:  If $R$ is a local ring, what can we say about $R[[x]]$? Is it a local ring too?  I'm looking for a simple proof that doesn't use commutative algebra and localizations to show that. An elementary undergraduate level proof is appreciated.


I'm preparing for a short animation for this week. I would need to start the animation using an Orthographic Camera and then transition to a Perspective camera. Is it possible in Blender and how to do this? Or should I cheat and use a really long focal length and shorten it to achieve a similar effect?  I have a flat logo, comprising of a black circular background and a few white circular "stars" on top. The stars are connected. It looks like a little network icon. I want the logo to "become" 3D, by transitioning it from full to no opacity, and at the same time transitioning the opacity on a 3D duplicate of this network. So it sort of comes out of the logo. That's when I need to transition from Orthographic to Perspective. It needs to be orthographic in the beginning because it needs to line up with the logo. Then once it "comes out" it can be a regular 3D perspective.  So, does it make sense, is this possible to do?

I want to animate between perspective and orthographic camera views. How can this be done?  I found where people talk about successfully animating between orthographic and perspective camera views in Unity with code, so fundamentally this must be possible. But I don't know Python, so I wouldn't be able to figure it out manually with code in Blender.


Here i am creating dynamic radio buttons, text area and click events but my   click events for add and remove button is not working for the dynamically created button. I tried using on click event of jquery but it is not working as expecte. How to add .on jquery function in my scenario i tried using :  $("#TextBoxesGroup").on("click", ".abc", (function () {  //some script });   but when i click on the new dynamic add button which i created it is not at all adding another block  <!DOCTYPE html>

   Textbox #1 : <input type='textbox' id='textbox1' >    <input type="radio" name="gender" value="male"> Male    <input type="radio" name="gender" value="female"> Female
    <textarea id="textbox" rows="4" cols="50"></textarea>     <input type='button' class="abc" value='Add Button' id='addButton'>     <input type='button' value='Remove Button' id='removeButton'>     <input type='button' value='Get TextBox Value' id='getButtonValue'>

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.


EDIT:I see how it works now, in the string myString it takes everything after the space. So how would this be done if you wanted to take the first name and not the last name, since now you can't use the space if you do that.  I'd like to get the user to input their first and last name, then I'd like to print their last name only to the screen.  I know how to ask the user the question, and I was using getline to get the string of their name. But once that's happened how do I take their last name and print it out without printing out their first name as well. I can't seem to, I guess, isolate each part of the string.  I tried searching for an answer to this, but I can't seem to find one.  using namespace std; int main() {     string firstName;     string lastName;      cout << "Welcome to my store!" << endl;     cout << "---------------------------" << endl;     cout << "Please enter your first and last name. ";     getline(cin, firstName);     cout << "\nThank you " << firstName << " for shopping with us!"; }   I left the getline as is because I tried getline(cin, firstName, lastName) in an attempt to assign each word input by the user to a string but that didn't work.

Java has a convenient split method:  String str = "The quick brown fox"; String[] results = str.split(" ");   Is there an easy way to do this in C++?


So I can't review for 2 days because of too many incorrect reviews. I just got to review an answer that was good. Just a good answer. Some explanation and a piece of code that matches the question. I clicked on: Looks OK(or whatever it is) and it gave me the warning that I wasn't paying attention and that it's a bad post. So I went to look what's wrong with the post and there was a comment with like 4 upvotes that said:     This is a stolen answer from:    How was I suppose to know this exactly? I assume this was the reason why it was deleted as well.  I've had other review audits as well where I said that it was a good post yet it wasn't but I still didn't get why. Like an answer that had 1 downvote and no comments, I still didn't get why it was a bad post.  Am I the only one that thinks that this should change?

I recently came across  (to a question on implementing echo cancellation in Java) in the :  The only way to supress echo is to use "C" libary of AEC and call it from Java. AEC is a very computationally extensive algorithm and only "C" code allows optimization under your platform. Commercial optimized AEC can be found for example here . Btw, AEC will work properly provided you have done proper integration with audio drivers...  Without forming any opinion on the technical content of the answer, I viewed it as a valid answer (albeit perhaps lacking thorough detail) and clicked "Looks Good".  In response, I saw the following banner:  This post has severe quality issues.  It is abusive nonsense, noise, spam, blatantly off-topic or otherwise irredeemable - readers will find it offensive or repulsive rather than helpful. You should delete or recommend deletion when reviewing such posts. Don't worry, we've already handled this post appropriately - but please take a minute to look it over closely, keeping in mind the guidance shown above.  In what way is the post "abusive nonsense", "noise", "spam", "blatantly off-topic" or "otherwise irredeemable"?  In what way will readers find it "offensive" or "repulsive"? Should one really "recommend deletion when viewing such posts"?  I'm not entirely sure how to differentiate between "such posts" and 99% of the posts on SO.  Grateful for some guidance!


I submitted a paper in a journal under Taylor and Francis and after the first review the status of the paper is "minor review". Both of the reviewers said that my manuscript can be accepted with some minor revisions. I am currently editing the paper according to their suggestions. My question is after I submit again will it go to the same reviewers or new reviewers will be assigned? How long will it take from a minor review to acceptance? I have no problem if it goes through multiple minor reviews but my main concern is to get acceptance notice since it is mandatory for my thesis defense, even "acceptance with minor review" status will work.

What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take?  Note that this question is about the typical situation and hence not about:   Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or .   This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question.


What actually happens when an Amiibo levels up and what causes it to level up?

When using your amiibo in Smash, they will gain levels.   states:     The more the amiibo is played, the more it levels up, unlocking different moves, equipment and customization options. They will also level up faster when pitted against other amiibo fighters.   Is there anything else that makes the higher leveled amiibo better, like higher base stats or more intelligent AI?


I'm in the process of writing about the differences between machine learning and classical statistics. I've been looking for some authoritative sources that would give a good, clear, plain-English definition, but I'm struggling to find anything I like.  Personally, my own, simplest definition of classical statistics would be something like:   "Using formal mathematical proofs and assumptions to model processes underlying data and use these for inference and/or prediction"  From my experience, the only fundamental difference between ML and statistics is that ML skirts the more complicated mathematics by relying on iteration - having a computer do something repeatedly, over and over again.   One often cited difference is that classical statistics focuses on inference whereas ML focuses on prediction, but that's not an essential difference and from what I can tell, it's less and less true over time. Especially recently, many of the big guys in the field (Friedman, Hastie, Tibshirani) have been promoting statistical learning which synthesizes both classical stats & ML and uses methods from either field for both inference and prediction.  Where I think it get especially tangled is in resampling methods. For example, bootstrapping and permutation tests are used in both classical stats and machine learning. By my own definition, I'd call bootstrapping machine learning, since we can use it to avoid having to do complicated mathematics by iterating a simple algorithm (repeatedly drawing random resamples of the original data). Similarly, MCMC and HMC methods used in Bayesian statistics rely on iteration to avoid having to compute a multiple integral, so I'd call them in essence "machine learning" too.   So do you know any good sources for what is the fundamental difference between classical stats vs machine learning? Especially if there is a discussion on bootstrapping/permutation/MCMC as machine learning?

Last year, I read a blog post from  entitled  that discussed some of the differences between the two fields.  :  Simon Blomberg:      From R's fortunes   package: To paraphrase provocatively,   'machine learning is statistics minus   any checking of models and   assumptions'.   -- Brian D. Ripley (about the difference between machine learning   and statistics) useR! 2004, Vienna   (May 2004) :-) Season's Greetings!   Andrew Gelman:     In that case, maybe we should get rid   of checking of models and assumptions   more often. Then maybe we'd be able to   solve some of the problems that the   machine learning people can solve but   we can't!   There was also the  by Leo Breiman in 2001 which argued that statisticians rely too heavily on data modeling, and that machine learning techniques are making progress by instead relying on the predictive accuracy of models.  Has the statistics field changed over the last decade in response to these critiques?  Do the two cultures still exist or has statistics grown to embrace machine learning techniques such as neural networks and support vector machines?


I have a code like this:    public void genericOperation(String username, String password) throws AuthFailedException(){     if(username == null || password == null) throw new NullPointerException();     AuthMethod(username,password)      }   The method AuthMethod check if username or password match, if not will it throws AuthFailedException.  Should I made it a checked exception (AuthFailedException extends Exception) or unchecked (AuthFailedException extends RuntimeException)?  I don't know if the client of this code want to recover the code in case of exceptions.

In Java (or any other language with checked exceptions), when creating your own exception class, how do you decide whether it should be checked or unchecked?  My instinct is to say that a checked exception would be called for in cases where the caller might be able to recover in some productive way, where as an unchecked exception would be more for unrecoverable cases, but I'd be interested in other's thoughts.


I know that there are closed forms for $\sum_{k=0}^n \binom{n}{k}^2 = \binom{2n}{n}$ and a similar one for $\sum_{k=0}^n k \binom{n}{k}$.  Is there a known closed form for $\sum_{k=0}^n k\binom{n}{k}^2$?

I can calculate $\sum_{i=0}^k \binom{n}{i}\binom{m}{k-i}$ using $(1+x)^{n+m} = (1+x)^n(1+x)^m$.  I would like to calculate the two sums $\sum_{k=0}^n (-1)^k \binom{n}{k}^2$  and $\sum_{k=0}^n k \binom{n}{k}^2$  with the same method.  I don't see what polynomial I have to consider.  For the first one, if i consider $(1-x)^n(1+x)^n=\sum_{k=0}^n \sum_{i=0}^{k}(-1)^i \binom{n}{i} \binom{n}{k-i} x^k$ and the sum we want doesn't appear.  EDIT : indeed, I only have to look at the coefficient of $x^n$, which is $\binom{n}{i}\binom{n}{n-i} = \binom{n}{i}^2$.


Why was the scar that Harry received from the Avada Kedavra spell lightning shaped? Is there any reason why a death spell that was blocked by      A mother's sacrifice   Would leave a scar specifically in the shape of a lighting bolt?  In-universe answer, please.

So on a lot of HP merchandise the exact details of Harry's scar are different. The scar is a lightning bolt in a 'N' shape and not the other way around, right?   And does anyone know is Rowling made Harry's scar shaped like the Nordic sowilo rune on purpose?


Let $N\geqslant1$ be an integer. Then which of the following statements are true ?  $\displaystyle\sum\limits_{n=1}^N\dfrac1n\leqslant1+\log N$  $\displaystyle\sum\limits_{n=1}^N\dfrac1n<1+\log N$  $\displaystyle\sum\limits_{n=1}^N\dfrac1n\leqslant\log N$  $\displaystyle\sum\limits_{n=1}^N\dfrac1n\geqslant\log N$   My Attempt : $$\underbrace{\frac11+\frac11+\frac11+\frac11+\frac11+\frac11+\ldots+\frac11}_{N\text{ times}}=N$$ $$\geqslant\sum_{n=1}^N\frac1n=\frac11+\frac12+\frac13+\frac14+\frac15+\frac16+\ldots+\frac1N$$ $$\geqslant\underbrace{\frac1N+\frac1N+\frac1N+\frac1N+\frac1N+\frac1N+\ldots+\frac1N}_{N\text{ times}}$$ $$=\frac NN=1$$ $$\implies1\leqslant\sum_{n=1}^N\frac1n\leqslant N$$ Also $\;\log N\leqslant N,\;\forall N\geqslant1\,.\;$ I'm unable to combine this information to answer the question. Please help me.

Consider the partial sum of the divergent Harmonic series $H_n = \sum\limits_{k = 1}^{n}\frac{1}{k}$. I recently saw a question which required finding out the asymptotic bounds of $H_n$. Now, I could not find any bound closer than $O(n)$. So I looked up the series and found  Wikipedia article which says that $H_n - \ln n$ approaches a constant (the ). This clearly shows that $H_n = \Theta(\log n)$.  However, considering the question was in an beginners undergraduate algorithms course in CS, I was wondering if there is a simpler proof of this? Is there some clever proof requiring elementary mathematics to show $H_n = \Theta(\log n)$?  PS: This is not homework in the sense that it is not my homework, and the actual question does not ask for a proof, but rather asks a lot of functions to be arranged asymptotically.


So i'm building an application wich is asking the language to the user. But when i run it I get a NullpointerException and I can't seem to find the mistake i hope you guys can help me out.  this is my starter class  package ui;  import domein.*; import java.util.Scanner;   public class Start {  private DomeinController domeincontroller; private Taal taal; private Speler speler;  public Start(DomeinController controller) {     this.domeincontroller = controller;     this.taal = taal;     String naam, kleur, keuzeTaal;     int geboortejaar, spelerAantal;      Scanner scan = new Scanner(System.in);      System.out.println("Geef de gewenste taal in (nl, fr, en): ");     keuzeTaal = scan.next();      taal.controlleerTaal(keuzeTaal);   }  }   And this is the class where i validate the language  package domein;  public class Taal { private String taal;  public String getTaal(){     return taal; }  public void setTaal(){     this.taal = taal; }  public void controlleerTaal(String taal){     if(taal == "nl" || taal == "fr" || taal == "en"){         taal = taal;     }else{         throw new IllegalArgumentException("Gelieve een juiste taal te kiezen");     }  } }   and this is the error i get  Exception in Application start method java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at  sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389) at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767) Caused by: java.lang.RuntimeException: Exception in Application start method at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$156(LauncherImpl.java:182) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at ui.Start.<init>(Start.java:32) at main.StartUp.start(StartUp.java:27) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$163(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$176(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$149(WinApplication.java:191) ... 1 more Exception running application main.StartUp Java Result: 1

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


I'm not certain whether to use 'see' or 'watch'. It's about friends who have no other choice but to watch/see each other die. I'd be much obliged, thank you in advance.

I have seen them grow up.    I have watched them grow up.      Though the intended meaning is conveyed in both sentences, I want to know which in this case is a better fit, see or watch.


I have textured my object in Quixel and have an opacity map due to a portion of this object being glass. The issue is that when I try to use the opacity map my entire object has transparency and not just the glass. Could someone please show me a node set up (using principled shader) with an opacity map included?

How do I get the Cycles Principled BSDF shader to support a base color image such as a 32bit png with alpha or a tga with an alpha channel, and get the transparency to work. I don't see anywhere on the Principled BSDF shader that handles transparency.  Without success, I have tried:   Properties Editor>Render tab>Film rollout>Transparent Properties Editor>Material tab>Settings rollout>Viewport Alpha (changing to other than Opaque). Adding a Transparent BSDF and Diffuse BSDF after the base color image node and using a Mix Shader to combine them.


What exactly is energy (in terms a non-physicist/non-mathematician can understand)? I've been researching this topic, and it seems that energy is not a real physical state, i.e. it is only a scalar that is assigned to the state of physical systems for mathematical abstraction. In other words, energy appears to be a trait of mathematics used to describe traits of matter and non-matter fields. How accurate is this assumption? If energy is "nothing," how can the breaking of a chemical bond catalyze another reaction (e.g. formation of a bond)? That energy that is transferred, what exactly is it?

The simplistic undergrad explanation aside, I've never really understood what energy really is. I've been told that it's something when converted from one kind of something to another kind, or does some "work", as defined by us, but what is that something?  Moreover, if the total amount of energy in the universe is finite and we cannot create energy. Then, where did it come from? I've learned from thermodynamics where it goes, but where does it come from?  I know this sounds like something trivially simple, but there is so much going on in the physical universe and I just can't grasp what it is. Maybe it is because I lack the mathematical understanding that I can't grasp the subtle things the universe is doing. Still, I want to understand what it is doing.  How do I get to the point of understanding what it's doing?  (Note: What prompted me to ask this was . I'm afraid that it just puzzled me further and I sat there staring at the screen for a good 10 minutes.)


I am programming a Linux shell script that will print status banners during its execution only if the proper tool, say figlet, is installed (this is: reachable on system path).    Example:  #!/usr/bin/env bash echo "foo" figlet "Starting" echo "moo" figlet "Working" echo "foo moo" figlet "Finished"   I would like for my script to work without errors even when figlet is not installed.    What could be a practical method?

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?


Evaluation of $$\int^{\infty}_{0}\frac{x^3}{e^x-1}dx$$   $\bf{My\; Try::}$ Let $\displaystyle I = \int^{\infty}_{0}\frac{x^3}{e^x-1}dx$  Now put $\displaystyle e^x=\frac{1}{t}\;,$ Then $\displaystyle e^xdx = -\frac{1}{t^2}dt$ and $x=-\ln t$ and changing limits, We get  $$I = \int^{0}_{1}\frac{\ln^3 t}{1-t}dt = -\int^{1}_{0}\frac{\ln^3 t}{1-t}dt=-\int^{1}_{0}\ln^3(t)\sum^{\infty}_{n=0}t^ndt=\sum^{\infty}_{n=0}\int^{1}_{0}\ln^3 (t)t^ndt$$  Now Using By parts, We get $$I = 0+3\sum^{\infty}_{n=0}\frac{1}{n+1}\int^{1}_{0}\ln^2 (t)\cdot t^ndt$$  Again using By parts, We get $$I = 0-6\sum^{\infty}_{n=0}\frac{1}{(n+1)^2}\int^{1}_{0}\ln(t)\cdot t^ndt$$  Againg using by parts, We get $$I = 6\sum^{\infty}_{n=0}\frac{1}{(n+1)^3}\int^{1}_{0}t^ndt = \sum^{\infty}_{n=0}\frac{6}{(n+1)^4}=6\zeta(4)$$  Now how can i solve it, Help required, Thanks

In a certain list of exercises, contained the question     $$\int_{0}^{\infty}{\left(x^3\cdot(e^x-1)^{-1} \right)}dx$$   How do you solve?


Let $n$ and $p$ be two integers. Show that either $np$ is even, or $n^2 − p^2$ is a multiple of $8$.   If either one of $n$ or $p$ is even then $np$ is even and we are done. So let both of them is odd.  Let $n = 2m+1$ and $p = 2k + 1$. Then $$n^2 − p^2 = 4m^2+4m-4k^2-4k = 4(m-k)(m+k+1)$$  Now if both $m$ and $k$ are odd or even then $8 \mid 4(m-k)$ and we are done. If one is odd and one even then $8 \mid 4(m+k+1)$ and we are done.  So either $np$ is even, or $n^2 − p^2$ is a multiple of $8$.  Is the proof correct?

Prove: If $a$ and $b$ are odd integers, then $8\mid (a^2-b^2)$  So far I have: $$8\mid \left((2n+1)^2-(2m+1)^2\right)\Longleftrightarrow 8\mid \left(4n^2+4n+1-4m^2-4m-1\right) $$ Is this right so far? Where do I go from here? Step by step explanation please!


I have following code (coords calculations for grenade trajectory)  public class GrenadeTrajectory {     public int speedValue;     public static boolean shotStart;     public boolean stop;     ArrayList<Integer> xA = new ArrayList<Integer>();     ArrayList<Integer> yA = new ArrayList<Integer>();     Executor executor = Executors.newSingleThreadExecutor();     Worms worms = new Worms();     MapSettings MapSettings;     public void startTask()     {           stop = false;         executor.execute(new Runnable()          {             @Override             public void run()              {                 int TRAJECTORY_STEPS = 10;                 double alpha = 45.0;                 double x0 = MapSettings.mp_player1_weapon_position_x;                 double y0 = MapSettings.mp_player1_weapon_position_y;                 double v0 = 50.0;                 double g = 8.91;                 double c = Math.sqrt(Math.pow((worms.getWeaponDirectionPosition(true) + MapSettings.mp_player1_weapon_position_x), 2));                 double degrees = Math.acos((worms.getWeaponDirectionPosition(true) - MapSettings.mp_player1_weapon_position_x) / Math.pow(worms.getWeaponDirectionPosition(true) - MapSettings.mp_player1_starting_position_x, 2) - Math.pow(MapSettings.mp_player1_starting_position_y - worms.getWeaponDirectionPosition(false), 2));                 double[] arrayX = new double[TRAJECTORY_STEPS];                 double[] arrayY = new double[TRAJECTORY_STEPS];                 for (int t = 0; t < TRAJECTORY_STEPS; t++)                 {                      arrayX[t] = x0+v0*Math.cos(degrees)*t;                     arrayY[t] = y0+v0*Math.sin(degrees)*t-0.5*g*t*t;                     System.out.format("t=%d x=%f y=%f", t, arrayX[t], arrayY[t]);                 }                 Thread.currentThread().stop();               }           });     }     public void setCons(Worms w, MapSettings cfg)     {         xA.clear();         yA.clear();         worms = w;     }     public void stopTask() throws InterruptedException     {              stop = true;      }   }   And I'm getting following errors / exceptions:  Exception in thread "main" java.lang.StackOverflowError     at java.util.concurrent.AbstractExecutorService.<init>(AbstractExecutorService.java:71)     at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1305)     at java.util.concurrent.ThreadPoolExecutor.<init>(ThreadPoolExecutor.java:1198)     at java.util.concurrent.Executors.newSingleThreadExecutor(Executors.java:134)     at com.worms.ShotPower.<init>(ShotPower.java:15)     at com.worms.Worms.<init>(Worms.java:31)     at com.worms.GrenadeTrajectory.<init>(GrenadeTrajectory.java:19)   And those exceptions I have there like 1000 times. Error is on line    double c = Math.sqrt(Math.pow((worms.getWeaponDirectionPosition(true) + MapSettings.mp_player1_weapon_position_x), 2));   What am I doing wrong and how can I fix this? Thanks.

What is a StackOverflowError, what causes it, and how should I deal with them?


I was looking at an automatic flag for a duplicate answer on Drupal Answers, and I noticed the link is rendered as plain text, not a link.    If that makes any difference, I am a moderator on DA.

Oy!  links are broken, on Stack Overflow at least:        Nothing clickable here.  Markup: Duplicate answers: &lt;a href=&#39;/a/17872807&#39;&gt;17872807&lt;/a&gt;


Some people simply aren't very good at reviewing. They're actively harming the site by approving bad suggested edits, clicking "Looks OK" on spam, etc. On a site like Stack Overflow, we're not running short on reviewers.  The current review-ban system is only slightly more intelligent than a box of rocks. Your first automated ban is 2 days, then 7 days for your second within a time interval, then 30 days.   Now, what happens if you sit out the 30 day one, then immediately jump back in and review stuff badly again, failing a few audits? The system gives you a 2-day ban. And starts the progression over again.  Moderators can 'override' this... kind of. They can manually ban people from reviewing... for up to 30 days. There are far too many people who are willing to sit out the 30-day ban, then keep reviewing things wrong. The only other alternatives to keep these repeat-offenders out of the queue is to outright suspend them, something I'd really rather not do if they're being responsible with other features.   My request is twofold:   The system shouldn't reset to a 2-day ban on people with vast history. If they've already gone through a 2-7-30 cycle, their next automated ban should be 30 days. Moderators should be able to review ban people for at least 90 days. At present, a moderator would need to suspend a user completely rather than just giving them a longer break from review when repeated shorter breaks don't correct patterns of problematic review decisions.

Currently, as reviewers fail audits, they are  (2 days, then 7, then 30). At present, this caps out at 30 days. The next time a reviewer is banned, the ban duration drops down to 2 days. Even moderators cannot hand out review bans of longer than 30 days.  Over at Stack Overflow, we have quite a few users who have been banned from review 20+ times. All of them kept coming back after being banned, since they knew they could just wait out each 30 day ban and proceed to game reviews after that. For example, I saw this in the history for one user today:  Jan 21  user has been banned from review    duration = 30 days Jan 11  user has been banned from review    duration = 7 days Jan 4   user has been banned from review    duration = 7 days Dec 5 '15   user has been banned from review    duration = 30 days Nov 27 '15  user has been banned from review    duration = 7 days Nov 25 '15  user has been banned from review    duration = 2 days Oct 21 '15  user has been banned from review    duration = 30 days Oct 14 '15  user has been banned from review    duration = 7 days Oct 12 '15  user has been banned from review    duration = 2 days Sep 11 '15  user has been banned from review    duration = 30 days Sep 3 '15   user has been banned from review    duration = 7 days Sep 1 '15   user has been banned from review    duration = 2 days   Moderators receive no notification of these serial review abusers, so we have no idea what they're doing until we happen across their ban history. We've been instructed to start suspending their main account on repeated review bans, but without a way of knowing this is happening, that's a limited way of preventing them from causing damage to the site.  Therefore, I'm requesting that we allow for further escalation of the review ban duration past 30 days. This would require extending the sliding window on which bans are calculated. At present, this is 30 days, but that window could scale with the duration of the last review ban.   I'd like to see an escalation on the order of 2 days -> 7 days -> 30 days -> 60 days -> 365 days and the ability of moderators to impose manual review bans of up to 365 days, in line with our ability to suspend accounts for up to 365 days.  Moderators can always manually remove review bans, so if someone is trapped by a series of unfortunate circumstances (bad audits, etc.), we can still override the system.  I really do think we need a better way to stop the harm that certain abusive reviewers are causing to sites when they aren't deterred by the current review ban cycle.


How would you write the possessive with yourself and another person?  For example:     Would you like to join Bob's and my group?

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


I have a Drupal site I need to show for portfolio reasons so I have installed it in a sub directory.    I have changed the rewritebase to /subdir   Initially without that change I was served the homepage just fine but no interior pages. With that change I was able to get deeper into this site but when I went to login the backend it loaded forever and spit out this error:     Additional uncaught exception thrown while handling exception.      Original      PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT source FROM {url_alias} WHERE alias = :alias AND language IN (:language, :language_none) ORDER BY language ASC, pid DESC; Array ( [:alias] => user [:language] => en [:language_none] => und ) in drupal_lookup_path() (line 176 of /home/content/k/c/l/name/html/fsubdir/includes/path.inc).      Additional      PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:284:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT source FROM {url_alias} WHERE alias = :alias AND language IN (:language, :language_none) ORDER BY language ASC, pid DESC; Array ( [:alias] =&gt; user [:language] =&gt; en [:language_none] =&gt; und ) ";s:9:"%function";s:20:"drupal_lookup_path()";s:5:"%file";s:61:"/home/content/k/c/l/name/html/subdir/includes/path.inc";s:5:"%line";i:176;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] =>  [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => 173.10.171.18 [:db_insert_placeholder_9] => 1354293470 ) in dblog_watchdog() (line 157 of /home/content/k/c/l/name/html/subdir/modules/dblog/dblog.module).   Can anyone point me in the right direction to get this resolved?

Recently I started getting an error every time I try and add a content no matter what type.  This is the error that shows up in the browser:     Additional uncaught exception thrown while handling exception.        Original   PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT COUNT(cid) FROM {comment} WHERE status = :status; Array ( [:status] => 0 ) in comment_count_unpublished() (line 313 of /Applications/MAMP/htdocs/modules/comment/comment.module).        Additional      PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:154:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT COUNT(cid) FROM {comment} WHERE status = :status; Array ( [:status] =&gt; 0 ) ";s:9:"%function";s:27:"comment_count_unpublished()";s:5:"%file";s:56:"/Applications/MAMP/htdocs/modules/comment/comment.module";s:5:"%line";i:313;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => ; [:db_insert_placeholder_7] =>  [:db_insert_placeholder_8] => 127.0.0.1 [:db_insert_placeholder_9] => 1338336955 ) in dblog_watchdog() (line 154 of /Applications/MAMP/htdocs/modules/dblog/dblog.module).   I also get the following error in my php error file:     PHP Fatal error:  Uncaught exception 'PDOException' with message 'SQLSTATE[HY000]: General error: 2006 MySQL server has gone away' in /Applications/MAMP/htdocs/includes/database/database.inc:2136        Stack trace:   0 /Applications/MAMP/htdocs/includes/database/database.inc(2136): PDOStatement->execute(Array)   1 /Applications/MAMP/htdocs/includes/database/database.inc(664): DatabaseStatementBase->execute(Array, Array)   2 /Applications/MAMP/htdocs/includes/database/database.inc(2315): DatabaseConnection->query('SELECT expire, ...', Array, Array)   3 /Applications/MAMP/htdocs/includes/lock.inc(167): db_query('SELECT expire, ...', Array)   4 /Applications/MAMP/htdocs/includes/lock.inc(146): lock_may_be_available('theme_registry:...')   5 /Applications/MAMP/htdocs/includes/theme.inc(447): lock_acquire('theme_registry:...')   6 /Applications/MAMP/htdocs/includes/bootstrap.inc(427): ThemeRegistry->set(Array)   7 [internal function]: DrupalCacheArray->__destruct()   8 {main}         thrown in /Applications/MAMP/htdocs/includes/database/database.inc on line 2136   I am having a little trouble deciphering these error messages. Could anyone help me understand what's going on here?


I can sometimes assign null to int? but not inside a ? : , why?   example   int? a;  // good     int? b; // good       a = null;  // why is this allowed?     b = (a != null) ? 1 : null /* and this not allowed? */;       b = (a != null) ? 1 : (int?)null /* this is a fix */;

Could someone explain why this works in C#.NET 2.0:      Nullable<DateTime> foo;     if (true)         foo = null;     else         foo = new DateTime(0);   ...but this doesn't:      Nullable<DateTime> foo;     foo = true ? null : new DateTime(0);   The latter form gives me an compile error "Type of conditional expression cannot be determined because there is no implicit conversion between '<null>' and 'System.DateTime'."  Not that I can't use the former, but the second style is more consistent with the rest of my code.


Establish that 7 is a primitive root of any prime of the form $p = 2^{4n} + 1$.  [Hint: Because $p ≡ 3$ or $5 \ (mod \ 7)$, $(7/p) = (p/7)=-1$].  I get that $p ≡ 2, 3, 5 \ (mod \ 7)$. Not only 3,5. How should i think?

What I want to show is the following statement.  For every prime of the form $2^{4n}+1$, 7 is a primitive root.  What I get is that  $$7^{2^{k}}\equiv1\pmod{p}$$ $$7^{2^{k-1}}\equiv-1\equiv2^{4n}\pmod{p}$$ $$7^{2^{k-2}}\equiv(2^{n})^2\pmod{p}$$ Thus $(\frac{2^n}{p})=(\frac{7^{2^{k-2}}}{p})=1$.  I think that $7$ is important because $7$ is a primitive root but I don't know how to use $7$.


Show that $\sum_{n = 1}^{+\infty} \frac{n}{2^n} = 2$. I have no idea to solve this problem. Anyone could help me?

Apparently,   $$ \sum_{n = 0}^\infty \frac{n}{2^n} $$  converges to 2. I'm trying to figure out why. I've tried viewing it as a geometric series, but it's not quite a geometric series since the numerator increases by 1 every term.


I've installed in Ubuntu bionic the following package in a 64 bits system:  apt install openjdk-11-jdk   Now I try the new java:  /usr/lib/jvm/java-11-openjdk-amd64/bin/java -version openjdk version "10.0.2" 2018-07-17 OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4) OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.4, mixed mode)   The question is why I'm getting Java 10 instead of 11.  With this command, I see that no other java is installed in my system:  # update-alternatives --config java

While looking to compile OpenJDK from source, the newest General Availability version () insists on OpenJDK 9 or 10.  JDK 11, however, is not due to be released until .    However, to my surprise, when I do apt search openjdk the result is:  ... openjdk-11-jdk - OpenJDK Development Kit (JDK) ... openjdk-8-jdk - OpenJDK Development Kit (JDK) ...   No OpenJDK 9 or 10!  And wait, is that OpenJDK 11?  Maybe a Beta release?  Nooo....  So I looked at apt show openjdk-11-jdk:  Package: openjdk-11-jdk Version: 10.0.1+10-3ubuntu1 ...   Why has OpenJDK 10 been packaged as openjdk-11-*??


I tried  greedy@algorithms:~$ ls -l / total 2097292 drwxr-xr-x   2 root root       4096 11月 28 15:55 bin drwxr-xr-x   3 root root       4096 11月 28 16:34 boot drwxrwxr-x   2 root root       4096 5月   8  2018 cdrom drwxr-xr-x  20 root root       4540 12月  2 00:40 dev drwxr-xr-x 135 root root      12288 12月  1 07:32 etc drwxr-xr-x   4 root root       4096 11月 27 20:53 home   what does the second column and the 7th column mean? especially the large number 135?

What do the following numbers represent?


So I know this error/question has been posted/asked a lot on SO, but none of the answers helped me and I kept getting this error:  Fatal error: Call to a member function bind_param() on a non-object  Here is the relevant code:           $connect = new mysqli(connection info);      $search = $_POST["search"];      $sql = $connect->prepare("SELECT name, seller FROM products                               WHERE name LIKE '%' + ? + '%';");     $sql->bind_param("s", $search);       ?>   I believe it has something to do with the like clause, but I am not sure. I am a inexperienced SQL and PHP coder.  Help is greatly appreciated!

I have the following code:  $countQuery = "SELECT ARTICLE_NO FROM ? WHERE upper(ARTICLE_NAME) LIKE '% ? %'"; if ($numRecords = $con->prepare($countQuery)) {     $numRecords->bind_param("ss", $table, $brand);     $numRecords->execute();     $data = $con->query($countQuery) or die(print_r($con->error));     $rowcount = mysql_num_rows($data);     $rows = getRowsByArticleSearch($query, $table, $max);     $last = ceil($rowcount/$page_rows); }   Which should work fine. However I receive the error that :  You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? WHERE upper(ARTICLE_NAME) LIKE '%?%'' at line 1  If I put  SELECT ARTICLE_NO FROM AUCTIONS WHERE upper(ARTICLE_NAME) LIKE '% o %';   The query works fine. $table is defined above, and query is received from GET, and both are correct valid values. Why is this failing?  edit: changing to:  $countQuery = "SELECT ARTICLE_NO FROM AUCTIONS1 WHERE upper(ARTICLE_NAME) LIKE '% ? %'";  if ($numRecords = $con->prepare($countQuery)) {      $numRecords->bind_param("s", $query);   results in the error:   Warning: mysqli_stmt::bind_param() [mysqli-stmt.bind-param]: Number of variables doesn't match number of parameters in prepared statement in C:\Program Files\EasyPHP 3.0\www\prog\get_records.php on line 38  Commands out of sync; you can't run this command now  where as   $countQuery = "SELECT ARTICLE_NO FROM AUCTIONS1 WHERE upper(ARTICLE_NAME) LIKE ?";  if ($numRecords = $con->prepare($countQuery)) {      $numRecords->bind_param("s", "%".$query."%");   results in  Fatal error: Cannot pass parameter 2 by reference in C:\Program Files\EasyPHP 3.0\www\prog\get_records.php on line 38  and lastly  $countQuery = "SELECT ARTICLE_NO FROM AUCTIONS1 WHERE upper(ARTICLE_NAME) LIKE ? ";  if ($numRecords = $con->prepare($countQuery)) {      $numRecords->bind_param("s", $query);   will give only:  Commands out of sync; you can't run this command now  Is it impossible to use a paramter for a LIKE statament?


Here's the problem (per a Sudoku puzzle). Suppose I want to know the total number of combinations (order is NOT important) using ANY of the digits from 1-9 (inclusive) and WITHOUT repetition.  Furthermore the sum total of the digits and the number of digits in the combination are a Given.  The sum of the digits  must equal the stated sum For example: Sum = 10; Number of Digits = 2; Number of combinations = 4 (must be the solved value). Listing as follows: (9,1); (8,2); (7,3); and (6,4).  Two digit combo's are easy to calculate manually, which is what I did here. Now assume: Sum = 17; Num of Digits = 3; Num of Combo's = 8 (again determined manually - and I might have missed one or two!). For example:(3,6,8); (3,5,9); (4,6,7); etc. A number cannot repeat in a grouping, but can repeat in another grouping - as does the digit 3 in the first two listed groups. So, is there a way to solve for the number of possible combinations with the two Givens and stated condition as indicated?? Someone please say: "Yes, here's how". joey

How can I find the number of partitions of $n$ into exactly $k$ distinct parts, where each part is at most $M$?  The number of partitions $p_k(\leq M,n)$ of $n$ into at most $k$ parts, each of size at most $M$, is given by the generating function: $$  \binom{M+k}{k}_{x} = \prod_{j=1}^{k}\frac{1-x^{M+k-j+1}}{1-x^j}= \sum_{n=0}^{kM} p_{k}(\leq M,n) x^n $$  For the number of the partitions $p_k(\mathcal{D},n)$ of $n$ into at most $k$ parts there is the recurrence relationship: $$   p_{k}(\mathcal{D},n) = p_{k}(\mathcal{D},n-k) + p_{k-1}(\mathcal{D},n) $$  But what, if I want to count only the partitions with distinct parts and restricted number of parts and restricted part size?  Update: Now I know the generating function for the number of distinct restricted partitions $p_k(\leq M, \mathcal{D},n)$ of $n$ into exactly $k$ distinct parts, all at most $M$ is $$    \prod_{j=1}^{M} (1+xq^{j}) = \sum_{k,n=0}^{\infty}p_k(\leq M, \mathcal{D},n)x^{k}q^{n} $$ and there is also a recurrence relation $$    p_k(\leq M, \mathcal{D},n) =         p_{k-1}(\leq M-1, \mathcal{D},n-k) +         p_k(\leq M-1, \mathcal{D},n-k) $$ How can I prove this? Could you recommend a book, where I could read about this?


I just started blender a few days ago and I noticed that when making faces, they sometimes have this dotted texture compared to the generic smooth texture. I have been having difficulties with this and was wondering why these dotted faces are different from the regular faces, how do I get rid of them and what are the advantages of using them?  This is my image:   Thank you!

Can I change the color of the last selected face, so that it is the same as the other selected faces?  Here, I've selected the left face then the right face. Note the right face is some sort of checkered or dithered pattern, and just the outline has the nice orange 'selected' color.    Here I've selected the top face, note the right face has now the nice color.    And here I've deselected the top face. Now, both of the remaining selected faces have the nice color. This is the result I'd rather see instead of image 1.


Can anybody help me understand why the statement in the title is true? I've understood why it cannot by $6$ or $5$ through the formula of a $3 \times 3$ determinant, but I'm failing to understand why it can be $4$. Thanks!

Find Maximum value of Determinant of $3 \times 3$ Matrix  with  entries $\pm 1$  My try:  I considered a matrix as :  $$A=\begin{bmatrix} 1 &-1  &-1 \\  -1 &1  &-1 \\   -1&-1  &1  \end{bmatrix}$$  we have $$Det(A)=-4$$ and maximum is $4$, but how can we show that these are max and min values?   I also tried as follows:  By definition Determinant of a matrix is dot product of elements of any row with corresponding Cofactors  hence  $$Det(A)=a_{11}C_{11}+a_{12}C_{12}+a_{13}C_{13}$$  By cauchy Scwartz Inequality we have  $$a_{11}C_{11}+a_{12}C_{12}+a_{13}C_{13} \le \left(\sqrt{a_{11}^2+a_{12}^2+a_{13}^2}\right)\left(\sqrt{C_{11}^2+C_{12}^2+C_{13}^2}\right)$$  any way to proceed here?


I would like to execute multidimensional scaling () based on a matrix of Pearson correlation coefficients. The  function takes a dissimilarity matrix as an input and I therefore need to convert my similarity matrix into a dissimilarity/distance matrix. What is the correct way of doing so?  According to  answer, a similarity matrix (S) can be converted to an euclidean distance matrix (d) via:  d = sqrt(2(1-S))   It also notes that on some occasions, the factor 2 can be omitted:  d = sqrt(1-S)   According to  paper (eq. 3.4) and  paper (eq. 3), the conversion should be done as follows:  d = 1-S   Which of those answers is correct, given that my similarity matrix has values between [-1,1] and the diagonal elements are 1 (it is symmetric)?

In Random forest algorithm, Breiman (author) constructs similarity matrix as follows:   Send all learning examples down each tree in the forest If two examples land in the same leaf increment corresponding element in similarity matrix by 1 Normalize the matrix with number of trees   He says:     The proximities between cases n and k form a matrix {prox(n,k)}. From their definition, it is easy to show that this matrix is symmetric, positive definite and bounded above by 1, with the diagonal elements equal to 1. It follows that the values 1-prox(n,k) are squared distances in a Euclidean space of dimension not greater than the number of cases.    In his implementation, he uses sqrt(1-prox), where prox is a similarity matrix, to convert it to distance matrix. I guess it has something to do with the "sqaured distances in a Euclidean space"-quoted above.  Can somebody shine a little light on why it follows that 1-prox are squared distances in a Euclidean space and why he uses squared root to get distance matrix?


Need to Separate the contents of a file using shell script and store them in diff variables and then invoke Jar using those variables. E.g  _ File Conent as below 122,aaakkw 333,3232is 1222,jsjsjs  Need to separate those variables delimited by , and store them in variables and pass them into my script in a loop

I have a CSV file that contains usernames and passwords. The file looks something like this: user1,password1 user2,password2 user3,password3  I need to loop through each line to grab the username and password, use those variables, and then grab the next set of usernames and passwords, replace the content of the variables with the new ones, etc. I've been searching for the best way to do this, but I'm not very familiar scripting and I'm getting lost. I've used awk to grab both individually, but I'm struggling to figure out how to use awk within a while loop. And I'm reading that might not be a great approach.


Give a simple symmetric random walk, denote by $\mathbb P_0(T_1 < \infty)$ the probability of starting at $0$ and for the first time reaching level $1$ within finite discrete time steps. What is $\mathbb P_0(T_1 < \infty)$?  So I know by the law of total probability  $$ \begin{split} \mathbb P_0(T_1 < \infty)  &= \mathbb P_0(T_1 < \infty|S_1 = 1)  \mathbb P_0(S_1 = 1)   + \mathbb P_0(T_1 < \infty|S_1 = -1) \mathbb P_0(S_1 = -1) \\  &= \frac12 + \frac12 \mathbb P_0(T_1 < \infty|S_1 = -1) \end{split} $$  Also, $\mathbb P_0(T_2 < \infty)$ = $\mathbb P_0(T_1 < \infty)$$\mathbb P_1(T_2 < \infty)$.  In order to solve the system of the above two equations, I need to find the relationship between $P_0(T_1 < \infty|S_1 = -1)$ and $\mathbb P_0(T_2 < \infty)$. I guess they  are  equal since from $-1$ to $1$ is the same as from $0$ to $2$, but I'm not sure if that's correct.

give a simple symmetric random walk, denote $\mathbb P_0(T_1 < \infty)$ the probability that starting at $0$ and the first time reaching level 1 within finite discrete time steps. What is $\mathbb P_0(T_1 < \infty)$?  So can I assume that it hits level $1$ within $n$ steps, then use the hitting time thm to calculate the probability? Or is there another way to this?


Due to the laws of gravity and electromagnetic attraction (decreases with $\frac{1}{r^2}$) we know that space should be limited to 3 dimensions. At the same time we know that gravity bends space. All visualization of that are basically elastic 2D membranes where heavy balls are placed to create "gravity wells" of various sizes. The watcher is left to imagine all that happening with one more dimension and then you've got the way how gravity bends space. However, the membrane visualization works by distorting the 2D plane into the 3rd dimension. If I go 1 dimension higher, logically 3D space should be distorted into the 4th dimension. Basically, gravity distorts space into a dimension that shouldn't exist according to the laws of gravity? Question: where does this logical chain of arguments have a hole? (Assume I have a lot of popular science knowledge and a background in Mathematics and computer science, but no physics)

I've seen many science popularisation documentaries and read few books (obviously not being scientist myself). I am able to process and understand basic ideas behind most of these. However for general relativity there is this one illustration, which is being used over and over (image from Wikipedia):    I always thought that general relativity gives another way how you can describe gravity. However for this illustration to work, there needs to be another force, pulling the object down (referring to a direction in the attached image). If I put two non-moving objects in the image, what force will pull them together?  So where is my understanding incorrect? Or is general relativity not about explaining gravity and just describes how heavy objects bends spacetime (in that case the analogy is being used not correctly in my opinion)?    UPDATE Thank you for the answers and comments. Namely the XKCD comics is a spot on. I understand that the analogy with bent sheet of fabric pretty bad, but it seems that it can be fixed if you don't bent the fabric, but just distort the drawn grid.   Would you be so kind and answer the second part of the question as well - whether general relativity is explaining gravitational force. To me it seems that it is not (bending of spacetime simply can not affect two non-moving objects). However most of the time it is being presented that it does.


Let $R$ be the subring of $k[x, y]$ generated by $\{x y^{i}: i\geq 0\}$. Can someone explain why $R$ is not finitely generated as a ring over $k$ (i.e. finitely generated as a $k$-algebra)?   By definition, $R$ is the smallest subring over $k$ containing the set $\{x y^{i}: i\geq 0\}$. So it contains all expressions $x y^{i}$, but it also contains all polynomials in $x y^{i}$ with coefficients in $k$, such as $x y^4 + 7 x y^8$. Now, let's assume, to the contrary, that $R$ is generated by $n$ elements $f_1, f_2, …, f_n$. Then each $f_j$ is a polynomial in $xy^{i}$ (as $i$ ranges over finitely many choices). But where do we get a contradiction from here?   Source. This example is taken from Mariano's answer .

Consider the subring $R=k[x,xy,xy^2,\ldots]$ of $k[x,y]$. I want to prove that $R$ is not noetherian.   An ascending chain of ideals is the following: $$(x)\subset(x,xy)\subset(x,xy,xy^2)\subset\cdots$$ It is intuitively clearly to me that this is an ascending chain of ideals. But how do I prove it rigorously that $$xy^n \notin (x,xy,xy^2,\ldots,xy^{n-1})$$ or that this chain of ideals can never stabillize?


I would like to make an indirect call to a java method, which name is specified in a .properties file.  How can I do that ?

If I have two variables:  Object obj; String methodName = "getName";   Without knowing the class of obj, how can I call the method identified by methodName on it?  The method being called has no parameters, and a String return value. It's a getter for a Java bean.


Error: “chromedriver” cannot be opened because the developer cannot be verified.   Updated OS is Catalina, version 10.15.2 (19C57).   chromedriver was working fine prior to the OS update. I've tried both the local chromedriver that was working previously as well as a newly downloaded copy.  What can I do to get this running again?

I have the Oracle Instantclient installed (PHP needs it for the oci extension to work), the install directory is /opt/instantclient_19_3 and every time I log in after a reboot I get the following error messages which read translate to     libclntsh.dylib.18.1 cannot be opened because the developer can't be verified.    libclntshcore.dylib.19.1 cannot be opened because the developer can't be verified   I had the same errors popup when using Terminal and Hyper but since I've allowed those apps full disk access everything works fine. Still, after logging in I get both error messages, so I assume something needs permissions but I can't figure it out. Any hints?


The schedule Apex code is shown below:  global class DailyLeadProcessor implements Schedulable {       global void execute(SchedulableContext ctx){         List<Lead> leadList = [Select id from Lead where LeadSource = null LIMIT 200];         System.debug('LeadList will null LeadSource:' + leadList);             List<Lead> emptyList = new List<Lead>();          if(!leadList.isEmpty()){             for(Lead l : leadList){             l.LastName = 'SchedulableList';             l.Company = 'YourSongs';             l.LeadSource = 'Dreamforce';             l.Status='Working - Not Contacted';             emptyList.add(l);          }         update emptyList;         }     }  }     Looks everything fine but don't know the exact reason why it is not covering 100% test coverage. I tried other way around too to make it 100% but all went in vain and finally have to ask in stackexchange.

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  I'm testing asynchronous code - like Batch Apex, Queueable Apex, @future methods, or Scheduled Apex - and I'm getting unexpected results. It seems like portions of my code aren't running, or I'm getting confusing errors about batch invocations. How do I effectively test this kind of code?


How can I prove $$ \log \binom nk \leq k \left(1 +\log\frac{n}{k}\right) $$  where $\binom\cdot\cdot$ stands for combination.  I tried to use stirling approximation but I couldn't get the inequality.

This is from page 3 of  ().  Copying the relevant segment:     Stirling’s approximation tells us $\sqrt{2\pi n} (n/e)^n \leq n! \leq e^{1/12n} \sqrt{2\pi n} (n/e)^n$. In particular we can use this to say that   $$ {n \choose k} \leq \left(\frac{en}{ k}\right)^k$$   I tried the tactic of combining bounds from $n!$, $k!$ and $(n-k)!$ and it didn't work. How does this bound follow from stirling's approximation?


I know the formula for finding the number of permutations of the $3$x$3$ cube, which is $$\frac{8! \times 3^8 \times 12! \times 2^{12}}{12}$$  But why must the division by $12$ be a part of the formula? From looking it up I know it has to do with some of the positions being impossible without disassembling the cube, but why specifically division by $12$ and not another number?

Could anyone explain why the number of legal or reachable combinations of a $3\times 3\times 3$ Rubik's Cube is $1/12\mbox{th}$ of the total. I understood the logic behind the total number of combinations: $8! \cdot 2^{12} + 3^{12} \cdot 12!$. What I am not able to understand is why do we divide this quantity by $2 \cdot 3\cdot 2$. I don't have any idea about parity or group/set theory. Is there another possible explanation for it?


I have heard this favor composition over inheritance again and again in design patterns. some of the reasons cited for this are  1)Inheritance is strongly coupled where as composition is loosely coupled 2) Inheritance is compile time determined where as composition is run-time 3)Inheritance breaks encapsulation where as composition does not 4) anything else I am not aware of   It would be great for beginners like to me follow these by illustrations as how inheritance and composition differs with respect to above points. I have read various SO links that talks about them, but walk through examples on these key points would be great for Java beginners.  I think it is very crucial to understand the difference clearly than just memorizing the points.

Why prefer composition over inheritance?  What trade-offs are there for each approach?  When should you choose inheritance over composition?


That's in a chapter of my thesis template so I dont need \begin{document}. So in this chapter I wanna make a 12-column bmatrix inside this equation like this:  and thats the code im trying to form it: \begin{equation} \left[N\right] = \begin{bmatrix} N_1 & 0 & 0 & N_2 & 0 & 0 & N_3 & 0 & 0 & N_4 & 0 & 0 \\  0 & N_1 & 0 & 0 & N_2 & 0 & 0 & N_3 & 0 & 0 & N_4 & 0 \\  0 & 0 & N_1 & 0 & 0 & N_2 & 0 & 0 & N_3 & 0 & 0 & N_4 \end{bmatrix}  \end{equation}  but I get this error:  Extra alignment tab has been changed to \cr  at the 3 lines after \begin{bmatrix} and I don't know whats the problem.

I'm using bmatrix environment from the amsmath package, and I'm trying to do something like this:  \documentclass{article} \usepackage{amsmath}   \begin{document}      \begin{equation}          \begin{bmatrix}              1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11\\          \end{bmatrix}     \end{equation}  \end{document}   However, pdfLaTeX returns an error: "Extra alignment tab has been changed to \cr", and in the output the extra element is moved to the next row. (If I remove one element, then it works perfectly fine). I guess this means that I've hit some hard limit on the number of tab stops in a matrix. Is there a way to change this?  The elements in the matrix are short and could fit perfectly on a single row.


I'm thinking about switching to Ubuntu because I absolutely hate windows 10. I have a separate hdd  that has all of my media and games on it. If I install Ubuntu on my designated OS hdd can I access my media hdd from within Ubuntu and will I be able to have read/write capabilities?

How can I mount a NTFS partition so that all user accounts on my machine have write access? My mount options are  nosuid,nodev,nofail,x-gvfs-show,nobootwait,uid=1000,gid=1002,fmask=113,dmask=002   This gives me write access but when other users try to delete a file the error message pops up  Cannot move file to trash, do you want to delete immediately?    As I understand this is because they don't have write access which is what I want to change.  I created a new group (with gid=1002) and assigned it as primary group to both user accounts but that didn't help. I also tried mounting without the fmask, dmask and uid options.


How do I breed a polar bear in Minecraft? I know the same question was already asked, but that was an old post and it only had one vague answer. The bears seem to not like raw cod or salmon and when I turned to google it said to throw the raw fish or meat on the ground in front of them. I did as google instructed and honestly- feeling a bit lied to. They did nothing. I'm wondering if it's somehow an environment thing? I have them in a grassy biome instead of an icy one. Anywho, not sure what to do. Clarifying questions welcome.

How do you breed a polar bear in Minecraft? I went to the , but polar bears were not included.


I am using tar file. I am extracting using tar xvjf filename then I am doing ./configure and getting error to install package fetch. Now what to do?

dam@ubuntu:~$ sudo apt-get update   W: Failed ....  adam@ubuntu:~$ sudo apt-get install fetch   Reading package lists... Done   Building dependency tree          Reading state information... Done   E: Unable to locate package fetch


I just upgraded my laptop from Ubuntu 19 to 20.04, and after first boot my apps have all disappeared from the drawer. Furthermore I can't access all apps by searching. The software center loads, but when I click on install, I get a blank screen.  App drawer:    Installed software center:    I entered safe mode to address the issue by uninstalling and reinstalling gnome-software, cleaned the cache and updated all software, restarted the system .and yet the problem persists.  In the software center under any category selected, I can see any installed software I have and I can launch applications from there and that's how I can only access any program I have installed.  Main page software center:    Software installed:    Launch software:    The weird part is using the terminal shortcut (Ctrl+Alt+T), I can access terminal but the font is messed up really bad like alien block fonts. nothing makes sense, making that route useless.  Neofetch result in terminal:   System info:    Files, folders, settings, all intact and accessible.  Software Livepatch update:

I did an upgrade today to the latest version of ubuntu. Everything looked good and fine only for me to discover that I cannot find my applications after clicking the 'Show Applications' icon. The same applies when I search for an application in the search bar, I do not see it. It shows me an endless search.  These are the screenshot images of the problem:      In the meantime, I access my applications from the menu at the top bar and also use the terminal to run applications with CLI.