Suppose to be in an arbitrary gravitational field and you are moving in it arbitrarily with a clock in your hand. In this general situation I ask: if I read the positions of the hands of the clock, what am I really measuring the proper time or a simple coordinate?

Apologies in advance for the long question.  My understanding is that in GR, massive observers move along timelike curves $x^\mu(\lambda)$, and if an observer moves from point $x^\mu(\lambda_a)$ to $x^\mu(\lambda_b)$, then his clock will measure that an amount of time $t_{ba}$ given by the curve's arc length; $$   t_{ba} = \int_{\lambda_a}^{\lambda_b}d\lambda \sqrt{-g_{\mu\nu}(x(\lambda))\dot x^\mu(\lambda)\dot x^\nu(\lambda)} $$ will have elapsed where $g_{\mu\nu}$ is a metric on spacetime with signature $(-,+,+,+)$.    Why is this so?     Here is how I would attempt to justify this fact in special relativity with $g_{\mu\nu} = \eta_{\mu\nu}$.  Consider an inertial observer $O$ in $\mathbb R^{3,1}$, and suppose that this observer sees a clock, which I'll call observer $O'$ moving around on a curve $x^\mu(\lambda)$.  If $O'$ were also an inertial observer, then given any event with coordinates $x^\mu$ as measured by $O$, observer $O'$ would measure the coordinates of the event to be $x'^\mu = \Lambda^\mu_{\phantom\mu\nu} x^\nu + x_0^\mu$ for some Lorentz transformation $\Lambda$.  If $O'$ is not inertial, then this is no longer true, and there is some more complicated family of transformations, say $T_\lambda$ between events as seen by both observers.  I would argue, however, that if we were to partition the interval $[\lambda_a, \lambda_b]$ into a large number $N$ of intervals $I_1=[\lambda_a, \lambda_i], \dots, I_N=[\lambda_{N-1}, \lambda_b]$ with $\lambda_n = \lambda_a+n\epsilon_N$ and $\epsilon_N=(\lambda_b-\lambda_a)/N$, then on each interval $I_n$, $O'$ is approximately an inertial observer in the sense that $$   T_{\lambda_n} = P_n + \mathcal O(\epsilon_N), \qquad (\star) $$ for some Poincare transformation $P_n$.  Then we would note that since $O'$ is stationary in his own reference frame, he measures his worldline to have the property $\dot x'^\mu(\lambda) = (\dot t(\lambda), \mathbf 0)$ so that $$   I_{ba}=\int_{\lambda_a}^{\lambda_b}d\lambda \,\sqrt{-\eta_{\mu\nu}\dot x'^\mu\dot x'^\mu} = \int_{\lambda_a}^{\lambda_b} d\lambda \, \sqrt{\dot t^2} = t(\lambda_b) - t(\lambda_a) = t_{ba} $$ On the other hand the integral on the left can be written as a Riemann sum using the partition above, and we can invoke ($\star$) above to get \begin{align}   I_{ba}  &= \lim_{N\to\infty}\left[\sum_{n=1}^N \epsilon_N\sqrt{-\eta_{\mu\nu}\dot x'^\mu(\lambda_n)\dot x'^\nu(\lambda_n)}\right] \notag\\ &= \lim_{N\to\infty}\left[\sum_{n=1}^N \epsilon_N\sqrt{-\eta_{\mu\nu}\dot x^\mu(\lambda_n)\dot x^\nu(\lambda_n)} + \mathcal{O}(\epsilon_N^2)\right] \notag\\ &= \int_{\lambda_a}^{\lambda_b}d\lambda \,\sqrt{-\eta_{\mu\nu}\dot x^\mu\dot x^\mu} \end{align} Combining these two computations gives the desired result.  How do others feel about this argument?  I'm not completely comfortable with it because of the assumption $(\star)$ I made on $T_\lambda$.  I imagine that in GR a similar argument could be made by invoking local flatness of the metric.


Whenever I am playing a game, and I call my friend on Skype, the sound on my game goes super low, to where I can barely hear it, and it remains the same all through the Skype call. However, though, when I end the call, my sound goes to normal again. Is there a way to fix this?

Every time I run some of my games, if the media player is open and playing, Windows 7 lowers the volume of both applications (the game and the player). All other applications are not affected. I tried foobar and Winamp, combined with several games, and it happened every time, which makes me think it’s a Windows 7 thing.  The volume goes down to inaudible levels (usually 3 or 4), and I’m forced to alt+tab, open the volume mixer, and increase both volumes manually every time.  This also doesn’t look like a bug, but some kind of feature. When it happens, the little bar in the volume mixer that shows each application’s volume level gets a little transparent (but stays in it’s regular position), while a new one appears and tells the new volume.  Anyone know what’s causing this?  (The games ran from steam, in case it matters)


During a Site's Moderator Election i remember that the nominee posts has this score next to their profile image which was made up by a number of factors such as meta participation and flagging.  I am wondering if there is a way to view these outside an election so one can try and work on it before the next one comes up?

How can I find out what my election candidate score is?  For example, on Ask Ubuntu I'd like to see exactly what score I'd have out of 40.  A SEDE query would work but I'd like one nicely presented - an equivalent of flair would be really nice!


In Ubuntu 18.04 if I wanted install all packages with the prefix postgresql, I use the command sudo apt install postgresql* but in Ubuntu 20.04 it seems there are some packages which contain * so this command doesn't work like I wanted. Is there any solution to install packages which contain a certain prefix in Ubuntu 20.4?

When I run this command :  apt install libkf5*   I get the following error :  Unable to locate package libkf5*    I'm sure that the packages whose names start with libkf5 exist (tab-completion says so) . So the problem is not about the absence of those packages.(Note the asterisk at the end of that error message , the wildcard's not working at all) I use apt v.1.9. Thanks in advance.


In this command :  cut -f2 -d$'\t'    ('\t') what is it mean ? i saw it another question, i got the idea about "tab" delimiter but still want to know '\t' shortcut or sign or command for something

I don't use bash often but I recall in the past to pass a tab or newline on the command line I would have to escape the character using the special $ character before a single quoted string. Like $'\t', $'\n', etc. I had read about   What I want to know is when it's appropriate to use an ANSI C style escape. For example I was working with a regex in grep and it appeared I needed an ANSI C style escape for a newline. Then I switched to perl and it seemed I didn't.  Take for example  about a perl regex that didn't work. Here's the regex I was using:   echo -e -n "ab\r\ncd" | perl -w -e $'binmode STDIN;undef $/;$_ = <>;if(/ab\r\ncd/){print "test"}'   It turns out that is actually incorrect because I gave the string ANSI C style escape by using $. I just don't understand when I'm supposed to prepend the dollar sign and when I'm not.


How do I check if an element exists if the element is created by .append() method? $('elemId').length doesn't work for me.

How can I check the existence of an element in jQuery?  The current code that I have is this:  if ($(selector).length > 0) {     // Do something }   Is there a more elegant way to approach this? Perhaps a plugin or a function?


I am very confused while debugging my code. a = [[0]*2]*3 a[2][1] = 2 print(a)  leads to and output of [[0, 2], [0, 2], [0, 2]] while b = [[0,0],[0,0],[0,0]] b[2][1] = 2 print(b)  leads to and output of [0, 0], [0, 0], [0, 2]] What I intended was latter. Why is the output as [[0, 2], [0, 2], [0, 2]] when using array repetition?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Why is 'crooked' pronounced /'krʊk.ɪd/ and not /krʊk/d/? Is there any available explanation for why 'crooked' is pronounced as /'krʊk.ɪd/' not /krʊk/d/? Or is it just one of the exceptions for '-ed' ending words and it is what it is?

The word "baked" is pronounced as:      /ˈbeɪkt/   While "naked" is pronounced as:      /ˈneɪkɪd/   Why are these two words not pronounced the same?


I would like to use the attached texture as colored window glass. I found the following tutorial for this, but I can't follow it pretty early on ("Assign a material and add the following nodes") Is this tutorial still up to date? At the very bottom, a church window was attached in the reply that gives exactly the effect I want to achieve with my file. What do I have to do for this? Tutorial:

I'm trying to recreate the windows 10 background effect on a logo I've made in blender.  Half the logo has a glass like material, the other half has a steel like material. And I'm using cycles at the moment.  I've put various light sources behind the logo and tried a few variations of volumetric scatter in the world to get the god ray sort of feel coming off the logo, but it's just not looking anywhere near as effective as I'd like.  I know the win10 background was a real set and photographed, but has anyone come across a tutorial to do something similar in blender?  I'm very new to the tool, I'd appreciate any pointers in the right direction.


I am using this script on router using Entware to check response of website every 15 min. It only runs once and terminates after the first 15 mins. Why?  #! /bin/sh  for i in {1..10} do     date >> webresp.csv   curl -w 'Testing Website Response Time for :%{url_effective}\n\nLookup Time:\t\t%{time_namelookup}\nConnect Time:\t\t%{time_connect}\nPre-transfer Time:\t%{time_pretransfer}\nStart-transfer Time:\t%{time_starttransfer}\n\nTotal Time:\t\t%{time_total}\n' -o /dev/null www.google.com | tee -a webresp.csv   sleep 900 done

for i in {1..40} do     echo $i done   I got  {1..40}   and I would like to have something like  1 2 3 and so on   so I can use the variable i inside a command's parameter.


I'm having trouble to add a dictionary in a list of dictionary. Here is my problem description: >> my_list = [{}]*4 >> my_list [{}, {}, {}, {}] >> my_list[0] {} >> key=(0,0,0,0) >> my_list[0][key]=[] >> my_list[0]      {(0, 0, 0, 0): []}  So far so good, but if I print my_list, this is not what I expected: >> my_list [{(0, 0, 0, 0): []}, {(0, 0, 0, 0): []}, {(0, 0, 0, 0): []}, {(0, 0, 0, 0): []}]  What I expected is: [{(0, 0, 0, 0): []}, {}, {}, {}] What is going on? I only add one entry into the first element of my_list. I don't expect my_list[1:3] have the same thing. Please help!! Many thanks, Richard


The  periodically bumps unanswered all posts (or something like that).  The annoying this with this is that it says that the question was Modified by Community. I look for what it modified and can't find anything. Then I realized that it was probably just bumped.  Can it just say "Bumped by Community" instead of "Edited by Community"?

