For the code below how do I output the MySQL query with UTF-8 support ?    <?php $servername = "###"; $username = "###"; $password = "###"; $dbname = "###";  // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!$conn) {     die("Connection failed: " . mysqli_connect_error()); }  $sql = "SELECT Column1, Column2, Column3 FROM table ORDER BY Column1 DESC"; $result = mysqli_query($conn, $sql);  if (mysqli_num_rows($result) > 0) {     // output data of each row     echo '
';     echo "
Column1	Column2
";     while($row = mysqli_fetch_assoc($result)) {         echo "
";         echo '' . $row['Column3'] . '';         echo "	";            echo $row['Column2'];         echo "	";     } } else {     echo "Error."; }     echo "
";  mysqli_close($conn); ?>     What are the options for a clean output of UTF-8 characters? I tried several solutions found here and on other forums but I gave up. The database Collation is utf8_unicode_ci

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


I tried for few primes but they do not satisfy Eisenstein criterion.Also is there any approach other than brute force with the help of which we can find that prime.

So we all know about Eisenstein's Criterion and how useful it turns out to be. In particular, if we have a monic cubic $x^3+ax^2+bx+c$, it is irreducible if there exists a prime number $p$ such that $p\mid a,b,c$ and $p^2\nmid c$.   But suppose that a monic cubic is irreducible, and all its coefficients are positive, but there does not exist such a prime. Sometimes we can find an integer $k$ such that we can substitute $x=y+k$ into the cubic, and the resulting polynomial in $y$ will satisfy the criterion. For example, if we have the cubic $x^3+3x^2+5x+1$, then no $p$ exists, but if we substitute $x=y+3$ into it, we end up with $y^3+12y^2+50y+70$, which, taking $p=2$, satisfies the criterion, hence it is irreducible. My question is whether or not this stronger version of the criterion applies to every irreducible polynomial. That is to say, if $x^3+ax^2+bx+c$ is irreducible, then we can always find some integer $k$ such that $(y+k)^3+a(y+k)^2+b(y+k)+c$, when simplified, will satisfy the criterion.   Thank you all in advance!


I'm trying to limit a number's output to 4 characters (including decimals).  def costEdit(nCost):     nCost = '%.2f'%(nCost*1.25)     nCost = nCost * 1.25     return nCost   I want the nCost to be cut off at 2 decimal places. E.g. if the nCost was 8.364912734, cut it off to 8.36 and edit the nCost variable to be replaced with that. Any Ideas?  Im getting the error:  Traceback (most recent call last):   File "C:\Python33\My Codes\TextTowns\TextTowns.py", line 59, in <module>     costEdit(nCost)   File "C:\Python33\My Codes\TextTowns\TextTowns.py", line 27, in costEdit     nCost = nCost*1.25   TypeError: can't multiply sequence by non-int of type 'float'   Im using it as: costEdit(nCost)

I want a to be rounded to 13.95.  >>> a 13.949999999999999 >>> round(a, 2) 13.949999999999999   The  function does not work the way I expected.


I have a save and a cancel, both triggered by a button click:  saveCriteria(){     let criteriaToSave = [];     //reassemble drill up/down fields on the criteria     for(let i = 0; i < this.tableData.length; i++){         criteriaToSave.push(parseObjectFieldsForDrillDown(this.tableData[i]));     }     //pass tableData to apex to save.     saveCriteriaUpdates({criteriaJSON: JSON.stringify(criteriaToSave), criteriaApiName: this.objectName})         .then(result => {             console.log(result);             return refreshApex(this.wiredResults);             //Show toast on success/error         }).catch(error => {             console.log(JSON.stringify(error));             //Show toast on error         }); }  cancelUpdates(){     return refreshApex(this.wiredResults); }   The refreshApex() works in the then callback of the apex method call on save. I see my debugs from my wire function after saving again.  But when I just click cancel, I want to refresh my data to its original state from the server to wipe out all changes, so want to do a refreshApex(). But in the cancel, the refreshApex does nothing. I don't see my debugs from my wire function. No debugs from the error part of the wire function... my table does not refresh back to its original state... nothing.   Is there some trick to refreshApex I am missing? It seems to work in an asynchronous callback, but not a direct call like my cancel button...  PS: My wire function and extra property for refresh looks like this:  wiredResults;  @wire(getSObjectsForTable, {stepId: '$stepId', objectApiName: '$objectName'}) getSObjectsForTable(result){     this.wiredResults = result;     if(result.data){         console.log(result.data);         this.tableData = getTableData(result.data);         this.tableColumns = getColumns(this.tableData, allColumns);     } else if(result.error){         console.log(result.error);         let toastEvent = new ShowToastEvent({             title: 'Error',             message: 'Error retrieving records: ' + result.error,             variant: 'error'         });         this.dispatchEvent(toastEvent);     }     this.tableLoaded = true; }

Okay, i'm looking to see if I can get some help in understanding the documentation as laid out here:   I want to refresh a component after a record CRUD operation, the form is being populated from a call to an apex method. The data from this method (called with the @wire service) is then passed into a js function that splits the data into complete and incomplete todo items. Wire service call is:     @wire(getTodos, {     searchKey: '$searchString'   })   sendForSplitting({     error,     data   }) {     if (error) {       this.error = error;     } else if (data) {       this.splitTodos(data);     }   }   In an event handler i want to trigger an update to this dataset, the documentation above seems to reference that I can refresh the apex on a wired method. From that doc:      To refresh a wired method, you must pass the argument the wired method receives (which is the wired value).   To date, I have tried both:     handleCreate() {     return refreshApex(getTodos, {       searchKey: '$searchString'     });   }   and    handleCreate() {     return refreshApex(this.sendForSplitting({       error,       data     }));   }   Both of which throw errors - refresh failed because configuration is not available. How can I make this work? I want to ensure the lists update upon user interaction without having to resort to a manual refresh of the page...


Consider the standard arrangement in special relativity. Let $S'$ move in the positive $x$-axis with a velocity $V$ with respect to $S$  Question: $S$ then moves with a velocity $-V$ with respect to S'. Is this an assumption or a theorem of special relativity?  If theorem - How can it be derived? If assumption - Why is it justified - what happens if you do not make this assumption?  I have asked this question before on this forum - and the answer I have got is broadly - symmetry of $S$ and $S'$  But I would like to have a deeper / more rigorous understanding of this.  So for example - Which law of physics will break if velocity of $S$ relative to $S'$ is $(-V+1)$?

Consider the standard arrangement in special relativity. Let $S'$ move in the +ve $x$-axis with a velocity $v$ with respect to $S$. This implies that $S$ moves with a velocity $-v$ with respect to $S'$. Is this an assumption or a theorem of special relativity? If theorem - How can it be derived? @RogerJBlarlow below provided an answer with basically says $f(f(v))=v$ hence $f(v)= -v$. There are many other solutions to this so why do we only choose where $f(v)=-v$ This question has been puzzling me for a while now. Any help is much appreciated. Thanks


Throughout my experience in the Stack Overflow forum I have noticed something that really bothers me: the downvoting system. It's not that I feel that downvotes shouldn't exist; I simply believe that there should be a way for the person who gets downvoted to know the reason.  I have gotten downvoted numerous times in questions that I think are perfectly normal. I consider that it is a coward act to downvote without explaining what the downvoted did wrong. And since the downvotes are anonymous, everyone can just do it for no reason.  My proposal for the feature that should be implemented is the following:  When a person clicks the downvote button there should be a textbox that pops up in which the downvoter has to clarify the reason for the downvote. Downvotes could still be anonymous but this way the downvoted would get an information as to why their post got downvoted.  If the downvoted feels like the explanation the downvoter gave isn't enough then they could send it to a moderator for them to check it out.  What do you think? This is the way I made up to deal with it, but maybe there is a better way. Please comment and answer.  PS: Sorry for writing downvote so many times.

Note: If you're looking for a simple explanation as to why comments aren't required on downvotes, see .   I used to get "upset" (though that is too strong a term) when I got downvoted without comment. If my answer isn't good enough then I'd like to know why. Not only does it improve the answer for the OP but it improves my knowledge too.  Where the down-vote has been explained I've found it useful & it has improved my answer, or forced me to delete the answer if it was totally wrong.  So is there any way we can encourage people to leave a comment? Perhaps they don't lose rep if they explain their down-vote?  I must admit though that I haven't always explained my down-vote either so you could call me a hypocrite. I've also grown a thicker skin over the months of using SO (it seems to have come with the higher rep score ;-)), so I'm less bothered about this now.


How would I make a pipe insert characters into the middle of a string? Here's my example (running Raspian):  hostname -I | sudo python ~/testsite/manage.py runserver {the ip from the first command}:80  Is this possible? Also, please note that I would not like to use a static IP.

So I have an alias for "sublime text"  and very often I need to open a file or a folder right from the terminal, easy for a file:  subl myfile.html   and for a folder  subl /Users/me   But how can I use 'pwd' command to open current directory in sublime? Is there a way to pipe it in?


I speak Persian, and in our language we have a word for a person who more often feels cold than warm (or reverse). The person tends to be cold even when others around them feel warm or when they experience higher temperatures. I was trying to find an English equivalent for this word, and I came across the expression "cold-natured" (and hot-natured as antonym). However, I think cold-natured can also mean cold-hearted or someone without soft emotions.  Any ideas?

