If $x>0$, $y>0$, $z>0$ and $x+y+z=6$ then find the minimum value of    $$ f(x,y,z)=\left(x+\frac{1}{y}\right)^2+\left(y+\frac{1}{z}\right)^2+\left(z+\frac{1}{x}\right)^2. $$   Thanks in advance.

Given $a,b,c \in \mathbb{R^+}$ such that $a+b+c=12$   Find Minimum value of $$S=\left(a+\frac{1}{b}\right)^2+\left(b+\frac{1}{c}\right)^2+\left(c+\frac{1}{a}\right)^2$$  My Try: By Cauchy Schwarz Inequality we have  $$\left(a+\frac{1}{b}\right)+\left(b+\frac{1}{c}\right)+\left(c+\frac{1}{a}\right)\le \sqrt{3}\sqrt{S}$$  $\implies$  $$\sqrt{3S} \ge 12+\frac{1}{a}+\frac{1}{b}+\frac{1}{c}$$  Now by $AM \ge HM $ inequality we have  $$\frac{a+b+c}{3} \ge \frac{3}{\frac{1}{a}+\frac{1}{b}+\frac{1}{c}}$$ $\implies$  $$\frac{1}{a}+\frac{1}{b}+\frac{1}{c} \ge \frac{3}{4}$$  hence  $$\sqrt{3S} \ge 12+\frac{3}{4}=\frac{51}{4}$$  hence  $$3S \ge \frac{2601}{16}$$  so $$S \ge \frac{867}{16}$$  is this approach correct and any better approach please share.


As per the title, I need to filter lines from about a dozen csv files totaling about 20GB.  The file contents are formatted as follows:  IdSensore,Data,Valore,Stato,idOperatore 2001,01/01/2019 00:00:00,3.4,VA,1 2002,01/01/2019 00:00:00,89,VA,1 2008,01/01/2019 00:00:00,0,VA,1 2039,01/01/2019 00:00:00,2.1,VA,1   I need to select all lines such that the first item is a specific ID of my choice, for instance 8010, and such that the next-to-last value (which is always a 2-character code) begins with V. I also need to only output the second and third values in each line (the date and the following number).  I managed to match the desired lines with:  grep -h "^8010,.*,.*,V.,.*" *.csv   However, this matches the whole line. I'd like to match only the parts I need, so that I can have grep output only the match and redirect it into a file.  I tried using lookbehind to check for the correct ID without matching it, as follows:  grep -h "(?<=^8010,).*,.*,V.,.*" *.csv   However, this appears to match nothing.  This is solved by using the -P option with grep, yielding the following final regex:  grep -Ph "(?<=^8010,).*,.*(?=,V.,.*)" *.csv   I now need to do this filtering for dozens of IDs: can I do this via the command line, or should I try and write a script?  Note that I am used to MATLAB and such, but resorted to the command line because attempting to import just 2GB of that data into MATLAB made my poor laptop run out of RAM - nevermind the minutes of waiting for MATLAB itself to get a grip.

I wrote a regular expression which works well in a certain program (grep, sed, awk, perl, python, ruby, ksh, bash, zsh, find, emacs, vi, vim, gedit, …). But when I use it in a different program (or on a different unix variant), it stops matching. Why?


I would like to automate some services using cron jobs.  When I try to edit the crontab file at /etc/crontab, I am not able to save it as it says that it is read only.   What can I do?

I can't seem to edit and save config files in the root system (eg: /etc/dhcp/dhcpd.config); it just says "permission denied" or the save option is blocked in the text editor.  I'm pretty sure I'm a root user, but how do I make sure? If I am a root user, how do I fix this?


So I have this very, very old rar file that my uncle compressed. And now he has passed away. So the problem is, it has a password. He told me that the file is for me but he never told me the password. It is the only thing I have that reminds me of him and I would like to know if there is a way to bypass the password from the rar file.  I would love some help.  :|

I have .rar file that is password protected, but I accidentally have forgotten the password. The file extremely important to me.  How can I get my file back? In windows, there was many programs that could remove the password of such a file. Is there one for Ubuntu?


What are the best ways to deal with imbalanced datasets for classifying whether or not individuals pay their tuition? The data is 75% positive class (paid) and 25% negative (unpaid). Some approaches I have read about include stratified k-folds , undersampling and oversampling, and synthetic data with approaches like SMOTE. One challenge I am currently facing is that my XGBoost classifier predicts almost all positives because there is a class imbalance leaning towards the positive class.  Instead of tackling the imbalance by modifying the data, can certain classification algorithms handle imbalanced data better than others?   Lastly, when is data considered imbalanced from a practical standpoint (60-40, 80-20, 95-5, etc.)? Essentially I am asking whether the mild cases of imbalance are still worth addressing, or only severe ones?

We already had multiple questions about unbalanced data when using , , ,  and a number of other similar questions, what makes it a very popular topic! Unfortunately, each of the questions seems to be algorithm-specific and I didn't find any general guidelines for dealing with unbalanced data.  Quoting , dealing with unbalanced data     (...) heavily depends on the learning method. Most general purpose   approaches have one (or several) ways to deal with this.   But when exactly should we worry about unbalanced data? Which algorithms are mostly affected by it and which are able to deal with it? Which algorithms would need us to balance the data? I am aware that discussing each of the algorithms would be impossible on Q&A site like this, I am rather looking for a general guidelines on when it could be a problem.


This is a question from the answer given in the  I used the following codes given there,  \documentclass{article}  \usepackage[defernumbers=true]{biblatex}  \DeclareBibliographyCategory{cited} \AtEveryCitekey{\addtocategory{cited}{\thefield{entrykey}}}  \usepackage{filecontents}  \begin{filecontents}{\jobname.bib} @misc{A01,   author = {Author, A.},   year = {2001},   title = {Alpha}, } @misc{B02,   author = {Buthor, B.},   year = {2002},   title = {Bravo}, } @misc{C03,   author = {Cuthor, C.},   year = {2003},   title = {Charlie}, } \end{filecontents}  \addbibresource{\jobname.bib}  \nocite{*}  \begin{document}  Some text \autocite{A01,B02}.\cite{A01,B02}  \printbibliography[category=cited]% default title for `article` class: "References"  \printbibliography[title={Further Reading},notcategory=cited]  \end{document}   But while I am running, it is giving this output, not like whatever given in that answer.    Questions:   And one more important thing, it is not listing the reference items. Means I could not find the Reference in my article at last page. In citation, it is not giving the numerical values, whereas it is giving the keys. I want the numerical values like [1], [2], etc.   What is the problem? Help me  Technical Details:   I am using Linux mint and Texstudio to compile this...

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


In making a Mexican Polenta casserole, I need cooked corn kernels. Is is it possible to make this from the same stuff I would use to make popcorn? (Not the ones that come in microwaveable bags, just the raw corn kernels).  If not, could I possibly substitute it with something else?

I'm trying to cook some dried corn that normally is meant for popcorn.  I've soaked it 36 hours using bottled water and then rinsed it multiple times with tap water.  After that I cooked it for about 1 hour, yet the corn is still hard? What do I do?


How to solve this using induction? Use induction to prove that $F_n\ge2^{\frac n2}\;,\;$ for $n\ge6\;.$ $F_0=0\;,\;F_1=1\;,\;F_n=F_{n-1}+F_{n-2}\;.$

Prove by induction that $F(n) \ge 2^{n/2}$ for $n \ge 6$   I've done the following steps: 1) Base case: $F(6) = 8$, $2^{0.5 \cdot 6} = 8$, base case proved.  2) Induction: let's assume that $F(k) \ge 2^{0.5k}$ is true.   Now we need to prove that $F(k+1) \ge 2^{0.5(k+1)}$ is true either. Any ideas?


I recently installed Ubuntu on my Inspiron Laptop and it was working great. I turned off secureboot and it was letting me boot to Ubuntu until I booted back too Windows, and now the GRUB screen won't come up and I always boot straight to Windows 10. I tried running boot repair from a live USB stick, but got the output . I have been stuck for a while and tried a few different fixes but nothing seems to work. Any suggestions would be greatly appreciated.

