Skip to content

Instantly share code, notes, and snippets.

@rajiv-singaseni
rajiv-singaseni / HelloWorld.java
Created August 4, 2011 17:03
Hello world basic program in java
public class HelloWorld {
public static void main(String str[]) {
System.out.println("Hello world");
}
}
@rajiv-singaseni
rajiv-singaseni / fblike.m
Created December 15, 2011 14:17
Updated facebook like update labels function.
-(void) updateLabels {
int remaining = totalLikesCount - friendsLikesCount - (userLikesPage?1:0);
NSString *string;
if (remaining == 0) {
if (!userLikesPage && friendsLikesCount == 0) {
string = @"Be the first to like this.";
} else if (userLikesPage && friendsLikesCount == 0) {
string = @"You like this.";
} else if (userLikesPage && friendsLikesCount > 0) {
string = [NSString stringWithFormat:@"You and %d %@ like this.",friendsLikesCount, (friendsLikesCount > 1? @"friends": @"friend")];
@rajiv-singaseni
rajiv-singaseni / CrackerAnimation.java
Created December 27, 2011 06:23
An Android custom animation inside a view using a bitmap.
package com.webile.cracker;
import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.os.Bundle;
import android.os.Handler;
@rajiv-singaseni
rajiv-singaseni / RandomGlowActivity.java
Created March 28, 2012 18:16
An activity to demonstrate subtle glow effect for SlideUrBuddy
package com.webile.glow;
import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.DecelerateInterpolator;
@rajiv-singaseni
rajiv-singaseni / RegistrationViewController.m
Created March 29, 2012 09:18
An iOS sample to send a toast notification to an Windows 8 device.
//
// RegistrationController.m
// iPhone
//
// Created by xcode4 on 20/03/2012.
// Copyright (c) 2012 WebileApps. All rights reserved.
//
#import "RegistrationController.h"
#import "ASIFormDataRequest.h"