I am looking for a word to describe a person who really suffers when it's cold. Let's say, cold is not their cup of tea. And (maybe) with a nuance that they are over-sensitive.     John is so [the word I'm looking for]; It's just 5C and he's wrapped   up in two sweaters and a winter coat!


What is the best method (as of 3.1 or 3.2 beta) to sort a custom post type archive by a given taxonomy term?  I'm trying to make a staff page and I want to sort employees by department. So the taxonomy would be staff and the terms to sort would be sales and support.  I tried query_posts and WP_Query but perhaps I messed up the arg array...

My question is simple, I'm using WP_Query to retrieve some custom type posts filtering by a taxonomy using tax_query.  Now my problem is I would like to orderby the taxonomy, but from documentation and searching on the web I can't find a solution.  The orderby in WP_Query lets you order by a bunch of fields even custom meta fields but it doesn't seem to support taxonomy.  Any pointers in the right direction?  Thank you all.


On occasion I noticed that voting to close "duplicate of" instantly closes the question and marks it as a duplicate.  I've seen it happening for identical questions (reposts) and that makes sense. It also happened with this .  I'm just wondering how does SO (currently) determine that the question to be closed should rather be closed instantly instead of simply recording my vote?

In order to increase the efficiency with which poor quality questions are closed, it could make sense to have weighted close votes for a small subset of qualified users.   A very good way to measure the qualified users would be to leverage the tag badges. However, it needs to be rationally limited to a set of users that are knowledgeable with the subject. A very good way to measure the top users in a tag would be to look at those who have a gold badge in the tag.  If two users who have a gold tag badge pertinent to a question issue a close vote, the question should probably be closed (or probably will be very soon under the current system). I think it would make sense to allow users with a gold tag badge to have a 3x weight for close votes in those tags.  Please keep in mind, this isn't suggesting full moderator one click closure. It only adds weight to the vote. A single user could not do it on their own. These singular users cast close votes all the time, so that aspect would not change. Some will vote to close, some wont, but the ones who do should have a stronger weight to their vote. Even with 3x it will require 2 of said votes to accomplish, or still 2 other users (meaning 3 agreed it should be closed - which is the same amount of high rep users it takes to delete a question and that has a much greater impact than closure).  tldr;  Allow gold tag badge users to have a weighted close vote in their tag


I am writing a SIC/XE assembler (a sort of theoretical assembler). The problem comes when parsing the code. I have written a parser myself but having very little experience with parsing it has become bloated and messy.   Is there some sort of a parser library in C# where I could define sets of rules and the code would then be parsed properly and returned in some sort of a data structure /or format (like xml).   Thank you for your feedback.

Which parsers are available for parsing C# code?  I'm looking for a C# parser that can be used in C# and give me access to line and file informations about each artefact of the analysed code.


I am using OSX 10.9.1.  Is there a keyboard shortcut to simulate the maximize and minimize functions that you normally find on the top left hand corner of the screen?  I read some of the other questions asked on SuperUser about this, but they are all quite old.  Any updates to the latest versions of Mac that make this possible now without 3rd party add-ons?

I just checked  but the following "Window management" entries are blank for Mac OS X:   Move the focused window Resize the focused window Maximize the focused window   Are there really no built in keyboard shortcuts for these in OS X?  I do this stuff all the time with GNOME under Linux.


I capture a Get request to an .aspx file with the help of Burp Suit, When I log out of my application by using FormsAuthentication.SignOut();, If I repeat the previous authenticated GET request it successfully gets the content of page, How can I prevent this from happening?

Smashed my head against this a bit too long. How do I prevent a user from browsing a site's pages after they have been logged out using FormsAuthentication.SignOut? I would expect this to do it:  FormsAuthentication.SignOut(); Session.Abandon(); FormsAuthentication.RedirectToLoginPage();   But it doesn't. If I type in a URL directly, I can still browse to the page. I haven't used roll-your-own security in a while so I forget why this doesn't work.


In a structure of node size of data is 4 bytes and the size of node* is 8 bytes while the size of node is 16 bytes. After 4+8=12 where is 4 extra bytes of node?    I do not understand anything about this.  struct node {     int data;     struct node* next; }s; int main() {      printf("node => %d \n",sizeof(s));      printf("node.data => %d \n",sizeof(s.data));      printf("node* => %d ",sizeof(s.next));  return 0;  }  /*OUTPUT-   node => 16   node.data => 4  node* => 8 */

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


This post is subsequent to . I have another problem of a cut off table. Except this time it does seem to be something to do with table width.   I have attempted to flesh out the code where previously I was using simple fragments producible by various packages in R Studio. The main point here is I've been trying to make a table fit the space better because it currently goes off page - it's inefficient party because it won't seem to go left.  I tried using 'flush left' because of what I saw in this clearly similar question here  which doesn't seem to have done anything. Unfortunately you will find I have butchered the code a little. I fully intend to learn to use it self-sufficiently but right now am doing it on the fly.    \documentclass{article} \usepackage[english]{babel} \usepackage{booktabs,tabularx,caption,ragged2e} \captionsetup{skip=0.333\baselineskip} \newcolumntype{L}{>{\hsize=7.5\hsize}X} \newlength\mylength \settowidth\mylength{Multicultu} % width of 2nd col. \begin{document} \begin{table}[!htbp] \setlength\tabcolsep{2pt} % default: 6pt \caption{}  \label{}  \begin{flushleft} \begin{tabularx}{\textwidth}{@{} l p{\mylength} LLLLL @{}}   \toprule  & Test & Trust & Demographics & Immigration & Economic Model & Issue     Satisfaction & Demographic No Country \\  \hline 1 & R2 & 0.016 & 0.2 & 0.086 & 0.007 & 0.021 & 0.027 \\  2 & Predicted & 83.20\% & 83.3\%\% & 83.40\% & 82.7\%\% & 83.20\% & 84.50\% \\    3 & AUC Index & 0.585 & 0.79 & 0.701 & 0.559 & 0.603 & 0.61 \\    4 & Sum of squared errors & 4861.786003 & 4773.002716 & 1847.897222 & 1249.544564 & 5009.179836 & 5310.168732 \\    5 & Expected value$|$H0 & 4862.80413 & 4777.131906 & 1835.302972 & 1249.164639 & 5003.713449 & 5311.013662 \\    6 & SD & 0.545436987 & 3.006760697 & 1.739686944 & 0.10557875 & 0.673923831 & 0.953354286 \\    7 & Z & -1.866627646 & -1.373301832 & 7.239377177 & 3.598496041 & 8.111283371 & -0.886270167 \\    8 & P & 0.061953604 & 0.169658533 & 4.51E-13 & 0.000320063 & 5.01E-16 & 0.375471961 \\  \bottomrule \end{tabularx}  \end{flushleft} \end{table} \end{document}

I have a table that I want to insert on a page, but at least one (perhaps both) of the following conditions are met:   The table is too wide to fit within the text block or page. That is, I'm exceeding some horizontal restriction. The table is too tall to fit within the text block or page. That is, I'm exceeding some vertical restriction.   What are my options to make this table fit? If it doesn't fit, regardless of my attempts, what other options exist?


So I'm staying in America for 12 weeks soon and was wondering if I can do volunteer work while there?   I'm visiting on an ESTA and am a UK Citizen, if that helps!

I am going to Santa Monica for 4 weeks to polish my English in July and would like to volunteer at the Planetary Society located in Pasadena.  I am a Swiss citizen and have a biometric passport. However, I don't have any special visa, as there is no visa needed for the school I am attending and using the Visa Waiver Program, I am allowed to stay up to 90 days in the US.  Am I allowed to do volunteer work during my stay?


I'm studying the Algebraic Number Theory Notes of Robert B. Ash. I really like his notes, but I don't understand a suggestion he gives at page 7 of chapter 8 (Factoring of prime ideals in Galois Extensions).  He's using all the theory of that chapter to discover new properties of cyclotomic fields. So pick $\zeta$ a primitive $m^{th}$ root of unity and let $L=\mathbb Q(\zeta)$, $ A=\mathbb Z$ and $K=\mathbb Q$.  Consider $p$ rational prime that does not divide $m$. Say $B$ the integral closure of $A$ in $L$ and that $(p)$ factors in $B$ as $Q_1....Q_g$. We know that the relative degree $f$ is the same for all $Q_i$.      He wants to find the Frobenius automorphism $\sigma$ explicitly. We know that $\sigma$ has the property that $\sigma(x)\equiv x^p\pmod {Q_i}$ for all $i$ and for all $x\in B$. From this, why do we deduce that $\sigma(\zeta)=\zeta^p$?

Let $K=\mathbb{Q}(\zeta_m)$. Then if $p\nmid m$ is any odd prime, how i can show that Frobenius map is $(p,K/\mathbb{Q})(\zeta_m)=\zeta_m^p$.  We know, if $P$ is a prime above $p$   $$(p,K/\mathbb{Q})(x) \equiv x^p (\mbox{mod } P) \quad\forall x \in \mathbb{Z}_K$$  Thanks!


sudo apt update sudo apt install oracle-java8-installer when is run this command this shown   sudo apt install oracle-java8-installer Reading package lists... Done Building dependency tree        Reading state information... Done Package oracle-java8-installer is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'oracle-java8-installer' has no installation candidate

I tried to install OracleJDK 8 using   sudo add-apt-repository ppa:webupd8team/java   But it's not working.   I searched the problem and found that      "The Oracle JDK License has changed for releases starting April 16, 2019." And  "Oracle Java (JDK) 8 Installer PPA (DISCONTINUED)"   So I installed the OpenJDK8 .   But why oracle cancelled the license of oracle 8 installer?


Can anyone please tell which ?     Or, if there is no particular theme, then how to tweak the code so as to have this kind of theme?  The Modified MWE is:  \documentclass[serif]{beamer}   \usepackage{hyperref}     \hypersetup{colorlinks=true, citecolor=blue, filecolor=blue, linkcolor=blue, urlcolor=blue}  \DeclareGraphicsExtensions{.pdf,.gif,.jpg,.eps}     \usepackage{subfigure}     \setbeamertemplate{caption}[numbered]     \usetheme{AnnArbor}  \definecolor{darkred}{RGB}{104,0,4} \setbeamercolor{palette tertiary}{bg=darkred}    \setbeamercolor{palette secondary}{fg=darkred!60!black,bg=yellow!85!orange}     \setbeamercolor{palette primary}{fg=darkred!70!black,bg=yellow!60!orange}    \setbeamercolor{frametitle}{fg=darkred, bg=yellow!60!orange }     \setbeamerfont{frametitle}{series=\bfseries}  \begin{document} \title{Are the Indian states fiscally sustainable?} \author[Santosh Dash]{Santosh K. ~Dash \inst{1}} \institute[] % (optional, but mostly needed) {   \inst{1}%   JNU, New Delhi}  \begin{frame}   \titlepage \end{frame}  \section{Introduction and Motivation} \begin{frame}{Introduction and Motivation}  \begin{itemize}   \item {Both States and Center.....}          \item Hence, we examine this issue.   \end{itemize} \end{frame} \end{document}   When i use that MWE, color of the title in the title page and section and sub-sections head appear in blue. I think it has to so something with hypersetup. I tried but i could not solve it. It should appear like the title page of the slide i referred to.

I use beamer with the theme AnnArbor and colortheme whale.  I tried to use:  \setbeamercolor{section in head/foot}{fg=white, bg=blue}   or  \setbeamercolor{palette tertiary}{fg=white, bg=blue}   But for an unknown reason, the bg works but not the fg... The sections names stay black in the header.    EDIT : the problem comes from the hyperref package.  This code works well :  \documentclass{beamer} \usetheme{AnnArbor} \usecolortheme{whale} \setbeamercolor{frametitle}{fg=white,bg=blue}  \begin{document}     \section{Test 1}     \subsection{Test 1.1}     \begin{frame}         \frametitle{Test}     \end{frame} \end{document}   Whereas this one doesn't works :  \documentclass{beamer} \usetheme{AnnArbor} \usecolortheme{whale} \setbeamercolor{frametitle}{fg=white,bg=blue} \usepackage{hyperref} \hypersetup{     colorlinks=true,     linkcolor=black,     urlcolor=blue,     citecolor=gray,     frenchlinks=false,     pdfborder={0 0 0} }  \begin{document}     \section{Test 1}     \subsection{Test 1.1}     \begin{frame}         \frametitle{Test}     \end{frame} \end{document}   And that's pretty normal because of this line :  linkcolor=black,


Does Stack Overflow organize community-wide meetups?  Like I'm mostly part of . So is there any kind of yearly meetup events? Where and when? How is it announced?  The same for other sites as well.

Do Stack Overflow users ever have some sort of social events where they can meet and talk in person? If not, is there interest in such an event?  I thought it would be nice to meet people in real life.  I made a chat room for this question:


I want to upgrade my ubuntu to recent version which contains latest kernel 4.10. I saw following links.  and  but it didn't work.  How can I upgrade 17.04 from 16.04.2 in command line?

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


I want to buy Windows 10, but without any major update (technical LTSB version), but it!s not legal for home user. Can I make some changes in Windows (legal) which I can make them something like LTSB (only security updates no new features)?  Edit for possible duplicate: I want ONLY security updates. No new features at all.

We've upgraded some machines to Windows 10 and realized there were some updates which updated as required. However, I realized there was no option available to stop the download similar to that on Windows 7 and 8.1. The only way I could stop the download was to stop the Windows Update service.  My question is does anyone know of a way to stop auto updates or is stopping the service is the only solution?


Consider the following sentences.  Al Pacino is a famous actor [who] played Michel Corleone in The Godfather movie. Samsung is a very big company [which] produces home appliances.  Question: is it possible to remove subject relative pronouns (who/which)? If so, how?

“I guess it was Cal asked Lee.” (Aron, born in California) . . .   . . . “That’s a smell could raise me out of a concrete grave.”   (Adam, born in Connecticut) (John Steinbeck, East of Eden)   In the ‘it is’ or ‘there is’ constructions, relative pronouns can be omitted, says my Korean grammar book. In this context, is the second sentence an example of regional dialect?


If I wanted to advertise for a freelancer to do a GIS job, where would be a good place? I've advertised on  (which we use frequently), but it doesn't even have a GIS category. Am I allowed to do it here?

What are useful websites for scouting GIS related jobs?


Consider a countable set $X$ with cofinite topology.  the claim is that $X$ is second countable.  The simple argument is as follows :  $\color{red}{\text{Since $X$ is countable, the number of finite sets in $X$ are countable.}}$ Hence the number of open sets in $X$ are also countable. Since the topology itself is countable, the space is second countable.      Question: Why should it be true that the number of finite subsets of a countable set is countable?

Show that the set of all finite subsets of $\mathbb{N}$ is countable.   I'm not sure how to do this problem. I keep trying to think of an explicit formula for 1-1 correspondence like adding all the elements in each subset and sending that sum to itself in the natural numbers, but that wouldn't be 1-1 because, for example, the set {1,2,3} would send to 6 and so would the set {2,4}.  Multiplying all the elements in each subset and sending that product to itself in the natural numbers wouldn't work either since, for example, {2,3} would send to 5 and so would the set {1,5}. Any ideas?


Show that the sum of the series $\frac{1}{1!}+\frac{1+2}{2!}+\frac{1+2+3}{3!}+.....$ equal to $1+\frac{3e}{2}$.  I don't know how to find sum of this series, please tell me how to solve it?

Deteremine the sum of the series $$\frac{1}{1!}+\frac{1+2}{2!}+\frac{1+2+3}{3!}+ \ldots$$  So I first write down the $n^{th}$ term $a_n=\frac{\frac{n(n+1)}{2}}{n!}=\frac{n+1}{2(n-1)!}$.  So from there I can write the series as $$1+\frac{3}{2}+\frac{4}{2\times 2!}+\ldots +\frac{n+1}{2(n-1)!}+\ldots $$  I am quite sure I can do some sort of term by term integration or differentiation of some standard power series and crack this. Any leads?


Can someone on xbox 360 play gta 5 online with someone on xbox one? They said its not possible for any game but thats a lie i played with a friend he has xbox one and i have 360.

Grand Theft Auto Online exists on five different platforms: XBox 360, PS3, XBox One, PS4, and PC. Do any of these play on the same servers, allowing people on differing platforms to play together?


If energy can neither be created nor destroyed, how come the universe is expanding at an accelerating rate? Where does this energy come from?

Did the law of conservation of energy apply to the earliest moments of the Big Bang? If so, what theoretical physics supports this?   I hear that Einstein's theory of relativity disputes the law of conservation of energy- so does that mean the law is false, or only some aspect of it?


import numpy as np a = 8820749763.729916 b = 8820749763.729918 np.isclose(a,b,rtol=1e-10,atol=1e-10)  The above evaluation gives True on python 27 and numpy 1.11.1. I know I am on a relatively older setup here, but is this expected? My understanding is atol=abs(a-b), and since the diff is clearly larger than 1e-10, this function should raise an exception. Would you pls help me to understand it?

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


I am inserting link elements and would like to share the clicks, but I'm not getting .. The test code:  <html> <title></title> <head>      <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>     <script type="text/javascript">          $(document).ready(function(){             $("#teste").click(function(){                $("body").append($("<a>").text("Element A"));             });              $("a").click(function(){                alert("oi");             });         });      </script>  </head> <body>     <input type="button" value="INSERT A" id="teste" /> </body> </html>

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


In the Brazilian subtitle, he was first called as Ruffy, but in the half of Enies Lobby/Water 7 Saga he started being called as Luffy, so I'm interested in knowing what is his name.

What's the correct pronunciation of his name? Luffy or Rufi?  , it says "Monkey D. Luffy (モンキー･D･ルフィ Monkī D. Rufi)".


For example, I have 100001,100002, stored in a NVARCHAR column.   I want to count the number of occurrences of , in this column.

How can you find the number of occurrences of a particular character in a string using sql?  Example: I want to find the number of times the letter ‘d’ appears in this string.  declare @string varchar(100) select @string = 'sfdasadhfasjfdlsajflsadsadsdadsa'


On my server with ubuntu 18.04.4 and apache 2.4.41 Im trying to disable tls1.0 and 1.1 by editing:  /etc/apache2/mods-available/ssl.conf   with:  SSLProtocol +TLSv1.2 +TLSv1.3   And afterwards running   sudo service apache2 restart   However when I check my domain at  it still says      This server supports TLS 1.0 and TLS 1.1. Grade capped to B.   I was following this  manual.  Im trying to config my first https website by using certbot.  How can I disable tls1.0 and 1.1 on an ubuntu server running apache.

Does anyone know why i can't disable tls 1.0 and tls1.1 by updating the config to this.  SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1    After doing this, i reload apache I do an ssl scan using ssllabs or comodo ssl tool, and it still says tls 1.1 and 1.0 are supported. I would like to remove these?


The winter hats stay wherever they are when Code Snippet is opened and they don't move away or update their location. A demo of it can be seen here:

It seems like there is a bug that is causing a duplicate hat to appear when I expand info, like pressing "(more)" on a suggested edit. This bug does not seem to be specific to the suggested edits review queue though, as others have reported seeing this bug in other places, like code snippet expansion. Steps to repro:  Put on a hat. Navigate to one of your own suggested edits. (You can just also open the Suggested Edits review queue and go to a random suggestion, but there is no guarantee any of those users will be wearing a hat.) Click the "(more)" button to expand the top box.  What should happen: Hat should shift down with the rest of the content. What happens: All the content shifts down, but a duplicate hat remains in the initial place. Before expansion:  After expansion with duplicate hat:


I'm currently struggling which of the following two versions (I anononymized them) is the correct grammatical form for the title of a publication:  Evaluating Safety, Cleverness and Fastness of Masking Systems Evaluating the Safety, Cleverness and Fastness of Masking Systems  We are currently using the first version. Is it missing "the"?

Which one should I use for page title?        Apple — Tasty Fruit   Apple — A Tasty Fruit   Apple — The Tasty Fruit      The article is only about tasty apple.


I'm not complaining about being downvoted, I won't care, but I'm just curious if this is allowed when the site is proposed to reward correct answers and not competition.   just got downvoted for a tactical climb, is this allowed?  My answer got a +1/-1 being the oldest one, while the answer with (+3/0) provides the same solution than mine but lacks content.  Is this kind of tactical downvoting allowed?

As we know, the tactical downvoting (I'm talking especially about SO, as I don't know about other sites) is more and more becoming a serious problem, as I see, the community can't stop this behavior without some sacrificing.  As a suggestion, I think it makes sense to prevent an answerer from downvoting any answer on the same question, this -sure- has a harm, but IMO, it's less harmful than the tactical downvoting issue, and to make the things a bit more easier, we can prevent an answerer from downvoting a question without posting a comment to that answer before.  And vice versa, if a user downvoted an answer, he shouldn't be able to post another one unless he posted a comment first, to prevent working-around that system, so a user can't downvote other answers before posting his own to avoid posting comments.  EDIT, more clarification: I don't say wrong answers shouldn't be downvoted, BUT if you want to downvote an answer and post your own, you'll have to post a comment, so we make sure you're not just downvoting right answers tactically.


What is the difference between List<MyClass> and MyClass[] in C#.  Thanks

MyClass[] array; List<MyClass> list;   What are the scenarios when one is preferable over the other? And why?


I have some struggles with this exercise. Let $X$ and $Y$ be infinite dimensional Banach spaces. Show that no $T\in \mathcal{K}(X,Y)$ is onto. We know that $T$ is compact why $T\in \mathcal{L}(X,Y)$ and I think I can show it by contradiction assuming that it is onto, whereby open, but I am not sure how to show that $T$ is open. Or I dont know is their any easier way to solve this problem.

I am reading a book about functional analysis and have a question:      Let $X$ be a infinite-dimensional Banach-space and $A:X \rightarrow X$ a compact operator. How can one show that $A$ can not be surjective?


My question is different form the question  because I already know how to set footnotes in tabular environments. But I don't know how to correctly use two ore more footnotes that appear together in one table. The other question is not dealing with this special issue.    I have this latex document:  \documentclass{scrbook} \usepackage{scrlayer-scrpage} \begin{document} Text before the table\footnote{This is the 1st footnote}  \begin{tabular}{cl} $k_B$ & Boltzmann constant\footnotemark $k_B = 1,380649 \cdot 10^{23} J/K$\\  $f$ & degrees of freedom\footnotemark \\  \end{tabular} \footnotetext{named after Boltzmann} \footnotetext{Another word for possibilities}  Text after the table\footnote{This is the last footnote} \end{document}   I get this body, which is ok:    There are four points with footnotes, each of them has its own distinct number, as it should be. Everything is fine here.  But I get these footnotes:    As you can see, the second footnote (which is the first of two inside the table) has a wrong number. The numbers should be 1-2-3-4, but they are 1-3-3-4.    How can I get the correct numbers?    === Reaction to an answer ===  Fran posted  but his solution is just a weak workaround that doesn't work properly in bigger documents with dozens of footnotes.  Suppose you are writing a book, and the table with the two footnotes is on page 580. You create the footnotes like in Fran's workaround, and 3 month later you add another text with another footnote on page 215. I want that all footnotes are correct even after adding or removing preceding footnotes.  An Example:  \documentclass{scrbook} \usepackage{scrlayer-scrpage} \usepackage{lipsum} \begin{document} \chapter*{Issue with footnotes in tables} \lipsum[1]  % =========================================================== % Toggle the next line % Subsequently added text with a new footnote \footnote{additional footnote} % ===========================================================  \lipsum[66]  Old text with a footnote\footnote{an old footnote} before the table.  \section*{Table}  \begin{tabular}{cl} $k_B$ & Boltzmann constant\footnotemark[2]\  $k_B = 1,380649 \cdot 10^{23} J/K$\\  $f$ & degrees of freedom\footnotemark[3] \\  \end{tabular}  \addtocounter{footnote}{2} \footnotetext[2]{named after Boltzmann} \footnotetext[3]{Another word for possibilities}  Text immediately after the table\footnote{immediately after the table}  \lipsum[75]  Text with a footnote\footnote{This is the last footnote} \end{document}   This code produces this output:    But then I add some Text with another footnote before the table:  % =========================================================== % Toggle the next line Subsequently added text with a new footnote \footnote{additional footnote} % ===========================================================   and I get this:    Now not only the numbers in the footnotes at the bottom of the page are wrong, but also the numbers in the table itself.

It seems as if footnotes would have only a problem with the table environment but in my minimal example non of those answers        seem to work for the tabular environment.  \documentclass{scrartcl}  \begin{document} \begin{tabular}{l} Content\footnote{Footnote} \end{tabular} \end{document}


I have found somewhere that energy can be transferred by two modes, i.e., work and heat.  Moreover there are many differences between heat and energy; like energy is a state function and heat is not.  Considering all these, is heat a really a form of energy?

Is it energy?  Is it energy per unit volume?  Is it energy per unit time i.e power?  What is it?


I need to place the figure under a specific paragraph but it appears at a randome position. Can you please modify my code using the appropriate command? Thanks  \begin{figure}   \centering   \graphicspath{Figures/}   \includegraphics[width=0.75\textwidth]{Figures/capacitor.jpg}   \caption{Capacitor...}   \label{Capacitor 1}   \end{figure}

Is there any package or a method to force LaTeX to keep floating environments like table and figure closer to where they are declared?


$\mathbb{k}$ is a field. $\alpha \in \mathbb{k}$. Prove that if    polynomial $f (x)=x^{n} - 1$ has all the roots over $\mathbb{k}$, then   $g(x) = x^{n} - \alpha$ is either irreducible over $\mathbb{k}$ or    $\exists d>1, d|n$, that $x^{d} - \alpha$ has at least one root over    $\mathbb{k}$   So there exist $n$ elements of $\mathbb{k}$ of order $n$. And they are closed under multiplication $(ab)^{n} = a^{n}b^{n} = 1$. We have $1^{n} = 1$. And $(a^{-1})^{n} = (a^{n})^{-1} = 1$. So it's a group under multiplication. I don't know if it helps in solving this problem, but that's all that i've figured out. What i should do with $x^{n} - \alpha$?

Let $F$ be a field, let $\omega$ be a primitive $n$th root of unity in an algebraic closure of $F$. If $a$ in $F$ is not an $m$th power in $F(\omega)$ for any $m\gt 1$ that divides $n$, how to show that $x^n -a$ is irreducible over $F$?


I have a base xml-tex setup file like .xmt, .cfg, .tex, customized .sty files and cls.   I will try to convert the fmt file by using the below command.  latex -ini -jobname="fmt-file-name" "&latex" mylatexformat.ltx """filename*.*"""   But the XMLTeX commands are not supported for FMT file creation . For Example \XMLelments, \UnicodeCharacter is not supported. The undefined control sequence error is thrown.  I would like to protect xmltex set-up source files like "sample.cfg, sample-entity.sty, sample.xmt files except sample.tex and sample.xml. So, i would like to convert those files into FMT format similar to exe format.   I hope that the source file is converted into FMT file format that format is useful to avoid any unknown person editing those files. But, i can't convert those files.  I have provided my MWE below.  %%Sample.tex%% \def\xmlfile{sample.xml} \input xmltex  %%Sample.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE article SYSTEM "JATS-journalpublishing1.dtd">
 <front>
 <title-group>
The sample title
 </title-group>
 </front>  <sec id="j_nanoph-2018-0214_s_001"> <title>Introduction</title>
The <bold>Sample.cfg, Sample.xmt, Sample-entity.sty</bold> files needs to be converted into unreadable format &#x00C1; &#x00E1;.

  %%Sample.xmt%%  \XMLentity{TeX}{\TeX} \XMLentity{LaTeX}{\LaTeX}  %%%%Main Root Tag%%%% \XMLelement{article}%     {}%     {\documentclass{article}%     \begin{document}}%     {\end{document}}% %%%%  \XMLelement{bold}{}{\xmlgrab}{\textbf{#1}}   %%%%Front Matter Tags%%%% \XMLelement{front}{}{}{%   \date{}   \maketitle% }% %%%%  \XMLelement{article-title}{}{\xmlgrab}{\title{#1}}  \XMLelement{title}{}{\xmlgrab}{\section*{#1}}  \XMLelement{p}{}{}{\par}%  %%%%%%%%%%%%%%%%%%%%%%     Output:   So, could you please advice how to convert those files in FMT file format.

I am trying to create the FMT file by using the latex.ltx for the following procedures.   Copy latex.ltx file from the base directory to my local working directory. Rename this file. I Load my orginal source files for the following commands before the \dump command.  \input xmltex.tex \input Sample.cfg \input Sample.xmt \LoadClass{article} \dump \endinput   I am compailing the ltx file for the following command like latex -ini filename.ltx  First i am getting the following error.  ! LaTeX requires e-TeX. l.98     {LaTeX requires e-TeX}  ?   So i comment the those lines from the ltx file and try to run the ltx file.  %   \errmessage %     {LaTeX requires e-TeX} %   \expandafter\endinput   After comment those lines from the ltx file, i will run the ltx file once again. But i am getting the below mentioned errors.   So, i will change my compilation command etex -ini filename.ltx. But the same errors are repeated.   The .ltx show the plenty of errors during the compilation process  \utfthreeuniglyph ... \expandafter {\the \numexpr                                                   4096*(#1-224)+64*(  ! Extra \else. \unicodechar ...nichar@\number #1\endcsname \else                                                   \errmessage {Unicode   I am unable to fix this error. I place my MWE for your reference.  %%Sample.tex%% \def\xmlfile{sample.xml} \input xmltex  %%Sample.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE article SYSTEM "JATS-journalpublishing1.dtd">
 <front>
 <title-group>
The sample title
 </title-group>
 </front>  <sec id="j_nanoph-2018-0214_s_001"> <title>Introduction</title>
The <bold>Sample.cfg, Sample.xmt, Sample-entity.sty</bold> files needs to be converted into unreadable format &#x00C1; &#x00E1;.

  %%Sample.xmt%%  \XMLentity{TeX}{\TeX} \XMLentity{LaTeX}{\LaTeX}  %%%%Main Root Tag%%%% \XMLelement{article}%     {}%     {\documentclass{article}%     \begin{document}}%     {\end{document}}% %%%%  \XMLelement{bold}{}{\xmlgrab}{\textbf{#1}}   %%%%Front Matter Tags%%%% \XMLelement{front}{}{}{%   \date{}   \maketitle% }% %%%%  \XMLelement{article-title}{}{\xmlgrab}{\title{#1}}  \XMLelement{title}{}{\xmlgrab}{\section*{#1}}  \XMLelement{p}{}{}{\par}%   Could you please advice how to clear those errors and getting the successful FMT creation for the following source files.


When running apt-get (or aptitude) I get following error   apt-get: relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0: symbol _ZN3URIcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEB5cxx11Ev version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference   What is going on?

my system arch is amd64, i installed i386 as foreign arch and ran sudo apt dist-upgrade but after it finished, i keep getting this error while using apt:      apt-get: relocation error: /usr/lib/x86_64-linux-gnu/libapt-private.so.0.0: symbol ZN3URIcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEB5cxx11Ev version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference   even when i use aptitude:     aptitude: relocation error: aptitude: symbol ZN3URIcvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEB5cxx11Ev version APTPKG_5.0 not defined in file libapt-pkg.so.5.0 with link time reference   any solution?


I can access the Huawei P9 on Win10 with adb, and shell into it, but that is with the phone booted into OS. I want to run a filesystem scan (e2fsck), but need un-mounted partitions for that. I read a thread where someone was running e2fsck from recovery on his phone using adb shell. If I boot the phone into recovery using adb, I get Reboot / Factory reset / Wipe Cache on menu, but phone is inaccessible on PC (adb or fastboot). Booting phone into bootloader via adb or directly on phone, also inaccessible via adb or fastboot. Shell seems only to be accessible when Android is booted. Any ideas?

I know that Android supports fstrim but it only works if the phone is idle for a long time while charging. I think my phone is too fragmented and is lacking performance so I want to reset it but I am not sure if TRIM will also run if I do so. Since TRIM is important to improve the SSD's speed, I'd really like to run TRIM on my phone.


I have a Samsung Galaxy S5 that has a shattered screen. It doesn't unlock, but the phone works fine.   I purchased a new phone, and I want to transfer all my contents from the old phone to the new phone.  The problem is the phone is locked with a pattern, and I cannot accesses it as the screen is broken. Does anyone know how to access it?

My Android device screen got broken and I can't see what I'm doing. That's the only wrong thing with my device, the rest is apparently working OK. Is there any way to send my device screen to my computer? I don't want to work blindly anymore!


I'm a programmer, and when I have a large task to complete I often write some "bad" code that just about does the job, and then flesh that out into a more robust and higher quality solution to the problem. Is there a word for this sort of practice? I've considered "making a proof-of-concept", but it doesn't quite fit what I'm looking for – to me, the term "proof-of-concept" suggests that there was actually a need for someone to prove that a solution exists. The situations I'm thinking about are more about solving a big problem badly and then making the solution better, rather than simply proving that the big problem could be solved.

I am working with some code, and I would like to describe the difference in its performance when it is optimized versus when it is not optimized. Unfortunately, I can't find a word to describe the code before it is optimized; "sub-optimal" might work, but I want to emphasize that this is the first iteration of the code. If "unoptimized" were a word, I would use that, but I haven't found any references to it in any dictionary.  Perhaps "raw" or "original"?


I just received the Ubuntu 16.04 LTS USB stick.  I wish to install Ubuntu onto an Aspire V5-122P currently running windows 10. What would be the step by step method to accomplish installation?

I would like to see a full how-to guide on how to install Ubuntu.


I don't think there will be a canonical answer for this question. I'm just wondering if this is how it works.  It's said that when you kill someone, you split your soul. I believe that means you split it in half.  So, I came up with this graph:      The splitted part of the soul couldn't be exactly 1/7 every time because he didn't know how many he would make, perhaps he would make more in the future.  He asked Slughorn about making 7, that's why I'm using this number here.  Perhaps it's just a random percentage of the soul... I don't know.  But, as I said, considering that the soul is split in half.  When he splits it again, I don't think a soul already "horcruxed" would be a part of this division, since it is intact inside another object that could be anywhere in the world.  So, this means that the first Horcrux he made would have half his soul. Then, the second would have 1/4 of it, just as himself.  Does that means that Voldemort fought against Harry in the last book with only 0,78% of his soul in his body?  Is my math insane?

When you commit a murder and create a Horcrux, you split your soul. It’s been talked a lot about Voldemort splitting his soul in 7/8 parts. But I think his remaining soul was not 1/7 or 1/8 but far more weaker than that because he did not create all Horcruxes at once.  When he created his first Horcrux, his soul was split into 50-50 (diary). But when the second Horcrux was created, it was created by Voldemort only and the first Horcrux soul should have remained intact. Hence it would have been a 25-25 split of Voldemort's main soul. And so on for every split.  Am I right?


With the cathodic screen, higher the refresh rate was the best for your eyes. I remember that 60 Hertz was always to low. I set it at higher as I could  Since I use a flat screen, I don't care about the refreshing rate because it seems I didn`t have to. I never have headache, problem with eyes...  This morning, I checked the refresh rate of my flat screen and it's 60 hertz. I can't set it to a higher rate.  Why 60 hertz is ok ( at least it seems ok for me...) on a flat screen and it was obviously to low on cathodic screen ?

I have never really paid any attention to the refresh rate setting on computers with LCD screens.  I thought with LCD displays the pixels are either on or off, they don't flicker like in old CRT monitors.  Seems trivial to me, but my own graphics card allows me to select 59Hz or 60Hz - which leads me onto my question:  Does the refresh rate affect LCD screens?  Technical info to back up any answers would be great.


Alice has a secp256k1 key pair that she used some time ago when she communicated with Bob. Bob can no longer user secp256k1 but he only uses ed25519 instead. Alice and Bob cannot exchange any messages.  Is there a secure algorithm that Bob can use to derive an ed25519 pubkey from original Alice's secp256k1 pub key and also Alice can derive the matching ed25519 private key from her original secp256k1 private key

Alice has a secp256k1 key pair that she used some time ago when she communicated with Bob. Bob can no longer user secp256k1 but he only uses ed25519 instead.  Is there a secure algorithm that Bob can use to derive an ed25519 pubkey from original Alice's secp256k1 pub key and also Alice can derive the matching ed25519 private key from her original secp256k1 private key such that they can communicate securely via ed25519 encrypted messages?  Thanks!


I need to prove that $S_n := \frac{1}{n}(X_1X_2 + X_2X_3 +...+X_nX_{n+1})$, where $X_k$ are rvs independtly Poisson distributed with parameter $\lambda = 2$ for any natural $k$, converges almost surely.   I proved that this sequence converges in probability to 4 because of The Weak Law of Large Numbers. But I'm struggling with a.s. convergence. I thought about Kolmogorov 0-1 theorem but it leads me nowhere.

Let ${X_n}$ be a sequence of independent and identically distributed, square integrable random variables.   Write $ u = E(X_n)$. Study the almost sure convergence, as $n \rightarrow \infty$, $$S_n = (X_1X_2 + X_2X_3 + ... + X_{n-1}X_{n})/n$$   Since $X_iX_{i+1}$ are not independent, it seems we cannot directly use law of large number for that, so anyone can give me some idea?


I know that to find the slope of a tangent line at a point $(x, y)$ the general form is $y-y_1 = f'(x_1)(x-x_1)$, and the equation of a line perpendicular to that tangent line is $y-y_1 = -\frac{1}{f'(x_1)} (x-x_1)$. So my question is, what is the general form for an equation that intersects the tangent line of a function at an angle of $\theta$? Thanks in advance!

I'm trying to figure out this problem and feel like it's something that must be so simple that I could've done in high school no problem, but for some reason my brain is frozen this morning.  I would really appreciate any help, and want to say thanks in advance. I tried to draw a picture below; I want to find the slope of a line given a point $(x,y)$ and $\theta$.


I'm brand new to Ubuntu and trying to install steam.  I downloaded steam_latest.deb and installed it, but whenever I try to open it it gives me this:  Steam needs to install these additional packages:   libgl1-mesa-dri:i386, libgl1-mesa-glx:i386, libc6:i386  Reading package lists... Done  Building dependency tree         Reading state information... Done  E: Unable to locate package libgl1-mesa-dri:i386  E: Unable to locate package libgl1-mesa-glx:i386  E: Unable to locate package libc6:i386  Press return to continue:    Literally any help is appreciated I am so lost ;v;

I am currently using Ubuntu 14.10. Steam is showing up in the Ubuntu Software Center, but when I click on it it says:      Not found   There isn't a software package called "steam" in your current software sources.         Is there a fix for this? Am I the only one having this problem?


I got the application of version 1.1.2 in the playstore. I am checking the update of the playstore in the application but I got the error. I researched but couldnot get any solution. I got stuck with the error NumberFormatException.I have implemented as follows:   try {         currentVersion = context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName;     } catch (PackageManager.NameNotFoundException e) {         e.printStackTrace();     }   I have tried to fetch the version number of the application from playstore.  private class GetVersionCode extends AsyncTask<Void, String, String> {      @Override      protected String doInBackground(Void... voids) {          String newVersion = null;          try {             Document document = Jsoup.connect("https://play.google.com/store/apps/details?id="+context.getPackageName()+"&hl=en" )                     .timeout(30000)                     .userAgent("Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6")                     .referrer("http://www.google.com")                     .get();             if (document != null) {                 Elements element = document.getElementsContainingOwnText("Current Version");                 for (Element ele : element) {                     if (ele.siblingElements() != null) {                         Elements sibElemets = ele.siblingElements();                         for (Element sibElemet : sibElemets) {                             newVersion = sibElemet.text();                         }                     }                 }             }         } catch (IOException e) {             e.printStackTrace();         }         return newVersion;      }       @Override      protected void onPostExecute(String onlineVersion) {          super.onPostExecute(onlineVersion);          if (onlineVersion != null && !onlineVersion.isEmpty()) {              if (Float.valueOf(currentVersion) < Float.valueOf(onlineVersion)) {                 //show anything             }          }          Log.d("update", "Current version " + currentVersion + "playstore version " + onlineVersion);      } }

Is there a standard idiom for comparing version numbers?  I can't just use a straight String compareTo because I don't know yet what the maximum number of point releases there will be.  I need to compare the versions and have the following hold true:  1.0 < 1.1 1.0.1 < 1.1 1.9 < 1.10


I have a very frustrating history using Stack Overflow, as every time I have a solution to a problem I saw asked there, I cannot post an answer as my account is banned. I have no reputation, but how can I raise my reputation if I am banned? I feel stuck. I got no helping feedback regarding this.

If you are reading this, you may have been affected by one of our post quality bans. If so, it is important that you  to understand what has happened and how to regain the permissions that you lost. While trying to ask a question, one could see:  We are no longer accepting questions from this account. See  to learn more.  Likewise, for answers:  We are no longer accepting answers from this account. See  to learn more.   Why am I getting this message? Are deleted posts taken into account too? Is a question/answer ban the same as a suspension? How do I avoid getting a question ban? How long do I have to wait before I can post again? What can I do to release the ban? How can I reactivate my account? Can I simply create a new account? I'll just ask somewhere else on the SE network, and they'll migrate my question to the correct site! Will a ban on one Stack Exchange site affect my standing on other sites in the network? Does this apply to meta sites too? My account is in good standing. Why am I still blocked?


I have several deleted site collections which cannot be seen in active and deleted sites in new SharePoint admin center. Attempting to browse them in the browser would return 404 File Not Found. However, when I type the names in the search bar, they appear among the results.  I have seen something like full crawl or re-index. But those are mostly for SharePoint Servers not Online and I cannot access the setting page of those sites. Is there any way to make those sites disappear from the search result?  Thanks in advance.

I am listing all site collections of the company by calling:  /_api/search/query?querytext='contentclass:STS_Site'&trimduplicates=false   Among the returned site collections, some are deleted. When navigating to them in the browser, there shows 404 File not found. And they cannot be seen in both active and deleted site in the new SharePoint admin center.  Is there any way to exclude deleted site collections in the API call? Or is there any way to search for a list of deleted site collections?  Thanks in advance.


Suppose we start at the number zero, and repeatedly roll a fair $6$-sided die, adding the resulting number to the total. We win if we reach the total $k$, and lose if we overshoot, for example by reaching a total of $k-1$ and then rolling a number greater than $1$. What is the probability to win?

I roll a fair die and sequentially sum the numbers the die shows. What are the odds the summation will hit exactly 100?  More generally, what are the odds of hitting an exact target number t while summing the results of numbers sequentially drawn uniformly from a set S.  I have experimentally tested this and the result is (warning - spoilers ahead):      1 over the expectation of the drawn numbers. In the case of the fair die 1/((1+2+3+4+5+6)/6) = 6/21 = 2/7   However I do not have a strong intuition, let alone a formal proof, why this is the case.  I'll be happy to get your thoughts!


Have tried various things but I can't find a good solution to enable two finger swipe to go 'back' in a browser. Two finger vertical scrolling works fine, but it's side-swipe back/foward I'm after.  ginn seems like it might do it, but it fails in precise with unity saying 'error subscribing to gestures', and the fix seems complicated - seems to involve fiddling with source and recompiling.  easystroke is another possibility, but it requires a mouse button to be held down and so doesn't give proper two finger swipe, this isn't what i'm after.  In case it's relevant, my touch pad is identifed as 'CyPS/2 Cypress Trackpad'  Thanks!

I can already scroll left and right with two-finger swiping, however, in Windows I can use the same gestures to go forward and back in browsers and such. Is this possible in Ubuntu?


I'm new in ubuntu and I tried to install the alternate CD in my machine. Everything went fine but when I tried to boot a black screen and a blink cursor went on. I can boot from my USB and searching in internet I found a post suggesting that the swap was into the USB, the suggestion is to reinstall ubuntu. My question is: is there a way to fix this (booting from the hdd of my computer) without reinstalling?  If not, what should I do different in the new installation in order to avoid this situation in the future?  I hope you could give me a hand with this. Best regards, Seba.

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:


I've tried addding the class in manifest and all other things mentioned in other questions, still no luck public class StarterApplication extends Application {    @Override   public void onCreate() {     super.onCreate();      // Enable Local Datastore.    // Parse.enableLocalDatastore(this);             Parse.initialize(new Parse.Configuration.Builder(this)               .applicationId("******")               .clientKey("********")               .server("********")               .build()       );      ParseObject object = new ParseObject("LOL");     Log.i("Okay", "Done");     object.put("myNumber", "123");     object.put("myString", "Divya");     Log.i("Addded", "test");      object.saveInBackground(new SaveCallback() {       @Override       public void done(ParseException e) {           if (e == null) {               e.printStackTrace();           } else{               Log.i("Yes", "Done");           }       }     });      /*object.saveInBackground(new SaveCallback () {       @Override       public void done(ParseException ex) {         if (ex == null) {           Log.i("Parse Result", "Successful!");         } else {           Log.i("Parse Result", "Failed" + ex.toString());         }       }     }); */      //ParseUser.enableAutomaticUser();      ParseACL defaultACL = new ParseACL();     defaultACL.setPublicReadAccess(true);     defaultACL.setPublicWriteAccess(true);     ParseACL.setDefaultACL(defaultACL, true);    } }  I've properly given my app id server keys and other

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?


Why is this toy example so difficult for neural net to learn? My guess is that the output of the first hidden layer is not normalized, so propagated gradient is not very stable. I've tried adding BatchNormalization between the two linear layers, but it has no visible effect on the optimization.  UPD: It seems like this particular behavior is caused by . This matches my experiments, which showed that the learning occurs only with very small learning rate.  Example code:  import numpy as np import keras from keras.models import Sequential from keras.layers import Dense  x = np.arange(100)[:, np.newaxis] f = lambda x: x ** 2 + 3 y = f(x) x_normed = (x - x.mean()) / x.std()  km = Sequential() km.add(Dense(1, activation=None)) km.add(Dense(1, activation=None)) km.compile('sgd', loss='mse')  km.fit(x_normed, y, epochs=300)

I'm training a neural network but the training loss doesn't decrease. How can I fix this?  I'm not asking about overfitting or regularization. I'm asking about how to solve the problem where my network's performance doesn't improve on the training set.    This question is intentionally general so that other questions about how to train a neural network can be closed as a duplicate of this one, with the attitude that "if you give a man a fish you feed him for a day, but if you teach a man to fish, you can feed him for the rest of his life." See this Meta thread for a discussion:   If your neural network does not generalize well, see:


$(d_k)$ is a positive sequence in $\mathbb{R}$ with: $\lim_{n\to \infty} \sum_{k=1}^n d_k = \infty.$  Do the following series converge or not?  a) $\sum_{n\geq 1} \frac{d_n}{1+d_n}$ b) $\sum_{n\geq 1} \frac{ d_n}{1 + n d_n}$, c) $\sum_{n\geq1} \frac{d_n}{1 + n^2 d_n}$ d) $\sum_{n\geq 1} \frac{d_n}{1+d_n^2}$

Do the following series converge if $a_n>0$ and $\sum_{n=1}^{\infty}a_n$ diverges ?  a.) $\sum_{n=1}^{\infty}{a_n \over 1+ a_n}$  b.)$\sum_{n=1}^{\infty}{a_n\over 1+ a_n ^2}$  c.)$\sum_{n=1}^{\infty}{a_n\over 1+ na_n }$  d.)$\sum_{n=1}^{\infty}{a_n\over 1+ n^2a_n }$  What I thought was using Alembert criteria , but it just not seem to work. I also now if $a_n$ converges so does $a_n^2$. Ive tried everything to no avail, can anyone please help ?


In my app, I have nginx proxy to my app server (unicorn).  I'm trying to improve my file upload performance. I've read that through various techniques you can prevent your app processes from being blocked while the file is uploading. Current information on the best way to approach this topic seems hard to come by (see ).  I'm trying to do this using client_body_in_file_only on; which as I understand it tells nginx to buffer the entire request to disk.  What I'm confused about is that even without this directive I see this in my nginx logs:  2014/10/10 17:41:43 [warn] 50331#0: *798 a client request body is buffered to a temporary file /usr/local/var/run/nginx/client_body_temp/0040665399, client: 127.0.0.1, server: my_site.dev, request: "POST /upload HTTP/1.1", host: "my_site.dev", referrer: "https://my_site.dev/upload"   It looks to me like nginx is buffering the file upload to disk anyway.  Is nginx just smart out of the box here? Should I still use client_body_in_file_only? Am I misunderstanding what's happening here?

I get the following error in my log files every time I try to upload a large file.  a client request body is buffered to a temporary file /var/lib/nginx/body/0000000001   Although the file uploads successfully, I always get the above error.  I increased the client_body_buffer_size to 1000m which is what I expect the largest file uploaded to be. However, this is was just a guess and although I don't get that error anymore I am wondering if this is an appropriate value to set for the client_body_buffer_size?  I would appreciate it if anyone can shed some light on this directive and how it should be used.


I was wondering if it makes sense to run a linear regression when my dependent variable only has 20 observations in total (I do have it for 6 years). This is the scenario: 20 observations consists which is one observation for every neighborhood in a certain city. Furthermore, I have 6 independent variables with just as many datapoints (which makes sense since I have data for each neighborhood). There is really also no way to increase the datapoints, unless I look at street level data (which I do not have). I was wondering if it is still possible (since it does represent each part of the city) to draw a useful conclusion from said linear regression.

I want to run a regression with 4 to 5 explanatory variables, but I have only 15 observations. Not being able to assume these variables are normally distributed, is there a non-parametric or any other valid regression method?


When I installed Ubuntu on my system my hard formatted entirely and Ubuntu installed on it. Now i want to change partitions of hard disk but it seems is impossible.    How can I resize it?

I want to shrink my second (LVM) partition, in order to create a new partition in the newly freed space. I am using the Live CD to do so, because I know I can't resize/move this partition while it is in use. When I opened GParted in the Live CD, I realized that I could not resize the partition, because when I right-click it, the option "resize/move" is disabled.  I tried to unmount it, to "lazy" unmount it (umount -l /dev/sda2) but it didn't work.  A screenshot from GParted:


I remember doing this a long time ago and have forgotten how I had done it. I like to do this when I have long html or php files to edit and I need part of the code from further down the file in a place nearer to the top, or when I want to compare different parts of the same file.  There was a way to do this without opening two instances of Notepad++ and when I clicked on save, it made the saved changes in both instances of the opened file (whereas if I have 2 Windows of Notepad++ opened simultaneously, it will prompt me to either update or not update the second opened instance if the first one was saved midway.)

I would like to split the Notepad++ window so that I can edit two files side by side.  How can I do this in Notepad++?


I'm trying to get the name of a file using Win32 handle in C++.  I have two more concerns, the file might be empty (opening the file may not work) and I can't use all the fancy functions (e.g. GetFinalPathNameByHandle) which are supported by Windows Vista and above.   Thanks for the help!

What's the easiest way to get the filename associated with an open HANDLE in Win32?


Why does this works  bold="$(tput bold)" reset="$(tput sgr0)" c0="${reset}${bold}" cat <<EOF ${c0} \` EOF   but not this one?  bold="$(tput bold)" reset="$(tput sgr0)" c0="${reset}${bold}" cat <<EOF ${c0} ` EOF

I'd like to print a man style usage message to describe a shell function like this output man find:  NAME        find - search for files in a directory hierarchy  SYNOPSIS        find [-H] [-L] [-P] [-D debugopts] [-Olevel] [starting-point...] [expression]  DESCRIPTION        This  manual  page  documents the GNU version of find.  GNU find searches the directory tree rooted at each        given starting-point by evaluating the given expression from left to  right,  according  to  the  rules  of        precedence  (see section OPERATORS), until the outcome is known (the left hand side is false for and opera‐        tions, true for or), at which point find moves on to the next file name.  If no  starting-point  is  speci‐        fied, `.' is assumed.  OPTIONS   I am facing an error message on the ` character. Following simple script shows the error:  ~$ cat <<EOF `.' EOF  bash: bad substitution: no closing "`" in `.'   I though heredoc was a cool way to echo strings by pasting them without having to escape its content such a quotes, etc... I assume I was wrong :/  Can someone explain this behavior please? Can heredoc accept ` character?  Edit 2: I accepted the answer of quoted here-document  <<'END_HELP', but I finally won't use it for this kind of complete manual output as  does   Edit 1: (For future reads) the limit with using quoted here-document is that is prevents to use tput in the here-document. To do so, I did the following:   unquoted here-document, for tput commands to be executed prevent the "bad substitution" error by escaping the backtick instead use tput within the  here-document   Example:  normal=$( tput sgr0 ) ; bold=$(tput bold) ;  cat <<END_HELP # here-document not quoted ${bold}NAME${normal}        find - search for files in a directory hierarchy  ${bold}SYNOPSIS${normal}        find [-H] [-L] [-P] [-D debugopts] [-Olevel] [starting-point...] [expression]  ${bold}DESCRIPTION${normal}        This  manual  page  documents the GNU version of find.  GNU find searches the directory tree rooted at each        given starting-point by evaluating the given expression from left to  right,  according  to  the  rules  of        precedence  (see section OPERATORS), until the outcome is known (the left hand side is false for and opera‐        tions, true for or), at which point find moves on to the next file name.  If no  starting-point  is  speci‐        fied, \`.' is assumed. END_HELP  unset normal ; unset bold ;   Here, note the escaped backtick that was source of error:  \`.'


If I have some object that has a property that may or may not exist, is there a preferred way to check for its' existence?  // Good? (someObj.property !== undefined && someObj.property !== null)  // Better? (typeof someObj.property !== 'undefined')  // Best? (someObj.property != null)   *The last != operator is      Strict equality checks (===) must be used in favor of abstract equality checks (==). The only exception is when checking for undefined and null by way of null. The use of == null is also acceptable in cases where only one of null or undefined may be logically encountered, such as uninitialized variables.

What's the best way of checking if an object property in JavaScript is undefined?


Let´s assume we have the polynomial: $ax^3+bx^2+cx+d$  This polynomial has three zero points: $A$, $B$ and $C$.   How can I show that $$\dfrac{b}{a} = -(A+B+C)$$   and   $$\dfrac{c}{a} = (AB + AC + BC)$$?  Thanks for your help!

Background:  Vieta's Theorem for cubic equations says that if a cubic equation $x^3 + px^2 + qx + r = 0$ has three different roots $x_1, x_2, x_3$, then  $$\begin{eqnarray*} -p &=& x_1 + x_2 + x_3 \\ q &=& x_1x_2 + x_1x_3 + x_2x_3 \\ -r &=& x_1x_2x_3 \end{eqnarray*}$$  The exercise is:     A cubic equation $x^3 + px^2 + qx + r = 0$ has three different roots $x_1, x_2, x_3$. Find $(x_1 - x_2)^2 (x_2 - x_3)^2 (x_1 - x_3)^2$ as an expression containing $p, q, r$.   Spoiler alert: the answer is $-4p^3r - 4q^3 + p^2q - 27r^2 - 18pqr$.  My question is: how am I supposed to find that without using a computer?


I have this code, the question is below the code:  public class MainProgram {     public static void Main()     {         List<Animal> Animals = new List<Animal>();         Animals.Add(new Dog());         Animals.Add(new Poodle());         Animals.Add(new Poodle());         Animals.Add(new Beagle());         Animals.Add(new Cat());          Bark[] JustTheBarks = Dog.GetBarkList(Animals);         foreach (Bark B in JustTheBarks)         {             Console.WriteLine(B.ToString());         }     } }  abstract class Animal {     public abstract Noise GetNoise(); }  class Dog : Animal {     public override Noise GetNoise()      {         return new Bark("bark");     }      public static Bark[] GetBarkList(List<Animal> List)     {         return List             .OfType<Dog>()             .Select(r => r.GetNoise())             .Cast<Bark>()             .ToArray();     } }  class Beagle : Dog {     public override Noise GetNoise()     {         return new Woof("woof", 7);     } }  class Poodle : Dog {     public override Noise GetNoise()     {         return new Purr();     } }  class Cat : Animal {     public override Noise GetNoise()     {         throw new NotImplementedException();     } }  class Noise { }  class Bark : Noise {     protected string Text;     public Bark(string Text)     {         this.Text = Text;     }      public override string ToString()     {         return $"{Text}";     } }   class Woof : Bark {     protected int Pitch;      public Woof(string Text, int Pitch) : base(Text)     {         this.Pitch = Pitch;     }     public override string ToString()     {         return $"{Text}->{Pitch}";     } }  class Purr : Noise { }   }  In plain text, Animals and Noises, each animal returns its own type of noise, the noises correspond to the animal class, although sometimes an animal might return different Noises based on some variable (but for a dog only some form of Bark).  This code crashes of course. The Poodle returns a Purr(), and it "should" return something of type Bark.  I have the abstract function GetNoise() which just returns a Noise. What I want/need is to write   class Dog {     public override Bark GetNoise(); }   But this is not allowed, the return type must be the same. I don't want to write a second layer of GetBark() functions in every Dog class, etc.  What I want is to re-write this such that there is no casting, and everything that is derived from Dog is forced to return a Bark in its GetNoise() function such that I can safely write:  Bark B = Dog.GetNoise();

As far as i know it is not possible to do the following in C# 2.0  public class Father {     public virtual Father SomePropertyName     {         get         {             return this;         }     } }  public class Child : Father {     public override Child SomePropertyName     {         get         {             return this;         }     } }   I workaround the problem by creating the property in the derived class as "new", but of course that is not polymorphic.  public new Child SomePropertyName   Is there any solution in 2.0? What about any features in 3.5 that address this matter?


It seems that \hphantom{} is ignored at the beginning of an item.  The MWE below yields:  How to get "First" and "Second" aligned?. I know that you have to use \hspace*{} instead of \hspace{} at the beginning of a line, but it does not seem as if \hphantom*{} or \phantom*{} exist. Code: \documentclass{article} \usepackage{enumitem}  \begin{document} \begin{enumerate}     \item {}\hphantom{x }First Item.     \item x Second Item. \end{enumerate} \end{document}

Inserting an \hphantom to indent a table row works in tabular, but in tabulary it produces extra vertical space instead.   Since these are left-aligned L columns I would expect the space at the left edge to be preserved, while the space on the right is variable. Why does this happen and how could I fix it?  \documentclass{article} \usepackage{tabulary}  \newcommand{\sator}{Sator arepo tenet opera rotas} \newcommand{\tabindent}{\hphantom{em}}  \begin{document}  \section{Tabular}  \begin{tabular}{ll} \sator  & \sator\\ \tabindent\sator & \tabindent\sator\\ \end{tabular}  \section{Tabulary}  \begin{tabulary}{\textwidth}{LL} \sator  & \sator\\ \tabindent\sator & \tabindent\sator\\ \end{tabulary}  \end{document}


I'm trying to iterate through a list of lists, in order to rearrange it in a new list of lists:  lt = [["a","b","c"],["A","B","C"],["1","2","3"],["4","5","6"]]  lt2 = [[]]*len(lt[0])  for i in range(len(lt[0])):     for v in range (len(lt)):         lt2[i].append(lt[v][i])  print(lt2)   I'm expecting the following to happen: 1- i = 0, the nested loop iterates v 4 times, from 0-3 2- i = 1, the nested loop iterates v 4 times again. 3- i = 2, the nested loop iterates v 4 times for the last time. What I'm planning to achieve is to get the following:  lt2 = [['a','A','1','4'], ['b','B','2','5'],['c','C','3','6']]
   So it's a rearranged list of lists  Unexpectedly, I'm getting:  lt2 = [['a', 'A', '1', '4', 'b', 'B', '2', '5', 'c', 'C', '3', '6'], ['a', 'A', '1', '4', 'b', 'B', '2', '5', 'c', 'C', '3', '6'], ['a', 'A', '1', '4', 'b', 'B', '2', '5', 'c', 'C', '3', '6']]

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


Everyday we see ourselves in mirror and this is due to light which forms our image after reflection ( may be refraction sometimes) . But I wonder how can light carry the image. How is it possible that massless particles (or waves maybe, which is not an issue now ) can carry the image of the source from which they come or object by which they got reflected bat a tremendous speed ?   I know that things we perceive as they are because of our eyes but the point of that our eye must also perceive things which really occur. Like if the light rays are coming from an object  at infinity and incident on a concave mirror, then they get converged to points in the focal plane and we say that a real image has been formed there. Then the question is how light made that image  (which may be perceived by our eyes) ?

How do rays of light getting focused at a point create an image?  How are the information of object's shape and dimensions expressed as an image when light rays converge?  Is it understandable by solving wave equation for light?


I recently switched to an Ubuntu computer and the one thing that annoys me is the lack of games available. However I have found a program called WINE which can run Windows applications (.exe) on Linux computers. I have nearly all of my games on Steam but it won't let me download the files if I'm not on a supported OS, even if I could use them through WINE.  Now my question is; would it be possible to download the games in my Steam library any other way? I wouldn't mind if they didn't have steam overlay support and other steam functions, as long as I could play the games.

I have a bunch of games ready to be played but my internet connection is too slow to download steam.   I tried getting a updated installation file, which i did, but it still requires internet to complete the installation. Any help??


Why does $1+2+\dots+2003=\dfrac{2004\cdot2003}2$?   Sorry if this is missing context; not really much to add...

Apparently $1+2+3+4+\ldots+n = \dfrac{n\times(n+1)}2$.  How? What's the proof? Or maybe it is self apparent just looking at the above?   PS: This problem is known as "The sum of the first $n$ positive integers".


I'm quite good at English,but not adept in it. Over a period of time I've gotten a good grip over it and I could ponder a lot about grammar in detail. I've doubt regarding the following Qs. and need details and if it is right why and how convict me with grammar.        You'll get a chance to see macy play live. (I think Correct)   or   You'll get a chance to see macy playing live. (Not Correct)   How to stop your hair become white? (I think Correct)   or   How to stop your hair becoming white? (Not Correct)

Excuse my limited acquaintance on English usage; which sentence is grammatically correct, and if any, which meaning does each convey?   I saw them play chess. I saw then playing chess.


I tried the question using Euclidean algorithm.

When I am faced with a simple linear congruence such as  $$9x \equiv 7 \pmod{13}$$ and I am working without any calculating aid handy, I tend to do something like the following:  "Notice" that adding $13$ on the right and subtracting $13x$ on the left gives: $$-4x \equiv 20 \pmod{13}$$  so that $$x \equiv -5 \equiv 8 \pmod{13}.$$  Clearly this process works and is easy to justify (apart from not having an algorithm for "noticing"), but my question is this: I have a vague recollection of reading somewhere this sort of process was the preferred method of C. F. Gauss, but I cannot find any evidence for this now, so does anyone know anything about this, or could provide a reference? (Or have I just imagined it all?)  I would also be interested to hear if anyone else does anything similar.


As I was reading , I saw Ethan's answer. However, perhaps this is very obvious, but why does the degree of the polynomial be at most $2$? I get that the polynomial must be irreducible but does that force the degree to be at most $2$?

So I understand how to do integration on rational functions with a linear and a quadratic denominator, and I understand how to do a partial fraction decomposition, but I was wondering what happens if the polynomial is higher degree and can't be factored. Later in the page, it says this:     However, it can be shown that any polynomial with real coefficients is a product of linear and/or irreducible quadratic factors with real coefficients.   And I was wondering, how do we know this and is this definitely true?


Consider sequence spaces of the form,  $$\ell^p=\Big\{x=\left(x_j\right)_{j=1}^\infty  \mathrel{}\big|\mathrel{} \sum_{j=1}^\infty \left\lvert x_j \right\rvert ^p\lt\infty\Big\}$$  for $1\le p\lt\infty$, equipped with the norm,  $$\left\|x\right\|_p:=\left(\sum_{j=1}^\infty\left\lvert x_j \right\rvert ^p\right)^{\frac{1}{p}}$$  for $x\in\ell^p$.  Now, in the case that $n=2$, the familiar norm on $\ell^2$ is obtained from the inner product, that is to say that the norm is induced by the inner product. And since $\ell^2$ is a infinite-dimensional Banach space, it follows that it is in fact an infinite dimensional Hilbert space.  Why is it, that when $p\neq2$, the space $\ell^p$ is not an inner product space?

Can anybody please help me to prove this:  Let $p$ be greater than or equal to $1$. Show that for the space $\ell_p=\{(u_n):\sum_{n=1}^\infty |u_n|^p<\infty\}$ of all $p$-summable sequences (with norm $||u||_p=\sqrt[p]{\sum_{n=1}^\infty |u_n|^p}\ )$, there is an inner product $<\_\,|\,\_> $ s.t. $||u||^2=<u\,|\,u>$ if and only if $p=2$.


Let $f(x)$ be a function that satisfies this functional equation, $f(xy)=f(x)f(y)$.  With a little bit of intuition and luck one may come to a conclusion that these are perhaps the solutions of $f(x)$,   $f(x)=x$ $f(x)=1$ $f(x)=0$   However, these solutions are family solutions of $f(x)=x^n$. What I meant by this is that, when $n=1$ you get the function $f(x)=x$. When $n=0$ you get $f(x)=1$ and when $x=0$ well you get $f(x)=0$. So, it seems $f(x)=x^n$ is the genuine solution to that functional equation and when you're taking different values for $x$ and $n$ you're getting bunch of other functions of the same family.   Getting excited by this I tried to take different values for $x$, for instance when $x=2$, $x^n$ becomes $2^n$. So, now I'm expecting the function $f(x)=2^n$ to satisfy this functional equation $f(xy)=f(x)f(y)$. However, it doesn't. I don't know why it's not satisfying. May I get your explanation?

Let  $f(xy) =f(x)f(y)$ for all $x,y\geq 0$. Show that $f(x) = x^p$ for some $p$.    I am not very experienced with proof. If we let $g(x)=\log (f(x))$ then this is the same as  $g(xy) = g(x) + g(y)$   I looked up the hint and it says let $g(x) = \log f(a^x) $   The wikipedia page for functional equations only states the form of the solutions without proof.  Attempt  Using the hint (which was like pulling a rabbit out of the hat)  Restricting the codomain $f:(0,+\infty)\rightarrow (0,+\infty)$ so that we can define the real function $g(x) =  \log f(a^x)$ and we have $$g(x+y) = g(x)+ g(y)$$   i.e $g(x) = xg(1)$ as $g(x)$ is continuous (assuming $f$ is).  Letting $\log_a f(a) = p$ we get $f(a^x) =a^p $. I do not have a rigorous argument but I think I can conclude that $f(x) = x^p$ (please fill any holes or unspecified assumptions) Different solutions are invited


I'm trying to draw a 3d cylinder using TikZ-3dplot, but the cylinder walls are not aligned properly (as you can see in the image).  Does anybody knows what am I doing wrong?  \documentclass{article} \usepackage{tikz}   \usepackage{tikz-3dplot}  \begin{document}  \pgfmathsetmacro{\thetadisp}{60} \pgfmathsetmacro{\phidisp}{170} \tdplotsetmaincoords{\thetadisp}{\phidisp}  \pgfmathsetmacro{\rvec}{.8} \pgfmathsetmacro{\thetavec}{15} \pgfmathsetmacro{\phivec}{30}  \begin{tikzpicture}[scale=10,tdplot_main_coords]      \coordinate (O) at (0,0,0) node[anchor=north]{$o$};      \draw[thick,->] (0,0,0) -- (1,0,0) node[anchor=east]{$x$};     \draw[thick,->] (0,0,0) -- (0,1,0) node[anchor=north west]{$y$};     \draw[thick,->] (0,0,0) -- (0,0,1) node[anchor=south east]{$z$};      \tdplotsetcoord{P}{\rvec}{\thetavec}{\phivec};     \draw[thick,color=gray,->] (O) -- (P);      \tdplotsetrotatedcoords{\phivec}{\thetavec}{0}      \tdplotsetcoord{A}{0.2}{90+\thetavec}{0};     \draw[thin,tdplot_rotated_coords,fill=gray] (A) arc[start angle=0,delta angle=180,radius=.2] -- ++(0,0,\rvec) arc[start angle=180,delta angle=-180,radius=.2] -- cycle;     \draw[thin,tdplot_rotated_coords,fill=green] (0,0,\rvec) circle[radius=.2];      \draw[thick,tdplot_rotated_coords,->] (0,0,0) -- (.2,0,0) node[anchor=north east]{$x'$};     \draw[thick,tdplot_rotated_coords,->] (0,0,0) -- (0,.2,0) node[anchor=west]{$y'$};     \draw[thick,tdplot_rotated_coords,->] (0,0,0) -- (0,0,.2) node[anchor=south west]{$z'$};      \end{tikzpicture}  \end{document}

I'm trying to draw some simple 3D objects in TikZ. I can do spheres and cuboids okay, but I'm struggling with circular cylinders: When rotating the scene (I use tikz-3dplot for this), the end faces have to be transformed from circles into ellipses. Using \draw ... circle; doesn't work, because a path defined like that will always stay circular. If I use \draw ... to ... to ... constructs with the in and out set to adequate values, I can "simulate" circles that transform slightly better: The "corner" points of the circle end up in the right place, but the in and out angles are not transformed appropriately.  What can I do to get "3D circles", i.e. circles that turn into ellipses when the 3D space is rotated?  Here's an example showing the problem:    \documentclass{article} \usepackage{tikz} \usepackage{tikz-3dplot}  \begin{document}  \tdplotsetmaincoords{40}{20} \noindent The vertical cylinder walls\\ are not aligned properly \ldots  \begin{tikzpicture}[tdplot_main_coords] \draw (0,0) circle [radius=1cm]; \end{tikzpicture} \begin{tikzpicture}[tdplot_main_coords] \draw (1,0,2) -- (0,1,2) -- (-1,0,2) -- (0,-1,2) -- cycle     (-1,0,0) -- (0,-1,0) -- (0,-1,2) -- (-1,0,2) -- cycle     (1,0,2) -- (0,-1,2) -- (0,-1,0) -- (1,0,0) -- cycle; \end{tikzpicture} \begin{tikzpicture}[tdplot_main_coords] \draw [in=225, out=-45, relative] (0.5,0.5,2) to (-0.5,0.5,2) to (-0.5,-0.5,2) to (0.5,-0.5,2) to (0.5,0.5,2)     (0.5,0.5,0) to (-0.5,0.5,0) to (-0.5,-0.5,0) to (0.5,-0.5,0) to (0.5,0.5,0)     (0.5,0.5,2) -- (0.5,0.5,0)     (-0.5,-0.5,2) -- (-0.5,-0.5,0); \end{tikzpicture}  \tdplotsetrotatedcoords{40}{50}{-30}\vspace{0.5cm} \noindent\ldots and the support points\\don't get transformed correctly  \begin{tikzpicture}[tdplot_rotated_coords] \draw (0,0) circle [radius=1cm]; \end{tikzpicture} \begin{tikzpicture}[tdplot_rotated_coords] \draw  (1,0,2) -- (0,1,2) -- (-1,0,2) -- (0,-1,2) -- cycle     (-1,0,0) -- (0,-1,0) -- (0,-1,2) -- (-1,0,2) -- cycle     (1,0,2) -- (0,-1,2) -- (0,-1,0) -- (1,0,0) -- cycle; \end{tikzpicture} \begin{tikzpicture}[tdplot_rotated_coords] \draw [in=225, out=-45, relative] (0.5,0.5,2) to (-0.5,0.5,2) to (-0.5,-0.5,2) to (0.5,-0.5,2) to (0.5,0.5,2)     (0.5,0.5,0) to (-0.5,0.5,0) to (-0.5,-0.5,0) to (0.5,-0.5,0) to (0.5,0.5,0)     (0.5,-0.5,2) -- (0.5,-0.5,0)     (-0.5,0.5,2) -- (-0.5,0.5,0); \end{tikzpicture}  \end{document}


I've been trying to install Canon LBP 2900 driver on my Ubuntu 18.04 for the past few days. I tried following many tutorials such as , and also tried installing via GUI by downloading . I'm having problems installing.  Preparing to unpack cndrvcups-capt_2.71-1_amd64.deb ... Unpacking cndrvcups-capt (2.71-1) ... dpkg: dependency problems prevent configuration of cndrvcups-capt: cndrvcups-capt depends on cndrvcups-common (>= 3.21); however: Version of cndrvcups-common on system is 2.60-1.  dpkg: error processing package cndrvcups-capt (--install): dependency problems - leaving unconfigured Processing triggers for systemd (237-3ubuntu10.2) ... Processing triggers for ureadahead (0.100.0-20) ... Errors were encountered while processing: cndrvcups-capt   How can I get this printer working?

How do I install the driver for Canon LBP 2900 printer in Ubuntu 14.04?  I have tried installing drivers from the official CANON support and checked other answers on Ask Ubuntu but so far no results.


How do i randomly generate an alpha numeric string in java.  My session Id string is of the format   b03c0-000-5h6-7645-000000000    I want to randomly generate only the 4th chunk of it (b03c0-000-5h6-****-000000000). retaining all the other numbers same.

I've been looking for a simple Java algorithm to generate a pseudo-random alpha-numeric string.  In my situation it would be used as a unique session/key identifier that would "likely" be unique over 500K+ generation (my needs don't really require anything much more sophisticated).    Ideally, I would be able to specify a length depending on my uniqueness needs. For example, a generated string of length 12 might look something like "AEYGF7K0DM1X".


How come my while loop continues to print "Please enter stock length(mm): "  code:  while (true) {             // input stocks             System.out.print("Please enter stock length(mm): ");             Scanner sc = new Scanner(System.in);             int stockLength = sc.nextInt();             System.out.print("Please enter quantities of this stock length: ");             int stockQuantity = sc.nextInt();             Stocks stockObj = new Stocks(stockLength,stockQuantity);             stockList.add(stockObj);             System.out.print("Are you done? (y/n): ");             String done = sc.nextLine();             if (done == "y" || done == "yes") {                 break;             }         }   Output:  Please enter stock length(mm): 4 Please enter quantities of this stock length: 4 Are you done? (y/n): Please enter stock length(mm):

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


On my iphone 5 I could make apps "disappear" by double clicking on the home button and then temporarily remove the ones in regular use by holding finger on them until the shook then cancelling by pressing the cross.This preserved battery power. On the iphone 5s this system doesn't work. Anyone have an answer?

In iOS 6 and below I could double tap the home button, tap and hold an app, and  click the red - to close an application(s).  In iOS 7 this does not work. How can I restart an app that's exploding without resetting the entire OS?


The group $G$ acts on the finite set $X$. Let $a,b \in G$. Show that $a$ and $b^{-1}ab$ have the same number of fixed points in $X$  My idea was perhaps to define two sets which contain all the fixed points of $a$ and $b^{-1}ab$ respectively and then proceed to find a bijection between those groups. The function I thought of is defined by $f(x)=b^{-1}x$. Would that be a sufficient proof and if so how exactly can I do that (for example is it necessary to prove it is well-defined)?

Lecture notes:  If $g$ and $h$ are conjugate then $fix(g)=fix(h)$. To see this, say $g=k^{-1}hk$  If $g.s=s \iff k^{-1}hk.s=s \iff h.(k.s)=(k.s)$  Me: I understand the last line- I just fail to see how it implies $fix(g)=fix(h)$  EDIT: As Ben S says I think there was a typo in the notes and they forgot modulus signs so- New Aim: show $|fix(g)|=|fix(h)|$


When do we omit the definite article THE at the beginning of a phrase and for what reason?  Removal of skin or the removal of skin. Could someone give some examples?

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


I need to prove that if a function is injective(one-one) and has Intermediate Value Property, then the function is continuous. I just need a hint as I would like to solve it on my own. P.S.-Remember that Intermediate Value Property on it's own does not imply continuity.

A function $f: \mathbb{R} \to \mathbb{R}$ is said to have the intermediate-value property if for any $a$, $b$ and $\lambda \in [f(a),f(b)]$ there is $x \in [a,b]$ such that $f(x)=\lambda$.  A function $f$ is injective if $f(x)=f(y) \Rightarrow x=y$.  Now it is the case that every injective function with the intermediate-value property is continuous. I can prove this using the following steps:   An injective function with the intermediate-value property must be monotonic. A monotonic function possesses left- and right-handed limits at each point. For a function with the intermediate-value property the left- and right-handed limits at $x$, if they exist, equal $f(x)$.   I am not really happy with this proof. Particularly I don't like having to invoke the intermediate-value property twice.  Can there be a shorter or more elegant proof?


I have code to center a div on an HTML page. My problem is that margin: 0 auto only centers the div horizontal, but I want it fully centered, so also vertically.    body{   background-position: center;   background: #0a056f;   background: -moz-linear-gradient(45deg, #0a056f 0%, #054fb5 100%);   background: -webkit-linear-gradient(45deg, #0a056f 0%,#054fb5 100%);   background: linear-gradient(45deg, #0a056f 0%,#054fb5 100%);   filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0a056f', endColorstr='#054fb5', GradientType=1); }  .login_register_recover_box{   background-color: #fff;   background-position: center;   -moz-box-shadow:    0px 0px 50px 5px #091079;   -webkit-box-shadow: 0px 0px 50px 5px #091079;   box-shadow:         0px 0px 50px 5px #091079;   width: 75%;   margin: 0 auto;   border-radius: 10px; }    <link rel="stylesheet" type="text/css" href="assets/custom/reset.css">   <link rel="stylesheet" type="text/css" href="assets/custom/custom1.css">
&nbsp;fdfdss
      Thank you!

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


I think in some media, light can be significantly slowed down; but even if only slightly, where would the momentum go when the light slows down and where does it get the extra momentum when it leaves that medium? An example is a water.

I know it does not because it emerges out of denser medium at 300,000 KM per second, but according to $E=mc^2$ and given that speed of light decreases inside denser medium with refractive index greater than 1, does not it suggest that energy of light inside denser medium is less?