I have a Sony VAIO S series with Windows 8 preinstalled, and I installed Ubuntu 12.10 on a new partition. When the PC boots Grub is display, and I can choose between Windows 8 (didn't worked at the beginning, had to change Grub settings) and Ubuntu 12.10. When I select Ubuntu 12.10 everything is OK, but when I use Windows 8, and I restart Grub isn't displayed anymore (Windows 8 boots immediately).  I booted a Ubuntu 12.10 LiveUSB, used efibootmgr, and found out that Windows 8 (each time it boots) changes EFI default bootloader from Grub to Windows Boot Manager.  How do I change this in Windows 8? I read something about bcdedit, but it does not work or I don't know how to use it...


So, I got Dell XPS 13 Developer Edition, 2018. The laptop started fine, and then it entered the guest account.  There is no way that I can create an administrator user account. I followed the steps provided by Ubuntu.com asking to go to Settings->User Accounts->'Unlock' and then add a new user, but I can neither unlock it nor can I add a new user.  After it booted for the first time, it asked to connect to wifi internet service. And that was not successful initially. But without asking any further questions toward setting up my account, it directly went to the guest account. No administrator account was created.  N.B: Any help is appreciated. And any suggestions to refine the question are most welcome.

I just bought a new laptop with ubuntu installed on it. When i first turned on the laptop ubuntu started with an error and restarted. Then when it turned on again i only had the guest session option. I've tried, but i can't use sudo in the terminal: Sudo: unable to change to root gid: operation not permitted Sudo: unable to initialize policy plugin I tried the recovery path too, but i don't have a username and can't do anything. I can only go in guest session. Please help, sorry if this is something obvious to do, it's my first time opening ubuntu.


I'm following a course in econometrics where we have established that for a linear regression model $$y_i=x_i'\beta+\varepsilon_i$$  If $1/N \sum_{i=1}^N x_i x_i'$ converges to a nonsingular matrix and $E[x_i \varepsilon_i]=0$ OLS will be consistent .   What I would like to know if it can happen that OLS is consistent and $E[x_i \varepsilon_i]\neq 0$ and if so this leads to some kind of degeneracy.  I'm not particular proficient in statistics so I hope I have tagged and formulated the question correctly - otherwise feel free to correct me.

Many econometrics textbooks (e.g. Wooldridge, "Econometric analysis...") simply write something similar to: "If the population model is $y = xB + u$ and (1) $\text{Cov}(X,U) = 0$; (2) $X'X$ is full rank, then OLS consistently estimate parameters $B$". I've worked out the math behind consistency but I'm a bit lost in interpreting the meaning.  We're talking about consistent estimation, but estimation of what? Please tell me if the following points are correct:   If we have random sample $X,Y$ and $X'X$ is invertible, then we can always define Best Linear Predictor of $y$ given $x$. And then OLS always consistently estimates coefficients of Best Linear Predictor (because in BLP we have $\text{Cov}(u,x)=0$ from the definition). Bottom line: we can always interpret OLS estimates as coefficients of BLP The only question is whether BLP corresponds to conditional expectation $\text{E}(y|x)$. If it does (for which we need $\text{E}(u|x) = 0$), then we can interpret OLS estimates as partial effects.   What is wrong with this or what am I missing? I don't get the point of stating the assumption of $\text{Cov}(u,x) = 0$, if this assumption is by definition fulfilled in case of Best Linear Predictor. And if we want to give structural interpretation to BLP coefficients (partial effects) we need stronger assumption of $\text{E}(u|x) = 0$ anyway. Is there any other interpretation we may have with zero covariance?


When i do a Collections.synchronizedMap(someHashMap), are all access to the map synchronized? Or only write operations (put) synchronized? How about if two threads are reading from the Map? Will it be synchronized? DOesnt seem necessary How abotu if one thread is doing put() and another is doing get()?

I have a Map which is to be modified by several threads concurrently.   There seem to be three different synchronized Map implementations in the Java API:   Hashtable Collections.synchronizedMap(Map) ConcurrentHashMap   From what I understand, Hashtable is an old implementation (extending the obsolete Dictionary class), which has been adapted later to fit the Map interface. While it is synchronized, it seems to have serious  and is discouraged for new projects.  But what about the other two? What are the differences between Maps returned by Collections.synchronizedMap(Map) and ConcurrentHashMaps? Which one fits which situation?


Since I'm using the  package by Joseph Wright a reference to a figure, or scheme (a float environment defined by the package) is always printed as:     Figure XY   or      Scheme YZ   Normally one would write someting like   Cooking bacon (see figure \ref{fig:Foo bar}) and eggs.   And get an output like     Cooking bacon (see figure XY) and eggs.   Now, with the chemstyle package, this renders to:     Cooking bacon (see figure Figure XY) and eggs.   How can I get back to the normal behaviour of \ref?  If you see this Joseph, think about implementing an option to switch the behaviour of this as some people may like the automatic output, but others, as me, don't.    MWE  \documentclass{article}  \usepackage{chemstyle} \usepackage{graphicx}  \begin{document}  \begin{figure}[htb!]     \centering     \includegraphics{example-image}     \caption{Foo figure}     \label{fig:foo} \end{figure}  Figure \ref{fig:foo} shows a Foo.  \end{document}

For some reason when I reference something in my text, it also gives the type of object referenced (like Tabel 1, instead of just 1). I understand, that this is not standard latex behavior, but I do not explicitly load packages, that should alter this. I guess, one of the packages I use silently does this.  Here is my MWE:  \documentclass[12pt, english, parskip, a4paper]{scrartcl}  \usepackage[journal=angew]{chemstyle}   % loads chemscheme, graphicx  \begin{document}     \begin{table}[h]         \caption{Test}         \begin{tabular}{c}             Test \\          \end{tabular}         \label{tab:test}     \end{table}      Look at Table~\ref{tab:test}. \end{document}   This will print      Look at Table Table 1.   How can I get rid of this? Thanks!


Now, you can see my question above. Will Ubuntu Touch run on the Nexus 5 device. And/Or will Canonical support the Nexus 5 device?  Because I will buy a Nexus 5 and I would like to use Ubuntu Touch on it.  Greetz and thanks.  Ralf Lange

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


How is it possible to remove the bullets and make the size of the headline  (sectioning names) in a suitable height?  \documentclass[demo]{beamer} \usefonttheme{professionalfonts} \useoutertheme{infolines} \setbeamersize{text margin left=8mm,text margin right=8mm}  \titlegraphic{\includegraphics[width=3cm]{fig1}} \usepackage{amsmath}% http://ctan.org/pkg/amsmath \usepackage{textpos} \newenvironment<>{examplefirst}[1]{% \centering   \setbeamercolor{block title}{fg=white,bg=green!40!black}%   \begin{block}#2{#1}}{\end{block}} \mode<presentation> {  % Block defenition  \newenvironment<>{varblock}[2][.9\textwidth]{%   \setlength{\textwidth}{#1}   \begin{actionenv}#3%     \def\insertblocktitle{#2}%     \par%     \usebeamertemplate{block begin}}   {\par%     \usebeamertemplate{block end}%   \end{actionenv}}   \addtobeamertemplate{frametitle}{}{% \begin{textblock*}{100mm}(.95\textwidth,-1cm) \includegraphics[height=1cm,width=4cm]{fig1} \end{textblock*}}     \setbeamertemplate{headline} {%   \begin{beamercolorbox}[ht=3.5ex,dp=1.125ex,%       leftskip=.3cm,rightskip=.3cm plus1fil]{section in head/foot}      \insertsectionhead   \end{beamercolorbox}% }  \usetheme{Frankfurt}  }  \usepackage{graphicx} % Allows including images \usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables  %---------------------------------------------------------------------------------------- %   TITLE PAGE %----------------------------------------------------------------------------------------  \title[Short title]{Full Title of the Talk} % The short title appears at the bottom of every slide, the full title is only on the title page  \author{Sthephen} % Your name \institute[UC] % Your institution as it will appear on the bottom of every slide, may be shorthand to save space { UC \\ % Your institution for the title page \medskip \textit{a} % Your email address } \date{\today} % Date, can be changed to a custom date  \begin{document}  \begin{frame} \titlepage % Print the title page as the first slide \end{frame}  \begin{frame} \frametitle{Overview} % Table of contents slide, comment this block out to remove it \tableofcontents % Throughout your presentation, if you choose to use \section{} and \subsection{} commands, these will automatically be printed on this slide as an overview of your presentation \end{frame}  %---------------------------------------------------------------------------------------- %   PRESENTATION SLIDES %----------------------------------------------------------------------------------------  \setbeamertemplate{headline} {%   \begin{beamercolorbox}[ht=3.5ex,dp=1.125ex,%       leftskip=.3cm,rightskip=.3cm plus1fil]{section in head/foot}      \insertsectionhead   \end{beamercolorbox}% } %------------------------------------------------ \section{First Section} % Sections can be created in order to organize your presentation into discrete blocks, all sections and subsections are automatically printed in the table of contents as an overview of the talk %------------------------------------------------    \begin{frame} \frametitle{Paragraphs of Text} a \end{frame}   %------------------------------------------------  \begin{frame} \frametitle{Multiple Columns} \begin{columns}[c] % The "c" option specifies centered vertical alignment while the "t" option is used for top vertical alignment  \column{.45\textwidth} % Left column and width \textbf{Heading} \begin{enumerate} \item Statement \item Explanation \item Example \end{enumerate}  \column{.5\textwidth} % Right column and width a \end{columns} \end{frame}  %------------------------------------------------ \section{Second Section} %------------------------------------------------   \end{document}

I actually like the bullets shown when using \useoutertheme{miniframes}, but for the long talk I have to give there are just ridiculously many.     Is it possible to keep the same theme and just removing the bullets, and then displaying slide numbers instead?  Here is a minimal example:  \documentclass[compress, final]{beamer}     \usetheme[height=0mm]{Rochester}     \usecolortheme{dolphin}     \useinnertheme{rectangles}     \useoutertheme[footline=empty, subsection=true]{miniframes}  \begin{document}  \begin{frame}{Test frame}     \begin{block}<+->{Block}         Beamer is cool     \end{block} \end{frame}  \end{document}


I have created a generalised function using requests ratelimit and backoff libraries. The objective of this function is to implement the following logic:   if the status of the returned object is not 200 nor 404 => raise error (so that if I have connection errors backoff can try up to a certain amount of times) if the status of the returned object is 404 => return error dictionary else return r.json   here's my function  import requests from requests import ConnectionError from ratelimit import limits, sleep_and_retry from backoff import on_exception, expo   @sleep_and_retry  # if we exceed the ratelimit imposed by @limits forces sleep until we can start again. @on_exception(expo, ConnectionError, max_tries=10) @limits(calls=500, period=FIVE_MINUTES) def call_api(url, api_key):     r = requests.get(url, auth=(api_key, ""))      if not (r.status_code is 200 or r.status_code is 404):         r.raise_for_status()      elif r.status_code is 404:         return dict({"error": "not found"})      else:         return r.json()   What actually happens is that if I have a 404 r.raise_for_status() gets activated - which hints me that there is something wrong with my logic.  I made an abstraction of this logic and indeed:  def logic_try(value):      if not (value is 200 or value is 404):         print("stopped with value {}".format(value))      elif value is 404:         return dict({"error":value})      else:         return dict({"correct": value})  # calls  logic_try(200) § {'correct': 200}  logic_try(404) § stopped with value 404 # should return {"error":value}  logic_try(400): § stopped with value 400    I would like the function to first check that the r.status i not 200 nor 404 and raise the error status so the decorator can call again. Then check if r.status is 404, in which case return an error dictionary which I store in a pg table, finally, all other case should simply return r.json() as i assume the r.status is a 200.

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


I have two data sets (two different countries), and for each data set I have 3 variables: 2 independents (years and car model), 1 dependent (sales)  To make it more visual it would look something like this:  Country 1  Car_Model  Year    Sales A          1       100 A          2       200 B          1       80 B          2       90 C          1       66   C          2       20   Then for the second data set:  Country 2  Car_Model  Year       Sales A          1          120 A          2          220 B          1          82 B          2          92 C          1          62 C          2          22   I have been asked to perform a t-test to check if there is a significant difference between countries, but taking into consideration the variable car_model and year. However, I can not understand if it is possible to perform a  t-test in such a problem, and which kind of t-test should I perform or how I should use the variables.  I think the idea here is to check the significant difference of model A in country 1 against model A in country 2, then model B in country 1 against model B in country 2, and so on. And at the end get a p value based on those previous p values. Is it possible to do this using a t-test in R?

I have two data sets (two different countries), and for each data set I have 3 variables: 2 independents (years and car model), 1 dependent (sales)  To make it more visual it would look something like this:  Country 1  Car_Model  Year    Sales A          1       100 A          2       200 B          1       80 B          2       90 C          1       66   C          2       20   Country 2  Car_Model  Year       Sales A          1          120 A          2          220 B          1          82 B          2          92 C          1          62 C          2          22   I have been asked to perform a t-test to check if there is a significant difference between countries, but taking into consideration the variable car_model and year. However, I can not understand if it is possible to perform a t-test in such a problem, and which kind of t-test should I perform or how I should use the variables.  I think the idea here is to check the significant difference of model A in country 1 against model A in country 2, then model B in country 1 against model B in country 2, and so on. And at the end get a p value based on those previous p values. Is it possible to do this using a t-test in R/SPSS?


Some problems of theory of real numbers are about proving that some real numbers are irrational. But I find it a bit confusing to prove that some real number cannot be expressed (equal) to the quotient of two intgers, when you are working in the theory of real numbers where term "integer" is not defined. So I think we can easily define "integer" as "difference of two natural numbers", then how can we define naturals ? Will this definition be "strong" enough to prove that there is no natural number between two consecutive natural numbers ? Or maybe there is an easier way to define integers in terms of reals without defining naturals ?

I have only a basic understanding of mathematics, and I was wondering and could not find a satisfying answer to the following:     Integer numbers are just special cases (a subset) of real numbers. Imagine a world where you know only real numbers. How are integers defined using mathematical operations?   Knowing only the set of complex numbers $a + bi$, I could define real numbers as complex numbers where $b = 0$. Knowing only the set of real numbers, I would have no idea how to define the set of integer numbers.  While searching for an answer, most definitions of integer numbers talk about real numbers that don't have a fractional part in their notation. Although correct, this talks about notation, assumes that we know about integers already (the part left of the decimal separator), and it does not use any mathematical operations for the definition. Do we even know what integer numbers are, mathematically speaking?


I got drafted into repairing a friend's laptop. He got a virus and after removing it the laptop would no longer boot into Windows. After banging my head against the wall for several days I've finally admitted that at this point a reinstall is the only option. I've already backed up most of his important stuff to an external using a Linux live cd.  Here's the issue: The laptop came with a recovery partition, which is unfortunately not working. So I burned a copy of the official Windows 7 install disk and want to use that. But the laptop is a few years old and the sticker on the bottom with the product key is illegible. To my knowledge the key isn't written down anywhere else, and I don't want to start the reinstall without being able to activate it.  So, is there any way to find the Windows product key without being able to read the sticker or boot up windows? I can access the filesystem using the live cd, but thats about it.  Thanks

A friend's Vista-based computer won't boot, so I am just going to format and reinstall.    The problem is that she never kept her product key for Vista.    Is there any way to recover that key from her hard drive (which is currently plugged into my computer as a secondary) without booting from it?


Which is correct:  "Dive right in to why you're involved"  or   "Dive right into why you're involved"  My guess is that the first is correct, since "in" is a part of "dive right in" and should be treated as a word separate from "to".

"Into" (one word) and "in to" (two words) are frequently confused.  In what situations should the former be used?  The latter?


Providing that $f :\Bbb R\to\Bbb R$ is continuous, and suppose $$|f(x)-f(y)|\ge|x-y|$$ for all real $x$ and $y$. Prove that the range of $f$ is $\Bbb R$ This problem is taken from an exercise placed at the end of the Limit chapter and before Differentiation one, so I think we should solve it without using Differentiation and I have no idea how.

Let $f:\mathbb{R} \rightarrow \mathbb{R}$ be a continuous function s.t $|f(x)-f(y)|\ge \frac{1}{2}|x-y|$ for all $x,y$. Then $f$ is injective can be seen easily as $x\neq y$ implies $f(x)\neq f(y)$.  But how to check that $f$ is surjective or not ?


I've been looking at some other answers to similar cases but not every one used different methods, and a lot of them were not what i needed, so here's my question :   What's the best/standard way to get the X and Z positions of the mouse onto a plane, so that object can rotate to look at that position?  I'm trying to get it in a similar setting to, for example "Angry Bots" where the Player is always facing mouse position.  Also, would that be camera independent? i mean, if my camera changes its angle, it would still work because it usually is a projection of the "screen" plane onto the "player" plane, right?  I'm sorry, i'm a bit overwhelmed with the many options Camera.main. has, and i'm not really sure which one should i use.

I want a game object to turn and look towards where the mouse was clicked (in world space).  It works well when considering all 3 dimensions, but I really only care for the plane formed by the x and z axis, not the y.  I've tried to fix this by setting the y of the directionTarget to the y of the object's position, but that gives weird results.  My code looks like this:  Quaternion rotationTarget;     float rotationLerpProgress;     float rotationLerpDuration = 1f;      // Use this for initialization     void Start ()     {      }      // Update is called once per frame     void Update ()     {             if (Input.GetMouseButtonDown (0)) {                     var ray = Camera.main.ScreenPointToRay (Input.mousePosition);                     RaycastHit rayHit;                      if (Physics.Raycast (ray, out rayHit)) {                             var rayHitPoint = rayHit.point;                              var rotationDirection = transform.position - rayHitPoint;                                                            rotationDirection.Normalize ();                             //rotationDirection.y = transform.position.y;                             rotationTarget = Quaternion.LookRotation (rotationDirection);                             rotationLerpProgress = Time.deltaTime;                     }                     //targetPosition = Camera.main.ScreenToWorldPoint (Input.mousePosition);                                     }              if (rotationTarget != transform.rotation) {                      transform.rotation = Quaternion.Lerp (transform.rotation, rotationTarget, rotationLerpProgress / rotationLerpDuration);                     rotationLerpProgress += Time.deltaTime;                       if (rotationLerpProgress >= rotationLerpDuration) {                              transform.rotation = rotationTarget;                     }              }      }   I must be missing something. How do I do this right?


I mean when we mention couple , we make a reference to two stuffs.   But I want to use it in a title to mean more than that. is this correct ?  To illustrate that: is the following title correct ?     Couple questions about your latest articles   What I want to mean by that :      multiple questions about on of your last article

What does “a couple” mean to you, and what does “a few” mean to you?  Is there a proper way to use these words?  It was striking to hear that “a couple” meant two (2) to someone.  My reaction was, “how/why do you make a short word longer by adding an extra syllable to just say ‘two?’”  I think Few: 2-3, Couple 4-6, Several 7+.  What are your thoughts?


We had a session recently wherein a character went down in combat due to a creature attack.  Two other characters stepped up to engage the creature while a third attempted to stabilize the downed character and thus help/circumvent the character having to make his death saving throws.  Our DM stated that the character attempting to stabilize would have an attack of opportunity from the creature. (The character providing aid did not move out of the reach of the opponent.)    As I remember from the rules as written, in 5e attacks of opportunity are only generated when a character moves out of a creatures threat range. Was my DM right?

What provokes an opportunity attack?  In 3.X moving out of a threatened square, standing up from prone, casting a spell (unless cast defensively), or making a ranged attack provoked, while in 4e moving out of a threatened square or making a ranged/area attack provoked.


(First of all, just to confirm, an offset variable functions basically the same way in Poisson and negative binomial regression, right?)  Reading about the use of an offset variable, it seems to me that most sources recommend including that variable as an option in statistical packages (exp() in Stata or offset() in R). Is that functionally the same as converting your outcome variable to a proportion if you're modeling count data and there is a finite number that the count could have happened? My example is looking at employee dismissal, and I believe the offset here would simply be log(number of employees).  And as an added question, I am having trouble conceptualizing what the difference is between these first two options (including exposure as an option in the software and converting the DV to a proportion) and including the exposure on the RHS as a control. Any help here would be appreciated.

Does anybody know why offset in a Poisson regression is used? What do you achieve by this?


I've just bought a  for my Mac Pro (late 2013) running Yosemite, to replace some older direct-attached storage I'd been using previously. I'm very happy with it so far, but one thing I didn't realise is that network-attached volumes aren't indexed by Spotlight. The NAS will be used to store thousands of PDFs documents, and I need to be able to find specific text within those documents easily. The network share (via AFP) is mounted as Data, so I've tried: $ sudo mdutil -i /Volumes/Data/ Error: unexpected indexing state (/Volumes/Data/)  Then $ sudo mdutil -E /Volumes/Data/ /Volumes/Data: 2015-08-28 17:13:21.637 mdutil[4613:183771] mdutil disabling Spotlight: /Volumes/Data -> kMDConfigSearchLevelFSSearchOnly Indexing disabled.  ... which seems to be to suggest that the QNAP simply won't support this. Can anyone confirm my interpretation of the above? If so, does anyone know of any software that will easily and reliably index the data (including the contents) of the documents on this volume?

I know in the past OS X did not support indexing network drives.   Has this changed?   Do more recent versions of OS X such as Yosemite support spotlight on network drives?  I am thinking of investing in a NAS storage device such as Synology and spotlight support is a requirement.  Since I have lots of data on my external drives right now.


Is it possible to calculate this sum in such a way that it only depends on n? $\sum_{k=1}^n k*2^{n-k}$

I want to Calculate $\sum_{k=1}^n k2^{n-k}$. Here's my attempt:  $$\begin{align}  &\sum_{k=1}^n k2^{n-k} = \sum_{k=1}^n k2^{n+1}2^{-k-1} =2^{n+1}\sum_{k=1}^n k2^{-k-1} & &\text{(1)} \\ &k2^{-k-1} = -\frac{d}{dk}2^{-k} & &\text{(2)} \end{align}$$   Plugging $(2)$ to $(1)$,   $$\begin{aligned}  2^{n+1}\sum_{k=1}^n k2^{-k-1}  &= 2^{n+1}\sum_{k=1}^n-\frac{d}{dk}2^{-k} \\  &= -2^{n+1}\sum_{k=1}^n\frac{d}{dk}2^{-k} \\  &= -2^{n+1}\frac{d}{dk}\sum_{k=1}^n2^{-k} \\  &= -2^{n+1}\frac{d}{dk}(1-2^{-n}) \\ &= -2^{n+1}\cdot 0 \\ &= 0 \end{aligned}$$   Obviously, I don't know much about summation and derivative. Can you please let me know where I am doing wrong and give me a hint for this question? Thanks!


Which is correct?  I have been successful in teaching the English language

Which of the sentences below are correct, and why? Which one would you prefer to use, and where are you from?   "The course materials are only available in English language." "The course materials are only available in the English language." "The course materials are only available in English."   Thanks!


According to Wikipedia visible light lie between 405-790 THz   Can I just sum "maximum" spectrum of the light if by definition white light is sum of colors (frequencies)?  Like 405+790?  I just want to know what is frequency of bombarding by photons "white" noise rather specific "color"

A white light, as we all know, is composed of seven lights VIBGYOR. Each of the component lights has distinct frequency ranging from one value to another. So, when the photons have wavelength of 600 nm it becomes a yellow light and when it changes to 700 nm it becomes a red light. So, does this imply that the frequency with which a group of photons vibrate determine the colour of light? Well, in that case, with what frequencies are photons vibrating for a white light?


Above schematics is just a representation of an OpAmp circuit coupled to a measuring device. Imagine we know the values of the following parameters: Vcc, Vout, R_feedback and R_measuring device. R_measuring_device can be the input impedance of a scope or a DAQ hardware. V_out is the output voltage of the circuit which is coupled to a voltage divider in the schematics.  If one wants to couple V_out to the measuring device, one may need to scale V_out in many cases(for example to lower the voltage). In this case the ratio of R1 and R2 matters and by selecting the right ratio we can scale the output voltage. So far I understand..  But we don't choose in real life R1 = 22 ohm and R2 = 10 ohm for instance. I mean the ratio is easy to figure out when we aim to scale the voltage, but how about the optimum resistor values for R1 and R2?   What is the criteria here? Okay I might guess if R1 and R2 is too small, the OpAmp could be loaded with too much current? But how to quantify the R1 and R2 to prevent it to load. Should we check the max current output of this OpAmp from the schematics?  Same confusion with the relation of R1 and R2 with input impedance of the measuring device(R_measuring_device). If R1 and R2 are too big or too small it could be problem?  And there is also a relation or limitation to R1 and R2 coming from R_feedback I guess. Is that right? R_feedback is connected to the output of many opAmp circuits? Does R_feedback have effect on choosing R1 and R2 values?   These all three things are in relation with R1 and R2 here. How can one quantify R1 and R2 considering surrounding resistors are known(R_feedbcak, R_measuring_device) as well as Vcc and V_out are also known? Is there a rule of thumb or a practical easy way?

I understand that the output voltage is determined by the ratio between the two resistor values, and that if the both resistors are same then output voltage will be exactly same for all; but what's the basis of picking the resistor values?there is any need of consider output current to choose resistor value.


My textbook has this quadratic equation that I have to solve, any ideas how I could show that?  $$15 | (21n^5+10n^3+14n),\;\forall n\in\mathbb{Z}$$

I'm not sure if it's correct, but what I have so far is; $$21n^5 + 10n^3 + 14n ≡ (1 + 0 - 1) ≡ 0 \mod 5$$ but I'm having trouble solving it in $\bmod 3$. I have: $$21n^5 + 10n^3 + 14n ≡ (0 + (?) + 2),$$ I'm not sure how to solve the $10n^3$ part of the congruence in $\mod 3$. Also, if I have any mistakes please let me know.


A: Is Mr. Bob at home?      B: Sorry, he isn't at home. He___to Hong Kong for vacation?      A. went   B. has gone   C. is going   Which one is correct answer? and why it is not the other ones?

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


Can we add 'Helpful flags count' and 'profile views' on mobile site/devices?  I'm aware of the following old question (and which may get this post marked as a duplicate) but I'm keen on providing, where possible, an appropriate and valid experience regardless of the device used by users:        Is there a reason why both can't be listed in the mobile view of SO? I log in frequently using a desktop, tablet and mobile device (depending on where I am and what I might be doing) and it seems we're missing a trick here to unify functionality and information across devices.  There are  in the above mentioned question as to what items are less important/displayed and I agree that these items are far more valuable than knowing my own age, location, email etc.   As a multi-device user, I'd prefer to see elements listed that can and do change rather than echo static data and exclude dynamic information based upon what device is used to access SO and other SE sites.

There is no "helpful flags" counter (with a link to ) on the mobile version of profile page. And I see no other way to reach flagging summary page and check your flagging history from mobile rather than switching to the full site view.  Desktop version     Mobile version


I'm new to android. I use Shared Preferences named "MyPref" to store and retrieve values. The code logic is, "MyPref" stores userid, usertype (customer, driver). In my SplashActivity I have written the following code. If user id is not null and user type equals either customer or driver the activity should navigate accordingly. But I get the following error: Kindly help  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference   SplashActivity:  public class SplashActivity extends AppCompatActivity {     SharedPreferences pref;     SharedPreferences.Editor editor;     Context context;     @Override     protected void onCreate(@Nullable Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_splash);         getWindow().setSoftInputMode(                 WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);         pref = context.getSharedPreferences("MyPref", 0);         editor = pref.edit();         String userid=pref.getString("userid","");         Log.e("userid",userid);         if(userid!=null)         {             String usertype=pref.getString("usertype1","");             if(usertype.equals("customer"))             {                 Intent customer=new Intent(SplashActivity.this, HomeFragment.class);                 startActivity(customer);             }             else             {                 Intent driver=new Intent(SplashActivity.this, DriverDashboardFragment.class);                 startActivity(driver);             }         }         else         {             Intent walk=new Intent(SplashActivity.this,WalkThroughActivity.class);             startActivity(walk);         }          new Handler().postDelayed(new Runnable() {              @Override             public void run() {              }         }, 2000);     }      @Override     protected void onResume() {         super.onResume();     } }

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


With Ubuntu 13.10  on how to disable the guest session no longer works because I think the lightdm config files have changed in Ubuntu 13.10.  I know you used to have to add the line allow-guest=false to the file /etc/lightdm/lightdm.conf to disable the guest account but there is no file with this name. I see four config files in /etc/lightdm/lightdm.conf.d and I am not 100% on which one I edit for this.  I think it's the file 10-ubuntu.conf but I don’t really know.

How do I disable the guest session in Ubuntu 11.10 or higher? I don't want people to be able to use my computer without using a password to log in!


On slide 24 of  (Its title is 'worked example, what Zwicky did'), the author says that $\langle\langle v^{2} \rangle\rangle = 3 \langle\langle{v^{2}}_{s}\rangle\rangle$. Can someone please explain why this is the case? The line-of-sight velocity should be the speed of a galaxy relative to the observer. But What is the radial velocity? Also, why do they have such a relation? It would be nice if you can also explain the meaning of spherical symmetry in the context (in the slide). To me it sounds like all member galaxies move in random directions, and this seems to contract the fact that they move along orbits.

I encountered  from Introduction to Modern Cosmology by Andrew Liddle. I had the exact same doubt as the OP of that question had, and the first answer makes sense but I don't understand why "For randomly distributed velocities, the speed V$_{||}$ you measure along your line of sight (LOS) is a factor $\sqrt{3} $ smaller, i.e. ∼350kms$^{−1}$." How to derive this?


Let $V$ be a vector space , $T:V \to V$ be a linear operator , then is it true that  $(\ker(T) \cap R(T) ) \times R(T^2) \cong R(T)$ ?  (note that the direct product is well-defined as both the spaces are subspaces of $V$ so have same ground field )   See     , note that the isomorphism holds when $V$ is finite dimensional as it is known that if $U,W$ are finite dimensional vector spaces over  a same field , then $\dim (U \times W)=\dim U + \dim W$ . Also note that the example given in the linked question doesn't violate the stated isomorphism here . Please help . Thanks in advance .  EDIT : One general thing that can be noted is that $R(T)/R(T)\cap \ker (T) \cong R(T^2)$ holds , but I don't know whether it can be used to prove or disprove the claim in question   NOTE : If $V,W$ are vector spaces over a field $F$ then $V \times W$ is a vector space with  addition and  multiplication defined as $(v,w)+(v',w'):=(v+v',w+w') $ ; $ k.(v,w):=(kv,kw)$ . It can be seen that if $B_V , B_W$ are bases for $V , W$ repectively , then $(B_V \times \{O_W\})\cup (\{O_V\}\times B_W)$ is a basis for $V \times W$ , so that if $V,W$ are finite dimensional then so is $V \times W$ and   $\dim (V \times W)=|(B_V \times \{O_W\}) \cup (\{O_V\}\times B_W)|=|B_V \times \{O_W\}|+|\{O_V\}\times B_W|=|B_V|+|B_W|=\dim V + \dim W$   So this "direct product" is substantially different from "direct sum"

Let $V$ be a vector space , $T:V \to V$ be a linear operator , then is it true that   $\ker (T) \cap R(T) \cong R(T)/R(T^2) $ ( where $R(T)$ denotes the range of $T$ ) ?    I know that the statement is true when $V$ is finite dimensional as I can show that if $V$ is finite   dimensional , then $\dim (\ker (T) \cap R(T))=rank (T) - rank (T^2)=\dim R(T)/R(T^2)$ ,   but I don't know what happens in general . Please help . Thanks in advance


I rooted my nexus 5 and upgrade the developer images of Android L (build number LPV79) back in June or July. Now. I'm waiting for Android 5 OTA. Will I be getting it? How can I check when it will come? All my apps updated to Android 5 so they are not working and crushing because they are not compatible. And I'm not getting any support from Google / Android. Who can help me?

I installed Android L developer preview on my Nexus 5. Now I was wondering if I still would get over-the-air updates. If not is there a way of fixing this?


I'm trying to write an earth engine script which extracts the pixel band values inside a polygon. (geometry)  Only for pixels completely within the polygon.  The polygons will be quite small. (field size)  I have looked through the docs, and searched for this, but am unable to find a solution.  Have only found statistical reductions.  // get the dates var startDate = ee.Date.fromYMD(2018,1,1); var endDate = ee.Date.fromYMD(2018,2,1);  // Create a geometry representing an export region. var myGeometry = ee.Geometry.Polygon( [[[-61.15985870361328, -32.94904673848672],       [-61.152305603027344, -32.944797148619905],       [-61.15659713745117, -32.9395388987784],       [-61.16432189941406, -32.94378874137744]]]);    var landsatCollection = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR");  // Filter image collection to dateRange of interest var landsatDateCollection = ee.ImageCollection(landsatCollection .filterDate(startDate,endDate));  //Filter to AOI. var landsatAOI = ee.ImageCollection(landsatDateCollection .filterBounds(myGeometry));  // Filter to image with least clouds var landsatBestImage = ee.Image(landsatAOI .sort('CLOUD_COVER') .first());  // Load a landsat image and select three bands. var landsatDownload = ee.Image(landsatBestImage) .select(['B4', 'B5']);     ///////// //Added code that was improved after Jon's comments /////////   // generate a new image containing lat/lon of the pixel and reproject it to Landsat projection var coordsImage = ee.Image.pixelLonLat().reproject(landsatDownload.projection());  var joinedImage = coordsImage.addBands(landsatDownload);  var valuesList = joinedImage.reduceRegion({   reducer: ee.Reducer.toList(4),   geometry: myGeometry }).values().get(0);  print(valuesList);   Jon's inspiration on the MODIS script allowed the modification above.  The valuesList now contains all the pixel information.  To see how to Export the data in valuesList to a CSV see

I need to create a feature collection from a list containing coordinates and band values.  These are extracted from a landsat image as shown in this linked script.    I'm unable to find a solution in creating a feature collection.  Here is the tail end code.  var valuesList = joinedImage.reduceRegion({   reducer: ee.Reducer.toList(4),   geometry: myGeometry }).values().get(0);  var feature = ee.Feature(null, valuesList);   // Wrap the Feature in a FeatureCollection for export. var myFeatures = ee.FeatureCollection([feature]);   // Export the image, specifying scale and region. Export.table.toDrive(myFeatures, "data", "myData", "B4-B5",  "CSV");   This doesn't work, because it is clearly the wrong way to create the feature collection.  I've tried to create it similar to Rodrigo E. Principe's solution of mapping a Feature Collection but I can't seem to create the initial feature collection to start with.


While looking for a way to split a column into multiple columns within a loop, I stumbled upon  containing this expression:   # Split delimited values in a DataFrame column into two new columns df['new_col1'], df['new_col2'] = zip(*df['original_col'].apply(lambda x: x.split(': ', 1)))   which works perfectly, but I am not able to understand how it operates, in particular with respect to the * sign. Until now, I have seen asterisks only in functions definitions and I have not been able to find any documentation for this case.  Could anyone explain how it works?

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


I've been having trouble getting started with this project because I'm not sure what I should be searching for. Any help on where/how to start would be greatly appreciated.  The idea is, I have an image of a postcard that I want users to be able to upload and add their logo to a designated blank area and then download it. Hopefully all through a single web page.  If it can be all be done locally through their browser without actually uploading anything to my web server, even better!  So, I'm trying to figure out what I should use to accomplish this.  Thank you again in advance for any suggestions and help!

I'm a big fan of Yahoo's  for speeding up websites. One of the recommendations is to combine images where possible to cut down on size and the number of requests. However, I've noticed that while it can be easy to use CSS sprites for layouts, other image uses aren't as easily combined. The primary example I'm thinking of is a blog or article list, where each blog or article also has an image associated with it. Those images can greatly affect load time and page size, especially if they aren't optimized. What I'm looking for, in concept or in practice, is a way to dynamically combine those images while running them through a loss-less compression using PHP.   A few added thoughts or concerns:   Combining the images and generating a dynamic CSS stylesheet to position the backgrounds of the images might be one way to go about it, but I also worry about accessibility and semantics. As far as I understand, CSS images should be used for layout elements and the img tag (with the alt attribute) should be used for images that are meant to convey information. I could set the image as a background to a div element and substitute a title attribute for the alt attribute, but I'm unsure about the accessibility and semantic implications of doing so. Might the GD library be a good candidate for something like this? Can you recommend other options?


I would like to just take a 2D silhouette outline of a side of one of my 3D meshes. I located the question  but since it was made over a year ago, and I am using Blender 2.8, the script does not work for me. Any advice on how to update it? It seems to error out around this part:  copy = ob.copy() sil = bpy.data.meshes.new("silhouette") copy.data = sil scene.objects.link(copy) scene.objects.active = copy copy.select = True bm.to_mesh(sil)   Also, more importantly, how would I export the silhouette? Like it wouldn't save as an stl file.

In Python 2.8, I would like to create copies of the object 'CubeTemplate' but am having no luck.  I have reviewed every blender.stackexchange post on this subject (, ,  and ) but cannot get them to work - either they don't apply or the sample code throws errors (perhaps because it was pre 2.8).  The code below throws this error:       AttributeError: 'bpy_prop_collection' object has no attribute 'link'   for x in range(1, 3):     bpy.data.objects['CubeTemplate'].select_set(True)     bpy.context.view_layer.objects.active = bpy.data.objects['CubeTemplate']     me = bpy.context.object.data # use current object's data     me_copy = me.copy()     ob = bpy.data.objects.new('CubeCopy'+str(x), me_copy)     ob.location = (0, 0, x)     scene = bpy.context.scene     scene.objects.link(ob)     scene.update()


I am looking for a way that I can reboot my desktop pc and have it restart in the same state as when it shut down, e.g. all programs/files I had opened, etc.   I guess I am looking to do something similar to a hibernate sleep/wake on a notebook.   Is this possible on a desktop pc with a full reboot?  Is there any software for this?   I am NOT looking to recover any UN-Saved work, etc, but rather, to restore my desktop to its same state e.g. same programs and documents open, etc.  I am running a windows based x64 PC with windows 7 professional.

I find that at the end of a long day, I sometimes have a large number of programs running. All which I will need to use tomorrow. Normally, this isn't an issue, I can simply lock the machine and come back tomorrow. My problem arrises when windows update launches in the middle of the night and force restarts my computer. That in turns closes all my open software. I of course save everything regularly so I don't loose anything, but I waste time reopening all of those resources whenever there is a restart.   [EDIT]  I should clarify that I still want to be able to restart my computer when an update comes down. Preventing the restart only delays the problem until later. I should have been more specific in that I want to be able to recover my working environment after a restart for any reason. Things like scheduled maintence, power loss, updates, and software installs.  [EDIT]  I can't simply have them setup to launch at startup becasuse those files change from week to week. So I need something that monitors what I have open, and gives me the option to "recover" those software sessions when I log back in.  Anyone have any suggestions on what I can do? I'd even be willing to purchase software to do this for me if that is the only option.  Thanks


Suppose an attack does 5 piercing and 5 poison damage (or 5 slashing and 5 fire, etc.) and the player parries the attack, and rolls to reduce 6 points of damage.  Which type of damage is reduced first?  Would the answer be different if it were 9 weapon damage and 1 elemental, or vice versa?  Parry:     When another creature damages you with a melee attack, you can use your reaction and expend one superiority die to reduce the damage by the number you roll on your superiority die + your Dexterity modifier.   This matters if, for example, the character has resistance to one of the damage types.  The kindest interpretation (and one that does make some "sense") would be that it reduces weapon damage first, and if it reduces the weapon damage to zero, none of the additional damage is done either, but that seems over powered.  Unless someone can unambiguously point me to rules that support this interpretation, I prefer an interpretation where the total damage reduced is as rolled.

Effects like  (PHB, p. 54) and Spirit Shield (XGtE, p.  10) reduce damage by a roll, irrespective of damage  (PHB 196). However, single damage rolls can have multiple damage types, as confirmed (for wording) by Jeremy Crawford in .   How do you know which part of the damage is reduced?   This could actually make a difference to the amount of damage taken if, for example, the creature taking damage is resistant to one or more of the damage types involved.       Cutting Words: ... When a creature that you can see within 60 feet of you makes an attack roll, an ability check, or a damage roll, you can use your reaction to expend one of your uses of Bardic Inspiration, rolling a Bardic Inspiration die and subtracting the number rolled from the creature's roll.   Using this ability to expand upon the examples found in  and :     Barny, an Ice Devil (MM, p.  75) hits Bobby, rolling 9 slashing damage and 11 cold damage.      Bobby's ally, Vera, is a level 10 bard of the college of Lore, and uses her Cutting Words ability on the attack's damage roll. She rolls a 9, which is subtracted from the Barny's damage roll.      Bobby is wearing his Boots of the Winterlands (DMG, p.  156), giving him resistance to cold.   We know that "resistance and then vulnerability are applied after all other modifiers to damage" (PHB, p.  197) and both slashing damage and cold damage are treated as "one big damage roll" (see the JC tweet), so is all the 9 slashing damage removed by cutting words, and then the cold damage halved for 5 total damage, or is 9 of the cold damage removed by cutting words, leaving 2 to be halved for a total of 1 + 9 = 10 damage taken by Bobby?   Who makes this decision?  When an effect (like cutting words) reduces damage without specifying type from a source containing multiple damage types, what part of the damage is reduced?


If I have 20 variables, should I do a pair-wise correlation check before building a classification model with Logistic Reg, Decision Tree or Random Forest ? Multicolinearity is a problem in regression. Is it a problem in classification as well ? Besides classifying, I also need to understand the influence of variables as well. The post  has conflicting answers.

In my understanding, highly correlated variables won't cause multi-collinearity issues in random forest model (Please correct me if I'm wrong). However, on the other way, if I have too many variables containing similar information, will the model weight too much on this set rather than the others?   For example, there are two sets of information (A,B) with the same predictive power. Variable $X_1$,$X_2$,...$X_{1000}$ all contain information A, and only Y contains information B. When random sampling variables, will most of the trees grow on information A, and as a result information B is not fully captured?


