This file contains hidden or 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
| public static Bitmap loadImage(String url) { | |
| Bitmap bm = null; | |
| try { | |
| URL aURL = new URL(url); | |
| URLConnection conn = aURL.openConnection(); | |
| conn.connect(); | |
| InputStream is = conn.getInputStream(); | |
| BufferedInputStream bis = new BufferedInputStream(is); | |
| bm = BitmapFactory.decodeStream(bis); | |
| bis.close(); |
This file contains hidden or 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
| public static Bitmap fetchImage(String url) { | |
| URL fileUrl = null; | |
| try { | |
| fileUrl = new URL(url); | |
| } catch (MalformedURLException exc) { | |
| return null; | |
| } | |
| try { |
This file contains hidden or 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
| public void toggleStatus(View view) { | |
| showProgressDialog("", getString(R.string.progress_loading_message)); | |
| String status = User.AVAILABLE_STATUS; | |
| if (getApp().getCurrentUser().isAvailable()) { | |
| status = User.OFFLINE_STATUS; | |
| } | |
| final boolean initialAvailability = getApp().getCurrentUser().isAvailable(); |
This file contains hidden or 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
| public void getPhoto(View view) { | |
| Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); | |
| captureFile = new File(DirectoryManager.getTempDirectoryPath(this), "Capture.jpg"); | |
| captureUri = Uri.fromFile(captureFile); | |
| intent.putExtra(MediaStore.EXTRA_OUTPUT, captureUri); | |
| Log.e(TAG, captureFile.getAbsolutePath().toString()); | |
| Log.e(TAG, captureUri.toString()); |
This file contains hidden or 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
| 11-24 17:37:02.469: WARN/BaseActivity(5925): org.apache.http.client.ClientProtocolException | |
| at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:557) | |
| at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487) | |
| at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465) | |
| at com.google.api.client.http.apache.ApacheHttpRequest.execute(ApacheHttpRequest.java:58) | |
| at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:639) | |
| at com.jettaxi.api.JetTaxiClient.updateUser(JetTaxiClient.java:157) | |
| at com.jettaxi.api.JetTaxiClient$3.call(JetTaxiClient.java:76) | |
| at com.jettaxi.api.JetTaxiClient$3.call(JetTaxiClient.java:71) | |
| at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306) |
This file contains hidden or 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
| 11-29 09:43:40.880: W/PackageParser(145): Exception reading res/color/button_black_text.xml in /data/app/vmdl1892654471.tmp | |
| 11-29 09:43:40.880: W/PackageParser(145): java.lang.SecurityException: META-INF/JETTAXI.SF has invalid digest for org/joda/time/tz/data/America/Argentina/Tucuman in /data/app/vmdl1892654471.tmp | |
| 11-29 09:43:40.880: W/PackageParser(145): at java.util.jar.JarVerifier.invalidDigest(JarVerifier.java:130) | |
| 11-29 09:43:40.880: W/PackageParser(145): at java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:357) | |
| 11-29 09:43:40.880: W/PackageParser(145): at java.util.jar.JarVerifier.readCertificates(JarVerifier.java:265) | |
| 11-29 09:43:40.880: W/PackageParser(145): at java.util.jar.JarFile.getInputStream(JarFile.java:389) | |
| 11-29 09:43:40.880: W/PackageParser(145): at android.content.pm.PackageParser.loadCertificates(PackageParser.java:342) | |
| 11-29 09:43:40.880: W/PackageParser(145): at android.content.pm.PackageParser.collectCertificates(PackageParser.java:521) | |
| 11-29 09:43:40.880: W/PackagePa |
This file contains hidden or 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
| #include <iostream> | |
| #include <cstdio> | |
| #include <cstdlib> | |
| #include <ctime> | |
| #include <cstring> | |
| #include <sys/types.h> | |
| #include <sys/wait.h> | |
| #include <errno.h> | |
| #include "PiCalculator.h" |
This file contains hidden or 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
| #ifndef ZHELPERS_HPP | |
| #define ZHELPERS_HPP | |
| #include <iostream> | |
| #include <zmq.hpp> | |
| #define within(num) (int) ((float) (num) * random () / (RAND_MAX + 1.0)) | |
| static std::string s_recv(zmq::socket_t & socket) { | |
| zmq::message_t message; |
This file contains hidden or 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
| #include "zhelpers.hpp" | |
| #include <sstream> | |
| #include <iostream> | |
| #include <cstdlib> | |
| #define REQUEST_TIMEOUT 2500 // msecs, (> 1000!) | |
| #define REQUEST_RETRIES 3 // Before we abandon | |
| // Helper function that returns a new configured socket |
This file contains hidden or 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
| #include <iostream> | |
| #include <sstream> | |
| #include <cstdlib> | |
| #include "zhelpers.hpp" | |
| int main () | |
| { | |
| srandom ((unsigned) time (NULL)); |