Skip to content

Instantly share code, notes, and snippets.

if(crossM.find()){
String chanl = new String("");
String ms = new String("");
if(message.length()>5) {
ArrayList<String> list = new ArrayList<String>(Arrays.asList(message.split(" ")));
list.remove(0); // Remove the command .ccha
chanl = list.remove(0);
for (String s : list)
{
ms += s + " ";
@Jarada
Jarada / myLauncherAddItem.m
Created September 12, 2012 15:04
myLauncher - adding a myLauncherItem via a View
// This is an example coding gist for use on myLauncher Google Groups to explain how to add an item to myLauncherView from another view
/*
RootViewController - represents the RootViewController that extends MyLauncherViewController
*/
@implementation RootViewController
-(void)addLauncherItem {
// We'll load our new view to allow a user to choose the item to add
MyNewViewController *nvc = [[MyNewViewController alloc] initWithNibName:nil bundle:nil]; // Change as needed
@Jarada
Jarada / myLauncherAddItem.m
Created July 1, 2012 14:50
myLauncher - adding a myLauncherItem
// This is an example coding gist for use on myLauncher Google Groups to explain how add an item to myLauncherView
// This is just a temporary workaround for new code coming soon
/*
RootViewController - represents the RootViewController that extends MyLauncherViewController
*/
@implementation RootViewController
/*
Add's an item to myLauncherView (first to the end of the last page, then to another page, then to any space available)
@Jarada
Jarada / ItemsPerPage.m
Created May 21, 2012 17:05
myLauncher - Dividing an array of icons into page arrays
-(NSMutableArray *)pages:(NSMutableArray *)allItems ofSize:(int)itemsPerPage
{
NSMutableArray *pages = [[[[NSMutableArray alloc] init];
NSMutableArray *page = [[NSMutableArray alloc] init];
for (int x = 0; x < [allItems count]; x++) {
[page addObject:[allItems objectAtIndex:x]];
int y = x + 1;
if (y - (floor(y / itemsPerPage) * itemsPerPage) == 0) {
[pages addObject:page];
@Jarada
Jarada / ItemViewController.m
Created May 20, 2012 18:48
myLauncher moving close barbuttonitem
// This is an example coding gist for use on myLauncher Google Groups to explain how to move the close icon used to close a launched item in code
/*
ItemViewController - represents the View Controller of the item that is launched when the icon is tapped
We modify the navigation item on ViewLoad to move the barButtonItem to the right
We then pass this the barButtonItem on
*/
@implementation ItemViewController
-(void)viewDidLoad {
@Jarada
Jarada / myLauncherRemoteClose.m
Created May 20, 2012 11:47
myLauncher remote close
// This is an example coding gist for use on myLauncher Google Groups to explain how to close a launched item in code
// This gist contains three classes (interface and/or implementation) in one file, and should be separated before use
/*
MyLauncherViewController - this needs to be edited to allow for launcherViewItemSelected: and closeView to be called outside the usual way
This will be available in the next version, so feel free to make the changes and you can update with the knowledge it won't break anything
*/
@interface MyLauncherViewController : UIViewController <MyLauncherViewDelegate, UINavigationControllerDelegate> {
}