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
| <ImageButton | |
| ... | |
| android:src="@drawable/NAME" | |
| android:background="@null" | |
| android:tint="@android:color/white" | |
| /> | |
| //Transparent Background add "@null" |
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
| <application | |
| ......./> | |
| <activity | |
| android:name=".PrefsActivity" | |
| android:theme="@android:style/Theme.Black.NoTitleBar" > | |
| </activity> | |
| </application> |
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
| //XXX://settings/?d=hello | |
| Intent intent = getIntent(); | |
| if (Intent.ACTION_VIEW.equals(intent.getAction())) { | |
| Uri data = intent.getData(); | |
| Log.d(TAG, "URI Data: " + data.toString()); | |
| String d = data.getQueryParameter("d"); | |
| Log.d(TAG, "d:" + 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
| #define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0] |
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
| - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | |
| NSString *cellIdentifier = [[NSUserDefaults standardUserDefaults] stringForKey:@"Theme"]; | |
| UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:cellIdentifier]; | |
| return cell.bounds.size.height; | |
| } |
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
| FMDatabase *db = [FMDatabase databaseWithPath:[Utility getDatabasePath]]; | |
| [db open]; | |
| FMResultSet *results = [db executeQuery:@"SELECT * FROM tblScores"]; | |
| //CHCSVWriter *csvWriter = [[CHCSVWriter alloc] initForWritingToCSVFile:[NSHomeDirectory() stringByAppendingPathComponent:@"demo.csv"]]; | |
| NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); | |
| NSString *documentsDirectory = [paths objectAtIndex:0]; // Get documents folder | |
| NSString *document = [[NSString alloc] initWithFormat:@"%@/demo.csv", documentsDirectory]; | |
| CHCSVWriter *csvWriter = [[CHCSVWriter alloc] initForWritingToCSVFile:document]; | |
| while([results next]) { |
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
| #import <MessageUI/MessageUI.h> | |
| @interface ViewController : UIViewController <MFMailComposeViewControllerDelegate> |
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
| SELECT * FROM Table ORDER BY date(dateColumn) DESC |