well the issue is that I use to have ~20gb free in my disk, after updating and removing around 30gb a lot of things, I still have 20gb free in the disk and still says it only has ~20gb free in reality it has over "70gb" free...   Is there a way to remove all that purgeable storage to make my disk free for real?    Adding terminal output for df -h  df -h Filesystem                          Size   Used  Avail Capacity iused      ifree %iused  Mounted on /dev/disk1                         112Gi   92Gi   20Gi    83% 1813713 4293153566    0%   / devfs                              189Ki  189Ki    0Bi   100%     654          0  100%   /dev map -hosts                           0Bi    0Bi    0Bi   100%       0          0  100%   /net map auto_home                        0Bi    0Bi    0Bi   100%       0          0  100%   /home localhost:/5I0YkoOMEg7twG3LdoPIRF  112Gi  112Gi    0Bi   100%       0          0  100%   /Volumes/MobileBackups

I cleared space on my disk by deleting files and emptying trash. But, I am unable to make use of the space that I freed up. That is, as you can see the disk reports 142 GB as Available with 83 GB of that as purgeable.    So I should have plenty of space to to copy over a 70 GB file onto the disk. Yet when I try I get an error stating "Not enough disk space to copy", like the following image shows:    How do I clear out the purgeable space to make it truly available for use?  I've tried rebooting in the hopes that a restart clears out the purgeable area, but had no change trying that.


I have the following script ,how do I remove the leading and trailing spaces for variable TAG ?  TAG=`find projectversions -build Current${BUILD} ${PROJECT}|grep ${PROJECT}`  echo "TAG  $TAG"

I have a shell script with this code:  var=`hg st -R "$path"` if [ -n "$var" ]; then     echo $var fi   But the conditional code always executes, because hg st always prints at least one newline character.   Is there a simple way to strip whitespace from $var (like trim() in )?   or   Is there a standard way of dealing with this issue?   I could use  or , but I'd like to think there is a more elegant solution to this problem.


I want to use a external hard drive (not ssd) for backup. however I have heard that because of the mechanical nature of a HDD, it needs to be powered on and spin regularly to maximize its lifespan.  The question is: If I want to optimise the lifespan of the drive, what is the longest time I can leave it turned off and still keep it "healthy"  I plan to keep off site, and visit it every 6 month. But fear that is to long.  EDIT  @karen pointed to some very good information. -thanks  In  the minimal recomendation for is      Depending on the priority of the data you've stored, you may want to refresh the hard disk more often. If it is essential data, I would recommend no less then 2 years at maximum. If you can withstand some chance of minor data loss (e.g. a few corrupted sectors here and there), go with 5 years.   This is nice to know and show that my 6 month revisit plan is fine. However I am wondering what would be best frequency to optimise the drives lifespan.

Do you guys know how much time needs to pass until the data stored on a hard drive starts to degrade?   To keep the data intact for long periods of time, I heard you need to periodically rewrite it on the hard drive, like every 5 years or so. Is it true?


So I, more or less, need help understanding this problem.   The first thing I have tried is to pick a specific group: $\mathbf{Z}_5$, under multiplication.  To demonstrate, say we pick element $2$ and $|2| = 4$, and then the only other possible orders are $\{1,4\}$.   Indeed, $4 = LCM(1,4)$.  Not really quite sure, how to generalize this, yet. Any hints? What shall I think about? Definitely prime factorization of each element, hmm... I think!

I will quote a question from my textbook, to prevent misinterpretation:     Let $G$ be a finite abelian group and let $m$ be the least common multiple of the orders of its elements. Prove that $G$ contains an element of order $m$.   I figured that, if $|G|=n$, then I should interpret the part with the least common multiple as $lcm(|x_1|,\dots,|x_n|)=m$, where $x_i\in G$ for $0\leq i\leq n$, thus, for all such $x_i$, $\exists a_i\in\mathbb{N}$ such that $m=|x_i|a_i$. I guess I should use the fact that $|x_i|$ divides $|G|$, so $\exists k\in \mathbb{N}$ such that $|G|=k|x_i|$ for all $x_i\in G$. I'm not really sure how to go from here, in particular how I should use the fact that $G$ is abelian.