Anyone know about RSA Algorithm? If you don't, I will explain it. So to get a public and private key in RSA we need two primes number, let $p$ and $q$ be two prime number then we count $n=p.q$ and $\varphi (n)=(p-1)(q-1)$, next we choose public key e which prime relative with $\varphi (n)$, that is $gcd(e,\varphi(n))=1$, and $1<e<\varphi (n)$, next we find private key d which satisfied $e.d \equiv 1\pmod{\varphi (n)}$, example we have $p=7, q=11$ so that $\varphi (n)=60$, then we choose $e=13$, and finally we find $d=37$ and can't be another number. Question: The question is for every different $e$ then $i$ get different $d$ or the value of is unique, is that true? If yes how can $i$ prove it mathematically? Let say $i$ want to prove for every different value of e, the value of d is also different or d is unique? The idea that $i$ have is using contraposition let $e_1.d=e_2.d$ then $e_1=e_2$, anyone can help me to prove that? If you have another method you can use it as long as it true. Thank you.

Assume that an integer $a$ has a multiplicative inverse modulo an integer $n$. Prove that this inverse is unique modulo $n$.   I was given a hint that proving this Lemma: \begin{align} n \mid ab \  \wedge \  \operatorname{gcd}\left(n,a\right) = 1 \qquad \Longrightarrow \qquad n \mid b \end{align} should help me in finding the answer.  Here are my steps in trying to solve the problem: \begin{align} \operatorname{gcd}\left(n,a\right) = 1 & \qquad \Longrightarrow \qquad sn + ta = 1 \qquad \Longrightarrow \qquad sn = 1 - ta \\ & \qquad \Longrightarrow \qquad 1 \equiv ta \mod n \qquad \Longrightarrow \qquad ta \equiv 1 \mod n . \end{align} I know that having the GCD of m and a equal to 1 proves there is a multiplicative inverse mod n, but I'm not sure on how to prove $n \mid b$ with and how it helps prove the multiplicative inverse is unique.


