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
RestService restServiceG; | |
//Create the progress dialog and show it, before running your restService request | |
Final ProgressDialog dialog = new ProgressDialog(mContext); | |
dialog.setMessage("Please wait.. Retrieving"); | |
dialog.setIndeterminate(true); | |
dialog.setCancelable(true); | |
dialog.show(); |
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
package googleApiBuilder; | |
public class ApiBuilderTrap { | |
public static void main(String args[]){ | |
String query = ""; | |
int x = -74008713; | |
int y = 40752459; | |
int yint = 40752459; | |
double efficiency = .9069; |
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 class SMSLauncher extends BroadcastReceiver | |
{ | |
public static final String SMS_EXTRA_NAME = "pdus"; | |
@Override | |
public void onReceive(Context context, Intent intent) | |
{ | |
Bundle extras = intent.getExtras(); | |
String messages = ""; | |
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
private static void check(FTPClient ftp, String cmd, boolean succeeded) throws IOException { | |
if (!succeeded) { | |
throw new IOException("FTP error: " + ftp.getReplyString()); | |
} | |
} | |
private static String today() { | |
return new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | |
} |
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
RestService restService; | |
restService = new RestService(mHandler, this, "http://10.0.2.2:3000/bars/"); | |
restService.addParam("lat", "40764917"); //Add params to request | |
restService.addParam("lng", "-73983130"); | |
restService.addParam("range", "10"); | |
restService.addHeader("Content-Type","application/json");//Add headers to request | |
//Overridden handler to process incoming response. | |
private final Handler mHandler = new Handler(){ | |
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
class Message < ActiveRecord::Base | |
belongs_to :user | |
accepts_nested_attributes_for :user | |
end | |
class User < ActiveRecord::Base | |
# Include default devise modules. Others available are: | |
# :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable | |
devise :database_authenticatable, :registerable, |
NewerOlder