I am trying to regress the death rate for a particular cause of death for 25-30 year olds. My dependent variable of interest is the crude rate, i.e., y = number of deaths of 25-30 year olds/number of people 25-30 year old in a county. If I were to run this as a Poisson regression, would I run this on the count of deaths of 25-30 year olds (the numerator) on my regressors, and include the log of the denominator (number of people 25-30) as a regressor as an offset? Is the idea thinking of the link function, let deaths = number of  25-30 year olds dying from the cause, and n = the number of 25-30 year olds \begin{align}  \newcommand{\deaths}{{\rm deaths}} \frac{\deaths}{n} &= e^{x'\beta}  \\[5pt] \deaths   &= ne^{x'\beta}  \\[5pt] \deaths   &= e^{x'\beta + \ln(n)} \end{align} and this last equation is Poisson link function?

I recently discovered how to model exposures over time using the log of (e.g.) time as an offset in a Poisson regression.  I understood that the offset corresponds to having time as covariate with coefficient 1.  I'd like to better understand the difference between using time as an offset or as a normal covariate (therefore estimating the coefficient). In which situation should I want to use one method or the other?  UPGRADE: I don't know if it is interesting, but I ran a validation of the two methods using randomly split data repeated 500 times and I noticed that using the offset method leads to a larger test error.


I know this question has been asked before in one form or another, but those answers didn't solve my issue.   I'm using QGIS 2.14.0 and trying to upload lat/lon coordinates from a csv file. When I drag the file into the QGIS window it loads up the attribute table perfectly, but will not show any of my points. When I try to upload the csv file manually (layer->add delimited text layer etc) and check off the correct stuff (csv, first record has field names, point coordinates) it says there's no data in the file while simultaneously combining different cells together; for example, it keeps xlat as a heading, but then combines my ylon with the location name for the first point. So like I said, dragging and dropping it into QGIS loads up the data correctly on the attribute table, but still won't show my points. I'm completely at a loss.  An important note: when I load the csv file into ArcGIS, the points come up perfectly,  but for the purposes I need these points for, I need to use QGIS and its plugins.  This is a sample within the csv file:  location xlat ylon 2ndary sc -3.9115 35.78992 nd water -3.91238 35.78988 lily pond -3.91587 35.78909 old pump -3.91706 35.7888 drk pump -3.91691 35.78885 fatuma s -3.90755 35.81442 kaku shop-3.90756 35.81433 parts shop-3.90743 35.81444 aquilina h -3.90785 35.81469 diana hou-3.90909 35.81462 traffic sur -3.90654 35.81398 goat wo -3.90938 35.81441 lucian ho -3.91062 35.81454 lucas hou -3.87172 35.82846

I am trying to import a CSV file into QGIS, but it ends up looking like my print screen below (program is in Swedish but in the preview window you can see how QGIS won't read my data correctly). I can't load the data since for some reason, QGIS reads my CSV table columns as one single row. What is wrong? I want QGIS to read my data as numbers, so I have created an additional csvt-file with the code "String","String","Integer". Is there something else that I need to to in order for QGIS to read the third column as numbers?      Still, after doing that it loos like this...


I am very new to Blender 2.8. I know that hotkey like G, R and S are essential and very useful but I can't do any of them in object mode. I can only move the origin (the orange thing that for the object) freely.  I have a MacBook and use a mouse.  I tried looking at transformation locks too but that wasn't the problem.  Did I click on a weird setting?  Any help much appreciated!

So I have somehow turned this on and I dont know how to turn it off again, the gizmo that usually moves an object is now moving a bigger version of itself, and I dont know how to change it back


Now that the close system is a lot more user friendly and encourages people to edit their questions, I feel like reviewers are missing a crucial option.  When a question has been put on hold, say for "unclear what you are asking", the user may provide more information that clarifies but means that the question is invalid for another reason. When reviewing the request to open, I'm only given the option to leave closed, which presumably gives the impression that the question is still not clear enough, whereas what I actually want to say is that it is off topic or similar.  Related discussion:

I have been through a few re-open requests and some shared a similar issue.  Like   It was originally closed as unclear. Then the OP changes the question but his edit still makes it a very poor question with no research shown and the answer could be as simple as yes or no - only if the question didn't get closed.  I judge looking at the new(revised) question ignoring the original closure reason. Even though the revised question still doesn't make a good question and would probably get closed very quickly I just leave it closed with the old closure reason.    Am I doing the right thing or should we re-open and let it get closed for a new - more appropriate reason?   The answer seems obvious: leave it closed, but    is this how all of you process re-open queue?   Note: I am asking because sometimes I've noticed others voting to re-open such cases and I want to confirm that I am on the same page as everyone else


I'm trying to prove that the closed unit ball in the Holder space, $B^\alpha=\{ f\in C^\alpha[a,b]:\|f\|_\alpha\leq1\}$, is compact in $(C[a,b],\|\cdot\|_\infty)$. I know I should use Arzela-Ascoli Theorem and show that the ball is bounded, equicontinuous and closed. For the closedness part of the proof, I take a convergent sequence $f_n$ in $B^\alpha$ and want to show that it converges to a point $f$ in the ball. Since the sequence is convergent, for every $\epsilon>0$, there exists an $N$ s.t. $$\epsilon>\|f_n-f\|_\infty\geq |f_n(x)-f(x)|\geq |f(x)|-|f_n(x)|$$ for every $x$ in the domain and $N>n$.  I'm stuck here! How do I proceed?

Let $(C[a, b], \|\cdot\|_\infty)$ be the usual Banach space of continuous functions on $[a, b]$ and for $\alpha\in(0,1]$ and $f\in C[a, b]$ define $$ [f]_\alpha = \sup_{x,y\in[a,b];x\neq y}\frac{|f(x)-f(y)|}{|x - y|^\alpha} $$ Let $C^\alpha[a, b]$ be the set of functions $f$ in $C[a, b]$ for which $[f]_\alpha < \infty$, and endow $C^\alpha[a, b]$ with the norm $$ \|f\|_\alpha = \|f\|_\infty + [f]_\alpha $$ It is known that $(C^\alpha[a, b], \|\cdot\|_\alpha)$ is a Banach space.  I've been asked to show that the unit ball $B^\alpha := \{f\in C^\alpha[a, b]\ :\ \|f\|_\alpha\le 1\}$ is compact in $(C[a, b], \|\cdot\|)$. Not just precompact, but compact. I've already shown that it's precompact using Arzela-Ascoli, so all that's left is to show that $B^\alpha$ is closed in $(C[a, b], \|\cdot\|_\infty)$.  Suppose $f_n\in B^\alpha$ converges wrt $\|\cdot\|_\infty$ to $f\in C[a, b]$. We know that $\|f_n\|_\alpha \le 1$, and hence $\|f_n\|_\infty \le \|f_n\|_\alpha \le 1$. We can use this to show that $\|f\|_\infty \le 1$ as well. What can we do to show $\|f\|_\alpha\le 1$? This would show that $B^\alpha$ contains its $\|\cdot\|_\infty$-limit points, and hence is closed.


I'm trying to build a regular expression that accepts up to 3 whole numbers and up to two decimals   ^\d{1,3}(\.\d{1,2})?   But whenever I run RegExp.test() on javascript is not returning me the the expected results  Among the valid values should be something like  1, 5.9, 19, 34.23, 146, 345.2, 234.45,   Invalid values should be something like  12.345, 1267.23, 6578, 1.783

How can I test if a RegEx matches a string exactly?  var r = /a/; r.test("a"); // returns true r.test("ba"); // returns true testExact(r, "ba"); // should return false testExact(r, "a"); // should return true


I heard that charging a Li-Ion battery all the time is practically harmful for the battery and significantly reduces its useful capacity over time. Is this true? Should I disconnect the power cord from my laptop every time it isn't used for a long period of time, for example, at night?  If the answer is yes, does it apply to only bigger batteries or to smaller ones (for example, cellphone, tablet) too?

When I'm at home, is it better to use the laptop plugged into AC power, or with just the battery, for the overall battery life?


I'm a software engineer and I need to write a class that will hold code common to a Film class and a Series class. I need to name this class with a hypernym for both.  For the moment, the solution we have found is AudioVisualEntity, but we are not very happy with it. Is there a better term?  To help clarify things, here are the properties this class will hold :   originalTitle title audioLanguages countries colorType images videos synopsis productionYear shortSynopsis releaseDates contentClassification averageRating genres themes budget catchPhrase altId slug   Here is what the Film class adds:   type : FilmType(long or short film) duration   Here is what the Series class adds:   type : SeriesType seasons episodes

What is the hypernym for movie and TV series? I read that medium might be possible, but it doesn't sound that good.


I meet a problem saying "random variables $X,Y$ are independent iff the characteristic function of $X+Y$ is equal to the product of characteristic functions of $X$ and $Y$." It is not hard to the the forward direction is true. I wonder how could we show the backward?

Let $X$ and $Y$ be real-valued random variables defined on the same space.  Let's use $\phi_X$ to denote the characteristic function of $X$.  If $\phi_{X+Y}=\phi_X\phi_Y$ then must $X$ and $Y$ be independent?


My question is how to achieve this effect in LaTeX? I tried various combinations of \right and \left but it does not work.    EDIT   Adding the code:       $[introduces]m$ = $\left[      o_1 = \left\lbrack[o_1      \newline     o_2     o_3] \right\rbrack     o_2 = \lbrack \rbrack     \right]$

I would like to draw a matrix with top left, top right, bottom left and bottom right blocks. The top left should be a 3x3 matrix with numerical entries, the top right is 0, the bottom left is 0 and the bottom right is just a "single" entry uJ. Here is my attempt.    $ \left[ \begin{array}{c|c} [\begin{array{c|c|c} 0 & 0 & 2\mathrm tr(MM^{*}) \\ 0 & 0 & -ua \\ u & -ua & 0 \end{array}]     &  0\\ \hline 0 & uJ  \end{array}\right]. $    I would like to emphasize that the non-top-left entries are not just single entries, but blocks, so I do not want to just make a 4 by 4 matrix with vlines and hlines and additional 0's.


When I try to use  method, it shows an error Method was removed after version 45.0: isCurrentUserLicensed. If I change the API version of the class to v45 it works fine.  Is there a replacement for this method in v46?   Couldn't find any mention in .  The code that gives an error when saved as v46,  public Class foo {     public Boolean bar(String license){         return UserInfo.isCurrentUserLicensed(license);     } }     The same code that is saved as v45

Our team had met a problem that when we update the API version to 46, the UserInfo.isCurrentUserLicensed method seems missing. We have reported an issue on the developer forums.   And I'd like to post it here to see whether or not other guys face the same issue with us.  Thansk


How can I update my Ubuntu version (11.04) to the latest version without any disks/USB drives?  I am currently running 11.04 (Just installed it) and I cannot download any programs which is the main thing I do with my computer, so I would like to update so I can do so.  How may I be able to do this?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I want to downgrade ubuntu 13.10 to ubuntu 12.04 LTS without losing the installed apps and my files in the ubuntu folders.

I just installed a new version of Ubuntu and I want to roll it back to the previous version.  How can I do that? Is that even possible?


I am using biblatex + biber and some of my citations only have the first author listed, followed by et al. I would like to make all my references include all names no matter what. My current settings are  \usepackage[ abbreviate=false, backend=biber, backref=true, refsection=chapter, sortcites=true, sorting=nyt, sortlocale=en_US, style=numeric-verb ]{biblatex}   But I am still getting references like Meijaard et al. in my bibliography. How can I force the names to be presented without abbreviation? abbreviate=false apparently does not do it.  The citation entry for this specific example is:  @article{Meijaard2007, author = {Meijaard, Jaap P. and Papadopoulos, Jeremy M. and Ruina, Andy and Schwab, Arend L.}, journal = {Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences}, month = aug, number = {2084}, pages = {1955--1982}, title = {{Linearized dynamics equations for the balance and steer of a bicycle:     a benchmark and review}}, volume = {463}, year = {2007} }   Any ideas?

I'm trying to set maxnames in my biber option, but it doesn't work.  I don't really understand what I'm doing wrong.  My MWE is:  \documentclass[12pt,a4paper,german]{scrartcl} \setkomafont{section}{\large}  \usepackage[utf8]{inputenc} \usepackage{geometry} \geometry{verbose,a4paper,tmargin=25mm,bmargin=25mm,lmargin=30mm,rmargin=30mm} \usepackage[bibstyle=authortitle,citestyle=authoryear,backend=biber]{biblatex} \addbibresource{paul.bib} \usepackage[german]{babel} \usepackage{txfonts} %Schriftart Times New Roman  \begin{document}  foobar\cite{pisae2003}    \printbibliography \end{document}   my paul.bib:  @ARTICLE{pisae2003,    author = {{Prenzel, Manfred and Baumert, Jürgen and Blum,Werner and Lehmann, Rainer and Leutner, Detlev and Neubrand,Michael and Pekrun,Reinhard Rost,Jürgen and Schiefele, Ulrich}},    title = {PISA-2003},    subtitle = {Ergebnisse des zweiten Ländervergleichs. Zusammenfassung},    url = {http://pisa.ipn.uni-kiel.de/PISA2003_E_Zusammenfassung.pdf},    lastchecked = {20.\,März.\,2013},    year = 2005,}


I am a Europen Union member and I applied for my brother to accompany me to the UK. He was granted an a visa to accompany to the UK and before the UK left the EU, I applied for settlement. I now live in the UK, can my brother come to the UK alone without me having to travelling from where he was to the UK? He is not a minor.

I have an accompanied visa with my grandparents but because of some reason they cannot travel with me. I am above 17 years. Can I travel alone and will I be allowed to enter UK as my real aunt puts up there?


How can I draw 2 separated lines in the same line, and  write centered text  below them? I tried with this code \begin{flushleft} \rule{7cm}{.01cm}  Name 1 \end{flushleft}  \hspace{1cm}   \begin{flushright} \rule{7cm}{.01cm} Name 2 \end{flushright}  But the output was incorrect because  The lines were drawn in separated lines (and there was enough space to be drawn both in the same line)  The text below them wasn't centered but moved to the left and right, respectively   Can someone please help? Thanks in advance

I'm trying to create a signature and date line in a document.  I need the date line to always be in the same spot on the page no matter what name is under the signature line, such as:  ----------------------   ---------------------- Representative           Date  ----------------------   ---------------------- Program Manager          Date   Here is the code I currently have:  \makebox[2.5in]{\hrulefill} \hspace {1.0in}\makebox[2.5in]{\hrulefill} \\ User Representative \makebox[2.5in][r]{Date} \\  \vspace{.2in} \makebox[2.5in]{\hrulefill} \hspace {1.0in}\makebox[2.5in]{\hrulefill} \\ Program Manager \makebox[2.5in][r]{Date} \   I want to be able to change the names, such as change Program Manager to Joe Foo and have the word 'Date' stay in the exact place.  Any help would be greatly appreciated.  I'm still a newbie at TeX so please forgive my ignorance.


I'm flying for the first time to US with a passport. Until this day I always gave my first and last (João Martins - my full name is João Francisco Carvalho Andrade Martins) name for European flights and everything went great. While booking a flight to the US, I did the same, but I don't know if I should've done that.  My passport shows:     GIVEN NAMES: Joao Francisco      SURNAME: Carvalho Andrade Martins   But I just bought the tickets only with "Joao Martins". Am I in trouble?

In my passport, my name is Firstname middlename1 middlename2 lastname, and in the ticket is LASTNAME/FIRSTNAME MR.  Will be a problem? I'll travel from Brazil to Bali, Indonesia and according to the agency I bought the ticket from, there's no problem and it's common.  The airline is Qatar Airlines and I have looked , which says that the passenger name can't be changed after the booking has finished.  But I don't know if it is a problem.


i want to write Algorithm code in IET journal latex format. I am getting error as it is occured in the attached picture...Please solve this issue .. thanks in advance  this is the Algorithm code...  \begin{algorithm}[t] \caption{Saqib Qamar}  \label{algo1}  \textbf{Function} ADDING(M,W,c,k)\;   $i \leftarrow Mod(logM,c)$\; \If { $j \textgreater 2^i$ $\times$  $\lceil{\frac{k-0.5}{2}}\rceil$ }  { $ i \leftarrow i-2^k$\;  }  \textbf{end if}\; \textbf{return} $Add(c^k , c^j)$\;  \textbf{end Function}\;  \end{algorithm}

I'm writing a report, and have a rather large table in my appendix. I'd like to emphasize some specific values by coloring some single cells. I'm trying to do it with xcolor. But receiving the error:  ! LaTeX Error: Option clash for package xcolor. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... l.17 The package xcolor has already been loaded with options: [] There has now been an attempt to load it with options [table]   My preamble looks as follows  \documentclass[a4paper,oneside,article]{memoir} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[danish]{babel} \usepackage{lmodern} \usepackage{graphicx}     \graphicspath{{Figures/}} \usepackage{fullpage} \usepackage{modroman} \usepackage{float} \usepackage{caption} \usepackage[numbers]{natbib} \usepackage{url} \usepackage{pgfplots} \usepackage{mathtools} \usepackage[table]{xcolor}   And take out of my table  \begin{table}  \centering   \begin{tabular}{|c|c|c|}        \hline    \cellcolor{green!25}D & x & D/$L_0$ \\        \hline    65 & 2600 & 0,417\\        \hline    60 & 2400 & 0,385\\   \end{tabular}  \caption{Bestemmelse af bølgehøjde}  \label{tab:Q1} \end{table}   Read some other questions asking more or less the same. And the answer to them seems to be a "collision" between packages. I have no idea how to find the problem. So my question is:   Where is the "collision"? How on earth would I have found it without help ?


On OS X, you can empty your trash securely, how would one do that in Ubuntu Desktop 14.04, or isn't it needed?  Thank you in advance!

Is there a way to make sure that a deleted file can not be recovered?   As you know, deleting a file by pressing shift-del or using trash doesn't mean that file is gone forever. It resides somewhere in the computer.  In day to day life, law enforcement or thieves use recovery programs to reveal our private data or something else.   They can recover all data that resides on hard disk, in RAM, and even USB.  To protect us from these people, what should one do? Which program should one use?  Note: I don't want an answer like first use a recovery program then erase that file with shred. With just one program, I want to erase all unused/deleted files on my computer.


I have a  which gives me the output of 12V and 3.3A, I want to connect it to a device which requires 12V and a few hundred milli amps, would this damage the device? or any device would automatically draw the current it needs and not anymore ?  If it matters the device is a display driver. .  Please, Help me understand the basics of current draw.

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I try to multiply an integer by a double but I obtain a wrong result. In my example the result of v * decimals is 11.9999999999... instead of 12 although when I print it using cout it shows 12 (I see the value using gdb), then static_cast set 11 in uint64_t a. Why does this happen? What is the correct way to multiply an integer and a double?   #include <iostream>  int main(int argc, char *argv[]) {     const uint64_t decimals = 100000000;     double v = 0.00000012;     uint64_t a = 0;      std::cout << "Initial value=" << v << std::endl;     v = v * decimals;     std::cout << "v * decimals=" << v << std::endl;     a = static_cast<uint64_t>(v);     std::cout << "a=" << a << std::endl;      return 0; }   output:  Initial value=1.2e-07 v * decimals=12 a=11

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


When click pic directly from app it's crash from this lines. this problem is getting only on Android 11, working fine on other devices Errors: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.isMutable()' on a null object reference at com.my.collegemaker.collagelib.Utility.decodeFile(Utility.java:115) at com.my.collegemaker.collagelib.CollageActivity$BitmapWorkerTask.doInBackground(CollageActivity.java:262) at com.my.collegemaker.collagelib.CollageActivity$BitmapWorkerTask.doInBackground(CollageActivity.java:227) @SuppressLint({"NewApi"}) public static Bitmap decodeFile(String path, int requiredSize, boolean isScrapBook) {     try {         File f = new File(path);         Options boundsOption = new Options();         boundsOption.inJustDecodeBounds = true;         BitmapFactory.decodeStream(new FileInputStream(f), null, boundsOption);         Options o2 = new Options();         if (isScrapBook) {             o2.inMutable = true;         }         o2.inSampleSize = calculateInSampleSize(boundsOption, requiredSize, requiredSize);         Bitmap bitmap = BitmapFactory.decodeStream(new FileInputStream(f), null, o2);         ExifInterface exif = null;         try {             exif = new ExifInterface(path);         } catch (IOException e) {             e.printStackTrace();         }         bitmap = rotateImage(bitmap, exif.getAttributeInt("Orientation", 0));         if (bitmap.isMutable()) {             return bitmap;         }         Bitmap mutableBitmap = bitmap.copy(Config.ARGB_8888, true);         if (mutableBitmap != bitmap) {             bitmap.recycle();         }         return mutableBitmap;     } catch (FileNotFoundException e2) {         return null;     } }  App Crash On This Line bitmap = rotateImage(bitmap, exif.getAttributeInt("Orientation", 0));         if (bitmap.isMutable()) {             return bitmap;

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 am not getting even an intuition as how to solve this problem. Please help me with a solution.  Let $n$ be a positive integer and $F$ a field. Let $W$ be the set of all vectors $(x_1, \dots , x_n)$ in $F^n$ such that $x_1+\dots +x_n =0$.  $1)$ Prove that $W^0$ (annihilator of $W$) consist of all linear functionals $f$ of the form $$f(x_1, \dots , x_n) = c \sum _{j=1}^n x_j.$$  $2)$ Show that the dual space $W^*$ of $W$ can be naturally identified with the linear functionals of the form $$f(x_1, \dots , x_n) =c_1x_1 +\dots +c_nx_n$$ on $F^n$ which  satisfy $c_1+\dots +c_n=0$.

I am self-studying  Hoffman and Kunze's book Linear Algebra. This is exercise $1$ from page $111$.  If $W$ is a subset of a vector space $V$, we define $W^{0}=\{f\in V^{\star}|f(w)=0 \operatorname{for all}w\in W\}.$     Let $n$ be a positive integer and $\mathbb{F}$ be a field. Let $W$ be   a set of all vectors $(x_{1},\ldots,x_{n})$ in $\mathbb{F}^{n}$ such   that $x_{1}+\cdots+x_{n}=0$.      a) Prove that $W^{0}$ consists of all linear functionals $f$ of the   form $$f(x_{1},\ldots,x_{n})=c(\sum_{j=1}^{n}x_{j}).$$      b) Show that the dual space $W^{\star}$ of $W$ can be "naturally"   identified with the linear functionals   $$f(x_{1},\ldots,x_{n})=c_{1}x_{1}+\cdots+c_{n}x_{n}$$ on   $\mathbb{F}^{n}$ which satisfy $c_{1}+\cdots+c_{n}=0$.   My approach for part a) First, we note that $e_{i}-e_{j}\in W$ for all $i,j\in\{1,2,\ldots,n\}$. If $f\in W^{0},$ then we have $f(e_{i})-f(e_{j})=f(e_{i}-e_{j})=0.$ Therefore $f(e_{i})=f(e_{j})$ and we have $f(e_{i})=c$, for all $i\in \{1,2,\ldots,n\}$, where $c$ is a constant. Therefore, if $w=(x_{1},\ldots,x_{n})\in W$, then $f(x_{1},\ldots,x_{n})=c(\sum_{j=1}^{n}x_{j}).$ The converse is easy.   I was not able to solve the part b).


Let $k, n \in \mathbb{Z}$.   How can I find a solution for this problem?  Also, where are some resources to solve a similar problem? I came across this question when attempting to find a solution to $2^n \equiv 0 \mod 12$.

Why is it that $\forall n \in N$, $2^n$ is not divisible by $3$?  I can prove it easily by induction, but I don't understand the intuition of why this is true. Could anyone please supply the intuition? [This has been answered.]  Moreover, I understand that there's also a proof of this fact that uses modular arithmetic. How does this proof go? [Also answered - it follows immediately from the definition of the modulus operation.]


I have this code: A 3X3 matrix of zeros When i set '5' to the 0,0 element of the matrix, the entire columns is set to '5' i tried to debug it but i can't  p = [[0]*3]*3 p[0][0] = 5 for i in p:     print(i)  #prints: #[5, 0, 0] #[5, 0, 0] #[5, 0, 0]

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?


How would I create something like either of the following on LaTeX?

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


I will use in many places in my LaTeX document a specific value given in, say, the row 2 and column 1 from a table. Is it possible to make a macro for it, such as \read{2}{1} ?  Here is an simple example of a table, from which I want to read the value 22.     \begin{filecontents}{testdata.dat}       height 20       length 21       depth 22     \end{filecontents}

Let's say I have a bunch of data, like so:  1,15,53 5,74,12 74,23,66   It doesn't really matter how I store the data. I could put it in text form within my .tex file or I could store it in an external .csv file.  Now, I would like to fetch single data points within my tikz code. So, for example, let's say I wanted to use the data point at row 2, column 0 (which, in this case, is the number 74). My code would then look something like this:  \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}     \node[draw] at (0,\dataPointAtRow2Column0) {test}; \end{tikzpicture}   Is there something I could write instead of \dataPointAtRow2Column0 to make tikz draw a node at (0,74)?  Note that I'm not looking for a solution like . I do not want to rewrite my code using \pgfplots.


Does anyone know how to make a triangular or hexagonal lattice diagram in latex with bold black path of our choice and midedges marked? I have attached a picture for what i exactly need. Can we make it in ipe software. Kindly let me know a code for latex or how to make it in ipe if you have ever used one.

I am facing difficulties in drawing the following diagram in latex :-  I need to draw it in the same orientation but bold edges and mid points of my choice.


I hit the rep-cap today (+230, including 2 checkmarks, no bounties), and then I answered an interesting question that I couldn't help but answer anyway. As "lost rep" from the upvotes started accumulating, a thought occurred to me:     If I delete this answer now, and un-delete it after midnight UTC, would I get the upvotes back?   I don't want to try it because I feel like it would be somewhat "gaming the system" and at the end of the day it's just +20 (well, at the time of this writing), but I really honestly wonder, how would that be handled by the system?       Possibility 1   My daily rep goes to +210 upon deleting; the two upvotes that didn't count upwards suddenly count downwards. That'd be somewhat awkward, but I'd understand. Midnight UTC I un-delete the answer and get the +20 back. Net change: 0.       Possibility 2   My daily rep doesn't move upon deleting, because the two upvotes didn't count upwards and won't count downwards. Midnight UTC I un-delete the answer and get a free +20. Net change: +20, and I just gamed the rep-cap.    How does that actually work?

Suppose you've hit the daily rep limit with two answers, each earning you 10 upvotes (so, 100 rep from each). Say, you delete one of those two posts, and then the remaining one gets 10 more upvotes. Then, tomorrow, you undelete the one with the +100. Would you get back that +100? If so, you've effectively received 300 points yesterday. Anybody ever tried this or heard about it? I know I'm not the first person to think of this...  p.s. I'm a regular poster on the statistics stackexchange, which is a relatively low-key site, so it's not easy to reach the daily rep limit, so I wouldn't be worried about stapling 100 points onto another day and potentially pushing myself over the limit on that day.


I took this photo at a wedding using an iPhone 7 Plus, and I noticed these wispy white lines most noticeably around the trees and clouds. All the other photos from the same vantage point and time did not have these wisps. What is the cause of these artifacts so can I avoid them in the future?

I recently bought an LG G4, whose camera can shoot in an auto and both manual mode (I can manually set the iso, aperture). I shoot 100% of the time in auto.  It takes better than average photos at night but when in Seville one night the photos it took were a disaster. Please see this example:    I find the background lighting was captured very well, but the light sources totally screwed up the photo.   Why is this happening? The lens was clean.  What can I do to improve the quality of the future photos in this situation?  Attached 2 other photos taken before and after this problematic one (couple of hours distance). They seem fairly in the same conditions (direct light) yet the photos are decent.


i installed Zend Studio-5.5.0 in ubuntu 13.04. but when i try to open it from bin folder it is not open. every time it open as a text editor.

When I double-click on a script in Nautilus in order to run it, the script opens in my text editor with no option to do so.  Using Nautilus, how do I run executable text files and/or scripts?


I have to chunk a command string into params array:  String mystr="myexe.exe param1 param2 param3";   I expect this result:  String[] params={"myexe.exe","param1","param2","param3"};   So far so good, I can simply use a string split by space char " ".  How to do it if params has space chars? How to manage double quoted params?  String mystr="myexe.exe param1 \"param2 with spaces\" param3";   I expect this result:  String[] params={"myexe.exe","param1","param2 with spaces","param3"};

I'm new to regular expressions and would appreciate your help.  I'm trying to put together an expression that will split the example string using all spaces that are not surrounded by single or double quotes. My last attempt looks like this: (?!") and isn't quite working. It's splitting on the space before the quote.  Example input:   This is a string that "will be" highlighted when your 'regular expression' matches something.   Desired output:  This is a string that will be highlighted when your regular expression matches something.   Note that "will be" and 'regular expression' retain the space between the words.


Arya's killing list included Ilyn Payne, the king's torturer and executor. All of the rest of the names she had in the list      have found their deaths in one way or another, but he dissapeared.   Was it mentioned anywhere if he died or not?

Ser Ilyn Payne is still alive and Arya stopped mentioning him in her death list; after all he was the one who beheaded Ned Stark in the first place. So why has he fallen off her list?


I upgraded my system from Ubuntu 16.04 to 18.04 then to 19.04, but it still looks like the 16.04 version:   What should I do to make it look like the 19.04?

I do not get the Activities icon on bottom left instead Trash icon is fixed and the Settings are not able to change my dock but System Settings do change it. What is happening here?    I installed Ubuntu 16.04 from a USB and then upgraded to Ubuntu 18.04. These settings do nothing:  but these do work:   Also notice the Trash icon on bottom left, I was trying to follow articles on GNOME in Ubuntu 18.04 which have Activities icon instead.


Since Average acceleration is defined as, Average acceleration over a period of time is the change in Velocity divided by the Duration of the Period.  Does Light (EM Wave) undergo acceleration during reflection from mirror or any other surface?

When a photon of light hits a mirror does the exact same photon of light bounce back or is it absorbed then one with the same properties emitted? If the same one is bounced back does it's velocity take all values on $[-c,c]$ or does it just jump from $c$ to $-c$ when it hits the mirror?  Or, is the phenomenon of a mirror better explained using a wave analogy? If so, what is this explanation?


If $m > 1$, $m \mid (m-1)! + 1$, then we can get the conclusion that $m$ is a prime number. But if we have a prime number $p$, can I get $p \mid (p-1)! + 1$? (I verify it when $p < 100000$, and there's no errors.)  In other words, can $m \mid (m-1)!+1$ generates all prime numbers?

I'm trying to understand this proof from Stein's Elementary Number Theory, and I understand the pairing of inverses but not the other direction. I have two questions:  $1).$ When the proof says, $l$ a prime divisor of $p$, and so $l<p$ and $l \mid (p-1)!$, is this because $l \mid p \Rightarrow l \mid p!=p*(p-1)!$ and so $l \mid (p-1)!$ (by Euclid)?  $2.)$ Why is it that $p \mid ((p-1)!+1)$?


If a wizard 4/warlock 2 were to cast Shield using a warlock spell slot. Would the character regain the ability to cast it again on a long rest or short?

If you multiclass a Warlock and a Sorcerer, then you have a character with both the Spellcasting and Pact Magic features.  PHB Page 101, Sorcerer, Spellcasting, Spell Slots:     You regain all expended spell slots when you finish a long rest.   PHB Page 107, Warlock, Pact Magic, Spell Slots:     You regain all expended spell slots when you finish a short or long rest.   PHB Page 165, Customization Options, Multiclassing, Class Features:     Pact Magic. If you have both the Spellcasting class feature and the Pact Magic class feature from the warlock class, you can use the spell slots you gain from the Pact Magic feature to cast spells you know or have prepared from classes with the Spellcasting class feature, and you can use the spell slots you gain from the Spellcasting class feature to cast warlock spells you know.   Do the spell slots keep their previous method of recovery (sorcerer slots long rest, warlock slots any rest), or do they all act consistently as I am led to believe from the language of the multiclass section? Do they all recover only from long rests as per the sorcerer feature, or can they all be recovered with a short rest because the warlock feature says so?


I'm using ASP.NET 2008 to create an web application with login page "Login.aspx". In that I've use  control. Inside that I've created a table structure to place the controls and in that I've place username and password textboxes.  <asp:Login ID="LoginUser" LoginButtonStyle-CssClass="CommonButton" runat="server"      OnLoggedIn="LoginUser_LoggedIn" OnLoginError="LoginUser_Error" TitleText=""      Width="100%" DisplayRememberMe="true" OnLoggingIn="LoginUser_LoggingIn">

                           <asp:TextBox ID="UserName" runat="server" autocomplete="off" CssClass="CommonTextBox" Width="325" TextMode="SingleLine"></asp:TextBox>

                           <asp:TextBox ID="Password" runat="server" autocomplete="off"  CssClass="CommonTextBox" Width="325" TextMode="Password"></asp:TextBox>

 </asp:Login>   Now when I enter username and password, the browser prompts for save password. But I don't need that prompt.  I'm not using any HTML controls. Its all ASP.NET controls.  How to prevent browser from prompt..?  I've used everything that was already answered. But nothing worked for me. That's why Ive asked newly. I searched for many possible ways, and all failed. This is not a duplicate one.

One of the joys of working for a government healthcare agency is having to deal with all of the paranoia around dealing with PHI (Protected Health Information). Don't get me wrong, I'm all for doing everything possible to protect people's personal information (health, financial, surfing habits, etc.), but sometimes people get a little too jumpy.  Case in point: One of our state customers recently found out that the browser provides the handy feature to save your password. We all know that it has been there for a while and is completely optional and is up to the end user to decide whether or not it is a smart decision to use or not. However, there is a bit of an uproar at the moment and we are being demanded to find a way to disable that functionality for our site.  Question: Is there a way for a site to tell the browser not to offer to remember passwords? I've been around web development a long time but don't know that I have come across that before.  Any help is appreciated.


What I would like to do is be able to login and sudo commands immediately without entering a password again. It is very redundant to type my password twice in a row when I need to login and run a privileged command. I understand the security risk which requires us to reenter a password when we've been away for awhile but it seems like login should automatically set this session by default to prevent this but it doesn't for some reason.  I am aware of  but they both rely on gdm and I appear to only have LightDM installed for starters. Furthermore, I don't login to a GUI interface and AFAIK the console doesn't use either of these to manage logins in the first place.  I'm using Ubuntu 13.04 in VMware if that matters. I do have a KDE installed but I don't usually load it unless I have a reason to.  The ideal solution would also work from SSH logins.  Update:  Based on Gilles' suggestions I now have this working setup:  ~ tail -n1 /etc/pam.d/sshd session optional pam_exec.so seteuid /usr/local/sbin/update_sudo_ticket   and ( to use sudo visudo to edit sudoers)  ~  sudo head -n12 /etc/sudoers|tail -n1 Defaults        !tty_tickets   and create a new script  ~ cat /usr/local/sbin/update_sudo_ticket #!/bin/sh touch -c "/var/lib/sudo/$PAM_USER" 2>/dev/null   and make it executable ( sudo chmod u=+rwx,g=+rx-w,o=-rwx /usr/local/sbin/update_sudo_ticket ):  ~  ls -la /usr/local/sbin/update_sudo_ticket -rwxr-x--- 1 root root 57 Sep 21 20:52 /usr/local/sbin/update_sudo_ticket

Knowing that giving a user a sudo's grace period right from the point when he/she login might be a security issue, I still think it will be a beneficial trade-off between security and usability in my setup.  The question is: how to do that? As far as I know, the sudo doesn't provide CLI for it.  I might somehow divert the gdm's typed password to something like sudo false, but again: how to get hold of the provided by the user password in the plain text? Should I write a custom pam module for it?  Or maybe it is better to immerse into implementation details of the sudo and as a root directly manipulate the timestamp database?


I have a style defined for a language which has lot a lot of literate replacements.  In the individual listings that use this style I would like to introduce more listing-specific literate replacements. However, it seems that they completely override the ones from the style.  E.g. in the following example I would like both \ and >= to typeset as their math symbol equivalents.  Is it possible to append to, not replace, a literate in a style?  \documentclass{article} \usepackage{listings} \begin{document}  \lstdefinestyle{lam}{%     literate={\\}{$\lambda$}1 }  \begin{lstlisting}[style=lam] let foo = \x -> x >= 1 \end{lstlisting}  \begin{lstlisting}[style=lam, literate={>=}{$\geq$}2] let bar = \x -> x >= 1 \end{lstlisting}  \end{document}

I'm trying to improve some language definitions that ship with listings. Those improvements consists in, among other things, a number of literate replacements (see subsection 5.4 of the listings manual) used for changing the values of switches and counters that I use to keep track of the context (comment, string, etc.).  The literate key (which is used to perform those literate replacements) has the following syntax:  literate=[*]⟨replacement item⟩...⟨replacement item⟩   where ⟨replacement item⟩ consists in three parts:  {⟨stuff to replace⟩}{⟨replacement text⟩}{⟨length⟩}.   However, listings doesn't seem to offer the possiblity of defining additional literate replacements to those that already exist. As a result, if a user wants to use my language definition but decides to define his/her own literate replacements (using literate a second time), all the literate replacements defined as part of my language will be deleted, and my improved syntax highlighting of the language will be broken.  Other keys, such as keywords, have a system of class, to avoid that type of interference, presumably. Unfortunately, there is no such class system for literate. There is also no moreliterate key.  How could I allow the user to specify further literate replacements without deleting those already defined?  The code below shows an example of the problem as it stands:    \documentclass{article}  \usepackage{listings}  % ---- % (This language definition would be in some mylang package) \lstdefinelanguage{mylang} {%     basicstyle=\ttfamily,     literate={u}{a}1, } % -----  % Now, in his/her preamble, the user loads mylang % but defines new literate replacements, which delete mine \lstset {%     language=mylang,     literate={(}{[}1 {)}{]}1, }  \begin{document}  \noindent I would like to get {\ttfamily[papa]} as output, but I get \begin{lstlisting} (pupu) \end{lstlisting}  \end{document}


Here is Prob. 19, Sec. 2.3, in the book Topics in Algebra by I.N. Herstein, 2nd edition:  If $S$ is a set closed under an associative operation, prove that no matter how you bracket $a_1a_2 \ldots a_n$, retaining the order of the elements, you get the same element in $S$ (e.g., $\left( a_1 \cdot a_2 \right) \codt \left( a_3 \cdot a_4 \right) = a_1 \cdot \left( a_2 \cdot \left( a_3 \cdot a_4 \right) \right)$; use induction on $n$).  My Attempt:  Of course the assertion holds for $n = 1, 2, 3$. Suppose it holds for every $k = 1, 2, 3, \ldots, n$ for some $n \in \mathbb{N}$ such that $n \geq 3$. Let $a_1, a_2, a_3, \ldots, a_n, a_{n+1}$ be any elements of set $S$.  How to proceed from here? How to prove rigorously that, no matter how we bracket $a_1a_2a_3\ldots a_n a_{n+1}$, retaining the order of the elements, we obtain the same element of $S$.

I've always heard this reasoning, and it makes obvious sense, but how do you actually show it for some arbitrary product? Would it be something like this?  $$(a(b(cd)))e=((ab)(cd))e=(((ab)c)d)e=abcde?$$  Do you just say that the grouping of the parentheses now corresponds to just multiplying straight through? Thanks.


I'm a problem when using the package tabularx.   Here is how I use the table:  \documentclass{report} \usepackage{tabularx} \usepackage[margin=3.5cm]{geometry}  \begin{document} \noindent \begin{tabular}[H]{|l|c|c|c|} \hline Simple text & A simple long text maybe very long or not i dont know c: & Simple text & Another simple long text maybe very long or not i dont know c:\\ \hline \end{tabular} \bigskip \noindent\begin{tabularx}{\textwidth}{|c|X|X|X|} \hline Simple text & A simple long text maybe very long or not i dont know c: & Simple text & Another simple long text maybe very long or not i dont know c:\\  \hline \end{tabularx} \end{document}   I was using the the regular taular but I need to have auto linebreak. I get theses long space when he breaks line. How can I have normal space ?    Thanks in advance, MYT.  SOLUTION by leandriis The 'long spaces' are due to X columns being based on justified p columns. To get rid of them you could define your own column type as follows: \newcolumntype{Y}{>{\raggedright\arraybackslash}X}

I have a table which has quite a lot of text but want to keep it on a portrait page. I am using the tabularx environment and managed to get all I want into the columns, but now the spacing between the words is super ugly. I'd rater define the orientation of my text in the table in each column, than having it justified. How can I change that?  I am pretty new to latex and I still struggle a lot. I went through some similar questions already, but I only make it worse trying to fix my problem.   \documentclass[12pt]{article} \usepackage[english]{babel} \usepackage{textcomp} \usepackage{graphicx} \usepackage{chngcntr} \counterwithin{figure}{section} \usepackage[font=small,labelfont=bf]{caption} \usepackage{tabularx}  \begin{document}  \begin{table}[htb] \footnotesize \begin{tabularx}{\textwidth}{>{\hsize=.4\hsize}X>{\hsize=.7\hsize}X>{\hsize=1.3\hsize}X>{\hsize=1.3\hsize}X>{\hsize=1.3\hsize}X} \hline \hline \textbf{WHO grade} & \textbf{Type} & \textbf{Description} & \textbf{Treatment} & \textbf{Outcome} \\ \hline \hline I & Pilocytic astrocytoma & low proliferative potential, not diffusive & surgical resection & not associated with recurrence after complete resection\\ II & Diffuse glioma & infiltrative, low mitotic activity, well differentiated & surgical resection, adjuvant therapy & median survival $>$10 years, often recurrence as high-grade tumour\\ III & Anaplastic Astrocytoma & mitotically active, anaplastic histology and infiltrative capacity & surgical resection, aggressive adjuvant therapy & median survival 2-3 years, recurrence as grade IV\\ IV & GBM & mitotically active, anaplastic histology, highly infiltrative, necrisis, angiogenesis & surgical resection, aggressive adjuvant therapy & associated with rapid progression, median survival 14 month\\ \hline \hline \end{tabularx} \caption{WHO Glioma Grades} \label{table:glioma types} \end{table}  \end{document}   Looks like this:


I have a valid Canadian Visitor Visa (multiple entry) on a passport that has been renewed.  My new passport is valid for 10 years and I would like to know if I can renew the unused Canadian Visitor Visa.

I recently renewed my passport. I also have an expired passport which has my Canada visa (visitor's) valid for another three years. I have already used my Canadian visa which is multiple entry. I am planning to visit Canada this summer.  Since my valid Canadian visa is in my old/expired passport, do I need to renew/transfer my Canada visa or can I simply travel with valid visa in old passport?


I have a script file, let's say abc.sh. The full path is /home/path/to/script/abc.sh. Now I am currently executing the script from /path/to/current by executing this command - sh /home/path/to/script/abc.sh. I want this script to echo it's location. The output should be /home/path/to/script

How do I get the path of the directory in which a  script is located, inside that script? I want to use a Bash script as a launcher for another application. I want to change the working directory to the one where the Bash script is located, so I can operate on the files in that directory, like so: $ ./application


I downloaded the Microsoft-supplied  image for Windows XP /  testing from  and tried to login using the documented credentials of IEUser / Passw0rd!   This does not work. What are the correct default login credentials?

I've downloaded the Windows 7 .vhd from Microsoft's site. I created a virtual PC from that .vhd. It runs OK, but the welcome screen want a password for one of the accounts (admin and administrator).  I've tried guessing a few passwords but with no luck...  Anyone knows the correct password?


this is a program about payroll but when compile the program it display error message. getting error while compiling the program dev c++. 7   9   [Error] 'double Employee::taxRate' is private. [Error] no matching function for call to 'HourlyEmp::HourlyEmp(const char [8], double, int, int)' may any one please help me? #include <iostream> using namespace std;  class Employee {     private:         string name;         double taxRate;     public:         Employee( string&, double );         string getName();         virtual double calcSalary() = 0; };  Employee::Employee( string& n, double tr ): name(n){     taxRate = tr; }   string Employee::getName() {     return name; }  class SalariedEmp : public Employee {     private:         double salary;     public:         SalariedEmp(string&,double,double);         virtual double calcSalary(); };  SalariedEmp::SalariedEmp(string& n, double tr, double sal) : Employee( n, tr ) {     salary = sal; }  double SalariedEmp::calcSalary() {     double tax = salary * taxRate;     return salary - tax; }   class HourlyEmp : public Employee {     private:         int hours;         double hourlyRate;     public:         HourlyEmp(string&,double,int,double);         virtual double calcSalary(); };  HourlyEmp ::HourlyEmp( string& n, double tr, int h, double hr ) : Employee( n, tr) {     hours = h;     hourlyRate = hr; } double HourlyEmp::calcSalary() {     double grossPay, tax;     grossPay = hours * hourlyRate;     tax = grossPay * taxRate;     return grossPay - tax; }   class CommEmp : public Employee {     private:         double sales;         double commRate;     public:         CommEmp( string&, double, double, double );         virtual double calcSalary(); };  CommEmp::CommEmp( string& n, double tr, double s, double cr ) : Employee(n, tr ) {     sales = s;     commRate = cr; }  double CommEmp::calcSalary() {     double grossPay = sales * commRate;     double tax = grossPay * taxRate;     return grossPay - tax; }   int main() {     Employee* emp[10];     emp[0] = new SalariedEmp( "Aamir", 0.05, 15000 );     emp[1] = new HourlyEmp( "Faakhir", 0.06, 160, 50 );     emp[2] = new CommEmp( "Fuaad", 0.04, 150000, 10 );     generatePayroll( emp, 10 );     return 0; }  void generatePayroll(Employee* emp[], int size) {     cout << "Name\tNet Salary\n\n";     for (int i = 0; i < size; i++) {         cout << emp[i]->getName() << "\t" << emp[i]->calcSalary() << "\n";     } }

What is the difference between private and protected members in C++ classes? I understand from best practice conventions that variables and functions which are not called outside the class should be made private—but looking at my MFC project, MFC seems to favor protected. What's the difference and which should I use?


For example  has "please delete me" in user description and has been inactive for a while. Is there a way to remind an admin the owner of the account desires the account to be deleted?

How can I delete my Stack Exchange account(s)? Also,  What happens to my content? Can I request it be deleted as well? What if I'm suspended, rate-limited, or banned from posting questions or answers? What will happen to my votes? Will other users be impacted? Why wasn't my account deleted immediately after the timer expiring? What will happen to my pending bounties and close, reopen, delete, or undelete votes? I want my account deleted on all Stack Exchange sites. How do I do this? Will my profile on chat be removed once I delete my site account?   For more information, see "" in the .


I am a newbie in using the Stack Apps website. When I visit my profile on this website I can't see the 'Meta user' link on the left side of the 'Network profile' link.  Please see the below image:

Now that all SE sites have their own meta site, why doesn't Stack Apps have a meta?  Sure, Stack Apps is somewhat of a limited site (or rather, a site about a limited subject), so by some counts, it might not need a meta. However, I think there are some things that could be discussed about how Stack Apps should be run and there is no good place to do that now. Thus, I support the creation of a Stack Apps meta.


I already tried to install it with the terminal as well as with the ubuntu-software-center, but I always get this:  This error could be caused by required additional software packages which are missing or not installable. Furthermore there could be a conflict between   software packages which are not allowed to be installed at the same time.

I cannot install Wine on Ubuntu 14.04.  When I try to install it on the Ubuntu Software Center I always get a message that says I have unmet dependencies. I tried installing Wine through the terminal and I get this:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  wine : Depends: wine1.6 but it is not going to be installed E: Unable to correct problems, you have held broken packages.


WolframAlpha says that $\zeta(0) = - \frac{1}{2}$ but I can't seem to get that result.  I found that for $\Re(s) < 1 $, \begin{equation}\label{1} \zeta(s) = 2^s \pi^{s-1}\sin\Bigl(\frac{s\pi}{2}\Bigr)\Biggl[\int_{0}^\infty e^{-y}y^{-s}\,\, dy \Biggr]\zeta(1-s),\tag{1} \end{equation}  And for $\Re(s) > 0 $, $$\zeta(s) = \frac{1}{1-2^{1-s}} \cdot \sum_{n=1}^\infty \frac{(-1)^{n-1}}{n^s}.\tag{2} $$  If I want to calculate $\zeta(0)$, using (1), then on the RHS I get $\zeta(1)$ which is undefined.  So how would I calculate $\zeta(0)$?

$$\zeta(it)=2it\pi it−1\sin(i\pi t/2)\Gamma(1−it)\zeta(1−it).$$ Everything on the RHS is never zero,  Does that means LHS has no zeros, since $\sin(s)$ has a simple zero at $s=0$ while $\zeta(1−s)$ has a simple pole at $s=0$  (the Laurent expansion), so the product $\sin(i\pi t/2)\zeta(1−it)$ is finite and nonzero at $t=0$.  My question is that from functional equation one can't get direct answer $\zeta(0)=−1/2$ unless using alternate infinite series !


I came across this while doing questions on field axioms. I need this proved for where $m,n \in \mathbb Z$ and $a \neq 0$. Please do it in complete steps. I looked this up on the site but I couldn't understand what's been done.

Let $a$ be a nonzero number and $m$ and $n$ be integers. Prove the following equality: $a^{m+n}=a^{m}a^{n}$  I'm not really sure what direction to go in. I'm not sure if I need to show for $n$ positive and negative separately or is there an easier way. Can you use induction on integers?  My attempt: 1) Base case $m=0$. Prove that $a^{m+n}=a^m a^n$. Is true.  2) Assume the result holds for $m$.  So I want to prove it holds for $m+1$.  So I know that $a^{m+n}=a^ma^n$. So does this imply that: $a^{m+n+1}= a^{m+1+n}= a^{m+1}a^n$? Am I going in the right direction? I'm not sure what to do next...


When I deleted an item from the array "test", the keyword delete lead the array to become nonconsecutive. What has delete done?

What is the difference between using  on the array element as opposed to using ?   For example:  myArray = ['a', 'b', 'c', 'd'];  delete myArray[1]; //  or myArray.splice (1, 1);   Why even have the splice method if I can delete array elements like I can with objects?


Is there a theorem using the number of edges and vertices, or something about the max degree a vertex can have? I know that you can use $e ≤ 3v−6$. But what if that condition holds, and it still might not be planar? I'm having a hard time finding a planar representation for the graph I'm looking at.

I have to check whether a graph is planar. The given type is      $$    e ≤ 3v − 6 .$$   From :       Note that these theorems provide necessary conditions for planarity that are not sufficient conditions, and therefore can only be used to prove a graph is not planar, not that it is planar. If both theorem 1 and 2 fail, other methods may be used.   I am wondering what should I do to prove that a graph is planar.


In my calculator directory, I have  finalCalc_main.py  which imports class from another file  finalCalc.py  which has my Ui_MainWindow class. How can I make an exe. file using pyinstaller?

I've used several modules to make EXEs for Python, but I'm not sure if I'm doing it right.  How should I go about this, and why?  Please base your answers on personal experience, and provide references where necessary.


I have a fan on my desktop. I started to wondering if it would not be just as effective if I flipped it 180 degrees. Since all the wind that comes out of the front has to be sucked in from behind, right? But it was not. It felt much less effective. I don't have any equipment to perform any actual measurements, but the cooling effect was MUCH lower. I cannot say I noticed anything. It was like having it turned off. Why is this?

Why is it that when you drop paper behind a fan, it drops, and is not blown/sucked into the fan, whereas if you drop paper in front of a fan, it is blown away?


I have a 4GB Virtual Machine file I'd like to get off of my computer entirely, and right now (at least till tomorrow) I have only an 8GB flash drive.  According to the Windows 10 Storage Settings UI, the flash drive has used 320MB of 7.58GB.  However when I try to copy, I get:  The file 'box-disk1.vmdk' is too large for the destination file system. box-disk1.vmdk Type: Virtual Machine Disk Format Size: 4.76GB   I cannot zip the file first either, since I only have 300MB left on my C drive, and when I try it says "The disk may be full"  Is there any solution to this with the resources I have today?

Yes, why can't I?  I was stashing away some old photography backup zips last night. I could copy 4 of my > 1 GB backup zips to my external USB connected hard-drive when I got the error message "Cannot copy file. Not enough free space." (sort of) for a zip of roughly 7 GB.  But there are 120 GB free. Why is this?   EDIT: Clarification - the files that I could copy was smaller than 4 GB. The failing one was 7 GB. The cause seems to be the FAT32 4 GB limit.


I want to know the basic about  with basic examples.

Since the equation of mechanics are of second order in time, we know that for $N$ degrees of freedom we have to specify $2N$ initial conditions. One of them is the initial time $t_0$ and the rest of them, $2N-1$ are initial positions and velocity. Any function of these initial condition is a constant of motion, by definition. Also, there should be exactly $2N-1$ algebraically independent constants of motion.  On the other hand, Noether's procedure gives us integrals of motion as a result of variational symmetries of the action. These integrals of motion are also conserved but they are not always $2N-1$ in number. In consequence, we classify the system by their integrability.  So, what is the difference between the  and ? Why do non- have less integrals of motion when they should always have $2N-1$ constants of motion?


The following lsblk command print the disk usage in bytes   lsblk -bio KNAME,TYPE,SIZE,MODEL| grep disk    sda   disk  298999349248 AVAGO  sdb   disk 1998998994944 AVAGO  sdc   disk 1998998994944 AVAGO  sdd   disk 1998998994944 AVAGO  sde   disk   98998994944 AVAGO   how to print the disks when disk is greater than 300000000000 , by adding after the pipe awk or perl one-liner or else  expected output:   lsblk -bio KNAME,TYPE,SIZE,MODEL| grep disk | ......  sdb   disk 1998998994944 AVAGO  sdc   disk 1998998994944 AVAGO  sdd   disk 1998998994944 AVAGO

I need to remove every line that has a value of 2 or less in the 8th field (column).   My data looks like this:  12-31   Airport 189 379 41  49.70946503 -124.91377258   2   2880    30.8 01-01   AlberniElementary   165 331 16  49.26100922 -124.80662537   4   5760    26.1 01-09   BamfieldMarine  161 323 23  48.83490372 -125.13572693   2   2875    27.4 01-10   BamfieldMarine  161 323 23  48.83490372 -125.13572693   3   3068    38.6   I understand that using awk I can strip off the values desired and print them to another file, and I understand that sed would edit the current file. In either case, I need to retain the original file.   Note: Please provide thorough explanations with your solutions. It is not suffice to just write the command, please annotate suggestions.   Further note: The data has a header line, so most likely solution will need to      awk 'FNR >1'   I suppose?


I would like to understand what the arguments following \newtheorem are e.g.:  \newtheorem{theorem}{Theorem}[section]   \newtheorem{lemma}[theorem]{Lemma}  \newtheorem{proposition}[theorem]{Proposition}  \newtheorem{corollary}[theorem]{Corollary}   I even see some of the arguments switched up in various places. Why is it that in the \newtheorem{theorem} we have the squarebrackets [] being in the 3rd argument instead of the second?  Or for example why is there both a {corollary} and {Corollary} as well as a [theorem] tag sandwiched between the two?  The same happens with the lemma and proposition new theorems, these however also have the square bracketed argument in the middle.  Why is all of this?  Thanks,  Brian

Edited to include complete code, as suggested:  Here is what the preamble of my main file looks like:  \documentclass[12pt]{report} \usepackage{epsfig} \usepackage{upmathgrad2}   \usepackage{UPnotations} \usepackage{amssymb, graphicx, amsmath, amsthm} \RequirePackage{graphicx} \RequirePackage{hyperref} \theoremstyle{definition} \newtheorem{thm}{Theorem}[chapter] \newtheorem{defn}[thm]{Definition} \newtheorem{lem}{Lemma}[thm] \newtheorem{cor}{Corollary}[thm] \newtheorem{prop}{Proposition}[thm] \newtheorem{rem}{Remark}[thm] \newtheorem{ill}{Illustration}[thm]   I've been trying to tinker on ways to change the above code however I still get the following numbering:  Chapter 1 1.1 Section A Definition 1.0.1 Theorem 1.0.2 Theorem 1.0.3   The definitions, theorems, lemmas, etc. are numbered continuously as I wanted. However, I wanted to get rid of the 0's. How do I do this?  I tried to use the suggestions in this  however things just got worse.   For example, when I tried:  \newcounter{dummy} \numberwithin{dummy}{section} \newtheorem{defn}{Definition}[dummy] \newtheorem{thm}{Theorem}[dummy]   I got Definition 1.1.0.1 instead.


I'm looking for clear, concise guidelines on what to do when one comes across an answer (written by another user, and not necessarily the accepted answer, or one with high votes) that is now unambiguously obsolete (e.g., an answer that depends on an officially discontinued feature.)1.   If such guidelines exist, apologies for my inability to find them; I'd appreciate a pointer.2 If they don't, I can't think of a more fitting way celebrate SE's  than to put up such guidelines.     1 IOW, I'm not referring answers that have become obsolete in the sense that a better solution now exists.  This second form of obsolescence is also problematic, but I imagine it's much harder to come up with a good policy about it.  2When I search for what to do about obsolete answers in SE sites, I find   on the subject, but it's hard for me to glean from them clear, concise guidelines.  Neither can I find such guidelines in the .

I was thinking about this issue from time to time but I didn't know whether it really exists or just an speculation on my side until today when I woke up [!], I saw  downvoted (in the meantime I'll leave that answer unedited for the sake of discussion; note that this is just a sample. I'm not asking "how to deal with this specific answer." The question is completely general as it's nearly impossible to keep track of all of your answers to see whether they require updating or not). While the downvoter didn't explain a thing, I suspect the reason is that the answer is no longer applicable (It's one of the new features in iPhone OS 3.0). As we go to celebrate a long sequence of birthdays for Stack Overflow (hopefully!), we're going to see lots of answers become obsolete. How we're going to deal with this issue?


What is the best plural of "+1" in casual American English writing?  Possible ideas I've considered include:   +1s +1's

When I was in high school back in the 1970s, I was taught that to make a plural of an acronym, a letter, or a number, one should add an apostrophe and "s". Like I would have written this sentence, "... back in the 1970's ..." I would write "one CD, two CD's". Etc. I followed this rule faithfully for years until a co-worker told me it was wrong. Now I can't find any source that agrees with what I was taught.  Is this a rule that has changed over time? Was the convention in the 70s that one should use an apostrophe but this has changed and now we do not? Or were my high school English teachers just confused?


For example most of the people hearing "I really like my BMW" will understand than he is referring to a car whereas someone saying "I do enjoy my Lacoste" will leave doubts about what kind of product(a shirt, a fragrance, etc) he is talking about.  The term where saying      I  really like my [brand name].   has the same meaning as      I really like my [product name].    For example      I really like my BMW.    means the same as (because BMW is so famous that is implicit that it is a car)     I really like my car.    The term would be fit in:  BMW is an example of _____, the manufacturer of cars is so well-know that we all know pretty sure that we are talking about a luxury car when we hear "I really like my BMW"

Some people use a term for a popular special case in place of a generic term.  (Often this popular special case is a particular product in that category.)  I think that this is a common phenomenon.  Is there any word/phrase for it?  For example, “Coke” officially refers to a  (I think), but some people seem to call any carbonated soft drinks “Coke.”  In Japanese, famikon is the Japanese name for , a video game console which was extremely popular in 1980s and early 1990s, but some Japanese people call any video game console famikon even if it is not really a famikon.  (As an aside, calling a video game console famikon when it is not really a famikon is even a stereotype of a “mother unfamiliar with technology” in Japan.)  I am looking for a term which refers to this kind of usage of words.


The Scenario  I'm automating backups via a bash script. The script is executed via cron. The script archives directories recursively using tar, and then rsync's them to the remote host. Here is a sample:  ... for PATH in $DIRS do     ...     tar -cpvzf $FFILE $PATH --exclude-from /tmp/excludes     ...     rsync -az --partial --rsync-path="sudo rsync" $FFILE mybackupserver:$REMOTEFILES     ... done ...   Each time tar or rsync is invoked, a new process (and therefore PID) is spawned for each one, obviously.  My Question  If I kill the process that started the script, will the child tar and rsync processes also be killed off immediately? Or will they run until completion, and no further ones will be spawned thereafter?  I'm reluctant to interrupt the tar or rsync processes mid-stream.  Thanks.

This question has come up    ( ), but I'm finding the answers to be generally incomplete. The general question is "Why does/doesn't my job get killed when I exit/kill ssh?", and here's what I've found.  The first question is:  How general is the following information?  The following seems to be true for modern Debian linux, but I am missing some bits; and what do others need to know?   All child processes, backgrounded or not of a shell opened over an ssh connection are killed with SIGHUP when the ssh connection is closed only if the huponexit option is set: run shopt huponexit to see if this is true. If huponexit is true, then you can use nohup or disown to dissociate the process from the shell so it does not get killed when you exit.  Or, run things with screen. If huponexit is false, which is the default on at least some linuxes these days, then backgrounded jobs will not be killed on normal logout. But even if huponexit is false, then if the ssh connection gets killed, or drops (different than normal logout), then backgrounded processes will still get killed.  This can be avoided by disown or nohup as in (2). There is some distinction between (a) processes whose parent process is the terminal and (b) processes that have stdin, stdout, or stderr .  I don't know what happens to processes that are (a) and not (b), or vice versa.   Final question: How can I avoid behavior (3)?  In other words, by default in Debian backgrounded processes run along merrily by themselves after logout but not after the ssh connection is killed.  I'd like the same thing to happen to processes regardless of whether the connection was closed normally or killed.  Or, is this a bad idea?  Edit: Another, important way to keep jobs of being killed, that works (?) in either case is to run them through .  But, the question is more about understanding when things get killed and when they don't: sometimes people want the jobs to be killed on logout, for instance.  More threads: -  -  -  -  -  -  -  -


I have  basic login for a website I am using and I simply don't want the register to allow inserting of the same data. So far in a stored procedure I have.  INSERT INTO RegisteredUsers (Email, PasswordHash)  VALUES (@Email, HASHBYTES('SHA2_512', @Password))   How would I update this so that it does not allow duplicate records of email?  Thanks

We have a user table, every user has an unique email and username. We try to do this within our code but we want to be sure users are never inserted (or updated) in the database with the same username of email. I've added a BEFORE INSERT Trigger which prevents the insertion of duplicate users.  CREATE TRIGGER [dbo].[BeforeUpdateUser]    ON  [dbo].[Users]    INSTEAD OF INSERT AS  BEGIN     -- SET NOCOUNT ON added to prevent extra result sets from     -- interfering with SELECT statements.     SET NOCOUNT ON;      DECLARE @Email nvarchar(MAX)     DECLARE @UserName nvarchar(MAX)     DECLARE @UserId int     DECLARE @DoInsert bit      SET @DoInsert = 1      SELECT @Email = Email, @UserName = UserName FROM INSERTED      SELECT @UserId = UserId FROM Users WHERE Email = @Email      IF (@UserId IS NOT NULL)         BEGIN             SET @DoInsert = 0         END      SELECT @UserId = UserId FROM Users WHERE UserName = @UserName      IF (@UserId IS NOT NULL)         BEGIN             SET @DoInsert = 0         END      IF (@DoInsert = 1)         BEGIN             INSERT INTO Users             SELECT                             FirstName,                             LastName,                             Email,                             Password,                             UserName,                             LanguageId,                            Data,                             IsDeleted                         FROM INSERTED         END     ELSE         BEGIN             DECLARE @ErrorMessage nvarchar(MAX)             SET @ErrorMessage =                           'The username and emailadress of a user must be unique!'             RAISERROR 50001 @ErrorMessage         END  END   But for the Update trigger I have no Idea how to do this. I've found this example with google:  But I don't know if it applies when you update multiple columns at once.  EDIT:  I've tried to add a unique constraint on these columns but it doesn't work:  Msg 1919, Level 16, State 1, Line 1 Column 'Email' in table 'Users' is of a type  that is invalid for use as a key column in an index.


I'm writing here becouse one question doesn't let me sleep calmly. How it's possible that site www.visualstudio.com when I sign in to free TFS account, create special 'part' of site with url {myprojectname}.visualstudio.com?. Is it achieveable in my project using ASP.NET MVC 4 or 5? How it doesn't affect in current DNS system? or it affect? What should I read to let my site be so deeply customizable?  for example:  user1.mysite.xx user2.mysite.xx/aaa/4/sda/something_other

Is it possible to have an ASP.NET MVC route that uses subdomain information to determine its route?  For example:   user1.domain.com goes to one place user2.domain.com goes to another?   Or, can I make it so both of these go to the same controller/action with a username parameter?


I was looking for Stack Overflow on the App Store. Is there a reason for SO/SE not to be there?  Accessing the amazing repository here through iPad would be wonderful.

I found this one on UserVoice, and I thought it was fitting to bring it up here for further discussion.  "Stack Overflow already works with Mobile Safari, but the experience is far from optimum. I believe an iPhone-optimized version (or maybe even a native client) would be perfect. I can help with either."  I personally think a some kind of mobile version of Stack Overflow would be great for using as a reference, but using it to ask questions would probably get cumbersome if you had to type up a long question with full description. However, using it to look up an answer when you're away from your desk would be awesome.  But, why not just use the regular Stack Overflow? Well, we all know that the small, touch screens get cumbersome to use when navigating websites built for desktops.


The book I'm looking for is not Ender's Game or Ready Player One.   This book is based on a generationship that has been travelling for several years. At least 2 generations were born on the ship. The nature of the ship fosters cooperation rather than competition to the point where even in gym class the students are reprimanded for finishing first.  Classes are taught in VR pods with teacher commentary. One student, instead of getting the lesson finds himself in a VR role playing game. He meets with other young adults his age and they are given a quest.   I read this book between 10 and 15 years ago, but while I remember the plot, the title and the author escapes me. I would really appreciate your help in identifying the book. Thank you!

I'm trying to track down the title/author of a novel I read some time back.  I read the novel sometime between 1998 and 2004; not sure when it was printed.  The novel itself I originally found in the YA section at my local library.  The setting of the novel is an interstellar generation ship outbound from earth, several generations into the journey.  The plot loosely runs something like this - Several students undergoing what should have been ordinary virtual reality training at school suddenly instead find themselves inside a completely unfamiliar scenario (one which resembles the stereotypical 'you all meet in a bar' RPG intro).  As time goes on, not only are the students drawn back into the 'game' simulation, but they actually begin to disappear from the ship itself - they discover that, in order for everything to go back to normal, they have to win the game.  The whole thing was revealed, in the end, to be the result of a set of embedded programs in the ship's master computer, if I recall correctly, with the programs having been placed there by a programmer who realized that the inhabitants of the ship were effectively breeding the spark of creativity and imagination out of themselves.  Said programmer had taken it on herself to leave them a legacy that would ensure that, by the time they got where they were going, that all-important spark wouldn't have died completely away.  Any suggestions?


in my app, i have a TabLayout that every tab is a separate fragment. I open dialog in one of this fragment. in my dialog contain a list that I want when I clicked to list item, The content of item pass to in textView in A number of fragment         public class ReadingFragment extends Fragment{    TextView textView;    View view;    FloatingActionButton actionButton;     @Override     public View onCreateView(final LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {        view = inflater.inflate(R.layout.fragment_read, container, false);          textView = view.findViewById(R.id.txtSaved);        actionButton = view.findViewById(R.id.floatingActionButton);          actionButton.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View view) {                 DialogSearch search = new DialogSearch();                 search.show(getActivity().getSupportFragmentManager(),"baranAbFa");         }     });    }      public void setData(String x){        textView.setText(x);    } }     This MainActivity Code(the method that received data from Dialog and pass to Fragment  ):   public class MainActivity extends AppCompatActivity{       public void setGetAndSend(String name){         Fragment frags= viewPagerAdapter.getItem(2);         ((ReadingFragment) frags).setData(name);         Toast.makeText(MainActivity.this, name, Toast.LENGTH_SHORT).show();     } }   And this in My Dialog Class And method that handle ItemClickListener:  (strings is a list that displays in list View)  public class DialogSearch extends DialogFragment {     View dialogView;     @Override     public Dialog onCreateDialog(Bundle savedInstanceState) {     super.onCreateDialog(savedInstanceState);      dialogView = getActivity().getLayoutInflater().inflate(R.layout.search_dialog, new RelativeLayout(getContext()), false);      final Dialog builder = new Dialog(getActivity());      listViewSearch.setOnItemClickListener(new AdapterView.OnItemClickListener() {                 @Override                 public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {                      ((MainActivity)getActivity()).setGetAndSend(strings.get(i));                  }             });     } }   And when run and click to list item this error is occured: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference also View in ReadingFragment too is null

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 installed ubuntu 20.04 on my pc and now i can't connect to wi-fi i tried a lot of things to change it but still

