-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe30cf8
commit 1ed9a02
Showing
38 changed files
with
176 additions
and
2,395 deletions.
There are no files selected for viewing
Binary file not shown.
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
16 changes: 15 additions & 1 deletion
16
JavaJoker/src/main/java/com/vivek/panchal/javajoker/Joker.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 |
---|---|---|
@@ -1,9 +1,23 @@ | ||
package com.vivek.panchal.javajoker; | ||
|
||
import java.util.Random; | ||
|
||
public class Joker { | ||
|
||
/* | ||
Jokes copied and pasted from https://top-funny-jokes.com/ | ||
*/ | ||
|
||
private static final String[] jokesList = new String[] | ||
{"Where did Lucy go after the explosion? Everywhere.", | ||
"What´s the stupidest animal in the jungle? The polar bear.", | ||
"My grandfather had the heart of lion and a lifetime ban from the New your city zoo.", | ||
"Two mice chewing on a film roll. One of them says. I think the book was better.", | ||
"What kind of bagel can fly? A plain bagel." | ||
}; | ||
|
||
public String tellJoke() { | ||
return "Microsoft gives you Windows, Linux gives you a home!"; | ||
return jokesList[new Random().nextInt(jokesList.length)]; | ||
} | ||
|
||
} |
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
32 changes: 32 additions & 0 deletions
32
app/src/androidTest/java/com/udacity/gradle/builditbigger/EndPointAsyncTaskTest.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,32 @@ | ||
package com.udacity.gradle.builditbigger; | ||
|
||
import android.support.test.runner.AndroidJUnit4; | ||
import android.util.Log; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
import java.util.concurrent.TimeUnit; | ||
|
||
import static junit.framework.Assert.assertNotNull; | ||
import static org.junit.Assert.assertTrue; | ||
|
||
|
||
@RunWith(AndroidJUnit4.class) | ||
public class EndPointAsyncTaskTest { | ||
|
||
@Test | ||
public void testDoInBackground() { | ||
try { | ||
MainActivity mainActivity = new MainActivity(); | ||
EndpointAsyncTask syncEndpoint = new EndpointAsyncTask(mainActivity); | ||
syncEndpoint.execute(); | ||
String result = syncEndpoint.get(30, TimeUnit.SECONDS); | ||
|
||
assertNotNull(result); | ||
assertTrue(result.length() > 0); | ||
} catch (Exception e) { | ||
Log.e("Test:", " Timed out"); | ||
} | ||
} | ||
} |
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
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
Binary file modified
BIN
+0 Bytes
(100%)
backend/build/classes/java/main/com/udacity/gradle/builditbigger/backend/MyBean.class
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
backend/build/classes/java/main/com/udacity/gradle/builditbigger/backend/MyEndpoint.class
Binary file not shown.
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,27 @@ | ||
Warning: Google App Engine Java 7 runtime is deprecated. | ||
Warning: See https://cloud.google.com/appengine/docs/deprecations/java7 | ||
Nov 06, 2018 9:41:00 PM java.util.prefs.WindowsPreferences <init> | ||
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5. | ||
Nov 06, 2018 9:41:00 PM com.google.appengine.tools.development.SystemPropertiesManager setSystemProperties | ||
INFO: Overwriting system property key 'java.util.logging.config.file', value 'C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\platform\google_appengine\google\appengine\tools\java\config\sdk\logging.properties' with value 'WEB-INF/logging.properties' from 'D:\Udacity Projects\GradlePRojects\ud867-master\FinalProject\backend\build\exploded-backend\WEB-INF\appengine-web.xml' | ||
Nov 06, 2018 9:41:00 PM com.google.apphosting.utils.jetty.JettyLogger info | ||
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger | ||
Nov 06, 2018 4:11:00 PM com.google.appengine.tools.development.IsolatedAppClassLoader checkWorkingDirectory | ||
WARNING: Your working directory, (D:\Udacity Projects\GradlePRojects\ud867-master\FinalProject\backend) is not equal to your | ||
web application root (D:\Udacity Projects\GradlePRojects\ud867-master\FinalProject\backend\build\exploded-backend) | ||
You will not be able to access files from your working directory on the production server. | ||
|
||
Nov 06, 2018 4:11:01 PM com.google.apphosting.utils.jetty.JettyLogger info | ||
INFO: jetty-6.1.x | ||
Nov 06, 2018 4:11:02 PM com.google.apphosting.utils.jetty.JettyLogger info | ||
INFO: Started SelectChannelConnector@localhost:8080 | ||
Nov 06, 2018 4:11:02 PM com.google.appengine.tools.development.AbstractModule startup | ||
INFO: Module instance default is running at http://localhost:8080/ | ||
Nov 06, 2018 4:11:02 PM com.google.appengine.tools.development.AbstractModule startup | ||
INFO: The admin console is running at http://localhost:8080/_ah/admin | ||
Nov 06, 2018 9:41:02 PM com.google.appengine.tools.development.DevAppServerImpl doStart | ||
INFO: Dev App Server is now running | ||
Nov 06, 2018 9:41:06 PM com.google.appengine.repackaged.com.google.protobuf.UnsafeUtil supportsUnsafeByteBufferOperations | ||
WARNING: platform method missing - proto runtime falling back to safer methods: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.misc") | ||
Nov 06, 2018 9:41:06 PM com.google.appengine.repackaged.com.google.protobuf.UnsafeUtil supportsUnsafeArrayOperations | ||
WARNING: platform method missing - proto runtime falling back to safer methods: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.misc") |
Binary file not shown.
Oops, something went wrong.