For a date field , I know I can put validate like this :  <apex:outputText label=" Date" value="{0,date, MM'/'dd'/'/YYYY}" >                         <apex:param value="{!item.Date__c}" />   But this might have loopholes in it like 02/03/2017 entered manually may maean different in US and say UK format .  Is there any other validation that can be added through VF page or apex code ? Not asking about any JS solution.

How can I go about displaying a date that is formatted to a users locale, for example me and my Australian friends use the format dd/MM/yyyy, while the Americans amoung us use MM/dd/yyyy. I know I can format a date in visualforce like so  <apex:outputText value="{0,date,dd/MM/yyyy}">     <apex:param value="{!myDateValue}" />  </apex:outputText>   but how can I use the salesforce locale,   but how can I use these on my page?  I have found a very comprehensive solution , but I was hoping someone new of an inbuilt, or more elegant way.


pgfplot provides the possibility to insert a discontinuity on the axes (see MWE 1 & first srceenshot). However, it seems as this discontinuity is only applicable from the value 0 to ymin/xmin.  I plotted a histogram in which the occurrence of the values between -50 and -1.8 as well as between 3 and 50 are not really relevant to the reader (red boxes). However, I must provide these results. The most important part lies between the values -1.8 and 3 (green boxes). Therefore I thought in this case it would be useful just to plot the relevant part and to depict the irrelevant part with an interrupted interval (e.g. xleft1=-40, xright1=-5 and xleft1=5, xright1=40)  Question:  How can I insert a discontinuity as in MWE 1 between a value xleft and xrigth in my histogram?      MWE 1 (example from pgfplot manual)  \begin{tikzpicture} \begin{axis}[     axis x line=bottom,     axis y line=center,     tick align=outside,     axis x discontinuity=crunch,     xmin=-2, enlargelimits=false     ]      \addplot[blue,mark=none,          domain=-4:4,samples=20]          {x*x+x+104};  \end{axis} \end{tikzpicture}   MWE 2      \documentclass{article}     \usepackage{filecontents}     \usepackage{tikz}     \usepackage{pgfplots,pgfplotstable}       \begin{filecontents}{HistoData1.dat}     x   y     %-50    5     -1.8    29.     -1.6    20.     -1.4    41.     -1.2    43.     -1. 44.     -0.8    52.     -0.6    92.     -0.4    79.     -0.2    80.     0.  74.     0.2 81.     0.4 52.     0.6 68.     0.8 52.     1.  43.     1.2 37.     1.4 34.     1.6 17.     1.8 7.     2.  10.     2.2 6.     2.4 5.     2.6 1.     2.8 2.     3.  2.     %50 10     \end{filecontents}      \begin{filecontents}{HistoData2.dat}     x   y     -50 5     -1.8    29.     -1.6    20.     -1.4    41.     -1.2    43.     -1. 44.     -0.8    52.     -0.6    92.     -0.4    79.     -0.2    80.     0.  74.     0.2 81.     0.4 52.     0.6 68.     0.8 52.     1.  43.     1.2 37.     1.4 34.     1.6 17.     1.8 7.     2.  10.     2.2 6.     2.4 5.     2.6 1.     2.8 2.     3.  2.     50  10     \end{filecontents}      \begin{document}  \begin{tikzpicture}      \begin{axis}[title={\large 1st plot}     ]          \addplot[title={second plot},             ybar interval,             fill=blue         ] table [                   x=x,                 y=y         ] {HistoData2.dat} ;          \draw[green,dashed,thick] (axis cs:-5,0) rectangle (axis cs:5,95);         \draw[red,dashed,thick] (axis cs:-2,0) rectangle (axis cs:-52,10);         \draw[red,dashed,thick] (axis cs:1.5,0) rectangle (axis cs:52,7.5);          \node         [pin=90:\scriptsize xleft1,fill=black,circle,scale=0.3]          (xright1) at (axis cs:-40,5) {};         \node         [pin=145:\scriptsize  xright1,fill=black,circle,scale=0.3]          (xright1) at (axis cs:-5,5) {};          \node         [pin=45:\scriptsize xleft2,fill=black,circle,scale=0.3]          (aninnernode) at (axis cs:5,2) {};         \node         [pin=90:\scriptsize  xright2,fill=black,circle,scale=0.3]          (aninnernode) at (axis cs:40,2) {};      \end{axis}  \end{tikzpicture}  \vspace{1.5cm}  \begin{tikzpicture}      \begin{axis}[title={\large 2nd plot (relevant part of 1st plot)}     ]          \addplot[title={first plot},             ybar interval,             fill=blue         ] table [                   x=x,                 y=y         ] {HistoData1.dat} ;          \draw[green,dashed,thick] (axis cs:-2,0) rectangle (axis cs:3.3,95);      \end{axis}  \end{tikzpicture}   \end{document}