We just bought a Lenovo  (which is supposed to have the Intel 8265 for wireless). This laptop was bought in part because it is certified to run Ubuntu and as such to me at least it would make sense for things to work out of the box... but no such luck.  First, I installed Ubuntu 17.10 and after installation realised Wi-Fi was not working. I also tried Ubuntu 16.04 from a USB drive since that is the version of Ubuntu it is certified for, but no luck there either.  The wireless chip is not detected by lshw (or even lspci by the looks of it), ip link does not show a wireless interface, and the iwlwifi kernel module is not loaded at boot (I can load this myself using modprobe iwlwifi but this does not make Wi-Fi work). I think it is a combined Wi-Fi/Bluetooth chip, and Bluetooth does appear to work (or at least Bluetooth shows up in Gnome and rfkill list).  modinfo iwlwifi | grep 8265 shows me a file ending in -34 is supposedly loaded but only a file ending in -33 (and some other lower numbers) is present in /lib/firmware, if that helps).  I have also installed the Linux 4.14.9 kernel in an attempt to get things to work, but this did not resolve the issue either.  Further information  root@ThinkPad-E570:~# modinfo iwlwifi | grep 8265 firmware:       iwlwifi-8265-34.ucode root@ThinkPad-E570:~# rfkill list all 0: tpacpi_bluetooth_sw: Bluetooth     Soft blocked: no     Hard blocked: no 1: hci0: Bluetooth     Soft blocked: no     Hard blocked: no root@ThinkPad-E570:~# dmesg | grep iwl root@ThinkPad-E570:~# lspci -nnk | grep 0280 -A3 05:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:c821]     Subsystem: Lenovo Device [17aa:c024]   Update  I just noticed that the laptop does not have an Intel wireless chip at all, but in fact has a Realtek one... which means that the  of the shop I bought this laptop at were not accurate... Sigh. Same problem stands, however, just with a crappier wireless chip.


