Stacks null pointer exception when pushing an object

I'm trying to write a code to find a simple path between (0,0) and (n,n) of a matrix and I'm using stacks to keep previously visited x's and y's but I'm getting "java.lang.NullPointerException" at line 28 when I'm trying to push a Pair to the stack. I've tried using .add from vectors but it also didn't help      import java.util.Arrays;     import java.util.Random;     import java.util.Stack;      public class MatrixPathfinder {         static class Pair {             private int x;             private int y;             public Pair(int x, int y) {                 this.x = x;                 this.y = y;             }             public int getX() {                 return x;             }             public int getY() {                 return y;             }         }         public static boolean hasPath(int[][] arr, int[][] visited, Stack<String> path, Stack<Pair> stack, int i, int j) {             int rowLength = arr.length;             int columnLength = arr[0].length;             //if it's the last element, output the path             if(i == rowLength - 1 && j == columnLength - 1) {                 System.out.println(path);                 return true;             }             stack.push(new Pair(i,j));             //Go right if path available             if(i >= 0 && i < rowLength && j + 1 >= 0 && j + 1 < columnLength && arr[i][j+1] != 0 && visited[i][j + 1] != 1) {                 path.push("R");                 visited[i][j + 1] = 1;                 hasPath(arr, visited, path, stack, i, j + 1);             }             //Go down if path available             else if(i + 1 >= 0 && i + 1 < rowLength && j >= 0 && j < columnLength && arr[i+1][j] != 0 && visited[i + 1][j] != 1) {                 path.push("D");                 visited[i + 1][j] = 1;                 hasPath(arr, visited, path, stack, i + 1, j);             }             //if non above satisfied, go back previous point to find another direction             else {                 if(stack.size() == 0)                     return false;                 path.pop();                 i = stack.peek().getX();                 j = stack.peek().getY();                 stack.pop();                 hasPath(arr, visited, path, stack, i, j);         }         }         public static void main(String[] args) {             Stack<Pair> stack = null;             Stack<String> path = null;             Random random = new Random();             int[][] visited = new int [5][5];             int[][] arr = new int[5][5];             for (int[] row : visited) {                 Arrays.fill(row, -1);             }             for (int i = 0; i < 5; i++) {                 for (int j = 0; j < 5; j++) {                     arr[i][j] = random.nextInt(2);                 }             }             //making sure the starting and destination points are valid path points             arr[0][0] = 1;             arr[3][3] = 1;             visited[0][0] = 1;             if (hasPath(arr, visited,path, stack,0 ,0))                 System.out.printf("Path found");             else                 System.out.println("Path not found");         }     }


My file here below has issues with referencing and do not know the problem is: Check this link to see output:   \documentclass[titlepage, 12pt]{article}  \usepackage{geometry} %set page margins \geometry{left=1.5in, right=1in, top=1in, bottom=1in} \usepackage{afterpage}  \usepackage{setspace} %set line spacing  \doublespacing \usepackage{ragged2e} %control centering and justifying  \usepackage[utf8]{inputenc} %set page numbering style  \usepackage{booktabs} %set table format \usepackage{multirow} \usepackage{caption} \usepackage{threeparttable}  \usepackage{float} %set graphics format \usepackage{graphicx} \usepackage{caption} \usepackage{subfig} \usepackage{rotating} \usepackage{tabularx}  \usepackage{amsmath} %allow use of math text \usepackage{apacite}  %I added this for references \usepackage{amssymb} \usepackage{bm} \usepackage{units}  \usepackage{listings} %allows for R code   \usepackage{color, soul} %allows to highlight text when editing   \usepackage{cite} %establish citation connection  \usepackage{blindtext} %allow dummy text for template      \begin{document}   \section{}  I am trying to make my citations work \cite{albert2014} \centering \renewcommand{\refname}{\normalsize \normalfont LIST OF REFERENCES}  %\bibliographystyle{plain} \bibliographystyle{apacite} \bibliography{refff}   %Section 14.  \newpage \pagenumbering{arabic} \setcounter{page}{17} \newgeometry{left=1.5in, right=1in, top=2in, bottom=1in} \afterpage{\aftergroup \restoregeometry} \doublespacing \centering  APPENDIX A  APPENDIX A TITLE  %Section 15.  \newpage \pagenumbering{arabic} \setcounter{page}{18} \newgeometry{left=1.5in, right=1in, top=2in, bottom=1in} \afterpage{\aftergroup \restoregeometry} \doublespacing \centering  APPENDIX B  APPENDIX B TITLE  \end{document}   refff.bib  @article{albert2014,   title={Estimating overall exposure effects for zero-inflated regression models with application to dental caries},   author={Albert, J.M. and Wang, W. and Nelson, S.},   journal={Statistical Methods in Medical Research},   volume={23},   number={3},   page={257--278},   doi={{10.1177/0962280211407800}},   year={2014},   publisher={SAGE Publications} }


How to distribute obfuscated add-ons with PyArmor

I want to obfuscate and distribute a Python add-on. I use a library called PyArmor and Anaconda Prompt for obfuscation. Obfuscation of the add-on "test.py" using PyArmor will generate a file called "test.py". Also, a folder called "pytransform" will be created in the same folder as "test.py".   What should I do when distributing and installing add-ons in Blender? Distributing just "test.py" doesn't work, so I have to distribute the entire top level folder. However, when I placed that folder in the Blender add-ons folder, it didn't install. Hiding the code may be against Blender's open source policy, but if anyone knows, please let me know.


Assume we have a function $f : \mathbb{R} \rightarrow \mathbb{R}$ such that  $f$ is differentiable for all non-zero $x$, $f$ is continuous at $0$ and  $$\lim_{x \uparrow 0} f'(x) = \lim_{x \downarrow 0} f'(x) < \infty. $$  Is it then true that $f$ is also differentiable at $0$?  If we drop the hypothesis that $f$ is continuous, this is not true since the signums function is a simple counterexample. But what if $f$ is continuous? I don't think this is true but I can't find a counterexample...


Why didn't poor Wizards/Witches turn to Muggle World to earn some money?

Why the poor Wizard Families(like Weaseleys) do not turn to the muggle world to earn some easy money and then change the Muggle money back to Wizard one and get better financially. Things like    Organizing Magic shows, (The magic He/She does looks like real!!!) cheating in Casinos (well not so a good thing...) Setting up a business for any product (as you should only need a duplicating charm to create as many product as you want) and much more.    I believe there is no restriction of usage of Magic in front of Muggles for adult wizards as long as Muggles don't get too suspicious, and I don't think Muggles will start believing in a Wizarding world out of just a Magic show. Also Muggle Money can be changed into Wizarding Money at Gringotts or how else would Muggle Born have bought the Wizard things?     "Oh look Molly, they are changing Muggle Money" said Arthur looking at nervous Hermione's parents who were standing just by the counter.


I have the OccupancyResultList list   List<Occupancy> occupancyResultList = new List<Occupancy>();   of Occupancy  public partial class Occupancy {     public Nullable<System.DateTime> on_date { get; set; }     public string type_code { get; set; }     public Nullable<int> available { get; set; }     public Nullable<decimal> rate { get; set; }     public string rate_code { get; set; }     public string publish_flag { get; set; } }   I want to create another list that has the distinct values of on_date,type_code,available  Distinct() produces a distincted result of all columns which returns repeatitions.  Can you give me a hand plz?  Thanx in advance!


asp.net MVC: binary deployment of mvc views

how can I deploy an mvc application, without publishing the aspx view files. Is there a way to publish the generated dll assemblies?   In the project file is an option "MvcBuildViews", which builds these dll files. But they are build in a temp directory and not used in the publishment process. Is there a way to include these files?   best regards


how to loop through a sequence of input files in a bash script?

I have a script file called "go" of which content reads these lines #!/bin/bash  for i in $1 $2 .. $N do nohup /usr/bin/time     $HOME/bin/antoine.out <$i  >> $i.res 2>> $i.res done  To sort .res files I run ./go file1  My intention is to give this bash script multiple files at once, but the above "for" loop doesn't work for more than two files, that is to say, N is unreadable as the number of inputs. ./go file1 file2 file3 ... filen  It outputs only the files "file1" and "file2". How to correctly make this script runs through all inputs I give, such that the number and names of inputs are not constant?


Using "are" when referring to the sum of different categories of information

I know that the word "infomation" is always singular in English. However, is it grammatically correct to use "are" when refering to sum of different categories of information (e.g., in the following sentence)?  "In this approach, the semantic and location information are obfuscated independently of each other."


Equidistribution of $\big(\frac{1+ \sqrt{5}}{2}\big)^n$ in $[0,1]$

I need to prove that the sequence $\{\gamma_n\}$ where $\gamma_n$ is the fractional part of $\big(\frac{1+ \sqrt{5}}{2}\big)^n$ is NOT equidistributed in $[0,1]$.  Now, I am not sure if I am correct but if not then please correct me. A sequence in some interval is equidistributed if it is dense in that interval. Right?? So, I was thinking of proving that $\gamma_n$ is dense in $[0,1]$ but I do not have any clue how to start. I am looking for a hint/answer that is from Fourier analytic point of view rather than number theory.


Bogus float inequality due to compiler optimization?

I found that some straightforward code results in an unexpected (and incorrect) inequality comparison on GCC 4.6.1 vs Visual Studio (2008 & 2012) or Clang 7.3.0 on OSX.  Here's a reduced snippet:  typedef float ftype; struct Foo {     ftype v;      Foo(): v(16.0f / 60.0f) {}     ftype val() const {return v * 60.0f;} };  void bar() {     Foo f;     ftype v = f.val();     if (v != f.val())         printf("inequal"); }   If ftype is typedef'd as double then the problem doesn't occur. Could this be something to do with compiler inlining? Perhaps actually returning a double instead of a float?


How to prove $\cos\left(\pi\over7\right)-\cos\left({2\pi}\over7\right)+\cos\left({3\pi}\over7\right)=\cos\left({\pi}\over3 \right)$

Is there an easy way to prove the identity?     $$\cos \left ( \frac{\pi}{7} \right ) - \cos \left ( \frac{2\pi}{7} \right ) + \cos \left ( \frac{3\pi}{7} \right ) = \cos \left (\frac{\pi}{3} \right )$$   While solving one , I am stuck, which looks obvious but without any feasible way to approach.   Few observations, not sure if it would help $$ \begin{align} \dfrac{\dfrac{\pi}{7}+\dfrac{3\pi}{7}}{2} &= \dfrac{2\pi}{7}\\\\ \dfrac{\pi}{7} + \dfrac{3\pi}{7} + \dfrac{2\pi}{7} &= \pi - \dfrac{\pi}{7} \end{align} $$


Understanding U.S. President capitalization

I was taught at an early age in the USA that when we write about our President, we are supposed to capitalize the title in order to signify that it's on the federal level. Is it correct to always do this? And what about saying "the presidency" -- should that be "the Presidency"?


How to get the max and min value of a certain NodeSocket's slider?

I'm rather new to scripting in Blender and have stumbled upon a problem I can't find a solution to. I'm trying to find the max and min value of an input of a Node.  I manage to find the input object (they're subclasses of NodeSocket) but I can't find any way to extract its max or min value. I reckon that many of them doesn't have it set, but how come then that the slider to control them seem to have a min and max? Can I extract this?   To clarify, for a Nodes input X, a slider might be restricted to values between 0 and 10 by default. If i force it to, say -10 then the slider will adapt and range between -10 and 10. Can I extract this first range somehow? Is it manually set or somehow automatically calculated in Blender?  In the below image, Blender restricts the slider to 0.1 - 20.0.   UPDATE The node in question is a custom Group Node node and comes from this , maybe that has something to do with it?


My problem is simple and I couldn't find the proper answer in this forum. My bad... I want to do that :     const dataReceived = foo;     foo(state);  How can I do that? I read it is better to avoid eval, and I couldn't get success with new Function. Thanks for your help! EDIT Thanks for your answers. I work with React. In my reducer, I have a create_item case. I can reach action.category, that can be the word 'currency' or 'country'. What I want to do is to launch either the method createCurrency or createCountry according what is inside action.category. That's why I tried to join 'create' and 'action.category' to create a dynamic function name. But it seems to be a poor idea...


Is there any way to defend with magic in DFRPG?

I feel like I am missing something obvious.  Evocation/Channeling can be used for a great deal of fun effects on your turn.  But what about when you need to make a defend roll against an enemy? As far as I can tell, the only way to defend yourself with magic is to create a block before the opponent attacks you.  The books are FULL of Harry tossing up a transient shield as a split-second reaction to someone shooting a gun, or an explosion, or whatever. In our short time with DFRPG so far, we have not figured out how this would be represented mechanically.


Finiteness of a set of integers of a number field

Let $a$ be an algebraic integer of degree $n$ and $K$ is the number field $\mathbb{Q}(a)$ with $\mathcal{O}_K$ as its ring of integers. Let $\sigma_1,\dots,\sigma_n$ be the embeddings of $K$. I want to show (or disprove) that given $M>0$, the set of $x\in\mathcal{O}_K$ such that $|\sigma_i(x)|\leq M$ for all $i$ is finite. I thought of using the norm of $x$ but I am stuck.


When shooting in mRAW or sRAW, how does the camera generate smaller files?

Most mid- and high-end DLSRs offer two or three sizes for RAW capture.  When the camera is generating the medium or small sized RAW files, how does it make them smaller?  Does it capture less information onto the sensor?  Does it capture the full amount of information and then apply some sort of in-camera compression?  Does it do something else that I'm not describing?


Ubuntu system not booting from USB stick

I have installed two versions of Ubuntu on two hard drives in my Asus laptop, one running with Ubuntu 14.04 and the other with 15.10. Originally, both systems worked, however, today when booting up and selecting 14.04, it returned an "cannot enumerate usb devices" error, and then froze. 15.10 is starting fine however, this is from where I am writing now.  I made two bootable USB sticks (I tried it from both a Windows machine with Rufus and from Ubuntu 15.10 with unetbootin and the built-in startup disk creator), one with Ubuntu 16.04 and the other with the 64-bit version of Windows 10. All "versions" of the usb sticks return the same results:  Booting from the Windows stick freezes a second after the splash screen with the blue logo appears. Also leaving it for quite a long time (an hour), nothing happens.  Booting from the Ubuntu 16.04 stick shows the initial menu with "Try Ubuntu" and "Install Ubuntu", but it gets stuck at a black screen after selecting either.  The Windows stick is formatted in FAT32 with a GPT partition table, and I made sure it has the file needed for booting.  I have obviously tried changing the boot order, enabled and disabled UEFI boot option, along with several other things.  What could be the reason for this? My aim is the install a clean dual-boot system with Windows on one hard drive and Ubuntu 16.04 on the second.


Seemingly identical code giving different result?

I'm trying to write a matrix (2d list) transpose function for fun, and while working on it I came across this very weird behavior. To me the following functions are pretty much identical (except the other has hard-coded the form of the resulting new list).  def transpose1(mat):     new = [[None] * len(mat)] * len(mat[0])      print("input1:", mat)     print("new1:", new)      for j, line in enumerate(mat):         for i, elem in enumerate(line):             new[i][j] = mat[j][i]      return new   def transpose2(mat):     # only line that differs, but still when     # printing 'new' they seem identical     new = [[None, None], [None, None], [None, None]]      print("input2:", mat)     print("new2:", new)      for j, line in enumerate(mat):         for i, elem in enumerate(line):             new[i][j] = mat[j][i]      return new   mat = [[4, 5, 6], [7, 8, 9]]  print("result1:", transpose1(mat)) print() print("result2:", transpose2(mat))      Output:  input1: [[4, 5, 6], [7, 8, 9]] new1: [[None, None], [None, None], [None, None]] result1: [[6, 9], [6, 9], [6, 9]]  input2: [[4, 5, 6], [7, 8, 9]] new2: [[None, None], [None, None], [None, None]] result2: [[4, 7], [5, 8], [6, 9]]    I just don't understand what difference can the declaration of the new lists make to the output. Why does the transpose1 function give the wrong result, even though the intermediate new list looks identical in both cases and the rest of the code is the same?


Trying to evaluate $$\ln(\ln(\ln(\ln(\cdots\ln(x)\cdots))))$$For some fixed $x$ produces a complex answer that appears to converge, at least sometimes.  So I want a proof that this converges for either some $x$, no $x$, or all $x$.  If it converges for all $x$ or some $x$, what does it converge to?  If it diverges, is there a way we can evaluate it like we evaluate diverging sums?  And after all of that, does it appear to converge to the same value, no matter what $x$ value we start with?  I know $\ln(z)=\ln(|z|)+i\arg(z)$, but I can't repeat this process without a given $z$.  (where $z$ is complex).  A similar post of mine found  does not answer my question and focuses more on the limits, calculus, and infinites.  This question asks for consideration from a complex-analysis point of view, considering convergence of value in the complex plane.


I am an indian passport holder. I am going to Mogadishu from Delhi via Dubai. My transit time is 6-7 hours at Dubai airport. Also, I have different flights (Air India & Jubba airways). My first flight arrives at terminal 1 and my seconds flight departs from terminal 2. Also I have a check-in luggage.  Do I need a transit visa in Dubai?


I extracted this from L.R.H Chapman grammar two book. An example was given like this :  Question : Who did jack meet at the station? Answer : Jack met his uncle at the station  I am not sure whether is it correct to make every question like the example format given above. Is this sentence correct? Question : who did the rich woman pay yesterday? Answer : The rich woman paid her servants yesterday. I assume that the correct sentence would be "To whom did the rich woman pay yesterday?" Here are the sentences for questions to be made :   The rich woman paid her servants yesterday. I saw a lot of soldiers outside the palace. The angry man hit the boy. Mary wrote a letter to her aunt. The teacher helped the weak pupil. The old man knew everybody in the village.


I was skimming through  by Cosma Shalizi (in particular, section 2.1.1 of the ), and was reminded that you can get very low $R^2$ even when you have a completely linear model.  To paraphrase Shalizi's example: suppose you have a model $Y = aX + \epsilon$, where $a$ is known. Then $\newcommand{\Var}{\mathrm{Var}}\Var[Y] = a^2 \Var[x] + \Var[\epsilon]$ and the amount of explained variance is $a^2 \Var[X]$, so $R^2 = \frac{a^2 \Var[x]}{a^2 \Var[X] + \Var[\epsilon]}$. This goes to 0 as $\Var[X] \rightarrow 0$ and to 1 as $\Var[X] \rightarrow \infty$.  Conversely, you can get high $R^2$ even when your model is noticeably non-linear. (Anyone have a good example offhand?)  So when is $R^2$ a useful statistic, and when should it be ignored?


What software does the Ubuntu installer run on?

Sorry if somebody has already asked this question, I haven't found anything else.   When you install Ubuntu, some sort of program is run, like where you set different options for your OS installation.  Does anyone know what the software is being run?  Thanks.


When I open Sublime Text from the terminal, I have type in   $ sublime_text <filename>   Is there any way I can change it so I can say something like:  $ subl <filename>


How is a public key actually used to encrypt something?

One thing cryptography articles never seem to explain is how the message actually gets encrypted. You get this long-winded lecture on number theory which ends with, Ta Da! and we have a public and private key. Then, they never explain the process of exactly how some 100,000 byte word document gets encrypted using the public key.  Other times the explanations seem downright misleading. For example, in my book Cryptography (by Meyer and Matyas) it says for RSA the ciphertext is the plain text to the power of key. How do you exponentiate a word document? I don't get it.


I have a problem with outputstream, I have this Java Spring code:     @RequestMapping(value="/downloadZip", produces="application/zip") public void downloadZip(HttpSession session,HttpServletResponse response) throws IOException {     OutputStream out = response.getOutputStream();     FileInputStream in = new FileInputStream(FileManager.EXPORT_FOLDER + File.separator + FileManager.EXPORT_FILE);     byte[] buffer = new byte[4096];     int length;     while ((length = in.read(buffer)) > 0){         out.write(buffer, 0, length);     }     in.close();     out.flush();     response.flushBuffer(); }  The "file" that i'm exporting it's a ZIP file with other two files in it. The thing is that I call from the front this api to download the zip file, and it downloads ok, but with no extension and with other name that i don't have in anywhere of the application, it's like, the FileManager.EXPORT_FILE name is "FileToDownload.zip" and when i download the file it's called "file" and that "file" name i don't have it anywhere and when i uncompress that file it's good, but i need the extension, any clues? Thanks a lot!


trouble with insert query...data with special characters not getting inserted

i have a filed in my database...the datatype is LONGTEXT  my insert query is :          if(isset($_POST['submit'])){      $sql='INSERT INTO `tb_mansi` (`referrence`) VALUES ("'.$_POST["legis"].'")';      if (!mysql_query($sql, $con))    {   die('Error: ' . mysql_error());    }    echo "1 record added";     }   now when i am inserting data it is showing errors like with data like childs's or "rena"...means its giving error with data that contains double quotes...or "'" i tried to insert this data  "  Indira Nehru Gandhi v. Raj Narain, AIR 1975 SC 2299;  Seshan, CEC of India v. Union of India and ors., (1995) 4 SCC 611;  Kuldip Nayar v. Union of India & Ors., AIR 2006 SC 3127;  People's Union for Civil Liberties and another v. Union of India and another, (2013) 10 SCC 1;  Mohinder Singh Gill and another v. Chief Election Commissioner, New Delhi and others, (1978) 1 SCC 405;  Raghbir Singh Gill v. S. Gurcharan Singh Tohra, AIR 1980 SC 1362;  Union of India v. Association for Democratic Reforms and another, (2002) 5 SCC 294;  Dinesh Trivedi, M.P. and others v. Union of India and others, (1997) 4 SCC 306; Anukul Chandra Pradhan, Advocate Supreme Court v. Union of India and others, (1997) 6 SCC 1;  K. Prabhakaran v. P. Jayarajan, AIR 2005 SC 688;  Niranjan Hemchandra Sashittal and another v. State of Maharashtra, (2013) 4 SCC 642;  Dr. Subramanian Swamy v. Director, Central Bureau of Investigation & Anr., Writ Petition (Civil) No. 38 of 1997 etc. pronounced on May 06, 2014;  Lily Thomas v. Union of India and others, (2013) 7 SCC 653;  His Holiness Kesavananda Bharati Sripadagalvaru v. State of Kerala and another, (1973) 4 SCC 225;  Centre for PIL and another v. Union of India and another, (2011) 4 SCC 1; N.Kannadasan v. Ajoy Khose and others, (2009) 7 SCC 1; Inderpreet Singh Kahlon v. State of Punjab, (2006) 11 SCC 356; Arun Kumar Agarwal v. Union of India, (2014) 2 SCC 609;  State of Punjab v. Salil Sabhlok and others, (2013) 5 SCC 1 and Centre for Public Interest Litigation and another v. Union of India and another, (2005) 8 SCC 20   2; but the error i am getting is :     Error: 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 '0CGEQ_xc" style="margin-top: 0px; margin-bottom: 0px;   margin-left: 0px; color: r' at line 1   can anyone help me with this ....


How to I prevent a object(standard as well as custom) records(all) to be displayed in global search?

For E.g. Do not allow search results to display for Accounts records


I have used the following code:      \begin{figure}[h]   \begin{tikzpicture}          \draw[->] (-0.5,0) -- (4,0) node[right] {$x$};         \draw[->] (0,-0.5) -- (0,4) node[above] {$y$};         \draw (0,0.5) -- (4,2);         \draw [dashed] (0,1.5) -- (4,4);   \end{tikzpicture}   \caption{No Interaction} \label{fig:M1}    \begin{tikzpicture}         \draw[->] (-0.5,0) -- (4,0) node[right] {$x$};         \draw[->] (0,-0.5) -- (0,4) node[above] {$y$};         \draw (0,0.5) -- (4,2.5);         \draw [dashed] (0,1.5) -- (4,3.5);   \end{tikzpicture}.  \caption{Interaction} \label{fig:M2}   \end{figure}     to insert two figures, however it places them one on top of the other and I would like them next to each other but labelled independently, is this possible?


I'm an amateur studying General Relativity.  I'm reading some notes of lectures by Susskind.  In them, it is written that  "we know that [the covariant derivative of the metric tensor] is zero.  Why?  Because the ordinary derivative of the metric tensor in Gaussian coordinates is zero.  So, in any coordinate system, we have [that the ordinary partial derivatives of the metric tensor in arbitrary coordinates minus the two Chrisoffel correction terms] = 0."  I don't see how this follows.  Could someone explain?


How do you calculate the Ordinary Least Squares estimated coefficients in a Multiple Regression Model?

I recently began learning about OLS estimation of multiple regression models and came across the following formulas explaining the calculations:   What would the formulas be for an OLS regression model with more than two independent variables?  I'm asking this because I'm trying to make an application in JavaScript that will perform the calculations. Alternatively, I would be amazing if anyone knew of a free API that could be called from JavaScript to calculate OLS multiple regressions.


I want to ask        "which platform is better for earning money, WP, Android or iOS?".   But I am not sure to which of the site I should post it IF there is such a site. And suggest a re-wording/editing if possible. P.S. I am not even sure that the current question can be posted on SE Meta so if it does not belong here, do what you have to (downvotes, deletion etc) but please tell me the reason in comments. Thank you


Characteristic of an integral domain without unit element must be prime?

I want to show that if an integral domain $D$ has finite characteristic, its characteristic must be prime.   This is easy enough if we assume that $D$ has a unit element, but the textbook I'm using (Herstein, Topics in Algebra) does not require there to be a unit element in an integral domain.


How did the Rebel Alliance survive at Endor?

After the destruction the second Death Star the Rebel Alliance assumes a victory over the Empire at Endor; we see a big celebration on Endor (and across the galaxy in the "special" editions). But how is it they weren't crushed, Death Star or no Death Star?   After it is revealed that the Death Star II is operational, or at the very least can fire it's main gun, Lando suggests engaging the Star Destroyers at close range and Admiral Akbar states that they won't last long. This implies that the Rebel Fleet is significantly out matched.  While the loss of the Death Star would probably impose a large morale penalty on the Imperials, they still should have had the upper hand over the Rebel fleet. What then happened after the Death Star blew up that caused the Imperial forces, both at Endor and across the galaxy, to effectively give up all at once and allow the Empire to practically collapse in one big party?


How to tell my current project adviser that I want to try working with someone else next semester?

I have been working with Professor 1 for a semester. He has been very helpful and we have spent some time together this semester discussing problems. I enjoyed working with him and also find his research interesting.  However, there is also this other Professor 2, whose work I find interesting and he works in related areas. So, I want to work with Professor 2 for a semester before deciding whom to stick with.   Meanwhile, I want to continue the work that I have initiated with Professor 1. I want to convey this message to Professor 1 in a manner that will leave the possibility of working with him after next semester open. So, how should I tell Professor 1 that I want to do a small project with Professor 2 to try out things, without sounding rude?


What software tools or websites are available for running RPG, grid-based combat?

Are there any software tools (or websites) that support creating tactical combat maps as well as actively running them for combat? I'm looking to do away with paper and battle-mats. Here are my requirements:   Can create floor plans with tiles. Can put (or draw) objects to that tiles. It doesn't necessarily have to be real object models (3d). It would be sufficient enough if you can draw lines/squares/circles etc.  Can add (put, draw) PCs and NPCs to that tiles and move them.   I'm going  use it for my GURPS games. I want to keep track of my players and NPCs movements with software. I don't want to bother using real paper. It could be more practical to use software for that.


The exercise is;     There are m functions from a one-element set to the set {1, 2, …, m}.   How many functions are there from a two-element set to {1, 2, …, m}?   From a three-element set? Give a recurrence for the number of T(n) of   functions from an n-element set to {1, 2, …, m}. Solve the recurrence.   I've gotten to the point that I "know" there are $m^n$ options to the function $$f:\{1,...,n\}\to \{1,...,m\}$$. How do I set up a recurrence relation and solve it?  I've gotten this far; $$ T(0) = 1 \\ T(1) = m \\ T(n) = T(n - 1) \cdot m $$  Solving it; $$ T(n) = (T(n - 2) \cdot m) \cdot m \\      = ((T(n - 3) \cdot m) \cdot m) \cdot m \\      = T(n - n) \cdot m^n \\      = 1 \cdot m^n = m^n $$  But I'm unsure whether I've even done the correct thing?


So I feel stupid for asking this, but I can't figure this out. I haven't taken algebra for about 8 years, so doing this is kind of fuzzy.  Just started Calc 1 and we're finding limits. $$\lim_{x \to 9} \frac{x - 9}{\sqrt{x} - 3} .$$  I try to do some algebra to rationalize the denominator, but everything I do gets me to the limit equaling either $2$ or $3$. Which makes me think I don't understant rationalizing the denominator.  What I get is: $$\lim_{x \to 9} \frac{x\sqrt{x} - 9\sqrt{x}}{x - 3\sqrt{x}}$$  This is where I'm confusing myself. I don't know where to go to simplify from here. And I still can't do direct substitution because it will equal $\frac{0}{0}$.


I would like to draw a punchcard in Latex as shown below.  But i just can't find any information how to do this (not even in the manual of tikz). The only thing i can find is information about bubble charts (with x and y axis) I would like to get the data from a csv-file, for example with the command:  \addplot table {table.csv}   Link to my data as .ods-file:   as csv-file (without headers):      Source of that image is the article of Maalej and Robillard: Patterns of knowledge in API reference documentation


So, I was playing Skyrim (with mods) and I have this character I tried some mods with, animation mods to be exact. Everything was all and well until I got stuck in 3rd person view, not like I can't go back to 1st person, I can go back, but it won't let me stay there. I have problems with the bow because I can't aim that well in 3rd.   I did some research, I read someones else's post about a glitch that sounded very similar, many replied and said it could only be fixed with a previous save, Unfortunately my last save was 27 levels back. I know it's small, but if you played Skyrim that long it would be a nightmare to go back a lot of levels.  I uploaded a video on YouTube about this glitch here it is:                                  Is there a way to solve this without loading an older save?


Rainbow reflected on TV screen? (pic attached)

According to wikipedia,      A rainbow is an optical and meteorological phenomenon that is caused by reflection, refraction and dispersion of light in water droplets...   Given that we require reflection, refraction and dispersion to take place, I was quite intrigued when I saw that the reflection of light on the TV has scattered into a rainbow.    This is how the light looks like:   Can somebody explain this phenomenon?   Also the shape of the light in the reflection seems interesting, reminds me of interference patterns. I mean the light source is simply circular in shape. Any comments on that?


I was just wondering what the most up-to-date source for US Zip Code boundaries would be.    My first thought was TIGER, whenever that comes out, but then I thought that the Postal Service might be a better bet.    Does anyone have some input?


I am trying to create a network bridge to allow virtual machines to use my wireless card to connect to my home network. My plan was to do something like:  iw dev wlp12s0 set 4addr on brctl addbr xenbr0 brctl addif xenbr0 wlp12s0 ip link set dev xenbr0 up wpa_supplicant -B -b xenbr0 -i wlp12s0 -c <(wpa_passphrase $MYSSID $MYPASSPHARSE) dhcpcd xenbr0 ebtables -t nat -A POSTROUTING -s $VMMAC -j snat --to-source $HOSTMAC   Which I think works in principle, but my wireless router cannot handle   iw dev wlp12s0 set 4addr on   even if I do not setup a bridge. I would consider buying a new wireless router if this is the correct approach and there is an affordable home router that is known to work. Is there a different way of tackling the problem?


Is the composition of two injective functions injective?

Consider $f:A \to B$ and $g: B \to C$. If I know that both $f$ and $g$ are injective, then can I state that $$g  \circ f:A \to C$$ is injective?


Is it possible to set proxy for APT while using graphical Ubiquity-based desktop ISO installer?

For some of the Ubuntu installations I use netboot mini.iso from  . This installation method includes the step of configuring proxy. It is very useful for me as I have Squid-Deb-Proxy configured in my network, so I can lower traffic usage by using it.  But I do not see such an option in Ubuntu Desktop graphical installers, for example for Ubuntu MATE. They use Ubiquity as a common. Is it possible to set APT proxy during installation for such installers?


What is the difference between CSPRNG and PRNG?   Is there performance differential between them? For example: We use PRNG for key generation which is very expensive and CSPRNG for IV/nonce in block ciphers which is fast?  What is the difference between the two types of RNGs?


Add dash at the end and beginning of a string

I want a dash to be added at the end and beginning of a string.  Example:    "chicken" -> "-chicken-"   "nuggets" -> "-nuggets-"     So I'm pretty much asking for Regexes.


How to manually install Broadcom BCM4360 driver on Ubuntu on MacBook Air

I have a MacBook Air (mid 2013) with Ubuntu 16.04 installed on it. It is not detecting any WiFi, upon investigation I think the reason is that the driver for the wireless interface is not installed by default in Ubuntu as it is properietery. Exact version of the wireless interface on my MacBook Air is BCM 4360, here is the output of the lspci command:-  03:00.0 Network controller [0280]: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)   As there is no Ethernet or any other way to connect to the internet, I cannot run apt-get install. Is there any way I can manually install the required driver?


