I have the following example string to make a function which will remove accents  is an email header and I store it in the bd but since I get the header I get it that way   ('Cotización pruebá ácentos')     string = m['subject']  self.remove_accents(string.decode('utf-8'))   the function that I have is the following  def remove_accents(self, s):     return ''.join(c for c in unicodedata.normalize('NFD', s) if               unicodedata.category(c) != 'Mn')   it removes the accents but it returns something like this  =?utf-8?b?q290axphy2nds24=?= =?utf-8?b?ihbydwviw6e   how do I decode the chain

I have a Unicode string in Python, and I would like to remove all the accents (diacritics). I found on the web an elegant way to do this (in Java):  convert the Unicode string to its long normalized form (with a separate character for letters and diacritics) remove all the characters whose Unicode type is "diacritic".  Do I need to install a library such as pyICU or is this possible with just the Python standard library?  And what about python 3? Important note: I would like to avoid code with an explicit mapping from accented characters to their non-accented counterpart.


Is there a function or a method to load data from a file into a variable during compile time in C++?

Is there a way to include an entire text file as a string in a C program at compile-time?  something like:   file.txt:  This is a little text file  main.c:  #include <stdio.h> int main(void) {    #blackmagicinclude("file.txt", content)    /*    equiv: char[] content = "This is\na little\ntext file";    */    printf("%s", content); }    obtaining a little program that prints on stdout "This is a little text file"  At the moment I used an hackish python script, but it's butt-ugly and limited to only one variable name, can you tell me another way to do it?


I have a bunch of art boards that are sized to 88x88 pixels. When I export my art boards, all the images are sized as 88x88, where transparent pixels are surround my actual art work.  Is there a way to export the images and have it not include the surrounding box?  For example, assume all my art boards are 88x88 pixels. In one of them, I have a 40x40 plus sign. In another I have a 40x50 star. When I currently export my images, I get two images that are 88x88 pixels. What I want in one that is 40x40, and another that is 40x50.  Note: I still want to design the icons in a 88x88 grid. Is there a way to easily get these results without resorting to resizing my storyboard to "hug" their artwork?  I am exporting to PNG images.  Update: When I attempt to uncheck Use Artboards as per , it combines all of my artwork into a single file. This is not what I want. I want 2 separate files in the example above.  I would prefer a solution which doesn't require a script.  All of my artwork is located on a single layer.

The title says it all, I want to know what the simplest way to export the selected objects.  In Inkscape, there is a menu option called export selected which does just this.    The aforementioned option lets you export the selection as a composite image or as a batch of individual images.  Both would be nice, but in this scenario I want to export the selected objects as a single image.  I can already create a new document, and paste in the selected items.  I am looking for a way that is easier than this.  How can I save / output / export only the objects I currently have selected, to an image file, in Adobe Illustrator CS5?


i'm working for a French company. I was supposed to travel to France for some time but the travel has been delayed and I haven't used the visa issued for that trip. I am  going to visit the Netherlands for a 2-day interview. Can I use my current visa to do that?  If not, am I able to get another visa as the current one is valid for another for 6 months?

I have a valid multiple-entry Schengen visa issued from the French embassy in Bahrain. At the beginning, my flight was to Paris, France, but I want to change my route to be Amsterdam, Netherlands my first destination (first port of entry) then France.   I heard some people saying that Netherlands may refuse your entry as a first destination (first port of entry and it should be to France). If so, can I purchase a ticket from their airport (Amsterdam Schiphol Airport) to France. Or it is allowed for me to enter?  Note: I have all the confirmed booking documents that prove I will be staying longer period in France. And this is why I applied for the visa at the French embassy.


I am currently running the April 29th build of LineageOS for MicroG 16.0 on my OnePlus 5 (cheeseburger). I tried to update the device using the built in Updater, but the device just rebooted into TWRP and showed the TWRP logo screen for some time. After that, I got  error message:  Checking for MODEM build time-stamp 2019-07-18 14:56:39 Error: This package requires firmware version 9.0.7 or newer. Please upgrade firmware and retry! Updater process ended with ERROR: 7 Error installing zip file '@/cache/recovery/block.map' Done processing script file   After searching for a solution, I decided it would be best to just backup my data and reinstall Lineage.  After looking through my options, I decided a Nandroid backup through TWRP was my best option. So, I tried to take one.  was the result:  createTarFork() process ended with ERROR: 255 Backup Failed. Cleaning Backup Folder.   If I adb pull my recovery.log, this is where I get my errors:  E:tar_open error opening '/data/media/0/TWRP/BACKUPS/[serial_number]/2019-08-10--23-11-06_lineage_cheeseburger-userdebug_9_PQ2A190405/data.ext4.win000' Error creating backup. I:Error creating tar '/data/media/0/TWRP/BACKUPS/[serial_number]/2019-08-10--23-11-06_lineage_cheeseburger-userdebug_9_PQ2A190405/data.ext4.win000' for thread 0 Error creating backup. I:ERROR tarList for thread ID 0 Error creating backup. I:InfoManager saving '/data/media/0/TWRP/BACKUPS/[serial_number]/2019-08-10--23-11-06_lineage_cheeseburger-userdebug_9_PQ2A190405/data.info' createTarFork() process ended with ERROR: 255   I read up about this type of error and found out that it means that those files have been corrupted and should be deleted. The strange thing is that the day before yesterday when I deleted the files in the /data/media/0/TWRP/BACKUPS/[serial_number]/ and then tried to perform the backup again, it regenerated files in the same directory, causing the same error. I also find it strange that the files that are causing the backup to fail seem to be backup files as well, although I've never performed a successful Nandroid backup on my device.  So, what can I do to fix this error and finally be able to backup and update my device?

I have installed FreedomOS on my OnePlus 5. I'm not sure if this is related to FreedomOS, but when I try to make a backup in TWRP with data, system, and boot, it has an error with createTarFork() shortly after it gets to backing up data. It also says 'read only filesystem' when I try to open Terminal from Advanced and run 'cd /data/media/0/TWRP/BACKUPS/bad7d639 && rm -rf backup-name'. What can I do to fix this and why is this happening?


What I have thought about this is:   we may use L'Hopstal's rule to calculate $\lim_{n\to\infty}\frac{((1+\frac{1}{n})^n-e)}{\frac{1}{n}}$, both the numerator and denominator goes to 0 as n goes to infinity. But calculating the derivative of $(1+1/n)^n$ seems to be very complicated. Using Taylor series to calculate the dominant terms of $(1+1/n)^n$, but I'm not really sure if it makes sense to let $"n=\infty"$. Equivalently maybe we can expand $(1+x)^{1/x}$ at $x=0$, but it's not defined.    Maybe I wasn't on the right track. Even if the solution uses a different approach, I would still love to know how to expand $(1+x)^{1/x}$. Thanks for any suggestions.

$\lim_{n \to \infty} n[(1+\frac{1}{n})^n - e]$  I let, $x = \frac{1}{n}$, then as   $\lim_{x \to 0} \frac{1}{x}[(1+x)^\frac{1}{x} - e] = \infty$  L'hopital's: $\lim_{x \to 0} \frac{\frac{1}{x}(1+x)^{\frac{1}{x}-1}}{1} = \frac{1}{0}(1+0)^{\frac{1}{0}-1} = \infty$  Again, if we apply L'hopital's: $\lim_{x \to 0} \frac{\frac{1}{x}(1+x)^{\frac{1}{x}-1}}{x+(1+x)}$. This is also going to $\infty$ as $x \to 0$. But, I know the answer is $\frac{-e}{2}$, and I am not even close. Can anyone please find me the mistakes here. Oh, I am supposed to use L'Hopital's rule.


I'm trying to redirect some users to another website based on their client IP address. For example if user is in range 192.168.0.0/24 they'd be redirected to another website.  I've found  article which mentions this method:  server {    if ($remote_addr = 1.2.3.4) {   ## Also will it work with subnet address like 192.168.0.0/24?       rewrite ^ http://www.yourwebsite.com/otherpage.htm;    } }   I guess it would work fine. But how can I supply IP range list file into this if block? Including hundreds of IP address in single line wouldn't look good.

I am using nginx latest web server. How can i check if the $remote_addr ip is NOT in specified CIDR range and return appropriate error code.  i would like to return specific error codes if IP is NOT in specific CIDR IP ranges.  how can i do this for CIDR IP range ?  e.g.    If remote_addr is not in 123.123.123.123/24 then return 444 code .


I need to find the solutions of a matrix.  So I have this system of equations  $2x+ky+2z=0$  $x-y+z=1$  $y-z=k$  I augment it as to get:  $\begin{pmatrix}2 & k & 2 & 0\\ 1 & -1 & 1 & 1 \\ 0 & 1 & -1 & k  \end{pmatrix}$  If i reduced the latter in reduced echelon form I get:  $\begin{pmatrix} 1 & 0 &0 &k+1\\ 0 &1 &-1& k\\  0 &0 &-k-2 & k²+2(k+1) \end{pmatrix}$  I was thinking that the solutions for x,y,z are  x=k+1  y= -2/k+2  z= -(k²+2k+2) / k+2  Are my solutions correct?

So I have this system of equations  $2x+ky+2z=0$  $x-y+z=1$  $y-z=k$  I augment it as to get:  $\begin{pmatrix}2 & k & 2 & 0\\ 1 & -1 & 1 & 1 \\ 0 & 1 & -1 & k  \end{pmatrix}$  If i reduced the latter in reduced echelon form I get:  $\begin{pmatrix} 1 & 0 &0 &k+1\\ 0 &1 &-1& k\\  0 &0 &-k-2 & k²+2(k+1) \end{pmatrix}$  I need to find the k values for which the system is consistent. It seems to me that the system is consistent when $k\neq -2$.  However, when I plug this matrix in the ti nspire cx cas calculator, I get that the reduced echelon form is    $\begin{pmatrix} 1 &k/2 &1& 0\\  0 &1 & -1 &k\\  0 &0& 1 &-(k²+2k+2)/(k+2) \end{pmatrix}$  The system for me is still consistent when $k$ is not equal to $-2$, because if it were equal to $-2$ then $z= a$  divided by 0, which makes it undefined.   However, when I try to compute the solutions, meaning $x$, $y$ and $z$, I get different solutions for the matrices. How come? Which one do you think is correct?   E.g with MY REF I get that $x= k+1$. With REF on the calculator I get that  $x=-y(k/2)-z$.  Can somebody please explain the differences with the ccalculator's REF and my REF , or if maybe the soltuions are the same and i just need to expan better? Thanks!


