Canonical form of PDE (2nd order) and its general solution.

The PDE is given is: $$ 4u_{xx} + 5u_{xy} + u_{yy} + u_x + u_y = 2$$ I need to reduce this hyperbolic equation into a canonical form. I got the characteristics as $\xi = y-x$ and $\eta = y - \frac{x}{4}$  Let $w(\xi,\eta) = u(x(\xi,\eta),y(\xi,\eta)) $. After substituting the partial derivatives of $u$ as pd's of $w$, I worked out the canonical form as (if anyone can confirm my answer it would be reassuring) $$ w_{\xi\eta} - \frac{w_{\eta}}{3} = -\frac{8}{9}$$ How to solve this PDE to obtain the general solution?  I proceeded in the following way: $v = w_{\eta}$, which gives $$v_{\eta} - \frac{v}{3} = -\frac{8}{9} $$ And solving this equation I got $$  w(\xi,\eta) = \int 3e^{(\xi + g(\eta))/3} \ \partial \eta + \frac{8}{3}\eta + C$$ or  $$u(x,y) = \boxed{ C + \frac{8}{3}\left(y-\frac{1}{4}x \right) + \int 3e^{(y-x + g(y-x/4))/3} \ (\partial y - \frac{1}{4}\partial x) } $$ I am not sure about the result. It looks messy and I don't know if my approach is correct. Any input is appreciated. Thanks in advance.


Controlling Categories in Script Validation Tools - Expanding Groups By Default

