Showing $\sum_{i = 1}^n\frac1{i(i+1)} = 1-\frac1{n+1}$ without induction?

I oversaw a high-school mathematics test the other day, and one of the problems was the following     Show, using induction or other means, that $$\sum_{i = 1}^n\frac1{i(i+1)} = 1-\frac1{n+1}$$   The induction proof is very standard, where the induction step relies on the fact that $\frac{1}{n+1} + \frac{1}{n(n+1)} = \frac{1}{n}$, and I'm sure it's been answered on this site before. However, I got intrigued by the "or other means" part of the question.  I don't know whether the teacher who wrote the test even considered any alternative solutions (he may just have written it so that if anyone has a crazy idea that works out, then they should get a full score for it), but I tried to find one. For instance, we may do the following telescope-ish argument: $$ \frac{1}{1(1+1)} + \frac{1}{2(2+1)} + \cdots + \frac{1}{(n-1)n} + \frac{1}{n(n+1)} + \frac{1}{n+1}\\ = \frac{1}{1(1+1)} + \frac{1}{2(2+1)} + \cdots + \frac{1}{(n-1)n} + \frac1n\\ \vdots\\ = \frac{1}{1(1+1)} + \frac12\\ = 1 $$ However, I feel that this is just an induction proof in disguise (hidden in the vertical dots). If one uses the mechanics of the induction proof to check whether the formula is true for a specific $n$, then one certainly does the exact same calculations as I have done here.  Is there a proof of this fact that clearly does not use induction (or at least hides it better)? The more elementary the better, and the ultimate goal would be to do it within the syllabus of the students taking the test (or at least not far from it). For reference, they should be familiar with the summation formula of arithmetic and geometric series and their derivations (so techniques resembling those would be well within specifications).  If there is a solution using calculus, then the students should be able to integrate elementary trigonometric functions, as well as exponential functions, logarithms and rational functions. They are familiar with integration by parts, substitution and partial fractions.  I welcome more advanced solutions as well, of course.


Why is it that the Lyman series for hydrogen atom is available for both absorption and emission, but the Balmer series is only available for emission?   The book I'm reading doesn't contain any detail about such a discrepancy. Our professor didn't teach this either. I looked  this up on the internet but I did not come across any valid answer.   Any help would be appreciated.


I was going through a document of Western Michigan University to understand the limitations of K-means clustering algorithms. Below is the link:  On slide no 33 its mentioned that K-means has problems when clusters are of different  Sizes Densities Non globular shapes  Since we explore our data and try to figure out the different groups that are present in our data through the k-means clustering algorithm, how would we know that the size of the clusters is different beforehand? We can visualize it if we have two-dimensional data but how it can be done if the data is n-dimensional? Is there any way to examine the data before proceeding to apply k-means. Also, the explanation for the limitation is: if we have different sizes of clusters, k-means will not give the desirable clusters as it tries to partition the clusters equally. But I don't think its always the case. I had applied k-means on the following dataset with k-means++ initialization  It gave me clusters with highly uneven distribution of 4346, 23, 3. I think I am missing some prerequisite steps before proceeding. Please help me clear my doubts. Thanks.


Are Ubuntu DVDs available for buying in Canonical Store?

Times ago, Canonical announced that in the Canonical Store will be available for buying only CDs / DVDs of LTS releases:   But, now we have Ubuntu 14.04 LTS and no DVD available in the store:   They added only a T-Shirt. Anyone knows why, and if DVDs will be available in future for buying?  PS: I know that it's not really useful that I'm going to burn download ISO, but I like to have original Ubuntu disks.


How to find distribution function of sum of 2 random variables that are uniformly distributed?

I am stuck with this tutorial question in one of my stats module and I would greatly appreciate some help:  Let $X1$ and $X2$ be independent random variables with $a = 0$ and $b = 1$ i.e. $X1$ and $X2$ are uniformly distributed over 0 to 1.  How do you find the distribution function of $Y = X1 + X2$ for $1<y<2$ i.e. what is $F(y)$?


Computing an infinite sum using the Residue theorem

Show that  $$\sum_{n=-\infty}^\infty \frac{1}{(3n-1)^2} = \frac{4\pi^2}{27}$$  Here is what I tried so far. I know that I can use the Residue theorem to solve a summation of this form.   $$\sum_{n=-\infty}^{\infty} f(n) = -\sum_k \text{res}_{z=z_k} \pi \cot{\pi z}\, f(z)$$  So the poles of $\frac{1}{(3z-1)^2}$ is z= $\frac{1}{3}$ (order 2).   Next I need to find the residues of $\frac{1}{(3n-1)^2} \times \pi \cot(\pi z)$ at z= $\frac{1}{3}$. But, the limit of $\frac{1}{(3z-1)^2} \times \pi \cot(\pi z)$ at z= $\frac{1}{3}$ is $\infty$.   I am not sure what to do at this point. Any help is appreciated.


TV displays Gamecube games in black and white and without sound

I connected my Gamecube to my HDTV using a PS3 composite cable (shown below). However, the image displayed is blurry, in black and white, and without sound. The cable fits perfectly on the analog AV out port, so I'm not sure whether this is a problem of incompatibility. Before buying a new cable I was wondering: are there any known issues when connecting Gamecubes to newer TVs? Does the Gamecube composite output have some proprietary hardware that will only allow Nintendo AV cables to work with the console?


\bibliography{} starting from any number

I'm aware of a previous question about , but my problem is that I'm not using \begin{thebibliography} to build the bibliography, but directly reading it from a bibtex file. Is there any method of changing the default numbering, e.g. starting from 10 instead of 1 when compiling? The end of my file is as follows:  % REFERENCES AND NOTES \bibliography{bibtextfile} \bibliographystyle{style}  \end{document}


Is there any feature in html/css to crop the image?

I have a image which I want to crop and then use it accordingly for my project using html/css. I don't want to use any photo editor.


sans serif (sub(sub(section)) title appearance

I want that all \section, \subsection & \subsubsection entries that appear in the resulting pdf file are displayed with a sans serif font. I already tried to redefine the \section command as follows: \renewcommand{\section{}}{\section{\textsf{}}}. Unfortionately, this doesn't format. The reason probably is that I don't pass the argument of \section. How can I define the redefinition correctly? Francky @Leyn.eu


Unable to click on ListPreference Dialog in PreferenceFragment

I am trying to use ListPreference item in a Fragment. I have the following Fragment:  public class PreferencesFragment extends PreferenceFragment {      public PreferencesFragment() {     }       public static PreferencesFragment newInstance() {         PreferencesFragment fragment = new PreferencesFragment();         return fragment;     }      @Override     public void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         addPreferencesFromResource(R.xml.preferences);     }  }   My preferences.xml looks as follows:  <?xml version="1.0" encoding="utf-8"?>  <PreferenceScreen     xmlns:android="http://schemas.android.com/apk/res/android"     >     <ListPreference         android:title="Test"         android:key="list_contacts"         android:defaultValue="0"         android:entries="@array/list_entries"         android:entryValues="@array/list_values"/> </PreferenceScreen>   and my arrays.xml is like this:  <?xml version="1.0" encoding="utf-8"?> <resources>     <string-array name="list_entries">         <item>Item1</item>         <item>Item2</item>         <item>Item3</item>     </string-array>      <string-array name="list_values">         <item>0</item>         <item>1</item>         <item>2</item>     </string-array> </resources>   I am attaching that PreferencesFragment into my MainActivity. It shows up, but when I click on that item, the dialog with list of items doesn't show up.    Instead I am getting the following error output:                                            java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference  at com.android.internal.app.AlertController.setupView(AlertController.java:472)  at com.android.internal.app.AlertController.installContent(AlertController.java:237)  at android.app.AlertDialog.onCreate(AlertDialog.java:423)  at android.app.Dialog.dispatchOnCreate(Dialog.java:389)  at android.app.Dialog.show(Dialog.java:293)  at android.preference.DialogPreference.showDialog(DialogPreference.java:319)  at android.preference.DialogPreference.onClick(DialogPreference.java:277)  at android.preference.Preference.performClick(Preference.java:994)  at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:214)  at android.widget.AdapterView.performItemClick(AdapterView.java:310)  at android.widget.AbsListView.performItemClick(AbsListView.java:1155)  at android.widget.AbsListView$PerformClick.run(AbsListView.java:3126)  at android.widget.AbsListView$3.run(AbsListView.java:4041)  at android.os.Handler.handleCallback(Handler.java:751)  at android.os.Handler.dispatchMessage(Handler.java:95)  at android.os.Looper.loop(Looper.java:154)  at android.app.ActivityThread.main(ActivityThread.java:6077)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)   and the applications stops.  What am I doing incorectly? How can I fix it up?  I have already looked through all threads here, but nothing worked and nothing more comes to my mind.  EDIT: My fragments switching in Activity is quite complex, but all in all it is something like this:  private void navigatePreferences() {     preferencesFragment = PreferencesFragment.newInstance();     FragmentTransaction ft = getFragmentManager().beginTransaction();     ft.replace(R.id.mainFragmentPlace, preferencesFragment);     ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);     ft.addToBackStack(null);     ft.commit(); }


Who sold Amazon the rights for the Lord of the Rings TV deal?

As stated in the title. Bonus points if you can explain what exactly is covered in the TV rights; specifically, if the rights cover late Third Age only or the whole Legendarium.  Note: I see a disupted answer ; however the linked Amazon press release does not answer the question in the title, so I'm looking for confirmation from another source.