I have found that gradient fields are always conservative. But for my knowledge I wanna ask "are the gradient fields are only fields which are conservative"?  I mean is it necessary that a field which is conservative has to be a gradient field of some scalar function?

A  field is one in which all that matters is that a particle goes from point A to point B. The time (or otherwise) path involved makes no difference.   Most force fields in physics are  (conservation laws of mass, energy, etc.). But in many other applications, the time paths DO matter, meaning that the force field is not "conservative."  What causes a force field to be "non-conservative?" Could you give some examples (probably outside of physics)?


I am going over inner product space.  I know that linear space has an inner product as long as it satisfies $4$ conditions.  And, the book says that for $x,y$ in $V$, there is a real number corresponding $(x,y)$     What does that mean?   For $\mathbb R^2$, where $x=(x_1,x_2)$, $y=(y_1,y_2)$, what is inner product of $(x,y)$, would it be $x_1y_1+x_2y_2$?

This is definition      "A real linear $V$ is said to have an inner product if for each pair of elements $x$ and $y$ in $V$, there corresponds a unique real number $(x.y)$ satisfying what we know as axioms for inner product."    What does it mean? $(x.y)=xy$ and $xy$ is a real number?   When $(x.y)$ is complex, it is called complex space, does that mean that $(x.y)=xy=$ complex?   I don't understand what inner product is.