If the Community user bumps a question, It says It has modified it:    However, It did not really modify the question, It rather just visited it. The word "modified" is a bit unfortunate IMHO because it suggests that something changed in the question or its answers, which is not true. I therefore suggest that we look for another word which would be more descriptive and less confusing. Some come to my (and others') mind:   visited, poked, bumped, promoted, dredged up, brought up, ...   (Actually, "Bumped" is even officially used now:  and .)  I'm not a native speaker and maybe someone find a better word. To me, visited sounds the best, but that may be only me. It makes sense, too, since Community really just visits the questions, with the site-effect of them getting bumped. It shouldn't confuse anybody.  Actually, it can be harmful in some sense, since , and it is interesting to know that this has happened, so that more people can check that the edit makes sense. You therefore can't simply ignore all "edited by Community" messages. (Thanks to Monica Cellio for pointing it out.)  (Remark: I know this has been questioned before (    ) but I think it has never been requested to change the action title to something more descriptive. If I'm wrong, I apologize.) (The "lying" it the question title is meant as a sarcasm)


I want to crate an environment aligning with text margin for Matlab codes like this:   In this image I used to a box, with \begin{verbatim} .... \end{verbatim}, however it is not aligning with text margin. Some tools are provided, however, I cant assemble them.  \documentclass{article} \usepackage{tikz} \RequirePackage[framemethod=TikZ]{mdframed}      % Matlab box \newmdenv[skipabove=7pt, skipbelow=7pt, backgroundcolor=black!5, linecolor=ocre, innerleftmargin=5pt, innerrightmargin=5pt, innertopmargin=5pt, leftmargin=0cm, rightmargin=0cm, roundcorner=5pt, innerbottommargin=5pt]{mBox}  \newenvironment{matlabcode}{\begin{mBox}??????\end{mBox}} % including verbatim (if it is possible) \begin{document}      \begin{matlabcode}   a = w*f;   k = sin(x); \end{matlabcode}  \end{document}

I want to insert lstlisting inside a tcolorbox which must has a title and title can be hidden whenever I need, also it's top right and bottom left corner will be rounded something like this:     I know how to use tcolorbox and lstlisting but I don't know how to use them together. Could anyone please help me? Any alternate solution without tcolorbox will be also appreciated.  My code snippet :  \documentclass[10pt,a4paper,oneside]{book} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage[left=2.00cm, right=2.00cm, top=2.00cm, bottom=2.00cm, showframe]{geometry} \author{Ravi} \title{How to wite code in \LaTeX}  %%%%%%%%%%%%%%% CODE STYLE %%%%%%%%%%%%%%%  \usepackage{blindtext} \usepackage{xcolor}  \definecolor{pblue}{rgb}{0.13,0.13,1} \definecolor{pgreen}{rgb}{0,0.5,0}  \renewcommand{\rmdefault}{phv} \usepackage[T1]{fontenc} \usepackage[ttdefault=true]{AnonymousPro}  \usepackage{listings} \usepackage[T1]{fontenc} \usepackage{inconsolata} \lstset {     language=Java,%     basicstyle=\fontfamily{AnonymousPro}\selectfont,%     keywordstyle=\bfseries\color{pblue},     stringstyle=\bfseries\itshape\color{green!40!black},%     commentstyle=\bfseries\itshape\color{black!60},%     showspaces=false,     showtabs=false,     breaklines=true,%     showstringspaces=false,     %breakatwhitespace=true,     %numbers=left,%     %numbersep=8pt,%     %numberstyle=\tiny,%     rulecolor=\color{white!60!black},%     breaklines=true,%     frame=single,%single     %keepspaces=true,%     xleftmargin=1.5mm,%\parindent     xrightmargin=1.5mm,%     framerule=1.2pt,%     backgroundcolor=\color{gray!8},%     %morecomment=[s][\bfseries\color{orange!40!red}]{@}{Override},     tabsize=1, } \lstset{emph={%           downto, for, String, TextView, Toast, Button, EditText, ImageView, Typeface, Intent, WebView, WebSettings, SwipeRefreshLayout, RelativeLayout, Animation, AlertDialog, SharedPreferences, Editor, ToggleButton, CardView, LinearLayout, gradient, shape, %     },emphstyle={\bfseries\color{pblue}}% }  \begin{document}     %\maketitle     \chapter{Hello \LaTeX}      \begin{lstlisting}         String s = "Hello World";          Animation from_top = AnimationUtils.loadAnimation(this, R.anim.from_top);         imageView.setAnimation(from_top);          // change activity with fade animation          new Handler().postDelayed(new Runnable() {         @Override         public void run() {         Intent intent = new Intent(MainActivity.this, Main2Activity.class);         startActivity(intent);         overridePendingTransition(R.anim.fade_in,R.anim.fade_out);         finish();         }         }, SPLASH_TIMEOUT);     \end{lstlisting}  \end{document}


$X,Y,B$ are sets  Prove:  $X\cup B=Y\cup B$ if and only if $X\setminus B=Y\setminus B$  I have no idea how to do it.

True or False  $A - C = B - C $ if and only if $A \cup C = B \cup C$   I am in an introduction to proofs class.  I think this is a true statement. I have began the proof and realize I have to do this both directions.  I am stuck on the second part of the proof.  Assume $A - C = B - C$ Let $x \in A$ then $x \in A$ but $x\notin C$ By the assumption $x \in B - C$ then $x \in B$ and $x\notin C$  If $x \in A$ then $x \in A \cup C$.  If $x\in B$ then $x \in B \cup C$. Therefore,  $A \cup C = B\cup C$.   Assume $A \cup C = B \cup C$. Let $x \in A \cup C$. Then $x \in A$ or $x\in C$.  If $x \in A$ then $x \in A - C$  If $x\notin A$ then $x \in C$.   This is where I get stuck... I know I am trying to show $A-C = B-C$ for the second part but I don't know how to get there... Am I on the right track?


If $$ G = \left\{  \begin{pmatrix} c & a \\ 0 & 1 \end{pmatrix} c,a\in (\mathbb{R}) : c \neq 0 \right\}  $$ and assume G is a group under matrix multpication $$  H = \left\{ \begin{pmatrix} 1 & x \\ 0 & 1 \end{pmatrix}: x\in\mathbb{R} \right\} $$ Find  the left and right cosets of H in G and show that they are equal  So far I have done the following: $gH = \begin{pmatrix} c & a \\ 0 & 1 \end{pmatrix} \begin{pmatrix} 1 & x \\ 0 & 1 \end{pmatrix}$  $=\begin{pmatrix} c & cx+a \\ 0 & 1 \end{pmatrix}$  To calculate the right coset, choose $g' =\begin{pmatrix} c' & a' \\ 0 & 1 \end{pmatrix}, c' a' \in G$:  Then $Hg'=\begin{pmatrix} c' & x+a' \\ 0 & 1 \end{pmatrix}$  How does $gH$=$Hg'$ in this case?

If $G = \begin{pmatrix} a & b \\ 0 & 1 \end{pmatrix} a,b\in (\mathbb{R}) : a \neq 0$)   and assume G is a group under matrix multpication  Prove that H = ($\begin{pmatrix} 1 & t \\ 0 & 1 \end{pmatrix}: t\in\mathbb{R}$) is a normal subgroup of G  I'm meant to show that H is a normal subgroup by showing that the left coset is equal to the right coset.  So far I have shown the following:  take $g=\begin{pmatrix} a & b \\ 0 & 1 \end{pmatrix}$   then  $gH=\begin {pmatrix}a &at+b \\ 0 &1 \end{pmatrix}$  and take $g'=\begin{pmatrix} a' & b' \\ 0 & 1 \end{pmatrix}$  then $Hg'=\begin{pmatrix} a' & b'+t \\ 0 & 1 \end{pmatrix}$  I don't quite understand how $gH=Hg'$


What is the value of $\cot70+4\cos70?$   So far I expressed $\cot70$ as $\frac{\cos70}{\sin70}$ and $4\cos70$ as $\frac{4\cos70\cdot\sin70}{\sin70}$. I then used the sine double angle formula to get: $\frac{4\cos70\cdot\sin70}{\sin70}=\frac{2\sin140}{\sin70}$ but I'm struggling to find a way to finish this.

I have to simplify and evaluate this :   $$\cot 70^\circ+4\cos 70^\circ$$  On evaluating it, the answer comes out to be $1.732$, or $\sqrt 3$ .  I tried to get everything in $\sin$ and $\cos$, but it doesn't go any further. Any hints?


Does moving an application to the SD card negatively influence I/O performance of the app or of Android in any way, in particular loading times?

Are there any particular advantages/disadvantages to storing apps on the external storage of an Android device? As I have a Nexus S,  I can't think of advantages for me as I can't remove the storage, also the internal storage is more than enough for my needs.  I noticed that on phone start up, when I had all my apps moved to USB storage it was quite sluggish to register all the apps on the menu/home screens.  I also read somewhere that having a wallpaper set from a photo that was stored on the external memory actually drained quite a bit of battery too with all the reads (although I think this may have been a bug).


How does one show that $\nabla^2 1/r$ (in spherical coords) is the Dirac delta function ? Intuitively, it would seem that the function undefined at the origin and I'm not able to construct a limiting argument that avoids this problem.

If $T_f$ is a distribution, i.e. a linear functional, continuous according to the convergence defined , defined on the space $K$ of the functions of class $C^\infty$ that are null outside a bounded interval (which is not the same for all functions), its derivative is defined as $$\frac{dT_f}{dx}(\varphi):=-T_f(\varphi')$$where $\varphi'$ is the derivative of $\varphi$. The symbolic writing $T_f(\varphi)=\int_{-\infty}^\infty f(x)\varphi(x)dx$ is often used to write such a functional, since, if $g$ is (Riemann or Lebesgue) integrable on every bounded interval, then $\int_{-\infty}^\infty g(x)\varphi(x)dx$ indeed is such a continuous functional. In this context, we can symbolically define the "derivative" $f'$, for any $T_f$, even if the symbolic writing $f$ does not refer to an integrable function, according to the expression$$\int_{-\infty}^\infty f'(x)\varphi(x)dx:=-\int_{-\infty}^\infty f(x)\varphi'(x)dx=:\frac{dT_f}{dx}(\varphi).$$  Let us come to my question. While studying physics, in particular the theory of electromagnetism and the , I always find the equality$$\nabla^2\left(\frac{1}{\|\boldsymbol{x}-\boldsymbol{x}_0\|}\right)=-4\pi\delta(\boldsymbol{x}-\boldsymbol{x}_0)$$where $\nabla^2$ is the $^1$. I suppose that, in the tridimensional case, with $\phi:\mathbb{R}^3\to\mathbb{R}$, $\int_{\mathbb{R}^3}\frac{\partial f(\boldsymbol{x})}{\partial x_i}\phi(\boldsymbol{x}) dx_1dx_2dx_3$ is analogously defined as $\frac{\partial T_f}{\partial x_i}(\varphi)$, which I suppose to be analogously defined, in turn, as $-\int_{\mathbb{R}^3}f(\boldsymbol{x})\frac{\partial \phi(\boldsymbol{x})}{\partial x_i} dx_1dx_2dx_3$, although I say I suppose because I have not found a rigourous definition of such derivatives on line nor in cartaceous texts; as to mathematical resources, I have studied Kolmogorov-Fomin's Элементы теории функций и функционального анализа, which only focuses on the monodimensional $\varphi:\mathbb{R}\to\mathbb{R}$ case. Once fixed a proper definition of such derivatives, how can it be proved that $\nabla^2(\|\boldsymbol{x}-\boldsymbol{x}_0\|^{-1})=-4\pi\delta(\boldsymbol{x}-\boldsymbol{x}_0)$?  $^1$ The link contains a derivation of $\nabla^2(\|\boldsymbol{x}-\boldsymbol{x}_0\|^{-1})=-4\pi\delta(\boldsymbol{x}-\boldsymbol{x}_0)$ , but I do not understand it: I would understand it if we could apply Gauss's divergence theorem at (20), but I know it for functions of class $C^1(\mathring{A})$, $\overline{V}\subset\mathring{A}$, only, while $\nabla\left(\frac{1}{\|\boldsymbol{x}-\boldsymbol{x}_0\|}\right)$ is not even defined for $\boldsymbol{x}=\boldsymbol{x}_0$; the  of the identity $\nabla^2(\|\boldsymbol{x}-\boldsymbol{x}_0\|^{-1})$ $=-4\pi\delta(\boldsymbol{x}-\boldsymbol{x}_0)$ that I have found uses a "weak limit", but it does not use the formal definiton of derivative of a distribution that I have written above. These are the two only references addressing what I am asking that I have managed to find.


I have content type recipes and a view page that list all of my recipe nodes, that view has an exposed filter block that i placed in header. So in header i have views exposed filter ( search terms ) that works as recipe finder.   Now on that view page with results i want to add more exposed filters (3 select drop down) that will filter my selected taxonomies.  Problem is  if i just add those filters in my view, they will all show up in same block in header, but there i need just search.   Is there a way to have just 1 exposed filter in block and others on a view page.

I'm not sure how to overcome this. So far I have managed to do it by simply duplicating the view, but this is not a good idea.   The view needs to have two exposed filters. These blocks are styled different and sit in different parts of the site, so they need to be independent.  Is it possible to expose two filter blocks from one view?


My data structure:    My code:  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      Toolbar toolbar = findViewById(R.id.toolbar);     setSupportActionBar(toolbar);     getSupportActionBar().setTitle("");      profile_image = findViewById(R.id.profile_image);      firebaseUser = FirebaseAuth.getInstance().getCurrentUser();     username = findViewById(R.id.username);      reference = FirebaseDatabase.getInstance().getReference("databasename").child("Users");      reference.addValueEventListener(new ValueEventListener() {         @Override         public void onDataChange(@NonNull DataSnapshot dataSnapshot) {             User user = dataSnapshot.getValue(User.class);             username.setText(user.getUsername());              if (user.getImageURL().equals("default")) {                     profile_image.setImageResource(R.mipmap.ic_launcher);             } else {                 Glide.with(MainActivity.this).load(user.getImageURL()).into(profile_image);             }         }          @Override         public void onCancelled(@NonNull DatabaseError databaseError) {          }     }); }  @Override public boolean onCreateOptionsMenu (Menu menu) {         getMenuInflater().inflate(R.menu.menu, menu);         return true; }  @Override     public boolean onOptionsItemSelected(MenuItem item) {         switch (item.getItemId()) {              case R.id.logout:                 FirebaseAuth.getInstance().signOut();                 startActivity(new Intent(MainActivity.this, StartActivity.class));                 finish();                 return true;         }          return false; } @Override protected void onStart(){     super.onStart();     if(firebaseUser == null) {         Intent homeIntent = new Intent(MainActivity.this, StartActivity.class);         homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);         homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);         startActivity(homeIntent);         finish();      }  }   }  I am always getting the Attempt to invoke virtual method java.lang.String com.dantools.OurChat.Model.User.getUsername() on a null object reference error when I login.  I tried to change some things but it doesn't work no matter what. I also tried to change the HashMap in the registerActivity but it still doesn't work.

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


