This file contains 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 com.shkbhbb.performancetest; | |
import android.app.Application; | |
public class MyApp extends Application { | |
public static String ID = ""; | |
@Override | |
public void onCreate() { |
This file contains 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> | |
int main( int argc, char *argv[] ) { | |
if( argc == 2 ) { | |
printf("The argument supplied is %s\n", argv[1]); | |
} | |
else if( argc > 2 ) { | |
printf("Too many arguments supplied.\n"); | |
} |
This file contains 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 List<PrivateMessage> getChatMessages(int chatId) { | |
List<PrivateMessage> privateMessages = new ArrayList<>(); | |
SQLiteDatabase db = dbHelper.getReadableDatabase(); | |
String query = SELECT_ALL + CHAT_MESSAGES_TABLE_NAME | |
+ WHERE + CHAT_MESSAGES_COLUMN_CHAT_ID + EQUAL + chatId + ORDER_BY | |
+ CHAT_MESSAGES_COLUMN_MESSAGE_ID + ASC; | |
Cursor cursor = db.rawQuery(query, null); | |
cursor.moveToFirst(); |