Is there an easy way to 'break' the axis in a pgfplots environment? What I'm talking about is something like     Any minimal plot will do as an example...for example  \documentclass{minimal}   \usepackage{tikz} \usepackage{pgfplots}  \begin{document} \begin{tikzpicture} \begin{axis}[ymin=0, ymax=80] \addplot {x*0};  \addplot {x^2+50}; \end{axis} \end{tikzpicture}  \end{document}   For example, in the below plot,    I want to break the axis from around y = 10 to y = 40.   Any ideas? Does PGF have this functionality? A search for `break' in the manual doesn't yield anything.


There is a small formula for finding definite integral by complex analysis methods : If $f(x)$ contains cosine and sine functions along with polynomial functions then $f(x)$ can be treated as  a real or imaginary part of $f(z)$. Then find the singular points of $f(z)$ and check which point lies in the upper half plane. CASE(a): If the singular point does not lie on real axis in this case we apply Cauchy residue theorem and may use Jordan's lemma and everything is clear to me. CASE(b): If the singular points lie on real axis, then there are two methods:  Method 1: Use the Cauchy residue theorem and take a semicircular contour which leaves the points of singularity on real axis.  Method 2 (short one): $\int_{-\infty}^\infty f(z)dz$ = $\pi i$ [$\sum$ residue at poles within C], if Jordan's lemma applied.   Now my question is what is proof for this short method? I thought of many things for why there is a factor of $\pi i$ in place of $2\pi i$ but they don't look right.

