-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nachiketa Vadera <[email protected]>
- Loading branch information
Nachiketa Vadera
committed
Jul 10, 2018
1 parent
04385ea
commit 52e9cad
Showing
7 changed files
with
168 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
app/src/main/java/android/nachiketa/ebookdownloader/AndroidReadWrite.java
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
app/src/main/java/android/nachiketa/ebookdownloader/Global.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package android.nachiketa.ebookdownloader; | ||
|
||
import java.io.BufferedReader; | ||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.io.InputStreamReader; | ||
import java.util.Random; | ||
|
||
public class Global { | ||
|
||
public String getRandomQuote() throws IOException { | ||
Random random = new Random(); | ||
StringBuilder builder = new StringBuilder(); | ||
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("res/raw/quotes.txt"); | ||
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); | ||
String line; | ||
while ((line = bufferedReader.readLine()) != null) { | ||
builder.append(line); | ||
} | ||
int randomNumber = random.nextInt(37); | ||
String[] temp = builder.toString().split("~"); | ||
return temp[randomNumber]; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
“Why? It's an excellent question. But an even better one is... Why not?” - Lara Whatley | ||
~ | ||
“Don't cry because it's over, smile because it happened.” - Dr. Seuss | ||
~ | ||
“Be yourself; everyone else is already taken.” - Oscar Wilde | ||
~ | ||
“Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.” - Albert Einstein | ||
~ | ||
“So many books, so little time.” - Frank Zappa | ||
~ | ||
“To live is the rarest thing in the world. Most people exist, that is all.” - Oscar Wilde | ||
~ | ||
“Without music, life would be a mistake.” - Friedrich Nietzsche | ||
~ | ||
“We accept the love we think we deserve.” - Stephen Chbosky | ||
~ | ||
“Insanity is doing the same thing, over and over again, but expecting different results.” - Narcotics Anonymous | ||
~ | ||
“The person, be it gentleman or lady, who has not pleasure in a good novel, must be intolerably stupid.” - Jane Austen | ||
~ | ||
“Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read.” - Groucho Marx | ||
~ | ||
“I have always imagined that Paradise will be a kind of library.” - Jorge Luis Borges | ||
~ | ||
“Never trust anyone who has not brought a book with them.” - Lemony Snicket | ||
~ | ||
“A day without sunshine is like, you know, night.” - Steve Martin | ||
~ | ||
“I love deadlines. I love the whooshing noise they make as they go by.” - Douglas Adams | ||
~ | ||
“Women and cats will do as they please, and men and dogs should relax and get used to the idea.” - Robert A. Heinlein | ||
~ | ||
“All you need is love. But a little chocolate now and then doesn't hurt.” - Charles M. Schulz | ||
~ | ||
“I find television very educating. Every time somebody turns on the set, I go into the other room and read a book.” - Groucho Marx | ||
~ | ||
“I solemnly swear that I am up to no good.” - J.K. Rowling | ||
~ | ||
“Some infinities are bigger than other infinities.” - John Green | ||
~ | ||
“Some people never go crazy. What truly horrible lives they must lead.” - Charles Bukowski | ||
~ | ||
“Time you enjoy wasting is not wasted time.” - Marthe Troly-Curtin | ||
~ | ||
“Reality continues to ruin my life.” - Bill Watterson | ||
~ | ||
“The only way out of the labyrinth of suffering is to forgive.” - John Green | ||
~ | ||
“Go to heaven for the climate and hell for the company.” - Benjamin Franklin Wade | ||
~ | ||
“You don’t forget the face of the person who was your last hope.” - Suzanne Collins | ||
~ | ||
“I am free of all prejudice. I hate everyone equally. ” - W.C. Fields | ||
~ | ||
“′Classic′ - a book which people praise and don't read.” - Mark Twain | ||
~ | ||
“What a slut time is. She screws everybody.” - John Green | ||
~ | ||
“The marks humans leave are too often scars.” - John Green | ||
~ | ||
“I have never let my schooling interfere with my education.” - Mark Twain | ||
~ | ||
“And, when you want something, all the universe conspires in helping you to achieve it.” - Paulo Coelho | ||
~ | ||
“We believe in ordinary acts of bravery, in the courage that drives one person to stand up for another.” - Veronica Roth | ||
~ | ||
“A lady's imagination is very rapid; it jumps from admiration to love, from love to matrimony in a moment.” - Jane Austen | ||
~ | ||
“Some day you will be old enough to start reading fairy tales again.” - C.S. Lewis | ||
~ | ||
“Books are a uniquely portable magic.” - Stephen King | ||
~ | ||
“Have you ever noticed how ‘What the hell’ is always the right decision to make?” - Terry Johnson |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters