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
| <script> | |
| new Ajax.Request('/test2', { | |
| method:'get', | |
| onSuccess: function(transport) { | |
| var response = transport.responseText || "no response text"; | |
| //alert("Success! \n\n" + response); | |
| $('content').replace(response) | |
| new Ajax.Request('/test3', { | |
| method:'get', | |
| onSuccess: function(transport) { |
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
| keytool -list -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android |
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
| WifiLock lk; | |
| final int sdkVersion = Integer.parseInt(Build.VERSION.SDK); | |
| if (sdkVersion >= Build.VERSION_CODES.HONEYCOMB_MR1) { | |
| Log.d(TAG, "hi-perf wifi lock"); | |
| lk = wfManager.createWifiLock(3, "LockTag"); | |
| } | |
| else{ | |
| lk = wfManager.createWifiLock(WifiManager.WIFI_MODE_FULL, "LockTag"); | |
| } |
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
| //DataReceiver is my Broadcast Reciever Class | |
| intentReceiver = new DataReceiver(); | |
| filter = new IntentFilter(); | |
| //Add intents to recieve | |
| filter.addAction(Intent.ACTION_CAMERA_BUTTON); | |
| registerReceiver(intentReceiver, filter); |
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
| HttpPost httpost = new HttpPost("<Server address here>"); | |
| StringEntity se = new StringEntity(JSONObject.toString()); | |
| httpost.setEntity(se); | |
| httpost.setHeader("Accept", "application/json"); | |
| httpost.setHeader("Content-type", "application/json"); | |
| ResponseHandler responseHandler = new BasicResponseHandler(); | |
| String responseBody = httpclient.execute(httpost, responseHandler); |
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
| import android.app.IntentService; | |
| import android.content.Intent; | |
| import android.util.Log; | |
| import com.google.android.gms.location.ActivityRecognitionResult; | |
| import com.google.android.gms.location.DetectedActivity; | |
| /** | |
| * Created by bryandixon on 4/6/15. | |
| */ |
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 <stdio.h> | |
| #include <unistd.h> | |
| int main() | |
| { | |
| /* fork a child process */ | |
| fork(); | |
| /* fork another child process */ | |
| fork(); | |
| /* and fork another */ |
NewerOlder