There is a small formula for finding definite integral by complex analysis method : If $f(x)$ containes cosine and sine functions along with polynomial functions then $f(x)$ can be treated as  a real or imaginary part of $f(z)$.Then find the singular points of $f(z)$ and check which point lies in upper half plane. CASE(a):If the singular point does not lie on real axis in this case we apply Cauchy residue theorem and may use Jordan's lemma and everything is claear to me . CASE(b):If the singular points lie on real axis ,then:       Method 1: by using cauchy residue thm and taking a semicircular contour which leaves the points of singularity on real axis.               Method 2:(short one)  $\int_{-\infty}^\infty f(z)dz$ = $\pi i$ [$\sum$ residue at poles within C] ,if jordan's lemma applied. now my question is what is proof for this short method .I thought of many things for why is there a factor of $\pi i$ in place of $2\pi i$ but they don't look right.


How can I remap the Super+w shortcut, which spreads all the windows, to one of the function keys?

I want to change the key bindings on some of the keys on my keyboard.  I want some to run commands and others to activate different keys.  What applications can I use to do this?      Index:       (from within System Settings)             I'm still looking for answers using dconf and any other method.


Could you tell me the difference between these two sentences:     A: He would be going to railway station.   B: He might be going to railway station.

To me both might and would appear to have similar meaning. E.g. consider the following sentences:.         I think taking some rest after work would be good.     I think taking some rest after work might be good.      The only difference I see is that would sounds more assuring than might. That is, in #1 speaker is more inclined to accept the fact that having some rest will be good, but in #2 speaker isn't sure about it. In #2 it is like 50/50, it can be good and it cannot be.     So, what is the difference between would and might?


I get the following output (and error at the end) when I run apt update on my system:  $ sudo apt update Ign:1 http://deb.debian.org/debian stretch InRelease                                                                                Hit:2 http://packages.microsoft.com/repos/vscode stable InRelease                                                                                Ign:3 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                Hit:4 http://security.debian.org/debian-security stable/updates InRelease Hit:6 http://ftp.us.debian.org/debian stable-updates InRelease                                                                                Hit:7 http://fai-project.org/download stretch InRelease                                                               Hit:8 http://repository.spotify.com stable InRelease                                                                  Hit:9 http://deb.debian.org/debian-security stretch/updates InRelease                           Hit:10 http://dl.google.com/linux/chrome/deb stable Release               Hit:12 http://deb.debian.org/debian stretch-backports InRelease           Hit:13 https://download.docker.com/linux/debian stretch InRelease Hit:14 https://deb.nodesource.com/node_10.x stretch InRelease Ign:15 http://deb.debian.org/debian stable InRelease Ign:17 http://deb.debian.org/debian jessie-backports InRelease Ign:18 http://deb.debian.org/debian jessie InRelease Hit:19 http://deb.debian.org/debian testing InRelease Hit:5 https://release.memsql.com/production/debian memsql InRelease Hit:20 http://deb.debian.org/debian unstable InRelease Hit:21 http://deb.debian.org/debian stretch Release Hit:11 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease Hit:23 http://deb.debian.org/debian stable Release   Err:25 http://deb.debian.org/debian jessie-backports Release   404  Not Found [IP: 151.101.248.204 80] Hit:26 http://deb.debian.org/debian jessie Release Reading package lists... Done E: The repository 'http://deb.debian.org/debian jessie-backports Release' does no longer have a Release file. N: Updating from such 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.   I don't understand why I'm getting this error.  $ cat /etc/apt/sources.list # These lines should work for many sites  deb http://deb.debian.org/debian stretch main contrib non-free deb http://deb.debian.org/debian-security stretch/updates main contrib non-free deb http://deb.debian.org/debian stretch-backports main contrib non-free  # repository that may contain newer fai packages for stretch deb [trusted=yes] http://fai-project.org/download stretch koeln  $ grep jessie-backports /etc/apt/sources.list.d/* /etc/apt/sources.list.d/jessie-backports.list:deb http://deb.debian.org/debian/ jessie-backports main contrib non-free /etc/apt/sources.list.d/jessie-backports.list:# deb-src http://deb.debian.org/debian/ jessie-backports main contrib non-free /etc/apt/sources.list.d/jessie-backports.list.save:deb http://deb.debian.org/debian/ jessie-backports main contrib non-free /etc/apt/sources.list.d/jessie-backports.list.save:# deb-src http://deb.debian.org/debian/ jessie-backports main contrib non-free   Some system information:  $ lsb_release -a No LSB modules are available. Distributor ID: Debian Description:    Debian GNU/Linux 9.8 (stretch) Release:        9.8 Codename:       stretch