The validation tab in your script tool properties allows you to put parameters in categories. The :     Put parameters in different categories. Categories are expandable   window shades with a collection of parameters.     I am using the categories to organize my parameters, so I don't care about the expandable/collapsible feature;  it just adds a lot of time to the user.  This is all within a normal toolbox, not a script toolbox.  v10.1    Does anyone know how to have these categories expanded by default?  Here is my only validation code.  I am only utilizing categories.  The other parts are the default.  def initializeParameters(self):     """Refine the properties of a tool's parameters.  This method is     called when the tool is opened."""     self.params[0].category = "General"     self.params[1].category = "General"     self.params[2].category = "Inudaciones"     self.params[3].category = "Cienegas"     self.params[4].category = "DrenajesPrincipal"     self.params[5].category = "DrenajesSensillos"     self.params[6].category = "Inudaciones"     self.params[7].category = "Cienegas"     self.params[8].category = "DrenajesPrincipal"     self.params[9].category = "DrenajesSensillos"     return


Can I use a power supply with the same voltage but a different amperage?

I have an old router with a 12v 1.5a rating, and its power supply died so I'm using a 12v 1.2a power supply.  I have a MIDI keyboard with a 9V 500mA rating and I have a 9V 200mA power supply and one with a 9V 1A rating.  If I don't have the exact amperage, should I use higher or lower?


Exact probability of random graph being connected

The problem: I'm trying to find the probability of a random undirected graph being connected. I'm using the model $G(n,p)$, where there are at most $n(n-1) \over 2$ edges (no self-loops or duplicate edges) and each edge has a probability $p$ of existing. I found a simple formula online  where $f(n)$ is the probability of $G(n,p)$ being connected. But apparently it's too trivial for the writer to explain the formula (it was just stated briefly).  The desired formula: $f(n) = 1-\sum\limits_{i=1}^{n-1}f(i){n-1 \choose i-1}(1-p)^{i(n-i)}$  My method is: Consider any vertex $v$. Then there's a probability ${n-1 \choose i}p^i(1-p)^{n-1-i}$ that it will have $i$ neighbours. After connecting $v$ to these $i$ neighbours, we contract them ($v$ and its neighbours) into a single connected component, so we are left with the problem of $n-i$ vertices (the connected component plus $n-i-1$ other "normal" vertices.   Except that now the probability of the vertex representing connected component being connected to any other vertex is $1-(1-p)^i$. So I introduced another parameter $s$ into the formula, giving us:  $g(n,s)=\sum\limits_{i=1}^{n-1}g(n-i,i){n-1 \choose i}q^i(1-q)^{n-1-i}$,  where $q=1-(1-p)^s$. Then $f(n)=g(n,1)$. But this is nowhere as simple as the mentioned formula, as it has an additional parameter...  Can someone explain how the formula $f(n)$ is obtained? Thanks!


Insert a line break into a TOC item without breaking the line in the chapter title

I have a chapter title that is too long to fit onto one line in the table of contents, but LaTeX does keep it in one line, producing an overfull line in the TOC.  How can I insert a line break into this title so that to break it only in the TOC, not when it appears as a chapter heading?  I tried \protect\linebreak[1], but it did the opposite: it broke the line in the chapter heading but not in the TOC.  Here is a simplified version of my source (not quite a minimal example though):  \documentclass[a4paper,12pt]{scrbook}  \usepackage[utf8]{inputenc}  % UTF-8 input encoding \usepackage[T1]{fontenc}     % for hyphenation to work with                              %   accented letters, etc. \usepackage{lmodern}         % modern latin font  \usepackage[french]{babel}   % language support  \usepackage[hmargin=3.5cm,vmargin=3.5cm]{geometry}  \usepackage{tocstyle}  \usetocstyle{KOMAlike} % defined in tocstyle package  \renewcommand{\thechapter}{\Roman{chapter}}  \begin{document}  \frontmatter  \tableofcontents  \mainmatter  \chapter{Un chapitre}  \chapter{Deux chapitre}  \chapter{Systèmes d'équations différentielles   linéaires à coefficients \protect\linebreak[1]constants}  \section{Généralités}  \section{Résolution d'un système d'ordre $1$   par diagonalisation ou par triangularisation}  \end{document}


If $f(z)$ has an isolated singularity at $z=z_0$ and if $\lim_{z\to z_0} (z-z_0)^{a}f(z)=M\neq0,\infty$, then $\alpha$ must be an integer.

Problem : If $f(z)$ has an isolated singularity at $z=z_0$ and if $\lim_{z\to z_0} (z-z_0)^{\alpha}f(z)=M\neq0,\infty$, then prove that $\alpha$ must be an integer.  This is Exercise 9.22.1 in Silverman's "Complex Variables with Applications". Most of the exercises in this book are quite easy, but I have no idea with this question. How should I attempt?   P.S. There is no assumptions about $\alpha$, but I think it should be any complex constant.  P.P.S. When $\alpha$ is not an integer, even though I choose the principal branch of $(z-z_0)^{\alpha}$, does  $\lim_{z\to z_0} (z-z_0)^{\alpha}$ exist?


Making Source Code Copyable with listings

I'm using listings to display some matlab code in my latex document but i'd like to have syntax highlighting. I've tried two ways of getting syntax highlighting and neither make the code copyable. The first is:    \usepackage{listings}  \usepackage{color}  \usepackage{textcomp}  \definecolor{listinggray}{gray}{0.9}  \definecolor{lbcolor}{rgb}{0.9,0.9,0.9}  \lstset{          backgroundcolor=\color{lbcolor},          tabsize=4,          rulecolor=,          language=matlab,          basicstyle=\scriptsize,          upquote=true,          aboveskip={1.5\baselineskip},          columns=fixed,          showstringspaces=false,          extendedchars=true,          breaklines=true,          prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},          frame=single,          showtabs=false,          showspaces=false,          showstringspaces=false,          identifierstyle=\ttfamily,          keywordstyle=\color[rgb]{0,0,1},          commentstyle=\color[rgb]{0.133,0.545,0.133},          stringstyle=\color[rgb]{0.627,0.126,0.941},  }   The other way is:   \usepackage{listings} \usepackage{color}  \definecolor{dkgreen}{rgb}{0,0.6,0} \definecolor{gray}{rgb}{0.5,0.5,0.5} \definecolor{mauve}{rgb}{0.58,0,0.82} \definecolor{ideablue}{RGB}{1,24,146}  \lstset{ %   language=matlab,                % the language of the code   basicstyle=\footnotesize,           % the size of the fonts that are used for the code   numbers=left,                   % where to put the line-numbers   numberstyle=\tiny\color{gray},  % the style that is used for the line-numbers   stepnumber=1,                   % the step between two line-numbers. If it's 1, each line                                % will be numbered   numbersep=5pt,                  % how far the line-numbers are from the code   backgroundcolor=\color{white},      % choose the background color. You must add         \usepackage{color}   showspaces=false,               % show spaces adding particular underscores   showstringspaces=false,         % underline spaces within strings   showtabs=false,                 % show tabs within strings adding particular underscores   frame=single,                   % adds a frame around the code   rulecolor=\color{black},        % if not set, the frame-color may be changed on line-breaks within not-black text (e.g. comments (green here))   tabsize=2,                      % sets default tabsize to 2 spaces   captionpos=b,                   % sets the caption-position to bottom   breaklines=true,                % sets automatic line breaking   breakatwhitespace=false,        % sets if automatic breaks should only happen at whitespace   title=\lstname,                   % show the filename of files included with     \lstinputlisting;                               % also try caption instead of title   keywordstyle=\color{ideablue},          % keyword style   commentstyle=\color{dkgreen},       % comment style   stringstyle=\color{mauve},         % string literal style   escapeinside={\%*}{*)},            % if you want to add LaTeX within your code   morekeywords={*,...},              % if you want to add more keywords to the set   deletekeywords={...}              % if you want to delete keywords from the given language }    But neither of these make the code copyable. So what can I do so that the source code is copyable?


Which is standard usage in British English?   He said, 'Bite me.'  He said, 'Bite me'.


How do I get wireless working on an Asus X552VL?

I have a problem with my Wireless on my laptop. When i did rfkill list:  1: asus-wlan: Wireless LAN     Soft blocked: no     Hard blocked: no 2: asus-bluetooth: Bluetooth     Soft blocked: no     Hard blocked: no 4: hci0: Bluetooth     Soft blocked: no     Hard blocked: no 5: phy1: Wireless LAN     Soft blocked: no     Hard blocked: yes  itko@Mitko:~$ iwconfig eth0      no wireless extensions.  lo        no wireless extensions.  wlan0     IEEE 802.11bgn  ESSID:off/any             Mode:Managed  Access Point: Not-Associated   Tx-Power=off              Retry  long limit:7   RTS thr:off   Fragment thr:off           Power Management:off  mitko@Mitko:~$ lspci -nnk | grep -A2 0280 03:00.0 Network controller [0280]: Qualcomm Atheros AR9485 Wireless Network Adapter [168c:0032] (rev 01)     Subsystem: AzureWave Device [1a3b:2c97]     Kernel driver in use: ath9k mitko@Mitko:~$ lsmod | grep -e ath9k -e asus asus_nb_wmi            16990  0  asus_wmi               24191  1 asus_nb_wmi sparse_keymap          13948  1 asus_wmi ath9k                 164164  0  ath9k_common           13551  1 ath9k ath9k_hw              453856  2 ath9k_common,ath9k ath                    28698  3 ath9k_common,ath9k,ath9k_hw mac80211              626557  1 ath9k cfg80211              484040  4 wl,ath,ath9k,mac80211 wmi                    19177  3 mxm_wmi,nouveau,asus_wmi video                  19476  3 i915,nouveau,asus_wmi


I have a question!  I have Ubuntu 15.04 and windows 7 on my PC in dual-boot mode. Now, for some reasons, my Ubuntu is totally broken! When I try to boot Ubuntu, a terminal-like screen comes and the only thing I can do is typing some commands (and I don't know how to fix my Ubuntu using this screen).   So, I picked up my Ubuntu files using windows 7 (with this ) and now I want to remove Ubuntu and install it from scratch. The only problem here is deleting my current Ubuntu (which doesn't work!)! When I insert a bootable disk of Ubuntu, it doesn't give me the option to re-install Ubuntu (seems that it doesn't identify the installed Ubuntu).   The only way I can think of, is deleting Ubuntu files From its partition on Windows 7. Does this solution work? Can Ubuntu be uninstalled with deleting its files using Windows?  Thank you!


Hierarchical panel data: Fixed effects vs. hierarchical linear models vs. mixed models

I have problems about understanding the intuition and differences about when to apply fixed effects, hierarchical linear models (multilevel models) and hierarchical mixed models. I will try to explain my difficulties in understanding with following example I am currently working on.  I would like to analyze the influence of component characteristics to its performance during the product development process. Each component belongs to a subsystem and the subsystem belongs to a product. Thus, I have hierarchical data. The dependent variable is measured on all level. The independent variables are measured on all levels. I have this data for a couple of similar products with the same hierarchical structure resulting in panel data with repeated cross-sections.  Here are some examples of my variables.  Dependent variable:   Development performance   Independent variables:   Number of materials Weight Complexity Prior experience Novelty Subsystem dummy (subsystem level) Number of parts (subsystem level) Budget (subsystem level) Assigned engineers (subsystem level) Product dummy (subsystem level) Customer segment (product level) Market (product level) Price (product level)   This is what I understood so far.  Fixed effects:   With the help of fixed effects all time invariant effects will be absorbed, so the omitted variable bias is reduced. In my case I would like to use component fixed effects and product fixed effects as I may have left out some variables on the component level and products also differ slightly. Due to fixed effects I won’t be able to analyze interaction effects between individual and group level characteristics as group characteristics are absorbed. But this is not a problem as my questions are on the component level. Constant factors like the hierarchical dummy variable drop out.    Hierarchical linear models (multilevel models)   Characteristics are analyzed on multiple levels simultaneously I could use different types (Random intercepts, random slopes or random intercepts and slopes model) Evaluation of interaction effects between individual and group level characteristics is possible. But: Here I might get a problem with omitted variable bias   Hierarchical mixed models   Mixed models are characterized as containing both fixed and random effects. The fixed effects are analogous to standard regression coefficients and are estimated directly.  Random effects may take the form of random intercepts or random coefficients.   So here are finally my questions   Fixed effects model: How do I include independent variables from higher levels that are not time invariant?  Each group data is allocated to the individual level??? Is this correct or does it violate the independence assumption. What is the intuition choosing between fixed effects, hierarchical linear models and mixed models? What conditions should be met? What problems (e.g. endogeneity or bias problem) does each model solve? Mixed models: What variables should I use as fixed and random effects?


How to configure a hotkey/shortcut to activate a macro in Outlook 2007?

Is there a way to configure Outlook 2007 so by pressing a [CTRL]+[letter] combination, a macro is activated?


What is the meaning of "well-defined" and how to prove something is "well-defined"

I'm reading the book Analysis 1 by Terence Tao. There is a concept of well-defined which is mentioned a lot of time in the book but I don't fully understand. For example, in the picture below, in order to define the $subtraction$ $operation$ of 2 integers, he firstly defined the $negation$ $operation$ of integers. After the definition, he stated that the definition is well-defined and we can prove that it is well-defined. Could you please explain me what well-defined means and how can we prove something is well-defined or not ? Is there any collection of criteria for something to be well-defined ? ("something" here can be a definition, an operation) Thank you very much for your help! [Image]


While adding one day to the date in Java, not updating the month

I am hitting an issue and want some help in one more.  Below is my code block -  public Date addDays(Date date, int days)     {         Calendar cal = Calendar.getInstance();         cal.setTime(date);         cal.add(Calendar.DATE, days); //minus number would decrement the days         return cal.getTime();     }   StartDate = "02/06/2016"; DateFormat df = new SimpleDateFormat("mm/dd/yyyy"); for (int i=0; i < 90; i++) {                 try{                     rawStartDate = df.parse(StartDate);                     formattedStartDate = df.format(rawStartDate);                     String timeBookedForPerDay = startHour + ":" + startMin + ":" + startSlot + "-"                             + endHour + ":" + endMin + ":" + endSlot;                     bookedFor.put(formattedStartDate, timeBookedForPerDay);                     rawNextDate = addDays(rawStartDate, 1);                     StartDate = df.format(rawNextDate);                 }                 catch ( Exception ex ){                 }             }   Now the issue i am hitting is, till the time the month is february adding one day is working fine iteratively. However when the month should change, it starts iterating on the same month.  Also adding the day to the date is not taking care of the number of days in month i.e. 29 in Feb and 31 in march.  Any pointers, what can be a better way.  Output is (Truncated a bit) -  ***Start Date***03/01/2016 ***Start Date***03/02/2016 ***Start Date***03/03/2016 ***Start Date***03/04/2016 ***Start Date***03/05/2016 ***Start Date***03/06/2016 ***Start Date***03/07/2016 ***Start Date***03/08/2016 ***Start Date***03/09/2016 ***Start Date***03/10/2016 ***Start Date***03/11/2016 ***Start Date***03/12/2016 ***Start Date***03/13/2016 ***Start Date***03/14/2016 ***Start Date***03/15/2016 ***Start Date***03/16/2016 ***Start Date***03/17/2016 ***Start Date***03/18/2016 ***Start Date***03/19/2016 ***Start Date***03/20/2016 ***Start Date***03/21/2016 ***Start Date***03/22/2016 ***Start Date***03/23/2016 ***Start Date***03/24/2016 ***Start Date***03/25/2016 ***Start Date***03/26/2016 ***Start Date***03/27/2016 ***Start Date***03/28/2016 ***Start Date***03/29/2016 ***Start Date***03/30/2016 ***Start Date***03/31/2016 ***Start Date***03/01/2016 ***Start Date***03/02/2016 ***Start Date***03/03/2016 ***Start Date***03/04/2016 ***Start Date***03/05/2016 ***Start Date***03/06/2016   Any suggestions or pointers or any duplicate question i can refer?  Thanks,  AJ


Monomorphisms and Epimorphisms in the category of small categories

Denote by $\mathbf{Cat}$ the category of small categories, i.e. categories whose class of arrows is a set. I am working with classes but I suppose it works the same if one is working in a given universe following the Grothendieck approach.  My question is whether monomorphisms and epimorphisms in $\mathbf{Cat}$ can easily be classified. An arrow between two small categories is just a functor.  In particular I was wondering if the subcategories of a given small category correspond to the category-theoretic subobjects in $\mathbf{Cat}$. Given a fixed object $X$ in a category I call an isomorphism class of monomorphisms with codomain $X$ a $\textit{subobject}$ of $X$.


Show that all horses are of the same color.

Im trying to understand the solution about this, and all the other solutions are.. a bit weird for me and dont answer all my questions!  Reference :   Im using the answer there as reference, but my understanding is a bit different!     Find the error in the following proof that all horses are the same   color. CLAIM: In any set of h horses, all horses are the same color.      PROOF: By induction on h.      Basis: For h = 1. In any set containing just one horse, all horses   clearly are the same color. Induction step: For k > I assume that the   claim is true for h = k and prove that it is true for h = k + 1. Take   any set H of k + 1 horses. We show that all the horses in this set are   the same color. Remove one horse from this set to obtain the set H1   with just k horses. By the induction hypothesis, all the horses in H,   are the same color. Now replace the removed horse and remove a   different one to obtain the set H2 . By the same argument, all the   horses in H2 are the same color. Therefore all the horses in H must be   the same color, and the proof is complete.   Here's what i have come up with :  Suppose a set of 1 horse. $H_a = { horse_{1} }$  Obviously, all the horses in set $H_a$ are the same, since theres just 1 horse.  So using that as the Basis of the induction we can proceed and try to prove its true for $N$ horses.  -- I dont fully understand the part below   As an example : set $H_0$ :   $H_0 = { horse_{1}, horse_{2}, horse_{3}... horse_{n} }$  In my understanding, its because, I can make a subset  formed by 1 horse :  $K_1  = {horse_{1}}$ $K_2  = {horse_{2}}$ ...  I don't get it. I clearly know that this proof is a lie.  And for me, its because you cant claim theres a relation on a set with size $>= 2$ , since :  $H_1 = { horse_{1}, horse_{2}}$  Theres nothing that says $horse_{1}$ equals $horse_{2}$. The basis was for one horse. But that alone is not a proof.  So what should I do ?


Is it possible to use both rtx and amd cards at the same time?

I bought a amd card recently but keep reading about how blender works faster with rtx cards. So can I sometime in the future buy a rtx card and combine it with the amd card or is there no way to do it?


Smallest positive integer $n$ s.t. f(n) = $n^2 + n + 41$ is composite?

I'm pretty sure it's 40 but I'm not too sure if it's enough to show that:    $n(n+1) + 41$  $41(\frac{n(n+1)}{41} + 1)$  and the smallest composite no# will be achieved when n+1 = 41, n =40?  Am I missing anything here? --> Yes I still need to show that for n < 40, it's prime..ideas?  Thanks


Where do I find Mega Stones? I have already upgraded my ring, yet nothing happened afterwards


For no positive integer $n$ can both $n+3$ and $n^2 + 3n + 3$ be perfect cubes.

This question is a competition-math related problem.   Show that for no positive integer $n$ can both $n+3$ and $n^2 + 3n + 3$ be perfect cubes.  Is there a way to solve the above problem without induction? Any help is appreciated. Thanks.


An equivalent definition of uniform integrability

Let $(X,\mathcal{M},\mu)$ be a measure space and $\{f\}$ be a sequence of functions on $X$, each of which is integrable over $X$. Show that $\{f_n\}$ is uniformly integrable if and only if for each $\varepsilon \gt 0$, there is a $\delta \gt 0$ such that for any natural number $n$ and measurable subset $E$ of $X$, if $\mu(E) \lt \delta$, $$ \left|\int_E f_n~d\mu\right| \lt \epsilon.$$     I think one direction $(\Rightarrow)$ is clear. Since $f_n$ being uniformly integrable imply that for every $\varepsilon\gt 0,~\exists \delta \gt 0$ such that for any $E\in \mathcal{M},~\mu(E)\lt \delta$, $\int_E |f_n|~d\mu$ for every natural $n$. But then   $$ \left|\int_E f_n~d\mu\right|\le \int_E|f_n|~d\mu \lt \varepsilon.$$    Any suggestions for the other direction?   Edit:  Following Davide's suggestions, I have   $$ \begin{align*} \int_E |f_n|~d\mu & \le \int_{E\cap [f_n \ge 0]} f_n~d\mu + \int_{E\cap [f_n \lt 0]} (-f_n)~d\mu\\ & = \left| \int_{E\cap [f_n \ge 0]} f_n~d\mu \right| + \left| \int_{E\cap [f_n \lt 0]}f_n~d\mu \right| \\ & \lt \varepsilon + \varepsilon = 2\varepsilon. \end{align*} $$


How do I install the latest stable version of LibreOffice?

LibreOffice is seeing some dramatic improvements each version and subversion that goes out.   I would like to have always the latest version of LibreOffice on my machine(s). I know of the PPA that exists but is it recommended to use it with 12.04 for daily use? What are the pro and cons of using the PPA? Will it break my system/Libreoffice installation?  Does libreoffice get eventually also upgraded in the Ubuntu repositories or does this upgrade happen only with new releases? Who manages the upgrades of libreoffice in Ubuntu and in the PPA?


Why does transfer files to another computer by `sudo rsync` require the destination computer's root's password?

I am trying to transfer a directory to another computer  $ rsync -a --delete --stats -h wget 'olive:/tmp'  Number of files: 5 (reg: 4, dir: 1) Number of created files: 5 (reg: 4, dir: 1) Number of deleted files: 0 Number of regular files transferred: 4 Total file size: 12.94K bytes Total transferred file size: 12.94K bytes Literal data: 12.94K bytes Matched data: 0 bytes File list size: 0 File list generation time: 0.001 seconds File list transfer time: 0.000 seconds Total bytes sent: 13.31K Total bytes received: 103  sent 13.31K bytes  received 103 bytes  5.36K bytes/sec total size is 12.94K  speedup is 0.96   In case the source directory contains some files require local root permission, I add sudo. Is it correct?  But why does it keep asking me for the other computer's root's password? I provided the password of destination's root, but it keeps asking for it.  $ sudo rsync -a --delete --stats -h wget 'olive:/tmp' root@olive's password:  Permission denied, please try again. root@olive's password:    How shall I do if I want to copy source files that require local root permission?  I tried the suggested duplicate, but it didn't work  $ sudo rsync -e 'ssh -i /home/t/.ssh/id_rsa' -a --delete --stats -h wget 'olive:/tmp' root@olive's password:  Permission denied, please try again. root@olive's password:    Thanks.


How to write a LaTeX command that could discriminate if it's being called with pdfLaTeX in order to use PSTricks?

I'm writing a class for LaTeX, and I need to make it general. I want to include a simple image, a logo, within the class, which would be inserted into the document as a simple command \insertCompanyLogo. To avoid extra files, I added the PostScript definition of the logo in the .sty file.  % Include PSTricks package \usepackage{pstricks} % Create new command to insert logo \newcommand{\insertCompanyLogo}{   \psset{xunit=.5pt,yunit=.5pt,runit=.5pt}   \begin{pspicture}(180,180)      \psline(0,0)(180,180) %The actual image is far more complex   \end{pspicture} }   This works good when I compile the document with latex <filename>. However, it fails when I try to use pdflatex.  In order to use PSTricks with pdflatex, some modifications are required. For example, I can add in the .sty file \usepackage[pdf]{pstricks}.  Then compile the document using pdflatex -shell-escape <filename>. But this won't be general, and it won't work using the regular latex command.  My question is: Is there any way to define a command that understand if the document is being compiled with pdflatex or latex? That way I can add a couple of \ifthenelse{}{}{} to the include line of PSTricks. Thus, the document that uses this .sty class and calls the \insertCompanyLogo could be compiled with both commands without any modification.  I hope I was clear enough. And any solution, tip, recommendation or workaround, as always, is more than welcome.  EDIT: Forgot to mention, I think that packages like xelatex and asymptote that could make this easier. But I would like this to work with a standard TexLive or MiKTeX installation, which is probably what 95% of the users of this class will have installed  EDIT 2: This question was marked as duplicate. The other questions address the engine issue (pdflatex vs. latex). Helpful information. But they leave out the PSTricks part, and how to make its use flexible and multi-engine, and that was the reason of my question.  EDIT 3: At the end, I opted for a completely different solution. What I wanted was to put a logo with a macro that works with both engines, latex and pdflatex. I used TiKz  \documentclass{article} % Include package TiKz \includepackage{tikz} % Create new command to insert logo \newcommand{\insertCompanyLogo}{   \begin{tikzpicture}     \draw[thick,rounded corners=8pt] (0,0) -- (0,2) -- (1,3.25)      -- (2,2) -- (2,0) -- (0,2) -- (2,2) -- (0,0) -- (2,0);   \end{tikzpicture} } \begin{document} \insertCompanyLogo \end{document}   The actual logo, and the contents of the tikzpicture environment, I got them from Inkscape, with an extension to export to TiKz format.


Prove the if $o(g) =x$ and $o(h) = y$ then $o(gh) = xy$

Take an Abelian group G, and let $g,h \in G$ with $o(g) = x$ and $o(h) = y$, prove that if $x,y$ are coprime, then $o(gh) = xy$  (o(g) denotes the smallest integer x s.t. $g^x = e$)  My (bad) attempt:  since $o(g) = x$ then $o(g) | x$, similar $o(h) | y$  Now let $o(gh) = k$ for some integer k,  then since $x,y$ are coprime $o(g) | o(h)o(gh)$ implies $o(g) | o(gh)$, similarly $o(h) | o(gh)$ i.e. $k = z_1 x$ and $k = z_2 y$, so the only way for this to be possible is if $z_1 = y$ and $z_2 = x$ and we're done  is this the right approach? Could someone correct me somewhere? Also, why does G have to be Abelian?


What I want to do is to fill a polygon (country) with a graphic file in any format (jpg., bmp., png.).  It should look like this:     I'm aware that GIS soft is not proper for such a operations but maybe is there any option to do it only in QGIS.


Creating Centrelines from Road Polygons/Casings using ArcGIS Desktop?

I want to create center lines from road polygons.   Are there any automated tools in ArcGIS for Desktop to do this?  I am including a Screenshot of my vector file below.


Why does my wife's skin buzz when she's using her laptop?

When my wife uses her laptop, if I touch her skin, I can feel a buzz.  She doesn't feel the buzz, but she can hear it if I touch her ear.  So I'm guessing it's a faulty laptop, and she's conducting an electrical current.  But why would she not feel anything, and what would it be that she would be hearing when I touch her ear?    More info:  The effect is only intermitent - it's pretty reliable in a single session on the laptop, but some sessions it won't happen and others it will.  I had the same sensation with a desk lamp that I had several years ago, with no moving parts (as far as I could tell)  The effect only occurs when I move my finger - if I'm stationary, I don't notice anything.   I was playing with my son, and noticed the same buzz.  First I thought he was touching the laptop.  Then I realised he had skin-to-skin contact with my wife who was using the laptop.


I have a very simple bash script that runs flawlessly when I do   ./removeOldBackup.sh   or  sh /home/myusername/backup/removeOldBackup.sh   but when I add it to crontab like  * * * * * sh /home/myusername/backup/removeOldBackup.sh   or  * * * * * /bin/sh /home/myusername/backup/removeOldBackup.sh   it never works...  This is my script:  #!/bin/sh  find . -name 'files_20[1-3][0-9]-[0-9][0-9]-[1-2][1-9]--*' -delete find . -name 'files_20[1-3][0-9]-[0-9][0-9]-0[2-9]--*' -delete  find . -name 'database_20[1-3][0-9]-[0-9][0-9]-[1-2][1-9]--*' -delete find . -name 'database_20[1-3][0-9]-[0-9][0-9]-0[2-9]--*' -delete   This is my script permissions:  -rwxr-xr-x 1 root root 295 Jul 25 10:07 /home/myusername/backup/removeOldBackup.sh   Crontab is added for user root.  This is what I find in /var/log/syslog:  Jul 25 10:11:01 myservername /USR/SBIN/CRON[7583]: (root) CMD (sh /home/myusername/backup/removeOldBackup.sh)   So again, when I run the script manually, my backup files get removed correctly. When it is run by cron, they never get removed. I'm using debian-6.0-x86_64.


I want to test an (upstream) custom kernel on Fedora.  The plan so far is:   use a recent fedora config as starting point, e.g. /boot/config-3.6.6-1.fc17.x86_64 lookup build dependencies lookup right make commands execute some make commands cp resulting vmlinuz/System.map to /boot adjust grub   But what about the initramfs...img file ? How do I generate it?  What else is important?


How to stop Time Warner cable search on Firefox for Android?

I went into about:config and have the following:  browser.search.defaultenginename Google  browser.search.official true  browser.search.order.1 Google  keyword.URL https://www.google.com/search?p=   And still, when I type in the search bar, it pulls up Time Warner Cable Road Runner search instead of Google. It looks like only if I have more than 1 word does it decide to use google -- maybe using only 1 word means I type a malformed URL? How can I fix this to use Google as a proper search engine?


Add the Same Modifier to Multiple Objects at Once?

Is it possible to add a modifier to more than one mesh at once?  I have a lot of unique objects,  and I want to set a subdivide modifier to them, would I have to do each one individually?   I have tried selecting all the objects and then adding a modifier, but as I expected, it only added it to the active object.


How to override the hostname that DHCP configures on a CentOS7 box in AWS?

The title nearly says it all.  I have a VM in EC2 running CentOS 7. It uses DHCP, which seems to be a EC2 requirement.  DHCP keeps overwriting the hostname on reboot, no matter what I try.  I won't enumerate it, but I've tried pretty much every suggestion here:  as well as those found on several other sites that google searches turned up.  I don't understand if it's the particular OS version or AWS/EC2 environment, but I can't change the hostname and make it stick across reboots.  Even brute forcing it via /etc/rc.d/rc.local (adding "/bin/hostnamectl set-hotname foo.bar.baz" did not work.  I can't believe other AWS/EC2 users haven't figured this out.  Please help.  Update: This also does not work:  I.e., adding a DNS A record for the box in AWS's Route53 (and verifying it works), and setting HOSTNAME=foo.bar.baz in /etc/sysconfig/network (checking after a reboot) is also futile.   Update 2:  A similar question was answered for . The accepted solution there also involved reconfiguring cloud-init, though in a different manner. Also, it wasn't clear that that question/solution applies to other distros. Thus, I feel my question should probably remain for others running CentOS and searching for it that way (yes, I know Fedora and CentOS are siblings, but not everyone googles for all synonyms when searching for solutions).


Cannot add custom launcher to Ubuntu Dock ('Add to Favorites' option does not show up)

I have a custom .desktop file: [Desktop Entry] Type=Application Terminal=false Icon[en_US]=/home/alex/bin/idea-IC-173.4127.27/bin/idea.png Name[en_US]=IntelliJ Exec=/home/alex/bin/idea-IC-173.4127.27/bin/idea.sh Name=IntelliJ Icon=/home/alex/bin/idea-IC-173.4127.27/bin/idea.png  Output of ls -lha .local/share/applications/intellij.desktop: -rwx--x--x 1 alex alex 248 Dez 30 10:54 .local/share/applications/intellij.desktop  Answers posted to a previous question () don't work for me. I can find this launcher in Activities and I can double click on that file and IntelliJ will start. Nevertheless, I cannot add this launcher as a favorite to the dock. The option does not show up.


Showing that the product $x*y := \frac{x+y}{xy+1}$ is a group operation on $(-1, 1)$

I need to show that the following is an abelian group:     $$x*y = \frac{x+y}{xy+1}$$ on the set $\{x \in \Bbb R \,|\, -1 < x < 1\}$.   I have been working on this problem, trying to show closure. I know that we need to show that $|x+y|<|xy+1|$ for all $x, y \in (-1,1)$. Can I assume that the max value that the expression yields is $1$ if we take $x=1$ and $y=1$? And the lowest value that is possible is when $x=-1$ and $y=1$? Or am I going about this the wrong way?


Why are the "common" resistors and capacitors rated the way they are?

Very newbie question here...one to which I've been unable to find an answer in any of my books or online resources.   Whenever I see a capacitor/resistor assortment that features the most "common" ones (which, I understand can be quite subjective), they tend to come rated in powers of 1, 2.2 and 4.7. What's magical about those numbers?   Is that some mathematical relationship in Ohm's law of which I'm not aware? Is it some logarithmic progression for some OTHER electrical engineering formula that I've not yet encountered? Why is there such a huge gap between 4.7 and 10.0, why isn't there a 7.1 or some such? As someone who a scary uncanny knack for solving "find the pattern in this series of numbers" puzzles, it's killing me that I can't figure this one out. :)


How do I update a program installed from a manually-downloaded deb package?

I would like to update VirtualBox on my 32 bit Ubuntu 15.04 machine from 4.3.26 to 4.3.28, using a Debian package I manually downloaded from . But simply double-clicking the package opens up the Software Centre which gives an error that installing it would break an existing package (the exact message was:   Breaks existing package 'virtualbox' conflict: virtualbox-4.3 ()   and it does not appear to have an option to ignore this and proceed with the installation anyway. Is there a command-line work-around this problem, perhaps?


Is it bad to use 'str.length()' in a for loop or any kind of loop? Does this make O(n^2) complexity? If it is bad, we can assign it to a variable and use the variable instead, right?


What is the best practice for configuring a Domain Controller's adapter DNS settings?  We have an MPLS network with 6 DC's located in different locations.  HQ - DC1 & DC2 WH - DC3 Branch - DC4 Cloud - DC5 Colo - DC6  My thoughts were to use the DC's IP address as the primary and one of the other DC's as secondary.   Thoughts?  Thanks!


I'm seeing this all over my Katz and Lindell book and I don't see where they introduced it.


Can one app read data from clipboard copied in another app

Let's say I'm working in application A and copy some sensitive data to clipboard. Can application B which is opened at the moment catch the information I've copied?  Does OS X protect from such vulnerabilities?   Update: To be more specific what if I copy a password from a password manager, is the pass accessible for all the apps while it is in clipboard? If so how password managers protect a user in this case?


How to prove that geometric distributions converge to an exponential distribution?   To solve this, I am trying to define an indexing $n$/$m$ and to send $m$ to infinity, but I get zero, not some relevant distribution. What is the technique or approach one must use here?


Piping the output of ls or tree to less loses colors?

tree and ls can distinct file types by coloring filenames differently.   tree and ls often output a long list of files (including directories), so I pipe the stdout output to less.  But less doesn't preserve the colors. How can we make it show colors, or some alternative ways?  Just saw the linked list, but piping to less -R or less -r doesn't work. My OS is Ubuntu 12.04. less is Version 444: 09 Jun 2011.


Flash Player does not install on Ubuntu Web Browser

Flash player works fine with Chrome, but cannot install on Ubuntu Web Browser.  I am on Ubuntu 17.04 and up to date.


The concurrency of the heights of a tetrahedron

The sentence says that the opposite edges of the tetrahedron ABCD are perpendicular and the fact that  $AB^2+CD^2=AC^2+BD^2=BC^2+AD^2$ and I need to prove that the heights of the tetrahedron are concurrent, but I am stuck. I need a vectorial proof.


Where can I sell my Magic: The Gathering cards?

I played for quite a few years and have a ton of cards that I want to get rid of. I have a mix of all editions before 2007. 7th, 8th, etc...  So the question is where can I sell them effectively. And if it is better to just get all rares out, and then sell the rest as a lot at a common hobby store.  Thanks for the feedback!


Using Javafx to Draw Basic Shapes (Rectangle, Circle, Sphere)

I have two classes. Rectangle.java and TestRectangle.java. I have to use those two classes to draw a simple 2D rectangle with javafx.fxml.FXML, GraphicsContent2D. Here's what I have so far. Rectangle.java  import javafx.fxml.FXML; import javafx.scene.canvas.Canvas; import javafx.scene.canvas.GraphicsContext;   public class Rectangle {     @FXML private Canvas canvas;       public void draw() {         // get the GraphicsContext, which is used to draw on the Canvas         GraphicsContext gc = canvas.getGraphicsContext2D();          // clear canvas for next drawing          gc.clearRect(0, 0, canvas.getWidth(), canvas.getHeight());          // draw rectangle          gc.strokeRect(100, 100, 175, 300);     }  }  and the second, TestRectangle.java: TestRectangle.java  public class TestRectangle {     public static void main(String[] args) {         Rectangle rectangle1 = new Rectangle();         rectangle1.draw();      } }  When I run the program, I get the error Exception in thread "main" java.lang.NullPointerException     at Rectangle.draw(Rectangle.java:13)     at TestRectangle.main(TestRectangle.java:4)  I'm brand new to Java, and I'm sure this is a very simple issue. Any help would be appreciated! I also want to do the same for a Sphere and Circle. I'm guessing that I'm missing a declaration somewhere, but can't find what it may be.


How does the game determine what box a caught Pokemon will be sent to?

Title says it all. It seems to be random and is really annoying.


Is $\frak c = \aleph_1$?  My textbook requires me to find out the cardinality of $I(\Bbb N)$, which is a set of all infinite subset of $\Bbb N$  What I found is cardinality of $I(\Bbb N)$ equals to $2^{\aleph_0} = \frak c$ then is it also okay to denote that $\frak c =\aleph_1$?


I am starting to use Cygwin(64) on my Windows 8 laptop, however, the top command is not recognized. I have read online that I need to get the procps package, but it is not available on the 'Cygwin Setup' package selections. How should I go about installing the procps package so that I can use top?  ps. for whatever reason ps and kill both work so I would think top would be included in whatever package allowed those guys to work, but there is no top command.


Upgrading from 32 to 64 Bit Windows 7, without losing program installations/games

I recently built a new computer and put the wrong installation of Windows on (32 bit), meaning I cannot use all of my RAM. I would like to upgrade to the 64 bit version, though I already have downloaded many programs and games which would total to around 30 GB give or take. I don't have the kind of data usage with my ISP to re-download this much data again, until next month (total GB will be higher as time goes on).   I know there is , but it is not so much my data itself I'm worried about, it is more having to re-download and install a bunch of games and applications. Is it possible to perform an upgrade from 32 bit to 64 bit without this loss?


Help with calculating infinite sum $\sum_{n=0}^{\infty}\frac1{1+n^2}$

I'm working on a problem, and I'm stuck in the calculations of finding  $\sum\limits_{n=0}^{\infty}\frac{1}{1+n^2}$  Suggestions on how to approach this calculation? Thanks!   (Also, I used Fourier to get to this result from where we were... so using the Fourier somehow feels counter intuitive, but I might be wrong)  Thanks in advance.


Formula for probability-probability plot

I am programmer developing a Software that features the display of a probability plot. As far as I know there are 2 different ways to display a probability plot (please correct me if I say something wrong):   A Percent / Percent Chart A Quantile / Quantile Chart   My customers want a Percent / Percent Chart. That brings some problems.  There is no charting control I know that features a probability plot chart.    That's why I have to calculate the positions of the data points by hand. Are there any formulas or calculations to place the data points and Y-axis values in a normal coordinate system?


How can you "rigorously" prove the following mathematical fact? $$ \sum_{k=0}^m \sum_{j=0}^k a_{kj} = \sum_{j=0}^m \sum_{k=j}^m a_{kj} $$  Visually, it is clear they are equivalent ()


How deal with Gothic letters, like $\mathfrak{ A,B,C,D,a,b,c,d}\dots$, when writing by hand?

In mathematics, I sometimes encounter Gothic letters, I mean the letters $\mathfrak A, \mathfrak B, \mathfrak C, \mathfrak D, \dots, \mathfrak a, \mathfrak b, \mathfrak c, \mathfrak d, \dots$.  To get them in $\LaTeX$ one would use $\mathfrak{A}$ etc.  For example, in the book Model theory by Chang and Keisler, structures are denoted $\mathfrak A = (A, \dots)$, $\mathfrak B = (B, \dots)$ and so on.   I would like to know how to write this by hand.


How to show zero before decimal point in bc?

echo "scale=3;1/8" | bc   shows .125 on the screen. How to show 0.125 if the output result is less than one?


Persist IP address alias across reboots in CentOS/RHEL 6 using "ip" command

I've always used the ifcfg-eth0:1 alias files to create additional addresses. However, in , it states that:     As the ip command of the iproute package now supports assigning multiple address to the same interface it is no longer necessary to use this method of binding multiple addresses to the same interface.    Furthermore, numerous answers and comments on this site mention that ifconfig is deprecated and that "ip" should be used instead.  I'm fine using it for live changes, but how do I persist the changes across reboots without using the alias files?


Difference between files written in binary and text mode

What translation occurs when writing to a file that was opened in text mode that does not occur in binary mode? Specifically in MS Visual C.  unsigned char buffer[256]; for (int i = 0; i < 256; i++) buffer[i]=i; int size  = 1; int count = 256;   Binary mode:  FILE *fp_binary = fopen(filename, "wb"); fwrite(buffer, size, count, fp_binary);   Versus text mode:  FILE *fp_text = fopen(filename, "wt"); fwrite(buffer, size, count, fp_text);


How to use command line arguments in a shell script

I have a shell script and when invoking it ./test it asks for an input.I 've seen a quicker way just by writing at once ./test myInput ,how is that achievable?


DNS - How to make existing domain to no longer resolve & maintain functional MX record

I would like an existing domain to no longer resolve (terrible historical SEO? work, content will move to another domain) And at the same time only maintain that domains historical email address for a period of time (email is at Rackspace mx1.emailsrvr.com) And also have a minimum set of DNS records I have DNS zone access for the domain Unsure of what to purge or recreate and add back


Linear maps $f: M_n \longrightarrow \mathbb{R}$ such that $f(AB) = f(BA)$

Let $M_n$ be the vector space of $n \times n$ matrices over $\mathbb{R}$. Find (with proof) all linear maps $f: M_n \longrightarrow \mathbb{R}$ such that $f(AB) = f(BA)$ for all matrices $A$ and $B$.   I know that the trace map is one such $f$. The determinant map satisfies $det(AB) = det(BA)$ -- but isn't a linear map, so it doesn't suffice.   Is there a constructive way to find all of the desired linear maps $f$, and show that there are no others ?   Any help would be appreciated. Thanks (=


How can I filter those "Permission denied" from find output?

I started using sed recently. One handy way I use it is to ignore unimportant lines of a log file:  tail -f example.com-access.log | sed '/127.0.0.1/d;/ELB-/d;/408 0 "-" "-"/d;'   But when I try to use it similarly with find, the results aren't as expected. I am trying to ignore any line that contains "Permission denied" like this:  find . -name "openssl" | sed '/Permission denied/d;'   However, I still get a whole bunch of "Permission denied" messages in stdout.  EDIT  As mentioned in the correct answer below, the "Permission denied" messages are appearing in stderr and NOT stdout.


I'm positive that vs I strongly believe that

In general, which one is conveys a stronger conviction/opinion? I did some quick google search but didn't find any interesting results.      I'm positive that   or     I strongly believe that


Read codes from a file (txt, properties etc.)

i have a 3D drawing program which gives me a list of coordinates in a file (.txt or .properties)  the file contains something like that: (almost 5000 lines in it.)  drawCircles(2.03, 5.09, 2); drawCircles(5.02, 6.19, 2); drawCircles(6.12, 2.91, 2); drawCircles(3.12, 1.12, 2); drawCircles(4.37, 8.92, 2); ...   drawCircles is a method for my program which draws ellipses. Everytime i open file and copy all lines into my program and run it.  is there any way for my program to directly read file into program and run it.  Here is my main program to draw circles:  public class DrawClass extends JPanel{ ArrayList<Ellipse2D> arrayCircles = new ArrayList<>(); DrawClass(){     setBounds(0,0,1000,1000);     coordinatesFromFile(); } void coordinatesFromFile(){     //Here is where i paste coordinate from file     //all i want is read file from here and run codes }  void drawCircles(double e1,double e2,double r){     arrayCircles.add(new Ellipse2D.Double(e1, e2, r, r)); }  @Override protected void paintComponent(Graphics g) {     super.paintComponent(g);     Graphics2D g2 = (Graphics2D) g;     g2.setColor(Color.red);     for(int i=0;i<arrayCircles.size();i++){         g2.draw(arrayCircles.get(i));     }      }     }


"enter at least *undefined* characters" when about to comment in the mobile site

When you want to leave a comment in the full site, initially there is the text:  enter at least 15 characters   However, in the mobile version of the site, it shows:  enter at least undefined characters  See an image:


Best way to present incredibly detailed table?

I'm trying to present a table on my site. The table is incredibly data heavy and can differ product to product.   The table needs to work in a responsive manner but still remain legible.  Can anybody recommend a best practice or examples of how they may have presented such data in the past? I've seen ZURB's responsive tables but I don't feel it's the best option...


I need to show that $ \forall x,y \in \mathbb R, |\log(1 + x^2) - \log(1 + y^2)| \le |x-y|$  I tried using concavity of log function: $\log(1 + x^2) - \log(1 + y^2)=\log(\frac{1 + x^2}{1 + y^2})=\log(\frac{x^2y^2}{(1 + y^2)y^2}+\frac{1}{1 + y^2}) \ge \frac{2(\log(x)-\log(y))}{1+y^2}$  Also the middle value theorem: $0<\frac{\log(1 + x^2) - \log(1 + y^2)}{x^2-y^2} <1$  But both attempts has not led too far.


Let $G = (\mathbb{C} - \{0\}, \cdot)$, a subgroup $U = \{x+yi \mid x^2 + y^2 = 1\}$. Use the Fundamental Theorem to show that $G/(\mathbb{R}_{> 0},\cdot)$ is isomorphic to $U$ where $\mathbb{R}_{> 0}$ denotes the positive reals.  I am struggling to find the correct mapping from $G$ to $U$ that results in the the kernel being the nonnegative reals under multiplication. I'm hoping to get help with this mapping then I can show it is a homomorphism and onto and can use the Fundamental Theorem.


I have a list of items and I would like to put an asterisk on some of these referring to a single foot note.  Something like this:  item1 item2 item3* item4* item5*  Can you please suggest the right way?  *items with specific property


only static keyword in method or block java

Trying to understand what it is in java.  method? Thank you   static {     String xxx;     try {         xxx = new File(".").getCanonicalPath();     } catch (final IOException e) {         e.printStackTrace();        xxx = ".";     }


Is string.IsNullOrEmpty same as String.IsNullOrEmpty?

Look at the following code. Are they the same? Is there any difference? If yes what?      string f = textBox5.Text;     if (string.IsNullOrEmpty(f))     {         MessageBox.Show("string");     }     if (String.IsNullOrEmpty(f))     {         MessageBox.Show("String");     }   Edit: Is a null or empty string test exactly the same as null or empty String test?


Is it possible to resize an image in an answer? For example,  has  that should have the image in the answer, but it's too big.  Is there a way to handle resizing?


Making values of functionals simultaneously positive

We work with real Banach spaces. Let $X$ be an infinite-dimensional Banach space and let $(f_n)$ be a sequence of norm-one functionals on $X$ that are linearly independent. Can we find an element $x\in X$ such that $f_n(x)>0$ for all $n$?  I guess not. What if $X$ is reflexive?


What do I if i got a bad nether fortress and cant find nether wart

I was playing minecraft and got lucky that my portal was near the fortress but I got the one lava chamber with no indoor loot areas and i looked north and south for the other nether fortress but I could find any. I need help finding nether warts because I'm trying to start making potions for zombie villagers I looked for the piglin chamber and still havent found any nether warts. I'm getting so desperate to find this stuff that I copied my world went on creative and still have fould a single nether wart. Any thing I can do to get nether other than those two?


Adapt Ubuntu to a high-DPI resolution screen

How can I adapt Ubuntu to a high resolution display?  I have a display with 3200x1600px on only 11'' and everything looks really tiny.


Escape slash in variable for awk pattern

I want to get all lines within specified date. The following pattern prints 15/Jan however when used for awk it gives Fatal Unmatched error. pattern=$(date -d "2 day ago" +'%d/%b') awk '$4 ~ $pattern' file.txt  I have tried \ to escape the / sign, so far not successful.


I have no idea if it's because of whether informal English or not, but I found this reporter talking about a boat passing by an iceberg and he was like:      This iceberg here, there's outcroppings under the water. And uh, see ice, iceberg is so very hard, so it's like a can opener.   I was wondering when to use singulars with plurals like what was in the quote as you see, outcroppings is used with a singular to-be verb.  Is there any special grammar behind this or just causal talks because I've heard in movies the same too?!


Sorting a List of different object Lists by datetime

I have a List<ListWrapper> comprised of List<Knowledge__kav> and List<Community_Event__c>. I would like to sort List<ListWrapper> by date but the two inner lists have different date fields. How can I sort?  Code Snippets`public class WhatsNewController {  public class ListWrapper{     @auraenabled     Knowledge__kav article {get; set;}     @auraenabled     Community_Event__c event {get; set;} }  public static List<ListWrapper> getWhatsNew(){       //Get all events     String eventQuery = 'Select Id, Title FROM Knowledge__kav WHERE Title != null ';     eventQuery = eventQuery + 'ORDER BY CreatedDate LIMIT 20';     List<Community_Event__c> events = database.query(eventQuery);      //Get all articles with filters (kav) applied     String articleQuery = 'Select Id, Name FROM Community_Event__c ';      articleQuery = articleQuery + 'ORDER BY LastPublishedDate LIMIT 20';     List<Knowledge__kav> articles = database.query(articleQuery);      List<ListWrapper> listEw = new List<ListWrapper>();     for(Community_Event__c cE : events){         ListWrapper eW = new ListWrapper();         eW.event = cE;         listEw.add(eW);         listEw.();                    for(Integer j=0;j<listEw.size();j++)                     System.debug('list values='+ listEw[j]);     }      List<ListWrapper> listAw = new List<ListWrapper>();     for(Knowledge__kav kA : articles){         ListWrapper aW = new ListWrapper();         aW.article = kA;         listAw.add(aW);                    for(Integer j=0;j<listAw.size();j++)                     System.debug('list values='+ listAw[j]);     }      //Sort the lists ----> listEw listAw sort by date and put into following list      List<ListWrapper> listOfWrappers = new List<ListWrapper>();         listOfWrappers.addAll(listAw);         listOfWrappers.addAll(listEw);         listOfWrappers.sort();         //listOfWrappers.Sort((x, y) => DateTime.Compare(x.Created, y.Created));       return listOfWrappers;  }`


How can I find $\int \frac{1}{\sqrt{x^2 + x + 1}} dx$

My question is, how can I evaluate the following integral? Am I supposed to use Euler substitution here or is there a simpler way?  $$\int \frac{1}{\sqrt{x^2 + x + 1}} dx$$  Thanks.


Operational definitions in Newtonian Physics

Operational definitions are constructed from the observations we make in nature. Experiments show us that two objects $m_1$ and $m_2$ in a local inertial frame, isolated from the rest of the universe, interact in a way such that the ratio of their accelerations $a_1$ and $a_2$ is a constant. Also from observations, an object's acceleration depends on a property (which is observed to be an inherent property) termed mass. The property Mass is then defined as, $$m_2 \equiv m_1 \frac{a_1}{a_2}$$     We could define some other property, call it property $Z$, such that, $Z_2 \equiv Z_1 (\frac{a_1}{a_2})^2$. This property is not useful when compared with mass.    How is it evident that the definition of Mass and not property $Z$ (or any other property) is useful? What is the need of defining mass when it is known that mass is the amount of matter in a substance?       The operational definition of Force sidesteps the question, "What is a Force?"     How does the definition of Force avoid the question?  Are there any operational definitions of physical quantities that tell us what physical quantities are or do these definitions only exist because they help us do physics?


Don't show me suggestions if someone is currently editing it

Ever so often, there is a suggested edit that I choose to edit. However, when I click submit, nearly always I will get the notice saying the post was edited by someone else and that my edit must be a radical change to override their's.  This is often times annoying as I just put in effort to fix a post only to be prevented from doing it. I understand the reasoning for my edit needing to be more of a change, but I think we should prevent people from editing a suggested edit or even just not show it while someone else is editing.  As for how, maybe when someone clicks the "Edit" button, hide the suggested edit from the queue for (say) 5 minutes. If they click "Cancel" in the meantime, just "unhide" it for others to see. Maybe we could use AJAX to ping the server every 5 minutes to say we're still editing. If it doesn't receive the ping, then it could assume they closed out of it, and then it could be "unhid".


Confusion about resting membrane potential and the Na/K pump

To this day, very few people and sources have been able to clear up my confusion about resting membrane potential and how it is maintained. It seems like this is one of those topics that few people are able to explain very well...  Here is what I do understand:  Chemical Gradients:   at rest, the inside of a neuron is negative and comprised mostly of Potassium (+) and negatively charged proteins (-) at rest, the outside of a neuron is positive and comprised mostly of Sodium (+) and Chloride (-)   Electrical Gradients:   at rest, the sodium ions are attracted to the negative charge on the inside of the cell and tend to move inwards at rest, the Potassium ions on the inside of the cell are attracted to the negatively charged chloride ions on the outside of the cell and thus move outwards   So overall, there is a net inflow of Sodium and a net outflow of Potassium. Got it, pretty simple.  However, the sodium/potassium pump is where I get lost. Why does it reverse all that just happened, and why doesn't it cancel out the resting potential if it moves K+ back inside and Na+ back outside? Isn't the voltage fluctuating because of this back and forth movement of K+ out, K+ back in, Na+ in, Na+ back out, etc.? I would imagine this would completely negate the positive/negative charge distribution, but it doesn't. Why?  Clarification: there is a net outflow of Potassium and a net inflow of Sodium. Why does the Sodium/Potassium pump intentionally reverse this by pumping out Sodium and pumping in Potassium? How does that contribute to resting potential?


One material fades into another on model?

Is it possible to make the top of my model glossy, and have the glossiness fade into matte toward the bottom of the model? (Or any combination of surface variations, this is just an example) Thank you!


Is there current flowing through this blank wire?

– Schematic created using   Does any current flow from point A to point B?   My guess is no. Because both of those points are connected to a ground symbol by blank wires, they both have potential of 0V.


How to block all but one or two websites without browser extensions?

I want to block all, but one or two websites. This question is therefore relatively close to, but different from the following      (difference: Parental control is not really a good flashship.)  (difference:  This is on how to block a particular website. I want to block everything except the ones I need.)   I know that this can be done with leechblock (for FF) or something similar for other browsers. I think that is not a very clean solution, because it is browser-based. I know this was both possible and easy with Firestarter but that package is deprecated.  I am looking for something which is both easy (not manually editing hosts, but a script for instance) and systemwide. It can use the CLI.  I would love a relatively detailed answer rather than just links to other websites  - screenshots would be most welcome.


Thinkpad T440 trackpad multitouch not working

I am using a Thinkpad T440s with the new trackpad that has physical buttons.  I ran into the issue that the physical buttons (which are recognized as a seperate PS/2 device) do not function. After a lot of research, i found that executing sudo modprobe psmouse proto=imps makes the buttons work properly.  However, it also causes the touchpad not to work with multitouch scrolling. Has anybody else encountered this issue?  Here is the output from xinput:  ⎡ Virtual core pointer                      id=2    [master pointer  (3)] ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)] ⎜   ↳ RAPOO RAPOO 2.4G Wireless Device          id=10   [slave  pointer  (2)] ⎜   ↳ PS/2 Synaptics TouchPad                   id=13   [slave  pointer  (2)] ⎣ Virtual core keyboard                     id=3    [master keyboard (2)]     ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]     ↳ Power Button                              id=6    [slave  keyboard (3)]     ↳ Video Bus                                 id=7    [slave  keyboard (3)]     ↳ Power Button                              id=8    [slave  keyboard (3)]     ↳ RAPOO RAPOO 2.4G Wireless Device          id=9    [slave  keyboard (3)]     ↳ Integrated Camera                         id=11   [slave  keyboard (3)]     ↳ AT Translated Set 2 keyboard              id=12   [slave  keyboard (3)]     ↳ ThinkPad Extra Buttons                    id=14   [slave  keyboard (3)]   uname -r returns 3.16.0-36-generic.  I found that after adding Option "VertTwoFingerScroll" "on" to the catchall section of my /etc/X11/xorg.conf.d/50-synaptics.conf the left and right mouse buttons above the touchpad now scroll up and down. This does not change if i use modprobe to change the protocol to imps.  Here's my 50-synaptics.conf:  Section "InputClass"         Identifier "touchpad catchall"         Driver "synaptics"         MatchIsTouchpad "on"             Option "VertTwoFingerScroll" "on" # This option is recommend on all Linux systems using evdev, but cannot be # enabled by default. See the following link for details: # http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html       MatchDevicePath "/dev/input/event*" EndSection  Section "InputClass"         Identifier "touchpad ignore duplicates"         MatchIsTouchpad "on"         MatchOS "Linux"         MatchDevicePath "/dev/input/mouse*"         Option "Ignore" "on" EndSection  # This option enables the bottom right corner to be a right button on # non-synaptics clickpads. # This option is only interpreted by clickpads. Section "InputClass"         Identifier "Default clickpad buttons"         MatchDriver "synaptics"         Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0" #       To disable the bottom edge area so the buttons only work as buttons, #       not for movement, set the AreaBottomEdge #       Option "AreaBottomEdge" "82%" EndSection  # This option disables software buttons on Apple touchpads. # This option is only interpreted by clickpads. Section "InputClass"         Identifier "Disable clickpad buttons on Apple touchpads"         MatchProduct "Apple|bcm5974"         MatchDriver "synaptics"         Option "SoftButtonAreas" "0 0 0 0 0 0 0 0" EndSection   UPDATE:  It seems that when I reboot my system, the touchpad (with mulititouch) works fine, and synclient returns the parameters. The buttons do not work. As soon as I use modprobe -r psmouse and modprobe psmouse proto=imps the buttons work, but the touchpad no longer works with multitouch and synclient returns unable to find a synaptics device. Is there a way to just set the buttons to use the imps protocol?


I know the following theorem from the lecture:     Let $X$ be a seperable Banachspace. Then $\overline{B(0)}$ is weakly* sequentially compact in $X'$.   Since it is specified that $X$ has to be separable, I want to look at an example where $\overline{B_1(0)}$ is not necessarily weakly* sequentially compact in $X'$, if we choose a Banachspace $X$ that is not separable. I found out from a book that $\overline{B_1(0)}$ is not weakly* sequentially compact in $(l^\infty)'$. $l^\infty$ is not separable ( I showed that already), but how can we now show that $\overline{B_1(0)}$ is not weakly* sequentially compact in $(l^\infty)$'?


Learning Java, troubleshooting an assignment

SO I have an assignment for one of my classes to create an Insurance Calculator that takes in some input for ones age, level of education, marriage status, and employment status and uses this to come up with an insurance payment. The default payment is set to 100 and if an individual is younger than 22 or older than 70, the insurance is increased by 25%. If the individual has a Bachelors, the cost is reduced by 10% (20% for masters), and if the individual is married it is further decreased by 20%. If their employment status is student, cost increases 10%, but if they are unemployed it decreases 5%.  I have a huge block of code and Ive been running through it for the last few days and I seem to be stuck on my conditionals.  Currently running in two classes, one for the Individual.Class and one for the user inputs.  Individual.java:   public class Individual {     private int age;     private String ed_stat;     private String mar_stat;     private String emp_stat;     private double default_Payment = 100;      public Individual(int suns, String edu, String mar, String employ, double payments) {         this.age = suns;         this.ed_stat = edu;         this.mar_stat = mar;         this.emp_stat = employ;         this.defaultPayment = payments;     }      public int getAge() {         return this.age;     }      public String getEdu() {         return this.ed_stat;     }      public String getMar() {         return this.mar_stat;     }      public String getEmploy() {         return this.emp_stat;     }      public double getPay(){         if (22 < age > 70) {             default_Payment = default_Payment + (default_Payment * .25);         }         if (ed_stat == "Bachelor's") {             default_Payment = default_Payment - (default_Payment * .10);         }         if (ed_stat == "Master's") {             default_Payment = default_Payment - (default_Payment * .20);         }         if (mar_stat == "yes") {             default_Payment = default_Payment - (default_Payment * .20);         }         if (emp_stat == "Student") {             default_Payment = default_Payment + (default_Payment * .10);         }         if (emp_stat == "Unemployed") {             default_Payment = default_Payment - (default_Payment * .05);         }         return this.default_Payment;     }      public void setAge(int suns) {         this.age = suns;     }      public void setEdu(String edu) {         this.ed_stat = edu;     }      public void setMar(String mar) {         this.mar_stat = mar;     }      public void setEmploy(String employ) {         this.emp_stat = employ;     }      public void setPayment(double payments) {         this.default_Payment = payments;      }     public String toString() {         return String("Age: " + age() + ", Education : " + ed_stat + ", Marital Status: " + mar_stat + ", Employment Status: " + emp_stat + ", Payment: " + default_Payment);        } }   And the InsuranceCalculator.java  import java.util.Scanner; public class InsuranceCalculator {     public static void main(String[] args) {     double insurance = 100;     Scanner scan = new Scanner(System.in);      System.out.println("Please enter your age: ");     int years = scan.nextInt();      System.out.println("Please enter your education level as High School, Bachelor's, or Master's");     String edu = scan.next();      System.out.println("Are you married? Yes or No");     String mar = scan.next();      System.out.println("Please indicate your employment status as Unemployed, Student, or Employed");     String employ = scan.next();      Individual me = new Individual(years, edu, mar, employ, insurance);     System.out.println(me.toString());  }   Note that I have errors in the Individual.java and I can't tell how the Calculator class will run once I fix the Individual.java.  Any help is greatly appreciated, I will be working on my own as well and will update as I solve


I need to get the relative file path (relative to the program executable path) from a File object.   What's the best way to do this? File offers only methods for the absolute path. Maybe getting execution path manually and then cut this path off from the absolute path to get a relative path?   I am on Java 7, just in case java.nio has some helping method for that.  Tahnks for any hint!


My beans have an al dente texture after cooking. Is this indicitive of undercooking?

I wouldn't call it hard by mouthfeel, but after using the boil and soak method on some dried pinto beans and cooking in a chili pot for 1.5 hours,


Is there a way to play YouTube videos in the background?

I remember that once upon a time I was able to start a song on the YouTube app (or Jasmine), then go and do other things on the phone.  That doesn't seem possible anymore with iOS 10.  Am I missing something simple?


16GB USB flash drive turned to 1GB after writing an ISO image onto it

I have a 16GB flash drive for almost seven years. It was all good before not long ago, when I tried to write a Ubuntu image onto it. I made it many times before and had no issues about. But this time, something happened, and my 16GB drive turned into 1GB. Any operating system on any computer I tried to use my USB drive with has shown me that it's strictrly 1GB and nothing to be changed.  I had a similar issue before, when this flash drive was somehow hurt by static so it wouldn't be recognized by any PC I plugged it into. That time, I used a utility to rewrite low-level chip so, as the latter contained information about what flash drive it appears (not true but similar: the drive is originally Kingston, but from that moment became Netac), the former would work again. I don't remember what that utility was but I'm pretty sure it provided options to turn any flash drive of A real storage size to A/k virtual storage size (perceived by a computer), where k≥1.  I remember that using this utility was risky since one only has exactly one chance to bring her flash drive back to life. I suppose it's worth risking in my case. After all, it isn't very expensive today to buy a 16GB usd flash drive. But I would rather scold myself to insanity for not trying.  Right this moment, I'm searching for that utility but cannot find it nor create a proper search query to help me do that. Please help me find the right utility. It may be for PC or Mac or Linux, doesn't matter.  Any disk utility app on Ubuntu or Mac (not to say of Windows) doesn't help me reach my goal. Those only can format or partition it but within the storage size perceived by an operating system, 1GB.


I am a doctoral student in metallurgy (joined 2014- about to finish it by July 2017) having my background of B.Tech Electrical and MS in nanoscience.  I wish to pursue my another doctoral degree in nanomaterials, Is it advisable to go for it.  I have some offers from abroad in prestigious institutes too. Is it good to go for it?.


On my Amazing 2GB EeePC Surf, I have no more space left!  This is quite normal, and it happens every now and then. Just delete a few large, unneeded files and everything should be good, right?  So I go and find a 2MB file in /tmp, and rm -rf it. Check free space again, and -- still nothing?!  I had to remove about 30MB of files before it registered some free space.  Now, my question is, what's up with this strange behaviour?


Why can't I get more than 60 FPS in CS:GO?

How can I overcome low fps on NVIDIA Geforce 940 MX? I get only 60 fps. This is frustating as this graphics card should be good enough for this light weight game. Graphics  Driver version : 391.01 Direct 3D API Version: 12 Direct 3D Feature Level: 11_0 CUDA Cores: 384 Graphics Clock: 1122 Mhz Memory data rate: 1800 Mhz Memory Interface: 64-bit Memory Bandwith: 14.40 GB/s Total available Graphics memory: 8134 MB Dedicated Video memory: 4096 MB DDR3 System Video Memory: 0 MB Shared System Memory: 4038 MB Video BIOS Version: 82.08.59.00.75 IRQ: Not used Bus: PCI Express x4 Gen3  PC  OS: Windows 10 Home, 64-bit DirectX Run time version: 12.0 Processor: Intel i7 7500U @2.70 Ghz Memory: 8192 MB RAM  This question isn't certainly a duplicate of "Can my PC run this game?" It obviously can run the game. My question is related to how can I improve the fps? No one else has asked a question with my exact configuration. I have already tried many tweaks and setting video quality to low but still failed to increase FPS. So I have included my PC's specifications to hope for a solution specific to my problem. So why has it been marked duplicate? Steps I had tried: Setting all video settings to low and everything that radu has recommended in his answer below.


Using the Argument Principle, evaluate $\int_{|z-i|=7}\frac{z\sinh(z)+3\cosh(z)z}{z\cosh(z)}dz$. The argument principle is the idea that $\int_\Gamma \frac{f'(z)}{f(z)}dz=2\pi i(N-P)$ where N is the number of zeros where N is the number of zeros of $f$ on $\Gamma$ and P is the number of poles of $f$ on $\Gamma$. This question throws me off because the numerator is close to, but not quite $f'(z)$ where $f(z)=z\cosh(z)$ . What should I do?


hook_mail is not sending rendered HTML email

I'm rendering HTML template for email  demo_test.module  use Drupal\Component\Utility\SafeMarkup;  function demo_test_theme() {   return [     'contact_mail' => [       'variables' => ['params' => NULL],     ]      ];  }  function demo_test_mail($key, &$message, $params) {    $render_email = [     '#theme' => 'contact_email',     '#params' => $params,   ];    $mail = drupal_render($render_email);    $message['body'][] = $mail;      break;  }   contact_mail.html.twig            <meta name="viewport" content="width=device-width">     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">     <title>Test</title>
test
       Tried:  $message['headers']['Content-Type'] = 'text/html; charset=UTF-8; format=flowed; delsp=yes';   But still not working.


Missing “visit this website” bypass to “this connection is not private” warnings in Safari

Attempting to follow the instructions in the previous question  shows that the "Show Details" → "visit this website" link is not there anymore.


Why don't the percentages on the battery chart add up to anywhere near 100%?

I'm trying to figure out what's using my battery life by looking at the battery page in Settings. (I don't know if this screen is Cyanogen specific, or a stock Android feature.) Here's a recent screenshot of that page:    Transcript:     Current battery level: 67%      Use since last full charge:         Android System: 3%   Screen: 2%   Cell Standby: 2%   Ironclad Tactics: 2%   Google App: 1%   Android OS: 1%   Google Play Services: 1%      (It may not be clear from the screenshot, but that's the end of the list: there's nothing off-screen.) I don't know whether those percentages are supposed to add up to 100% (logical) or to 33% (the amount of battery used so far), but either way, they actually add up to 12%. No amount of rounding error can explain that. At best, 2/3 of my battery usage is totally unaccounted for.  This is a common occurrence. I have another screenshot where my battery level is 18%, but the sum of all the used apps is only 44%.  What could be using up so much battery that wouldn't show on this list? Or alternately, could some battery usage pattern could cause this screen to grossly underestimate usage of a particular app? Or could a faulty battery, that drains more quickly than it should for a given load, cause this?


Automatic line breaking of long lines of text?

Here, it is just a example. I have a line:  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaa   Now, I want to let LaTeX automatically wrap the line according to the width of the text block/margins.


Achievements and Total Reputation doesn't match actual Reputation

My Stackoverflow rep for today is 155 but the Achievements drop down in top bar says 140. So, my total rep is messed up. I am 15 rep short. What could cause this error?  NOTE : The answer acceptance points for the question Syntax Explanation for end keyword are missing from Achievements + Total Rep score.


Ubuntu 17.04 installation from USB doesn't work/boot

Setup:  I've used Ubuntu Gnome 16.04 (UEFI installation) for some time now and had decided to upgrade to Gnome 17.04. After the upgrade some things were slightly messed up and I figured I might as well do a new clean installation of Ubuntu 17.04, since it usually doesn't take very long.  I created a USB boot stick using dd bs=4M status=progress if=ubuntu_gnome.iso of=/dev/sdc && sync.  I selected UEFI: (FAT) (3750MB) (my stick) in my boot order and got to the usual GRUB screen with the options to try Ubuntu, install Ubuntu, OEM install and check disc and as always clicked 'Install Ubuntu Gnome'. So far so good.  Problem:  However instead of the installation beginning the screen goes blank for a few seconds and then some gibberish appears and scrolls through the screen (like it would during something like apt get upgrade) for a few seconds then freezes.    Also: everytime I've retried the whole process it added ubuntu(244198MB) to my boot list (after some time I had it in there 15 times, although the only present things should be the P6 and UEFI line - my SSD and the USB stick).    Things I've tried so far:   simply let the computer sit for some time and see whether the problem solves itself on its own retry the whole process:   with the same stick and the old iso file with the same stick after downloading a new iso file with a different USB stick  try both of the USB sticks on my laptop (this works, so I don't think they're the problem) double check whether my current Ubuntu installation uses UEFI (/sys/firmware/efi is present on my pc) and whether UEFI/BIOS settings are set to allow UEFI booting tried different USB ports on my pc (both USB 2 and 3)   All help is very much appreciated.


Can I use Beetel 450TC3 as wireless router?

I am trying to extend wireless internet connectivity to another part of my house.  My current modem + wireless router does not cover my entire house. So, I have installed a cat5 cable with RJ45 port leading to that part of the house. Now I want a wireless internet there.   However, I have a Beetel 450TC3 ADSL+2 Router/ modem, which I want to use as a wireless router. It has 4 LAN ports and one RJ11 port. All the LAN ports act as internet output, RJ11 port is for DSL input.  Can I use this the 450TC3 as a wireless hotspot/ router? i.e. Is it possible to reconfigure one of the LAN ports to act as input through my CAT5 cable, and then broadcast wireless internet?  If yes, can anybody help me with that? (I have seen this post, but it didn't work for me:  )


Search engines for cheapest flight to a specific location from anywhere?

I'm looking for a flight search engine that would show me the cheapest flight to a specific destination from anywhere. I know there's skyscanner and google flights to find the cheapest flight FROM a specific destination to anywhere, but this is the reverse.  The use case for this is when I'm dealing with points. The points most of the time have a set value to any location, say, in Western Europe. Then from which I can buy the rest of the ticket with money.


The search on the top of the page searches questions and answers .     Is there a way to search comments too ?


Solve these functional equations: $\int_0^1\!{f(x)^2\, \mathrm{dx}}= \int_0^1\!{f(x)^3\, \mathrm{dx}}= \int_0^1\!{f(x)^4\, \mathrm{dx}}$

Let $f : [0,1] \to \mathbb{R}$ be a continuous function such that   $$\int_0^1\!{f(x)^2\, \mathrm{dx}}= \int_0^1\!{f(x)^3\, \mathrm{dx}}= \int_0^1\!{f(x)^4\, \mathrm{dx}}$$   Determine all such functions $f$.   So far, I've managed to show that $\int_0^1\!{f(x)^t\, \mathrm{dx}}$ is constant for $t \geq 2$. Help would be appreciated.


Why is p ∧ q ⇒ r true when p is true and q is false?

I'm taking Intro to Logic on Coursera.  One of the exercises has this:     Consider a truth assignment in which p is true, q is false, r is true.   Use this truth assignment to evaluate the following sentences.   The answer key says $p ∧ q ⇒ r$ is true, but I don't understand why.  If I read it correctly, it says "If TRUE and FALSE then TRUE."    I thought TRUE and FALSE should imply FALSE because the two propositions are different.  Can anyone explain?


Proper analyses for 2x2 contingency tables

So I have multiple questions about the different types of analyses that can be used on a 2x2 contingency table and when different analyses should be used.   To open, I'll note that this stems from my efforts to find the appropriate analyses to run for research using categorical data in a 2x2 contingency table. In my case I have two conditions: control and experimental and within the experimental group there are two items of interest (say, Item A and Item B). In all cases I'm investigating whether an outcome occurs or not: How many experimental participants show the outcome on Item A? How many experimental participants show the outcome on Item B? How many control participants show the outcome? So in addition to comparing Item A with the Control group (A vs. C) and Item B with the Control group (B vs. C), I also want to compare Item A with Item B (A vs. B).   My understanding is that for between-subjects comparisons (e.g., A vs. C   &   B vs. C) a  is traditionally used and that for within-subjects comparisons (e.g., A vs. B) that  is a common choice.   Question 1: is this an accurate understanding of the common choices for statistical tests using 2x2 contingency tables?    My follow-up questions, and where most of my confusion lies, are related to what to do when multiple observed cell counts are low (less than 10). I've explored numerous threads here, the Wikipedia pages for different topics (Yates's correction, Fisher's exact, etc.), a few journal articles, and descriptions in R-packages, but I have found conflicting views.   Some sources indicate that you should use , others say it's out-dated because, in addition to being overly conservative, it was only preferred because the other options were computationally intense.   Others say that you should use , but I've seen additional information suggesting that Fisher's exact test is only appropriate if you know both the row and column totals and that other options (Boschloo, Barnard, etc.) are generally more powerful. However, which of those to use is also not clear.  Finally, even others suggest that the Pearson's $\chi^{2}$ test is appropriate as long as the expected cell counts are not low.   I've seen some indication that these arguments occur for McNemar's test as well (e.g., continuity correction & McNemar's exact test).  Question 2: Is the assumption regarding cell counts about expected cell counts or observed cell counts? If the observed cell counts are low, does that matter to the type of test that should be used?  Question 3: What is an exact test and when should exact tests be used?    In addition to answers to these questions, I would also greatly appreciate any suggestions as to books or articles I can read to learn more about this. Part of my struggle with all of this has been just general difficult finding clear information about these topics and how they relate to one another.


might not always behave like  when it comes to indendation

Someone might create a pre block in order to preserve indentation like in HTML but this does not work when the pre block is itself indented for a list. Is this behavior expected? I don't see any advantage.   <pre> a  b   c </pre> * list  <pre> a  b   c  </pre>   will turn into   a  b   c    list   a b c    /edit: Somewhat of a duplicate of  My bad.


Is it possible to put a currency symbol before rounding off the values ? or Alternatives maybe .  echo number_format((float)$overall_total, 2, '.', ''); //748.10   Expected output should be : $ 748.10


Based on :     Networked game development is not trivial; there are large obstacles to overcome in not only latency, but cheat prevention, state management and load balancing. If you're not experienced with writing a networked game, this is going to be a difficult learning exercise.   I know the theory about sockets, servers, clients, protocols, connections and such things.  Now I wonder how one can learn to write a network game:   How to balance load problems? How to manage the game state? How to keep things synchronized? How to protect the communication and client from reverse engineering? How to work around latency problems? Which things should be computed local and which things on the server? ...   Are there any good books, tutorials, sites, interesting articles or other questions regarding this?  I'm looking for broad answers, but specific ones are fine too to learn the difference.


How do I use a String as a reference to a Class using reflection?

I'm building a String parser that parses a file, gets stuff, and does stuff with the stuff. Mainly, I am trying to reference classes from that file. If that file had some text:  "Class1"  How could I interpret the String as a Class within the program to then invoke a method?


Does having a low CGPA reduce my opportunity to get an MS admit from top universities like Stanford, UC berkeley, etc?

So my case is a little different. I never liked my college studies much because the subjects never excited me, which eventually lead to a low CGPA (7.18/10). But I started to have a strong liking for NLP since the time I was first exposed to it. I've been drenched in NLP for a year now, and out of interest I have done several deep learning projects related to NLP, image classification etc...I also have carried out proper experimentations and submitted a paper to top NLP conferences in India and several other places(now I'm waiting for  reply from these). I have 3 good LOR's, one of which is from my mentor-ship program with a reputed NLP researcher from  . My GRE score is 330/340. The programs at the top universities such as Stanford, UC Berkeley etc excite the crap out of me!!! Given the minimum aspects of my application, should I apply to these universities?? And is it plausible to expect an admit from these universities??  I am desperate for answers, so any help would be highly highly apreciated.  EDIT: This is not a duplicate of any of the questions out there. Its a specific problem which I did not find anywhere on this platform. It could be of help to students facing the same issue.


How to fix the UUID in Grub after restore from another machine?

I want to restore a complete tar backup of Ubuntu 12.04 with all my customizations, documents, installed software, etc. to a different machine.   I made the backup with the following commands:  sudo su cd / tar cvpzf ububackup.tgz --exclude=/ububackup.tgz --exclude=/proc --exclude=/lost+found --exclude=/sys --exclude=/mnt --exclude=/tmp --exclude=/media /   On the new computer I did a fresh install of Ubuntu 12.04, moved the backup file to it and then restored with the backup file with the following:  tar xvpfz backup.tgz -C /   As expected (see Mike Whatever's answer to this question: ) this broke grub. When I turn on the computer I get an error:   error: no such device: ...  press any key to continue ...   I believe the reason that Grub is broken is that the UUID it is looking for matches on the old hard drive not on the hard-drive for the computer.   How can I fix my grub to recognize the new hard-drive? I looked online for help "Fix GRUB UUID" but the steps seemed either out of date or complex. The response from Mike I linked to above gives me hope that there is a fairly simple way to repair this.


Reducing degrees of freedom of a system described by an equation

Let's consider a system described by this simple equation:  $x^{2}+y^{2}=5$  this represents a holonomic constraint. Suppose I would like to reduce the degrees of freedom of this system, I should be able to do it since is described by a holonomic constraint. However, both $x^{2}$ and $y^{2}$ are not invertible. So how can I write one of them as a function of the other?


I'm trying to make the setInterval clear when a user types in the off command, how would I go about doing this? Basically, the user types the on command then then turn it off using the off command. This is a snippet of what I currently have.   bot.on('message', (message) => {      if (message.content.startsWith(prefix + 'on')) {         var check = setInterval(test, 5000);       } else if (message.content.startsWith(prefix + 'off')) {         clearInterval(test);      }      function test() {     console.log('hello');      } }


Apologies as i know this question has been asked before but i've tried doing what was said with still no luck. I am getting this error everytime:  java.lang.NullPointerException at test.XSLTransformer.main(XSLTransformer.java:35) ERROR:  'Could not compile stylesheet' FATAL ERROR:  'java.lang.NullPointerException'            :null Exception in thread "main" javax.xml.transform.TransformerConfigurationException: java.lang.NullPointerException     at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:988)     at test.XSLTransformer.main(XSLTransformer.java:35)   // ... import jdk.nashorn.internal.runtime.regexp.JoniRegExp;  import javax.xml.parsers.DocumentBuilder; import javax.xml.transform.*; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamSource; import javax.xml.transform.stream.StreamResult; import java.io.*; import java.net.URISyntaxException; import java.util.Scanner; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.NodeList; import org.w3c.dom.Node; import org.w3c.dom.Element; import java.io.File; import java.io.IOException; import java.net.URISyntaxException; // ...  public class XSLTransformer {      public static void main(String[] args) throws IOException, URISyntaxException, TransformerException {               File xmlFile = new File("D:\\FastFlow.IntegrationDb-Data.xml"); // source file             File  resultFile = new File ("D:\\staffnumbers.xml"); // result file             File  xslFile = new File ("D:\\CanonicalSectionTmpltTOPMNF.xsl"); // template file           TransformerFactory factory = TransformerFactory.newInstance(); // this is the line that throws the exception         Source xslInput = new StreamSource(xslFile);         Templates xsl = factory.newTemplates(xslInput);          Transformer transformer = factory.newTransformer(xslInput);          Source xmlInput = new StreamSource(xmlFile);         Result result = new StreamResult(resultFile);         transformer.transform(xmlInput,result);           System.out.println(result.toString());      } } ```


What is the difference between 'I have gone to the restaurant' and 'I had gone to the restaurant'


Freeze columns A and B and row one in Ecxel

How can I freeze the first row (one) and the first and second column (A and B) in Excel 2013? I've try to select rows one and two and columns A, B and C and select freeze but it doesn't work.


Link between Infinite coin flipping and Uniform distribution on unit interval

I came across this fact that if we flip an unbiased coin infinite times and represent the outcome as $X(\omega)=(X_1(\omega),X_2(\omega),\ldots )$ then the new random variable $U$ defined by   $$ U(w)=\sum_{i=1}^{\infty} \frac{X_i(\omega)}{2^i} $$  would have a uniform distribution on $[0,1]$.   I want to prove this above fact in addition to it's converse that given a uniform random variable, it's binary representation is equivalent to infinite i.i.d coin tosses. Though converse is fairly easy, the if part is turning out to be difficult.  In essence, the experiment of infinite fair coin tosses serves as a building block for generating any other random variable.


proof by mathematical induction with the summation operator?

$$ \sum_{k=1}^n k^3 = \left( \sum_{k=1}^n k \right)^2 $$ I can't  quite understand this expression, and in fact this is my biggest difficulty in finding a solution. Can someone please explain to me ? $$ \sum_{k=1}^n k = \frac{n(n+1)} 2 $$


What is the average maximum value of a set of random numbers?

Let $a_1, a_2, a_3, \ldots, a_{10}$ be ten randomly chosen real numbers in the interval [0,1].  Let $m$ be the maximal value out of these 10 numbers.  What is the expected value of $m$?   (i.e. If i had $n$ sets of 10 numbers and took the maximum $m$ for each set and averaged the values of all the $m$'s, what would this value become as $n \rightarrow \infty$?


avoiding code duplication in const and non-const member functions

Well I'm currently refactoring a class I made quite a long time ago. The class is a container type.  Many functions can use advantage of the class structure, and are thus implemented as member functions. However it now seems to be a lot of function which seem "the same", ie a "find" function:  iterator find(ITEM) const_iterator find(ITEM) const; iterator find_if(ITEM, PRED) const_iterator find_if(ITEM, PRED) const;   4 "functions" to describe nearly the same (and code is almost the same in each version). This becomes very tedious when updating the class, I have to make sure each version is upgraded. Is there a manner to handle these things better? Some other function in the class CAN possibly take 2 predicates, and that meant I suddenly had 8 functions to manage.  I tried calling the "non-constant version from the constant version" but that obviously doesn't work.  So how does one handle these things? Just bite the bullet and write it down?  EDIT: just to inform: my datastructure resembles a "tree". Each "object" contains the data (which the find searches) and a "list" with sub-trees. The find function works recursive over all subtrees of a tree (and sub-sub trees). - Just like one would expect when searching a tree.  As there isn't a clear "end" or "start" iterator to such a tree, using std::find doesn't yield the correct functionality.


I was trying to install Ralink rt3290 bluetooth driver which I downloaded from   When I run the make command I get the following error:-  make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-32-generic' make: * [LINUX] Error 2 I have 64 bit Ubuntu 12.04 LTS installed.


How to texture curved road system / road? (UV's / Mapping)

So, to be brief, I am trying to create a system of roads from a top view of google maps.     I started out making the UV Map of the first segment and getting it in order, and hoping that when I extend the road the UV map would keep intact.   I can create the mesh fine, and as far as that goes, I have no problem. I am able to model it rather close to as seen on google maps, using extrude and rotate / translate.  I had the first section good at one point (of the road) but after that, the textures go weird.  (Since then I have messed about and now nothing works properly, in regards to texture mapping which is when these pictures were taken.)  So, my biggest question, is, how can I add a road texture to this curved road, that will follow the road and the curves?   I would use the bezier curve method for road creation, but unfortunately, when exported to the game I intend to use the road for, the poly-count is tremendously high. 20000+ whereas with this method, 600-ish.   I guess, essentially, what I'm trying to do, is create roads like this:    [![Road/UV Windows][3]][3]  So how would I go about that, as far as texturing?


Remove Ubuntu 14.04 bootloader entry in Windows 8.1 Bootloader EFI Entry?

Recently i installed ubuntu 14.04 on windows 8.1 pre-installed PC as Dual Boot. But due to some reasons i removed ubuntu 14.04 from my pc.Even though i removed ubuntu from my pc ubuntu entry in Windows EFI Bootloader remains. I tried deleting entry using Ubuntu live cd and EasyBCD software tool though it remains in EFI Bootloader entry.


Need help to interpret output of free command

I would appreciate help in interpreting the output of 'free -m' below.    -bash-4.2$ free -m               total        used        free      shared  buff/cache   available Mem:          15793        7112          88        7840        8591         611 Swap:         16891        5289       11602    If I have nearly 11GB free then why am I seeing swap usage.  Shouldn't that be 0?   Also, the 'shared' value is 7840.  Is this memory available for a new application? Is only 'cache' memory available for new applications?  In other words, 'shared' and 'buffer' memory are not available for new applications? How should I interpret the 'available' column with a value of 611?  How is this value arrived at?


how to calculate sum(theta^n/( n(n + 1))) from 0 to inf

I am doing the following summation: $$ \sum{\frac{\theta^{n}}{n(n+1)}}, n=1,2, \ldots, 0<\theta<1 $$ I tried to use the technique $\sum\frac{1}{n(n+1)} = \sum(1/n)-(1/(n+1))$, but didn't know how to continue to deal with the $\theta^n$. Any hint or help?


We know about the fifty Hogwarts fighters that died but what about the Death Eaters?  Except for Regulus Black, Severus Snape, Bellatrix and Voldemort, which Death Eaters died?


Does a glaive count as a sword and a halberd an axe for the purpose of magic items?

If the party earns a Dragon Slayer Sword, it can be a type of weapon used by one of the party members but it says it must be a sword, so would a Glaive count?