I used to enable custom fields on a Page edit Admin screen, just clicking on "Screen Options" in the top right.  However on a recent 4.9.8 installation, in the screen options I see only "layout" and "enable full-height editor".  Am I missing something or has this functionality been removed from the default install?

I recently updated my website after a while, and the custom fields meta box is not showing in the editor anymore. It isn't showing under "Screen Options" either. Any ideas why this could be, and how to get it back?


I can't find the option to post a question in community wiki mode. How am I supposed to do that?

Some questions and answers are marked Community Wiki and are owned by a community wiki user:  (In fact, this very question is one of them)  Why have Community Wiki posts? How do Community Wiki posts work? How does a post become a Community Wiki post? How can the Community Wiki status be removed from a post? How can I find Community Wiki posts?


I'm trying to write the binary number of 16-bit signed integer to a file. I searched a lot and ofcourse I found many examples which converts integer variables to binary. But in my case these functions will not be efficient, because I need to convert 50e6 samples/s. Calling a function to convert each sample will need a lot of computing time.  So what I want to do is:  int array[] = {233, 431, 1024, ...} for (i = 0; i < sizeof(array); i++){     fprintf(outfile, "%any_binary_format \n", array[i]); }   result in the file should be:  0000000011101001 0000000110101111 0000010000000000

I can print with printf as a hex or octal number.  Is there a format tag to print as binary, or arbitrary base? I am running gcc. printf("%d %x %o\n", 10, 10, 10); //prints "10 A 12\n" print("%b\n", 10); // prints "%b\n"


I'd like to delete a question of mine that was downvoted and has close votes, so I flagged it and asked for a mod to delete it but they didn't.  Why can it not be deleted?    I can understand that users shouldn't be able to delete questions and answers that may be useful to others but in this case the community has decided it has no value.  Also, following question edits, the answer with upvotes no longer answers it.

What circumstances can cause a question or answer to be deleted, and what does that actually mean?    How can a post be deleted? When can't I delete my own post? Can I still see my post even after it's deleted? Can I see a list of my deleted posts? How can I undelete one of my posts? What does deletion mean for a post? How do votes to delete work? What are the criteria for deletion? What else should I know about deleted posts? If I flag my question with a request to delete it, what will happen?       For more information, see the articles about  and  in the .


How do I remove the Ios 7 update on my phone? I've been having problems with my 4S since it was installed such as not being able to connect to Wifi and unable to send emails.

I'm trying to downgrade my iPhone from the current iOS to an older one, as per .  But every time I try, I always receive this error:     The iPhone could not be restored. This device isn't eligible for the requested build.     I have tried many times with and without DFU mode. Any ideas regarding this?