I was reading about how monomorphisation works in Rust, does java work in same way.  Lets say I create below file.  public class DummyDTO<T> {     T data;      public T getData() {         return data;     }      public void setData(T data) {         this.data = data;     } }   and use new DummyDTO<Integer>() & new DummyDTO<Float>() will java compiler create two different files for each, Integer and Float or it will Simply replace T with Object and will do casting everywhere?

I read about Java's type erasure .  When does type erasure occur? At compile time or runtime? When the class is loaded? When the class is instantiated?  A lot of sites (including the official tutorial mentioned above) say type erasure occurs at compile time. If the type information is completely removed at compile time, how does the JDK check type compatibility when a method using generics is invoked with no type information or wrong type information?  Consider the following example: Say class A has a method, empty(Box<? extends Number> b). We compile A.java and get the class file A.class.  public class A {     public static void empty(Box<? extends Number> b) {} }     public class Box<T> {}   Now we create another class B which invokes the method empty with a non-parameterized argument (raw type): empty(new Box()). If we compile B.java with A.class in the classpath, javac is smart enough to raise a warning. So A.class has some type information stored in it.  public class B {     public static void invoke() {         // java: unchecked method invocation:         //  method empty in class A is applied to given types         //  required: Box<? extends java.lang.Number>         //  found:    Box         // java: unchecked conversion         //  required: Box<? extends java.lang.Number>         //  found:    Box         A.empty(new Box());     } }   My guess would be that type erasure occurs when the class is loaded, but it is just a guess. So when does it happen?


While I initialize a square matrix with all elements as 0 and try to manipulate one of the elements, a weird "bug" happens:  Here is the sample code for a 3 * 3 matrix:  row = [0] * 3 matrix = [] for i in range(3):     matrix.append(row)  matrix[0][1]=2   I try to change one element say matrix[0][1] to 2, all elements on the column 1 change to 2  [0,2,0] [0,2,0] [0,2,0]   Can anyone please help explain what's going on here? I only try to change one element only.

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


In previous versions I could just export as a .DBF file, open it with Excel and then convert it to an Excel file. However, now in ArcGIS 9.3.1 the .DBF file can no longer be open by Excel. I have also tried saving as a text file but to no avail.

Is there a way to export a table with selected records to an Excel spreadsheet?  I was trying to export just to .txt file but ArcGIS gives me an error message.     An error occurred exporting the table   The other problem I have is with coordinates. I want them only with one locus after the comma, I mean like the format: xx xx xx,x not like I have now xx xx xx,xxx.     The version of my software is 9.3.


Guys I have a question:  39268112/50000000*4 is exactly 3.14144896  But when i write a code in c++ as such:  #include<iostream.h> using namespace std; int main() {    int a = 39268112;    int b = 50000000;    cout << (double)a / (double)b * 4; }      But, I get 3.14145.   This is not the exact value.  So my question is:      how can i always display the exact value of a double division?   EDIT: I am aware of the setprecision option, the problem here is just, that I have to know the exact value of the result to know how many decimals the result will have. Since I wrote a program, which approximates PI based on dart throws, the two integers a and b can have much bigger values than 39268112 and 5000000.  If I would use   cout << setprecision(some number) << (double)a / (double)b * 4;   I need to know the exact result first, before I can even enter the argument in setprecision()  My edited question would be if there is a way to automaticly put an argument in setprecision() so that it can display the exact result, without having to calculate it myself first.

In my  I was printing a double using cout that got rounded when I wasn't expecting it.  How can I make cout print a double using full precision?


I have a problem and I can not find an answer in internet. So  basically I have a candle with animated candle flame (made with texture nodes and I added a point light source) and I want to render only the flame animation, because other things are static, and then combine the static image with the animated. So I need candle flame to be with a RGBA information. However, when I render it, it gives very weird result. So this is how it looks in my viewport:  And this is how it looks while rendering:  And it is the same in Cycles or Eevee. Could someone please tell how to fix that, if it is even possible?

This is what I have so far:  The rendered image has a transparent background, but the glare filter creates an output with a black background, so after merging the two togheter, the background turns black but I need it to be transparent, what can I do?


In Canada as a child, probably in the mid-late 1960s, our school librarian read us a book about a child (boy I think) who when he became of a certain age was to be 'tapped' a metal tap would be inserted under his skin so he could be tracked by a superpower.  'Tapping' children at a certain age was the norm in this world and this story was about he tried to evade being tapped.  Any idea of what the title of this book might have been or who the author was?

I read this maybe 10-15 years ago.   Aliens have conquered earth. Possibly quite some time before the time then novel is set in. They have built their own cities. They conduct periodic athletic competitions for humans similar to the current olympics. The winners are take into the city to act as servants to the masters. The protagonist is part of a human resistance movement who is competing in the games. The plan is to infiltrate the city, gather intel and escape. He wins, get in, finally has to kill his master and escape down a waste disposal system which ends up outside the city.   Anybody knows which one I am talking about?


In my current project, seeing mount command output showing files as mountpoints mounted on tmpfs. tmpfs on /etc/hostname type tmpfs (rw,relatime,size=52724k) tmpfs on /etc/hosts type tmpfs (rw,relatime,size=52724k) tmpfs on /etc/passwd type tmpfs (rw,relatime,size=52724k) tmpfs on /etc/ntp.conf type tmpfs (rw,relatime,size=52724k) tmpfs on /etc/resolv.conf type tmpfs (rw,relatime,size=52724k)  By manpage description, mount takes only directory as mountpoints. I tried to mount the file as done in above way but its not working for me. root@raspberrypi:/home# file /tmp/agner /tmp/agner: ASCII text  root@raspberrypi:/home# mount -t tmpfs tmpfs /tmp/agner mount: mount point /tmp/agner is not a directory  Bind mounts syntax:  mount --bind olddir newdir  mount --rbind olddir newdir  '/tmp' directory is already mounted into tmpfs. tmpfs on /tmp type tmpfs (rw)  I attempted below combinations but getting 'fs' not exist error. root@raspberrypi:/home# mount --rbind tmpfs /tmp/agner mount: special device tmpfs does not exist root@raspberrypi:/home# mount --bind tmpfs /tmp/agner mount: special device tmpfs does not exist root@raspberrypi:/home# mount --bind /tmp/ /tmp/agner mount: mount point /tmp/agner is not a directory  When specifying '-t tmpfs' filesystem option in addition, then mount manpage is showing up. root@raspberrypi:/home# mount -t tmpfs --bind tmpfs /tmp/agner  So what option in mount command is required to achieve this.

I am trying to mount /boot/config-4.14.90-v8 on to /usr/src/linux/.config. I've tried:  rpi-4.14.y:linux Necktwi$ sudo mount -o loop,ro -t vfat /boot/config-4.14.90-v8-g6d68e517b3ec /usr/src/linux/.config mount: /usr/src/linux/.config: cannot mount /dev/loop0 read-only.   notice the error cannot mount /dev/loop0 read-only.  rootfs is btrfs /boot is vfat /usr/src is nfs (I mounted remote server's /usr/src)    I tried mount --bind but it failed.  rpi-4.14.y:linux Necktwi$ sudo mount --bind /boot/config-4.14.90-v8-g6d68e517b3ec /usr/src/linux/.config mount: /usr/src/linux/.config: bind /boot/config-4.14.90-v8-g6d68e517b3ec failed.


I am applying to several Ph.D. programs this year. I am not sure I want to work with this professor as I never know him before, but mentioning his name makes it seems that I have already done some research on the school that I apply. On the other hand, if the admission committee does not include this person, then they may feel offended. Alternatively, I can also say that the school is particularly strong in the field I want to work in without mentioning any name.

For PhD applications, I have mentioned that I am interested in some research areas. Besides, I am thinking about mentioning some professors' names, so that it shows I have read their websites and I am not just sending out generic statements applicable to many schools.  But is it good to mention some professors' names in the statement of purpose, if I don't know them personally? In what cases is it good, and in what cases it isn't?  For example, is it good to only mention    those whose research directions are aligned with my research interests, or/and those whose books or notes I have heard of, or better, might have read some parts of, or/and those who are already established and famous (such as having certain titles), or/and those that are directing the PhD graduate programs, or/and those that are heads of the departments?    What will other professors who are not mentioned think? How will you do, if it were you?