I made the experience that flags I place for marking a question (or answer) as low quality gets disputed very often. So I think I must have some sort of a misunderstanding on when to use them.  For example, I marked the question  as low-quality, which then got disputed.  The question later got closed due to "put on hold as unclear what you're asking", so there was definitely something wrong with this question. However for me it was clear what he was asking; it was just hard to understand what he was doing.  So when should I use them then? If I find a question to be really low quality, but everything seems fine to me, why not use this flag?

The "Very Low Quality" (VLQ) flag reason is really annoying me.   It is the analog to the mommy mommy flag (which my 1.5-year-old child raises quite frequently). It provides no real clue as to what the flagger really wants us to do with the post.   Does she want us to close the question?  Does she want us to edit it into shape?  Does she want us to delete the question?  Does she want us to ban the user?  Does she want us to jump around and have a party?    Should we get rid of this flag reason?   Is it just me? Should and can we replace it with something better?     EDIT I accepted Jeff's answer. The tougher wording has heavily decreased the amount of very low quality flags. We now see only about 25% of the amount we used to and they are usually valid. Additionally, we now only allow very low quality on posts with a score of 0 or lower.


I would like to put two figures side by side such that they are centered on the page and have an arbitrary (given) space between them. Although there are a lot of similar questions here, none has given me the desired result.  I have found that using the following code allows the placement of two figures side by side with the possibility of having an arbitrary space between them. However, as it can be noticed from the picture, because the widths of the pictures are higher than the line length, the right picture goes past the text, while the whole ensemble remains aligned with the text:  \documentclass{article} \usepackage[demo]{graphicx} \usepackage{caption} \usepackage{subcaption} \usepackage{lipsum}  \begin{document}      \lipsum[1-1]      \begin{figure}[h!]         \captionbox{This is a duck\label{fig2:a}}{\includegraphics[width=.6\textwidth]{duck.png}}%         \captionbox{This is a sparrow\label{fig2:b}}{\includegraphics[width=.6\textwidth]{sparrow.png}}     \end{figure}      \lipsum[1-1] \end{document}   The result is depicted below: (note that the code above will work but it will show black boxes instead of images because of the 'demo' option before the graphicx \usepackage parameter)    The problem is that I would like the image group to be centered on the page and overtake an equal amount the paragraph text on both sides.  Is it possible to achieve that from this code, or at least by maintaining the possibility of an arbitrary separation between the images?

