thomas brian

Greenhorn
+ Follow
since Apr 19, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by thomas brian

Try out the following code:
Here's an example of copying one stream to another that doesn't really care about the size of the data being streamed:

public static void stream(InputStream in, OutputStream out)
throws IOException {
byte[] buf = new byte[1024];
int bytesRead = 0;

try {

while (-1 != (bytesRead = in.read(buf, 0, buf.length))) {
out.write(buf, 0, bytesRead);
}

} catch (IOException e) {
log.error("Error with streaming op: " + e.getMessage());
throw (e);
} finally {
try{
in.close();
out.flush();
out.close();
} catch (Exception e){}//Ignore
}
}
11 years ago
Yes, you do need Mac OS X for that. Xcode(SDK) will only work on Mac OS X. However, if the legal part for you is not really important you can install Mac OS X on your normal PC. Just google a bit for Hackintosh.
11 years ago
iOS
To make such kind of mechanism we need to make one error handler and an Activity class which will gain the view whenever the app gets forced closed.

import java.io.*;

import android.content.*;
import android.os.Process;

public class ExceptionHandler implements java.lang.Thread.UncaughtExceptionHandler {
private final Context myContext;

public UncaughtExceptionHandler(Context context) {
myContext = context;
}

public void uncaughtException(Thread thread, Throwable exception) {
StringWriter stackTrace = new StringWriter();
exception.printStackTrace(new PrintWriter(stackTrace));
System.err.println(stackTrace);

Intent intent = new Intent(myContext, CrashActivity.class);
intent.putExtra(BugReportActivity.STACKTRACE, stackTrace.toString());
myContext.startActivity(intent);

Process.killProcess(Process.myPid());
System.exit(10);
}
}
11 years ago
iOS 5 organizes your magazine and newspaper app subscriptions in Newsstand: a folder that lets you access your favorite publications quickly and easily. There’s also a new place on the App Store just for newspaper and magazine subscriptions. And you can get to it straight from Newsstand. New purchases go directly to your Newsstand folder. Then, as new issues become available, Newsstand automatically updates them in the background — complete with the latest covers. It’s kind of like having the paper delivered to your front door. Only better.
11 years ago
iOS
use this coding :


HTML source code: <form method="get" action="http://www.mysite.com/search.php">
<table cellpadding="0px" cellspacing="0px">
<tr>
<td style="border-style:solid;border-color:#CCCCCC;border-width:1px;">
<input type="text" name="zoom_query" style="width:100px; border:0px solid; height:17px; padding:0px 3px; position:relative;">
</td>
<td style="border-style:solid;border-color:#CCCCCC;border-width:0px;">
<input type="submit" value="" style="border-style: none; background: url('searchbutton2.gif') no-repeat; width: 24px; height: 22px;">
</td>
</tr>
</table>
</form>
11 years ago
i phne Bump App:
There are two parts to Bump: the app running on your device and a smart matching algorithm running on our servers in the cloud. The app on your phone uses the phone's sensors to literally "feel" the bump, and it sends that info up to the cloud. The matching algorithm listens to the bumps from phones around the world and pairs up phones that felt the same bump. Then we just route information between the two phones in each pair.
11 years ago
iOS
iPads, iPhones, Androids, BlackBerrys … mobile devices are entering your workplace in record numbers, and they’re there to stay. According to Forrester, well over half of enterprises support personally-owned mobile devices.

BYOD and enterprise mobility make employees happier and more productive on the go. But you know better than anyone that allowing users mobile access to the corporate network is fraught with risk. And that means you need to get control over those mobile devices with secure, enterprise MDM.
11 years ago
If you're already using the Android SDK, you should update to the latest tools or platform using the Android SDK and AVD Manager, rather than downloading a new SDK starter package.
Here's an overview of the steps you must follow to set up the Android SDK:

Prepare your development computer and ensure it meets the system requirements.
Install the SDK starter package from the table above. (If you're on Windows, download the installer for help with the initial setup.)
Install the ADT Plugin for Eclipse (if you'll be developing in Eclipse).
Add Android platforms and other packages to your SDK.
Explore the contents of the Android SDK (optional).
11 years ago
I don't do facebook, but photobucket is working fine on my mopho. Have upload status bar. Try a reboot....
11 years ago
Bluetooth is hands down the easiest way for two Android devices to communicate directly with each other, without the need of a 3rd party. These are instructions on how to pair and transfer files between two Android tablets and phones using BlueTooth and ESFileExplorer.
11 years ago
Use the BlackBerry® Smartphone Simulator to simulate multiple screen touches at the same time.
1. On the Simulate menu, click Multitouch Mode.
2. Click and drag using either the left or right mouse buttons anywhere within the device screen area.
3. Perform the same action elsewhere on the screen to complete the multitouch action.
After you complete the second touch, both touches are simulated as if they started at the same time.
11 years ago
I would use a completely random hex code. I would seriously avoid
hashing
the username & password, that leaves all your users vunerable to a
dictionary attack.
11 years ago
android-pcbcr - Project Hosting on Google Code. The idea of it is that the phone scans a barcode and sends the data over the network to the PC where the keystrokes are then simulated. So if sending the data over a network to the PC is acceptable instead of plugging in a USB cable, then it wouldn't take too much effort to adapt the code to send the keystrokes from the phone instead of the barcode data. It wouldn't require root access on the phone. What do you think? Your USB idea is more flexible (don't need to have network access), but I wouldn't know how to do that at the moment.
11 years ago