I need to find pixels of specific RGB color on my computer screen quickly. Something like pressing a hot key and the mouse cursor is moved to there or the area is circled.  I would prefer a Windows utility that works on the screen directly but if it works on a saved screenshot, I can live with that.

I have an image (PNG or JPG) inside which there is at least one pixel of a certain RGB color I know in advance.  I want to find the pixel(s) of that color  For example, I may have image.jpg, inside which I know some pixel has the RGB value 255,100,200. I want a program that will give me the list of pixels (if any) of that color in the image.  Anyone know of a tool to help me with that?  Thanks!


If a matrix $A$ is Diagonalizable, then $\exists$ a Non singular matrix $P$ such that  $$D=P^{-1}AP$$  Now taking Trace on both sides  $$Tr(D)=Tr(P^{-1}AP)=Tr(APP^{-1})=Tr(A)$$  Now since $D$ is Diagonal matrix with diagonal elements as eigen values we have  $Tr(A)$ as Sum of eigen values of $A$.  But how to prove this if $A$ is not diagonalizable?

I have looked extensively for a proof on the internet but all of them were too obscure. I would appreciate if someone could lay out a simple proof for this important result. Thank you.


I've tried to construct a proof for this using recursion. My knowledge of recursion and set theory in general is quite limited so I'd appreciate some feedback!  The claim in symbolic logic: $\forall n \in \mathbb N, \exists u \in U, S(u) \wedge |u| = n \Rightarrow \mathcal |P(u)| = 2^n$ where:  $U:$ the set of everything  $S(x):$ x is a set  Initial Value  Assume $n = 0$  Then $\exists u \in U, |u| = 0$  Then $ u = \varnothing $  Then $ |\mathcal P(u)| = | \{ \varnothing \} | = 1 = 2^0 $  Prove: $\forall n \in \mathbb N, \exists u, x \in U, [S(u) \wedge (x \notin u) \wedge (|u| = n) \wedge \mathcal |P(u)| = 2^n] \Rightarrow  [(|u \cup \{x\}| = n + 1) \wedge (|\mathcal P(u \cup \{x\})| = 2^{n + 1})]$   Assume $|u| = n$  Then $ |\mathcal P(u)| = 2^n$  Then $ |u \cup \{x\} | = n + 1$ because  $ |\{x\}| = 1$  Then $ \mathcal |P(u \cup \{x\})| = |\mathcal P(u)| * |\mathcal P(\{x\})| = 2^n * 2 = 2^{n+1} $  Is this convincing enough or do I need to add more?   EDIT: Fixed notation

Please help with this question. Show that for a finite set $A$ of cardinality $n$, the cardinality of $P(A)$ is $2^n$, where $P(A)$ is the power set of $A$. Thank you in advance for any help that is given.


Given:  $\sum_{1}^{\infty} \frac{1}{(n!)^2} $  development of the amount $1+ \frac{1}{4}+\frac{1}{36}+...$

How can one prove that the series $\displaystyle \sum\limits_{n=1}^\infty \frac{1}{(n!)^2}$ converges to an irrational number? There's no need to use Taylor expansion, integrals or any advanced/professional techniques. It can be proved using only basic techniques. My first attempt was to assume that the series does converge to a rational number $ \frac{p}{q}$ and then it follows by definition that for every positive epsilon there exists an integer k such that $ {\sum_{n=1}^{k} \frac{1}{(n!)^2} -\frac{p}{q}}<=\epsilon$ I tried to get a contradiction but I failed.


how to add on click event for a button which is created dynamically    $("tr").html("<button class='new'>next-</button>" + OriginalContent + "")  $('body').on('click', 'button .new', function() {   //Some  });     but its not working

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


Many people say that setting up your own backlinks is not good. Is this true?  Nobody can expect backlinks to be built by other sites naturally unless they are social networking sites or some good topic. Even the top news sources won't have backlinks naturally.  Google doesn't know these, so can we build backlinks ourself?

Link building is the process of manually building links in any way possible to show the site in question as having more of a value to search engines than it did previously. Therefore it's surely a black-hat SEO activity?    I'm at the stage where I'm trying to promote an online store I'm in the process of launching at the company I work for. I've done most of the initial legwork - domain, server, software, products, on-page SEO, etc. All that's left now is to promote, promote, promote.  I (like many others) would like most of our traffic to come from organic searches because it's both free and passive in many respects (yes, my time isn't free and so on, but let's assume it is for now) so it's a question of ranking well for what I think (based on my keyword research) the terms are that people search for where our site would be the most appropriate. As I said before, all on-page SEO is taken care of, meaning broadly speaking, how well we rank for said terms is down to how many links (or rather, 'how many links of a good quality') I can get pointing to my site and products with appropriate anchor text over our competitors (competitors being not necessarily other online stores, but sites that rank well for those terms regardless of their purpose).  I'm not new to the concepts of SEO, I understand the majority of concepts (it's actually quite simple, though most 'SEO' firms insist it isn't and will throw ridiculous terminology into the mix to boost their 'professional image') and whilst I understand everything, I just can't fathom why anyone would seek to try and build links manually. Link building entails essentially pestering webmasters to link to your site in question, when it's probably the last thing they care about doing for that particular day. Sure there are rare occasions when the site your building links for is genuinely relevant and interesting to the webmaster you're approaching for a link, but in some industries - especially the more 'niche' industries, these kinds of sites are far and few between.  Rather than simply requesting links, many articles now go into the psychology of essentially manipulating people (webmasters, yes, they're people) into linking to their site under the pretences of a false relationship/friendship (sure, you can say it's genuine all you like but you would never have contacted them if you weren't after a link) and spending time on said relationship to the stage where they might link to you... once.  Manual link building seems (well, IS) a very long-winded process with what is essentially very little reward when you consider that you won't continue to gain links if you stop. Major search engines use link counts as an organic method of determining which sites are relevant to what search terms and how they should rank and by building links, you are technically devaluing their efforts to evaluate your site. Surely by this measure, link-building isn't a white-hat process?  I believe the smarter approach (if you were going to approach the webmaster of a site whose audience may find your site interesting and request they link to it) would be simply to send an email with a link asking them to take a look... then if they genuinely found it interesting they might link to it.... and I fear I may have just contradicted myself with my earlier psychology approach.  Should 'link-building' as an activity consist of creating link-worthy exceptional content that is likely to accrue links naturally with age as opposed to the headless-chicken/goose-chase approach many SEO firms seem to undertake?


This may be common knowledge but it seems unclear to me.  When crafting a magic item, do I need to be able to cast spells at the same level as the requirements, or is that a requirement I can disregard in exchange for a +5 to the crafting check?  For example I am level 4 and wish to craft a bag of holding with a caster level check of 9 - which requires me to be able to cast the spell secret chest, a level 5 spell, which I won't unlock until level 9. Am I able to craft the item in question early, or do I have to wait?

Is an item's Caster Level the Minimum Required Caster Level?  For example a  has a CL of 9th     Aura moderate conjuration; CL 9th   Does that mean a creator has to have a Caster Level of 9?


My parents regularly cook meat such as chicken by first cooking it by itself, leaving it out for a while, then later cooking it again with sauces and such. This concerns me because the "leaving it out" part is at room temperature, and can be hours or overnight. The internet seems to suggest that this is very dangerous with meat. Somehow, none of us have never gotten sick eating this food. Can someone explain to me why this seems to contradict the usual recommendations of max 4 hours left out in the "Danger Zone" temperature range? Or have we slowly been reducing our lifespans? FWIW our family is Chinese and cook Chinese cuisine.

If I leave fully-cooked food (particularly meat) out at warm temperature - say on the counter or in a crock pot that's been turned off -  how long will it stay safe to eat?  Does it make any difference if I re-cook the food afterward?


Is it possible to use Alt+Tab to switch between active windows in the current workspace only?  The default behaviour shows active windows across all workspaces, effectively allowing me to switch workspaces using Alt+Tab, something I would like to prevent.

I am looking for a clean and fast method to force GNOME in Ubuntu 14.04 to switch between active apps only on the current workspace when pressing the shortcut alt + tab.


Let $(X,d)$ be a metric space. If $a_n$ is a sequence in $X$ and $a\in X$ such that $\frac{d(a_n,a)}{1+d(a_n,a)} \to 0$, then $a_n\to a$.   I am trying to prove this statement as review for an exam. I am not sure how to do it. I know that given $\epsilon >0$, since $\frac{d(a_n,a)}{1+d(a_n,a)} \to 0$, I can choose $N\in \mathbb{N}$ such that if $n\geq \mathbb{N}$, then $|\frac{d(a_n,a)}{1+d(a_n,a)} - 0| < \epsilon.$ I know that I need to show that there exists $N\in \mathbb N$ such that if $n\geq \mathbb N$, then $d(a_n,a) < \epsilon.$ Any suggestions?

Let $(X,d)$ be a metric space and for $x,y \in X$ define $$d_b(x,y) = \dfrac{d(x,y)}{1 + d(x,y)}$$ a) show that $d_b$ is a metric on $X$  Hint: consider the derivative of $f(t)$ = $\dfrac{t}{1+t}$  b) show that $ d$ and $ d_b $ are equivalent metrics. c) let $(X,d) $ be $(\mathbb{R}, |\cdot|)$ Show that there exists no $ M>0$ such that $ |x-y| $ $\leq$ $Md_b$ $(x,y)$ for all $ x,y$ $\in$ $\mathbb{R}$  I have calculated $f(t)$ and $f'(t)$ and from this I know $f(t)$ is an increasing function as $f'(t)$ is strictly positive. But I don't know where to go from here or how to do parts b) and c)


I've got a problem with UTF-8 charset and french characters (é, è,...).  My PHP scripts are all encoded in UTF-8 without BOM. At least I think it's the case.  The MySQL Tables are set to use utf8_general_ci.  The PHP scripts display characters correctly, but PHPMyAdmin display characters incorrectly (eg. : "Ã©" instead of "é").  Do you have an idea about the cause of the problem ?  Thanks in advance for your help.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


Below is an example of an asymmetrical limit (or uncertainty)  How can I typeset this in a \LaTeX equation? Such pair of numbers should be vertically stacked while being vertically center-aligned with rest of the equation. Solution $X^{+Y}_{-Z}$


I am trying to prove that $k$ is divisible by $3$ iff the sum of the digits of $k$ is divisible by 3 for all $k \in Z$.  I am not even sure what tags to use because I am not sure of right methods to use to solve this problem. I don't see how you could solve this with induction. Any tips on the general approach would be appreciated.

The divisibility rule for $3$ is well-known: if you add up the digits of $n$ and the sum is divisible by $3$, then $n$ is divisible by three.  This is quite helpful for determining if really large numbers are multiples of three, because we can recursively apply this rule:  $$1212582439 \rightarrow 37 \rightarrow 10\rightarrow 1 \implies 3\not\mid 1212582439$$ $$124524 \rightarrow 18 \rightarrow 9 \implies 3\mid 124524$$  This works for as many numbers as I've tried.  However, I'm not sure how this may be proven.  Thus, my question is:     Given a positive integer $n$ and that $3\mid\text{(the sum of the digits of $n$)}$, how may we prove that $3\mid n$?