I have a figure that is wider than the \textwidth of my document. (I don't want to change the \textwidth.) As a result, the leftmost part of the figure is flush with the left margin, while the rightmost part spills into the right margin too much. I'd like to center the figure, so that it will exceed the \textwidth equally on both sides.


I have created an dynamic email template using AMP Script so that i can send emails to all records which are present in my salesforce report.  AMP Script:  %%[     Var @fname,@AccountName,@PictureDay,@AccountPhone,@BookingOwner,@BookingOwnerEmail     Set @fname=FirstName     Set @AccountName=AccountName     Set @PictureDay=PictureDay     Set @AccountPhone=Account:Phone     Set @BookingOwner=BookingOwner     Set @BookingOwnerEmai=BookingOwnerEmail ]%%  Dear %%=v(@fname)=%%,  We are looking forward to taking photographs at %%=v(@AccountName)=%% on %%=v(@PictureDay)=%%. The phone number we have on file for you is %%=v(@AccountPhone)=%%.  Your Account Manager is %%=v(@BookingOwner)=%% and you can reach them at %%=v(@BookingOwnerEmail)=%%   Notes:   I don't want to import data using Salesforce Data Extension. I have Opportunity columns in my report so i am unable to fetch from normal Data Extension (They can fetch only Contact,Lead & Opportunity columns) Trying to use AMP Script for Dynamic Email Content. Tried using RetrieveSalesforceObject function but no luck.

I need to send dynamic email to all my booking contacts using AMP Script. Using FOR loop makes repetitive content. I am pulling contacts from Salesforce reports directly without using Salesforce Data Extension.  1) Any way to display content respective to each record (Dynamically)  2) Can we directly get Opportunity columns present in  SF reports to Normal Data Extension? Like we can do for Contact,Account & Leads  3) Any way to uniquely identify each opportunity records?  AMP Script:  %%[ Var@fname,@AccountName,@PictureDay,@AccountPhone,@BookingOwner,@BookingOwnerEmail,@bookingdetail,@Accountid Set @Accountid = AccountId Set @fname=FirstName Set @AccountName=AccountName Set @AccountPhone=Account:Phone Set @bookingdetail = RetrieveSalesforceObjects("Opportunity","Picture_Day__c,OwnerName__c,OwnerEmail__c","Picture_Day__c","=","2016-06-25","CloseDate","!=","2015-10-03") For @i=1 TO RowCount(@bookingdetail) DO Set @limitRow = Row(@bookingdetail, @i) Set @PictureDay = Field(@limitRow,'Picture_Day__c') Set @Bookingowner = Field(@limitRow,'OwnerName__c') Set @BookingOwnerEmail = Field (@limitRow,'OwnerEmail__c') ]%%  Dear %%=v(@fname)=%%,  We are looking forward to taking photographs at %%=v(@AccountName)=%% on %%=v(@PictureDay)=%%.The phone number we have on file for you is %%=v(@AccountPhone)=%%.  Your Account Manager is %%=v(@Bookingowner)=%% and you can reach them at %%=v(@BookingOwnerEmail)=%%. %%[NEXT @i]%%   Thanks,  Mitesh