For given $a \in \mathbb{R}$ there exists unique continuous function $f:\mathbb{R} \to \mathbb{R}$.

For given $a \in \mathbb{R}$ there exists unique continuous function $f:\mathbb{R} \to \mathbb{R}$ that satiafy $f(x+y)=f(x)f(y)$ for $x,y \in \mathbb{R}$ and $f(1)=a$.   These theorems were discussed in my mathematical-modeling class and were given to us to prove them.


May’s “The Loop” blog post was just posted, you can read it . A popular response last month to our post about how we receive, prioritize and implement feedback was a question around how this framework gets utilized in the practical sense. We thought that Dark Mode was a great feature to dig down into as it was so widely requested and anticipated.   We hope you enjoy this month’s post, please leave any questions or comments you have in this thread and we will respond ASAP.


In Special Relativity, the spacetime interval between two events is $s^2 = -(c{\Delta}t)^2+({\Delta}x)^2+({\Delta}y)^2+({\Delta}z)^2$ giving the Minkowski metric $\eta_{\mu\nu}=\text{diag}(-1, 1, 1, 1)$. What is the justification for making time have a negative coefficient, and how closely is that related to the 2nd law of thermodynamics? Sure, by letting $\eta = \text{diag}(1, 1, 1, 1)$, we get a pretty boring spacetime, and the boosts in the Poincaré group become trig instead of hyperbolic functions, but what's the physical reasoning behind this?