Recently I noticed the changes to the top bar. They are good but I had a suggestion, what about fixing the topbar at the top of the viewport for the user to simply access it regardless of on what position they are on the site ? I mean they don't need to scroll up every time to access the topbar.     I know this topic has been discussed earlier and the obvious answer was that use a grease-monkey script or something similar to it to make it fixed on your browser, this can be a good addition in order to make user interface better.   Thanks and hope to get some positive response :)  UPDATE: I respect your opinions and thus closing this topic.

In Excel, the window can be frozen in place in such a way that you can always see the name of the column even though you go way down below the 'fold' of the screen.  On SE, when you scroll, the whole page goes up (or down). This means the top navigation bar is scrolled off screen. I'm not sure if it would be a good idea or not to fix the top navigation to the top of the screen and let the rest of the content scroll.  What do you think about this, in terms of pros and cons?  [Update]  With the new Top navigation bar, kudos to the design team, I think this question becomes relevant again. I'm aware of the busload of downvotes, but still.  The top navigation bar doesn't occupy much space and has two notification areas:   Inbox Achievements   Having these two notifications visible at all times would be nice, IMO.  [Update]  I've just noticed that I haven't used the word "optional" in this discussion... My bad. In Excel, the Freeze function is controlled by the user. You can optionally Freeze part of the interface, and you can eliminate the Freeze at will.


In the lyrics of the song Cotton Fields by Creedence Clearwater Revival there is the following sentence:     When I was a little bitty baby   my mama would rock me in the cradle   I feel like I understand the meaning, but I can't find out why is would used in such way.  What is the difference to the following:     When I was a little bitty baby   my mama rocked me in the cradle

One can use the habitual past 'would' to describe past events. For example one could say,      Jim would spend weekends at the farm. He would cut weed and water the plants.   One can also use the simple past.       Jim spent weekends at the farm. He cut weed and watered the plants.   Would the use of habitual past be considered "weak" writing or prose, as opposed to the simple past?  How does the simple past in the following sentence "He would cut weed and water the plants." without any preceding time expression e.g. "spend weekends"  make a distinction between a repeated action/habit and a one-time action of cutting weeds and watering plants?


I am having difficulty with calculating this sum.  By the Ratio Test, the series converges and on the solution key of the last year's exam it written that the sum = $\ln 3$.  I tried known Maclaurin Series but there is a problem every time. For example, when I try the expansion of $\arctan x$ I can't get rid of $(-1)^n.$   Could you help out, or give a hint?

Evaluate $$ 1 + \frac{1}{3}\frac{1}{4}+\frac{1}{5}\frac{1}{4^2}+\frac{1}{7}\frac{1}{4^3}+\dots$$  All i could do was to see that $$\frac{1}{3}=\frac{1}{2.1+1},\frac{1}{5}=\frac{1}{2.2+1},\frac{1}{7}=\frac{1}{2.3+1},\dots$$  SO, we should be able to write   $$ 1 + \frac{1}{3}\frac{1}{4}+\frac{1}{5}\frac{1}{4^2}+\frac{1}{7}\frac{1}{4^3}+\dots=1+\sum_{n=1}^{\infty}\frac{1}{2n+1}.\frac{1}{4^n}$$  This is what i could simplify the given question to...   But, this is doing me no good.. I could not go any further..  I would be thankful if some one can help me to clear this.  I would request users who are trying to help me to just give necessary hints but not post it as answer.  Thank You.


$f(x,y)=3x$ on $X=${$(x,y): x=y$} is a linear functional on the subspace $X\subset \Bbb R^2$.  Here the norm on $\Bbb R^2 $ is defined as $\|(x,y)\|= |x|+|y|$. Let $g(x,y)=ax+by$ on $\Bbb R^2$, where $g$ is a Hahn Banach extension of $f$. Then what must $a-b$ be?  I know that if $g$ is restricted to $X$, then $g$ must be equal to $f$ and this implies $a+b=3$. But how do I proceed further?

Consider the normed linear space $\Bbb R^2$ with this norm $\|(x,y)\|=|x|+|y|$. Define $f$ to be a bounded linear functional on $X=\{(x,y):x=y\}$ by $f(x,y)=3x$. If $g$ is a Hahn-Banach extension of $f$ on $\Bbb R^2$ given by $g(x,y)=\alpha x+\beta y$ then find $\alpha-\beta$.  My try: Since $g$ is an extension of $f$ so $g|_X=f\implies g(x,x)=(\alpha+\beta)x=3x\implies \alpha+\beta =3$ Now $\|f\|=\sup \{f(x,x):\|(x,x)\|=1,(x,x)\in \Bbb R\}=3\implies \|g\|=3$ So $\sup \{g(x,y):\|(x,y)\|=1,(x,y)\in \Bbb R\}=3\implies \alpha x+\beta y\le 3$ where $|x|+|y|=1$. Take $x=0,y=1\implies \alpha x+\beta y\le 3\implies \beta\le 3$. How to find the value of $\alpha,\beta $  from above. Please give some hints.


Let $f:\mathbb{R}\rightarrow\bar{\mathbb{R}}$. Prove for $C(f)=\{x\in\mathbb{R} :f \text{ is continuous in }x\}$ is a $G_\delta$  Definition: $A\subset X$ is a set $G_\delta$ iff $A=\bigcap_{n=1}^\infty G_n$ where $G_n$ is a open set for all $n$.  My attempt:  We need prove $C(f)=\bigcap_{n=1}^\infty G_n$ where $G_n$ is a open set for all $n$.$  Let $x\in C(f)$ then $f$ is continuous in $x$. This implies for all neighbourhood $  V \in (\bar{\mathbb{R}},\tau_\bar{\mathbb{R}}) $ then $f^{-1}(V)$ is open.  here i'm stuck. can someone help me?

I am trying to solve this exercise from Royden's 3rd edition.     The question is as follows: Let $f$ be a real-valued function defined for all real numbers. Show that the set of points at which $f$ is continuous is a $G_{\delta}$.    Let $$A_n = \{y : \text{there is a }~\delta_y \gt 0 : |f(s)-f(t)|\lt 1/n ~ \text{whenever}~ s,t \in (y-\delta, y+\delta)\}\;.$$     Then by the definition of open sets, $A_n$ is open.     To complete the proof, I need help in showing that $f$ is continuous at say $x$ if and only if $x\in \cap A_n$.     If $f$ is continuous at $x$, the there is a $\delta \gt 0$ such that $|f(x) - f(a)| \lt 1/n$ whenever, $x\in (a-\delta, a+\delta)$. so $x \in A_n$ son it must be in $\cap A_n$.  Thanks.


If the coefficients of a quadratic equation $$ax^2+bx+c=0$$ are all odd numbers, show that the equation will not have rational solutions. I am also not sure if I should consider $c$ as a coefficient of $x^0$, suppose if I take that $c$ is also odd, then $$b^2-4ac $$ will be odd. But that $-b$(odd), in the quadratic formula will cancel out the oddness of $\sqrt{b^2-4ac}$, in case if it is a perfect square. If it's not a perfect square then the root is irrational. If I take $c$ to be even, even then the  same argument runs but we noticed that when we take $c$ odd, we get that when discriminant is perfect square, so that means the question asks for $c$ not to be an coefficient. Final question: Is this right to take $c$ as one of the coefficients of the equation $ax^2+bx=c=0$?

Que.   If the quadratic $ax^2 + bx + c$ has a rational root, and $a$, $b,$ and $c$ are integers, then A) at least one of $a, b, c$ is even B) all of $a,b,c$ are even C) at most one of $a,b,c$ is odd D) all of $a,b,c$ are odd So we can say that since the roots are of the form $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$, for it to be rational, $b^2 - 4ac$ must be a perfect square. I am not sure now how to determine the parity of the coefficients given this data.


I am trying to do the passwordless authentication for many number of servers from some of the main servers, so I wrote a script for that. But for copying keys to each the server I need to enter my password for the first time. But I am able to do this in the case of less servers but I want to do this for almost 1000 servers, so I am not ready to do this like entering the password for 1000 times.  The bad point in my case was I can't use sshpass command and expect utility for this where I don't have approval for this to install. So is there any other option to provide the password along with the ssh, also I will provide my script for automate the passwordless authentication.  adding  I want to copy the keys to many servers from my master server without entering the password manually instead of providing the password with the ssh or in script. But I cannot use the sshpass or expect commands here.  #!/bin/bash echo | ssh-keygen -P '' -t rsa  for i in `cat lists` do     cat ~/.ssh/id_rsa.pub | ssh userid@$i "mkdir -p ~/.ssh;chmod 700 ~/.ssh;cat >> ~/.ssh/authorized_keys;chmod 640 ~/.ssh/authorized_keys" done

As far as my understanding, machine(A) ssh-keygen generates a key, and ssh-copy-id gives this key to another machine (B), is it?   But when this is done, to test whether this is done or not is using the ssh like: root@A: ssh root@B  if login on B without password, then this works.   I am confused about this. A gives a key to B, why can A login on B without password? It should go like this, login on B, B ssh A without password.  Is my understanding wrong?


Apparently for no reason this process takes a lot of cpu resources and makes my mac unusable(battery drops, overheating and performance drops). I upgraded the operating system to the latest version but that didn't help. Would anyone know how to solve? Thank you.

Why are the accountsd and securityd processes using so much CPU on OS X 10.10.3? I am on a Early 2011 Macbook Pro.  What are these processes for? Is it safe to kill them? The machine has only been up 4 hours so has been rebooted recently.


I have an iPhone 7 Plus and a Macbook Pro 15" 2014. I was trying to make calls from Facetime Audio on Mac from my iPhone. My Apple ID was asked on Facetime on Mac. I entered my details and it told me that your account has been locked due to security reasons. So please enter the answer to your security questions which I don't remember. I entered twice and it greyed out this option of security questions. Now the only thing I was left with was to email myself (through Apple) the reset link so as to reset the password. But here's the bad thing that happened to me: The email that I was using with iCloud and Apple ID was my previous employers email and since I left the job, I couldn't access it anymore. So I couldn't get the reset link. Same thing happened with me on both iOS and Macbook.  Now I can't have iCloud sync between both these devices, can't download anything from the appstores on both the devices. I tried signing out of iCloud on my iPhone (and on Mac) but since my Find my iPhone(Find my Mac on Mac) was ON, it didn't let me sign out. I backed up my iPhone and tried erasing all my iPhone so that I could log in with some new Apple ID but since FInd my iPhone was ON, I couldn't erase my device either. Also tried restoring through iTunes, but all in vain since Find my iPhone was ON.  What should I do now? My Macbook and my iPhone are my primary devices and I can't live without iCloud syncing on.

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