I'm using a docker image as a base for my own development that adds the jessie backports repository in its Dockerfile and uses that to install a dependency. This image uses the following command to add the repository:  echo "deb http://ftp.debian.org/debian jessie-backports main" >> /etc/apt/sources.list   The problem is that fetching packages from the backports repository now  fails with the following error (this used to work previously):  W: Failed to fetch http://ftp.debian.org/debian/dists/jessie-backports/main/binary-amd64/Packages 404  Not Found  W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages  404  Not Found   I looked on that server, and those paths are indeed not present there.  I tried to figure out on the Debian backports site whether this particular repository should still be available, and I didn't find any indication that this was deprecated or something like that.  Is this a temporary issue with the repository, or is the jessie-backports repository not available anymore? And if this is not a temporary issue, what options do I have to use this or an equivalent repository without upgrading to the newer Debian stable version?


I am trying to start FireFox from php script using exec("firefox"). This works fine if i run php file from the terminal but does not work when run by the cron. User for cron & terminal is root. Please suggest some solutions.

I need to run a Java applet from a Firefox. The problem is, I need to run this Firefox from a cron. If I run from the command line and its work fine, but when put the command in the cron it failed:  */1 * * * * firefox http://domain.com/iqms/packetloss/iqmspacket2.html


I have done my masters in Statistics and am well acquainted with probability, though I am out of touch for last few years. Currently I am preparing for an exam which has a paper for probability and the syllabus is given below. I would prefer to follow a single book and make my own notes from it. I don't need over simplified starters guide kind of thing. I would prefer some of the classical books on the subject. I used to follow William Feller in my college days but am not sure if it covers everything in this syllabus (I don't have a copy with me right now). Thanks in advance for all your suggestions.   Syllabus   Sample space and events probability measure and probability space random variable as a measurable function distribution function of a random variable discrete and continuous-type random variable probability mass function probability density function vector-valued random variable marginal and conditional distributions stochastic independence of events and of random variables expectation and moments of a random variable conditional expectation convergence of a sequence of random variable in distribution, in probability, in p-th mean and almost everywhere, their criteria and inter-relations Chebyshev's inequality and Khintchine's weak law of large numbers strong law of large numbers and Kolmogoroff's theorems probability generating function, moment generating function, characteristic function, inversion theorem Linderberg and Levy forms of central limit theorem standard discrete and continuous probability distributions.

I am looking for a book (English only) that I can treat as a reference text (more colloquially as a bible) about probability and is as complete - with respect to an undergraduate/graduate education in Mathematics - as possible. What I mean by that is that the book should contain and rigorously address the following topics:   Measure Theory (As a mathematical foundation for probability)   It is of course fine if this theory is addressed with an emphasis on probability and not only for the sake of mathematical measure theory, although the latter would be great too.  Introduction to Probability, i.e. the most common theory a student is exposed to when taking a first course in theoretic Probability. For example: distributions, expected value, modes of convergence, Borel Cantelli Lemmas, LLN, CLT, Gaussian Random Vectors More advanced topics such as: Conditional Expectation (defined through sigma-Algebras), Martingales, Markov Processes, Brownian Motion   I want it to be one book so I can carry a physical copy of it with me and work through the material in my spare time.   Examples:   The book by Jean-Francois Le Gall which can be found here:  but (unfortunately for me) is written in French.  Rick Durrett's book on Probability which can be found here  - the  for this book seems a bit mixed, uncertain about how to weigh that.   I am well aware that it's not easy to meet all of the above criteria simultaneously, but I would be grateful for any recommendation.


I am trying to find the encoding of a file using the java program. But it always providing the UTF-8 as the output. Even though it is an ANSI file.  import java.io.InputStream  import java.io.FileInputStream  import java.io.BufferedInputStream  import java.io.InputStreamReader  new InputStreamReader(new FileInputStream("FILE_NAME")).getEncoding   The library is old and looks no proper support for that.   Some are so many answers, that say we can find the encoding of the file like    These solutions doesnt look good. According to @ Jörg W Mittag We cannot find the encoding of a file for sure.

With reference to the following thread:   What is the best way to programatically determine the correct charset encoding of an inputstream/file ?  I have tried using the following:  File in =  new File(args[0]); InputStreamReader r = new InputStreamReader(new FileInputStream(in)); System.out.println(r.getEncoding());   But on a file which I know to be encoded with ISO8859_1 the above code yields ASCII, which is not correct, and does not allow me to correctly render the content of the file back to the console.


Most animals I have heard of, such as killer whales, great white sharks, and other apex predators are, well, predators. But what would you call an apex non-predator?

We have apex predators for animals that have no natural predators.  But it only applies to animals that are themselves predators.  Are there more concise or pithy terms for "animals/organisms with no natural predators" that would encompass herbivores?


I've tried various methods, but I couldn't get it equal to $\frac1e$. Please help!

I'm trying to find  $$\lim_{n\to\infty}\frac{n}{\sqrt[n]{n!}} .$$   I tried couple of methods: Stolz, Squeeze, D'Alambert  Thanks!  Edit: I can't use Stirling.


I have seen  question before, but it seems to be talking about the daily cap.  The idea came to me when I saw . This is one guy who has only 1 answer (and 1 score 4 question) and 5k reputation. The reason being the fact that he has answered a question viewed by many people.  I believe this example shows there is something wrong with the scoring system. After all, by this single one-paragraph answer you cannot tell the person is an expert or has  or , or that he is one of the top 7% of all stackoverflow!  One way that seems to me that can address the problem is to limit the amount of reputation one can get from any of his answers and perhaps also questions. This is not a daily cap, but a forever cap. I'd say 200 for the answers and 100 for questions should be good, which correspond to 20 votes each. I believe an answer that gets 20 up-votes is a good answer and any number above that is just a matter of how often people have that question, not how great the answer is. Nevertheless, there are badges for answers with really high scores that still reward the answer, but don't give him unnecessary rights.  Note: I'm not trying to reduce other people's reputation. I'm trying to address the problems that arise since everything in the system depends on reputation.

I see profiles of , ,  etc and realize that even if they were to go inactive, it'll take years to beat them in terms of total rep, because they'll hit the rep cap every single day, thanks to their popular old answers for years to come.  I do realize, the answers totally deserve the rep they get, they are brilliant! But they do have to stop generating rep at some point to be fair right?


I'm using Mac 10.13.6.  I want to add environment variables to be recognized by my Apache instance.  However, I'm not able to edit the file, event when logged in as root ...  localhost:Documents davea$ sudo touch /System/Library/LaunchDaemons/org.apache.httpd.plist touch: setting times of '/System/Library/LaunchDaemons/org.apache.httpd.plist': Operation not permitted   I was reading here --  that I have to take some additional steps to allow access to certain files, but when I go to my Privacy settings, I don't see any option for unlocking "Full Disk Access" ...    All I want to do is edit my "/System/Library/LaunchDaemons/org.apache.httpd.plist" file.  What do I need to do to make this possible?

Apple has introduced , also known as "rootless", with OS X 10.11, El Capitan. I understand this is a step for general protection against malware but as a developer I need write access to some of the files it locks away.  How do I disable this protection?


I need to parse the below JSON in salesforce apex. In the message value, special character is not allowing to parse. Added image of JSON parser online. Javascript replace wont work in apex Ex: imagepath = imagepath.replace(/\/g, "\\") //wont work with this syntax

JSON(I am working with): JSONLinter confirms this is a valid JSON.  {     "errors": [         {             "params": {                 "password": "size must be between 4 and 30",                 "loginId": "must match \"^[a-zA-Z0-9_]*$\""             }         }     ] }   Attempt 1(Using JSONParser:  String str = '{ "errors": [ { "params": { "password": "size must be between 4 and 30", "loginId": "must match \"^[a-zA-Z0-9_]*$\"" } } ] }'; JSONParser parser = JSON.createParser(str); while(parser.nextToken() != null){     parser.nextToken(); }   Fails:      ▸    ERROR: System.JSONException: Unexpected character ('^' (code   94)): was  ▸    expecting comma to separate OBJECT entries at input   location [1,99]  ▸    ERROR: Class.System.JSONParser.nextToken: line   94, column 1  ▸    AnonymousBlock: line 3, column 1  ▸   AnonymousBlock: line 3, column 1   Attempt 2(JSON2Apex option):  public class JSON2Apex {      public class Errors {             public Params params;     }      public List<Errors> errors;      public class Params {             public String password;             public String loginId;     }  }  String str = '{ "errors": [ { "params": { "password": "size must be between 4 and 30", "loginId": "must match \"^[a-zA-Z0-9_]*$\"" } } ] }'; JSON2Apex obj = (JSON2Apex)JSON.deserialize(str, JSON2Apex.class);   Fails:     ▸    ERROR: System.JSONException: Unexpected character ('^' (code   94)): was  ▸    expecting comma to separate OBJECT entries at [line:1,   column:99]  ▸    ERROR: Class.System.JSON.deserialize: line 15, column   1  ▸    AnonymousBlock: line 2, column 1  ▸    AnonymousBlock: line 2,   column 1   Attempt 3(deserializeUntyped):  String str = '{ "errors": [ { "params": { "password": "size must be between 4 and 30", "loginId": "must match \"^[a-zA-Z0-9_]*$\"" } } ] }'; Map<String,Object> jsonObj = (Map<String,Object>)JSON.deserializeUntyped(str);   Fails:     ▸    ERROR: System.JSONException: Unexpected character ('^' (code   94)): was  ▸    expecting comma to separate OBJECT entries at [line:1,   column:99]  ▸    ERROR: Class.System.JSON.deserializeUntyped: line 11,   column 1  ▸    AnonymousBlock: line 2, column 1  ▸    AnonymousBlock:   line 2, column 1   Attempt 4(replace the problem causing double quote in JSON):  String str = '{ "errors": [ { "params": { "password": "size must be between 4 and 30", "loginId": "must match \"^[a-zA-Z0-9_]*$\"" } } ] }'; Map<String,Object> jsonObj = (Map<String,Object>)JSON.deserializeUntyped(str.replaceAll('\"', '\\"'));   Still fails:     ▸    ERROR: System.JSONException: Unexpected character ('^' (code   94)): was  ▸    expecting comma to separate OBJECT entries at [line:1,   column:99]  ▸    ERROR: Class.System.JSON.deserializeUntyped: line 11,   column 1  ▸    AnonymousBlock: line 2, column 1  ▸    AnonymousBlock:   line 2, column 1   I have looked into the below similar questions but still don't see any solution:


I've looked into other answers for this error, but none of them works. So, marking this question as duplicate is futile.   Partition Details:    Output of sudo fdisk -l:    Output of Boot-Repair:     Output of sudo parted -l:   I am trying to dual boot Ubuntu 16.04 with Windows 0. I've tried both Try Ubuntu and using desktop shortcut and installing directly. No improvements.  The details of the errors and log files are

I am attempting to install Ubuntu on a box which was previously running Windows 7.  I have also experienced the dreaded "Unable to install GRUB" error.  I am not attempting to dual boot. I have previously run a Windows boot disk and removed all existing partitions.  If I run the Ubuntu 12.04 install CD and click install after the config screens, I get the error   Executing 'grub-install /dev/sda' failed. This is a fatal error. (It is the same error as this question: )  All the questions I've read while looking for a solution are related to dual boot.  I'm not interested in dual boot, I'm after a clean out the box Ubuntu install. How can I achieve this?  (For my sanity, please use very simple instructions when responding. I don't claim to have any talent either for linux or as a sysadmin)    Additional details copied from comments dated: 2012-05-29 ~15:19Z  After booting from the CD, clicking Try Ubuntu, and then sudo fdisk /dev/sda I get fdisk: unable to seek on /dev/sda: Invalid argument  sudo fdisk /dev/sdb gives   Device contains neither a valid DOS partiion table, nor Sun, SGI or OSF disklabel.  Building a new DOS disklabel with disk identifier 0x15228d1d.  Changes will remain in memory only until you decide to write them.  After that of course, the previous content won't be recoverable.  Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite).  Command (m for help):   I should add the Live CD desktop is graphically bad. I've got missing parts of programs and the terminal occasionally reflects to the bottom of the screen. But I can't imagine this is related.