I can't find wireless interface ""wlan0"" ubuntu 14.04.3 LTS

I just installed ubuntu 14.04.3 (LTS). My laptop can dual-boot Windows 10 & Ubuntu. But I have a problem of using wireless network. When I open the terminal and type      Code:           iwconfig      returns the following          eth0 no wireless extensions.          lo no wireless extensions.      I can't find   wlan0 IEEE 802.11 blah blah blah...  Also when I type      Code:           sudo wpa_cli      returns the following    As far as I know, in normal circumstances, wireless interface information should be seen. Just like below picture:    I think my ubuntu can't detect wireless LAN Card.(But when I use windows, My PC can connect to wifi and can use the web)  I need your help. Thank you. Before complete question, I show my PC information.            First OS : Windows 10          Second OS : Ubuntu 14.04.3 (LTS) Desktop Version                 windows and ubuntu dual-boot               Ubuntu Kernel Version : 4.3.3-040303-generic          My Network Adapter                          Qualcomm Atheros QCA61x4 Wireless Network Adapter                  Realtek PCle GBE Family Controller                  .......................................................................  when I type     Code:           ifconfig      returns the following          eth0   Link encap:Ethernet  HWaddr 24:f5:aa:d7:f2:1d               inet addr:165.132.117.69  Bcast:165.132.119.255  Mask:255.255.252.0               inet6 addr: fe80::26f5:aaff:fed7:f21d/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:315020 errors:0 dropped:396 overruns:0 frame:0               TX packets:157677 errors:7 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:323556810 (323.5 MB)  TX bytes:14659107 (14.6 MB)          lo      Link encap:Local Loopback               inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:65536  Metric:1               RX packets:4694 errors:0 dropped:0 overruns:0 frame:0               TX packets:4694 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:459292 (459.2 KB)  TX bytes:459292 (459.2 KB)