today I was doing a simple exercise in Java and I came across a pretty simple-looking issue I don't understand. I need to calculate the smallest ammount of coins in which I can divide given change.  I decided to do it this using HashMaps, I have pasted my code below.  import java.util.Scanner; import java.util.HashMap;   public static void main(String[] args) {  Scanner input = new Scanner(System.in); HashMap<Integer, Double> coinMap = new HashMap<Integer, Double>(); int index = 1; int count = 0;  coinMap.put(1, 2.00); coinMap.put(2, 1.00); coinMap.put(3, 0.50); coinMap.put(4, 0.20); coinMap.put(5, 0.10); coinMap.put(6, 0.05); coinMap.put(7, 0.02); coinMap.put(8, 0.01);  double change = Double.parseDouble(input.nextLine());  while (change > 0.00){      while(coinMap.get(index) > change){         index++;     }     change = change - coinMap.get(index);     count++; }  System.out.println(count);   When I execute the program with an input 1.23, I get the following error  Exception in thread "main" java.lang.NullPointerException at Main.main(Main.java:28)  Process finished with exit code 1   Line 32 is the nested while loop where I use the hashMap.get() method. Why does this happen?

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


I have several symlinks to other files in a directory. I want to convert these links into independent files.  Is there a command that does this?

Is there an easy way to replace all symbolic links with the file they link to?


I am currently running some GLM's looking at different carnivore species and environmental variables. One of my variables is habitat which I have coded  from 1-6. I ran the models with Poisson, but I think I need to use a different model as it may be assuming my habitat data is continuous like my other variables. Can anybody please tell me what type of model I should be using that can account for both numerical and categorical data sets combined (if that makes sense).       glm1<-glm(Jaguar_RAI~Habitat+Dist_river+Human_RAI+Fox_RAI+     Puma_RAI + Tayra_RAI+Ocelot_RAI,family = poisson())      summary(glm1)      plot(glm1)      #now test the sig relationship with spearmans because it's non parametric      cor.test(Jaguar_RAI,Habitat,method = "spearman")

