when using \begin{algorithm} in latex for writing algorithms, we will have something like this:    Is there any way to have something else like "Procedure" instead of "Algorithm"?  Edit:  I tried something like is said in   \renewcommand{\algorithmname}{Procedure}   but I get this error: algorithmname  Undifined  My code is like this:  \documentclass[a4paper,12pt]{report}  \usepackage{algorithm}  \renewcommand{\algorithmname}{Procedure}  \begin{document}  \begin{latin} \setstretch{1.0} \begin{algorithm} \caption{My algorithm}\label{euclid}  \begin{algorithmic}[1] \Procedure{Building }{M}  \EndProcedure \end{algorithmic}  \end{algorithm}  \end{latin} \end{document}

I am writing a paper in Italian and I need to include pseudo code in my latex document so I am currently using the algorithm and algorithmic packages. At the top of every algorithm the label Algorithm 1 is shown, but I'd like for it to be in Italian instead. I have previously included:  \usepackage[italian]{babel} \usepackage[utf8]{inputenc}    with no change whatsoever, is there any way to localize it?  \documentclass[a4paper,12pt]{article} \usepackage{algorithm} \usepackage{algorithmic} \usepackage[italian]{babel} \usepackage[utf8]{inputenc} \title{ASD} \author{haunted85} \date{Ottobre 2012} \begin{document} \maketitle \section{} \begin{algorithm} \caption{Questo è un algoritmo.} \begin{algorithmic}[1] \STATE int Count(int $N$) \STATE $sum = 0$ \FOR{$i \leq N$} \FOR{$j = i \leq N$} \STATE $sum = sum + 1$ \ENDFOR \ENDFOR \RETURN $sum$ \end{algorithmic} \end{algorithm} \end{document}


I asked this earlier and for some reason it was considered a question for the author but it is not my question is how do I transfer Minecraft PE from my Android phone to my son's Android tablet

My son's tablet broke and when he gets a new one he is hoping he will be able to access all his saved worlds on his new device. Is this possible? Will the minecraft servers have his data saved if he re-installs his already purchased app?


Which of the following should I use?     Today is me and Joey's anniversary   Today is mine and Joey's anniversary

I just stumbled upon a :     My wife and I's seafood collaboration dinner. How does it look?   Sure enough, the top comment immediately points out that it should be "my wife's and my". However, a cross-post to the Grammar subreddit produced :     It's fine as it is written. "my wife and I" is a noun phrase, functioning as a subjective pronoun in the singular and made possessive with the apostrophe. It is exactly the same as "our".      It seems weird because you would never use "I's" on its own but it is not on its own here - it is part of a noun phrase.   That's a rather intriguing argument. Does it hold any water?


As Peter Capaldi, who played Roman merchant Lucius Caecilius Iucundus in 4x02 (2005 serie) and Freema Agyeman (Adeola Oshodi, 2x12), are there others main character's actors who played background roles before?  In the 2005 serie and the 1963 one.  Edit: Every canon count (I'm not a canon racist :D)

Now that Peter Capaldi has been named the new Doctor, it's going to be interesting to see if they'll address the fact he has already played Caecilius in , and John Frobisher in .  Has this ever happened before in the Whoniverse, or have any actors ever played multiple characters (with or without an explanation)?


#include <iostream> union xxx {   uint64_t f5;   char f4;   struct   {     char f1;     uint32_t f2;     char f3[3];   } abc; };  union xxx2 {   uint64_t f5;   char f4; };  struct xxx3 {     char c;     uint32_t c2; };  struct xxx4 {     char c;     uint32_t c2;     char c3; };  int main() {     std::cout << sizeof(union xxx) << std::endl;  // 16     std::cout << sizeof(xxx::abc) << std::endl;   // 12     std::cout << sizeof(union xxx2) << std::endl;   // 8     std::cout << sizeof(xxx3) << std::endl;   // 8     std::cout << sizeof(xxx4) << std::endl;   // 12      return 0; }   Question> The size of a union is sufficient to contain the largest of its data members. The largest data member inside xxx is abc which is of size 12 bytes. Why the sizeof xxx is 16 instead of 12?

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


I've installed .deb file (virtualbox-5.2_5.2.8-121009~Ubuntu~xenial_amd64.deb) on uBuntu 16.04, and i tried getting 'Virtualbox.run' (as in the link ) but there aren't any files with that name.   How/Where can I get the script file 'VirtualBox.run'?  Thanks very much.

I am a newbie. For some reasons, I need to install Virtualbox. I see that I can easily install it using the Software Center, but I trust most the apt-get install way, because I find it safer, less buggy, and it helps me accommodate more with the Terminal.  So, my question is the following: is there a way to install VirtualBox using the command line? I would prefer something easy, like apt-get install not unzipping, archiving, etc, because I still don't know how to do these in the Terminal.


After installing Ubuntu 16.04 on desktop, I'm able to see GRUB, I can select and enter into Ubuntu, but there is only a purple or black background with a cursor, and sometimes I can login.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


Can anyone help with the solution? This is my post and I have created a custom column to get view counts on my single post. I'm want to keep a track of views for every single post. I'm trying to set a cookie when a user opens a single post. Please provide an example so that it will be easy to understand.

I'm trying to add some function to each loop called in the themes. What I'm doing is I add a function to count post view from here , to use the function I need to add this line <?php setPostViews(get_the_ID()); ?> to single.php, page.php, etc.  I want to know whether I can use some hook to automatically add the <?php setPostViews(get_the_ID()); ?> line without hard code it for each single.php, page.php files.