Getting random numbers in Java between two numbers

I would like to get a random value between 65 to 122.  How may I do that with the help of Math.random(); in Java?  Is there any way to bound the values that will be accepted?


I'm working on ajaxifying a form which uses Hierarchical Select widget. I need to update a text field based on the value of HS and a couple of other fields. I want to use Drupal forms Ajax API. I followed the . Now the form is updated when user fills in the text fields. But I can't cope with HS.   I was told  HS doesn't support regular Drupal #ajax mechanism. I can easily attach the handler to HS update event. So all I need now is to manually trigger Drupal Ajax machinery from my own handler. How it's best to be done?   I see there is a global Drupal.ajax object but can't figure out how to make use of it.


Removing the "about:blank" text from a new tab

In one of my Google Chrome profiles, opening a new tab displays the text about:blank in it. This has become increasingly annoying because my muscle memory is such that I start typing the URL foo.com immediately after opening a new tab, and with this pre-filled text, it ends up being about:blankfoo.com.     From a quick comparison of the preferences between this profile and another one (where this doesn't happen), I couldn't find anything that was obviously off, but perhaps I am not looking in the right place.  Is there a way to remove this pre-filled text from a new tab?


An object that implements "iterator protocol" by means of individual attributes is not recognised as iterable

In Python 3 , the iterator protocol is defined as follows:     The iterator objects themselves are required to support the following   two methods, which together form the iterator protocol:      iterator.__iter__()      Return the iterator object itself. This is required to allow both containers and iterators to be used with the for and in statements.   This method corresponds to the tp_iter slot of the type structure for   Python objects in the Python/C API.      iterator.__next__()      Return the next item from the container. If there are no further items, raise the StopIteration exception. This method corresponds to   the tp_iternext slot of the type structure for Python objects in the   Python/C API.   I experimented with implementing it through individual object attributes:  class Empty: pass o = Empty() o.__iter__ = lambda: o o.__next__ = lambda: 42 for i in o: print(i)   and got a TypeError:  TypeError: 'Empty' object is not iterable   What is wrong?  Are there any precise rules somewhere about what objects can be used as iterable in for loop?


My project is in codeigniter, i am sending mails in it with following code snippet, its working fine, just problem is that mail are going into spam folder of users, why this is happening, please suggest me the changes in following code snippet.   My Code Snippet:  $subject = 'Test Subject'; $config['protocol'] = 'smtp'; $config['smtp_host'] = "localhost"; $config['smtp_port'] = "25"; $config['charset']  = 'utf-8'; $config['wordwrap'] = TRUE; $config['mailtype'] = 'html'; $config['bcc_batch_mode'] = TRUE; $config['crlf'] = '\r\n'; $config['newline']  = '\r\n'; $this->email->initialize($config); $this -> load -> library('email');  $msg = "Test Message";  $this -> email -> from('admin@domain.com','Domain Name'); $this -> email -> to('user@gmail.com'); $this -> email -> subject($subject); $this -> email -> message($msg); $this -> email -> send();   What is settings to prevent mail from spam folders??


What would be the easiest way to view classes, methods, properties, etc. inside a jar file? I'm looking for something equivalent to the very useful  Lutz Roeder .NET Reflector  - for Java


I am trying to make a simple Cayley table for Z_5. Here's my attempt: \[    \setlength{\extrarowheight}{3pt}       \begin{array}{l|*{5}{l}}       \oplus & [0] & [1] & [2] & [3] & [4] \\       \hline       [0] & [0] & [1] & [2] & [3] & [4] \\       [1] & [1] & [2] & [3] & [4] & [0] \\       [2] & [2] &[ 3] & [4] & [0] & [1] \\       [3] & [3] & [4] & [0] & [1] & [2] \\       [4] & [4] & [0] & [1] & [2] & [3] \\       \end{array}    \]  I am getting the error message "Illegal unit of measure (pt inserted). If I insert other symbols in the third through sixth rows, such as powers of a, I don't get the error message. For instance, \[       \setlength{\extrarowheight}{3pt}       \begin{array}{l|*{5}{l}}        \oplus & [0] & [1] & [2] & [3] & [4] \\       \hline       [0] & [0] & [1] & [2] & [3] & [4] \\       a   & a   & a^2 & a^3 & a^4  & a^5 \\       a^2 & a^2 & a^3 & a^4 & a^5  & a^6 \\       a^3 & a^3 & a^4 & a^5 & a^6  & a^7 \\       a^4 & a^4 & a^5 & a^6 & a^7  & a^8 \\       \end{array}   \]


Should I restrain myself from downvoting answers on question where I have answered as well

Sometimes I face this ethical dilemma when I want to downvote a bad answer but I'm not sure whether I should.  On the one hand, there's the chance of a conflict of interest: I have answered the question as well and deep down I want to win the green checkmark ;)  On the other hand, the answer is objectively bad or counterproductive.  Should I restrain from voting and let others in the community take care of the bad answer?


Why was my flag invalid when the requested action was taken?

On the heels of  regarding a user spamming "Thanks in advance is considered extremely rude" and starting arguments on several posts, I ended up sending in 3 detailed flags on posts where this occurred in the comments.  The first two were a couple days ago, both validated and all comments deleted, and the third, and worst one, was last night. The comments escalated into name-calling and mudslinging on a new user's second post. So, I flagged the post and brought attention to the comments instead of flagging each comment individually.  The comments were all deleted, and the user was even . I had suggested "some kind of intervention beyond just deleting all the comments again" and it looks like the suggestion was honored.  So, bearing this in mind, what possible reason could my flag have been marked invalid?  Note: I've read the 2 answers from these posts:       ...but they deal with a user complaining about an invalid flag when a question has been closed later by the community. The difference here is that the action was definitely handled by a moderator (comments deleted, user suspended), and not by the community, later - after a mod deemed the flag invalid. I assure you that there was nothing questionable about whether or not the 6 comments should have been deleted.  Did I do something wrong? I'm not sure what the policy is on disclosing flags, but I'd be happy to share more information if it helps clear up what my mistake could have been.  Was it rude of me to include the extra request? Was it proper to let the mod know that this was an ongoing problem, or should I have just flagged with the "bare minimum" details and let the mods figure it out? Perhaps I got too involved the business of moderators, and therefore the flag was deemed invalid.  The invalidation may very well have been a misclick as Cody Gray suggested in the comments, but I'd be interested in hearing whether or not I possibly stepped over the line.


Is "What would have happened if you were a few minutes later?" grammatical?

I read this sentence  in a movie     What would have happened if you were a few minutes later?   I think that the sentence "What would have happened if you were a few minutes later?" is wrong grammatically.  Is it grammatical?


How do i install apps like VLC or Chrome without using terminal?

My Ubuntu 18.04 Software Centre isn't showing VLC or other applications I want. If I search for "vlc", there are only a few apps...   What should I do?


If $\lvert f(x)-f(y) \rvert \le \lvert x-y \rvert ^2$ for all $x$ and $y$ in $\mathbb{R}$ then $f$ is a constant function

