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
funtcion Uri getCalendarURI(eventUri boolean){ | |
Uri calendarURI = null; | |
if (android.os.Build.VERSION.SDK_INT <= 7 ) | |
{ | |
calendarURI = (eventUri)?Uri.parse("content://calendar/events"):Uri.parse("content://calendar/calendars"); | |
} | |
else | |
{ | |
calendarURI = (eventUri)?Uri.parse("content://com.android.calendar/events"): Uri.parse("content://com.android.calendar/calendars"); |
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
To store an image file inside your SQLite db you should use a Blog field, and due Android SQlite limitations you should store info in this way: | |
ContentValues cv = new ContentValues(); | |
//your table fields goes here | |
... | |
// adding the bitmap in byte array way to the blob field | |
ByteArrayOutputStream out = new ByteArrayOutputStream(); | |
friendInfo.getImage_bmp().compress(Bitmap.CompressFormat.PNG, 100,out); | |
cv.put("avatar_img", out.toByteArray()); | |
db.insert(TABLE_NAME, null, cv); |
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
#android | |
This is what you need: | |
b1.setOnClickListener(new OnClickListener() { | |
@Override | |
public void onClick(View v) { | |
final ProgressDialog progress = ProgressDialog.show(THENAMEOFYOURACTIVITYCLASS.this, | |
ProgressTitle, ProgressMessage, true, false); | |
new Thread(new Runnable() { |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- optional --> | |
<script type="text/javascript" src="[PATH]/jquery.js" /> | |
<script type="text/javascript" src="[PATH]/i18next.js" /> | |
</head> | |
<body> | |
<ul class="nav"> | |
<li><a href="#" data-i18n="nav.home"></a></li> |
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
fastlane ios pilot_free |
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
lane :pilot_free do | |
upload_testflight( | |
scheme:app_config[:app_scheme] | |
) | |
end | |
desc "Responsible for uploading to testfligh" | |
private_lane :upload_testflight do |options| | |
increment_build_number #increments the build number (an integer) | |
build_release(scheme:options[:scheme]) |
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
desc "Responsible for Generating APNs iOS Certificates and p12p" | |
private_lane :generate_apns do |options| | |
app_id= CredentialsManager::AppfileConfig.try_fetch_value(:app_identifier) | |
pem_name = options[:pem_name]; | |
scheme = (options[:development] ? "Development" : "Production") | |
pem( | |
development: options[:development], | |
force: options[:force], |
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_lane :upload_itunes do |options| | |
# Make sure we don't have any uncommited changes | |
ensure_git_status_clean | |
ensure_git_branch( | |
branch: "(master|release\\S+|hotfix\\S+)" | |
) | |
increment_build_number( | |
xcodeproj:app_config[:app_project_path] | |
) #increments the build number (an integer), |
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
int main(int argc, char * argv[]) | |
{ | |
@autoreleasepool { | |
Class appDelegateClass = NSClassFromString(@"QNTestingAppDelegate"); | |
if (!appDelegateClass) | |
appDelegateClass = [QNAppDelegate class]; | |
return UIApplicationMain(argc, argv, nil, NSStringFromClass(appDelegateClass)); | |
} | |
} |
OlderNewer