My question is, how can I make the program do something if some variable is equal to any element in an array? Is there any other simpler way than just looping through the entire array?  For example: Suppose there is a variable, line = 0; and an array, characters = [1,2,3,4];  So, what I want to do is that, if the variable "line", changes to any of the four elements in the array "characters" (i.e. 1,2,3,4), then the program needs to do something specific.   (The array can be way bigger than that and the elements in the array might be created during the program not beforehand.)

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


$a , b, c$ are positive integers such that ${a}\geq{b+c}$.  Prove that $$\sum_{i=0}^{b}{\binom{a}{i+c}\binom{b}{i}}=\binom{a+b}{b+c}$$

Show by combinatorial arguments that:   $$\sum_{k = 0}^m \binom{m}{k}\binom{n}{r + k} = \binom{m + n}{m + r}$$  Hello ,  I want to prove this argument by double counting method, i kinda have an idea of proving by comb args. but not by double counting... Can someone give any clues or ideas? thanks :)


I've tried to upgrate VLC, with sudo commands it was not possible. Now I get some errors when trying to upgrade the system like:  W:Failed to fetch http://ppa.launchpad.net/videolan/stable-daily/ubuntu/dists/wily/main/binary-amd64/Packages  404  Not Found W:Failed to fetch http://ppa.launchpad.net/videolan/stable-daily/ubuntu/dists/wily/main/binary-i386/Packages  404  Not Found E:Some index files failed to download. They have been ignored, or old ones used instead.

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


In 1990 I was buying some science journal, and it used to publish excerpts from sci-fi and fantasy books. In such a way I got acquainted to Ursula Le Guin and etc.  I remember there was a (maybe short) story where the main hero could hack networks, devices and get info or manage them.  In this new Intelligence TV series, the main hero also can hack computer systems.  I would be glad if you could point me to the story.  Thank you very much!

I read this while up at my grandparents somewhere around 1990ish. Given how many books they had from when my dad was growing up, there's a decent chance that it's older. It was a novel where the government kept pretty strict control of society. They had some sort of mass entertainment covered because I remember a reference to the government giving the citizens "their bread and circuses" as a reference to the Roman practices. The biggish twist is that the resistance isn't so much actively fighting the government as that they're producing a pressure valve by using their hackers to set up telephone relays which act as support lines. Anyone can call and talk about their troubles. The telephone technology was relatively old — I think I remember them talking about mechanical relays — and they advertised the changing numbers (they had to keep going to new ones as the government shut down the old ones) on flyers that they posted all over the place.  The one bit of imagery that really stuck out to me was where a female member of the resistance was explaining to the male protagonist that, no matter how bad things got, they had to stay on the line, and she recounted one of her first calls involving a mother who'd locked her baby into a high-chair and was flinging spoonfuls of vitriol (acid, but they specifically used the word "vitriol") at the baby as she talked.  I don't think I ever got to finish the book, so I have no idea how it ended.


Windows always requires a reboot after updates or big programs are installed.  Linux generally does not require reboots but occasionally does.    It seems to me that the OS should be able to touch/edit anything it needs to while it's running, or at a minimum shut down a process, update it, then start it up again with minimal interruption to the user.   What is the computer doing technically that requires a reboot? Why can't it update or install programs without rebooting? Rhetorical question:  Why hasn't Microsoft or others figured out how to update/install programs without reboots?

Why is it sometimes that I need to restart my computer after installing new software and at other times I don't?  Is there any reason why it needs this reboot or why it's not always one way or the other?


I would like to get the same possible autocomplete list as hitting [Tab][Tab] in bash but with a command. Is there anyway to do that?

Some of the git commands have many options, and it would often be useful to search through them for the one I need - I was just looking for the option which controls the TAB width in git-gui, but there are about 200 completions for git config. An obvious workaround is to copy all the completions into an editor and search through them, but I'd rather do  [something] | grep tab   There are no man or info pages for compgen, help compgen doesn't even explain its own options, and there's no auto-complete for compgen (how's that for irony?).  PS:  doesn't work.  PPS: This is not a question about git-gui - The  was elsewhere.  PPPS: This is not about auto-completing commands, only command parameters.


I have a directory called Klox with whats of files and images.  Klox is located in ~/Projects/Klox  When I use zip -r Klox.zip ~/Projects/Klox the archive is containing all the directories until reaching Klox. /home/vk/projects/Klox  I want the zip file to contain only the Klox folder. So people don't have to open home folder, then open vk folder then open projects and finally open Klox

I want to zip many folders in a directory tree like so   V-  something.txt  folder  folder  g.jpg  h.jar   When I try to zip it, it ends creating a zip archive with the v folder instead of the contents of it (the sub directories and files)  How can I avoid this?


Let $A $ be an invertible real $ n\times n $ matrix. Define a function $ F\colon\mathbb  R^{n}\times \mathbb R^{n} \to\mathbb R $ by $ F (x,y)=\langle Ax,y\rangle $ where $ \langle x,y\rangle $ denotes the inner product of $x$ and $y$ .let $ DF(x,y) $ denote the derivative of $F$ at (x,y) which is a linear transformation from $\mathbb R^{n}\times \mathbb R^{n}\to \mathbb R $ then    If $ x\neq 0 $ then $ DF(x,0)\neq 0 $ If $ y\neq 0 $ then $ DF(0,y)\neq 0 $ If $ (x,y)\neq 0 $ then $ DF(x,y)\neq 0 $ If $ x=0 $ or $ y=0 $ then $ DF(x,y) $=0 $   To determine which options are true  , I use the fact  $ (DF (x,y))(h,k) = f(h,y)+f(x,k) = \langle Ah,y\rangle +\langle Ax,k\rangle  $ . So option 4 is true ,  and   the other 3 options  are not necessarily true,  since it depends on $ (h,k)  $ also.    Am I right ? otherwise please give me some hints.  Thanks.

Let $A$ be a $n \times n$  invertible  matrix.Define a function $F:\mathbb{R}^{n} \times \mathbb{R}^{n} \rightarrow \mathbb{R}$ by $F(x,y)=\langle Ax,y\rangle$. Let $DF(x,y)$ denotes the derivative of $F$ at $(x,y)$ which is a linear transformation from $\mathbb{R}^{n} \times \mathbb{R}^{n} \rightarrow \mathbb{R} $. Then      1) if $x\neq 0$,then  $DF(x,0)\neq 0$      2) if $y\neq 0$,then  $DF(0,y)\neq 0$      3)  if $(x,y)\neq (0,0)$,then $DF(x,y)\neq 0$      4) if $x=0 \; or \;y=0$,then $DF(x,y)= 0$   I don't even know how to start the solution and also how to take derivative in higher dimensions.  Please help!  Thank you.


$k_n$ is defined with $k_1=0$ and $k_{n+1}=k_n+\sqrt{1+k_n^2}$. This is homework, please do not provide a complete solution  edit : One of the many things I tried is to make it the root of an equation like this . I first found that and then tried $k_{n+1}=\sqrt{1+2 k_n k_{n+1}}$ then $(\lim_{n\to \infty} k_{n+1}/2^{n+1})^2=\lim_{n\to \infty}  (1+2 k_n k_{n+1})/2^{2n+2}=\lim_{n\to \infty}  k_n k_{n+1}/2^{2n+1}$ but then I was stuck and found nothing to continue. All my other trials ended up stuck.

Be $(x_n)_n\ge 1 $  such that $x_1=1$ and $x_{n+1}=x_n+\sqrt{x_n^2+1}$ for every $n\ge 1$. Prove that the sequence $y_n=(2^n/x_n)_n \ge 1$ is convergent and find it s limit.  Being positive and decreasing, $y_n$ is clearly convergent. But finding it's limit really put me intro trouble. Any help?  Thank you!


<() doesn't seem to do what I expect.  This command requires a text file (it's JLinkExe, the text file contains commands for JLinkExe to run. But that shouldn't matter).  JLinkExe -CommanderScript <scriptfile>   I need to create the files dynamically, since their content depend on what I'm currently trying to achieve.  My current solution is to create a temporary file, fill it with content with printf, then call the JLinkExe command with that temporary file.  I have a feeling that this should be achievable with <(), but I don't succeed.   This doesn't work:  JLinkExe -CommanderScript <(printf "ShowEmuList\nexit\n")   I was expecting <() to create a temporary file descriptor, with the content of the file being the string. It works with cat, but JLinkExe complains the it cannot read the command file.  Am I wrong, or is it just that JLinkExe is stupid (it doesn't take stdin)?

On occasion process substitution will not work as expected. Here is an example:  Input:  gcc <(echo 'int main(){return 0;}')   Output:  /dev/fd/63: file not recognized: Illegal seek collect2: error: ld returned 1 exit status   Input:  But it works as expected when used with a different command:  grep main <(echo 'int main(){return 0;}')   Output:  int main(){return 0;}   I have noticed similar failures with other commands (i.e. the command expecting the file from the process substitution can't use /dev/fd/63 or similar). This failure with gcc is just the most recent.  Is there some general rule that I should be aware of to determine when process substitution will fail in this way and should not be used?  I am using this BASH version on Ubuntu 12.04 (I've also seen this in arch and debian): GNU bash, version 4.3.11(1)-release (i686-pc-linux-gnu)