I have the following code:  recognizer = new GestureRecognizer(); recognizer.Tapped += (args) => {     // Send an OnSelect message to the focused object and its ancestors.     if (FocusedObject != null)     {         FocusedObject.SendMessageUpwards("OnSelect",              SendMessageOptions.DontRequireReceiver);     } };   I am working in a project for Unity and I am not that experienced with the syntax of this operation:  recognizer.Tapped += (args) => {     // Send an OnSelect message to the focused object and its ancestors.     if (FocusedObject != null)     {         FocusedObject.SendMessageUpwards("OnSelect",              SendMessageOptions.DontRequireReceiver);     }   I understand that Tapped is the event listener for taps. However, I don't understand the following things:  1) Why are they using a += operator to add a lambda function. How can you add a lambda function like that? I've always used += on primitive types.  2) Where does "args" come from?  3) When does that lambda function run?

I just came over this syntax in some of the questions in this forum, but Google and any other searchengine tends to block out anything but letters and number in the search so it is impossible to search out "=>".  So can anyone tell me what it is and how it is used?


I have my iPhone SE set to use my fingerprints to access it, and this is normally the way I get into my phone.  By at seemingly random intervals (absolutely no pattern that I can detect), the phone will require I enter the actual unlock code.  The phone has definitely not been rebooted, crashed, or anything of that sort.  What causes it to just randomly sometimes want the lock code?  It happens anywhere from once per week, to once every couple of months, but never with any pattern to the frequency that I can detect.

Occasionally, when unlocking my iPhone or iPad, I get the following message:     Your passcode is required to enable Touch ID   Now this is not after a number of failed attempts or turning the device off. The device was used within the last 12 hours. Two of the devices are less than 2 months old, and one is a year old. Everything is up to date. It appears to be happening more-or-less at random.  Does anybody know why this message might appear?


I'm not sure how the following sentence should be built:  "She gives a blanket to me, who (am/is/?) cold"  I can't come up with anything that sounds right, and I'm not certain there is a right. Can this be done in English? Obviously in this example sentence, it should be restructured to sound normal, but I'm looking for a rule on this structure.

An acquaintance recalled this specific example from an English textbook, but it is jarring to my native ear. Is this an example of prescriptive grammarians gone wild?


I have this query: SELECT t.some_id AS id, t.*  FROM some_table t WHERE (t.first_col = '123' OR t.second_cold = '321') AND t.third_col != 'aaa' AND t.some_date >= :someDate AND t.some_date <= :someOtherDate ORDER BY t.some_date   I have rewritten it to: SELECT t.some_id AS id, t.* FROM some_table t JOIN (SELECT t.some_id, t.some_date FROM some_table t WHERE t.first_col= '123' AND t.third_col != 'aaa' AND t.some_date >= :someDate AND t.some_date<= :someOtherDate ORDER BY t.some_date OFFSET 0 ROWS UNION SELECT t.some_id, t.some_date FROM some_table t WHERE t.second_col = '321' AND t.third_col != 'aaa' AND t.some_date>= :someDate AND t.some_date<= :someOtherDate ORDER BY t.some_date OFFSET 0 ROWS) AS filtered_table ON t.some_id = filtered_table.some_id  ORDER BY t.some_date  and I have the following indexes: CREATE NONCLUSTERED INDEX first_col_index ON some_table ( first_col,                                                                                third_col, some_date,                                                                                some_id);  CREATE NONCLUSTERED INDEX second_col_index ON some_table ( second_col,                                                                                third_col, some_date,                                                                                some_id);  and in the execution plan I can see the initial filtering is done with Index Seek operation. However, I only need the rows sorted in the final table, so if I eliminate the order by clauses from the inner queries: SELECT t.some_id AS id, t.* FROM some_table t JOIN (SELECT t.some_id FROM some_table t WHERE t.first_col= '123' AND t.third_col != 'aaa' AND t.some_date >= :someDate AND t.some_date<= :someOtherDate UNION SELECT t.some_id FROM some_table t WHERE t.second_col = '321' AND t.third_col != 'aaa' AND t.some_date>= :someDate AND t.some_date<= :someOtherDate) AS filtered_table ON t.some_id = filtered_table.some_id  ORDER BY t.some_date  I'm now seeing two Clustered Index Scans (which is on the primary key, some_id) with a simpler execution plan overall.  Why are my indexes not enough to perform Index seek in the second query (without ordering)? Which query would be faster given that I have roughly 500K records in the table? Is there a better way to improve query performance (with different indexes or with any additional index to perform union operation faster, or rewriting my query)?

Why is the following query slow?  select count(*)   from [dbo].[mt_dispatch_link]     , [dbo].[_mt_dispatch] [_mt_dispatch]  where   (mt_dispatch_link.contract_id_1 = _mt_dispatch.contract_id       and mt_dispatch_link.dispatch_id_1 = _mt_dispatch.dispatch_id)     or   (mt_dispatch_link.contract_id_2 = _mt_dispatch.contract_id       and mt_dispatch_link.dispatch_id_2 = _mt_dispatch.dispatch_id)     It takes over 10 minutes, and then I tend to stop it at that point. My question is more about how to make sense of the query plan.  Looking at the query plan I can see that the bottom clustered index scan is returning about 250000 records, but the cost is 0% and it is being put into a temporary table.  The top index scan is about 25000 records.  But the cost of 95% comes from the nested join. What conclusions should I draw from this?  The above query plan shows two index scans, does that mean it is doing 25000 + 250000 index scans, or does it mean that it is doing 25000 * 250000 index scans?  If I change the query to this (adding FORCESEEK):  select count(*)   from [dbo].[mt_dispatch_link]     , [dbo].[_mt_dispatch] [_mt_dispatch]       WITH (FORCESEEK)  where   (mt_dispatch_link.contract_id_1 = _mt_dispatch.contract_id       and mt_dispatch_link.dispatch_id_1 = _mt_dispatch.dispatch_id)     or   (mt_dispatch_link.contract_id_2 = _mt_dispatch.contract_id       and mt_dispatch_link.dispatch_id_2 = _mt_dispatch.dispatch_id)   I end up with a much better plan and the query runs instantly:    I ran update statistics on both tables. Didn't fix it unfortunately. The table design is not very good, so I think SQL Server doesn't really understand and is thus coming up with a poor query plan. Some more info about the table design at .  Why is the query optimiser not coming up with the optimum plan?


I understand it is an even function, which indicates $I=\frac{1}{2}\int_{-\infty}^{\infty} \frac{dx}{x^4+a^4}$  What should I do in the next step?

I have found a proof using complex analysis techniques (contour integral, residue theorem, etc.) that shows $$\int_0^{\infty}\! \frac{\mathbb{d}x}{1+x^n}=\frac{\pi}{n \sin\frac{\pi}{n}}$$ for $n\in \mathbb{N}^+\setminus\{1\}$   I wonder if it is possible by using only real analysis to demonstrate this "innocent" result?  Edit A more general result showing that  $$\int\limits_{0}^{\infty} \frac{x^{a-1}}{1+x^{b}} \ \text{dx} = \frac{\pi}{b \sin(\pi{a}/b)}, \qquad 0 < a <b$$ can be found in


Does Ubuntu Server 18.04 LTS support HPE ProLiant XL675d Gen10 Plus wiwh AMD EPYC 7742 CPU? Thank you.

I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it?


Let $f$ be differentiable at $c$ and let $\{a_n\}$ and $\{b_n\}$ be sequences such that $a_n<c<b_n$ and $a_n,b_n \rightarrow c$. Prove $\displaystyle \lim_{n\to\infty} \frac{f(b_n)-f(a_n)}{b_n-a_n} = f'(c)$  I know this problem is very similar to mean value theorem. However, it shows up before that chapter. I am wondering how to prove this one without using Rolle theorem and Mean Value theorem. I hope someone can give me some hint to think about.

Prove that $f'(a)=\lim_{n\to\infty}\frac{f(b_n)-f(a_n)}{b_n-a_n}$, with $f: (k_1,k_2)\to\Bbb R$ differentiable at $a\in (k_1,k_2)$, $\lim b_n=\lim a_n=a$, and $a_n<a<b_n$.   My attempt: Im trying to write the above equality as a particular case of this other equality that hold by any interior point $a$  $$f'(a)=\lim_{h\to 0}\frac{f(a+h)-f(a-h)}{2h}$$  Because $a_n<a<b_n$ then I can write  $$f'(a)=\lim_{n\to\infty}\frac{f(b_n)-f(a_n)}{b_n-a_n}=\lim_{n\to\infty}\frac{f(h_n+a)-f(a-j_n)}{h_n+j_n}$$  Where $h_n=b_n-a>0$ and $j_n=a-a_n>0$, where these two new sequences tends monotonically to zero.  Now my problem: my thought is that $h_n$ and $j_n$ are particular sequences then I can build a sequence $k_n$ such that $j_n$ and $h_n$ are subsequences so I can write:  $$\{h_n:n\in\Bbb N\}\subset\{k_n:n\in\Bbb N\}\text{ and }\{j_n:n\in\Bbb N\}\subset\{k_n:n\in\Bbb N\}$$  (I can build this $k_n$ by example doing $k_{2n}=h_n$ and $k_{2n-1}=j_n$) and then I have the desired expression  $$f'(a)=\lim_{n\to\infty}\frac{f(b_n)-f(a_n)}{b_n-a_n}=\lim_{n\to\infty}\frac{f(k_n+a)-f(a-k_n)}{2k_n}$$  My question:   Is this proof right? In particular Im unsure of the implicit statement "if the limit exist for $k_n$ then it must exist too for the particular case with $h_n$ and $j_n$". The use of two sequences, $h_n$ and $j_n$ in the limit make me unsure about the validity of this manipulation and assumption. There is a simpler/different way to prove the same?   Thank you in advance.


What is the role of rollbacks for badges on Stack Exchange?  Anyone told me it's used for badges; then, how do I get this?

What is a 'rollback' on Stack Exchange sites? I have seen this mentioned but I do not understand the term. Please note: This post is not a sandbox for performing rollbacks. Please do not perform rollbacks on this post without valid reason. If you want to try out a few rollbacks, do it  instead.   See also   in the Help Center


I wanted to switch to  in the handy dandy site switcher in the new top bar. Entering "cook" brings up nothing:     ... so I have to remember that the boutique title of the site is "Seasoned Advice":     ... in which case the site switcher also thinks that maybe I was thinking of heading over to  to see what's up. So the site switcher searches site names and descriptions, but not subdomains. This is unexpected behavior - I believe it should search all three.

EDIT Dec 4 -  We're doing it live! Please post bugs or concerns as questions tagged [top-bar]  We have rolled out our 95% completed top bar for feedback.  Note:   We are still adding a few final features, so if you have a request for a feature that is not there you might hold off on that for a day or two Yes, the bar is black1. Also give that a day or two to sink in.   I also want to specifically address the meta/main/chat links.  I'm very aware that many of you like having the links at the top of the page and that this new version is different.  The thought process behind moving these links is that the "site switcher" should be an automatic place to go when you are on a site and want to go to another one. If you haven't already developed the muscle memory for these links, getting between them required a bit of a cognitive load: You must first decide that you want to switch sites and then you have to decide which area to go to to switch.  Also, we find that less familiar users aren't entirely clear what a standalone link that says "main" or "meta" actually does... Not to mention that it hurts my UX sensibilities that we are dynamically changing links in an element that should be fixed.  It is true that we have added a click in the process, but we have also removed a lot of clicks for other common actions that are much more frequent than switching between main and meta.  All I ask is that you give it a few days and see if the new "switch sites at the top left" paradigm grows on you.  What do you think?  1.  points out that technically it's not quite black.


I want to prove the following lemma:  Let $B$ be a basis for $V$ and let $T_B: B \rightarrow W$ be a map. Then there exists a unique linear map $T_V: V \rightarrow W$ which extends $f,$ that is, such that $T_V(b)=T_B(b)$ for all $b \in B$  My attempt:  Any vector $v\in V$ can be written as a linear combination of the basis elements: $$v=\sum_{i}^{n} \alpha_{i} b_{i}, \quad b_{i} \in B$$  Where $\alpha_i$ are the coordinates of $v$ with respect to $B$. We can therefore write the transformation of $v$ under $T_V$ as: $$T_{V}(v)=T_{V}\left(\sum_{i}^{n} \alpha_{i} b_{i}\right)=\sum_{i}^{n} \alpha_{i} T_{V}\left(b_{i}\right)$$  Where in the last step I exploited the assumed linearity of A. This means that if $T_V(b_i)=T_B(b_i)\ \forall\ b_i\in B$ then the map $T_B$ has been 'extended' to $T_V$. To prove that $T_V$ is unique we consider another map: $T^{'}_V:V\rightarrow W$ defined over the basis elements $T_V^{'}(b_i)=T_V(b_i)=f(b_i)\ \forall\ b_i \in B$: $$ T_{V}^{'}(v)=\sum_{i}^{n} \alpha_{i} T^{'}_{V}\left(b_{i}\right)=T_V(v) $$ Is this sufficient to prove the Lemma? Is something missing/unclear/incorrect in my intend of a proof?

My professor has stated the following lemma:  Let $U$ and $V$ be two vector spaces and $B$ a basis for $U$. If $f:B\rightarrow V$ is a map, then there exists a unique linear map $A: U \rightarrow V$ such that $A(x)=f(x)\ \forall\ x\in B$  How can I prove this lemma? (This is not a homework problem.)


I am writing my CV using the moderncv package. I want to adjust the CV to meet my needs. Therefore I amplified the maximum number of parameters possible in the \cventry command. However, now I have some ugly spacing in case I do NOT use all parameters as shown in the attached pic (ugly spacing is marked with red). Please see also my MWE. In general there are two scenarios: First (please see the first red box), using four parameters I obtain ugly spacing. Second (please refer to second red box), using three parameters I obtain the same ugly spacing.  So, what I would like to obtain is to have "intelligent" commands. Depending on the number of parameters used (which will at least be three, as done in case of second red box), I want latex to collapse the spacing. Is that possible?    \documentclass[11pt,a4paper,sans]{moderncv} \moderncvstyle{banking} \moderncvcolor{blue} \usepackage[scale=0.7]{geometry} \name{John}{Doe} \title{Resume title} \address{street and number}{postcode city}{country} \phone[mobile]{+1~(234)~567~890}  \renewcommand*{\cventry}[9][.4em]{%  \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}% \ifthenelse{\equal{#4}{}}{}{\bfseries #4} & \ifthenelse{\equal{#5}{}}{}        {\bfseries #5\\} \itshape #3\ifthenelse{\equal{#6}{}}{}{, #6} & \ifthenelse{\equal{#2#7}{}}{\\}{\itshape #2\\} \ifthenelse{\equal{#7}{}}{}{#7\\}     \ifthenelse{\equal{#8}{}}{}{#8\\}%  \end{tabular*}%  \par\addvspace{#1}% }  \begin{document} \makecvtitle \section{Education} \cventry{Grade}{Degree}{Institution}{year--year}{M.Sc.}{Majors}{Majors}{} \cventry{}{Degree}{Institution}{City}{}{}{}{} \cventry{year--year}{Degree}{Institution}{City}{Grade}{Majors}{Majors}{} \end{document}

I am writing my CV using the moderncv package. I already have adjusted the CV to meet my needs. Therefore I amplified the maximum number of parameters possible in the \cventry command. However, now I have some ugly spacing in case I do NOT use all parameters (see second \cventry in the MWE for illustration):  Any suggestions to make the spacing collapse in case not all parameters are occupied? As you can see from the MWE I already have adjusted for \ifthenelse command. I use texlive 2014.  \documentclass[11pt,a4paper,sans]{moderncv} \moderncvstyle{banking} \moderncvcolor{blue} \usepackage[scale=0.7]{geometry} \name{John}{Doe} \title{Resume title} \address{street and number}{postcode city}{country} \phone[mobile]{+1~(234)~567~890}  \renewcommand*{\cventry}[9][.4em]{%  \begin{tabular*}{\textwidth}{l@{\extracolsep{\fill}}r}%  \ifthenelse{\equal{\bfseries #4}{}}{}{{\bfseries #4}} & \ifthenelse{\equal{\bfseries #5}{}}{}{{\bfseries #5}} \\%   \ifthenelse{\equal{\itshape #3}{}}{}{{\itshape #3\ifthenelse{\equal{#6}{}}{}{, #6}}} & \ifthenelse{\equal{\itshape #2}{}}{}{{\itshape #2}}\\%  \ifthenelse{\equal{#7}{}}{}{{#7}} & \ifthenelse{\equal{#8}{}}{}{\\ {#8} & \\}% \end{tabular*}%  }  \begin{document} \makecvtitle \section{Education} \cventry{Grade}{Degree}{Institution}{year--year}{M.Sc.}{Majors}{Majors}{} \cventry{}{Degree}{Institution}{City}{}{}{}{} \cventry{year--year}{Degree}{Institution}{City}{Grade}{Majors}{Majors}{} \end{document}


Hey so I have been trying to fix this problem for a couple of hours and checked a lot of the other questions extensively in an attempt to remedy this problem.   So in my Main Activity I have two activities that both either grabs an image from the gallery or is a photo depending on the button  public void DoTakePhoto(View v) {         Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);         if (intent.resolveActivity(getPackageManager()) != null) {             startActivityForResult(intent, TAKE_PICTURE);         }     }  public void DoShowSelectImage(View v) {     Intent i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);     startActivityForResult(i, SELECT_PICTURE); }   So I know the problem likes on my onActivityResult where the data seems to be null I tried using the super so it gets back the lost activity or checking to see if data is  @Override     protected void onActivityResult(int requestCode, int resultCode, Intent data) {          super.onActivityResult(requestCode, resultCode, data);           if (requestCode == SELECT_PICTURE || requestCode == TAKE_PICTURE  && null != data) {             if (resultCode == RESULT_OK && null != data) {                 Uri selectedimage = data.getData();                 String[] filePathColumn = {MediaStore.Images.Media.DATA};                  Cursor cursor = getContentResolver().query(selectedimage, filePathColumn, null, null, null);                 cursor.moveToFirst();                  int columnIndex = cursor.getColumnIndex(filePathColumn[0]);                 mImageFullPathAndName = cursor.getString(columnIndex);                 cursor.close();                 jobID = "";                 File file = new File(mImageFullPathAndName);                 Bitmap mCurrentSelectedBitmap = decodeFile(file);                  if (mCurrentSelectedBitmap != null) {                      ivSelectedImg.setImageBitmap(mCurrentSelectedBitmap);                       int w = mCurrentSelectedBitmap.getWidth();                     int h = mCurrentSelectedBitmap.getHeight();                      int length = (w > h) ? w : h;                     if (length > OPTIMIZED_LENGTH) {                         float ratio = (float) w / h;                         int newW, newH = 0;                          if (ratio > 1.0) {                             newW = OPTIMIZED_LENGTH;                             newH = (int) (OPTIMIZED_LENGTH / ratio);                         } else {                             newH = OPTIMIZED_LENGTH;                             newW = (int) (OPTIMIZED_LENGTH * ratio);                         }                         mCurrentSelectedBitmap =     rescaleBitmap(mCurrentSelectedBitmap, newW, newH);                     }                      mImageFullPathAndName = SaveImage(mCurrentSelectedBitmap);                 }             }         }      }   So my Error   java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { act=inline-data (has extras) }} to activity {com.example.zola.capchem/com.example.zola.capchem.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference   I have tried most of the things on this site but the app still ends up crashing. No clue what to do here.

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


I was thinking about cosets of this ring and my intuition is this ring is made of all possible polynomials of degree $n-1$. Is that right? Would I need to assume something more about $f$ or ring itself for it to be true? (Asking for polynomial with real coefficients, but can it be generalized?). I think I was able to prove that any polynomial of degree bigger than degree of $f$ can be written in the form $hf + g$ where deg $g<n$

Let $K$ be a field and $R=K[X]/(X^n)$ where $n \in \mathbb{Z}_{n\geq1}$ and $(X^n)$ is the ideal generated by $X^n$. We denote $x:=X+(X^n) \in R$, any equivalence class $r$ in $R$ has a representing element of the form: $$r=a_0+a_1X+ \dots + a_{n-1}X^{n-1}.$$  I am confused about the statement in bold. How would I find such an element for $X^3 \in K[X]$ if $n=2$ for example?


I was reading that space is very cold and also it is a vacuum, and so my question is quite simple, if temperature is the "jiggling" of atoms and molecules and heat is distributed through jiggling particles passing the energy by hitting other atoms thus cooling or getting  hotter. There is no particles in space so how can it have a temperature since it does not really pass the heat around and if so how can a object cool down in space?

Several different sources online state that the average temperature of interstellar space (or the universe in general) is around 2-3K.  I learned that temperature is basically the wiggling of matter, and I find it somewhat counterintuitive that the wiggling of so few particles can cause a temperature of 2-3K. Is there a (order-of-magnitude) calculation which can show that this average temperature estimation is correct, using an estimation of the average density of interstellar space (or the universe in general)?


I will confine my question to the simple case of constructing a linear fit of one independent variable $X$ and one dependent variable $Y$, with no intercept term.  The sample predictions are $\hat y_i = \beta x_i$. Define the $p$-norm as  $$L^p = \left(\sum_{i=1}^n \vert y_i - \hat y_i \vert^p \right)^\frac{1}{p}$$  And define the $L^p$-regression of a sample $\lbrace x_i, y_i\rbrace_{i=1}^n$  as  $\beta$ such that $L^p$ is minimized.  I know how to do a least-squares ($L^2$) regression by solving the normal equations. I have also seen a linear programming procedure that does $L^1$ regression (minimizes the mean absolute error). And in the general case, you can define a reasonable search space and use numeric methods to find $\beta$ for arbitrary $p$.   I am wondering about the $p=\infty$ case. It can be shown that   $$L^\infty = \max \lbrace \vert y_i - \hat y_i \vert \rbrace$$  so an $L^\infty$ regression would amount to finding the value of $\beta$ that minimizes the maximum error.  Can this be solved explicitly, or do I need to use numeric methods?

Is there any software package to solve the linear regression with the objective of minimizing the L-infinity norm.


Prove the following identity:  $$\sum\limits_{k=1}^{n} (-1)^{k+1}\frac{n \choose k}{k}= 1+\frac 1 2 + \frac 1 3 + \dots \frac 1 n \tag{1}$$  EDIT: Equation (1) above is proved via integration by @donaldsplutterwit. And I suppose this could lead to the equivalent identity below. However, still want to see if there is a more direct way to prove it.  Or equivalently, prove that when $n$ is even (see my attempt for why equivalent):  $$\sum\limits_{k=1}^{n-1}-1^{k+1}\frac{n-1 \choose k}{n-k} = \frac 2 n$$    My attempt:  I denote $S_n$ as the LHS of equation (1) and try to show $S_n-S_{n-1}=\frac 1 n$  Let   $$S_n = \sum\limits_{k=1}^{n}(-1)^{k+1}\frac{{n \choose k}}{k} = \sum\limits_{k=1}^{n-1}(-1)^{k+1}\frac{{n \choose k}}{k}+\frac{-1^{n+1}}{n}\tag{2}$$  Now,   $${n \choose k} = \frac{n}{n-k} {n-1 \choose k} = \left(1+\frac{k}{n-k}\right){n-1\choose k}$$  Substituting into equation (2):  $$S_n = S_{n-1} + \sum\limits_{k=1}^{n-1}(-1)^{k+1}\frac{{n-1 \choose k}}{n-k}+\frac{-1^{n+1}}{n}$$  We require: $$S_n-S_{n-1} = \sum\limits_{k=1}^{n-1}(-1)^{k+1}\frac{{n-1 \choose k}}{n-k}+\frac{-1^{n+1}}{n}=\frac1 n$$  This would imply:  $$\sum\limits_{k=1}^{n-1}(-1)^{k+1}\frac{{n-1 \choose k}}{n-k} = \begin{cases}\frac2 n, & n\%2=0\\     0,    & n\%2=1\end{cases}$$  The second case is easy to see since if $n$ is odd, the $k$ th term of the summation above becomes:  $$t_k = -1^{k+1}\frac{n-1 \choose k}{n-k}=-1^{k+1}\frac{(n-1)!}{k!(n-k)!}$$  And  $$t_{n-k} = -1^{n-k+1}\frac{n-1 \choose n-k}{k} = -1^k \frac{(n-1)!}{(n-k)!k!}=-t_k$$  So, every $t_k$ term is matched with a $t_{n-k}$ terms and they all cancel. Haven't managed to make progress on the case when $n$ is even.    Where did this identity come from? I was studying the  and for the case when all coupons have equal probabilities of being collected, we get the average number of draws until all coupons are collected:  $$E(X) = n \sum_i \frac 1 i$$  If the coupons have different probabilities given by $p_i$ we get:  $$E(X) = \sum_i \frac 1 p_i - \sum_{i<j}\frac 1 {p_i+p_j}+\dots +(-1)^{n+1}\frac{1}{p_1+\dots +p_n}$$  Substituting $p_i=\frac 1 n$ for all $i$ into the second equation and substituting into the first leads to equation (1).

Calculate  $\sum_{k=1}^n (-1)^{k+1} \binom{n}{k}\frac{1}{k}$, I do not know hot get rid of that $k$, for me it is similar like  $\binom{n}{k}=\frac{k}{n} \binom{n-1}{k-1}$, do you have some idea?


My dynamics lecture notes repeat the Earth's equatorial bulge can be approximated as: $$ \approx \frac{\Omega^2R}{g} \approx \frac{1}{300} $$ (Do they mean R/300?)  They also include statements like:  "The Earth's oblateness  $ \frac{I_3-I_1}{I_1}\approx \frac{\Omega^2R}{g} \approx \frac{1}{300} $"  Could anybody explain where this comes from? I have tried several ways to balance the gravitational and centripetal forces but I never seem to arrive at the correct result and cannot get my head around this concept.

I made a naive calculation of the height of Earth's equatorial bulge and found that it should be about 10km.  The true height is about 20km.  My question is: why is there this discrepancy?  The calculation I did was to imagine placing a ball down on the spinning Earth.  Wherever I place it, it shouldn't move.  The gravitational potential per unit mass of the ball is $hg$, with $h$ the height above the pole-to-center distance of the Earth (call that $R$) and $g$ gravitational acceleration.  Gravity wants to pull the ball towards the poles, away from the bulge.  It is balanced by the centrifugal force, which has a potential $-\omega^2R^2\sin^2\theta/2$ per unit mass, with $\omega$ Earth's angular velocity and $\theta$ the angle from the north pole.  This comes taking what in an inertial frame would be the ball's kinetic energy and making it a potential in the accelerating frame.  If the ball doesn't move, this potential must be constant, so  $$U = hg - \frac{(\omega R \sin\theta)^2}{2} = \textrm{const}$$  we might as well let the constant be zero and write  $$h = \frac{(\omega R \sin\theta)^2}{2g}$$  For the Earth,   $$R = 6.4*10^6m$$  $$\omega = \frac{2\pi}{24\ \textrm{hours}}$$  $$g = 9.8\ m/s^2$$  This gives 10.8 km when $\theta = \pi/2$, so the equatorial bulge should be roughly that large.    , the Earth is 42.72 km wider in diameter at the equator than pole-to-pole, meaning the bulge is about twice as large as I expected.  (Wikipedia cites diameter; I estimated radius.)  Where is the extra bulge coming from?  My simple calculation uses $g$ and $R$ as constants, but neither varies more than a percent or so.  It's true the Earth does not have uniform density, but it's not clear to me how this should affect the calculation, so long as the density distribution is still spherically-symmetric (or nearly so).  (Wikipedia also includes , without derivation, that agrees with mine.)


Why does my code work, when I use " in the following code:  for(int i=0;i<7;i++){         if(grid[row][i]!=0){             if(player == "yellow"){                 grid[row][i-1] = 'y';             }             else if(player == "red"){                 grid[row][i-1] = 'r';             }         }     }   But don't work, when I use ' in the following code:  for(int i=0;i<7;i++){         if(grid[row][i]!=0){             if(player == 'yellow'){                 grid[row][i-1] = 'y';             }             else if(player == 'red'){                 grid[row][i-1] = 'r';             }         }     }   It is always saying, "Invalid character constant".    - grid is a 2 dimensional char variable    - row is an interger    - player is the super class (window) protected and in the constructor of the super    class occupied with the value yellow:  protected String player;  public window() {     player = "yellow"; }

Is there a difference between single and double quotes in Java?


I am wondering how to find and install Wi-Fi network drivers for a “Broadcom Inc. and subsidiaries BCM43228 802.11a/b/g/n” device on a Lenovo ThinkPad Twist s230u laptop. I’m a newbie to Ubuntu and here is what I have done so far… Installed 20.04 alongside Windows 10 and since I did not have a network connection the installer did not offer the update option. After reboot, the Wi-Fi does not work. Found an article so tethered with my iPhone and did a software update successfully, but still no Wi-Fi. Found an article to list the network devices and below are photos of the results from the “lshw -C network” and “lspci” commands. Sorry for the glare but I do not know how else to get the command results to here from the offline laptop. If they are a problem, I can come back on from the laptop using the tether again, but I do not have access to it right now. Found an article about disabling Windows fast startup, which I have not tried yet. I have more searching to do, but thought I would start with this post. Thanks in advance!

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I have a JC Higgins girls bike (flightliner ??) with the serial number 502 45390 185598 that I'm trying to identify the model year. Any help?

We often get questions on bicycles.stackexchange about identifying a bicycles manufacturer, model, make, and year.  Often these questions are downvoted or closed -- usually with a comment attached to them that it's not necessary to know the exact model/make/year of a bicycle if you want to fix, repair, or ride your bike. Why should owners not care about the model/make/year of their bicycle? Especially when it comes to less expensive bikes (aka BSOs) and BMX bicycles? This is intended as a canonical question that we can point closed questions to. Also see      (generally not helpful for identifying a brand/model)


Let $f\colon(0,\infty)\to\mathbb R$ be differentiable on $(0,\infty)$ and suppose that $\lim\limits_{x\to\infty} f'(x)=L$.         a. Show that for any $h>0$, $\lim\limits_{x\to\infty} \frac{f(x+h)-f(x)}h=L$.      b. Show that $\lim\limits_{x\to\infty} \frac{f(x)} {x} =L$.   this is a differentiation question.  i don't know how to solve this question  Because it is Korean, it is difficult to deal with this cite. So for me, it is not easy to write.  thank you

Let $f:[0,\infty)\rightarrow R$ be differentiable on $(0,\infty)$ and assume that $f'(x)\rightarrow b$ as $x\rightarrow\infty$.  (a) Show that for any $h>0$, we have $\lim_{x\rightarrow\infty}\frac{f(x+h)-f(x)}{h}=b$.  (b) Show that if $f(x)\rightarrow a$ as $x\rightarrow\infty$, then $b=0$.  (c) Show that $\lim_{x\rightarrow\infty}\frac{f(x)}{x}=b$.  Note: this is exercise 6.2.16 from "Introduction to Real Analysis" by Bartle & Sherbert, that I'm using for self-study.  Part (a) is an easy one, but am stuck with parts (b) and (c).  My solution to part (a) would be as follows:  By definition, $\lim_{x\rightarrow\infty}f'(x)=b$ means that for all $\epsilon>0$ there exists $K(\epsilon)$ such that if $x>K$, then $|f'(x)-b|<\epsilon$. Now, for given $h>0$, it is that $x+h>K$ too, and by MVT there exists $c$ such that $x<c<x+h$ and $f'(c)=\frac{f(x+h)-f(x)}{h}$. As $c>K$, then $\lvert f'(c)-b \rvert <\epsilon$ too, and thus $\left|\frac{f(x+h)-f(x)}{h}-b\right|<\epsilon$ for all $x>K$; which, by definition, means that $\lim_{x\rightarrow\infty}\frac{f(x+h)-f(x)}{h}=b$.  Another note: Bartle & Sherbert book has no solutions for all exercises, but for many of them there exist publicly available solutions. For this one, however, the only solution available is   However, arguments provided there to prove parts (b) and (c) just don't seem rigorous enough to me.


Question     Prove that for $a,b,c \geq 0$, we have   $$\frac{a(a^2-b^2)}{13a^2+5b^2} + \frac{b(b^2-c^2)}{13b^2+5c^2} + \frac{c(c^2-a^2)}{13c^2+5a^2} \geq 0$$   Attempts  I've tried the proving using:   Cauchy's inequality AM-GM inequality Trying to find a way for Jensen's inequality   but I don't get anywhere.  Note  I know this might be done using critical points and verifying that the minimum is positive, but the calculations get really messy. I'm just wondering if there's a clean way of proving it.

Let $a$, $b$ and $c$ be positive numbers. Prove that:   $$\frac{a^3}{13a^2+5b^2}+\frac{b^3}{13b^2+5c^2}+\frac{c^3}{13c^2+5a^2}\geq\frac{a+b+c}{18}$$   This inequality is strengthening of the following Vasile Cirtoaje's one, which he  created in 2005.     Let $a$, $b$ and $c$ be positive numbers. Prove that:   $$\frac{a^3}{2a^2+b^2}+\frac{b^3}{2b^2+c^2}+\frac{c^3}{2c^2+a^2}\geq\frac{a+b+c}{3}.$$   My proof of this inequality you can see here:   But this way does not help for the starting inequality.  A big problem we have around the point $(a,b,c)=(0.785, 1.25, 1.861)$ because the difference between the LHS and the RHS in this point is  $0.0000158...$.  I tried also to use Cauchy-Schwarz, but without success.  Also, I think the BW (see here  I tryed!) does not help.


Suppose I have a table in excel containing 1000 rows and 10 columns. How can I copy every 7th row from this table to a new table whose first row will be this 7th row, second row will be that table 14th row and so on.  I have never done these kind of things in excel before. How to do it?

I have an Excel spreadsheet with 1 column, 700 rows. I care about every seventh line. I don't want to have to go in and delete the 6 rows between each row I care about. So my solution was to create another sheet and specify a reference to each cell I want.  =sheet1!a1 =sheet1!a8 =sheet1!a15   But I don't want to type in each of these formulas ... `100 times.I thought if I selected the three and dragged the box around, it would understand what I was trying to do, but no luck.  Any ideas on how to do this elegantly/efficiently?


I have simple text file named "example".  Reading with terminal command: cat example  Output:  abc cdef ghi jk lmnopq rst uv wxyz   I want to convert (transform) into following form: (expected output from cat example)  abc cdef ghi jk lmnopq rst uv wxyz   How can I do this via the command-line?   (This is only an example file, I want to convert word's position in vertical-column)


I am looking at adding a new javascript library to drupal 8. I want the ability to call this library from other modules / libraries.  The way WordPress does this is by the use of wp_enqueue_scripts. Using a common library would make sure that my library is loading just once.  An existing implementation of this in drupal is the way you can add dependencies into your the yml files  js:  dependencies:   - core/jquery   Is there a way I can add my own javascript library as the dependency that can be used throughout my drupal instance (all modules and themes should be able to use this as a dependency)

Here is an example of my *.info file.      Why the page cannot load the CSS that I add myself?


Can anyone explain the paradox of observing a non-significant Pearson correlation although that independent variable should be included in the Regression model?

I have 4 IVs in my model that directly effect the DV. The  of the correlation & regression analyses showed that:  IV1&DV:   Pearson Correlation Coefficient: insignificant  Regression Beta&t values: significant  IV2&DV:  Pearson Correlation Coefficient: significant  Regression Beta&t values: insignificant  IV3&DV:   Pearson Correlation Coefficient: significant  Regression Beta&t values: significant  IV4&DV:   Pearson Correlation Coefficient: significant  Regression Beta&t values: significant  No multicollinearity problem was detected and also all the regression assumptions have been perfectly met!  Why the results of the regression analysis turned out to be completely opposite of correlation analysis for IV1 and IV2?!! Why they're being contradictory?! Does it make any sense? Is it acceptable? TQ.


Recently I received the "Tenacious" badge and noticed lots of answers I have posted had received 0 votes. So I started from the oldest ones and worked my way to the recent ones, deleting the bad and/or somewhat worthless posts on my mobile.  Every time I clicked the "Delete" link, I had to confirm twice. Bug or feature?  (Samsung Galaxy S III on Android 4.1.2)

Attempting to delete questions on the mobile site on iOS causes two notification messages asking me to confirm the deletion, which it shouldn't do.  I haven't really looked into it, but it may just be that the handlers from full.js and mobile.js are both being triggered, as there seems to be the flash of the error dialog indicating something went wrong on the supposed second AJAX request when the response from the first triggers a page reload.  You can see this happening by following the method calls; the mobile view first calls   StackExchange.question.init() -> StackExchange.question.fullInit()   -> StackExchange.vote.init()     -> u()    ...where u() sets a delegated click handler on  $("div.post-menu *[id^='delete-post-'], table.flagged-posts *[id^='delete-post-']")   ...that calls .preventDefault() on the event, but doesn't block other handlers from firing.  It then later calls StackExchange.mobile.init(), which in turn calls the method J() that sets up a similar handler directly on $(".delete-post").  Since both handlers get triggered, there's two confirmation dialogs, and two attempts to delete the post. The extra handler in mobile.js seems unnecessary, so just removing it would appear to be the easy fix to the problem.


I have a shapefile layer with several points, each with its own ID. The attribute table just shows the IDs of these points. Now I want to add two new fields with the coordinates (lon/lat). I'm using QGIS 3. Principally, this works fine by using the $x / $y expression. The problem for me now is: These expressions return the coordinates as UTM, e.g. 351660.879 / 5056379.192. But I'd like to have the decimal degree equivalent! In case of the example 13.1280 / 45.6465 Is there any option that leads the field calculator to return decimal degrees?

How do I easily calculate the lat/long of points using the QGIS Field Calculator? I saw a previous related question (), but it deals with a more advanced approach. In ArcGIS Desktop this is similar to the Calculate Geometry function; I just can't find where do this in QGIS.


The following matrix is my desired matrix form :  I attempted to use the nice matrix environment since it offers a solution encircling/squaring rows and elements as seen in this photo above. The only problem is that I couldn't find a way to obtain the blocked partition as seen in the photo and I have scanned this manual  and their partitioning of the matrix would look like two lines intersecting each other different from what I need here in this photo. Therefore, I would hope someone could assist me in writing a code to obtain this matrix as it is in this photo and I would be very much thankful.

I have a matrix and need to highlight some elements in the matrix. I have found how to highlight a single element (I want to put the cell in the square):  $$ A = \begin{bmatrix} \fbox{0} & \fbox{0} & 0 \\  \fbox{0} & \fbox{0} & 0 \\ 1 & 1 & 1 \\  \end{bmatrix}$$   But how can I outline elements of the submatrix like in the picture below? I need just a frame where some elements are located.


Am I missing something?  Or do comments not allow for any formatting (bold, bullets, hyperlinks, etc)?

Across the Stack Exchange network you may leave comments on a question or answer.  How do comments work? What are comments for, and when shouldn't I comment? Who can post comments? Who can edit comments? How can I format and link in comments? My comment doesn't contain some of the text I typed in it; why? My comment appears to be long enough, but I can't post it because it's too short; why? Who can delete comments? When should comments be deleted? Why can't I comment on specific posts even if I have enough reputation to comment? When can comments be undeleted? What are automatic comments? How can I link to comments? Anything else I should know about comments?  Also see the FAQ articles on  and .


consider there a directory called hello world in the current directory. Yes the directory has a space in it. For sake of example lets say it has a file called f1.txt.  ls 'hello world'   will print  f1.txt   but  a="ls 'hello world'" $a   say  ls: cannot access ''\''hello': No such file or directory ls: cannot access 'world'\''': No such file or directory   So the question is how to make ls list the directory hello world. Basically how to this  a="1 2" b="ls $a" $b   to actually list the contents of the folderhello world  PS: I don't want to do  a="1 2" ls $a   I want to store it and only then run it

$ ls -l /tmp/test/my\ dir/ total 0   I was wondering why the following ways to run the above command fail or succeed?  $ abc='ls -l "/tmp/test/my dir"'  $ $abc ls: cannot access '"/tmp/test/my': No such file or directory ls: cannot access 'dir"': No such file or directory  $ "$abc" bash: ls -l "/tmp/test/my dir": No such file or directory  $ bash -c $abc 'my dir'  $ bash -c "$abc" total 0  $ eval $abc total 0  $ eval "$abc" total 0


How can I add a new line to an array? The array is currently empty. I tried this but it didn't work string[] testarray; testarray[0] = "Lorem ipsum dolor sit amet"; testarray[1] = "example text 1";  int i = testarray.Length; i++; testarray[i] = "example text 2";  Thanks

How to add new item in existing string array in C#.net?  I need to preserve the existing data.


I'm using the following code to draw the electron wavefunction around an atom. I'd like to fade out the line towards it's end. I've read all the relevant questions I can find, but I fail to get what I want.  Do you have any ideas?  \documentclass[]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=3,very thick] \draw[color=red,domain=0:12.56,samples=200,smooth] plot (canvas polar cs:angle=\x r,radius={28-8*sin(2.25*\x r)});  \draw[dashed,domain=0:6.28,samples=200,smooth] plot (canvas polar cs:angle=\x r,radius={0.5 r}); \draw[fill=black](0,0)circle (.5mm); \end{tikzpicture} \end{document}

How can I get a path following color gradient in TikZ? Here a quick example of the idea. On the left the result I'm looking for and on the right an example of a non path following gradient applied on a path.    It looks like the TikZ shading library isn't covering this.  Related questions:    .


DISKPART> attributes disk Current Read-only State : Yes Read-only  : No Boot Disk  : No Pagefile Disk  : No Hibernation File Disk  : No Crashdump Disk  : No Clustered Disk  : No  DISKPART> attributes disk set readonly  Disk attributes set successfully.  DISKPART> attributes disk Current Read-only State : Yes Read-only  : Yes Boot Disk  : No Pagefile Disk  : No Hibernation File Disk  : No Crashdump Disk  : No Clustered Disk  : No  DISKPART> attributes disk clear readonly  Disk attributes cleared successfully.  DISKPART> attributes disk Current Read-only State : Yes Read-only  : No Boot Disk  : No Pagefile Disk  : No Hibernation File Disk  : No Crashdump Disk  : No Clustered Disk  : No  DISKPART>   How do I set the "Current Read-only State" to "No"? The regedit "writeProtect" method doesn't work. Re-formatting doesn't work. No physical switch on a microSD.  Card is read by card reader of the same brand.  What happened prior to this situation: Card was working top-notch. Then I didn't use it for a couple of months, so it was just laying around in a suitable environment. Now I plugged it in and it is set to read-only.  P.S.: It is a Transcend card, not SanDisk.

When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch.  Why did this happen and what can I do about it? Is there a way to remove the write protection?  (Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives. In some cases, the system may report that the drive or card was formatted successfully even though it was never actually formatted; the original data reappears when the device is reinserted.)     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


Can we have tooltip under date / share comment link changed from useless (as I think) timestamp to clear meaning of its function (i.e., "Share this comment")?  I've been using Stack Exchange for over a year and I , nor can I find any reasonable arguments for what use is there to have the timestamp displayed in the tooltip.  Per comments, I see that timestamp is useful. This leads us to a question: Why we can't have both? For example: Posted on 2014-08-27 14:20Z. Use this link to share this comment?

I have seen many people share links which go directly to a specific comment. I wanted to do this too today but I couldn't figure out how. I had to search here on Meta to find this Q&A:    It turns out that the timestamp beside each comment is actually a link to that comment.  I have a few problems with the way this works currently:   This was not intuitive to me The timestamp is not formatted like a link, infact it is often greyed-out or otherwise unemphatic The text of this link is contextual ("yesterday" vs. "19 hours ago" vs. "Dec 19 '11 at 17:48") which makes me have to think about where to look for the link   Can we somehow improve the UI of comments so that the perma-link is more intuitive to find?


If we could abort a committed transaction, what would happen with durability? Then durability would not be ensured, right? Note: I mean undoing a committed transaction by aborting

Once a transaction has been committed, we cannot undo its effect by aborting it. We have the log file that has all information to undo a committed transaction, so why is this not possible? We should be able do the same with a committed transaction as we can with an aborted one.


My code to create an executable script  touch script.sh && echo "echo 'Hello World'" > script.sh && sudo chmod +x script.sh

I would like a script that will show me the percentage of reserved blocks. If it can done another way, that is good.  This works if I manually make it executable. Can I make it executable from within the script itself?  cat > somescript.sh << \EOF #!/bin/bash  block_count=$(sudo tune2fs -l /dev/sda1 | awk '/^Block count:/ {print $NF}') reserved_block_count=$(sudo tune2fs -l /dev/sda1 | awk '/^Reserved block count:/ {print $NF}')  perl -e 'printf("%.1lf%%\n", ($ARGV[0] * 100.0 ) / $ARGV[1])' "$reserved_block_count" "$block_count" EOF


I'd love to be able to preview the alpha value of a material in the 3d viewport, but I can't figure out how to do it.  I add a material and animate it:   Assign a material to the default cube Enable transparency for the material Insert a keyframe for Alpha value (Z Transparency) Move the timeline to 20 Set the alpha value to 0 Insert another keyframe for the Alpha value   I have enabled GLSL shading in the viewport properties and Texture viewport shading in the panel. When I scrub to frame 10 the Alpha value of the material is 0.5, yet it is still fully opaque in the viewport. I can render the frame and see that the material is semi-transparent. Oddly, if I toggle some Material options (e.g. Traceable), the material is displayed as expected in the viewport, but when I scrub the timeline (or alt-a to play) it isn't updated.  I'm not sure if this is a bug, or if I'm just leaving out some setting to trigger the update of the viewport display. I've tested with 2.71 and 2.72 using both an Intel and an Nvidia GPU.

I'd like to do motion graphics type work in blender and it would be really helpful if I could see the results of keyframing material opacity to cut items in and out of view.  Blender internal is sufficient, using shadeless materials.  I could have swore there used to be something in view options.  Any ideas?


I am trying to referencing a different subfigures in the following LaTeX with the clever reference   \begin{figure}[h]   \centering   \begin{subfigure}{.49\linewidth}     \centering     \includegraphics[scale=.49]{test_data/test_data1}     \label{fig:first-score}     \caption{}   \end{subfigure}   \begin{subfigure}{.49\linewidth}     \centering     \includegraphics[scale=.49]{test_data/test_data2}     \label{fig:second-score}     \caption{}   \end{subfigure}     \begin{subfigure}{.49\linewidth}     \centering     \includegraphics[scale=.49]{test_data/score_combibed_test_data}     \label{fig:score-combined}     \caption{}   \end{subfigure}   \caption{Score test data}   \label{fig:score-res} \end{figure}   Then when I do \cref{fig:first-score} it reference the section instead of the subfigure. What should I do to get it to refence the subfiugre?  I have include the subcaption package.

\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


I've only used a window operating systems in my life. I just began using Ubuntu 14.10 about a week ago after my old Windows OS was corrupted.  Using Ubuntu 14.10, how does change the firewall settings?  I'm unable to locate the the old Firestarter firewall program I've read about.  Also, virus scanning software, is this necessary with Ubuntu?  I've read of a virus software called ClamAV and ClamTK, but i think i am reading from an outdated book.  Any help would be great.

Does Ubuntu come with a preinstalled or automatic firewall? If not, do I need one?   I've read some articles about the advantages of Linux over other operating systems about security (no need to have antivirus, ...) but would like to be sure.


Is there a quick way to sort an attribute table in QGIS in ascending order permanently and save it? When you make a map with proportional circles in QGIS the circles overlaps between each other according to their sorting order. I want the smaller circle above the bigger which is why I think sorting can solve this issue.  Note: If I click on the header, the table will be sorted in ascending order using the clicked column. However, if I save it that way and I open it again nothing has changed about row order.

I have a shapefile and I want to change the order of the features. Is that possible? I want to sort the features in the shapefile because I'm embedding this shapefile in a mobile app. The app will display a list of features, and although I could do the sorting at load time, I'd prefer to have them sorted.


Been searching but still not sure what to do...  I have one computer with Windows7 and set up perfectly how we need it (programs, files, restrictions, etc...). I bought 4 more of the exact same computers for the office that I want set up exactly the same.  How can I create an image or bootable USB that encapsulates the one that is set up and install it on the new computers? Is sysprep the way to go?  Also, the new computers do not have anything installed on them. No OS, or anything at all.  Thanks in advance!

Part 1 is here if anyone is interested:      I've got 100 PC's to setup. Is it possible to set up 1 of these PC's   with software, drivers, settings, configs, licenses etc, then   clone/image exactly the same setup onto the other computers where each   computer would have a different computer name, different user name for   each application etc?   Basically, I found that I cannot use sysprep to prepare the system for cloning with CloneZilla.  This is because sysprep pulls the OEM key out of the image from Dell computers.  We have Dell computers.  So, as all the 100 computers are identical, how do I prepare the system for cloning, before using CloneZilla?


I am trying to read values from a file to a vector  std::vector<float> setTimesArray (std::string flName){     int i=0, dummy=0;     float temp;     std::vector<float> pObs;     std::string line;     std::ifstream inFile;     inFile.open(flName.c_str());     if(!inFile){         std::cout<<"\n.obs file not valid. Quitting programme...";         exit(1);     }     while(inFile.good()){         i++;         getline(inFile, line);         if(i>=3){ //I don't want first two lines             std::istringstream in(line);             in>>dummy;//discards first value in the line             in>>temp;             pObs.push_back(temp);             in.str(""); //discards remaining part of the line         }              }     return pObs;     inFile.close();     }   Problem is, the last value gets repeated. For example, flName had total 975 lines. Thus pObs must be having size=973 (975-2 initial lines). But the size is 974 and I see that the last value is repeating. What mistake have I made?

The following C++ code uses a ifstream object to read integers from a text file (which has one number per line) until it hits EOF. Why does it read the integer on the last line twice? How to fix this?  Code:  #include <iostream> #include <fstream> using namespace std;  int main() {     ifstream iFile("input.txt");    // input.txt has integers, one per line      while (!iFile.eof())     {         int x;         iFile >> x;         cerr << x << endl;     }      return 0; }   input.txt:  10   20   30   Output:  10   20   30   30   Note: I've skipped all error checking code to keep the code snippet small. The above behaviour is seen on Windows (Visual C++), cygwin (gcc) and Linux (gcc).


On Windows 7, I have to check a box, at the bottom of the Processes tab in Windows Task Manager and I find a list of 14 svchost.exe Windows Services running. It says Host Process for Windows Service. Does that mean it is okay or could it be anything?  I am not a Geek or Super user so this tells me nothing. So I right click on one of them and choose, Go to Services. It flips me over to the Services tab and 5 Services are running. They are all local services and all running. (WidiServiceHost, fpdHost, khmsvc, netprofm and nsi) Daugh. I think it is really Windows but still don't know for sure. How do I know what's what?  So I go back to the Service, right click and choose, Create Dump file. Go to Windows Explorer, MyUserName/App Data/Temp and find the file svchost.DMP file, 53,128 KB, but windows cannot open it. Try Open Office. No Joy. Go to the web Find instructions.  Tired out. Giving up. Can you make it easier? How do I know when a service is good, bad or ugly?

Running Windows 7  I'm trying to boost the startup speed of my computer and I'm going through "msconfig" and "services.msc" to disable some applications from starting up automatically when the computer turns on.  There are some good sites that document the entries found in the "Processes" tab of the task manager.  You can find out if they are safe to kill, who the manufacturer is, and what the process in question is used  for.  Are there any sites that list startup processes &| services that are safe to kill?  For example, there is an entry in msconfig that just says "Computer Browser" - pretty vague, but seems like something to not kill.  On the other hand, there is an entry in msconfig that says "Extensible Authentication Protocol" - pretty specific and seems like it shouldn't be killed, but how can I know for sure?  Does anyone know if there are any websites documenting the "killable" items listed in both msconfig & services.msc?


(Pure javascript only, please!)   I want to create a helper function that removes a single class from a div with several classes. I'm imagining a function as follows:  function remove_class(div, klass) {     div.className = div.className.replace( /(?:^|\s)active(?!\S)/ , '' ); }   The class removed here is active.  However, how can I remove any class name, ie. one passed as the klass variable?

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


Just installed Kubuntu 17.04 on my computer.  When the lock screen comes on the time is shown as am/pm while I want to have it in 24 hours format. The date comes as yyyy.MM.dd.day, which I wanted to have it dd.month.yyyy.day (15.07.2017.Saturday).  I found an answer on Ask Ubuntu saying I should make changes on InfoPanel.qml. I could not find this file at the specified address, instead I found Clock.qml. I went through this file, found the relevant lines and made my changes accordingly. When I do Ctrl+Alt+L it displays OK it seems.  But after I closed programs and log off when I restart again or reboot my laptop it still uses the am/pm and the yyyy.MM.dd.date day again.  After logging in if I do Ctrl+Alt+L then it is OK again.  How can I get the correct format every time I log in, from the first boot of the day?

Running Kubuntu with the Plasma desktop, 16.04.   I have my desktop configured to 24-hour time, which is what I vastly prefer.   But when the lock screen comes on, it shows me the detested AM/PM format. This cannot stand. Yet after diligent searching, I am unable to find a solution.   Is this configurable in KDE?


Find the posterior distribution when      $$x|\sigma\sim \mathcal N(0,\sigma^2),\:\:\: 1/\sigma^2\sim \mathsf{Gamma}(1,2)$$   I'm stuck in this exercise, I know that $$\pi(x|\sigma)\approx f(x|\sigma)\pi(\sigma)\cdot\frac{1}{m(x)}$$  Maybe I am thinking wrong, but I would not have to find a prior of $\sigma$?

I need to update the failure rate (given as deterministic) based on new rate of failure about the same system (it is a deterministic one too). I read about conjugate priors and Gamma distribution as a conjugate for the Poisson process.   Also, I can equate the mean value of Gamma dist. ($\beta/\alpha$) to the new rate (as a mean value) but I do not have any other information such as standard deviation, Coefficient of Variation, 90th percentile value,...etc. Is there a magic way to manipulate that and find parameters for the prior Gamma hence I get the posterior which Gamma too?


I am implementing an interface in Java like this:  public interface Stack <E>{     public int size();     public boolean isEmpty();   the class that implements it:  public class StackArray<E> implements Stack<E>{     private Object list[];     private int top=-1;     public StackArray(int n){         list=new Object[n];     }   this works quite well, so when I called it I do this:  public static void main(String[] args) {         // TODO code application logic here         StackArray<Students> st=new StackArray<>(4);   so how I can implement that, but using generics, I have tried this:  public class StackArray<E> implements Stack<E>{     private E st[];     private int top=-1;     public StackArray(int n){         st=(E[]) Array.newInstance(null, n);     }   but I got a nullPointerException, is there a way to surpase this?

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


I am trying to make fried salmon in my stainless steel pan. My goal is to have a nicely browned exterior, but I keep running into the same problem: Once the outer layer of the salmon starts to brown, it sticks to the bottom of the pan, and peels right off the fillet when I try to turn the fish over.  The answers to  similar question all seem to be focused on heating the pan before putting the fish in. This doesn't seem to work in my situation. I am already preheating the pan for a couple of minutes. In case it makes a difference, I have been using olive oil.  Is there a special trick to searing salmon in a stainless steel pan (I prefer to avoid pans with non-stick coatings) without the bottom of the fish peeling off as soon as it browns? Am I just doing this entirely wrong?

I think Anne Burrell lied to me. She said fish will always stick to a stainless pan. This is true. No matter how well I lubricate my pan, my fish will always adhere like cement. She also said that the pan will release the fish "when it's ready." Maybe meaning it will eventually become unstuck when the fish is done cooking? Well, I've tried that, and it never works. No matter how long I wait, it never becomes unstuck. Most recently I gave it as much time as I could. When I finally chiseled it off the pan, tearing it apart in the process, I saw that it was starting to burn on that side. I've started going back to non-stick until I get this figured out.  Are there any tips? Am I heating the pan wrong? Does it help to slide the fish around a bit after putting it in the pan?


I have a card named , the effect of this card is "For each creature you control, Search your library for a creature with the same name and put it onto the battlefield. Then Shuffle your library".  After this phase can I then attack with the creatures gained this way or do they suffer from summoning sickness?  My guess is that If they do not have haste they suffer but doubling them seems to suggest a mirroring of the original creature at the time... Its a vague mechanic in all honesty

Note: this is intended to be a canonical question about summoning sickness.  "Summoning sickness", broadly, is the rule that stops you from attacking or paying {T} costs with a creature that you just played. But how exactly does it work? How does it interact with other rules and effects?  For example, if I'm trying to figure out how a creature is affected:   Does the status matter (tapped/untapped, face down/face up, etc.)? What if it came into play, but I didn't cast it? What if it's a token? What if it was on the battlefield when my turn started, but it wasn't a creature? What if it stops being a creature? What if it's a creature and also another card type? What if it's a double-faced card that just transformed? What if it changes control? What if it's a copy of another creature? Which of the creature's activated abilities can I use? Are any of its other abilities affected? Can I tap the creature to pay a cost that is not a {T} cost?   (These examples are primarily taken from questions about summoning sickness that have already been asked on the site)


Why can't it no be $\pm$ Infinity?   If $x/1$ is $x$ then $x/0$ should be $\pm$ Infinity.

(This was asked due to the comments and downvotes on this  answer. I am not that good at maths, so was wondering if I had made any basic mistakes)  Ignoring limits, I would like to know if this is a valid explanation for why $\frac00$ is undefined:     $x = \frac00$    $x \cdot 0 = 0$        Hence There are an infinite number of values for $x$ as anything multiplied by $0$ is $0$.   However, it seems to have got comments, with two general themes.  Once is that you lose the values of $x$ by multiplying by $0$.  The other is that the last line is:      $x \cdot 0 = \frac00 \cdot 0$   as it involves a division by $0$.  Is there any merit to either argument? More to the point, are there any major flaws in my explanation and is there a better way of showing why $\frac00$ is undefined?


I have checked on this site and found the subject on how to edit subject in Gmail. When I click on the more button next to reply tick, then click on reply in the list offered, it does not show an edit subject as suggested in the answers already given. I merely get sent to the area to compose my reply.  As I have done everything as suggested, please can anyone help?

For , the answer given on 7 Feb about how to edit the subject line in the new format of Gmail does not work for me.   There is no box on the left with a down arrow to options to reply, forward or edit subject in my version. There is a book on the right offering options to    Reply Reply to all Forward Filter message Print Delete Report spam Report phising Show original Message text garbled Translate message Mark answered    But, no option to edit subject


Under "Travel And Criminal History" I answered the question "25. Have you been issued any visa for the UK, UK Overseas Territories or Commonwealth Country in the last 10 years?" in the negative.  However, I have been to Singapore & Malaysia (Commonwealth countries) and have mentioned the travel details under foreign travel. How do I make this error known to the relevant authorities?  Update: The student immigration office at my university has asked me to attach a cover letter that mentions these details. Whom should I address this to?

I'm married have a job with stable income.I have 2 kids. I have applied for UK visit visa about 7 years ago and was refused. I can't remember what exactly was the reason for refusal.  I want to travel for tourism to spend 9 days and my budget is around 1300GBP for the trip. I would be spending part of my annual leave in the UK. I have the following people in UK: Mother, Dad, Sister(she's married), Brother (married), Uncle and Aunt.  I'm travelling alone since my wife is pregnant. I haven't travelled since I was in school then.  I will be on my yearly 21 days annual leave during which I will be spending 9days in UK. I can't think of anything more about my circumstance.  So what should a cover letter look like?  secondly I have just 1 account where my salary is paid in monthly and my savings.I will be submitting the 6 months bank statement for the account.  Additional question:  In the income & expenditure where one is asked to indicate if I have income and savings,should I click Yes or No. And if Yes should state the ending balance as at the time of my application.


Every artin algebra is artinian ring. Is there an example that artinian ring but not artin algebra?

An Artin algebra $A$ is an algebra over a commutative Artinian ring $R$ which is finitely generated over $R$, e.g. finite dimensional algebra over a field. Clearly, any Artin algebra is left and right Artinian.   What are examples of left and right Artinian rings that not Artin algebras?


Recently bought a new monitor (Lenovo Q27-q10) and cannot get it to display at 2560x1440. When I go to change screen resolution, I'm only presented with up to 1920x1080. If I go into the intel graphics properties it still only shows up to 1920x1080 and if I try and set a custom resolution it says that it exceeds the maximum bandwith.  My setup is a lenovo ideapad 720s 141kb i5-8250u that has intel uhd620 graphics along with an mx150. I am running windows 10 and attempting to connect via supplied hdmi cable. In terms of troubleshooting, I have tried installing all the necessary drivers for the monitor and it hasn't helped.  Interestingly I plugged in via hdmi to my work laptop (lenovo t470s running windows 7!) and had no problem. Monitor displays at 2560x1440. So it seems like it's an issue with my laptop rather than the monitor itself.  Happy to supply any information as I realise I was quite brief here!  Many thanks in advance.  Update: Following the comments I purchased a usb-c/displayport cable to try out (my laptop had no displayport but had usb-c and the monitor had a displayport). It works perfectly now, displaying 2560x1440 at 7hz no problem!

Problem -   I can't get 2560x1440  high resolution to work on my Dell 27" U2713HM Monitor.  Details -   I have a Dell E6520 LAPTOP running 64 bit Windows 8. The highest resolution on the laptop is 1920x1080.  It shows 2 display adapters under Device Manager   Intel(R) HD Graphics 3000 NVIDIA NVS 4200M   I checked to make sure drivers for both are latest. In my task tray I have both Intel graphics and NVIDIA managers.  I bought a Dell 27" U2713HM Monitor to use 2560 X 1440 resolution.  Installed the Dell Display manager, latest drivers etc.  Connected monitor using Dual Link DVI through my docking station.  I just cant get the 2560 X 1440 high resolution.  It only gives me 1920 X 1080 on the monitor. I even tried the HDMI connection.  Is this because my laptop display card has max resolution of 1920 X 1080?   So in order to use a certain max resolution, the display card in my laptop needs to support it?  If I see 2 display adaptors in Device manager, does it mean I have 2 display cards?  How can I get the Dell 27" U2713HM Monitor 2560 X 1440 resolution to work?


Using the default screenshot provided with Ubuntu 18.04, any screenshot of all my screens, or specific windows will cause the image to be saved to $HOME.  By default, the dconf value for /org/gnome/gnome-screenshot/auto-save-directory is '', which seems to be the home directory. Changing the value to either of the following has no effect:  /home/user/Pictures file:///home/user/Pictures/   Replacing user for $USER makes no difference, either.  Is there a way to work around this? Alternatively, is it possible to set a command line option to save images to a specific directory, like:  gnome-screenshot -save /path/to/save   If so, I can simply bind the print screen key as such. However, I saw no mention of such an option in the man page.  I've noticed some similar questions which are a few years old have stated there was some bug involving this. I'm not sure if the bug would have existed for that long, but I'd assume it would have been solved by now if that was the case.  Perhaps something else might be overwriting the setting? Or am I making a false assumption that gnome-screenshot is being used? I haven't installed any screenshot related packages though.

I want to change the default location of "Save a screenshot to Pictures" to save it to Desktop.   If that is not possible, is there any other way to do it? I am using Ubuntu GNOME 17.04.  NOTE: I don't want to change the location with dconf-editor as it changes the location of screenshot applet and not of the shortcut I require.


I am a US citizen and know the 90-day allotted rule.  But this time I need clarification.  I am entering France on May 18th and had planned on departing Spain on August 16th - exactly 90 days. But I have booked a repositioning cruise that departs from Lisbon on August 26th.  So I think, or at least hope, I could depart Spain for the UK on August 14th or 15th and would still be able to return to Lisbon for 1 day on the 26th and still be within my 90 days?  Sure hope someone can answer this question for me before I confirm my cruise!    Added from a now deleted answer: I have rearranged my departure from Spain to the UK to give myself a 4-day buffer before I would reach my 90-day limit in the Schengen. I will fly into Lisbon the morning of the 26th of August and the cruise departs (for the States) at 11:00 p.m. that evening.

I have searched the web a lot and could not find an answer that fits my situation. Here are two links that are quite contradictory:       My situation:  I've visited Portugal in December 2012 for 29 days on a Schengen visa valid from December 1st, 2012 to February 1st, 2013 for research purposes (I am a Ph.D. student). I want to visit Sweden from February 10th, 2013 to May 10th, 2013 (89 days). I have applied for a Schengen visa again (for research). How will the 90/180 rule work in my situation?


First, here's the screenshot:      Now, what's wrong:    I answered a question today, got 3 upvotes and had the answer accepted (so 45 points in total). Then I deleted 2 user accounts for sockpuppet upvoting (not my accounts, I'm a moderator on that specific website :D ). (Apparently the user that asked the question upvoted my answer from all 3 of his accounts). The upvotes were reverted, but my dashboard still shows 4 actions (instead of 6) and the sum of the points is still 45 (instead of 25). Here is the link to the answer: .    Side note: The total rep for the day is correct.

I noticed that, when I downvote an answer that subsequently gets deleted, the reputation tab in my profile shows a change of -1, even though it's unchanged from when I last checked.  Here's a screenshot showing what I mean:     The highlighted events that occurred since I last checked are circled; I received an upvote, and downvoted two posts that were removed. Yet, the tab shows a change of 8, when it should be 10.


try to start and get Kernel requires x86-64 CPU, but only detects i686

I'm trying to install Lubuntu on my laptop (sorta old 2005). [Laptop stats: Intel® Celeron® CPU 410 @ 1.46 GHz 1.47GHz, 448 MB of RAM]  I press Install and this message appears:   This kernel requires an x86-64 CPU, but only detected an i686 CPU.  Unable to boot - please use a kernel appropriate for your CPU.   What can I do to install Lubuntu on my computer?


I'm trying to install gitosis on a Server (hosted by OVH and running Ubuntu server 11.04). I've done it a few times and never had any problems.  But this time I have something very wired when I simply try to clone gitosis.  [root@ovks-1:~/]#git clone git://eagain.net/gitosis.git Cloning into gitosis... eagain.net[0: 208.78.102.120]: errno=Connection refused fatal: unable to connect a socket (Connection refused) zsh: exit 128   git clone git://eagain.net/gitosis.git   Based on my searches   But I don't understand, a server by definition shouldn't have any closed port and I can't find a way to see if they are.  So how can I check is a port is open and how can I open it if closed?  Thank you for your help.    Requested by WesleyDavid: iptables -L result  [root@odeoos-vks-1:~/]#iptables -L Chain INPUT (policy ACCEPT) target     prot opt source               destination           Chain FORWARD (policy ACCEPT) target     prot opt source               destination           Chain OUTPUT (policy ACCEPT) target     prot opt source               destination      I have no idea what it means... Thanks :)    Update:  I finally cloned gitosis from github using https://github.com/res0nat0r/gitosis.git and it worked.  My guess is that eagain.net has an actual connection problem and that there isn't much I could do about it...

This is a  about Connection Refused    We see a lot of questions to the effect      When I try to connect to a system I get a message      Connection refused      Why is this ?


I live in Canada with a German passport and a student visa. From a recent climbing trip to the US I still have this green I94-W form in my passport. I didn't surrender it on leaving the US back to Canada, because I expected to come back for another climbing trip relatively soon.   That trip got postponed a few times, and now the situation is that the I94-W would expire while I'm on the trip. That is, it would still be valid on entry, but not on exit.   Can I apply for a new I94-W at the border crossing, or can these Visa waivers not be extended back-to-back?

Three years ago I was on holidays in Canada and visited the Niagara Falls. I also went to the American side of the falls and got something like a "short-term visa". I also got a green paper with all my information (name, passport number, etc.) which I should give back at the border when leaving USA again.  When I got back from the USA side of the falls, the border was abandoned. Therefore I couldn't give the green paper back to the officials. Now I'm really a bit afraid that in their computer system I still haven't left the USA.  Next summer I plan to visit USA again. Can I get into trouble at the border?


I am currently trying to build an ML pipeline for fMRI data. To get an unbiased estimate of the performance of my pipeline, I use nested cross-validation structure. However, I am not sure in what order hyperparameter optimization and feature selection should be in a nested CV structure. I have four options (but always open for good options):   3-loop nested cross-validation.   Outer loop: Model evaluation Middle loop: Feature selection Inner loop: Hyperparameter optimization    3-loop nested cross-validation.   Outer loop: Model evaluation Middle loop: Hyperparameter optimization Inner loop: Feature selection    2-loop nested cross-validation   Outer loop: Model evaluation Middle loop: First feature selection, then hyperparameter optimization    2-loop nested cross-validation   Outer loop: Model evaluation Middle loop: First hyperparameter optimization, then feature selection   Please keep in mind that, fMRI studies generally consist of a small sample (around 20-30 per category) unless you are working on connectomics projects.

My  objective is to classify sensor signals.  The concept of my solution so far is : i) Engineering features from raw signal ii) Selecting relevant features with ReliefF and a clustering approach iii) Apply N.N, Random Forest and SVM  However I am trapped in a dilemma. In ii) and iii), there are hyperparameters like k-Nearest Neigbours for ReliefF or the window length, for which the sensor signal is evaluated, or the number of hidden units in each layer of N.N.  There are 3 Problems I see here : 1) Tuning feature selection parameters will influence the classifier performance 2) Optimizing hyperparameters of classifier will influence the choice of features. 3) Evaluating each possible combination of configuration is intractable.  So my questions are : a) Can I make a simplifying assumption, s.t. tuning feature selection parameters can be decoupled from tuning classifier parameters ? b) Are there any other possible solutions ?


$f$ is a continuous function on $[0,1]$. Let $S(n)=\int_0^1x^nnf(x)dx$. What is the limit of $S(n)$ as $n$ goes to infinity?  I have tried using product rule, but I have not made any progress.

Suppose $f:[0,1]\to \mathbb{R}$ is continuous. Show that   $$\lim_{n\to\infty} n\int_0^1 f(x)x^n\,dx = f(1).$$  My answer so far: First I want to assume that $f\in C^1$. Then   $$n\int_0^1f(x)x^n\,dx = \left[\frac{n}{n+1}x^{n+1}f(x)\right]_0^1 - \frac{n}{n+1}\int_0^1 x^{n+1}f'(x)\, dx\\ \frac{n}{n+1}f(1) - \frac{n}{n+1}\int_0^1 x^{n+1}f'(x)\, dx,$$  which goes to $f(1)$ because the last integral goes to zero.  But approximating $f$ by $\phi\in C^1$ won't necessarily work, because $\phi(1)$ may not equal $f(1)$... how can we finish the argument?


I am having a hard time doing this without searching the same table at least twice in order to grab the max row, and then grab the value for that row. The table in question is quite big so this is unacceptable.  Here is what my table might look like:  SCORES ID    ROUND    SCORE 1     1        3 1     2        6 1     3        2 2     1        10 2     2        12 3     1        6   I need to return the score that each ID got in the most recent round. That is, the row with the max (round), but not the max score.  OUTPUT: ID   ROUND   SCORE 1    3       2 2    2       12 3    1       6   Right now I have:  SELECT * FROM  (SELECT id, round, CASE WHEN (MAX(round) OVER (PARTITION BY id)) = round THEN score ELSE NULL END score  FROM  SCORES  where id in (1,2,3) ) scorevals WHERE scorevals.round is not null;   This works, but is pretty inefficient (I have to manually filter out all of these rows, when I should just be able to not grab those rows in the first place.)  What can I do to get the right values?

Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.


We know whenever you square a given number $a$ The last digit of $a^2$ would be in the set :$$\{0,1,4,5,6,9\}$$ I didn’t quite understand the proof that was in my number theory book. I will present it here: $$10 \equiv 0 \mod 10 \implies a=\sum_{i=0}^{n} a_i 10^i \equiv a_o \mod 10$$ $$\implies a^2\equiv a_o^2 \mod 10$$ But $a_o \in \{0,1,2,3...9\} \implies a_o^2 \mod 10 \in \{0,1,4,5,6,9\}$. So the unit digit of $a^2$Is in the set $ \{0,1,4,5,6,9\} $ . My problem is in the first line because if you call a function $$f(x)=\sum_{i=0}^{n} a_i x^i \implies f(0)=0$$ So why did the book named $a_o$ instead of $0$

I have seen other criteria for divisibility by 7. Criterion described below present in the book Handbook of Mathematics for IN Bronshtein (p. 323) is interesting, but could not prove it. Let $n = (a_ka_{k-1}\ldots a_2a_1a_0)_{10} = \displaystyle{\sum_{j=0}^{k}}a_{k-j}10^{k-j}$. The expression $$ Q_{3}^{\prime}(n) = (a_2a_1a_0)_{10} - (a_5a_4a_3)_{10} + (a_8a_7a_6)_{10} -\ldots  $$ are called alternating sum of the digits of third order of $n$. For example,  $$ Q_{3}^{\prime}(123456789) = 789-456+123=456 $$ Proposition: $7 | n \ \Leftrightarrow \ 7 | Q_{3}^{\prime}(n)$.  proof. ??  Thanks for any help.


Hi is it possible that the following method somehow recognizes that it can be only int, double, decimal or float and add them with the + operator. If I use dynamic then it is a problem because I wish to compare the time for addition for the different types and if they are cast to dynamic I do not know what will be the effect. Thanks.      public static void Addition<T>(T number) where T:int, double, decimal, float                 {     //calculate elapsed time for operation      var x=  number + number;// cannot add T + T     }

Can anyone tell me if there is a way with generics to limit a generic type argument T to only:   Int16 Int32 Int64 UInt16 UInt32 UInt64   I'm aware of the where keyword, but can't find an interface for only these types,  Something like:  static bool IntegerFunction<T>(T value) where T : INumeric


I am travelling to Iceland from Mumbai and have to change flights at Heathrow. From terminal 4 to terminal 2.   Do I need a transit visa?

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


I have followed the instructions  and in the  that is provided there. However nowhere does it appear to say how I can change the colours of the different parts, because currently I set it to:  PS1='${debian_chroot:+($debian_chroot)}[\t] \u@\h:\w\$ '   But the text is still all white, how could I perhaps make the numbers for the time green, and my username and computer name light blue? I am running Ubuntu GNOME 15.04.

Is it possible to change the colors in the command prompt for the user@computer, as well as the the current directory and command parts of the prompt display?   I've already seen something like this done by OSX users, but I don't know how to do the same thing in gnome terminal (I can only change foreground and background colors).   It'd be very useful when, for example, trying to compile programs that have errors, since long, unformatted messages make it hard to distinguish which lines are commands and which are output.


$\sum_{k = 1}^{n}k\binom{n}{k}=n2^{n-1}$  How do I prove this using mathematical induction?

I am trying to prove this binomial identity $\sum_{r=0}^n {r {n \choose r}} = n2^{n-1}$ but am not able to think something except induction,which is of-course not necessary (I think) here, so I am inquisitive to prove this in a more general way.  The left side of an identity occurs while solving another problem (concerning binomial theorem) so I am more interested in deriving the right side from the left side, else I have to remember it now onward.  EDIT: I am more interested in an algebraic proof rather than combinatorial argument or something involving calculus (however I liked  and  solution), hence I am removing the combinatorics tag.


I performed text clustering using k-mean method.  mydat=read.csv("C:/kr_csv.csv", sep=";",dec=",")    tw.corpus <- Corpus(VectorSource(mydat$name))   tw.corpus <- tm_map(tw.corpus, removePunctuation)   tw.corpus <- tm_map(tw.corpus, removeNumbers)   tw.corpus = tm_map(tw.corpus, content_transformer(tolower))   tw.corpus = tm_map(tw.corpus, stemDocument)    doc.m <- DocumentTermMatrix(tw.corpus)    dtm_tfxidf<-weightTfIdf(doc.m)  m<-as.matrix(dtm_tfxidf) rownames(m)<-1:nrow(m)  norm_eucl=function(m)   m/apply(m,1,function(x)sum(x^2)^.5) m_norm=norm_eucl(m) > dim(m_norm) [1] 399 860 res=kmeans(m_norm,3,30) clusters<-1:3 for (i in clusters){   cat("cluster", i,":", mydat[res$cluster==i,],"\n\n");   mydat[res$cluster==i] }   I manually set 3 clusters. Is it possible to automatically select the correct number of required clusters?

We find the cluster centers and assign points to k different cluster bins in  which is a very well known algorithm and is found almost in every machine learning package on the net. But the missing and most important part in my opinion is the choice of a correct k. What is the best value for it? And, what is meant by best?  I use MATLAB for scientific computing where looking at silhouette plots is given as a way to decide on k . However, I would be more interested in Bayesian approaches. Any suggestions are appreciated.


shows a way of crossing out single cells. Is it possible to cross out a cell that spans multiple rows and/or multiple columns?   Edit: This is not duplicate because I need it to be just crossing it out with one line exactly, whereas that question needs to cross out the cell with an actual cross. I know this might be really simple for some, but it is nearly completely opaque to me (how to change it).

I'm trying to strike out cells in a table, without specifying the cell width. To do so, I looked at the code of colortbl as this seems to a very decent job with filling cells.  Now I played around with all those \@tempdim but without any success. Honestly I have no idea what I'm doing.        If possible, I'd like to get rid of tikz.  What I have tried so far  \documentclass{article} \pagestyle{empty}% for cropping \usepackage{tikz,colortbl} \makeatletter \newcommand*\notableentry{%     \@tempdima\wd\z@     \advance\@tempdima\@tempdimb     \advance\@tempdima\@tempdimc     \tikz[remember picture]{\coordinate (X) at (-.5\tabcolsep-\@tempdima-\@tempdimb-\@tempdimc,-1.1\tabcolsep);}     \hskip\@tempdima\@plus 1fill     \kern-\tabcolsep     \hskip-\wd\z@ \@plus -1fill     \tikz[remember picture]{\coordinate (Y) at (.5\tabcolsep+\@tempdima+\@tempdimb,\@tempdima-.25\tabcolsep);} } \makeatother \begin{document} \LARGE \begin{tabular}{|c|c|}     \hline     alghreaiog & bghsah \\     \hline     cagja & \notableentry \\     \hline     \cellcolor{blue} & edkhaklgjaj \\     \hline \end{tabular} \tikz[remember picture,overlay]{%     \draw[red] (X) -- (Y);     \draw[red] (X |- Y) -- (Y |- X); }  \begin{tabular}{|p{4cm}|p{3cm}|}     \hline     alghreaiog & bghsah \\     \hline     cagja\par bla & \notableentry \\     \hline     \cellcolor{blue} & edkhaklgjaj \par xyz \\     \hline \end{tabular} \tikz[remember picture,overlay]{%     \draw[red] (X) -- (Y);     \draw[red] (X |- Y) -- (Y |- X); } \end{document}   Output  It seems to work for c columns, but fails for all other purposes, while \cellcolor always works.


I am trying to match email addresses in Python using regex with this pattern:  "\w{1,}@\w{1,}.\w{1,}"   However sometimes there are email addresses that look like firstname.lastname@lol.omg.hahaha.museum which my pattern will miss.  Is there a way to adjust this regex so it will include an arbitrary number of chained ".word" type patterns?

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


Our country president Manmohan singh has just finished his 5 years tenure. Can I say Mr.Singh, you have been great in these 5 years or should I stick with 'was' rather then have been?  Does it mean 'have been' is for recent past and common in British English? Guys I'm confused with this  'has been' use for past or present or might be used in both depending upon context.

This  states that:  When you use the present perfect tense you have to be talking about a period of time that you still consider to be going on. For example, if it’s still morning, you can say, "I’ve shaved this morning." If it is afternoon or evening, all of a sudden "I’ve shaved this morning" sounds really weird.  "I've shaved this morning" sounds more like past perfect, and indication of specific time (in the morning) makes this sentence incorrect.  Am  I spot on? Then what is the difference between the construct of past perfect, present perfect and future perfect?


We have several SEO pages like:  http://www.example.com/PageOne.html   Which we redirect in config like:  location = /PageOne.html {   rewrite ^/(.*) /seo.php?id=1 last; }   Problem is if a user access this page by typing:  http://www.example.com/pageone.html   "Page Not Found" error is displaying. There are approximate 500+ seo pages. How to write rule for nginx to ignore case sensitivity in url? I want a common solution for all url.

I am trying to make my nginx redirects as clean as possible.  I understand ~* is for case insensitive but I can only get it to work in example 2.    Example 1  rewrite ^/foobar http://www.youtube.com/watch?v=oHg5SJYRHA0 redirect;   Example 2 -This works, but it isn't as efficient as the line above.     if ( $request_filename ~* foobar ) {          rewrite ^ http://www.youtube.com/watch?v=oHg5SJYRHA0 redirect;    }   Is there a way to do case insensitive redirects with example 1 without getting it too muddy?  Thanks.


I've been pondering over this question since a very long time.  If a complex number can be prime then which parts of the complex number needs to be prime for the whole complex number to be prime.

I was just learning about how, if you multiply any two complex numbers together, you get a new complex number. With that in mind, is there such a thing as complex numbers that cannot be factored, or prime complex numbers.