Assume that $\lvert f(x)-f(y) \rvert \le \lvert x-y \rvert ^2$ for all $x,y\in \mathbb{R}$. Prove that $f$ is the constant function.      My first thought was to use continuity of $f$, so that we get that $\forall x\in\mathbb{R},\forall \epsilon>0, \exists \delta>0, \forall y \in \mathbb{R}, \lvert x-y \rvert<\delta \implies \lvert f(x)-f(y) \rvert < \epsilon$.   So choosing $y$ so that the above property holds, we get that $\lvert f(x)-f(y) \rvert \le \lvert x-y \rvert ^2 <\delta^2$  Using the inequality I found (supposing it is correct), how would I continue to prove that $f(x)=f(y)$, and so their difference must be zero.


What's the right terminology for Unity's UI elements?

I've sent a few mails to the Ayatana mailing list regarding some UI suggestions for Unity, but I'm afraid I keep confusing the right terms for the UI element, so I would like to have some clarification.  Answer Index:


How to draw a path to form a regular pentagon?

I already have a code that draws a regular hexagon the following way   \begin{tikzpicture}[every node/.style={draw,shape=circle,fill=blue}] \path (0,0) node (p0) {} (-1.5,-1) node (p1) {} (-1.5,-2.5) node (p2) {} (1.5,-2.5) node (p3) {} (1.5,-1) node (p4) {} (0,-3.5) node (p5) { }; \draw (p0) -- (p1) (p0) -- (p1) (p0) -- (p2) (p0) -- (p3) (p0) -- (p4) (p0) -- (p5) (p1) -- (p2) (p1) -- (p3) (p1) -- (p4) (p1) -- (p5) (p2) -- (p3) (p2) -- (p4) (p2) -- (p5) (p3) -- (p4) (p3) -- (p5) (p4) -- (p5); \end{tikzpicture}   But Now I need to remove one of the points and to draw a regular pentagon the same way. So I need to remove (P5) and to recalibrate all other points (change their coordinates) But I don't need to change the code much.  Is there a way to do it by just slightly changing my code here. ?


show that if $x_n $ converges so does $\frac{x_1+x_2+x_3+...+x_n}{n}$

If $x_n \to a$ then $$\lim_{n \to \infty}\frac{x_1+x_2+x_3+...+x_n}{n}=a$$  My attempt  $$=> \lim_{n \to \infty} x_1+x_2+x_3+...+x_n = na \\ => x_1-a +x_2-a +...+x_n-a = 0 \ where \ n \ is \ not \ finite$$  Since $x_n \to a$ Given $\epsilon >0$ there exists $N$ such that   $|x_n-a| < \epsilon$ whenever $n>N$  Applying to what we ended up with :  $n \epsilon = 0$  let $\epsilon \to 0$


Mechanism by which electric and magnetic fields interrelate

I read that force due to electric field on some particle in one reference frame can exhibit itself as force due to magnetic field in some other reference frame and that electric and magnetic fields are two aspects of same underlying electromagnetic field.   My question is what is the mechanism which can explain how an electric field becomes/creates magnetic field in some other reference frame. Is there any such explanation available in relativity theory? I am not looking for mathematics but a physical explanation.  Wikipedia article  explains something about origin of magnetic forces in a wire as a consequence of lorentz contraction and motion of electrons in the wire  Calculation of the magnitude of the force exerted by a current-carrying wire on a moving charge is equivalent to calculating the magnetic field produced by the wire. Consider again the situation shown in figures. The latter figure, showing the situation in the reference frame of the test charge, is reproduced in the figure. The positive charges in the wire, each with charge q, are at rest in this frame, while the negative charges, each with charge −q, are moving to the left with speed v. The average distance between the negative charges in this frame is length-contracted to: where is the distance between them in the lab frame. Similarly, the distance between the positive charges is not length-contracted: Both of these effects give the wire a net negative charge in the test charge frame, so that it exerts an attractive force on the test charge.  But this still does not explain origin of magnetic field in case when there are no positive charges.


Studying physics at undergraduate level: Prerequisites

I have been really interested in physics for some time and also take active interest in quantum mechanics. I would like to pursue physics as my undergrad major.  What kind of prerequisites does one need to major in physics? (I am going to study physics in Japan and right now is not so good at maths cause I am learning Japanese only for the past 6 months and has been totally out of it. )


I am developing a stand alone python script that will invoke methods from processing module. I am seeing error "ImportError: No module named processing" on ubuntu.  Here is the code.  import PyQt4.QtGui import PyQt4.QtCore import PyQt4.Qsci  from qgis.gui import * from qgis.core import * import os   import processing  print 'hello'


PC Blue Screens and then instantly reboots. How do I stop this or find the error later?

I've started getting random blue screens from my (admittedly aged PC). Unfortunately it reboots straight away so I don't get chance to read the error. It's been happening when browsing Stack Overflow in Google Chrome and Firefox so I'm assuming that it's something fairly fundamental.  Most of the time it puts up the "Report the error to Microsoft" dialog and I've checked the data files it wants to send but can't find the information there. I'll freely admit I could be looking in the wrong place.  I'm running Windows XP SP3 and I'm fully up to date with the updates.  The CPU is an Athlon XP 2600+, I've got 2 GB of RAM installed, an nVidia Quadro4 980 XGL driving two DELL 2001FP flat panels at 1600 x 1200 pixels (32 bits/pixel).  I've checked the CPU fan (which has been recently replaced) and that seems to be turning freely. The insides are a little dusty, but not excessively so.  So I need to either stop it rebooting or find out where the error code is stored so I can read it after the reboot.  UPDATE 22/09/2009  OK - just had the BSOD and it's in win32k.sys. I'm doing some research to see if I can find anything that might help. If I get stuck I'll post a new question. Thanks for all the suggestions.


Can you help me to finding some papers that shows AES is secure against known-plaintext attack?


Invariant Subspace of Two Linear Involutions

I'd love some help with this practice qualifier problem:  If $A$ and $B$ are two linear operators on a finite dimensional complex vector space $V$ such that $A^2=B^2=I$ then show that $V$ has a one or two dimensional subspace invariant under $A$ and $B$.    Thanks!


copy ssh private keys to another computer

I need to use another computer to access my ssh server. This is because a recently implemented vpn at my university doesn't work on my current computer and I have lost access to the server.   I ssh via encrypted ssh keys. Can I copy these keys to the new computer (on which the vpn works). I tried copying the id_rsa and id_rsa.pub files in the ~/.ssh folder but it doesn't recognize the keys and there is no prompt to input a password to decrypt the keys.   EDIT: I can't access the server to generate a new key pair for the new computer and am out of the country so can't physically access it.   Thanks.


Proper Citation for Hungary/Austria Birthplace