Show $\underbrace{{111\cdots}1}_{{\small{p-1} \ 1's}}$ is divisible by $p$

What is the shortest proof to show $\underbrace{{111\cdots}1}_{{\small{p-1} \ 1's}}$ is divisible by $p$


This machine is normally a BOINC cruncher, I've downloaded the installer, boinc_7.4.42_x86_64-pc-linux-gnu.sh, it would appear I have downloaded it 4 times actually. How do I run it? I've tried to click or double click it, which opened another window, but did nothing else. All I want it to do right now, is crunch BOINC work units.


MySQL asks for root password but I was never asked to set one during installation

I installed MySQL (fresh) on my Ubuntu 18.04. And I'm having problems logging into the database. During installation there was no request for password and when I try  mysql -u root -p   the password was somehow set and I do not not how it is possible as it's a fresh installation.   Because I was confused, I tried removing MySQL packages as was somewhere suggested  sudo apt-get remove -y mysql-* sudo apt-get purge -y mysql-*   After this I made a new installation   sudo apt-get install mysql-server   but the result is the same. Not possible to login as root without password. I went through many discussions about root password reset and no success.   I tried to start mysql server with special init file via  mysqld --init-file=/home/me/mysql-init &   the file consisted of   UPDATE mysql.user SET Password=PASSWORD('pass') WHERE User='root'; FLUSH PRIVILEGES;   result is   ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)   I also tried   sudo dpkg-reconfigure mysql-server-5.7   5.7. is correct version of my mysql server, but no result - as I read in another discussion this is possibly obsolete solution but I tried it anyway.   I also tried  sudo mysqld_safe --skip-grant-tables --skip-networking & mysql -u root UPDATE user SET authentication_string=PASSWORD('newpass') WHERE user='root'; FLUSH PRIVILEGES;   but the new password does not work at all.   During installation there should be a request for root password, right? Or how can the password be set in the new installation? I'm quite new to Linux but I would expect that reinstall with purge should remove all settings and the new installation should be without root password?


Use the command bar in bash without I/O?

I really like the look of the output of   But that script is only used for Input/Output operations.  How can I use it as a replacement for sleep but with visual feedback?  sleep 10


Am I interpreting this coefficient correctly?

I'm trying to get caught up in some notes, and the topic is pooled, cross-sectional data. If we have the regression: $$\log{wage_i}=\beta_0+\beta_1\text{married}_i+\delta_0\text{yr10}_i+\delta_1\text{married}_i\times \text{yr10}_i+\varepsilon_i$$ Where $\text{married}$ is a dummy variable which $=1$ if a person is married and $0$ if not, and $\text{yr10}$ is a dummy variable indicating whether the observation was recorded in the year 2010, as opposed to being recorded in the year 2000. There's a blank spot in the notes that I didn't get, and it asks: How do we interpret $\delta_1$?  I think it's correct to say that $\delta_1$ measures how the return on whether or not someones married has changed in the past $10$ years. Is that correct? Or am I wrong? I read a little bit in my textbook and I think that's what it's saying.


Can we change database owner from [NT SERVICE\SQLSERVERAGENT] to [sa]

I have some list of databases with different owners.   Among them [NT SERVICE\SQLSERVERAGENT] is the owner of one database (let's say db_name ='Test_db_repli').  Can we change the owner of that particular database to [sa]?  If changed, will there be any problems in the future?


Texmaker GUI is messy with high resolution screen

I've just purchased a new brand laptop with 17 inch size of the screen. I've installed Texmaker and it is messy. The icons are very small and the GUI is not zoomed out automatically to fit the contents of the window. These are pictures         I've already set the size of the icons to medium and the size of apps to 250 (i.e. the recommended size) for  the display.  I'm using Windows 10. Some fonts are blurry and a lot of people are complaining about this problem with no solution from Microsoft. Any suggestions?


Unable to create a new Apple ID with previously unused email address

I am trying to create new Apple ID, but when I enter the details it shows me an error saying my email is valid and ok but it's not available even though I didn't use this email before for any Apple ID.  According to documentation I checked, "not available" means it would be used or associated with any other Apple ID but when I try to sign in and use the option that I forgot the password it shows me that there is no record for this ID.  What do these errors mean?


What do you learn in a BA in Photography that can't be self taught?

What do students learn in a photography degree that they can't learn by themselves? Most amateur photographers (and many, many pros) are self taught.  A bit of reading, experimentation, practice, practice, practice, and reflection goes along way in photography education. Does a photography degree just fast track you through the initial stages of the learning curve, or do you get something extra?  I guess that access to expert criticism is major part of photo school, which certainly can't be self taught, but what else does the formally educated photographer learn that is difficult to pick up on your own?  I hope this doesn't sound like I am anyway dismissive of going to school, I'm just curious.


Change the notation of the table of contents

I am creating a document displaying rules. I have managed to change the name of "Chapter" to "Article" and only have one more wish, which is to change the way the table of contents displays the different "articles" (chapters).   Instead of writing   1 NAME OF ARTICLE 1  A NAME OF APPENDIX 1  and so on, I want it to display  ARTICLE 1 "NAME OF ARTICLE 1"  APPENDIX 1 "NAME OF APPENDIX 1"  Here is the relevant code so far:  \documentclass[a4paper,11pt]{report} %%% Packages %%% \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{appendix}   % Adds appendix.   %%% New commands %%% \addto\captionsenglish{%  \renewcommand\chaptername{Article}} \renewcommand{\rmdefault}{cmr}  % Changes the font.   \begin{document}  \tableofcontents \newpage \input{article-A.tex} \input{article-B.tex} \input{article-C.tex} \input{article-D.tex} \input{article-E.tex} \input{article-F.tex} \input{article-G.tex} \input{article-H.tex} \input{article-I.tex} \input{article-J.tex} \input{article-K.tex} \input{article-L.tex} \input{article-M.tex} \input{article-N.tex}  \appendix \input{appendix1.tex} \input{appendix2.tex} \input{appendix3.tex}   I hope everything is explained clearly, otherwise please ask and I'll be more specific.   Any suggestions are greatly appreciated.   EDIT: Solved with the help of the comment. I used the link providing a similar solution.  I inserted this in my preamble:  \usepackage{tocloft} \usepackage{etoolbox} \apptocmd{\appendix}   {\addtocontents{toc}{%      \protect\addtolength\protect\cftchapnumwidth{-\mylength}%    \protect\renewcommand{\protect\cftchappresnum}{Appendix~}%    \protect\settowidth\mylength{\bfseries\protect\cftchappresnum\protect\cftchapaftersnum}%    \protect\addtolength\protect\cftchapnumwidth{\mylength}}%   }{}{}  \newlength\mylength  \renewcommand\cftchappresnum{Article~} \settowidth\mylength{\bfseries\cftchappresnum\cftchapaftersnum} \addtolength\cftchapnumwidth{\mylength}   And it worked perfectly :)


How to enter date as an option in a bash command?

I want to enter the current date (ideally in the form YYYY-MM-DD hh:mm) as an option in a bash script:  I tried  /usr/local/bin/growlnotify -t "PMK" -m date   but then the variable -m inserts the string "date" in the output. How can I tell the script that it has to use the output value of the "date" command?  (I'm using MacOS X 10.6 and the growlnotify command is used to display a popup window with 2 strings ("PMK" and a second one where I'd like to get the current date/time)  )


C++ unresolved external symbol, I've already defined functions

I've wrote my code nad when I want to build it it says: unresolved external symbol" for some functions, like the destructor:  header file:  template <class T> class Tree { *not important* public:     ~Tree() }   cpp file:  template <class T> Tree<T>::~Tree() {     if (root != NULL)     clear(root); }   I also defined and clear function so thats not the problem..


How does SO give the "answers have been posted" notification?

I'm wondering how SO is able to display the "New answers have been posted" message when I'm typing an answer for a question. Does my browser send an AJAX request to the SO servers, or does SO send a trigger back to my browser?


I have flagged the following question as a duplicate.    Now I want to know: after how long time will it be stated as active?  I do not have problem with anything here. I just want to know after how long time the request (of a duplicate question) will automatically be rejected or approved.  OK, I got the things, so it will remain active until moderators will have a look at it...  But don't you think we should have a limit that after a certain number of days this kind of request will be dropped (or cancelled)?


HTML / CSS - DIV Element hidden when it shouldn't be?

(clickable)  Mainad has a valid height and width, however it isn't shown like subad1/subad2. Which are in essence exactly the same! (just a different background image).  Firebug shows my div as greyed out for some weird reason. Replacing the contents of mainad with just some text doesn't solve the problem (problem isn't related to inner elements)..   What's going on?! :(


Mirroring this object gives unwanted results

Ive been trying to follow this tutorial but i got lost...   The mirror is inverted... I want it to be a closed object, not open from both sides.


I can't start bounty on questions on child metas. How to promote them then? I think it is better do so as I can offer a bounty on it, points for which will be deducted from my main reputation.


Escaping spaces in a remote path when using rsync over a remote SSH connection

When using SSH to connect rsync to a remote server, how do you escape spaces and such in the remote path? A simple backslash escapes the space for the local bash prompt, but on the remote machine the space is then being read as a break in the path, thus marking the end of that path.  So when I do rsync -avz /path/to/source/some\ dir/ user@host.tld:/path/to/dest/some\ dir/ what happens is that the remote server is reading that as just /path/to/dest/some/ and since it can't find that destination remotely, because the actual destination is "some dir" rather than just "some".  If I try the same command and escape the backslash and the space to get past the local bash prompt and maintain the backslash for the remote server (three backslashes total: /path/to/dest/some\\\ dir/), it does indeed send the backslash to the remote server, but the remote server then interprets the path as /path/to/dest/some\/ rather than /path/to/dest/some\ dir/ still stripping the space and the characters after it.  If I try to wrap the path with quotes, it behaves pretty much the same way, effectively cutting the path off at the space. So it too only works to get past the local bash prompt.  Initially I was using a path that had a " - " (space-hyphen-space) segment in it, and the remote server was returning an error rsync: on remote machine: -: unknown option which is what started this whole space-escaping endeavor in the first place.   So what must I do to get this working properly with the remote server, without having to remove the spaces or other erroneous characters like hyphens from the remote path?


Electromagnetic field of unpolarized light

I need help in finding an expression for the instantaneous electric and magnetic field of unpolarized light in order to write down and evaluate the time-averaged norm of the Poynting vector (i.e. the intensity of unpolarized light). I expect this to be a superposition of some basis functions, but how many and how do they look like? Are these linear polarized waves with random orientation and phase shift?  $$\bar{E}(t,\bar{x})=\sum_{i}\bar{E}_{0,i}e^{i(\bar{k}\cdot\bar{x}-\omega t+\delta_{i})}$$ with $\|\bar{E}_{0,i}\|=\|\bar{E}_{0,j}\|$ ?


How can the effectiveness chart be used for dual type pokémons?

I've found a type effectiveness chart which lists all the move types (Water, Fire, Earth etc) against all the pokémon types at .  But I haven't seen any explanation for how to use that information for dual type pokémons.  For example, Lapras is Water/Ice.  Fire moves are super effective against ice, but not very effective against water.  So how effective are Fire moves against Lapras?


I'm having trouble with a proof by induction

This one should be pretty easy as its only a first year math problem. it s proof by induction that Im having trouble with.  $$let\;x_{1}=1; for\;each\;n\in \mathbb{N}\;let\;x_{n+1}=\frac{2}{3}x_{n}+1; prove\; x_{n}< 3\;for\;all\;n$$  If anyone is willing to spell it out really obviously step by step and explain how they got from one step to the next I would appreciate it a lot. Thanks.


How to link dragonvale park to Facebook after already saying no

I've already logged in before and when it asked if I wanted to link my park I said no. Now, when I log out and log back in, I log in automatically and it doesn't ask me if I want to link my park. Is there any way to get it to ask me again so I can link my park?


Making methods to print array (newbie in java)

I am kind of new in Java, and I got assigned some exercises. Any idea how to this small problem?   create an array consisting of 100 random integers in the range 100 to 500, including the end points. make a method to print the array, 5 numbers per line, with a space between each. make a method to print the smallest number in the array.   So far this is what i got for the first 2 parts but i doesn't seem work, help please, sorry for asking such dumb questions...  package randomhundred;  import java.text.DecimalFormat;  public class RandomHundred {     public static void main(String[] args) {         //setting the 100 array         int rand [] = new int [100];         double numb;         DecimalFormat dec = new DecimalFormat("0");         for(int i=0; i<rand.length; i++){             numb = Math.random() * (  500 - 100 );         }       }      public static int arai (){         return System.out.print(" " + dec.format(numb) + " ");     }     }


Is it okay if I provide my personal email address on my paper instead of my institutional one?

I'm going to submit a paper with my name as the "corresponding author". I am going to be using my personal email address instead of my university one. This is because I am an undergrad and my institutional address will become invalid after I graduate. Questions:  Is this okay? Will it cause any administrative issues? Is this practice seen anywhere else?  If it makes any difference, this will be a journal paper.


Capturing details from EMAIL to FORM using the PRIMARY KEY

Hi All, I hope I can explain this right. I need assistance on how I can capture the details from EMAIL going to FORM. My question is there a way to transfer the details (NAME, EMAIL and MOBILE) going to the form using the PRIMARK KEY (P_K)? I want to shorten the generated link from:  to  but still capturing the details from EMAIL going to FORM. EMAIL Details: %%[ var  @P_K, @NAME, @EMAIL, @MOBILE, @link Set @P_K = P_K Set @NAME = NAME Set @EMAIL = EMAIL Set @MOBILE = MOBILE Set @link = Concat('&P_K=', @P_K,'&NAME=', @NAME,'&EMAIL=', @EMAIL,'&MOBILE=', @MOBILE) ]%%  EMAIL BUTTON LINK:  Generated link after clicking the button:  FORM NAME:  FORM WITH EDM DETAILS CAPTURED:  Data Extension: EMAIL - test_concat_EDM_0521(P_K = test_1, NAME = Harvey Linarez, EMAIL = hlinarez@gmail.com, Mobile = 639493439284) FORM - test_concat_DE_0521_Copy (Variable field = P_K, NAME, EMAIL, MOBILE) I can comment the additional details if needed. Thanks


why is there a NullPointerException when using loadstrings but not on normal string? (Processing)

newbie here,  probably a logical error so, I started with a set of codes without class and then I tried to redo it by using it with the same outcome, but now I keep getting a NullPointerException error on words[i].display(); what am I doing wrong in my codes? below are my before and after codes... thank you in advance for anyone who can help!  also, I tried doing it with a normal string or without loading an external file and it works fine! why do I get it when I start using a loadstrings is there any difference?  BEFORE:     String [] allWords;  int index = 0 ;  float x;  float y;    void setup () {  size (500,500); background (255); //background : white  String [] lines = loadStrings ("alice_just_text.txt"); //imports the  external file String text = join(lines, " "); //make into one long string allWords = splitTokens (text, ",.?!:-;:()03 "); //splits it by word  x = 100; //where they start  y = 150;   }   void draw() {  background (255);  for (int i = 0; i < 50; i++) {  //produces 50 words    x = x + random (-3,3); //makes the words move or shake   y = y + random (-3,3); //makes the words move or shake    int index = int(random(allWords.length));  //random selector of words    textSize (random(10,80)); //random font sizes   fill (0); //font color: black   textAlign (CENTER,CENTER);   text (allWords[index], x, y, width/2, height/2);    println(allWords[index]);    index++ ;    }  }   and the AFTER:  String [] allWords; word [] words; int index = 0 ;  void setup () {  size (500,500); background (255); //background : white textSize (random(10,80)); //random font size  String [] lines = loadStrings ("alice_just_text.txt");  String text = join(lines, " "); //make into one long string allWords = splitTokens (text, ",.?!:-;:()03 "); //splits it by word  }  void draw() {  background (255);  for (int i = 0; i < 50; i++) {  //produces 50 words   words[i].display();    }  } class word { float x; float y;   word(float x, float y) {   this.x = x;   this.y = y;  }  void move() {  x = 120 + random (-3,3); //variables sets random positions  y = 130 + random (-3,3); //variables sets random positions }  void display() {  int index = int(random(allWords.length));  fill (0); //font color: black  textAlign (CENTER,CENTER); //should make it start at the center  text (allWords[index], x, y, width/2, height/2); //positions     }     }


How to open a file in a list of files in Vim?

I have a longish list of files opened in vim that looks like this:  /dir1/file1 /dir2/file2 /dir2/file3 .....   How can I open all of them one by one the easiest way possible in the same session of vim either with split or edit?


If $0 < p < 1$, $f \in L^p$, and $\int \lvert g \rvert^q < \infty$, show that $$\int \lvert fg \rvert \ge (\int \lvert f \rvert^p)^{\frac{1}{p}}(\int \lvert g \rvert^q)^{\frac{1}{q}}$$ My feeling is that I can use $\frac{p-q}{p}$ and $\frac{q-p}{q}$ as a conjugate pair, and apply Holder Inequality to reach such a conclusion. But I tried a lot and failed to get the desired inequality.  I was considering to prove $(\int \lvert fg \rvert )(\int \lvert g \rvert^q)^{-\frac{1}{q}} \ge (\int \lvert f \rvert^p)^{\frac{1}{p}}$, then $(\int \lvert fg \rvert )^{p-q}(\int \lvert g \rvert^q)^{-\frac{p-q}{q}} \ge (\int \lvert f \rvert^p)^{\frac{p-q}{p}}$, i.e. $(\int \lvert fg \rvert )^{p-q}(\int \lvert g \rvert^q)^{\frac{q-p}{q}} \ge (\int \lvert f \rvert^p)^{\frac{p-q}{p}}$.  Seems like dead ends to me..


First of all I'm not a physicist or anything and I don't know much about physics, so I'm sorry if this doesn't make sense at all :) And if possible please try to explain it with words instead of complicated formulas, because I probably won't understand them.  Let's take earth and sun for example. From this picture I understand that earth is being pulled by sun constantly but I don't understand where the opposing force is coming from. How can earth still keep opposing sun's gravity for millions of years. Where is the force coming from? Shouldn't earth be slowing down and eventually collapse into sun? If no then does that mean that there the opposing force is being constantly applied. Or the earth had some initial momentum and it never loses that momentum for some reason? But that doesn't seem intuitive, because if you throw something on earth it falls down because gravity is stronger than that momentum. But in space if earth is being constantly pulled by sun and earth is opposing that pull constantly, shouldn't earth need to use energy to oppose the pull and eventually lose all of it's momentum? I've heard about the theory that earth is actually constantly falling into sun. But I can't understand that one, because I don't see why is earth evolving around sun in that theory, it seems like it should just follow sun in a straight line if it's constantly falling into it. If it's evolving then why doesn't sun crash into earth when earth is in front of it? To sum it up here are my questions:   How did earth get it's initial momentum? Is that momentum ever slowing down? If not, why? Is there a constant force that gives earth it's momentum, or it's just the initial momentum that never slows down? If the earth is constantly falling into sun, how can it also revolve around it? Shouldn't it go in a straight line after sun?


Is there canon info on shelf life of various potions in Harry Potter?

Do we know how long potions (in general, or at least specific ones) are potent (no pun intended) in Harry Potter canon?  E.g. do they last a couple of hours? Minutes? Years?   I seem to vaguely remember some comments of Snape's about Wolfesbane potion therfore I think at least some information exists.


Can you help me with my software licensing issue?

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


For the function: $f(x)=5x^3-10x$ we find the zeroes to be: $x=0, \sqrt{2}$, and $-\sqrt{2}$ However... If you let $a=\sqrt{2}$ or $-\sqrt{2}$ in $5a^3-10a$ Desmos evaluates and says either of those equal $3.5527136788*10^{-15}$ (NOT $0$)!!! Am I doing something incorrectly or is this Desmos' fault? Image:


As the pic above , in the tile there us small squares , each square have its own drawnings , how can make the same tile in blender ?


End of Stream encountered before parsing was completed?

I am trying to deserialize a stream but I always get this error "End of Stream encountered before parsing was completed"?  Here is the code:          //Some code here         BinaryFormatter b = new BinaryFormatter();         return (myObject)b.Deserialize(s);//s---> is a Stream object that has been fill up with data some line over here   Any one have ideas?


I wrote the below code split a String and insert it into a Object Array. But,  I am getting null pointer exception at the below line. Can you please let me know what is wrong in my code. Thanks in advance                     nDLs[i].setDisplayName(entrySplit[1]);   Code:      public class JsonResponse {           public static void main(String[] args) {                String response = "eclac-allfocalpoints@un1.org:ECLAC-All Focal Points|testgrp-icc@un.org:TestGRP-ICC|unon-ictsalerts@un.org:UNON-ICTSAlerts|oict-oict-globalvtc@un87.org:OICT-Focal Points All|";                 NodeDLList nDLList = new NodeDLList();                    System.out.println("RESPONSE::::: " + response);                  String split[] = response.split("\\|");                  NodeDLs[] nDLs = new NodeDLs[split.length];                  for (int i = 0; i < split.length; i++) {                      String entry = split[i];                      String entrySplit[] = entry.split("\\:");                          nDLs[i].setDisplayName(entrySplit[1]);                        nDLs[i].setPrimaryEmail(entrySplit[0]);                  }                  System.out.println("Complete response in Node List Object ::::: " + nDLs);                  nDLList.setdistributionLists(nDLs);                  System.out.println(nDLList);       }     }   NodeDLList.java      public class NodeDLList {            NodeDLs[] distributionLists = null;            public NodeDLs[] getdistributionLists() {             return distributionLists;         }          public void setdistributionLists(NodeDLs[] distributionLists) {             this.distributionLists = distributionLists;         }       }   NodeDLs.java      public class NodeDLs {          String primaryEmail = null;          String displayName = null;          public String getPrimaryEmail() {             return primaryEmail;         }          public void setPrimaryEmail(String primaryEmail) {             this.primaryEmail = primaryEmail;         }          public String getDisplayName() {             return displayName;         }          public void setDisplayName(String displayName) {             this.displayName = displayName;         }


Is it standard to use "what" as a form of "which," such as in the sentence:     The tour guide let us know what items were permitted to be taken along on the trip.   In this instance I prefer "what" because it refers to categories of items as opposed to specific items.


Compilation error while using array of structs in C using Digital Mars compiler

I have the following code in C which fails on compilation. I think I am missing something about the way array of structs work or about memory models or something else I am not aware of it.  #include <stdio.h>  #define BASE_YEAR 2013  struct struct_tpo_line {     int price;     char tpo_list[255];     int tpo_count; };  struct struct_bar {     unsigned int open;     unsigned int high;     unsigned int low;     unsigned int close;     unsigned int flags_volume;   };  struct struct_bar data[20][12][31][24][60];  main() {      char                        filename[255];     struct struct_bar           bar;     struct struct_tpo_line      array1[10000];      printf("20030101 193200;1.048400;1.048500;1.048300;1.048500;0\n");     bar = data[2013 - BASE_YEAR][1 - 1][1 - 1][19][32];     printf("%d %d %d %d\n", bar.open, bar.high, bar.low, bar.close);      printf("Hello World.\n"); }   I try to compile it under Windows 10 32 bits Home using Digital Mars C compiler and I get:  C:\Users\...\DATA>dmc test2.c -o test2.exe link test2,test2,,user32+kernel32/noi;   And the following popup:    I was previously using PCC compiler but I changed to Digital Mars as I thought it might be compiler-related issue.


301 redirect blogspot to an existing domain?

Is it possible to redirect a blogspot site to an existing URL?  Note that I don't want to buy a new domain and tell blogspot to use that, eg as per this question: .    Instead I am trying to 301 redirect to an existing website in order to combine the website and the blog in one place.  So it needs to be:  301 example.blogspot.com/post to example.com/blog/post


What is the equivalent of "integer" from java in javascript?

I have this in java:  int minimo = Integer.MAX_VALUE;   how would it look in javascript? Is there an equivalent of n"integer" in javascript?  var minimo = Integer.MAX_VALUE;   ?


Adding dynamic content with jQuery append, then accessing it not working

I create dynamic content via jQuery that looks like:  $('#usersList tbody').append(' \
 \     Dan	 \     id }}" data-toggle="modal" data-target="#userEditModal"> \         <button class="btn btn-default btn-sm edit-user-btn"> Edit</button> \     	 \
 \ ');   Then, I try accessing the content in ".users-list-name" with:  $('.users-list-edit', '#usersList').on('click', function () {     var name        = $(this).parent().find('.users-list-name').text();     console.log(name) // dynamic content not working here });   #usersList is the id of the table.  That click function works for the data that was already there on page load.  How can I access data in this dynamic appended content?


Strange behavior of `tasks` items inside `tcolorbox` box

I am drawing a fancy box around theorem environment using tcolorbox package. The content of the environment contain horizontal enumerate and I prefer tasks package. The default box setting work perfectly fine with the contents. However, when I reduce the frame line thickness, it turns out to be a problem (please refer to the MWE and screenshots). So what is the matter? Is it a bug of tcolorbox package?  \documentclass[11pt,a4paper]{book} \usepackage[margin=1in,bindingoffset=1cm]{geometry} \usepackage{tcolorbox} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage{tasks} \newtheorem{example}{Example} %\tcolorboxenvironment{example}{colframe=red!70!black,colback=magenta!9!white} % this work perfectly but the frame line is too thick. \tcolorboxenvironment{example}{colframe=red!70!black,colback=magenta!9!white,boxrule=1pt}% adding boxrule=1pt key cause the problem \begin{document}     \begin{example}         Compute determinant of the following matrice:         \begin{tasks}[style=enumerate](3)             \task $ \displaystyle A=\begin{pmatrix}             1 & 2\\             3 & 4             \end{pmatrix} $             \task $ \displaystyle B=\begin{pmatrix}             0 & 2 & 4\\             6 & 8 & 10\\             12 & 14 & 16             \end{pmatrix} $             \task $ \displaystyle |C|=\begin{vmatrix}             a_{11} & a_{12}\\             a_{21} & a_{22}             \end{vmatrix} $         \end{tasks}     \end{example} \end{document}


Specs for the :  At 3VDC we measured 150mA @ 120 RPM no-load, and 1.1 Amps when stalled.   At 4.5VDC we measured 155mA @ 185 RPM no-load, and 1.2 Amps when stalled   At 6VDC we measured 160mA @ 250 RPM no-load, and 1.5 Amps when stalled.  I was looking around for some motor drivers to drive 4 of those motors. I'm planning to go with the  (which I already have 1 of, so I would only need 1 more) or  (which I would need 2 of). I'm sure that the DRV8833 is definitely capable of driving those motors, but I'm not sure about the L293D (which would be preferable considering its price and that I need only one more) According to the specifications of the L293D motor driver on the website, these seem to be able to drive motors below 600mA, which I believe should be fine for the motors, however, it lists that it can handle a peak of only 1.2A, but the motors states that it can go up to 1.5A of current when stalled at 6VDC (not sure what stalled current means, exactly, but it's bugging me a bit). Would the L293D be just fine for this or would, say, the DRV8833 be a bit more suitable for the motors? Would appreciate any help, thanks!


I want to build a small game which will be a JTable with some values and JTextField above the table, user should type any value in the text field if it exist in the table it will remove if it not exist user will get message by that, I tried to remove value which user write it in text field and wrote this code: String value = txt_num.getText(); for (int i = 0; i < table.getRowCount(); i++) {                            for (int j = 0; j < table.getColumnCount(); j++) {                       if (tbl.getModel().getValueAt(i, j).toString().equals(value)) {             tbl.setValueAt(null, i, j);         } else {                 JOptionPane.showMessageDialog(null, "Value isn't exist");          }     } }   This code remove correctly but it remove the first value which entered but when I enter another value I got this error:  How can I resolve that NullPointerException?


Are there more elegant options to CAPTCHA?

Are there more elegant and user friendly options to captcha out there? Not only do I find that the format of captcha really muddles up a site design, but often users have to refresh for a new one several times. Even then when it's input in what seems correct to the user, it might not be and they form refreshes telling them it was wrong.


There are a number of occasions in the mathematics where the word "form" is used:      ...   It seems that form is a special kind of function.  But I cannot readily see what properties a function should satisfy to be eligible to be called a form?


Is there a way to download Windows games on Steam but for my Macbook Pro?

I have a Macbook Pro and all my friends have 40+ games but most of them are for Windows. So is there anyway that I can download them but on my Mac and be able to play them?


CSS Issue on User Profile Accepted Answers/Question

tldr: Prevent Eyes From Going On Strike!  Add a colored background to the main site user page on accepted answers. Add a single line of CSS to make the user page friendly looking like on the meta!    See the difference on the left -> main Ewww! and on the right -> meta Great!    How am I supposed to see the difference on the main page! The only little difference is that the color of the number is dark greenish!  The problem could be solved with the following css on user profile page :   .answered-accepted {     color: #4C9067; /* Which is already there on user page */     background-color: #CDDFBF; /* Line-to-add took from the existing meta CSS */ }     Boring background and more info  I'm normally not picky when it comes down to colors or stuff like that but, this is to me really hard to differentiate. I've been browsing on the mobile SO a lot lately and this is one of the thing that lowers my user experience!   On the user pages it's very hard to see the difference between answers/questions that have accepted answers and those who do not. The one with accepted appears in green and the other one in black. Well when the luminosity of your phone is not at the maximum or when you are outside or whatever else non-optimal condition it's nearly impossible to see the difference.  So I would be very happy to have the user profile page to look a bit more like the one in the full site or in mobile question page where you can easily see accepted questions/answer. So If one could add a green background to prevent my eyes from going on strike!  This question is kind of related to  which was a similar request for the main site.


What is the approximation equation for making the day/night wave

Basically, I have a program that will graph the day/night shade similar to this page:   Could any of you give me the equation for graphing a line that approximately follows the day/night curve. I can't really think of an equation, so I'm asking here. Thanks.


Conditional Operator with DateTime? won't compile

Can anyone tell me why this won't compile?  DateTime? completedDT; bool completed = false; completedDT= completed ? DateTime.Now : null;   I would have thought that as it was writing to a nullable object (DateTime?) the use of null would be acceptable. Instead I get this error:     Error  19  Type of conditional expression cannot be determined because there is no implicit conversion between 'System.DateTime' and 'null'


Order of $\phi(g)$ divides the order of $g$

Let $\phi: G \to H$ be a group homomorphism, and let $g$ be an element of $G$. Show that the order of $\phi(g)$ divides the order of $g$.


What happens if multiple teammates 3-star an enemy in a war?

If your clan is wining like 20-3, and you have 1 attack left, can you put it on a base that someone else has already attacked, and get bonus loot?  How many times can bonus loot be claimed on a single base? Can different team mates attack the same base and all 3 star it and get the loot?


Imagine a I have two types of images (A and AAA(heavier)) for the same website: depending on the size of the screen it will show one image or other.   Now I'm wondering what images (A or AAA) loads the Google crawler when it visits my site.   In other words: has the Google crawlers any "screen size"?  I suppose, in case the it loads the A images, the page-speed puntuation will be better than if it loads the images AAA.


Website ftp details hacked by Alsancak Tim

My web files are hacked by Alsancak Tim.  some ine is hacked ftp username and password. then going to delete all files and updated his own file.  Now i am looking my website, it display a new index.html file (added by hacker). but mysql database is safe.  i am all changing ftp details and re uploading all my files. now it is good.  what can i do for protecting my website ?


I am trying to retrieve BIOS Event log so I can see low level hardware errors such as thermal events from recent model Dell Laptops. I know they have their own tool to do this but it doesn't do specifically what I need.   I know I can get some high level BIOS data using Win32_BIOS via WMI however I don't see the BIOS event log data that way which is what I am after. Anyone know how to get this or what WMI branch this is under in C# via Winforms (.Net 4.0) ?  (PS. Please don't suggest an alternative tool or discussing it with Dell as those options have already been explored and are not a direction I want to go. Thanks)


Why do electrons revolve around the nucleus?

Why do electrons revolve around the atom's nucleus?  Where does it get the energy for the revolution?  Do the electrons stop revolving at absolute zero temperatures?


How can I be more descriptive about actions and events in my game?

Whenever I'm running or playing a game, I consistently run into an issue of setting atmosphere. I've realized the best way to do this is through more effective, engaging descriptions of settings, actions, and objects that the characters see and feel.  As a player, I feel that my actions are generally "I attack the goblin," or some variation thereof, but I'm afraid that I'll stumble over my words and further confuse the other players and I'll resort to "I attack the goblin" as to not drag the game out longer.  As a DM, my issue tends to be more with setting atmosphere with settings, locations, and objects. Effectively, the flavor texts that comes with walking into some amazing location that the characters (not necessarily the players) should be suitably impressed by. My goal here is to engage the players with some degree of spectacle, and be more inquisitive in their environment and whatever lies within it.  How can I create more descriptive, concise flavor text for the games I play in?


Disable Autosave when taking screenshot on UBUNTU 18.04

I just upgraded from ubuntu 16.04 to 18.04  In ubuntu 16.04 when I trigger the screenshot shortcut, the notification about save/copy to clipboards/name will popped up.  However, in 18.04 when I triggered the shortcut, it will automatically save to ~/Pictures  I just want the behavior the same with 16.04  How to achieve that?


forecast(method ='arima') ; auto.arima() function, how to avoid forecast not in line with history?

I am working on an alogorithm in R to automatize a monthly forecast calculation. I am using, among others, the forecast(method='arima') function from the forecast package to calculate forecast. It is working very well. But for some times series some forecast are quite strange.  Please find below the code i'm using:  train_ts<- ts(values, frequency=12) fit1 <- stl(train_ts, s.window="periodic",t.window=24, ) arima <- forecast(fit1,h=forecasthorizon,method ='arima')  values <- c(27, 27, 7, 24, 39, 40, 24, 45, 36, 37, 31, 47, 16, 24, 6, 21, 35, 36, 21, 40, 32, 33, 27, 42, 14, 21, 5,   19, 31, 32, 19, 36, 29, 29, 24, 42, 15, 24, 21)  Here, on the graph, you will see the historical data (black), the fitted value (green) and the forecast(blue). The forecast is not in lines with the fitted value.   As you can see the Forecast is not in line with the history, My question is "does a setup for Arima to bound the forecast in line with the history exist" ?


Bind a key for multiple units to use the same spell

Is there a way for me to bind a key that will allow multiple units in my control group to all use the same spell at once?  For example, if I have 3 centaurs as chen, and I have them all selected. Can I press one key to make them all warstomp at the same time?   Or if I have 3 familiars as Visage. When I have all three selected, is there a button I can press to have them all stun at the same time?


What are legal ramifications around using Windows on Mac via Bootcamp?

Very often Windows is shipped with a PC. As I understand I can't use that copy of Windows on my Mac. What can I use? Would Windows OEM be a good choice? Is 'normal' version of Windows okay for this purpose? If I want to run Windows either via Boot Camp or Parallels does it mean I need to have to 2 copies?  Edit: I'm not asking here whether it's legal to install Windows on Mac. I want to know the exact legal details of that. I am a freelancer and I can't afford penalites associated with illegal use of software.


Is there an MD5 Fixed Point where md5(x) == x?

Is there a fixed point in the MD5 transformation, i.e. does there exist x such that md5(x) == x?


I have windows 7 and my disc drive has a capacity of 120 GB. From one day to another it tells me that my disc C is full in a red bar but I dont have many programs installed. I deleted all of my videos, games, music, pictures, etc and I was able to free up 30 GB. I ran the disk cleaner and emptied the TEMP folder and garbage can but it still shows a 70GB used. Can I get some help from the experts PLEASE!!!


Finding the inverse of a matrix involving reciprocals of positive integers

The result of Example 16 suggests that perhaps the matrix   $A=\begin{bmatrix}  1  & \frac{1}{2} & \frac{1}{3} \ \ \cdots \  & \frac{1}{n} \\   \frac{1}{2}& \frac{1}{3} & \cdots & \frac{1}{n+1}\\ \frac{1}{3} & . & \cdots & .\\. & . & \cdots & .\\\frac{1}{n}  & \frac{1}{n+1} & \cdots & \frac{1}{2n-1} \end{bmatrix}$  is invertible and $A^{-1}$ has integer entries. Can you prove that?


Recently our scanner identified several vulnerabilities with Apache tomcat. The latest version in Ubuntu 20.04 is tomcat9 9.0.31-1ubuntu0.1 There are several CVE's that are fixed only in higher versions  9.0.35: CVE-2020-9484 -  9.0.36: CVE-2020-11996 -  9.0.37 - Apache Tomcat 9.0.0.M1 < 9.0.37 Multiple Vulnerabilities (didn't find CVE) 9.0.38 - Apache Tomcat 8.5.x < 8.5.58 / 9.0.x < 9.0.38 HTTP/2 Request Mix-Up (didn't find CVE) 9.0.40 - Apache Tomcat 9.x < 9.0.40 Information Disclosure (didn't find CVE)  Unfortunately, I can't upgrade due Ubuntu 20.10 due to client requirements Please advice when we should expect newer version with Focal repositories. Thanks.


Access rights of files from an old laptop's HDD

My old laptop died because of battery issues earlier in the year, and I've managed to get the HDD out before trashing it.  I've bought a new laptop and a USB/SATA plug, and I can access and see the old file tree of my old C: drive (now H:)  I'm trying to recover my personal files from C:\Users\$Username. Unfortunately, I do not have the autorisations, and if I remember my old password I can't remember the name of the laptop (domain controller).  Do you have any way/program which can gain me access rights ?  Thanks you in advance.


Is E=hf applicable for all types of particle?

According to Planck's law, E=hf is applicable for photon and photon shows wave-particle duality. But De Broglie proved that Electron and other substances also shows wave-particle duality and he showed that lambda=h/p. But I have some problem about this topic. This is: mc^2=hf or, mc^2=hc/lambda or, mc=h/lambda or, lambda=h/mc. But the term 'mc' is the momentum of photon but not the momentum of other dynamic substance. So how lambda=h/mc=h/p shows the wavelength of any substance? Isn't Planck's law E=hf applicable for other substance except photon?


Can't read code blocks from the Stack Exchange android app

This occurs in the  released recently to the public. When someone posts a code block in their question or answer, the code block is cut off on the right hand side, and I can't scroll to the right to view the rest of it. How can I view these code blocks?


Is there a library that will detect the source code language of a block of code?

Writing a python script and it needs to find out what language a block of code is written in. I could easily write this myself, but I'd like to know if a solution already exists.  Pygments is insufficient and unreliable.


Continuity of Popcorn Function (Thomae's Function)

I have to prove that the function $f:]0,1] \rightarrow \Bbb R$ : $$ f(x) = \begin{cases} \frac1q,  & \text{if $x \in \Bbb Q$  with $ x=\frac{p}q$ for $p,q \in \Bbb N$ coprime} \\ 0, & \text{if $x \notin \Bbb Q $} \end{cases} $$  is continuous in  $x \in \ ]0,1] \backslash \Bbb Q$ (irrational numbers).  I already tried to solve this exercise and I understood how to prove that this function is discontinuous for rational numbers.  I was trying, now, to understand how to prove that for the irrational numbers it is continuous.  I already have the solutions but they are a bit complicated, and I come up using sequences to prove it's continuous: $$\forall x_n \quad x_n\rightarrow a \quad \Rightarrow \quad f(x_n) \rightarrow f(a)$$  I created a sequence $ x_n=\frac1n + a$, and we consider $a$ an irrational number. In order to be continuous $f(x_n)$ has to converge to $f(a)$. In fact:  $$\lim_{n\to\infty} f(x_n)= f(a) = 0 $$  So my proof ends here, but I know that I'm missing something really big because in the solution there is another complicated step using a set and the Epsilon-Delta theorem after what I've showed.  Can someone explain what's wrong and help me with this proof?


What is the optimal order of post-processing steps?

I know it's best to do as much post-processing before converting from RAW, but in cases where it's not possible - what is the optimal order of post-processing steps (like noise removal, dust-spot removal, color correction, brightness/contrast correction, straighten, distortion/aberration removal, selective edits, sharpening, resize, color space and bit-depth change, etc)?  When I say optimal order I mean the order that will result the least banding, clipping, halos and other digital artefacts. I'd also like to understand the reasons behind some particular ordering. Is it different for prints and web output?


My HUD is not working after I upgraded from 11.04 (and or 11.10).  It prompts for command and it tries loading for 4 seconds then gives up.


Problem with a sequence with multiple integrals

How to compute the following limit,   $\displaystyle \lim\limits_{n \to \infty} \int_0^1 \int_0^1 \ldots \int_0^1 \sin \bigg(\frac{x_1+x_2+\ldots+x_n}{n}\bigg)\,dx_1 \,dx_2 \ldots \,dx_n$ ?  I will greatly appreciate it if a solution only uses analysis. Thank you.


Use pgfplots to plot a single column .txt file

I have a single column .txt file with the following info in it  1 2 3 4 5   I use the following ME and it does no work:   \documentclass[border=1]{article} \usepackage{pgfplots} \pgfplotsset{compat=1.5} \begin{document} \begin{tikzpicture}     \begin{axis}             \addplot table {TestTable.txt};      \end{axis} \end{tikzpicture} \end{document}   where TestTable.txt contains as a single column the above numbers.   I would like to plot this using pgfplots (this is just an example so the result is a trivial line). The result should be a straight line of course (e.g. y=x).  Hopefully the answer should also be applicable to a larger sample.


I wrote this sentence:     We suppose that two items are similar if they have been bought together by many people.   Should I say?     We suppose that two items are similar if they were bought together by many people    That sentence is the premise of a theory, it is a fact, not opinion.  item means product in this context


Is $\bigcup_{i \in \mathbb{N}} \mathbb{N}^i$ countable?

I was wondering if $\bigcup_{i \in \mathbb{N}} \mathbb{N}^i$ were countable or not, where $\mathbb{N}^{i}$ means the direct product of $i$ copies of $\mathbb{N}$. I may have read that this is countable, but I think I have never seen a proof of the countability (or uncountability). The fact is that I know a countable union of countable set is countable, and I know how to prove that by using the axion of countable choice. The problem is that $\prod_{1}^{\infty} \mathbb{N}$ is not countable, and I don't know how to get rid of the problem.


How would you prove that A \ (A \ B) = A ∩ B is true for all sets A and B?

I know how to prove this using a picture of a venn diagram but I am getting stuck solving it using letters.  This is what I've tried:  Let x $\in$ A $\setminus$(A$\setminus$B)  x $\in$ A such that x $\notin$ B  x $\in$ A such that x $\notin$ A  Therefore x $\in$ A $\cap$ B  I feel like there are some steps before the last one that I'm missing  Any help is appreciated


If I want to draw an overline over some text, not an equation, how can I do it? \overline seems to only work in math mode, and when used outside of math mode, it automatically says "Missing $ inserted".


Prove that $\limsup(a+b) \leq \limsup(a) + \limsup(b)$ and $\liminf(a+b) \geq \liminf(a) + \liminf(b)$

Prove that $$\limsup(a+b) \leq \limsup(a) + \limsup(b)$$ and $$\liminf(a+b) \geq \liminf(a) + \liminf(b)$$ where $a,b:\mathbb{N}\to \mathbb{R}$ are two bounded sequences.  I'm not sure where to begin on this proof.


command/object option window - how to recover

The small window which opens up when i execute a command goes off if i click anywhere else in the window and is not recoverable (screenshot attached). how can i get this back.


Why don't mirrors violate conservation of momentum/do they get warm?

Imagine you have a photon with momentum $p$ which hits a mirror $M$ and is reflected back. Since $M$ is at rest in your frame of reference the total momentum of the system pre-reflection is $p$ and post reflection is $-p$. This seems quite odd to me and a clear violation of conservation of momentum. How this can be resolved: The mirror begins to move/absorbs some momentum after being hit by the photon, but if the photon was reflected with momentum $p$ then we end up having conservation of kinetic energy being violated. The only conclusion that's reasonable is the photon being reflected back has a different (probably lesser) momentum after hitting the mirror and the mirror then picks up some positive momentum, so that the sum of the momenta remains constant and the sum of their kinetic energies remains constant. Is this actually what happens? And if so does that mean that almost all mirrors are heating up when they are reflecting photons?


I am a student from Poland. I am bachelor in Economics and Logistics and now I am doing my Masters from Econometrics. I have quite good achievements (1-year scholarship in Japan, ambassador program for a big NGO, few wins or good places in the contests etc). I am also waiting for publishing my first research paper and plan to do 2 more untill I will graduate.   There is one problem though. My GPA is not very good. It's a combination of 3 varriables. First, on the beggining of my studies I planned to go to bussiness rather then academic work. Second I have a mild/average form of brittle bone disease which result of having to take 3 years of medical leave (not at once). And sometimes in cases when the injury was not to bad (for example 2-3 months) i tried to make up the classes and I left deciding that i rather not lose another year and pass on B- or C then to go the other way. Third factor is the fact that going from economics to very math-based field as statistics and econometrics is not easy. I am managing this but with having to make up the material from bachelor's in this field it's rather B on average then straight A.   I love to do the research, and to analise data. My papers and articles are usually recieved as really good. And I would love to be able to get to one of top 100 Universities for a PhD program. Is there a chance if I would have a good Master's thesis, nice GRE/TOELF score and 3 academic papers?   I would be gratefull for all the answers :)


Got a tag badge — but have not earned it yet

This morning I got the silver  badge :            ...        Unfortunately, I haven't earned this particular badge yet. I have 318 votes on 124 answers. Then wondered if  had synonyms, like  and so on, but this is not the case — and even if it was, I should have got the badge for some time already.  I saw this old question, back from Jan 2011 ->  - the "official" statement to this old question was :       Our tag storage is denormalized, we have a second table that stores the a postId -> tagId list. For some reason we had a few dupes in there (probably cause android was merged with android-sdk).      That had a cascading effect that caused some tag badges to be assigned early.      I just added a primary key constraint on the denormalized table, so there is no chance of dupe rows anymore.   This bug seems not to completely have been wiped out, perhaps it has returned — in any case, something does not seem completely right. I got an upvote on the  tag yesterday, forcing the system to recalculate, this is the right part.


Association between categorical and continous variables

I know this question is already there in stack exchange. But I still do not understand it. So far I would bin my continuous variable if my target is discrete and find the correlation between them using Cramer's V-test.But how do I find strength of association between continuous variable and discrete variable in python?


Trying to update a wpf gui element from another class

Hi I am trying to update a label in my WPF GUI from another class, which is not the GUI with this code:   System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke(new Action(() =>       {          ((MainWindow)System.Windows.Application.Current.MainWindow)              .lblError.Content = exception.Message;       }));   Sometimes however I get the following exception and the update does not work:     Exception thrown: 'System.InvalidOperationException' in   WindowsBase.dll (" The calling thread can not access this object   because the object is owned by another thread .")   Why does my delegate not work? Is there an easy way to do what I want to do (update a label of my GUI from another class) without too much effort?


When trying to install CrossOver deb I get "Error: Dependency is not satisfiable libpng12-0"

I have tried to install libpng12-0 but it still doesn't work.  Here:    How do I fix this?


How do I count all the files recursively through directories

I want to see how many files are in subdirectories to find out where all the inode usage is on the system. Kind of like I would do this for space usage  du -sh /*   which will give me the space used in the directories off of root, but in this case I want the number of files, not the size.


Why does the bounty notification seem like a question has answers when there aren't any answers?

Recently, I activated a bounty of 100 on one of my questions. The bounty grace period has now ended. Here is a link to my question: . The notification of bounty appears as given below:    My question still not has received any kind of answer from anyone. Then why does this message or notification appear?  Award this bounty to the best answer as soon as possible.    This question is entirely different from the suggested answers. This notification is clearly a bug that is to be fixed according to this answer .


Below is a chart which shows traffic from Google for a new website. What could be the reason for those dynamics: fast growth and slow decline?


effect of knowing birthday of one person and the gender on probability of the second gender

Consider there are two applicants for a job. One of the applicants is a man, and it is known that he was born on a Wednesday. What is the probability that the second applicant is also a man? (I am  sure its not 1/2)


I have class date which just simply creates an arrayList of days of the week.  import java.util.*;  public class Date {      public static final String[] daysofTheWeek = {"Mon" , "Tue" , "Wed" , "Thurs" , "Fri" , "Sat" , "Sun"};     private String dayofweek;     private int day;     private int month;      public int getDate() {         return this.day;     }      public int getMonth() {         return this.month;     }      public Date(String dayofweek, int day, int month) {         this.day = 1;         if (day >= 1 && day <= 31) {             this.day = day;         }          this.month = 12;         if (month >= 1 && month <= 12) {             this.month = month;         }          this.dayofweek = "Mon";         if (isValidDOW(dayofweek)) { // why is this in the parameters?             this.dayofweek = dayofweek;         }     }      // must validate is DOW      //  TRUE/FALSE is the day of the week matching?     public boolean isValidDOW(String d) {     for (int i = 0; i < dayofweek.length(); i++)         if (d.equals(daysofTheWeek[i])) { // why i?             return true;         }         return false;     }      // to string     public static String monthToString(int i) {         switch(i) {             case 1: return "January";             case 2: return "Feb";             case 3: return "March";             case 4: return "April";             case 5: return "May";             case 6: return "June";             case 7: return "July";             case 8: return "August";             case 9: return "September";             case 10: return "October";             case 11: return "November";             case 12: return "December";             default: return "Invalid Month!!";         }     }      public String toString() {         return this.dayofweek + "," + Date.monthToString(this.month) + " " + this.day;     }      public String getDayOfWeek() {         return this.dayofweek;     } }   Now I am trying to get all days ( Say, return number of times sundays pop up). I tried using a loop to go through and count everything, but I am getting a null pointer exception. I've been looking at this for a while, and can't figure out whats wrong with it. Can anyone guide me in the right direction?  import java.util.*; /**  * ArrayList example  */ public class Calendar {      private ArrayList<Date> Schedule;      public ArrayList<Date> sundays(String dayofweek) {         ArrayList<Date> app = new ArrayList<Date>();         for (Date entry : Schedule) {             String d = entry.getDayOfWeek();             if (entry.getDayOfWeek() == dayofweek) {                 app.add(entry);             }             else if (app.size() == 0) {                 return null;             }         }         return app;     } }


I live in Sydney and I have bought a flight from Sydney to Christchurch - New Zealand next month. The company is China Airlines (CI) and I got concerned when I saw some lists considering it the least safe airline company, but I also have heard they improved in this aspect.  The aircraft is the A330-300. I checked the possibility of changing to Qantas and it would cost me 1500 dollars (almost one month of work)  Do you think I should change or CI is considered safe today?


changing pseudo tty echo mode from the master side

On linux, I am opening a pseudo tty on the master side. While there is no client on the slave side, the pseudo tty seems to be echoing everything I am writing to him, which is not what I am expecting. Consider the folowing code :  int  main(int argc, char * argv[]) {     int ptyfd;     int rc;     /* return code */     char readbuf[3];     ptyfd = open("/dev/ptmx", O_RDWR | O_NOCTTY);     die_on_error(ptyfd, "open ptmx");      /* unlock and print slave name */     rc = unlockpt(ptyfd);     die_on_error(rc, "unlockpt");     printf("Slave pts name : %s\n", ptsname(ptyfd));      write(ptyfd, "C", 1);     rc=read(ptyfd, readbuf, 1);     die_on_error(rc, "read");     printf("read returned %c\n",readbuf[0]);     return 0;    }   When I run this program, I would expect the read call to block, but instead it immediately returns and the readbuf content is C. How can I change this behaviour ? When the slave side is not opened, I would like the character written on the master side to either vanish or be fifoed for later reading by the slave side.  Is changing the master side attributes the right way to do it ?


If a choice structure satisfies WARP, then the underlying binary relation is rational.

Would you please help me to prove the following proposition:  If $(P(X), c_R)$ is a choice structure that satisfies WARP, then $R_c$ is a rational binary relation?  Clarification:   For any nonempty set $X$, let $P(X)$ denote the set of all nonempty subsets of X.  For any nonempty subset $B$ of $P(X)$, a function $c: B \rightarrow P(X)$ is called a choice function iff $c(A) \subset A$ for all $A \in B$. The pair $(B, c)$ is called a choice structure. For any binary relation $R$ on $X$, define the function $C_R : P(X) \rightarrow P(X) \cup \{\emptyset\}$ as follows: $$C_R (A) = \{x \in A : ( \forall y \in A ) ( xRy ) \}.$$ Weak Axiom of Revealed Preference (WARP): $c(A) \cap B \neq \emptyset \Rightarrow c(B) \cap A \subset c(A)$.


I saw this exercise in "" by E. H. Connell:  Suppose $G$ is a group. Suppose $T$ is an index set and for each $t \in T$, $H_t$ is a subgroup of $G$. Furthermore, if $\{H_t\}$ is a monotonic collection, show that $\bigcup_{t \in T} H_t$ is a subgroup of $G$.  Suppose "monotonic" is defined as follows:  For arbitrary $k$, $l \in T$, either $H_k \subseteq H_l$ or $H_l \subseteq H_k$ (or both).   Then here is my proof:  Suppose $a$, $b \in \bigcup_{t \in T}H_t$, then $a \in H_k$ for some $k$ and $b \in H_l$ for some $l$. So either $a$, $b \in H_k$ or $a$, $b \in H_l$ (or both). Then either $a \cdot b \in H_k$ or $a \cdot b \in H_l$ (or both). Hence $a \cdot b \in \bigcup_{t \in T}H_t$. Therefore $\bigcup_{t \in T}H_t$ is a subgroup.  My question is:   Is the above proof correct? I think it looks too trivial. In my opinion, if you have a monotonic collection of sets, all satisfying certain criterion, then "obviously" the union also satisfies that criterion. Can someone give a counter-example?


I have an array declared like this float dati[10];  I normally subscript the array like as follows dati[2] = 5;  But i have also seen other types of substriptions like 2[dati] = 5;  and *(dati+2) = 5;  Can anyone tell me what's the difference between these three?


Order of the product of two commuting elements with coprime orders in a group.

I want to show that if $g,h\in G$ are group elements with finite coprime orders $m$ and $n$ and $gh=hg$ then the order of $gh$ is $mn$.    We have that  $$ (gh)^{mn}=g^{mn}h^{mn}=1 $$  using $gh=hg$, so $|gh|\leq mn$. On the other hand, $mn=\operatorname{gcd}(m,n)\operatorname{lcm}(m,n)=\operatorname{lcm}(m,n)$, since $m$ and $n$ are coprime. I am not sure how to proceed, I tried assuming that $|gh|<mn$ and arriving at a contradiction, but it did not take me anywhere.


Difference between light and emission shader

I got rectangle light source on the right and face with emission shader on the left. Viewport is set to "rendered" mode. As i understand on the right the light is visible, but it's source - is not. On the left - vice versa. How can i get both parameters visible?


How can I change the length of photos in iMovie '13?

I'm trying to make a simple iMovie time lapse video and it's my first time trying to iMovie '13. I have photos that I would like to change the duration of, only when I click the info icon there's just an image of a clock and no option to change the duration, which is how I've been directed on every other forum, only the option just isn't there. Any other ideas on how to change the time length of multiple photos at once?


What is the voltage range of a standard headphone jack from a phone?

I want to connect the output from the audio jack of an iPhone to an Arduino.  What voltage range can I expect to see on the audio lines from the iPhone? I assume that turning the volume up on the phone will produce a large AC voltage, but how large does it go up to?  I want to make sure that it wont exceed the voltage level that an Arduino can read on its input pins. Will I need to provide any circuitry between the iPhone and the Arduino?


What clipboard manager can be used for Ubuntu 12.04 64 bit Unity? I tried  and  - both not working.  remains invisible,  crashes.


iOS Safari Repeatedly Opens "Virus Detected" Emails

On my iPad 2 (running iOS 9) there's a "Virus Detected" email popping up that I can neither delete or change. No matter what I do, the "Virus Detected" email keeps opening on my screen whenever I attempt to use Safari.  I've attempted to delete the email, change the email and to close Safari but the email keeps returning and makes using the browser impossible. I have no intention to either call the provided phone number or sending this email as it directs me to do. The email is as follows:  To: foo@example.com  Subject: Warning! Virus Detected! Immediately Call Apple Support +1-800-876-6855. Your credit card details and banking information. Your e-mail passwords and other account passwords.Your Facebook, Skype, AIM, ICQ and other.Call Apple Support +1-800-876-6855. Your private photos, family photos and other sensitive files.Your webcam could be accessed remotely by stalkers with a VPN virus.  CC: bar@example.com  Message: Apple Tech Support  How do I remove this email and regain access to my browser?


What does this symbol for asymptotic growth mean?

In  on page 3 I find the following relation (eq. 1.1):   I tried detexify to identify the latex code for this symbol and work from there, but no success. What does this symbol mean?


manuscript status changed from awaiting reviewers scores to awaiting editor decision

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?


Linux to Windows: x86_64-w64-mingw32-gcc will not compile a 64-bit executable, how can I resolve this?

I am using Debian 9 (stable) and I recently decided to install mingw-w64 so that I could do cross platform C/++ development since I don't have consistent access to a Windows machine. When I had first installed it a couple days ago to test out doing 32 and 64-bit builds, it seemed to work but now the 64-bit command (x86_64-w64-mingw32-gcc) seems to only put out 32-bit executables despite the fact that it should only put out 64-bit by default. I even explicitly declared the options -m64 and -march=x86_64 in an attempt to force it, but it seems like no matter what I try now it will only do a 32-bit build.  For reference, all the code consists of is three files: hello.c, hellofunc.c, and hellofunc.h. The file hello.c simply calls a function defined in hellofunc.c called printHelloWorld:  void printHelloWorld(void){     long z;      printf("Hello World!\n");      switch(sizeof(z)){         case 4:             printf("This program is 32-bit\n");             break;         case 8:             printf("This program is 64-bit\n");             break;         default:             printf("This program is of unknown bit size\n");     }       printf("Long int size is %i bytes long!\n", sizeof(z)); }   With the expected output being "This program is 32-bit" or 64-bit, with an explicit statement showing the byte length of a long variable. The problem I am having is that despite the fact that the 64-bit mingw-w64 gcc command is being used, when I do test it on Windows it will display the 32-bit message and a byte length of 4 instead of the expected 8.  Again, when I initially tested it right after download it worked as expected and I have no idea what could have changed the default functionality of it over the last couple of days- I didn't install anything new, and all I was doing was trying to work with makefiles (this directory does not contain one though). Also, for the record, the default gcc native to my Debian system works perfectly well with the -m32 and -m64 commands so it's not like my system isn't capable of it and... in fact, if anything, I would expect the behavior to be backwards as Linux seems to require special set-up to do 32-bit builds or run 32-bit programs on a 64-bit machine.  For the last attempt to understand the problem myself I ran the command x86_64-w64-mingw32-gcc -v -o hello.exe hello.c hellofunc.c -I . so that I could get the full command sequence of the compiler, and I also ran gcc on it as well.  is the full output I put on pastebin just for reference. I don't 100% understand the output, but it seriously looks like all the configuration and options should be outputting 64-bit?? I don't know, I'm still pretty new to Linux and still don't entirely understand how to dissect when something goes wrong- especially when something runs counter to the explicitly defined functionality lol.  If somebody could recommend possible fixes for this or alternatives I probably didn't think of, I would really appreciate. I tried Googling for answers before hand, but x86_64-w64-ming32-gcc seems to only ever come up in conversation to tell newbies that it's the obvious default way to compile for 64-bit architecture.  Thanks for reading and any help you can give, cheers~


I am trying to select a host for my Node.js applications. They are low-traffic applications - I expect an average of 1-2 hours of use per day, so I am looking for a package where I can pay per use only. But I am confused by the different pricing schemes of price per month vs. price per hour - I am not sure which price takes effect when.  For example, DigitalOcean FAQ says that: "If you use your server for less than 672 hours during the month, you will be billed for each hour that you used it. If you use your server for more than 672 hours that month, you will be billed at the monthly cost".  But on the other hand, in the next question they say: "Am I charged while my Droplet is in a powered-off state? - Yes. Your diskspace, CPU, RAM, and IP address are all reserved while your Droplet is powered off".     If I understand this correctly, this means that, even when no one enters my website, they charge me as if I do use the site.  As another example, AtlanticNet says that: "With per-second billing, you only pay for what you use" ... "Monthly pricing based on average use.". If I understand this correctly, this means that the only effective price is price per hour, and I pay only per actual use.  So, my question is: if my Node.js application is always on and waiting for users, but users use it only 1 hour per day, how much will I pay? Will I pay for an entire month, or only for 30 hours?


How to solve for matrix of the linear transformation?? (Coordinates)

Apologies for a simple question but my textbook is horrible. I don't seem to understand what this notation means.   $$ \left[     \begin{array}{c} T     \end{array} \right]_b^a $$  I was looking online for resources to help me understand and found the following question:   Suppose a basis for V = R3 is the set C = {(1, 0, 0), (1, 1, 0), (1, 1, 1)}. And the coordinate vector of an element (x, y, z) is $$ \left[     \begin{array}{c} x-y\\ y-z\\ z     \end{array} \right] $$  How would you get the matrix representation of T. The solution is   $$ \left[     \begin{array}{c} 3&4&4\\ 1&1&2\\ 1&1&0     \end{array} \right] $$  but I don't seem to understand how to get there so can someone provide a brief explanation of what is going on?


What is exactly/literally meant by observing in Schrodinger's cat thought experiment?

As far as I know, Erwin Schrodinger used this thought experiment to show the absurdity of the interpretation of the quantum mechanics.  But many times I encounter on web even famous physicists say things like "When we observe this happens and we do not observe this does not happen ..."  But in the experiment there is a box and a cat inside. What is meant by "observing" here?  Does that mean looking at the box just by opening our eyes? Or does that mean opening the box? What if a blind person opens the box? What interaction causes here to collapse the wave function? What does that to do with "looking"? I don't understand what they mean by "looking" and "observing" in this context...  I'm asking this because some relate this experiment to consciousnesses.


I am setting different RadioGroup like this:  fragment.setT1RadioGroup((RadioGroup)fragView.findViewById(rowids[0]).findViewById(R.id.t1_radiogroup)); fragment.setT2RadioGroup((RadioGroup)fragView.findViewById(rowids[1]).findViewById(R.id.t1_radiogroup)); fragment.setT3RadioGroup((RadioGroup)fragView.findViewById(rowids[2]).findViewById(R.id.t1_radiogroup)); fragment.setT4RadioGroup((RadioGroup)fragView.findViewById(rowids[3]).findViewById(R.id.t1_radiogroup)); fragment.setT5RadioGroup((RadioGroup)fragView.findViewById(rowids[4]).findViewById(R.id.t1_radiogroup)); fragment.setT6RadioGroup((RadioGroup)fragView.findViewById(rowids[5]).findViewById(R.id.t1_radiogroup)); fragment.setT7RadioGroup((RadioGroup)fragView.findViewById(rowids[6]).findViewById(R.id.t1_radiogroup)); fragment.setT8RadioGroup((RadioGroup)fragView.findViewById(rowids[7]).findViewById(R.id.t1_radiogroup)); fragment.setT9RadioGroup((RadioGroup)fragView.findViewById(rowids[8]).findViewById(R.id.t1_radiogroup)); fragment.setT10RadioGroup((RadioGroup)fragView.findViewById(rowids[9]).findViewById(R.id.t1_radiogroup));   For refactoring purpose could I reduce the size of this code? How?


Do these define metrics on $\mathbb{R}$?

Which of the following define a metric on $\mathbb{R}$?   $$d_1(x,y) = \frac{\bigl||x|-|y|\bigr|} {1+|x||y|},$$ $$d_2(x,y) = \frac{\bigl||x|+|y|\bigr|} {1+|x||y|}.$$   I think that both option 1 and option 2 are true as both satisfy the triangle inequality and symmetry property. Am I right?


I am going to be visiting Europe this July specifically the countries of Sweden (4-5 days), Italy (6 days), Malta (1 day) and Switzerland (3 days). I had originally booked my visa appointment at the Sweden Embassy since that's my point of entry (and I have a round trip from the USA to Stockholm planned). However, I think I may end up spending more days in Italy. Now, it looks like the Italian embassy has NO visa dates until July! What I want to know is whether the embassy only needs to know you're exiting the Schengen area for sure in order to issue a visa or whether there will be issues that I'm getting a visa from Sweden when I'm spending more days in Italy. I am an F1 student in the USA with an Indian passport.


LED : calculation of optical power[mW] from luminous intensity[mcd]

I have an application with LED with given optical power. I found on ebay some LEDs but it appears just intensity [mcd] How can I determine optical power of LEDs in mW ?? Please, mention some clues. link with characteristics of LEDs, below :


Bulk image format conversion from from .bmp to .jpg via command line?

My screen capture program saves .bmp images, which are not usable in Google Docs, which will accept .jpg  Is there a clever way to create a set of .jpg from the .bmp files via the command line?  Bonus for use of a command that is native to Ubuntu install.  If not, please communicate line of reasoning for selecting software.  Thank you


Can I create a 3D model in QGIS or is there some model for 3D city models?


How to prove: if $f$ is continuous on $[a,b]$, then $f$ is bounded on $[a,b]$

How to prove this statement use the most simple way:  if $f$ is continuous on $[a,b]$, then $f$ is bounded on $[a,b]$


I saw it in "Jurassic park" movie. Character of Sam Jackson says "Vehicle headlights are on and not responding. Those shouldn't be running off of car batteries".


How to disable new paragraph at empty line?

With the goal of making the latex source easier to parse, I was wondering if one could (locally or globally) disable the latex default behaviour of creating a new paragraph when it encounters an empty line.  Obviously, I can always just put a % on empty lines when I don't want a paragraph. Nevertheless, I was wondering if there is a different solution.  Finally, I would also like to know if such an alternative solution would be considered good form or not.


Cannot filter new users by creation date on mobile web

Steps to repro:   Navigate to any Stack Exchange site -> Users -> show new users. Attempt to change the filter from "reputation" to "creation date." Observe that the filter link changes to "creation date" for a split second and then returns to "reputation" without reloading or filtering any of the users.   I would expect to be able to filter new users by reputation on mobile web.   Device: iPhone 6 OS Version: Version 9.1 (Build 13B143)


Loophole? I'm getting 2 different answers when solving a differential equation in 2 different methods

I was trying to evaluate $ {\int_0^{\infty}\frac{\cos (x)}{1+x^2}}\text{d}x$ by Feynman's trick  It has been , but I have a specific question at one of the steps while doing it. (Not a duplicate) (My question is about why I get 2 different results when solving it in 2 different methods in a particular step.)  So I defined $I(t)= \int_0^{\infty}\frac{\cos (xt)}{1+x^2}\text{d}x$  and arrived at $I(t)= I''(t)$  so this means   $I(t) = \alpha e^t + \beta e^{-t}$  Method 1:  $I(0) = \alpha  + \beta $  and from the integral $I(0) = \int_0^{\infty}\frac{1}{1+x^2}\text{d}x$ = $\frac{\pi}{2}$  so $\alpha  + \beta = \pi/2 \tag1 $ and $I'(t) = \alpha e^t -\beta e^{-t}$, so $I'(0) = \alpha  -\beta $  from the integral $I'(t)= \int_0^{\infty}\frac{-x \sin (xt)}{1+x^2}\text{d}x$   so $I'(0)= 0 $  $\alpha - \beta = 0\tag2$  By (1) and (2) we get $$\boxed{I(t) = \frac{\pi}{4}e^t + \frac{\pi}{4} e^{-t}}$$    Method 2:  $I(0) = \alpha  + \beta $  and from the integral $I(0) = \int_0^{\infty}\frac{1}{1+x^2}\text{d}x$ = $\frac{\pi}{2}$  so $\alpha  + \beta = \pi/2 \tag3 $  $I(t)= \int_0^{\infty}\frac{\cos (xt)}{1+x^2}\text{d}x$  using integration by parts, $$u=\frac{1}{{{x}^{2}}+1}\quad,\quad dv=\cos tx$$ we have $$I(t)=\frac{\sin (t x)}{t({{x}^{2}}+1)}\left| \begin{matrix}    \infty   \\    0   \\ \end{matrix} \right.+\frac{2}{t}\int_{0 }^{+\infty }{\frac{x\sin (t x)}{{{({{x}^{2}}+1)}^{2}}}}\,dx $$ as a result $$I(t )=\int_{0}^{\infty }{\frac{2}{t} \frac{x\sin tx}{{{({{x}^{2}}+1)}^{2}}}\,}dx \,$$  As t tends to infinity we can see I(t) will tend to 0, which should mean $\alpha$ is 0, or else it will exponentially increase.  So now we get $$\boxed{I(t) = \frac{\pi}{2e^t}}$$    What's going wrong? Both seem valid and correct. This seeming loophole has been annoying me for a long time


I am not so very familiar with the mathematics of modules over rings. I heard of them as a generalization of vector spaces with a ring instead of a field. I also heard of them as providing many pathological examples when thinking in the familiar term of vector spaces (there was an MO thread discussing examples, but I cannot find it). E.g. I learned that an $R$-module (over some ring $R$) does not necessarily have a basis, even though it has independent and generating sets. My immediate next question then was:     Question: Can an $R$-module have bases of different cardinality?   I am especially interested in different finite cardinalities. Can you give me an example of such a module? Or is it that the dimension of an $R$-module (if at all) can be still defined uniquely?


How to rotate around shifter center precisely in Illustrator?

If I select Rotate tool, I can select center of rotation then and move it. After that I am able to rotate object around that center. But this rotation is imprecise. Suppose I want to rotate for 120 degrees. I can double click on Rotate tool and get Rotate dialog, where I can enter precise value in degrees. But this way I can't use shifted center of rotation because it jumps back to geometric center at the moment I call Rotate dialog.  Is it possible to rotate by precise angle with dialog and have shifted center of rotation.


How to Recover Data in LINUX MINT Quiana

Can I recover deleted files in LINUX MINT 17 Quiana. I have deleted my folder containing data with shift+delete. Now, I want my data back.


Is there a Lorentz invariant approximation to General Relativity?

Since General Relativity is the most accurate description of gravity is there any possible way to derive a Lorentz invariant theory from: $$R_{\mu\nu}-\frac{1}{2} g_{\mu\nu}R+\Lambda g_{\mu\nu}=kT_{\mu\nu}$$  Assuming the metric is in the form: $g_{\mu\nu}=\eta_{\mu\nu}+h_{\mu\nu}$ where $\eta_{\mu\nu}$ is the flat space time metric and $h_{\mu\nu}$ is a disturbance in the metric.   If there is a derivation for a Lorentz invariant theory, what would each component of the metric correspond to?  Thanks


Gaussian Prime must have size $p$ or $p^2$

Chapter 38 of Mazur and Stein's "Prime Numbers and the Riemann Hypothesis" asks us to prove that if a Gaussian integer is a prime Gaussian integer, then its norm can only be an "ordinary prime number, or the square of an ordinary prime number". $$|G_{\text{prime}}|=p \text{ or } p^2 $$ I have researched other questions and answers on this site and via google but cannot find a simple explanation that I can understand. I'd appreciate an answer that avoids too much terminology. For example, this answer is not clear enough for me as someone not formally trained in mathematics:  Note: the system suggests this is answered here, but the answer doesn't meet the request here for a accessibility to those without formal mathematics training:


Good First Course in real analysis book for self study

Does anybody know of a good book in real analysis for self study for a beginner? What about Analysis 1 by Terence Tao?


Formula for number of 6 letter words from English alphabet if there is repetion and ordering

Is there a formula or method to find the number of 6-letter words from the English alphabet if repetition is allowed, but they must appear in alphabetical order?   Type what you know about how many words there'd be if they didn't also need to be in alphabetical order...  Limitless repetition however ordering wasn't specified. I'm so confused as to how to combine the formula for repetition and ordering.  I know the number six letter words that do not have to appear in alphabetical order would be $26^6$.  But when I try to count only those words that are alphabetically ordered, I get stuck.


The following question is from Lundell’s book:  Let $X$ be a finite CW complex.  For every $i$, let us suppose that $dim_{F_p} H^i (X,F_p)$ is independent of the choice of prime number $p$, where $F_p$ denotes the finite field.  Prove that $H^i (X,Z)$ is free for all $i$, where $Z$ denotes the set of all integers.  Now, I know the universal coefficient theorem and cellular chain complex should be used,  but I am not sure how to progress the proof.  How can one prove the following using UCT and ccc.


Attempt To De-reference a Null Object on a Before Trigger

I am trying to a write what should be a pretty simple trigger to compare an old score with a new score and increment a variable based on the difference. The default field values are set to 0. I thought this would help me get around these sort of null pointer exceptions. The error says it located at line 19. This con.Email_Opens__c = con.Email_Opens +1;  Thank you for any help with this.   trigger ClicksAndOpens on Contact (before update) {  for(Contact con  : Trigger.new){     //Get old Pardot Score     Contact oldCon = Trigger.oldMap.get(con.Id);    //set variables to hold old contact and new contact      Double oldConValue  = oldCon.pi__score__c;     Double newConValue = con.pi__score__c;       //add if statement for null pointer value     if(oldConValue == null){         oldConValue = 0;     }      system.debug('old Pardot score = ' + oldConValue + 'new pardot score = '+ newConValue);     //determine value of change     if(newConValue - oldConValue == 1){         con.Email_Opens__c = con.Email_Opens__c + 1;         system.debug('Email opens: ' + con.Email_Opens__c);     }else if(newConValue - oldConValue >= 4){                 con.Email_Opens__c = con.Email_Opens__c +1;                 con.Total_Clicks__c   = con.Total_Clicks__c  + 1;      }              }


How to generate all possible Venn diagrams (with the case below) efficiently?

but now my question is more complicated than just drawing Venn diagrams one by one. I need to draw all possible Venn diagrams efficiently. I need a combinatorical approach because there are 256 combinations.  Let's choose the following sets  as the case to consider. The binary number labels are used to uniquely identified each "atomic" region. My definition: An atomic region does not contain any smaller region.  Because there are 8 atomic regions, each can be either selected or not to compose a new compound region. Therefore there are 2^8 ways.  How to generate all possible Venn diagrams (with the case above) efficiently?    The objective is to produce 256 Venn diagrams, each diagram has a unique colored compound region that has an associated set operation.   Let's use 8-bit integer to represent each diagram.  The first bit (the most left bit or the most significant bit) represents the region 000.  The second bit represents the region 100.  ...  The least significant bit represents the region 111.  Bit 0 represent not-join to produce a new compound region. And 1 otherwise.  If the first diagram with the complement of AuBuC then its binary representation is 1000 0000. 1111 1111 represents S. Etc etc etc!  The Problem Sheet  The problem sheet will ask the student to find a set operation (not necessarily unique) for each RED COMPOUND region in each diagram below.      ...


Proof that $\tan(\sin x) > \sin(\tan x), x \in (0, \pi/2)$

Assuming $x \in (0, \frac{\pi}{4})$ Write down a proof that $F(x) > 0 $ for all $x$'s where $F(x) = \tan(\sin x)-\sin(\tan x)$.  All I came up with was using Jensen inequity for 1st derivative using $F(x) = \log(\cos x)$ and $\alpha_1 =\alpha_2 = \alpha_3 =  \frac{1}{3}$ and gaining $3\log(\cos(2\sin x\cdot \tan x)) \geq 2\log(\cos(\sin x)) + \log(\cos(\tan x))$ but what I need to gain is this inequality: $3\log(\cos x) \geq \leq 2\log(\cos(\sin x)) + \log(\cos(\tan x))$ Any hint would be helpful:p


Why is $5^{n+1}+2\cdot 3^n+1$ a multiple of $8$ for every natural number $n$?

I have to show by induction that this function is a multiple of 8. I have tried everything but I can only show that is multiple of 4, some hints? The function is $$5^{n+1}+2\cdot 3^n+1 \hspace{1cm}\forall n\ge 0$$, because it is a multiple of 8, you can say that$$5^{n+1}+2\cdot 3^n+1=8\cdot m \hspace{1cm}\forall m\in\mathbb{N}$$.


Is there a function in Common Lisp that takes a string as an argument and returns a keyword?  Example: (keyword "foo") -> :foo


What happens when the centripetal force is equal and opposite to the centrifugal force?

We say that centrifugal force is fictitious, yet we still use it in some problems. If the centrifugal force is equal and opposite to the centripetal force wouldn't that make the net force zero?


Which one is grammatically correct sentence and why?

1.He discussed murder case with his wife .    2. He discussed the murder case with his wife.        3. He discussed a murder case with his wife.


Are we certain that quantum computers are more efficient than classical computers can be built?

I mean are we certain that they will be able to provide us a huge improvements (in some tasks) compared to clasical computers?


What changed in the Hot Questions sidebar algorithm?

I've recently noticed that the hot questions list is now different almost every time I look at it. It used to be static - I.e. I could browse around for half an hour and the items on it would be minimally changed.  Was the algorithm changed? In what way?