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
// 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
#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
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
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"); |
NewerOlder