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 <E extends Bean> List<E> getObjects() { | |
List<E> r = new ArrayList<E>(); | |
Cursor cursor = this.db | |
.query(new E().getTable(), new String[] { "data", "id" }, null, null, | |
null, null, "id ASC"); | |
if (cursor.moveToFirst()) { | |
do { | |
try { | |
E b = (E) this.DecryptObject(cursor.getString(0)); | |
b.ID = cursor.getInt(1); |
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 abstract class Bean implements Serializable { | |
public abstract String getTable(); | |
public int ID = 0; | |
} | |
public class ServerBean extends Bean { | |
private static final long serialVersionUID = 1L; | |
public String name = "New server"; |
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
@Override | |
public boolean onMenuItemClick(MenuItem arg0) { | |
Intent intent = new Intent(android.content.Intent.ACTION_SEND); | |
intent.putExtra(android.content.Intent.EXTRA_STREAM, "file://" + t.data); // t.data starts with "/sdcard" | |
ctx.startActivity(Intent.createChooser(intent, "Share via")); | |
return false; | |
} |
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
64 GB | |
[1] 200 Mb -> Ubuntu /boot | |
[2] 15 Gb -> Ubuntu / | |
[3] 15 Gb -> Windows C: | |
[4] 15 Gb reserved | |
[5] 15 Gb reserved | |
1 Tb | |
[1] 1 Tb -> Ubuntu /media/Data + Windows D:/ |
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 abstract class Model<T> | |
public class Child extends Model<Child> | |
Child a = ... | |
a.getType().isAssignableFrom(Model.class) == false - WTF? |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Security.Cryptography; | |
using System.IO; |
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
using System; | |
using System.Collections.Generic; | |
using System.Text; | |
using System.Security.Cryptography; | |
using System.IO; |
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
// Compiled from Dialog.java (version 1.5 : 49.0, super bit) | |
public class android.app.Dialog implements android.content.DialogInterface, android.view.Window$Callback, android.view.KeyEvent$Callback, android.view.View$OnCreateContextMenuListener { | |
// Method descriptor #12 (Landroid/content/Context;)V | |
// Stack: 3, Locals: 2 | |
public Dialog(android.content.Context context); | |
0 aload_0 [this] | |
1 invokespecial java.lang.Object() [1] | |
4 new java.lang.RuntimeException [2] | |
7 dup |
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
@Override | |
public void onBinded(IPlayerService svc, ServiceConnection conn) { | |
mConnection = conn; | |
mPlayer = svc; | |
try { | |
LinearLayout ll = (LinearLayout) findViewById(R.id.barcontainer); | |
min = mPlayer.getEqMinVal(); | |
max = mPlayer.getEqMaxVal(); |
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 SearchAdapter extends ArrayAdapter<SearchResult> { | |
List<SearchResult> items; | |
private LayoutInflater inflater; | |
private ProgressDialog mBox; | |
private Context mContext; | |
public SearchAdapter(Context context, List<SearchResult> objects) { | |
super(context, R.layout.search_image_result, objects); | |
items = objects; |