I need to dynamically create the name of a macro, where part of the name is based on the argument which needs to be capitalized beforehand. The following MWE illustrates my intention:  \documentclass{article}  \usepackage{xstring}  \newcommand{\CommandOne}{bla} \newcommand{\CommandTwo}{more bla}  \newcommand{\foo}[1]{   \StrLeft{#1}{1}[\strHead]%   \StrGobbleLeft{#1}{1}[\strTail]%   \csname Command\MakeUppercase{\strHead}\strTail\endcsname% }  \begin{document}  \foo{one} \foo{two}  \end{document}   However, this produces   ! Missing \endcsname inserted.   upon compilation. Why, and how do I fix it?

I want to change the letter-case of a single character argument, and use that changed letter inside a \csname.  And I want to do it without an additional package.  For example, I want to pass a macro the letter {S}, and have it execute the macro \csname macros\endcsname, or pass it the letter {T}, and have it execute the macro \csname macrot\endcsname.    In my MWE, I show three approaches:   I didn't expect \lowercase to work, since I recall reading that it is not truly expanded until the last possible moment.  Surprisingly, it goes into an \edef okay, but it must not be truly expanded, because it breaks the \csname. I also formulated an approach where I used \numexpr to add 32 to the ASCII code of the argument and perform a \char upon that result.  Like \lowercase, it gives the appearance of being expandable, but it also fails inside the \csname. I finally achieve success with the stringstrings package.  Having written the package, I know the conversion was not pretty... essentially, it is an exhaustive 26-fold check of the form \if #1Aa\else\if #1Bb\else\if #1Cc\else...\fi\fi\fi, which has the virtue that it can be expandably placed into an \edef, and so it works.   There has to be a better way.  The MWE works only because I use the inefficiently calculated \tmp from METHOD 3 inside the \csname.  If I use \tmp from either of the two earlier methods, it breaks.  \documentclass{article} \usepackage{stringstrings} \def\macros{Expandably converted an S to a s} \def\macrot{Expandably converted a T to a t} \newcommand\convert[1]{%   %MAKE THE ARGUMENT LOWER CASE   1) LOWERCASE\\   \edef\tmp{\lowercase{#1}}% PRETENDS TO EXPAND, BUT FAILS IN \csname   Here is the ``expanded'' conversion: \tmp\\   % OR   2) ASCII CONVERSION\\   \edef\tmp{\expandafter\char\numexpr`#1+32\relax}% PRETENDS TO EXPAND, BUT FAILS IN \csname   Here is the ``expanded'' conversion: \tmp\\   % OR   3) STRINGSTRINGS PACKAGE\\   \caselower[q]{#1}\def\tmp{\thestring}% WORKS BUT USES A PACKAGE   Here is the ``expanded'' conversion: \tmp\\   %   Now use it in a csname: \csname macro\tmp\endcsname% } \begin{document} \convert{S}\par \convert{T} \end{document}       SUMMARY OF ANSWERS:  I have added egreg's code snippets into this MWE to produce a document (and not just terminal output), showing the methods put forth to this point:  \documentclass{article}  %%%%%%%%%%%%%%%%%%%%%%%%%%%% L3 APPROACH  \usepackage{expl3}  \ExplSyntaxOn \cs_set_eq:NN \Xexplower \tl_expandable_lowercase:n \ExplSyntaxOff  %%%%%%%%%%%%%%%%%%%%%%%%%%%% EGREG'S LESS HACKY SOLUTION  \def\explowerchar#1{%   \ifcase\numexpr`#1-`A\relax    a\or b\or c\or d\or e\or f\or g\or h\or i\or j\or k\or l\or m\or    n\or o\or p\or q\or r\or s\or t\or u\or v\or w\or x\or y\or z\else    #1\fi }  \def\explower#1{%   \doexplowerchar#1\relax }  \def\doexplowerchar#1{%   \ifx#1\relax   \else     \explowerchar{#1}\expandafter\doexplowerchar   \fi }  %%%%%%%%%%%%%%%%%%%%%%%%%%%% STEVE'S HACKY PACKAGE APPROACH  \usepackage{stringstrings}  %%%%%%%%%%%%%%%%%%%%%%%%%%%%  \def\macros{Expandably converted an S to a s} \def\macrot{Expandably converted a T to a t}  \begin{document}  \textbf{Steve's hacky approach}  \caselower[q]{S}\csname macro\thestring\endcsname\par \caselower[q]{T}\csname macro\thestring\endcsname  \textbf{egreg's less hacky approach}  \edef\lcstring{\explowerchar{S}}\csname macro\lcstring\endcsname\par \edef\lcstring{\explower{T}}\csname macro\lcstring\endcsname  \textbf{L3 approach}  \edef\lcstring{\Xexplower{S}}\csname macro\lcstring\endcsname\par \edef\lcstring{\Xexplower{T}}\csname macro\lcstring\endcsname  \end{document}


I have a very basic question, but I am having difficulties finding an answer.   What would be a simple measure of dependency between a categorical and a numerical variable?   For two numericals it could be a linear correlation coefficient, for two categoricals - mutual information. But I don't want to discretize the numerical variable, or convert the categorical variable into numerical.

I have a dataframe with many observations and many variables. Some of them are categorical (unordered) and the others are numerical.  I'm looking for associations between these variables. I've been able to compute correlation for numerical variables (Spearman's correlation) but :   I don't know how to measure correlation between unordered categorical variables. I don't know how to measure correlation between unordered categorical variables and numerical variables.   Does anyone know how this could be done? If so, are there R functions implementing these methods?


My first disk has windows and second disk (not partition) has Ubuntu.   But the first disk was removed during ubuntu installation and plugged back after installation.   Now my system boots with only one OS depending on the disk with higher priority in the boot list.   One of the attached question talks about boot repair or about reinstalling grub-efi. Which is not the case here. My system boots perfectly but based on the drive selected.   The other attached question is valid with the given assumptions being true, which are false in my case.   Is there any way to get OS selection list at boot time?

I have installed Ubuntu 15.10 alongside Windows 10 with UEFI. To install Ubuntu, I chose the option install alongside Windows 10 or something similar to this. Then I created a new partition for Ubuntu and installed it. After installation, the boot menu did not show up. Initially I thought Ubuntu has not been installed, but when I plugged in the USB drive and wanted to install Ubuntu I saw an option of reinstalling Ubuntu on my machine. So, I found out that Ubuntu is installed. Pressing F8 and F12 also does not help. Can anyone help me bring up the GRUB boot menu? In Windows, I also entered the command bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi in cmd, but still the boot menu does not show up.  Reply (Himanshu) : Just boot in bios and, if you can, add boot option with name say ubuntu and path EFI/ubuntu/shimx64.efi. No need for live PCB or anything. Move the boot option to top. This is for dell GUI bios but I assume it works for all. Or you may want to see  or , where you can enable Windows Boot Loader for one boot or forever as you wish, and boot Ubuntu from it. If you want now, you can use the installed Ubuntu terminal to use the commands update-grub to use GRUB instead. (Not enough reputation to answer properly btw.)


I am trying to get Redis to start every time my system reboots to make sure that the cache are availables to my webserver. What I did is that inserted the following line in my crontab:  @reboot redis-server /path/to/redis.conf   After rebooting my system, the cron logs indicate that the cronjob has run:   Aug 15 01:10:59 hostname cron[1097]: (CRON) INFO (Running @reboot jobs) Aug 15 01:10:59 hostname CRON[1176]: (regis) CMD (redis-server /path/to/redis.conf)   However, the redis server is not running, and that's my problem. Note that the redis server starts just fine whenever I run the command line in bash.  What am I doing wrong?

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


Suppose that $F(x,y,z)=0$ is an equation so that any variable can be solved in terms of the other two. Show that   $\displaystyle \frac{\partial x}{\partial y}\cdot\frac{\partial y}{\partial z}\cdot \frac{\partial z}{\partial x}= -1.$  I understand what the question means and I am able to see how it works for a linear equation but assuming I can't set up a general linear equation (I don't think it would be sufficient enough) how would I do this proof.

The task is as follows:     Given: $$F(x,y,z) = 0$$    Goal:  Show    $\frac{\partial  z}{\partial y}|_x \frac{\partial  y}{\partial x}|_z \frac{\partial x}{\partial z} |_y = -1$   Here is my work so far:  (1) Differentiate with respect to y, I get:  $0 + F_2 + F_3  \frac{\partial z}{\partial y} = 0$  So $ F_3  \frac{\partial z}{\partial y} = - F_2$  (2) Differentiate with respect to x, I get:  $F_1 + F_2 \frac{\partial y}{\partial x}  + 0 = 0$  So $ F_2  \frac{\partial y}{\partial x} = - F_1$  (3) Differentiate with respect to z, I get:  $F_1  \frac{\partial x}{\partial z}    + 0  + F_3 = 0$  So $ F_1  \frac{\partial x}{\partial z} = - F_3$  (4) After some manipulations with the $F_i$, I get to the conclusion that $\frac{\partial z}{\partial y}* \frac{\partial y}{\partial x} * \frac{\partial x}{\partial z}  = -1$, so when evaluated with x, z, y respectively, conclusion is still true  My questions are:  (1) Is my proof correct?  (2) For example, when I differentiate with respect to y, I "let" $F_1$ be 0 and find partials for other coordinates.    I had a hard time trying to explain to my friend on the reason(s) why I can do such "let be 0" thing.  Although I think if I can't do that, then there is no way that I can reach the conclusion, but I somehow feel confused about the fact too.  Since my book is doing it that way, my understanding is that I can do such "let be 0" thing based on the independece of x with respect to y, when I differentiate with respect to y.  But is my thought ok?  Would someone please help me on this question? Thank you very much ^_^


I just realized that it's possible for companies (e.g. Xiaomi, OnePlus) to include their own special features to their android phones. My Xiaomi Mi 9T Pro has some special features include (GameTurbo, Floating window, etc.), but the company only provides one way to use it, obviously, there are many different phones that come with special features. My question is, do Stack Exchange sites have any site for using/developing those features?  I already have a question about my phone's special features, but I didn't find any Stack Exchange site, that is specific to ask that kind of question.

I would like to know where I can ask Android apps and other mobile related questions. Is there a Stack Exchange site for such questions?


This a very elementary question, but I am quite new to set theory. I came across this quote on the Wikipedia page for "Hereditary Set".  In formulations of set theory that are intended to be interpreted in the von Neumann universe or to express the content of Zermelo–Fraenkel set theory, all sets are hereditary, because the only sort of object that is even a candidate to be an element of a set is another set.  Is this quote saying that all sets in ZFC are hereditary sets? How does one then construct a set such as ℝ? Thank you

In set theory, if natural numbers are represented by nested sets that include the empty set, how are the rest of the real numbers represented as sets?    Thanks for the answers. Several answers basically said for irrational numbers that  A Dedekind cut is a pair of sets of rational numbers $\{L, R\}$. The set of real numbers is defined to be the set of all Dedekind cuts, where a Dedekind cut is a pair of sets of rational numbers $\{L, R\}$ which have no elements in common, and where all the elements of $L$ are less than any element of $R$.  Each Dedekind cut is a real number. This is where I have a problem - surely that can’t be correct. The set $L$ is a set of all rationals, and there must be a rational in the set $L$ that is greater than all other rationals in that set, even if we have no method of determining it. And similarly, there must be a rational in the set $R$ that is less than all other rationals in that set, even if we have no method of determining it. If every irrational number has a corresponding set $L$, then each irrational number has some such corresponding largest element of that set $L$, and then each irrational number has some corresponding rational number. And that would mean that the irrational numbers are countable. So, with Dedekind cuts,  the only conclusion is that there must be irrational numbers $x$ which are either greater or lesser than some irrational cut $y$ of the rationals, and between $x$ and $y$ there is no rational number.  But that is impossible, so that the Dedekind cuts cannot be the correct representation of the real numbers.  Surely the problem with Dedekind cuts is in using sets of rationals that include all rationals up to a certain rational. But there is an alternative method of representing irrationals can be defined in terms of infinite sets of rational numbers. For example, in binary notation, the non-integer part of $\pi$ is $.00100100\ 00111111\ 01101010\ 10001$. You define a set by: if the nth digit is a $1$, then  the natural number $n$ is in the set. And then we have that, for the real numbers between $0$ and $1$, that the set of real numbers is simply the set of all subsets of natural numbers. Each subset corresponds to some real number between $0$ and $1$.  And in this way, all real numbers can be considered to be some set based only on nested sets of the empty set.  But I still haven’t got a satisfactory answer for how negative numbers can be represented in terms only of sets containing the empty set. Any ideas?


I submitted my paper to a journal around 2 weeks back. It first showed the status as awaiting reviewer selection, then awaiting reviewer response, then awaiting reviewers score, and now it shows awaiting editor decision. All this within 15 days of submission. Is it a bad sign?

What steps does a manuscript typically go through from submission to publication (or rejection) in a typical journal? How are these steps referred to, in particular by editorial systems, and how long do they each typically take?  Note that this question is about the typical situation and hence not about:   Journals with an atypical workflow, e.g. those that allow for an instantaneous reviewer–author interaction. Exceptional steps or rare occurrences such as withdrawal or .   This is a canonical question on this topic as per . Due to its nature, it is rather broad and not exemplary for a regular question on this site. Please feel free to improve this question.


I want information about a flight in 2009. My dad came to Canada from the US.  He went back in August 2009.  He forgets the exact date.  He travelled by US airways.  He need to know exact date for citizen purpose.  Can anyone help me to find this information?

Where can I find historical data on flights, specifically Delta international flights?  I need to find out about cancellations, diversions and any other flight data pertaining on particular route at a given time.  This source has to be official and stand up to legal scrutiny.


i'm trying to build my bibliography. i'm using Texstudio & jabref.  The first book that i added to jabref was with the ISBN code - worked fine.  the second book was found using google scholar in jabref, when i'm trying to cite it  \cite{bookname}   i get a question mark near the text  [?]   followed with error in the log   Citation "bookkname" on page undefined    i'm new with latex so please be patience with me... if more info is needed i will provide it thx

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


How can I get more options (in addition to zip, tar.xz and 7z) and the option to add password when making archive files in file-roller in Gnome 3.22? Thanks!  Screen-shot of new create archive in Files (nautilus) 3.26.0   Archive Manager (file-roller)

In Ubuntu 17.10 ubuntu upgraded Nautilus (File Browser) to version 3.26.0. New nautilus is not using file-roller anymore, it has  to an integrated compression mechanism.     This makes it complicated to create encrypted archives and/or different types compression archives that file-roller does provide.  How to make nautilus use file-roller as before?  Related question:


I know (correct me if I'm wrong) that const string& a is an lvalue reference and string a is a simple string variable, but I'd like to know if, in this context, there's a difference between the two, because in some tutorials I saw people using const [type]& var instead of the simple [type] var.  What's the purpose of using one of the two declaration?  Thanks

Is it better in C++ to pass by value or pass by constant reference?  I am wondering which is better practice.  I realize that pass by constant reference should provide for better performance in the program because you are not making a copy of the variable.


I am going to be moving a HDD from one computer to another identical one. Can I just switch out the hard drives, or will I have to dd the old one onto the one that is already in there?

Basically, I want to get a new PC, but I have so many software/games installed on my current hard drive, that I don't want to waste the time to re-install/re-configure. Would it work if I just take out my current hard drive, and stick it into a new PC? the motherboard/video card etc are all different, would the new PC boot up and work flawlessly?  The operating system is Windows 7.


If $\gcd(a, b) = 1$ then prove that $\gcd(a+b, a^2-ab+b^2) = 1$ or $3$?  I am shamelessly asking how to solve the problem? I have no idea how to start and solve. Please help.

Hint:  $a^2 -ab +b^2 = (a+b)^2 -3ab.$  I know we can say that there exists an $x,y$ such that $ax + by = 1$.  So in this case, $(a+b)x + ((a+b)^2 -3ab)y =1.$  I thought setting $x = (a+b)$ and $y = -1$ would help but that gives me $3ab =1.$  Any suggestions?


I have Fragment with RecyclerView adapter. Also i have month array and icluded posts array object.  I try to add posts table rows dinamically. I dont know how it should made.  public class NewsAdapter extends RecyclerView.Adapter<NewsAdapter.NewsCardViewHolder> {  private List<NewsMonth> months; private List<NewsPost> posts; private AdapterView.OnItemClickListener onItemClickListener; private String TAG = "NewsAdapter"; private Context _context; TableLayout tableLayout;  public NewsAdapter(List<NewsMonth> months, Context context) {     this.months = months;     this._context = context; }  class NewsCardViewHolder extends RecyclerView.ViewHolder {     CardView cv;     TextView monthName;     TextView postLabel;     TextView postType;     TableLayout tableLayout;      NewsCardViewHolder(View itemView) {         super(itemView);         cv = itemView.findViewById(R.id.cv);         monthName = itemView.findViewById(R.id.month_name);         postLabel = itemView.findViewById(R.id.news_label);         postType = itemView.findViewById(R.id.news_category);         tableLayout = itemView.findViewById(R.id.tableNews);     } }  @NonNull @Override public NewsCardViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {     View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.news_item, viewGroup, false);     return new NewsCardViewHolder(v); }  @Override public void onBindViewHolder(@NonNull NewsCardViewHolder ViewHolder, final int position) {     ViewHolder.monthName.setText(months.get(position).getMonthName());     posts = months.get(position).getPosts();     for (int j = 0; j < posts.size(); j++) {         //ViewHolder.itemView.addView(months.get(position).getPosts().get(j).getTitle());         TextView postLabel = new TextView(_context.getApplicationContext());         postLabel.setGravity(Gravity.START);         postLabel.setText(months.get(position).getPosts().get(j).getTitle());         postLabel.setLayoutParams(new TableRow.LayoutParams                 (LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));         postLabel.setTextSize(10);         postLabel.setTextColor(Color.parseColor("#FF9900"));         TableRow row = new TableRow(_context.getApplicationContext());         row.addView(postLabel);         tableLayout.addView(row);     } }   On activity start i get: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.content.Context.getApplicationContext()' on a null object reference on this line: TextView postLabel = new TextView...  EDIT:  public class NewsFragment extends Fragment{  private List<NewsMonth> monthArray; private List<NewsPost> postArray; private TableLayout tableLayout;  public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,                          Bundle savedInstanceState) {     return inflater.inflate(R.layout.news_fragment, container, false); }  @Override public void onViewCreated(@NonNull View view,                           Bundle savedInstanceState) {     super.onViewCreated(view, savedInstanceState);     ViewPager viewPager = view.findViewById(R.id.view_pager);     tableLayout = view.findViewById(R.id.tableNews);     ImageSliderAdapter sliderAdapter = new ImageSliderAdapter(getContext());     viewPager.setAdapter(sliderAdapter);     initializeData();     RecyclerView recyclerView = view.findViewById(R.id.newsList);     recyclerView.setNestedScrollingEnabled(false);     recyclerView.setHasFixedSize(false);     recyclerView.setLayoutManager(new LinearLayoutManager(this.getActivity())); //getActivity(), LinearLayoutManager.VERTICAL, false     NewsAdapter adapter = new NewsAdapter(monthArray, getContext());     recyclerView.setAdapter(adapter);     recyclerView.setItemAnimator(new DefaultItemAnimator()); }

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


I have 2 lists  lst = [1,2,3,4,5,1,2,1,2,3] lst2 = [1,2,3]   I am trying to see the index elements in lst are in lst2. Currently I am doing;  ind = [] for x in lst2:     if x in lst:         ind.append(lst.index(x))   I realize the problem is that lst.index(x) only returns the first occurrence of the element so x=1 will always return lst.index(1) = 0.   Is there a way to return all the indexes that contain the element?

How do I access the index in a for loop like the following?  ints = [8, 23, 45, 12, 78] for i in ints:     print('item #{} = {}'.format(???, i))   I want to get this output:  item #1 = 8 item #2 = 23 item #3 = 45 item #4 = 12 item #5 = 78   When I loop through it using a for loop, how do I access the loop index, from 1 to 5 in this case?


I'm wondering how to determine the closed form for this sum: $$\sum_{k=1}^n k 2^k$$  I'm aware that it is $ 2 (2^n n - 2^n + 1)$ through Wolfram|Alpha, but I wonder how this would be done by hand. Searches for "summations of products" yielded no results, so I'm assuming that there isn't an easy way to determine summations that include products of functions.  How would one approach computing this summation without the help of technology?

Given $$1\cdot 2^1 + 2\cdot 2^2 + 3\cdot 2^3 + 4\cdot 2^4 + \cdots + d \cdot 2^d = \sum_{r=1}^d r \cdot 2^r,$$ how can we infer to the following solution? $$2 (d-1) \cdot 2^d + 2. $$   Thank you


I am applying for PLAB visa for UK to sit in PLAB 2 and I am being sponsored by my uncle entirely for the trip.   I was wondering how can I demonstrate that the funds will be available to me during the trip? I mean, shall I make a transfer of the sponsored amount from his bank account to my account  and show the bank document related to transfer  or I don't need to make any transfer but rather simply an affidavit stating that he will bear all costs of my trip will suffice?  Of course, I am going to provide the other documents like his bank statement of 6-7 months, income tax returns of 3 years, relationship proof etc etc.

The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is "bank statements" and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?


Question 1 How can we change the name of the generated pdf file, automatically on the main.tex file? Question 2 Is it possible not to change the generated files each time I change this name?

I have a source file called 2011-05-27_Myfilename.tex and I'd like to create a PDF file from it called only Myfilename.pdf.  Can this be configured from within the .tex file itself?  (It seems to be possible with    pdflatex -jobname=Myfilename.tex 2011-05-27_Myfilename.tex   However, as many different files are concerned, It would be easier to have an option like output=Myfilename in the LaTeX source code.)


For example,  A. I defined the density as the number of persons populating the region. B. I defined the density as the number of persons that populate the region.  Also consider the following.  C. After I found the lock key, I packed all the furniture in a huge suitcase, belonging to my sister. D. After I found the lock key, I packed all the furniture in a huge suitcase, which belongs to my sister.  Are there any general rules or guidelines?

I know that the participle can be part of a verb to express continuous tense, perfect tense, passive voice. And it also can has a separate line as an adjective. The participle adjective have either active meaning or passive meaning. Ex : I am tired. ( I receive the adjective ) The book is interesting. ( I think the book is interesting, so I'm interested in reading the book.)  Recently, I have been learning the participle phrase which includes the participle and the object of the participle or any words modified by or related to the participle. The participle phrase does the whole job as an adjective. It can have either active meaning or passive meaning( like above ). Ex : Shocked at the size of the giant, she quickly ran for her life. ( she was shocked ) Having realized there is no hope for his job, he gave up. ( He had realize ) Looking at the hills, she remembered her childhood. ( she was looking at the hills )  Question 1 : Is there amy relation between participle adjective and participle phrase? (Though a participle phrase looks like a verb with object, it can function as an adjective.)  Question 2 : When do we use the present participle phrase? (at the same time as the action in the main part of the sentence?)  Question 3 : What can the present participle phrase reduce? (the continuous or simple tense? Or all of the active verbs can be reduced? )   Don't tell me it can reduce the relative clause. I know that.  Question 4 : Why do some grammar books and websites say that the participle phrase can also function as an adverbial? (Such as : After he had passed the exam, he went to study English abroad. > Passing the exam, he went to study English abroad.) What is that? It seems like an adverb being reduced to a gerund phrase with "after".  Question 5 : It is obvious that I'm confused. I wonder that either participle phrase or participle adjective do not show any tense right? (A phrase is a group of words without a finite verb, so I suppose that it does not show any tense as a non-finite.)


I recently started to learn programming in ARM assembly,  today I encountered annoying problem where my program started to crash when I used the r4 register.  With this simple code the program works fine      .text     .align  2     .global arr     .type   arr, %function arr:     mov r3, #8     mov r0, r3      bx lr     .size   arr, .-arr   But changing to r4 it crashes      .text     .align  2     .global arr     .type   arr, %function arr:     mov r4, #8     mov r0, r4      bx lr     .size   arr, .-arr   What the hell am I doing wrong??? It clearly states in ARM docs this:     In all ARM processors, the following registers are available and   accessible in any processor mode: 13 general-purpose registers R0-R12      The supposed 'duplicate' question regarding  does not help at all, since everyone there has categorized r4 (THE ONE THAT I HAVE PROBLEMS) with others (r5, r6, ... that I dont have problems).  I am looking for explanation why using specifically r4 causes this problem, I do not have problems using instead of r4 registers that are supposed to be the same type as r4 (r5, r6, r7, r8).

It's been a while since I last coded arm assembler and I'm a little rusty on the details. If I call a C function from arm,  I only have to worry about saving r0-r3 and lr, right?  If the C function uses any other registers, is it responsible for saving those on the stack and restoring them? In other words, the compiler would generate code to do this for C functions.   For example if I use r10 in an assembler function, I don't have to push its value on the stack, or to memory, and pop/restore it after a C call, do I?  This is for arm-eabi-gcc 4.3.0.


I know that there are milions of video tutorials on this and I have watched many of them. However, I still don't understand one thing about polymorphism and I was hoping that someone from here would be able to make it clear for me.  I have a class called Animal and a class called Dog which extends Animal. The Animal class has one method called makeNoise and Dog class overrides it. Now, what is the difference between declaring the Dog object this way:  Dog myDog = new Dog();   And:  Animal myDog = new Dog();   I know this is most likely a duplicate but I really want to understand this and was not able to do so from the resources that already exist.

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


I feel like this has happened to me several times today, though  is the only example I have saved a link for.  Recently, when I click on a question on a site's main page that's been marked [duplicate], I seem to be getting an auto-redirect to the original question. If this is intentional, I think it's sub-optimal. Not every question that gets closed as a duplicate is an accurate closure, and even if they were: if I want to view the duplicate why can't I? We've always been able to in the past, and this completely eliminates the ability for regular users to reopen (I assume mods on a given site wouldn't be redirected, as is true for other redirect functionality on SE).   So... Is something strange going on, or is this an intentional change? If so, what's the reasoning behind it, and can we please put it back the way it was?

Duplicate questions that use different words to describe the same problem are important for people to find the content via search engines. But the user experience when an anonymous user arrives at a duplicate is less than ideal.  They have to notice the duplicate link and understand that the answer they are looking for is likely behind that link. I don't think this is all that obvious to someone without experience with an SE site.  I propose to just redirect users to the duplicate automatically if the closed duplicate has zero answers. In that case they need to follow the link to the duplicate in any case, so we might as well redirect them to it in the first place.  I could imagine this being problematic with search engines, as we would be displaying different content than what the search engines see. If that is too problematic I would suggest to show a very obvious link to the duplicate in the answers section for anonymous users.


To turn off my system, I can use one of these three commands:  sudo halt   Or:  sudo poweroff   Or:  sudo shutdown -h now   What are the differences between these commands, or are they all just aliases of each other?

What is the difference between the halt and shutdown commands?


Despite Planck's constant being in $E=hf$, it would appear to me that energy is still not discrete, as frequency can be an fraction of a Hertz that one wants. How does this imply that electromagnetic radiation is quantized?

I'm just starting to learn physics and I have a question (that is probably stupid.)  I learned that energy levels that the bound electron can have are discrete. I also learned that when an electron transitions from one level to another, a photon with a specific wavelength (energy) is created and released into the wild.  My question is this: are there holes in the electromagnetic spectrum, values of frequency that the created photon can't possibly have?


I'm 19 years old and recently opened a secured credit card with my local credit union in order to build credit. I payed off my balance last month and this one in full just because I was already paying last month so why not pay off my whole balance right? Well I didn't use my card again at all and now I received my billing statement and it's 0.00 that needs to be paid. Is this bad? It shows how much I used over the month and that I already paid it off but should I have left a little bit or used my card again so I would have something to pay on the bill?

I'm a college student and I just got my first credit card (through Chase). The only reason I got the card is to try and build my credit score. I also have a checking account with Chase, and they let me pay off my credit card any time I want.  For example, right now I have a balance of $92 on my credit card, but my bill won't come until September 2, and the payment isn't actually due until September 27. But through their website I could go ahead and pay it off with money from my checking account.  My question is, is it better for my credit score if I pay off that $92 balance right now, or should I wait for the bill, or does it not matter either way?


I copied some directories from a now-defunct Mac laptop. I am trying to open one of the files (a PDF), but Acrobat won't open it because the name is too long.  I am trying to rename the file to a shorter name, but I cannot. Explorer won't let me, again, because of the long name.  I tried renaming it in cmd.exe using the 8+3 name, but none of the files from Mac have 8+3 names. That means that there is no way to rename it using the short name.  What else I can do?

I have downloaded this pdf file with a very long name, which cannot be opened by Adobe Reader or by Adobe Professional because it has "invalid file name".  It cannot be renamed using the DOS prompt but it has "too long name or extension". I tried to delete so that my recovery program can rename then restore it, it but it won't be deleted as a file.   The only way to delete it is by deleting the folder where it was downloaded into (which I did, but restored it later). It can't also be printed or moved or copied to another folder. Is there a way to open or rename these kinds of files?  I tried to rename it by right clicking the title but what appears is a shortened version of the options with no rename function. I then discovered that it has a password protection, which is not provided by the website from which I downloaded it.


Everything I tried is in vain. If I ever want to ask a question I will have to open another account and never visit my old account again. This time I'll not make the same mistakes not to ever get banned again.  The below was written in hast. It is another question that is locked in by an answer that doesn't really help me but keeps me from deleting this question thus gaining more down votes.  I wish there was a way to get a full reset without abandoning this one?  I am asking for help is reestablishing my privileges asking questions on SE sites so I ca ask better constructed questions again. Will someone help me decide which questions on Meta can be improved and which are a total loss?   I understand asking which questions I asked are the lowest quality is broad but hopefully I can get direct guidance in specific questions I asked that needs the most revision.

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 Ubuntu 12.01 Server installed inside VMWare WorkStation 10 and have OpenStack cloud deployed in it.  What I want to do is that install this created VM in my system as an independent OS.   Is there any way to do so?

How can you take a VMware image and place it onto other hardware systems as the default OS? I want to do this with my Ubuntu VM's


I'm trying to install R. I tried the instructions from the best answer on , without success. I'm using ubuntu 16.04.6 LTS 64-bit.  I tried the method but my terminal window seemed to do nothing, even though when I tried to close the window it says there were processes running. I tried it a few times. And now I have an error message in the thin grey tray up top:  An error occurred, please run the package manager from the right-click menu or apt-get in a terminal to see what is wrong.    The error message was:   Error: Opening the cache (E:type 'sudo' is not known on line 1 in source list /etc/apt/sources.list.d/r-cran.list,    E:The list of sources could not be read.)  This usually means that your installed packages have unmet dependencies.   Starting the package manager (through the notification) didn't do anything, i got this message (image attached):  E: Type 'sudo' is not known on line 1 in source list/etc/apt sources.list.d/r-cran.list   E: The list of sources could not be read. Go to the repository dialogue to correct the problem.   E:_cache->open()failed, please report.    I don't know how to go to the repository, or how to report. How do I fix this issue?  I also tried the instructions on  as well, copying the source and pasting into a terminal, which is probably not how to do this, but I don't know how to access the /etc/apt/sources.list file.  @heynnema when I ran the code it says  cat:  /etc/apt/sources.list.d/r-cran.list: No such file or directory  @heynnema the fix didn't work here is the output from terminal:  (gedit:2641): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files  ** (gedit:2641): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-enabled not supported  ** (gedit:2641): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported  ** (gedit:2641): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-enabled not supported  ** (gedit:2641): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported  ** (gedit:2641): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-position not supported helwalaura@Galactica:~$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 Executing: /tmp/tmp.L1dGqRuvRD/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 gpg: requesting key E084DAB9 from hkp server keyserver.ubuntu.com gpg: key E084DAB9: public key "Michael Rutter <marutter@gmail.com>" imported gpg: Total number processed: 1 gpg:               imported: 1  (RSA: 1) helwalaura@Galactica:~$ sudo apt-get update E: Type 'sudo' is not known on line 1 in source list /etc/apt/sources.list.d/r-cran.list E: The list of sources could not be read. helwalaura@Galactica:~$    @heynemma here is the result from cat /etc/apt/sources.list.d/r-cran.list   helwalaura@Galactica:~$ cat /etc/apt/sources.list.d/r-cran.list  sudo tee /etc/apt/sources.list.d/r-cran.list sudo cat <<EOF | sudo tee /etc/apt/sources.list.d/r-cran.list deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/   @heynnema when I deleted the other 2 lines of code, this showed up in terminal window:  (gedit:3157): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files  ** (gedit:3157): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-spell-enabled not supported  ** (gedit:3157): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-encoding not supported  ** (gedit:3157): WARNING **: Set document metadata failed: Setting attribute metadata::gedit-position not supported

Every once in a while I see users having issues to update due to errors like this:  E:Type 'ain' is not known on line 1 in source list /etc/apt/sources.list.d/some-ppa.list'   with varying types/line numbers/source list files (often after removing a PPA).  How can such an error be fixed?


In my work I have:  J_{\mathbf{\lambda}}(f(\mathbf{p},t))   but pdflatex prited   Why? Maybe I'm not using mathbf correctly?

To make Latin-letter variables bold I can use e.g. \mathbf{a}, but while putting Greek letters or symbols such as \nabla inside \mathbf doesn't cause any errors or warnings, it also doesn't do anything else.  What is the best way to make bold math symbols, in particular Greek letters and \nabla?


Prove that a symmetric group $S_n$ has a cyclic subgroup of order $n$. I can see it for a symmetric group $S_3$ and $S_4$ but how can I generalize it for any number $n.$

This question was asked in my quiz and I am having difficulties in solving it .  Question : For a positive integer $n$ , let $S_n$ denote permutation group on $n$ symbols. Choose correct statements from below. (a) For a positive integer $n$ and for every $m$ with $1\leq m \leq n , S_n $ has a cyclic subgroup of order $m$; (b) For every positive integer $n$ and for every $m$ with $n<m <n!$, $S_n$ has a cyclic subgroup of order $m$; (c) There exists positive integers $n$ and $m$ with $n<m<n!$ such that $S_n$ has a cyclic subgroup of order $m$; (d) For every positive integer $n$ and for every group $G$ of order $n$, $G$ is isomorphic to a subgroup of order $S_n$ .  Attempt: (a) is true as I can choose an element of length $m$ which will generate cyclic subgroup of order $m$. (b) Choose $n=4$ and $m=19$ to contradict (b). (c) I dont know if there can be found any such case and if yes how to do so . (d) I dont know about it . kindly tell. Answer:   A,C,D are true


I have a B1 Visa which is valid for another 7 years and my wife also has B1 visa which is valid for another 3 years.  I am planning to visit US for some business purpose and want to take my wife along with me.She would be taking leaves from her office and wont have any business purpose.   Is it possible? Or do I have to apply for B2 visa for her?

(NOT a duplicate of )  Earlier last year, I went to the US for a business trip. In preparation for it, even though I applied for a B1/B2 visa, I was granted a (seemingly rare) straight B1 visa.  That visa was granted for 3 years and is going to be valid for a long time. Right now, however, I'm looking to make another trip to the US, this time to visit a friend (so, no business intentions). Does this mean I have to explicitly apply for another, B2, visa all over again? Or, if I do travel with my current B1, I can avoid the problem somehow?


Five girls, Anya, Beth, Carol, Dasha and Elena, stand in a line. How many possible permutations are there in which Anya is at the left of the line or Elena is on the right, or both? If we want Anya to be at the left she must occupy the first or the second place in the line (starting from the left). That would be 24 possibilities each place, 24+24=48 The same thing applies to Elena as she should be in either one of the two places at the right side, so there are 24+24=48 possibilities for her too If we want Anya to be at the left and Elena to be at the right at the same time, we find that there are 4 combinations: A _ _ E _, A _ _ _ E, _ A _ E _, _ A _ _ E, And each one represents 6 possibilities, therefore 6x4=24 Adding all the results 48+48=96, and subtracting the 24 that are already included there, the answer would be 72 but the book says 42

Here's my solutions: $$1.)\,(2)(4!)=48$$ $$2.)\,(4)(3)(3!)=72$$ $$3.)\,48+48+3!=102$$  It's the last one I get wrong. The correct answer is 42. The solutions manual of the textbook says the following:     Someone mind explaining what exactly are the double counted cases. Also, what is wrong with my way of doing 1c? I think it is just a simple OR problem, as in an application of the addition principle.   Thank you very much.


I read about the following :     We can run several commands in the same cron job by separating them with a semi-colon (;).   * * * * * /path/to/command-1; /path/to/command-2      If the running commands depend on each other, we can use double ampersand (&&) between them. As a result, the second command will not be executed if the first one fails.   * * * * * /path/to/command-1 && /path/to/command-2   My requirements are:   the commands must be executed sequentially (wait for the current one to complete before executing the next one) the commands must be executed in the given order but every command should be executed, even if the previous one failed   What the link above therefore doesn't say is:  Does the semicolon ; approach still guarantees that the commands will be executed sequentially, and in the given order?

What is the difference between  echo "Hello " ; echo "world"   and  echo "Hello " && echo "world"   Both seems to run the two commands after each other.


Recently I came across a sentence:     Last week,my friend asked me how I am and I said (...).   To me this sounds completely wrong, as both happened in the past, I would expect it to be "how I was" rather than "how I am".  Is this reasoning correct or is my grammar knowledge incomplete?

Are these two sentences grammatically correct?   Mona told me that London was the biggest city in England. He wanted to know where Manchester was.   I found these two sentences by chance in an exercise book published by Egypt's  Ministry of Education. Both sentences talk about a fact, and Is it unreasonable to change the verb tense in reported speech to past simple when what the sentences talks about is still true? (As my teacher and the books say.) Or is it right when we talk about facts to change the tense or is the tense change optional and  both are correct?


I'm fairly sure this will have been asked before, I have found similar questions but I do not fully understand how to apply them to my situation. So, sorry for asking again.  We have a number of servers located in a data centre which have firewall rules only allowing SSH connections to them from our work external IP. They also only accept authentication with SSH keys. Can I connect to one of these servers via another machine at work and have the key passed on from my machine (at home) for authentication?  Is this an SSH tunnel, or is that something else?  Thanks for your help.

Possible Duplicate:          Multiple networks I can connect to have the following set up. There is a single node that can be accessed with ssh from the internet, and from there you can ssh to the inside network.  Is there a way, that on my ubuntu box (no sudo rights), I somehow can configure that the command ssh internal.host is first setting up an connection to external.host and from there to internal.host? In the ideal situation it would be something very transparent, so that I even would be able to do scp myfile internal.host:  All authentication is done with certificates.  Btw. I am aware of ssh tunnels. I'm only searching something more transparent, I don't want to have to always manually open an ssh tunnel to reach a host.


I'm wondering how to install Ubuntu on my Chromebook? And what other steps should be taken?  Matt

Is it possible to install Ubuntu on a Chromebook? If so, what are the minimum system requirements? Will Ubuntu preform as well on the Chromebook as on a Windows laptop?


I wrote a program for school, which is supposed to ask for the day of the week, whether or not it is vacation, and then print out whether the user can sleep in. However, the Boolean values, sleepInDay(which decides whether it is a weekday or not) and sleepInDayV (which decides whether or not it is a vacation) both automatically change to false, even when I change their default values to true at the beginning of the code.   import java.io.*;  class main { public static void main(String[] args) { // TODO Auto-generated method stub try{     InputStreamReader istream = new InputStreamReader(System.in);     BufferedReader bufRead = new BufferedReader (istream);      boolean sleepInDay;     boolean sleepInDayV;      System.out.println("Please enter the day of the day"  );     String dayOfTheWeek = bufRead.readLine();      if (dayOfTheWeek == "Sunday") {        sleepInDay = true;     } else if (dayOfTheWeek == "Saturday") {        sleepInDay = true;     } else {        sleepInDay = false;     }      System.out.println("Is it vacation?"  );     String Vacation = bufRead.readLine();      if (Vacation == "Yes") {        sleepInDayV = true;     } else {        sleepInDayV = false;     };     System.out.println(sleepInDay + " " + sleepInDayV);      if ( sleepInDay == true || sleepInDayV == true) {         System.out.println("You get to sleep in!");     } else {         System.out.println("GET UP!");     } } catch(IOException err) {     System.out.println("Error reading line");{ }   Thanks for the help,  Kitten Taco

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?


Show that $ \lim_{n \rightarrow \infty}  \frac{n!}{2^{n}} = \infty $  I know what happens intuitively....   $n!$ grows a lot faster than $2^{n}$ which implies that the limit goes to infinity, but that's not the focus here.  I'm asked to show this algebraically and use the definition for a limit of a sequence.  "Given an $\epsilon>0$ , how large must $n$ be in order for $\frac{n!}{2^{n}}$ to be greater than this $\epsilon$ ?"  My teacher recommends using an inequality to prove it but I'm feeling completely lost...

Why is     $$\lim_{n \to \infty} \frac{2^n}{n!}=0\text{ ?}$$   Can we generalize it to any exponent $x \in \Bbb R$? This is to say, is     $$\lim_{n \to \infty} \frac{x^n}{n!}=0\text{ ?}$$     This is being repurposed in an effort to cut down on duplicates, see here: Coping with  duplicate questions.  and here: .


I have tried to format the hard drive but I can't!  I have tried to use the Disk Management option that says format, but it won't let me as it says it's busy. I can't install Windows as the hard drive is in the wrong format.  Help, please.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


Using Sharepoint 2010, how do I color code the Task due dates so the row can turn red when the due date is in 5 days? ....green color for when task due date is in 10 days?  My requirements are a bit different than the questions that have already been answered. Let me explain:   For Tasks list--The condition criteria (using SP Designer 2010) has to be based on due dates so the row automatically changes color(green or red) based on how long is left before they are due (5 days vs. 10 days)

I am trying to format a Tasks list in SharePoint 2010 using Sharepoint Designer using the following settings under conditional formatting.  Field > Due Date = Less Than > Value = Current Date Field > Status = Not Equal > Value = Completed Click on Set Style > Change Text color to Red   When this is done some of the tasks that have dates in the future are showing in RED - this should only happen for dates that have past with tasks that are either 'In Progress', 'Waiting on someone else' or 'Not Started'.  Any ideas, anyone? :)


I was working on this bug in my application and saw something very weird:      selectedService = dataResponse.getServices().get(position);     selectedService.setPrice(3000);     dataResponse.getServices().get(position).getPrice(); // Returns 3000 which should be 0   Shouldn't the get method copy the object into selectedService? If not how to copy it?

What is the difference between    a parameter passed by reference a parameter passed by value?   Could you give me some examples, please?


Is there a ubuntu server minimal installation? or is just 4gb/6gb base of installation without the packages, other feature installation?

I am currently running Ubuntu Server 10.10 through a virtual machine to use as a stack for web development and a chance to get to grips with the Ubuntu command line, however I'd really like to set up a clean, minimal install with only the bare minimum of core utilities so I can get only what I need as I go along.  The Ubuntu Server iso seems to install a lot of extras already and I'd prefer just the bare minimum so I can spend more time aquainting myself with the installation and set up of the packages I need. Can I obtain an image that does this?


I have the same problem as you, i am seing my old css file, after editing it, because at the end of the css call appears something like this: "css/main.css?ver=4.2.2. If i take out the part that says "?ver=4.2.2" i could see my real main.css file. Please help, I need someone.

I observed the inside the wp_head function in the source links of every .css, .js files a ?ver=1 (or other number based on the file's/library version) is added. How can I overwrite them, to remove them?  This issue I think is causing problems on the cache manifest part.


I was thinking of watching Fantastic Beasts and Where to Find Them but have so far avoided watching any of the Harry Potter series (mostly because I don't want to see them until I can get access to the entire series - to watch in chronological order).  Is enjoyment of Fantastic Beasts dependant on knowing details of the Harry Potter universe?  Note: from seeing various bits around here & the larger internet / real world I am familiar with some of the most basic parts of the HP universe, but only a small amount & at a very basic level (you'd have to be living under a rock not to have taken in some HP lore). Familiar with the existence of Hogwarts, Horcruxes, Quidditch ..  (Yes, I am aware that FB&WtFT is set before HP, but just want to check.)

I have read all seven Harry Potter books, and The Cursed Child1, but I've only watched the first two movies.  Do I have to watch all eight movies in order to fully understand the significant plot points found in Fantastic Beasts and Where to Find Them?  Is there anything that I'll miss by not having seen them?    1 Waste of money, that.


I have an advanced filter in my Excel worksheet and I have a macro for the advanced filter with a click of a button. Once I update Criteria, the report should refresh automatically, without having need to click the button. (In Advanced Filter, what I am doing is copying output to an Output Sheet. The Input report is in a different sheet. I have placed Criteria for the advanced filter in the Output sheet itself and the Output is placed below the Criteria.) Is it possible?

How can I automatically execute an Excel macro each time a value in a particular cell changes?  Right now, my working code is:  Private Sub Worksheet_Change(ByVal Target As Range)     If Not Intersect(Target, Range("H5")) Is Nothing Then Macro End Sub   where "H5" is the particular cell being monitored and Macro is the name of the macro.  Is there a better way?


I was studying about the fundamentals in physics and I read a defination of average velocity. It was like that average velocity is a physical quantity which gives the measure of overall rapidity of a moving particle in a  given time interval. And it is useful for the comparison of overall rapidity among two particle within a given time interval. Then the defined the instantaneous velocity as the limiting value of the average velocity when the time interval tends to zero. What does it physically signify? According to the defination it is the rapidity of the particle at a given instant of time but I am not getting that. Suppose a situation where we are comparing two particles and both of them are moving randomly , with a different instantaneous speed at different instants. If we consider any instant where suppose the first particle has a larger speed than the second . What does it physically mean? Does it have any physical significance? As both the particles are changing speeds with respect to the time it may happen that  the next instant  the second is having a larger speed the first one.

How can a body travel at an instant and what does instantaneous speed tells us? What really is meant by speed of an object at an instant if an object does not travel at an instant? I would like a mathematical explanation.


I can't install the android-app, according to Google play it isn't compatible with my Galaxy Ace DUOS  currently running Android 2.3.6. What are the exact requirements for the app? Google play only states version 1.6 as a requirement.

In the  of the Android app, it says Android 4.1 or higher is required. However, the  argues that 1.6 is the required Android version. Why do these two pages argue with each other, and which one is lying?  Screen shot:


I'm writing a poem referring to humans as landlords of this planet.  Which is correct:  "they come to test this planet landlord's heart"  or  "they come to test this planet's landlord's heart"  I would use the first one for what I consider better style. Not sure it is correct.


iam trying to fill a list from type attendance with a list of students but i keep getting null pointer exception even though the students list is not empty but the attendance is empty ad the attendance has a property of student as following

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


I'm trying to initialize an array called ARRAY inside the constructor of a class called CLASS_A and this array is supposed to be accessible by the nested class CLASS_B. I thought of making the array a template but that was when things started to get a little fuzzy with how to go about the syntax.   I'm almost certain that declaring the ARRAY static is part of the solution and maybe making the type const int a template like A so then the template would look like template <class A, const int D> and the declaration A ARRAY[SIZE];. Anyways I initially got this error compiling the code below and then I made some changes and got a different error.  This is a linker error by the way  nested_class_incomplete_type.cpp|16|undefined reference to `CLASS_A<3>::ARRAY'| nested_class_incomplete_type.cpp|28|undefined reference to `CLASS_A<3>::ARRAY'|   edit duplicate code.

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


So England has attacked Denmark with a fleet in the Skagaric support from Helgoland Bigbt and the North Sea. Russia has attacked the Skagaric from the Baltic Sea and with support from Sweden and the German fleet in Denmark. Would the offensive prevail?

If I convince Turkey, to move Army Bul to Gre, would I be able to send Army Ser to Bul and take the area?


I am building a social networking website. After user signs up an account, I add his/her information to the database and creates 3 different tables for his/her other information, they are called like this ($username . "_posts"),($username . "_friends") and ($username . "_notifications"). In the creating statements I can not use placeholders for the table name to prevent SQL injection.  So, I was thinking of a way to prevent the user from manipulating the statement I use to create the tables by his/her input.  So, what if I prevented the user from inputting characters like (back quote) , (single quote) or (double quote) ....etc to the input field (username) ,  will this work? Is there a better way? If I choose to use way mentioned above what other characters should I prevent the user from inputting? thanks in advance.  Here is one of the create statements I use:  $create_table_for_user_posts = $conn->prepare("CREATE TABLE " . $username . "_posts (     id INT(255) UNSIGNED AUTO_INCREMENT PRIMARY KEY,     posts VARCHAR(35000) NOT NULL,     poster_username VARCHAR(2000) NOT NULL,     poster_first_name VARCHAR(2000) NOT NULL,     poster_last_name VARCHAR(2000) NOT NULL,     reg_date TIMESTAMP )");

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


When running a bash script, I would like to be able to tell if it is running within a screen. Is this possible?  I want this so that .bashrc can set the colour of the command prompt depending on whether the sessions is started within a screen or not.  Discovered this link once mine was answered:

I want to start a program with SSH using PHP, which works fine, but now I want to kill the screen with PHP, but the only thing I know is the name of the screen. How do I find out the screen ID (automatically)?


I read this SF story somewhere in 2000s. I believe it was in English but might have been a translation from the original work. It might have been a short story or a novella.  The story's core premise was about astronauts (crash?) landing on a planet that was inhabited solely by robots. I don't recall if it was a part of their mission or if they did it only to save their lives from hostile natives, the astronauts managed to create metallic disguises for themselves (from ship parts?).   some time later it was revealed that there      actually were no robots, every robot was in fact a human who had disguised himself as a robot to blend in the society   that is all i remember. Can anyone help me identify the author and the story's name?

I'm looking for a classic science fiction story where a man disguised as a robot is send to investigate a robot uprising on a mining/factory planet.   He is found out to be a human and brought before the robotic overlord of the planet who offers a deal, we will not kill you if you pretend to be a robot for the rest of your life. He agrees.  He later finds out that in fact all the robots on the planet are humans that made similar deals. We all think everybody else is a robot, but in fact nobody is.   Possibly from Lem or Asimov.


What subject did Professor Albus Dumbledore teach when he was recruited as a teacher in Hogwarts. Also, till his death, what other subjects did he teach.

In Fantastic Beasts: The Crimes of Grindelwald Dumbledore teaches DADA. But from the books we always heard about him as of a Transfiguration teacher (say, in Tom Riddle's days). It is stated in the movie that Dumbledore was prohibited to teach DADA by the Ministry, though the limitations seemed to be canceled at the end of the movie together with the removal of his handcuffs (not completely clear about the teaching though). The strange thing is, however, that Dumbledore was a Transfiguration teacher and even the Head of Transfiguration Department in Hogwarts before Newt's days, as we learn from Pottermore:  Under the guidance of her [McGonagall] inspirational Transfiguration teacher, Albus Dumbledore, she had managed to become an Animagus She [McGonagall] sent an owl to Hogwarts, asking whether she might be considered for a teaching post. The owl returned within hours, offering her a job in the Transfiguration department, under Head of Department, Albus Dumbledore.  That is of course if we accept that Minerva McGonagall in the movie is the same Minerva we know. So it seems that he taught Transfiguration, then for some reason switched to DADA and then to Transfiguration again. While it is possible in general, is there any explanation for the reasons?


What is the safest way to divide two IEEE 754 floating point numbers?  In my case the language is JavaScript, but I guess this isn't important. The goal is to avoid the normal .  I've read that one could use a "correction factor" (cf) (e.g. 10 uplifted to some number, for instance 10^10) like so:  (a * cf) / (b * cf)   But I'm not sure this makes a difference in division?  Incidentally, I've already looked at the other floating point posts on Stack Overflow and I've still not found a single post on how to divide two floating point numbers. If the answer is that there is no difference between the solutions for working around floating point issues when adding and when dividing, then just answer that please.  Edit:  I've been asked in the comments which pitfalls I'm referring to, so I thought I'd just add a quick note here as well for the people who don't read the comments:  When adding 0.1 and 0.2, you would expect to get 0.3, but with floating point arithmetic you get 0.30000000000000004 (at least in JavaScript). This is just one example of a common pitfall.  The above issue is discussed many times here on Stack Overflow, but I don't know what can happen when dividing and if it differs from the pitfalls found when adding or multiplying. It might be that that there is no risks, in which case that would be a perfectly good answer.

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


I'm finishing up the rough in wiring for a kitchen remodel, but I have a situation where I can't run cables through studs for a light switch because there is no wall cavity. I decided to run it strait up against the wall into the attic space through conduit. Its a short 5' run of conduit and just 90 degree stubs out into the attic then connects with the kitchen lighting circuit. I ended up just stripping the romex back instead of using THHN because I needed the attic portion of the run to be sleeved (I'm aware of the lack of conductor labeling violation here, its just what I ended up doing in my own kitchen). The conduit does NOT connect back to the panel. Is having a bare ground inside conduit going to be an issue? Is this any different from having a ground connected to a metal box? Any info would be much appreciated, thanks!

I'm adding a 100 amp subpanel to my detached garage and have a question about the EGC I've already pulled through the underground LFNC-B raceway. Taking the advice from a similar post on this forum, I decided to use a 8 AWG bare solid copper conductor for my EGC in the underground raceway back to the main house. The other 3 conductors are 3 AWG THWN-2 stranded copper. I did double check the NEC tables to ensure these were appropriately sized for the underground feed portion of my run and ensured the conduit fill was less than 40%. What I failed to realize though (until after I won the good battle of pulling this set though the raceway) was that there is a section in the NEC that prohibits the use of solid conductors 8 AWG or larger in raceways: "310.3 Stranded Conductors. Where installed in raceways, conductors of size 8 AWG and larger shall be stranded." Dangit! Now I'm questioning why I didn't just use insulated green THWN-2 - it would have made my pull much easier! Rookie mistake. So how bad have I goofed up here? Let's say the inspector fails to call this out. Is this a safety issue? What's the rationale for the rule anyways? To prevent numskulls like myself from trying to pull larger gauge solid wire through a raceway and possibly damaging the other conductors? Or is there more to it? Interestingly, there seem to be several exceptions in the NEC that do allow for using 8 AWG solid EGC in raceways (690.46 for Array Equipment Grounding Conductors for example). I'm just trying to get a feel for the severity of this goof-up and if it's worth fixing if not required by the inspector. Any feedback from the experts would be much appreciated!


I have a UITextField with the following restrictions - characters can only be numbers, as in the method below.  I want to also limit the number of max characters to 3 digits.  How can I modify my method to do that?  - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string { NSCharacterSet *aCharacterSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789"]; for (int i = 0; i < [string length]; i++) {     unichar aCharacter = [string characterAtIndex:i];     if ([aCharacterSet characterIsMember:aCharacter]) {         return YES;     } }  NSUInteger newLength = self.textField.text.length + string.length - range.length; return (newLength > 3) ? NO : YES; }

How can I set the maximum amount of characters in a UITextField on the iPhone SDK when I load up a UIView?


I don't know if this is the case for all database implementations but it is for SQL Server and MySQL which are the two I've worked with. I've read articles about the topic and the manuals of SQL Server and MySQL and the reasoning always boils down to semantics around the meaning of the word NULL and how it represents an unknown and therefore nothing can be equal to NULL. What I'd like to do here though is set aside semantics, legacy code considerations and existing developer expectations and see if there are any practical arguments against allowing = NULL. So what I mean is, if we were starting with a clean slate, had no legacy considerations, why would we not want to allow = NULL? In my 20 years of dev experience I've never encountered a situation in which IS NULL has been anything but an annoyance, an extra condition that I have to handle separately from everything else. So can someone give me an explanation of why the following examples shouldn't work as a naive, new dev might expect them to? SELECT * FROM MyTable WHERE myField = NULL SELECT * FROM MyTable WHERE myField <> NULL SELECT * FROM MyTable WHERE myField IN (1, 2, 3, NULL) What is the danger/problem here with collapsing IS into =? If these admittedly trivial examples would be fine but there are other examples where it would be a problem, feel free to bring those up. I've never gotten a satisfactory answer to this and every time I'm writing a query and this comes up it gnaws at me. The question is meant to be general and not tied to a specific implementation.

I'm dealing with nullable values in a column of a table, i'm wondering why this:  with cte as (     select 'c1'::text as c1,null::text as c2     union     select 'c2'::text as c1,null::text as c2 ) select * from cte where c2 is null   returns a result set with the two "rows" having a null value in c2; comparting to this query:  with cte as (     select 'c1'::text as c1,null::text as c2     union     select 'c2'::text as c1,null::text as c2 ) select * from cte where c2 = null   that returns an empty result set!!  so it looks like that field is null is actually different from field = null? the question is... is there "null-compatible operator" to use? so i can write the comparision like: column_name = $1 and argument $1 can be a not null or null value. IF $1 is a null value then it will semantically equals to write as IS NULL, ELSE (if $1 is not a null value) then it would be semantically equals to = $1.  P.D: This question also applies to the case is NOT NULL versus <> NULL


I can't use my iPhone any longer after my son wrongly entered my passcode to unlock my phone and I am finding it difficult to activate it after his action. How can I get it working again?

Inexplicably I wasn't able to enter my 4 digit password on my iPhone anymore. I tried so many times that my iPhone was deactivated. I powered off my iPhone and restarted it, but no chance. Afterwards I asked to delete my iPhone from iCloud.com, but first I requested to erase the phone. What happens to my iPhone if I've erase my iPhone via iCloud ("Find my Phone") and afterwards I also delete my iPhone from my iCloud account?. Does the request to delete my iPhone still apply?


Good evening all,  I trust you are well.  This is my first time on AskUbuntu, the first time I ask something. Nice to meet you all.  I have some questions and I hope you can help me find the answers.  I have been doing some maintenance work on my laptop, i.e. cleaning, replacing, upgrading, and I decided that it is time for me to get to know Linux.  I purchased a Crucial MX100 512GB SSD to replace my old WD HDD and, I must admit, I am already in love with the flash memory: it's super fast!  I now wish to install Windows 7 Ultimate 64-bit and Ubuntu 14.04.1 LTS 64-bit on my SSD. This is going to be a clean install, so I can do whatever I want to do. The SSD is the only storage drive I have installed.  As I previously mentioned, I am new to Ubuntu - I am now looking for some guidance and help in order to get the dual-boot working.  I own a HP Pavilion dv6500 laptop, with 4GB RAM installed.  I will be using Windows primarily, Ubuntu is going to be a learning experience only, but I intend to keep it installed and use it more in future.  I don't know how to set the partitions properly, this is where I need your help. I have been reading many topics, posts and articles about this but I couldn't find an SSD-only, specific, step-by-step instruction. The ones I found were SSD and HDD related and I got confused. My apologies.  I am currently waiting for Ubuntu media (DVD and USB key) from a OSDisc.com delivery. I only have the Windows installation disc with me.  Can I install Windows while I wait for the Ubuntu delivery? Do I need to do anything on the SSD before the Windows installation? Do I need to do a Custom Windows installation and set the partitions from the initial wizard? If so, can you tell me, more or less, the different partitions I need to create? The SSD is brand new, I only installed Windows for testing but I can do it again.  Please, let me know if you require additional information from me.  Any help will be much appreciated.  Thank you very much in advance.  PS: I don't play games on my laptop.

I need my pre-installed version of Windows 7 (or any other version of Windows), how could I install Ubuntu without erasing it?


I'm using  Git 2.1.60 for Windows and I want to push my directory to my github URL  Suppose I have a directory: Mydir  and there is "a.txt" in Mydir.  I want to commit only Directory. But when I type like this:  git add Mydir git commit -m "Mydirectory" git push origin master   Then in my github, commit message is updated not only directory but also files in Mydir.  I just want to show commit message only Mydir.  So I changed  a.txt file and i tried this:  git add Mydir/a.txt git commit -m "this is a.txt"   What I want is   Mydir     "Mydirectory"  And if I click Mydir in github,  a.txt     "this is a.txt"  But When I type like this(same as above code):  git add Mydir/a.txt git commit -m "this is a.txt"   The resuls is  Mydir     "this is a.txt"  And if I click Mydir in github,  a.txt     "this is a.txt"  How can I just commit only directory?  or How can I just commit only a.txt file?  Is it impossible?

How can I add an empty directory (that contains no files) to a Git repository?


Let the matrix $T_n\in M(n\times n,\mathbb{F})$, where $\mathbb{F}$ denotes a field, be defined by $T_n=(t_{ij})$ with  $$t_{ij}= \begin{cases}        \alpha\beta &  1\leq i\leq n-1,\;j=i+1 \\       \alpha+\beta & 1\leq i\leq n,\; j=i \\       1 & 2\leq i\leq n,\; j=i-1 \\       0 &\textrm{otherwise}    \end{cases} $$  Show that  $$\det(T_n)=\sum_{k=0}^{n}\alpha^{n-k}\beta^k$$    My approach: I tried a proof via induction and while the basis step is trivial, I can't seem to solve the induction step since the matrix is never in upper or lower triangular form but always a block matrix, which makes this seemingly difficult as when calculating the determinant of block matrices, one usually calculates the product of all the "diagonal blocks".  I would very much appreciate help, thank you very much.

Let $A$ be the matrix described when $A \in M_n(\mathbb{R})$.  Let $a,b \in \mathbb{R}$.  Prove that:   Iv'e tried to factor out $a+b$, but got nowhere.  A hint or a solution would be very appreciated.  Thanks a lot!


My permissions look like this:  -rw-------.  1 smpadmin staff     400 May 21  2014 id_rsa.pub -rw-r--r--.  1 smpadmin staff     505 Dec 14 19:19 known_hosts drwxr-xr-x. 45 smpadmin staff    4096 Jan 20 09:53 .. -rw-r--r--.  1 smpadmin staff     386 Jan 20 10:32 config -rwx------.  1 smpadmin staff     400 Jan 20 10:34 authorized_keys -rwx------.  1 smpadmin staff      400 Jan 20 10:37 authorized_keys2 drwx------.  2 smpadmin staff    4096 Jan 20 10:37 .   The log:  debug3: record_hostkey: found key type RSA in file /home/alejanpi/.ssh/known_hosts:85 debug3: load_hostkeys: loaded 1 keys from x.x.150.86 debug1: Host 'x.x.150.86' is known and matches the RSA host key. debug1: Found key in /home/alejanpi/.ssh/known_hosts:85 debug2: bits set: 1525/3072 debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /home/alejanpi/.ssh/id_rsa (0x60005ff50), debug2: key: /home/alejanpi/.ssh/id_dsa (0x0), debug2: key: /home/alejanpi/.ssh/id_ecdsa (0x0), debug2: key: /home/alejanpi/.ssh/id_ed25519 (0x0), debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Offering RSA public key: /home/alejanpi/.ssh/id_rsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Trying private key: /home/alejanpi/.ssh/id_dsa debug3: no such identity: /home/alejanpi/.ssh/id_dsa: No such file or directory debug1: Trying private key: /home/alejanpi/.ssh/id_ecdsa debug3: no such identity: /home/alejanpi/.ssh/id_ecdsa: No such file or directory debug1: Trying private key: /home/alejanpi/.ssh/id_ed25519 debug3: no such identity: /home/alejanpi/.ssh/id_ed25519: No such file or directory debug2: we did not send a packet, disable method debug3: authmethod_lookup password debug3: remaining preferred: ,password debug3: authmethod_is_enabled password debug1: Next authentication method: password smpadmin@x.x.150.86's password:   I added the public key to both authorized key files.  By comparing to another server where I have the same keys working, the logs on this one show at some point:  Server accepts key: pkalg ssh-rsa blen 277   I also noticed a different hex code in this part of the logs:  debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /home/alejanpi/.ssh/id_rsa (0x60006c5f0),   Now, for the server where my keys are not working, /home used to be on /, but I mounted it to a different disk. My keys used to work before I moved /home. Not sure if this is affecting me, but I thought it'd be worth mentioning. This is how I mounted home:  UUID=143f3a8a-55f3-41e4-8797-d1cdb0435c13 /home                   ext4    defaults        0 2   SELinux permissions.  drwx------. smpadmin staff unconfined_u:object_r:ssh_home_t:s0 . drwxr-xr-x. smpadmin staff unconfined_u:object_r:user_home_dir_t:s0 .. -rwx------. smpadmin staff unconfined_u:object_r:ssh_home_t:s0 authorized_keys -rwx------. smpadmin staff unconfined_u:object_r:ssh_home_t:s0 authorized_keys2 -rw-r--r--. smpadmin staff unconfined_u:object_r:ssh_home_t:s0 config -rw-------. smpadmin staff unconfined_u:object_r:ssh_home_t:s0 environment -rw-------. smpadmin staff unconfined_u:object_r:ssh_home_t:s0 id_rsa.pub -rw-r--r--. smpadmin staff unconfined_u:object_r:ssh_home_t:s0 known_hosts   The home directory has: drwxr-xr-x. root root system_u:object_r:file_t:s0      home

I'm working from the URL I found here:    My ssh client is Ubuntu 64 bit 11.10 desktop and my server is Centos 6.2 64 bit. I have followed the directions. I still get a password prompt on ssh.  I'm not sure what to do next.