If a factor variable (e.g. gender with levels M and F) is used in the glm formula, dummy variable(s) are created, and can be found in the glm model summary along with their associated coefficients (e.g. genderM)  If, instead of relying on R to split up the factor in this way, the factor is encoded in a series of numeric 0/1 variables (e.g. genderM (1 for M, 0 for F), genderF (1 for F, 0 for M) and these variables are then used as numeric variables in the glm formula, would the coefficient result be any different?  Basically the question is: does R use a different coefficient calculation when working with factor variables versus numeric variables?  Follow-up question (possibly answered by the above): besides just the efficiency of letting R create dummy variables, is there any problem with re-coding factors as a series of numeric 0,1 variables and using those in the model instead?


Continuing a bit from above, I managed to get some systems to upgrade from Ubuntu 14 to 16.  Now, after that's done, the systems aren't able to do any subsequent upgrades.  I know this is not the latest version of the kernel on my "patching server":  root@FOO:/etc/apt# apt-get install linux-generic-lts-xenial Reading package lists... Done Building dependency tree Reading state information... Done linux-generic-lts-xenial is already the newest version (4.4.0.142.148). The following package was automatically installed and is no longer required:   libio-string-perl Use 'apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@FOO:/etc/apt#   I've done a apt-get update to make sure I'm pulling down any new lists of packages.  An apt-get upgrade after that turns up nothing to update, which is definitely not right if everything is working.  I'm going to keep troubleshooting and adding information here as I come up with anything that might be valuable.

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


Suppose a rocket is moving away from the earth with a velocity of $0.1c$. From the special theory of relativity, we know that length contraction, time dilation, and change in mass will occur. A person on the earth will observe that the time for the person in the rocket has slowed down. Now mathematically with respect to the person in rocket, time dilation should also occur for the person on the earth, why does time dilation not occur in this case? Do length contraction and change in mass occur for similar case? N.B: The special theory of relativity is new to me, so pardon me for my mistakes😅

Suppose we have two twins travelling away from each other, each twin moving at some speed $v$:    Twin $A$ observes twin $B$’s time to be dilated so his clock runs faster than twin $B$’s clock. But twin $B$ observes twin $A$’s time to be dilated so his clock runs faster than twin $A$’s clock. Each twin thinks their clock is running faster. How can this be? Isn’t this a paradox?


how to check if this converge? $$\sum_{n=1}^\infty a_n$$  $$a_n = 2\sqrt{n} - \sqrt{n-1} - \sqrt{n+1}$$  what i did is to show that:   $$a_n =2\sqrt{n} - \sqrt{n-1} - \sqrt{n+1} > 2\sqrt{n} - \sqrt{n+1} - \sqrt{n+1} = 2\sqrt{n}  - 2\sqrt{n+1} = -2({\sqrt{n+1} - \sqrt{n}}) = -2(({\sqrt{n+1} - \sqrt{n}})\frac{\sqrt{n+1} + \sqrt{n}}{\sqrt{n+1} + \sqrt{n}}) = -2\frac{1}{\sqrt{n+1} + \sqrt{n}} > -2\frac{1}{2\sqrt{n+1}} = \frac{-1}{\sqrt{n+1}} = b_n $$   and we know that: $$\sum_{n=1}^\infty b_n$$ doesnt converge cause  $$\sum_{n=1}^\infty \frac{1}{\sqrt{n}}$$ doesnt converge  so from here my conclusion is that $\sum_{n=1}^\infty a_n$ doesnt converge  but i know the final answer is that it does converge  so what am i doing wrong?

Let $a_n=2\sqrt{n}-\sqrt{n-1}-\sqrt{n+1}$. Show that $a_n>0\  \forall\  n\ge1$.   Prove or disprove: $\sum\limits_{n=1}^\infty a_n$ is convergent.     I can't show that $a_n > 0\  \forall n\ge1$. I tried using induction but it wouldn't work.  Attempt: $$ \begin{align} 2\sqrt{n}-\sqrt{n-1}-\sqrt{n+1}&=(2\sqrt{n}-(\sqrt{n-1}+\sqrt{n+1}))\cdot {2\sqrt{n}+(\sqrt{n-1}+\sqrt{n+1})\over2\sqrt{n}+(\sqrt{n-1}+\sqrt{n+1})}\\&={2n-2\sqrt{n-1}\cdot\sqrt{n+1}\over2\sqrt{n}+(\sqrt{n-1}+\sqrt{n+1})}\end{align}$$ (The calculations are true for sure. No check is desired.) Denote $$a_n=2\sqrt{n}-\sqrt{n-1}-\sqrt{n+1}={2n-2\sqrt{n-1}\cdot\sqrt{n+1}\over2\sqrt{n}+(\sqrt{n-1}+\sqrt{n+1})}\text{ and }b_n={1\over n^{2}}.$$   Then  $$\begin{align*} \lim_{n\to \infty}{a_n\over b_n} & =\lim_{n\to \infty}n^{2}{2n-2\sqrt{n-1}\cdot\sqrt{n+1}\over2\sqrt{n}+(\sqrt{n-1}+\sqrt{n+1})} \\ &=\lim_{n\to \infty}n^{2}\lim_{n\to \infty}{2n-2\sqrt{n-1}\cdot\sqrt{n+1}\over2\sqrt{n}+(\sqrt{n-1}+\sqrt{n+1})} \\ &=0 \end{align*}$$ By the comparison test for series convergence, since $\lim_{n\to \infty}{a_n\over b_n}=0$, then if $b_n$ converges, which it does, so does $a_n$.


when I want to start svn with sudo, I get this error message  sudo: svn: command not found   I recently compiled the newest subversion on my own and removed the subversion from my RedHat 7 machine. When I log as a user on my system and type svn, I get Type 'svn help' for usage., which indicates, that is could find svn.  According to  I started to investigate where the problem might be.   First, I checked my $PATH variable  echo $PATH > /usr/local/cuda-6.5/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/gradle/latest/bin:/root/bin sudo echo $PATH > /usr/local/cuda-6.5/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/gradle/latest/bin:/root/bin   No difference in output, when call these commands as user or root.  whereis svn > svn: /usr/local/bin/svn sudo whereis svn > svn: /usr/local/bin/svn   The same as with $PATH. This is somehow odd. When I type these commands, this does not help  svn > Type 'svn help' for usage. sudo svn > sudo: svn: command not found   Can anyone give me some hints, how to find the solution. I do not want to install the subversion package again, because I want to use the latest subversion and the package version is to old for my purposes.

I have a program that is installed in a custom directory under /opt. To make it easier to run it, I edited my bashrc to add said directory to my path: export PATH=$PATH:/opt/godi/bin:/opt/godi/sbin  This works fine if I want to run the program without sudo. However, if I try to run it with sudo it fails with a "command not found" error. $ sudo godi_console sudo: godi_console: command not found  Inspecting the PATH variable after using sudo reveals that its not including the same PATH I have as a normal user: $ sudo sh # echo $PATH                  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin  Why is the PATH not the same? Am I doing something wrong? I'm on Debian Jessie, if it makes a difference. One thing I tried was to invoke /opt/godi/sbin/godi_console directly, passing the absolute path to the executable. Unfortunatelly, that didn't help in this particular case because godi_console itself depends on the PATH being correctly set.


I have a mid 2015 MacBook Pro, and I want to run three external monitors - it only seems to power 2 of them. I can seem to run any combination but only two. I am powering them through 1 X thunderbolt to dvi, 1 X thunderbolt to VGA, and 1 XHDMI.    Can this be done?

I have three 24" (1920x1200) Dells that I would like to use on a single setup. With the 15" retina MacBook Pro having two Thunderbolt ports and one HDMI connector, would it be possible to connect them all up in addition to the built-in display?


I have just released my app for iOS, but I'm not sure how to make my app safe from being used by jailbrakers.   Can I do something to prevent my app working on jailbroken devices?

If I want my app to behave differently on a jailbroken iPhone, how would I go about determining this?


I have two bibliographies in my document. I am using multi bib. I displayed the two bibliographies in two separate list using the following code. But I need to customise the citations of one of them to be [S1] and the other one to be numeric citaton [1]  % arara: pdflatex % arara: bibtex: { files: [ mydoc, PS ] } % arara: makeindex % arara: pdflatex % arara: pdflatex  \documentclass{article} \usepackage{multibib} \newcites{PS}{Primary Studies}  \usepackage{url} \usepackage[utf8]{inputenc} \usepackage[english]{babel}  \usepackage[titletoc,title]{appendix} \usepackage{afterpage}  \begin{document} \section{Main body text}  reference 1 [1] primary study 1 [S1]   \bibliographystyle{IEEEtran} \bibliography{template_latex_bibliography-bib}  \begin{appendices} \section{List of Primary studies} \bibliographystylePS{IEEEtran} \bibliographyPS{mydoc-primarystudies-bib} \end{appendices}  \end{document}

I am using multibib with two bib-files. For the first one I use a numeric citation style. But for the second one I want to have [A1, A2, ...]. This works for my reference list but in my citation I still have [1, 2, ...]. How can I change this to [A1, A2,...]?  Here is my minimal document (you have to use 2 bibfiles: litA and litB)  \documentclass[a4paper,10pt,twoside,titlepage,parskip=half-]{scrartcl} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman, english]{babel} \usepackage{eso-pic} \usepackage{textcomp} %\textmu einfügen z.B. \usepackage[normalem]{ulem}     %text unterstreichen, durchstreichen usw. \usepackage[resetlabels]{multibib} \newcites{lita}{References1} \newcites{ownb}{References2} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \begin{document} \makeatletter\renewcommand{\@biblabel}[1]{[#1]}\makeatother \bibliographystylelita{plain} \bibliographylita{./literature/litA}                    \citelitd{label1}  \makeatletter\renewcommand{\@biblabel}[1]{[A\,#1]}\makeatother \bibliographystylelitb{plain} \bibliographylitb{./literature/litB}                   \end{document}


It is a hyphotetical idea. I have no intent to do this with any of my posts.    Thus, consider the following events:   I make a post. It is voted down. It gets delete votes, but not enough to be deleted. I delete it myself (consider if it is possible). Then I undelete it. Because it was my own post deleted by me, I think also this is possible.   Is it possible?  What will happen to the delete votes what the question got in (3)?

Currently, when a user self-deletes a post and subsequently undeletes it, any votes to delete or votes to close magically disappear as if they never happened. While that might make some sense if a user deleted a post to then significantly update it, it seems to make no sense in the case where nothing changed.  I would propose that if nothing happened between the delete and undelete events, the original votes on the post are reinstated.


What can be $f$ so that $f^2(x) = -x$ for all $x\in R$?  I know that if $f^2(x) = -x$ then $f(x)$ is injective and $f$ can not be continuous.  But I can not find an example of discontinuous function so that $f^2(x) = -x$ for all $x\in R$.  Can anyone help me?

I've been perusing the internet looking for interesting problems to solve. I found the following problem and have been going at it for the past 30 minutes with no success:     Find a function $f: \mathbb{R} \to \mathbb{R}$ satisfying $f(f(x)) = -x$ for all $x \in \mathbb{R}$.   I am also wondering, can we find $f$ so that is continuous?  I was thinking of letting $f$ be a periodic function, and adding half the period to x each time. I had no success with this, and am now thinking that such a function does not exist.  Source:


I was reading through some of the posts regarding reference to something "possessed" by more than one person, and I can't seem to find an agreement of the usage of of myself.  Is it correct to say the following?     The efforts of myself and my ilk.   I understand that something like:     The efforts of my ilk and I   is incorrect, but I'm not sure about the former. I know it's neither an intensive or reflexive use, so I assume that it is incorrect, but any clarification in this regard would be appreciated.  Thanks for your time.  Edit: While the usage of "myself" has been adequately explained elsewhere, I just wanted clarification for this particular usage. I've heard it used frequently, but I couldn't find a grammatical basis for it. I apologise for the lack of clarity.

I'm confused by why people use the following:     It's up to yourself.   Rather than:     It's up to you.   Another example of this would be:     Please feel free to contact ourselves if you have any problems.   Rather than:     Please feel free to contact us if you have any problems.   Are both of these correct?  Is there any reason for using the former?


I install (using the terminal setup command) Visual Studio Code.  I can run it (by clicking on the icon on the 'all programs')  but I can't find the installation path of it.    I want to run it using sudo and I need to navigate to the installation path to use the terminal and call sudo visualStudioCode and I can't find it. (Try to use the 'find', but I can't find it.)   How can I create a shortcut of this sudo visualStudioCode on the Ubuntu desktop?

I'm new to Ubuntu and would like to know where I can find the location of program files for programs installed from the Ubuntu Software Center or the Terminal.


I understand why the angular momentum along a particular axis ought to be quantized to values $m\hbar$. This is because the rotation unitary operator should return to the identity after each rotation by $2\pi$ and angular momentum (along that axis), being the generator of these rotations is also then quantized accordingly.   But why is the total orbital angular momentum $L^2$ quantized? More precisely why is it quantized to values  $l(l+1)\hbar^2$.

Probably a very simple question, but I can't find the answer on the Internet. I know nearly to nothing about quantum mechanics, but in statistical physics I'm confronted with the idea that the orbital angular momentum is quantized as $$ L = \sqrt{(n(n+1)}\hbar, $$ with $n$ being an integer.  But in the Bohr description of the hydrogen atom I was also confronted with $$L = n\hbar,$$ with $n$ being an integer, which seems to contradict the first one. (If I look for it on the Internet, it is stated that the first $L$ is the norm of the angular momentum, while the second $L$ is only the $z$-component. But I don't see how those two can be different.)  And what I'm also wondering about is, if the electron of the hydrogen atom is in ground state, which one will be its rotational momentum? And because $ \mu = \frac{eL}{2m}$, with $ \mu$ being the magnetic momentum, what will be the magnetic momentum? It seems that both formulas give different values.  I hope it's possible to give a simple (intuitive) explanation for this, because I have no experience at the moment with quantum-mechanical operators, ...


I am using Kubuntu 13.04. How to format a USB or external drive?

Using Ubuntu 11.10, how do I format an external or USB drive? I don't find an option to 'format' when I right click. In the new version, the drives don't come up on the desktop, but instead come on the Launcher.


That restaurant can't be very good.      No, it's always empty.   If the second phrase is an agreement, why is there "no", but not "yes"?  I'm thinking it's possible to use both, but "yes" seems more correct.  I didn't find enough examples to understand it.

Q: "Don't you know?"   If I really don't know, how should I respond to this question? Yes or No?  There's a similar question on EL&U, but the answer isn't clear how it works:      Also here on ELU too:      These answers are confusing. I want to know what one word answer I can use. In other words I want to know:   What will native speakers understand if I reply No to this question? What will native speakers understand if I reply Yes to this question?


When Thorin and Thranduil discuss in Mirkwood, Thranduil said: ''Do not talk to me about the dragon fire. I know what's rage and ruin!'', and shows Thorin his destroyed face for a moment, then says: ''I have faced the great snakes from the north.'' Which dragons did hurt him and when?

In The Hobbit: The Desolation of Smaug, Thranduil      angrily tells Thorin not to speak of dragon fire, then reveals a vision of half his face burned away.   The conversation implies that Thranduil has been in battle with a dragon. Considering that he leads a Silvan kingdom far to the east and south of what was once Beleriand and Angband, and there is no record of Smaug having visited the Woodland Realm, when and how could Thranduil have experienced dragon fire?


I am trying to show that $PSL(2, \Bbb{Z})\cong \Bbb{Z}_2 \ast \Bbb{Z}_3$. What I've shown is that, for $$     A=     \left(\begin{matrix}     0  & 1 \\     -1 & 0 \\     \end{matrix}\right) $$ and $$     B=     \left(\begin{matrix}     1 &  1 \\     -1 &  0 \\     \end{matrix}\right), $$  $\{A, B \}$ generates $PSL(2, \Bbb{Z})$ with $A^2=B^3=I$.   Here I can't proceed further as I don't see how to ensure that there exists no more restriction on the elements so that I can conclude that $A^2, B^3$ are the only relators and get it done.   Any help will be appreciated.  Edit:  Thanks to the comment I've become aware of the ping-pong lemma, and as it is my first application of this theorem I want my solution below to be examined if it is not flawed.  Claim: $PSL(2, \Bbb{Z})$ is the free product of $\langle{A}\rangle$=$\{I, A \}$ and $\langle{B}\rangle$=$\{I, B, B^2\}$.  proof)  Let $X=\Bbb{R}^2/\sim$ be the real plane with antipodals identified on which $PSL(2, \Bbb{Z})$ acts by the left multiplication. (Regarding each point of $X$ as a column vector.) And let $X_1$ be the 1st (and 3rd) quadrant and $X_2$ be the 2nd (and 4th) quadrant of $X$. Then $A$ maps $X_2$ into $X_1$, and both $B$ and $B^2$ map $X_1$ into $X_2$ as the image below. Hence it follows that $PSL(2, \Bbb{Z})$=$\langle{A}\rangle \ast \langle{B}\rangle$ by the ping-pong lemma.

Prove that $PSL(2,\mathbb{Z})=C_2 \star C_3$.  Now $C_2 \star C_3=\langle a,b\ |\ a^2, b^3 \rangle$ i.e. the free product.  But how do I show that presentation of $PSL(2,\mathbb{Z})$ is this?


What are the integer numbers $x$ such as $x^4+x^3+x^2+x+1$ is the square of an integer?  $0$ and $-1$ are obvious answers, but how many are there?

Integer values of $x$ for which $\bf{x^4+x^3+x^2+x+1}$ is a Perfect Square.  $\underline{\bf{My\; Try}}$:: Let $\bf{x^4+x^3+x^2+x+1 = k^2}$, where $k\in \mathbb{Z}$  $4x^4+4x^3+4x^2+4x+1 = 4k^2 = (2k)^2$  Now How can I proceed after that  Help Required,  Thanks


I have bought a new laptop and I am using blender now for a couple weeks. IS it normal that blender uses only the CPU for baking phisics? And is there a way to use the GPU for baking?

So, I have recently moved from using Blender, on my family's Nettop PC, to my personal, gaming PC. And with this move, came to option to use CUDA instead of CPU.  Which leaves the question, if I move to CUDA, does that change all computing, for like physics baking, or only for rendering?  Just a nooby question that I wanted to know, and yes, I know you can specify GPU rendering separately.


I have an Ubuntu VM on VMWare Player, on which I can't increase the virtual disk size. Earlier I built the VM with 30G size, then I used the VMWare expand 'button' to expand to 50G. Now the VMWare image shows 50G. But when I do a df -h inside the OS, I still see it as 30G.  fdisk -l shows disk as 50G, but the sda1 partition still shows 30G. How can I extend my / (everything is on /, just one partition) to the full 50G?  # fdisk -l Disk /dev/sda: 50 GiB, 53687091200 bytes, 104857600 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x0001183e  Device     Boot    Start      End  Sectors Size Id Type /dev/sda1  *        2048 58722303 58720256  28G 83 Linux /dev/sda2       58724350 62912511  4188162   2G  5 Extended /dev/sda5       58724352 62912511  4188160   2G 82 Linux swap / Solaris   Thank you.

I've read various questions/answers such as this one:        However I have an ext3 partition I need to extend that isn't part of a LVM group and never will be.  What steps do I need to take to achieve this without losing data?  I'm running CentOS 6.4 x64 (text only, no GUI/X etc) on XenServer. I've already resized the XenServer virtual disk that the partition (/dev/xvdb1) resides on (it's the only partition).


Suppose I need to mention two nouns in a phrase so that they are joined with either "and" or "or". Do I use "the/a/an" with the both of the nouns or just with the first one?

I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize?   The standard rule you always hear:     “If a person knows which item you are talking about then use "the"   . . . doesn’t clear things up for me, as I have no idea whether or not they know.


My name is Geeta. As first and last name is required to be filled in while creating a Gmail account, I typed Geeta Geeta as first and last name respectively. Please tell me how I can amend my name as Geeta, as my name is Geeta and not Geeta Geeta.

For some services it is useful to have one name in the email header. When you create an email account, Google by default does not allow to leave the name field empty.  How to leave empty last name or both in Google Mail?


I have installed Dash to dock from Ubuntu software. Every ok, but when I turn on computer, or when restart I have two dock when I go to Show Application?  I was disable ubuntu dock from extention.   I just have read  but it not solve my problem.  Edit:  is solved my problem.

What's going on here? I've installed the  on Ubuntu 17.10. Everything was cool, and as I was trying to hone and tweak the look of my desktop, at some point the shortcuts bar (dock?) on the left is duplicated.  (Click image to enlarge) The default, which normally disappears with Dash to Dock, is there underneath the one that usually shows up when I install Dash to Dock. Why? I've tried to go through the options for Dash to Dock, the GNOME Tweak Tool, and the regular Ubuntu settings, but I can't figure it out.


(Keir Starmer's entry, the UK Labour Party Leader) has the following :  Within the first few months of his tenure, Starmer upheld the decision not to prosecute the officers who had killed Jean-Charles de Menezes in a High Court appeal lodged by the family.   de Menezes was shot dead by police in 2005 after he was mistaken for a suicide bomber.  I would have expected 'de Menezes' to be capitalised to 'De Menezes' at the beginning of a sentence. Am I wrong ?

In the book, "The Crystal Shard," by R.A. Salvatore, a character is surnamed "de Bernezan." Which of the following complete sentences uses the correct English-language capitalization:   de Bernezan entered the room. De Bernezan entered the room.   The  on "de Vries" capitalized "De Vries" as a standalone, but writes "Marc de Vries" when using the full name.  Edits in response to comments:   The book starts sentences as "de Bernezan," which seems incorrect. Hence my question. The Wikipedia page is neither authoritative nor clear. It seems to refers to "De Vries" as the correct capitalization of the surname, except when actually used as a surname. Since I am not Dutch, I do not know how their names work, especially when used in an English-language context. Again, hence my question.


Is it possible to convert an article in {IEEEtran} journal from latex into a word processing file doc., or others. How to add bibtex file and figure files. There are some examples available on some webpages, but they don't work on files.  Here is some of code from my file: \documentclass[journal]{IEEEtran}  All figures are filed in different place and figure code is  \begin{figure*} \centering \includegraphics[width=.65\textwidth]{./Figures/1.pdf}  reference style is  \bibliographystyle{IEEEtran} \bibliography {ref}   I want to convert the written article in IEEEtran latex into a word processing file.

I often have to write up reports based on the analysis of some data. I use R to analyse the data and export tables, figures, and text. This is then included into a LaTeX document either using input or Sweave ().  However, when I collaborate with others, I sometimes need to provide a document in Open Office / MS Word format.  Question:  Thus, assume the simplest scenario   I have a LaTeX document with text, tables, and figures I need to export this reliably into Open Office or MS Word format: this includes mathematical formulas, table formatting, and quality figures) I don't need to go back from MS Word to LaTeX   What is a reliable, efficient, and preferably free process?  Initial Thoughts:   Export to HTML,  LaTeX - LyX - ODF Use odfWeave  that deals with some specific issues associated with LaTeX to Open Office conversion    I was hoping that there is an expert out there who has worked out a good system already.


Or maybe I don't have that iso file. How do I have it? Where can I get it?

I tried to use the usb-creator.exe from Ubuntu 10.10 desktop i386 ISO image and it does create an USB stick that doesn't boot. When I try to boot from it I get:     Operating System not found.   I try to do this from Windows 7 x64. I'm not looking to create a live Ubuntu media, only an installation USB disk.  I repeated the process several times and I even tried to reformat the USB drive (FAT32), no success yet.  The USB stick is a 8GB one.


Please help me in order to write the test class for the below lines of code: Id objUser = UserInfo.getUserId(); UserRecordAccess objRecordAccess = [Select RecordId, HasEditAccess From UserRecordAccess Where UserId =: UserInfo.getUserId() And RecordId =: objRecordId]; Note: objRecordId is an Id passed as an argument to the method

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How do I start writing my first unit test?  How do I unit test this code?  I need help writing this unit test.   Salesforce Stack Exchange looks for detailed, specific questions that the community can help you with, and can't write tests on your behalf. We feel that working with the resources below can help you get started, and we encourage you to make an attempt to write your test and return to SFSE with your specific questions when you encounter challenges you can't resolve.


I get a null pointer exception error when I run the method runSnackBar and I can't work out why. When I get this error BlueJ highlights the first line in the randomFlavour method but I have no idea why. Please help.    import java.util.Random;     import java.util.ArrayList;      public class SnackBar     {     private Random randomGenerator;      private String[] packets;      private SnackMachine newSnackMachine;      private ArrayList<Student> students;      public SnackBar(int numOfStudents, int numPackOfCrisps, int cost)     {         randomGenerator = new Random();          String[] packets = {"ready salted", "cheese and onion", "salt and vinegar" , "smokey bacon"};          newSnackMachine = new SnackMachine(numPackOfCrisps , cost);          for(int n=0 ; n < numPackOfCrisps ; n++){             newSnackMachine.addPack(new PackOfCrisps(randomFlavour()));         }         students =  new ArrayList<Student>();          for(int i=0 ; i < numOfStudents ; i++){             students.add(new Student(randomFlavour(), newSnackMachine));         }       }      private String randomFlavour()     {         int index = randomGenerator.nextInt(packets.length);         return packets[index];      }      public void describe(){         System.out.println("The SnackBar has" + students.size() + "hungry students");         System.out.println("The SnackMachine has:" + newSnackMachine.countPacks("ready salted") + "packets of ready salted crisps");         System.out.println("," + newSnackMachine.countPacks("cheese and onion") + "of cheese and onion crisps");         System.out.println("," + newSnackMachine.countPacks("salt and vinegar") + "of salt and vinegar crisps");         System.out.println("," + newSnackMachine.countPacks("smokey bacon") + "of smokey bacon crisps");      }     public void runSnackBar(int nSteps){         for( int x=1 ; x < nSteps ; x++){             System.out.println("Time step" + x);             describe();             int y = randomGenerator.nextInt(students.size());             students.get(y).snackTime();         }       } }

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


I have a website on which users can ask a question & also they can answer it.  So, when a user asks a question, it creates a new web-page on the website & below that question lies it's answers (if any).  I don't want search engines to index those pages (or questions) which doesn't have an answer, so I added a if condition, stating if the question don't have answer show the noindex meta tag, if it does, then don't show it (so that google can index now).  I was wondering if it the right way to do so?  I mean, first when the question is asked & google will crawl it, it will see the noindex tag. But after some time when it will have an answer google will see that it can be index.  So, will it affect the ranking & overall performance in google search results?

I have a website on which users can ask a question and also answer it. So, when a user asks a question, it creates a new webpage on website and below that question lies its answers.  I don't want search engines to index those pages or questions which don't have an answer, so I added an if condition stating if the question doesn't have answer show the noindex meta tag, if it does, then don't show it.  I was wondering if it is the right way to do so?  I mean, first when the question is asked and Google will crawl it, it will see the noindex tag. But after some time when it will have an answer, Google will see that it can be indexed.  Will it affect the ranking and overall performance in Google search results?


I’m trying to find the easiest and earliest way to obtain corpses magically.  My intent is to use the corpses in reanimation with the Animate Dead and Create Undead spells. Wish can pull off such a feat, but I can’t find any other spell than Wish that seems capable of accomplishing such a feat.

Back in AD&D and the d20 editions (3e, 3.5e), the ethical necromancer could obtain corpses to be animated  through several means, the most basic one would be using a couple of spells to shape stone into statues, then using stone to flesh to create corpses.  3.5 flesh to stone:     (...) The spell also can convert a mass of stone into a fleshy substance. Such flesh is inert and lacking a vital life force unless a life force or magical energy is available. (For example, this spell would turn a stone golem into a flesh golem, but an ordinary statue would become a corpse.)    This way he could build up his undead horde without killing anyone (thus the "ethical" adjective).  But there is no stone to flesh spell anymore in the 5e basic books, and I haven't found a way to create corpses without killing naturally born creatures.  Is there a RAW way for a spellcaster to obtain corpses to animate as undead without having to use the corpse of any natural born creature?   For the purpose of this question, a natural born creature is a creature whose existence was brought about without interference of the spellcaster. There is this whole debate at the wizardry academy about the torture of souls and redemption. I want to circumvent that by making magical corpses.


Is there any example of canonical exponential family distribution with a natural parameter space, that is not open? An $k$ dimensional canonical exponential family means having a p.d.f (w.r.t base measure $u(dx)$)$$\exp\{T'\eta\}c(\eta),$$ where $T\in\mathbb{R}^k$ is the sufficient statistic and $\eta$ is the natural parameter. A natural parameter space is defined as $$\Xi=\left\{\eta\in\mathbb{R}^k: \int\exp\{t'\eta\}u(dt)<\infty\right\}$$ I wonder if there is any canonical exponential family distribution having $\Xi$ being a non-open set in $\mathbb{R}^k$? By the way, this is NOT a duplicated question.

I know that the parameter space has to be convex (that I've proved using Jensen's inequality). Therefore, since it has to be a subset of $\mathbb R$, it follows that it has to be an interval or a point. Assuming that it is not a point, is it possible that the parameter space $\mathcal N$ for one-parameter exponential family distribution in canonical form, i.e. one with the following density: \begin{equation} f_\theta(x) = C(\theta)h(x)e^{\theta T(x)} \end{equation} is a closed interval?


Currently I have installed Kubuntu 14.04 native on a machine with 1TB of disk space.   Now  I have to use a program for work which is not working in Linux nor will it run in Windows inside of a VM.  Much to my regret I need to create a separate partition and install MS Windows (dual boot) just so I can run this program.  Or I will have to buy a separate Windows machine just to run this program (which I can not afford to do ) or switch this machine to a full windows only which I do not want to do.

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


I'd like to perform an estimation of a probability (bounded [0, 1]) that has several input variables and success/failure results with those values. Some of these input variables have a monotone relationship with the probability, which I would like to use as a restriction.  I found the package isotone which has the routine mregnnP, which appears to at least satisfy the monotonicity + non-negativity. However, I don't see any means to enforce the upper bound (p <= 1). Furthermore, since my training data for this probability is based on events in the form of {0, 1} (success or failure), I don't see any transformation (e.g. logarithm) to guarantee the upper/lower bound while preserving my data.  I could implement the optimization by hand, but I was hoping there might be some pre-built package that would be faster to run and require less time investment.

I have some data which I would like to smooth so that the smoothed points are monotonically decreasing. My data sharply decreases and then begins to plateau.  Here's an example using R  df <- data.frame(x=1:10, y=c(100,41,22,10,6,7,2,1,3,1)) ggplot(df, aes(x=x, y=y))+geom_line()     What's a good smoothing technique I could use?  Also, it'd be nice if I can force the 1st smoothed point to be close to my observed point.


I am looking for an option where a custom meta value will be saved when user uploads an attachment.  Lets say I need a meta key _example_meta_key and want to save meta value of this as ex087659bh (It will be a randomly generated number, I can take care of this.)  The problem is, I can't seem to find any filters to add custom meta value on upload.   There are some tutorials which shows the way to add fields in media edit form but I need this to be executed at the time of file upload.

Can anyone tell me how to auto fill/add same image title in title, caption, alt text and description while uploading any image in my WordPress Posts.