How do I prove using induction that an infinitely nested radical, like sqrt(1+sqrt(1+sqrt(1+... is increasing. I have seen there are many examples on here like this but haven't seen one that proves the sequence is increasing. Could someone give me some tips or link to one which shows the proof that it is increasing? Thanks.

(Fitzpatrick Advanced Calculus 2e, Sec. 2.4 #12)  For $c \gt 0$, consider the quadratic equation $x^2 - x - c = 0, x > 0$.  Define the sequence $\{x_n\}$ recursively by fixing $|x_1| \lt c$ and then, if $n$ is an index for which $x_n$ has been defined, defining  $$x_{n+1} = \sqrt{c+x_n}$$  Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  Note: The answers below might assume $x_1 \gt 0$, but they still work, as we have $x_3 \gt 0$.    This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


Let $k$ be a field and $f, g$ be irreducible monic polynomials in $k[X]$.  Suppose $k[X]/f \stackrel{\sim}{=} k[X]/g$.  Then does $f = g$?  If so, how can this be generalized?  Otherwise, how should I modify the  condition so that $f = g$?

Let $R$ be a commutative ring (with identity).   Let $f,g\in R\left[x\right]$ both be monic polynomials of degree $d$.   Then the underlying abelian groups of the rings $R\left[x\right]/\left(f\left(x\right)\right)$ and $R\left(x\right)/\left(g\left(x\right)\right)$ are isomorphic. Actually both are isomorphic to the direct sum $R^{\oplus d}$.  Questions:     What sort of relation between $f$ and $g$ will ensure that $R\left[x\right]/\left(f\left(x\right)\right)$   and $R\left(x\right)/\left(g\left(x\right)\right)$ are also isomorphic   as rings (with identities)?      What sort of relation between $f$ and $g$ will ensure that $R\left[x\right]/\left(f\left(x\right)\right)$   and $R\left(x\right)/\left(g\left(x\right)\right)$ are also isomorphic as   $R$-algebras?   Maybe my questions are too broad. Partial answers (e.g. with extra conditions on $R$) or references are also very welcome.


My question is similar to this one , but I'd like to do it with three lognormals. The referenced question cannot be applied twice since the correlation between $X_1X_2$ and $X_3$ is not known.   Let $X_1$, $X_2$ and $X_3$ be three normal random variables. Write $X_1\sim N(\mu_1, \sigma^2_1)$, $X_2\sim N(\mu_2, \sigma^2_2)$ and $X_3\sim N(\mu_3, \sigma^3_2)$. The tri-variate normal distribution $(X,Y,Z)$ has a correlation structure with $\rho(X_1,X_2)=\rho_{X_1X_2}$, $\rho(X_1,X_3)=\rho_{X_1X_3}$ and $\rho(X_2,X_3)=\rho_{X_2X_3}$.  Consider the corresponding log-normal random variables: $Z_1 = \exp(X_1)$, $Z_2 = \exp(X_2)$ and $Z_3 = \exp(X_3)$.   Question: what is the distribution of the product of the three random variables, i.e., the distribution of $Z_1Z_2Z_3$?  It's easy to compute the distributions of $Z_1Z_2$ using the referenced question, but I'm stuck because I don't know the correlation between $X_1X_2$ and $X_3$.

Let $X_1$ and $X_2$ be two normal random variables. Write $X_1\sim N(\mu_1, \sigma^2_1)$ and $X_2\sim N(\mu_2, \sigma^2_2)$, to fix ideas.   Consider the corresponding log-normal random variables: $Z_1 = \exp(X_1)$, $Z_2 = \exp(X_2)$.  Question: what is the distribution of the product of the two random variables, i.e., the distribution of $Z_1Z_2$?  If the normal random variables $X_1, X_2$ are independent, or they have a bivariate normal distribution, the answer is simple: we have $Z_1Z_2 = \exp(X_1+X_2)$ with the sum $X_1+X_2$ normal, hence the product $Z_1Z_2$ is still lognormal.  But suppose that $X_1, X_2$ are generally $not$ independent, say with correlation $\rho$. What can we say about the distribution of $Z_1Z_2$?


i'm looking for a simple code of function on java to round some decimals,   Example :  the input number will always be on this format #.## so the code should do this :  input 100.00 result 100.00 rounded by 0.00  input 100.01 result 100.00 rounded by -0.01  input 100.02 result 100.00 rounded by -0.02  input 100.03 result 100.05 rounded by +0.02  input 100.04 result 100.05 rounded by +0.01  i'm not sure if there is a java function that can provide this result.

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?