I am tracing ancestors born in the late 18th through mid 19th century from a village which at the time was in western Hungary. Following the end of WWI, the area was transferred to Austria and the name of the village changed. Hungary Catholic Church records give the Hungarian name/location, but online genealogies cite the Austrian name/location (which did not exist at the time of the individuals' birth). Which is correct (or more appropriate)?


I have a Python flask API wrapped with uWSGI+Nginx for production setup. I have 4 Nginx workers and 1 thread per worker configured as follows, processes = 4 threads = 1.  When I issue an API Post, the post writes and reads a json file at different parts of my code.  When I  issue multiple API requests in parallel , it gets distributed to these 4 Nginx workers as expected. And they go ahead and process the request in parallel. Sometimes this causes json ValueErrors as multiple processes are reading and writing to the same file.  How do I overcome this scenario? This is not multiprocessing within my API. So using python's multiprocessing Lock within my json update code will not fix my problem.   I want to be able to update the json files one worker at a time. Is there a way to share locks within uwsgi workers?


When changing domain names, can I keep my existing SEO and Google Search ranking?

Suppose I have been using a domain, say www.bollywoodhatke.com for 3 years, and it has a good Alexa (hypothetical situation). It has backlinks and its has 7,000 pages indexed and 50,000 images indexed, but later there is a reason I am forced to change the domain name where the website is served.  In that case →  Would it be possible to tell Google that we are the same people with the same website, but the domain name changed?  I mean, can I somehow transfer the content to the new domain so that all the pages are indexed immediately, backlink juice is also transferred to the new domain, and all the pages indexed correctly?  I think moz.com  was semoz.com previously. They must have certainly done something.


Why use install rather than cp and mkdir?

I've seen in many places used install -d to create directories and install -c to copy a file. Why not use mkdir and cp? Is there an advantage in using install?


Can you shine a laser on an object that has fallen into a black hole?

I've been having a small back and forth on another website about the nature of objects that fall into black holes.  I know that they never reach the event horizon from the perspective of a distant observer.  They slow down and appear to stop.  The image then redshifts to infinity and disappears.  I also know that from the perspective of the object, it crosses the event horizon like it would move through normal space, and then joins the singularity.  How I reconcile these is that it's just the image of the object that remains outside the event horizon.  Using simple physics, you can calculate the acceleration due to the gravity that the object would feel, and be drawn past the event horizon at a very high speed.  So in my mind the object can't actually freeze at the event horizon.  It's just that the high gravity warps the light coming from the object so that the distance it has to travel is stretched out, leading to a redshift.  The other person disagrees, and says that since the object is visible, and frozen, that in his perspective it is still actually there.  That the object itself hasn't yet crossed the event horizon.  He'd be able to shine a laser on it and get light back.  He says this is caused by gravitational time dilation.  Time appears to move more slowly when close to higher gravity objects.  This doesn't sit right with me.  Say that with the simple physics calculations, you know an object would cross the event horizon at time Tn, from its own perspective.  The outside observer is to shine a laser on the object at time Tn + 1 second, from the observer's perspective.  I feel like the laser would never reach the object and reflect back to the observer.  At time Tn + 1, the object would be beyond the event horizon from the object's perspective.  The other guy countered that time never reaches Tn, because the time dilation goes to infinity as the object approaches the event horizon. Tn + 1 comes just fine for the observer, so they can shine the laser on the object and those photons would return to the observer.  Which one of us is incorrect?  I get the feeling it might be both.  I'm fairly certain about my own understanding, but I can't find anything to disprove what the other guy is saying.  If what he is saying is true, then that means that nothing can ever enter a black hole.  It would take an infinite amount of time.  Any objects that were pulled up to the event horizon would be frozen in time for trillions of years and they would suddenly pop into existence when the black hole evaporates.  That doesn't make sense as black hole become bigger as they consume matter. In my understanding.


Include music app options into volume icon

I recently changed over to mate from unity on my laptop. Everything is great, brilliant even, but I am really missing Unity’s integration of music/ video apps into the volume icon. Is there a way of including this functionality in mate 16.04?


how to get the § symbol on pc minecraft 1.13.3 querty keyboard

i already know how to do THIS you just do the unicode alt+0167, but how do you get it in minecraft. if you cant. i ask how to get the font attribute to it. (this is minecraft java)


Disable Escape key in Safari for getting out of full screen mode

I use Safari in Full Screen mode on OS X Mavericks all the time.  I also use the escape key in web pages fairly frequently for various things (depends on the webpage).  One unfortunate side effect of these two facts is that I will occasionally turn off Full Screen mode inadvertently by hitting the escape key on a page that doesn't intercept the escape key.  Is there a way to disable the "Escape turns off full screen mode" behavior in Safari?


Probability that $ax^2+bx+c$ has no real roots after rolling 3 dice.

Suppose that I roll $3$ dice and write down the outcome as the coefficients $a,b,c$ in the polynomial $ax^2+bx+c$ respectively. What is the probability that this polynomial has no real roots?  So, I have to count the number of triples $(a,b,c)$ such that $b^2 < 4ac$, where $a,b,c \in \{1,2,3,4,5,6\}$. I'm not sure how I can do that. Please give me a hint first. This problem is from a high school probability course, so I think it must have a very basic solution.


How can one create a permanent walk-through-portal to another location?

I'm looking for a way to create a permanent portal between two locations (on the same or on different planes, though the latter is more important), without using homebrew (UA is fine) or relying on DM adjudication.  The portal should be similar to the one created by the  spell, as in "one can simply walk through" - unlike permanent teleportation circles, which make it easy to travel to a specific place, but require you to cast the spell yourself first. I don't care if it looks like a portal from the Portal series, or if it's a magic tree. If it gets you from A to B, you can walk through, and don't have to cast a teleportation spell yourself first, it's fine.  Is there any spell, item, ability or other feature that allows regular player characters the creation of such a portal?  If there's nothing in 5e allowing this (maybe it's not possible for mortals since the Spellplague?), references to earlier versions are welcome.


Creating a proper string representation of a collection

I frequently come across the task to create a String representation of a collection of objects.  example:  String[] collection = {"foo", "bar", "lorem", "dolar"};   The representation I want to create: "foo, bar, lorem, dolar".  Everytime I come across this task I wonder which is the cleanest most convinient way to achieve the desired result..  I know there are a lot of ways to get the desired representation but for example I always wondered, if there is any possibility to create the string by just using the for/each loop?  like so:  StringBuilder builder = new StringBuilder();  for (String tag : list) {   builder.append(tag + ", ");  String representation = builder.toString(); // but now the String look like this: "foo, bar, lorem, dolar, " which nobody wants   Or is it best to just use the iterator if there is one, directly?  supposing list is a collection (that's how they kind of do it in the JDK):  Iterator<String> it = list.iterator(); while (it.hasNext()) {   sb.append(it.next());   if (!it.hasNext()) {     break;   }   sb.append(", "); }   One could of course index over the array with a traditional for-loop or do many other things.  Question  What is the easiest / best readable / safest way to convert a list of strings into the representation separating each element with a comma, and handle the edge case in the beginning or the end (meaning that there is no comma before the first element or after the last element) ?


What software can I use to decrypt a Mac OS X password hash?

I recently fired up an old Mac Mini that I haven't used for years, and found that I forgot the admin account password.  I managed to get the password hash, but have hit various snags when following guides on decrypting this. (e.g. zip utility crashes when trying to open the downloaded 'John the Ripper' utility zip file).  Can anyone recommend a hash decrypter? Windows or OS X is fine. The password itself will be some simple short thing that is only slightly better than nothing.   account username: admn password hash: 6646e657f86732f846bb44f66e0add96e2a48c6e


polynomial $p_n(z)$ has $|p_n(z)|\le M$ for $|z|<1$, prove $|p_n(z)|\le M |z|^n$ for $1\le |z| < \infty$.

If $p_n(z)$ is a polynomial with degree $n$ and $|p_n(z)|\le M$ for all $|z|<1$, then $|p_n(z)|\le M |z|^n$ for all $1\le |z| < \infty$. It sounds reasonable. For example, take $n=3$, and $p_n(z) = 1 + \frac{z}{2} + \frac{z^2}{3}$ , then $M=1+\frac12+\frac13=1\frac56$; while $q_n(z):= \frac{p_n(z)}{z^n} = \frac13 + \frac1{2z}+\frac1{z^2}$, it does sounds get its maximum at $z=1$ and the maximum is just $M$. But I'm a bit lost, couldn't find a way to prove it. Pls kindly suggest where can I go?


How do I correctly convert enemy saving throws so that players roll all the dice?

Much in the same vein as  question, I am trying to convert 5e so players roll all the dice. I'm using  as a starting framework that seems to work well with 5e so far, without changing monster vs. player statistics.   My stumbling block is spell saves. Take a humble goblin and his +2 dex vs. a high level save of 19 (8+6+5). He has a 4/20 chance of passing that save. If I stick to the same-ish formula of 14+2 vs. (caster mod)+proficiency on the players’ side, I end up with the goblin having 4/20 of saving.  I am looking to convert spell save DCs from 8+proficiency+caster mod vs d20+ stat mod+proficiency fairly. I think 14+saving throw does so correctly, and fairly. If not I want someone to tell me why that’s wrong.


I have temperature data of July 1991 to 2007, and wants to find the Confidence Interval at 95%, which distribution is best fit the data, Z or T. Please give me reason also.    minTemp = 14.4444, maxTemp = 38.3333, SizeofData = 527, (17 years) hist(July, 20), histfit(July, 20);


Automatically add vertical space /only/ between two sequential paragraphs

I am using KOMA-script scrreprt class.  I know I can use \usepackage{parskip} or \setlength{\parskip}{12pt}, but both of these also affect headings.  Adding \vspace{12pt} manually between all two sequential paragraphs seems to work, but that's anything but convenient. Is there a way to automate it?


I am very much confused with the usage of Have-Had-Has. I know "have" is used in Present perfect whereas "had" is used in past perfect. Then what about the usage of "have had" combination in a sentence?  Where do I have to use them?   How I know whether my usage is correct or not?


Two entries in "meta" section of a pgfplot

I need some help with this diagram:   I would like to combine two entries in the “meta=” section. It should contain the {y*100}–value and the Label-value. Is it possible to add them somehow? In the end there should be the value in percentages and a star above each bar. I would like to change the color of the stars and error bars to black. Is it possible to extend the y-axis a tiny bit so it doesn’t end with a horizontal markline?   .  \documentclass{article}  \usepackage[libertine]{newtxmath} \usepackage{pgfplots} %\pgfplotsset{compat=1.11} \usepackage{filecontents}  \usepackage{tikz}  \usepackage{pgfplotstable} \usetikzlibrary{positioning} \usetikzlibrary{decorations.pathmorphing} \usetikzlibrary{arrows} \usetikzlibrary{patterns}  \begin{document}    \begin{filecontents}{data1.dat}     X Y Y_error Label     a 1 0 \\     b .155 .038 $\star$     c 0.80 0.019 $\star$     d 0.54 0.027 \\   \end{filecontents}      \begin{figure}     \begin{tikzpicture}        \begin{axis}[  bar width=1cm, % Width of the bar     x=2cm, % Distance between the centers of the bars     enlarge x limits={abs=1cm}, % The distance between the center of the first bar and the left edge     enlarge y limits=false,         symbolic x coords={a,b,c,d},             ymin=0,         xtick=data,         ybar,             axis x line*=bottom,     axis y line=left,     clip=false,   %  point meta={y*100}, %y-Werte mal 100 für Prozent      point meta=explicit symbolic,    yticklabel={\pgfmathparse{\tick*100}\pgfmathprintnumber{\pgfmathresult}\%} ,         nodes near coords,         nodes near coords align={vertical},         visualization depends on=abs(y)/y*(0.1+\thisrow{Y_error}) \as \myshift,         every node near coord/.append style={           anchor=center,shift={(0,transformdirectiony(\myshift))},         }]         \addplot+[draw=black, fill=white, error bars/.cd, y dir=both, y explicit, ]                   table[x=X, y=Y, y error=Y_error, meta=Label,] {data1.dat};                         \end{axis}       \end{tikzpicture}   \end{figure}   \end{document}


Can you use a SRAM 10-speed Powerlock with a Shimano chain/drivetrain?

I just bought a pair of SRAM Powerlocks for 10-speed chains. The packaging says that they can only be used with SRAM chains. Will anything nasty happen if I use it with a Shimano chain and cassette?


Story (series) identification: Mind controlling satellite, a return to Earth, and two warring alien species

I'm trying to find a series of stories (a trilogy, I think) with a slew of distinctive features. I can't remember when the books were written (I read them about a year and a half ago), but I can remember several points about the story:  1: It begins in a peaceful city controlled by a matriarchy.  2: Young men and women are tutored in the ways of the world by 'Aunts' and 'Uncles' (who have no actual familial connection).  3: The whole world is actually a colony whose inhabitants are being prevented from developing scientifically by a highly complex mind controlling satellite.  4: The satellite starts to break down, allowing some (including one particularly successful warlord) to fight it's control and develop destructive technologies.  5: The satellite loads itself up with some people (the protagonists) and heads back to Earth for repair.  6: Earth has changed and is now home to two sentient species, one avian ('angels', I seem to recall) and the other subterranean (and fond of sculpture).   7: These two species are in conflict, but are also intricately linked with each other's breeding behaviour.  8: The humans, returned from the colony by the mind controlling satellite, create peace between the two civilisations.  There are so many disparate elements here that I'm beginning to wonder if I just made the whole thing up in a fever dream. Anybody got any ideas?


Short story about a young woman who is deliberately infected with life-preserving and repairing nanites. She lives through the end of humanity and the death of the universe as the nanites constantly fix her.


How to validate a successful file download test senario from selenium

I need to automate the following test senario where      when I click on a button, a file will be downloaded   There will be no message box and no text message. How should I implement this scenario using selenium script?


My Western Digital My Passport Drive () is broken, when I went to plug it in today, It made beeping sounds when connected. It makes 7 beeps, then 3, then another 3, and then it pauses for a few seconds and repeats the sequence. Something like   Now I don't know what's wrong with it or how I can solve it. Do I open it up and connect it to my computer using an external HDD station? Do I connect it via SATA? What are my option here? It's under warranty, will WD recover my data?


Interpret variables from read in string with shell script

I have a text file which is usually filled with multiple lines which I want to "print" with a while loop. The text inside this file contains variables - my problem is, that these variables are not interpreted unlike a similar test-string containing variables stored inside the script. Is it possible to also interpret those variables from my external file or do I have to parse them beforehands etc.? What is the difference between $LINE_INSIDE and $LINE_OUTSIDE? I tried some suggestions from other questions like ${!varialbe_name} and different constructs with quote signs but with no luck so far.      #!/bin/bash     # color.sh     BLUE='\033[1;34m'     NC='\033[0m' # No Color      LINE_INSIDE="${BLUE}Blue Text${NC}"     echo -e ${LINE_INSIDE}      while read LINE_OUTSIDE; do             echo -e ${LINE_OUTSIDE}     done < text_file   Output:    Additional Information: I (indeed) also have shell-commands in my input-text-file which should not by executed. Only the variables should be expaned.


I am not sure if this is possible or not.  Lets say a I have class C1 that have a List<double> inside:  class C1{     List<double> theList {get;set}     double someVar {get;} }   I can get somevar through the string path "C1.somevar" and the same thing is valid for the list. However, is there a way for me to use string paths to retrieve a specific element of the list? Something like "C1.theList.0"  The reason behind is that in OxyPlot I want to be able to set the DataFielYof a LineSeries to a specific element in the list.  Cheers


Calculate $\int_0^\infty\frac{\sin x}xdx$ by integration of a suitable function along given paths

How can I calculate $$\int_0^\infty\frac{\sin x}xdx$$ by integration of a suitable function along the following paths:  where $R$ and $\varepsilon$ are the radius of the shown outer and inner semicircle, respectively. This seems to be quite interesting. How would one do that?


Prove $||a| - |b||$ is less than or equal to $|a-b|$

I was given the hint to split it into two cases ($|a| - |b|$ being positive and negative) and then use the triangle inequality. However, since the triangle inequality says that $|a+b|$ is less than or equal to $|a| + |b|$, so I don't see how I can use that to help since I'm dealing with subtraction. I've tried using the definition of absolute value, and I was able to find that $||a| - |b||$ = $|a| - |b|$ in my first case, but I couldn't do much with that.


Why ordinary sources of light such as bulb, flash light,.. etc cannot behave as coherent sources?

A coherent source is a source which produces waves of constant frequency which does not change with time. In other words, it produces waves with constant phase difference which does not fluctuate. But my textbook says that ordinary sources of light are not coherent sources. But why? Here is the explanation from my textbook : "In an ordinary source, light is emitted by atoms in discrete steps. An atom after emitting a short light pulse becomes inactive for some time. It again gains energy by some interaction, becomes active and emits another pulse of light. Thus, at a particular time a particular group of atoms is active and the rest are inactive. The active time is of the order of $10^{-8}s$ and during this period, a wavetrain of several meters is emitted. We can picture the light coming from an ordinary source as a collection of several wavetrains, each several meters long and having no fixed phase relation with each other. Such a source is incoherent in itself. Different wavetrains are emitted by different groups of atoms and these groups act independently of each other, hence the phase varies randomly from train to train. If two lamps are substituted in place of the slits $S_{1}$ and $S_{2}$ in a Young's interference experiment, no fringe will be seen. This is because each source keeps on changing its phase randomly and hence, the phase difference between the two sources also changes randomly. That is why, a narrow aperture $S_{0}$, is used to select a particular wavetrain which is incident on the two slits together. This ensures that the initial phase difference of the wavelets originating from $S_{1}$ and $S_{2}$ does not change with time. When a new wavetrain is emitted by the lamp, the phase is randomly changed but that change is simultaneously communicated to both $S_{1}$ and $S_{2}$ the phase difference remains unchanged. In order to obtain a fairly distinct interference pattern, the path difference between the two waves originating from coherent sources should be kept small. This is so because the wavetrains are finite in length and hence with large difference in path, the waves do not overlap at the same instant in the same region of space. The second wavetrain arrives well after the first train has already passed and hence, no interference takes place. In practice, the path difference should not exceed a few centimeters to observe a good interference pattern. Because of the incoherent nature of the basic process of light emission in ordinary sources, these sources cannot emit highly monochromatic light. A strictly monochromatic light, having a well-defined single frequency or wavelength, must be a sine wave which has an infinite extension. A wavetrain of finite length may be described by the superposition of a number of sine waves of different wavelengths. Thus, the light emitted by an ordinary source always has a spread in wavelength." I did not understand the analogy of 'wavetrains'. Someone please explain why an ordinary source of light is incoherent in itself. I am so confused. Please help.


Prove that the Cauchy-Riemann equations in polar coordinates are given in the following way: $ru_{r}=v_{\theta}$ ; $rv_{r}=-u_{\theta}$

Let we have $f(z)=u(r,\theta)+iv(r,\theta)$ where $z=re^{i\theta}$ (being $r\neq{0}$). We have to prove that the Cauchy-Riemann equations in polar coordinates are defined in the following way: $\space$ $ru_{r}=v_{\theta}$ ; $rv_{r}=-u_{\theta}$  I have started doing the exercise but I have no idea how to continue with the prove... This is the only thing I have done: $\space$ $f(z)=f(re^{i\theta})=u(r,\theta)+iv(r,\theta)$ $\space$ Could someone help me with it?


I need to sketch the image under the stereographical projection of sphere where the spherical cap $A < X < 1,$ with center lying on the equator, for fixed $ A. $ Separating the cases according to various ranges of $A.$  Here $X^2 + Y^2 + Z^2 = 1$ and $ (X,Y,Z) $ are points the unit sphere.


Can't get line from file to match up with string in code

Basically doing a project for school work and it needs to have a login system and it can be as basic as i like so i am just storing the usernames/passwords in a text file. i have written code to read the file line by line and store each line in a variable, this all works but when i am testing to see if i can compare it to string even though they are the same it does not seem to think so, i have ran other tests to make sure my if/else statements are correct and have ran into no other issues, my current theory is that it has something to do with the fact that the usernames and passwords are stored with "\n" after to make them appear on different lines of the text file. public static void main(String[] args) throws IOException {          File file = new File("C:/Users/Will/Desktop/UnPs.txt");     Scanner scan = new Scanner(file);     while(scan.hasNextLine()) {                  String passCheck = scan.nextLine();              if(passCheck == "test2,Test2") {             System.out.println("Test1");         }         else if(passCheck != "test2,Test2") {             System.out.println(passCheck);             System.out.println("not found");                         }                }        }     the output of running the code is: test1,Test1 not found test2,Test2 not found test3,Test3 not found but in my head after it reaches the second line of the file it should have the value of passCheck as "test2,Test2". if you want to see how the usernames and passwords are written to the file just ask but as i said my theory is that the "\n" is related


I have a list let's say {1,1,2,2,3,3,3,4,4,4}. I want to find a List of the elements that occur the most often (it has to be a list as there can be a situation like here that 3 and 4 occur most and I need to get that information. How can I achieve this using LINQ?


I have an ESP 3200 Kodak printer. It does a great job at printing however I am making skateboards and using heat transfer vinyl, and printing it in sections rather than a single page. I have recently ordered 100' of the transfer vinyl and am cutting it into 8.5" x 33" segments. I have changed the page layout to landscape, watched a few YouTube videos on how people do it with Excel to no avail simply because they never even did it themselves. They simply show the instructions and they didn't work, and showed no proof of completing the task. I am using GIMP image editor on a 2009 Mac Pro, and the Preview app. I am able to set the page settings in System Preferences and the page layout in print preview to 214mm x 838mm and 8.5" by 33" respectively, however I believe it's behaving like a graphics program in that it's showing scaling problems on pages after changing the printers default paper size in System Preferences and not printing the entire document, rather one page at a time. There is a possibility it will not print larger than 14 inches however the printer seems to handle the paper correctly and it makes me wonder if there's something wrong in my settings. It could be the file format too as Mac OS X seems to default to PDF, which is obviously arranged by pages.


Cannot use apt-get update: Repository ... does not have a release file

I installed kali on my acer predator helios 300 alongside Windows 10. I couldn't get past the login screen because it gets stuck after entering the credentials. So I googled it and found the issue was with some graphic drivers and so I ctrl+alt+f2 ed at the login screen and got a terminal. My sources.list file  was like this  #deb cdrom:[Debian GNU/Linux 2018.4 _Kali-rolling -  Official Snapshot amd64 LIVE/INSTALL Binary 20181016-16:07] kali-last-snapshot contrib main non-free #This system was installed using small removable media #(e.g. netinst, live or single CD). The matching "deb cdrom" #entries were disabled at the end of the installation process #For information about how to configure apt package sources #see the sources.list(5) manual   So I added this line to the sources.list file to update apt and install Nvidia drivers.  deb http://http.kali.org/kali/dists/kali-rolling main contrib non-free   And when I run apt-get update it says  Ign:1 http://http.kali.org/kali/dists/kali-rolling main InRelease Err:2 http://http.kali.org/kali/dists/kali-rolling main Release  404 Not Found [IP: 192.99.200.113 80] Reading package lists... Done E: The repository 'http://http.kali.org/kali/dists/kali-rolling main Release' does not have a release file. N: Updating from suck a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.


How to use convolution formula to find distribution of $n$ exponential random variables

Let $W_1, W_2, \dots $ be i.i.d. exponential $(\lambda )$ variables.   For each $n$, find the distribution of $T_n = W_1 + W_2 + \cdots + W_n$   I know how to deal with two i.i.d random exponential variables. Namely, I know that for two independent exponential random variables $X$ and $Y$ and $S$ = $X+Y$, I can use the discrete convolution formula to write:    $P(S=s) = \sum_{all x} P(X=x, Y=s-x)$. My problem is I do not know how to expand this to $n$ variables to answer my problem  Edit: I think this could be an induction problem:    For $T_1$ the distribution is just $W_1$, or the exponential distribution function.    For $T_2$ the distribution is $T_1 + W_2$, which would be the addition of two exponential distribution functions.    For $T_n$ then, the distribution is $T_{n-1} + W_n$ or the sume of $n$ exponential distribution functions.     Does this make sense and is this correct? How would I correctly set up the induction?


Does warp travel happen in the 4th dimension of euclidean space?

The first time someone explained the  to me (referring to  -not spacetime) they drew a picture of a  and used the analogy of starships traveling through subspace at warp speed.   When ships are traveling at warp, are they traveling through  in the fourth dimension?


If you have two Planck lengths extended from one point forming a right angle, whats the length of the hypotenuse?

Can we do measurements at this scale seeing that the length of the hypotenuse would have a value at a length that cant exist (1.4 Planck lengths)? Or is my interpretation of the  incorrect?


Why does the 'b' in absorb change to a 'p' in absorption?

The question pretty much says it all.  Why is "absorbtion" an incorrect spelling?


Use the Fitch system to prove the tautology (p ∨ ¬p)

I've scoured the math stackexchange and the philosophy one for some guidance on how to go about this while using the Fitch System.  Anyone can attempt it here;    I can reach the conclusion, but it's not in the correct "layer" of the proof. I'm stuck with the answer as a subproof.  (Note that the fitch system lacks contradiction elimination (RAA) as a method for getting out of assumptions).


why swapoff -a && swapon -a not help to Decrease the used swap in the linux machine

on the rhel version 7.5 the used swap is 12G  we change the swappiness from 10 to 1  echo 1 > /proc/sys/vm/swappiness  sysctl -w vm.swappiness=1  echo "vm.swappiness = 1" >> /etc/sysctl.conf   and did the   swapoff -a && swapon -a   then from free -g we still see the same used swap size  so seems that the change to swappiness , and swapoff -a && swapon -a  , not help to decease the swap use  the only thing that I think to do is to reboot the linux machine  is it make sense ?


Find the element on i th index without sorting and in O(n) complexity

Recently I came across a question,  There is an unsorted array of n elements. Once we sort the array, i th index will have an element. How would you find which element is going to be present on i th index in O(n) complexity on the unsorted array?  I tried many methods, finally I came to a conclusion that we may need to use an hash map. But later I found that hash map implementation usually follow a tree structure which has an log n complexity in insertion.  How shall I proceed?


I want to upload files to my servers at Digital Ocean and AWS. I can do that via the terminal using scp or sftp, but I want to automate this and do it in Python or any other programming language. In case of Python, how can I upload a file to a server in high level, should I use sftp client? Any other options?


What does the number quoted in parentheses mean in man page of some command?

In the Mac OS X Mavericks terminal, inside frisk man page, there is:  SEE ALSO        cfdisk(8), sfdisk(8), mkfs(8), parted(8), partprobe(8), kpartx(8)   Does it mean see also the eighth cfdisk or something else? If so, how can I find all of cfdisk from cfdisk(1) to cfdisk(8)?


How to generate a new random array index in function in Javascript

I'm creating a simple program in which the user tries to guess whether a "flipped coin" is heads or tails. I've written two variables:   var coin = ["heads", "tails"];  var random = coin[Math.floor(Math.random()*coin.length)];   A function called "runGame" was created to determine if the user input was equal to the random index:   function runGame() {   var input = document.getElementById('choose').value;    if (input === random) {     youWin();   }   else {     youLose();   }   createReset();   console.log(random); }   The createReset function is called (which basically generates a reset button)  and if clicked that calls another function called resetGame:    function resetGame() {   //generate new random index    //enable 'click to flip' button   button.disabled = false;   //paragraph tag resets to default   para.innerHTML = "";   para.classList.remove("class-win");   para.classList.remove("class-lose");   //delete 'click to reset' button   document.body.removeChild(resetButton);   //clear input   Everything works but I've yet to figure out to have the "random" variable generate a new index. (i.e the first time, random = "heads", after reset, random = tails). Basically, how would I approach this? I've tried reinserting var random = coin[Math.floor(Math.random()*coin.length)]; inside this function which DOES choose a new random index (verified through printing it out in console) but input ALWAYS equals the initial index, regardless of what the new index is.   Here is the entire code:
Heads or Tails?
  Enter "heads" or "tails":
 <input type="text" id="choose" value="">

 <button type="button" name="button">Click to Flip!</button>

     var coin = ["heads", "tails"]; var random = coin[Math.floor(Math.random()*coin.length)];  var para = document.querySelector("#result"); var button = document.querySelector("button");  //create reset button var resetButton = document.createElement("button"); var text = document.createTextNode("Click to Reset") //*****************  button.addEventListener('click', runGame); resetButton.addEventListener('click', resetGame);  function runGame() {   var input = document.getElementById('choose').value;    if (input === random) {     youWin();   }   else {     youLose();   }   createReset();   console.log(random); }  function resetGame() {   //generate new random index   var random = coin[Math.floor(Math.random()*coin.length)];   console.log("NEW INDEX: " + random);   //enable 'click to flip' button   button.disabled = false;   //paragraph tag resets to default   para.innerHTML = "";   para.classList.remove("class-win");   para.classList.remove("class-lose");   //delete 'click to reset' button   document.body.removeChild(resetButton);   //clear input  }  //functions within runGame  function youWin() {   para.innerHTML = "You Win!";   para.classList.add("class-win"); }  function youLose() {   para.innerHTML = "Wrong! The answer is " + random;   para.classList.add("class-lose"); }  function createReset() {   resetButton.appendChild(text);   document.body.appendChild(resetButton);   button.disabled = true; }     P.S. I also have trouble figuring out how to clear the input text value. "Input" is a variable defined in a function and I can't access that variable in the reset function.


Evaluate $$ \int_0^\infty\frac{x\log x}{(1+x^2)^2}dx $$   $$ \int\frac{x}{(1+x^2)^2}dx=\frac{-1}{2(1+x^2)}\\ \int_0^\infty\frac{x\log x}{(1+x^2)^2}dx= \bigg[\log x\frac{-1}{2(1+x^2)}\bigg]_0^\infty-\int_0^\infty\frac{1}{x}.\frac{-1}{2(1+x^2)}dx\\ =0+\int_0^\infty\frac{1}{2x(1+x^2)}dx=\frac{1}{2}\int\bigg[\frac{1}{x}-\frac{x}{1+x^2}\bigg]dx\\ =\frac{1}{2}[\log x]^\infty_0-\frac{1}{4}[\log|1+x^2|]_0^\infty=\frac{1}{4}\log\frac{x^2}{1+x^2}\\ =\bigg[\frac{1}{4}\log\frac{1}{\dfrac{1}{x^2}+1}\bigg]_0^\infty $$  Is there a better substitution that I can make to evaluate thi definite integral ?  Note: The solution given in my reference is $0$  Similar question is asked @ but that is about the convergence of the given integral, here I am looking for a better and obvious substitution that will make the above definite integral easier to solve. But, hint about the solution is found there, Thanks @lab bhattacharjee


When wording a date where the month and year are seperate from the day, should the month have a comma? (See example.)

Notice the following text:     “How old are you, anyway?” she asked.      “Thirteen as of the twenty‐sixth of July 2004,” he stated proudly.   Should "July" have a comma here? Thanks!


What is the word that means a query predicate can use an index

I remember reading in a paper a word that means “query predicate can be evaluated using an index” but I can’t recall the word. For example if you had a table with a column called “name” and you had an index on name, then a query that had a WHERE clause involving “name” could be succinctly described by this word as “An X-able query”, where X is the word I don’t remember.


I've recently gotten into physics, since I wanted to start learning it after I self-studied Calculus 1. I'm currently using the textbook "Fundamentals of Physics" by Halliday, however, I'm having a bit of a problem with vectors.   I think I have a bit of an intuitive understanding with the dot product, but not a strong one. On the note of cross product, I'm pretty clueless on how it works intuitively with the use of the right-hand rule.   I was wondering if someone could point me to any resources or give me an explanation that could try and give me a stronger intuitive sense for both? Thank you in advance.


Display a list of users with many properties (admin section on a website)

Usually, when I start to create a list of things in a web application, I start by displaying a table  ╭───╥────────────┬─────────────╮ │   ║  Name      │   Email     │ ╞═══╬════════════╪═════════════╡ │ 1 ║ First      │ a@b.ux      │ │ 2 ║ Lorem      │ ipsum       │ └───╨────────────┴─────────────┘   Then the web app grows and I need to display more things:  ╭───╥────────────┬─────────────┬─────────────┬─────────────╮ │   ║  Name      │   Email     │   etc.      │   etc2.     │ ╞═══╬════════════╪═════════════╪═════════════╪═════════════╡ │ 1 ║ First      │ a@b.ux      │Lorem        │ ipsum       │ │ 2 ║ Lorem      │ ipsum       │Lorem        │ ipsum       │ └───╨────────────┴─────────────┴─────────────┴─────────────┘   Then it start to become unreadable, because there are too many columns.  Assuming all of these fields/properties are important (I mean, they have to be displayed in the list), what can I do to display all this information ?  Example of properties: name, firstname, email, group, departement, role, last connected at, action, ...  DISCLAIMER: I'm not a UX designer. And it may be my first question here: I can edit if I misunderstood some rules about UX questions.


can not set user write permissions to file in SMB mounted directory

I have mounted a Windows 10 directory so I can edit some files on my Windownz machine.   sudo mount -t cifds //W10/Users ~/public/ -o username=bobby  When checking the directories they all have the owner root and as user bobby I only have read permission.  I already used chown and chmod to change the owner and permissions. The verbose output all told me that the owner was changed for instance but it was not. I was not able to edit files in there with user bobby.  What am I getting wrong in this case?


NullPointerException when adding to an initialized ArrayList

I'm getting a NullPointerException when trying to add a new instance of a Block class to an ArrayList called blocks.  Here is the code snippet containing the line of error:  public class Level1State extends GameState {      private Player player;     private ArrayList<Block> blocks;      public Level1State(GameStateManager gsm) {         super(gsm);         this.blocks = new ArrayList<Block>();     }      @Override     public void init() {         player = new Player(30, 30);          blocks.add(new Block(500, 400));     }     ... }   And the Block class is very simple:  public class Block extends Rectangle {     private static final long serialVersionUID = 1L;      public static final int blockSize = 64;      public Block(int x, int y) {         setBounds(x,y,blockSize,blockSize);     }      public void tick() {      }      public void draw(Graphics g) {         g.setColor(Color.DARK_GRAY);         g.fillRect(x - (int) GameState.xOffset, y - (int) GameState.yOffset,                 width,                 height);     } }   Any help is appreciated.


How to process categorical features with many values?

I want to apply machine learning and deep learning.  I have categorical data on string. My first option was to perform dummy encoding on the columns (scikitlearn). But there are some columns that have thousands of categorical values, if i use dummy encoding, this will expand the dataset enormously.  What other alternative do I have? If I simply perform a label encoder and then scale everything between 0 and 1 it could work?


Working with systems with Perfect Multicollinearity


I want to know if the order of tags matter when you ask a question?  I want my questions to first reach people who know  in my case and then people who know . But Stack Overflow orders Java first and then Groovy. Will that affect my relevancy?


Is there a way to enable "god mode" in Windows 8, like you could in Windows 7?

I am looking for a way to enable God-Mode in Windows 8, does anyone know how to do this or is it even possible?  It's a trick that .


Need El Capitan installer. Any Apple official link won't work. Need alternatives

I have a mid 2012 MBP. Came with Mountain Lion, upgraded to Mavericks in 2013 and never touched the OS X again. Long story short: I need El Capitan to run some work apps and it can't be newer because an essential piece of hardware won't work on Sierra or later. I installed High Sierra yesterday to confirm and because I didn't install El Capitan at the time, I can't do it now that Sierra/High Sierra are out. Is there a safe source here to download the installer (torrent)?  Thanks in advance.


usage of the word "have" in "I have her"

I  can't do with anything unless I have her all to myself.   In this sentence, what does have mean? Does it mean control?


Discrete analogy of partial integral formula.

Show that discrete analogy of partial integral formula as below. $$  \sum\limits_{k=0}^{n-1} y(k)\Delta x(k)=x(n)y(n)-\sum\limits_{k=0}^{n-1}x(k+1) \Delta y(k) + c  $$ I have tried as below and I stuck. \begin{align*}   \sum\limits_{k=0}^{n-1} y(k)\Delta x(k)&=   \sum\limits_{k=0}^{n-1} y(k)\left(x(k+1)-x(k)\right)\\   &=\sum\limits_{k=0}^{n-1} \left(x(k+1)y(k)-x(k)y(k)\right)\\   &=\sum\limits_{k=0}^{n-1} x(k+1)y(k)- \sum\limits_{k=0}^{n-1} x(k)y(k)\\  \end{align*} Now I can't expand it in form $$=x(n)y(n)-\sum\limits_{k=0}^{n-1}x(k+1) \Delta y(k) + c.$$ Anyone can give me hint?