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
import UIKit | |
import AVFoundation | |
class PlaySoundsViewController: UIViewController { | |
var audioPlayer: AVAudioPlayer! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// Do any additional setup after loading the view. |
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 static <T> List<List<T>> split(List<T> list, int size) | |
throws NullPointerException, IllegalArgumentException { | |
if (list == null) { | |
throw new NullPointerException("The list parameter is null."); | |
} | |
if (size <= 0) { | |
throw new IllegalArgumentException( | |
"The size parameter must be more than 0."); | |
} |
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
function showData() { | |
console.log("final value :" +newArray.length); | |
console.log(newArray); | |
} | |
var newArray = []; | |
function method1() { | |
return $.Deferred(function( dfd ){ | |
self.setTimeout(function(){ | |
newArray.push("hello"); |
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.example.vaadin_layout_test; | |
import com.vaadin.Application; | |
import com.vaadin.data.Item; | |
import com.vaadin.data.util.IndexedContainer; | |
import com.vaadin.ui.Label; | |
import com.vaadin.ui.Layout; | |
import com.vaadin.ui.MenuBar; | |
import com.vaadin.ui.Panel; | |
import com.vaadin.ui.Table; |
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 static void facebookLogin() { | |
try { | |
JsonObject profile = FbGraph.getObject("me"); // fetch the logged in user | |
String email = profile.get("email").getAsString(); // retrieve the email | |
System.out.println("facebook user " + email); | |
// do useful things | |
Session.current().put("username", email); // put the email into the session (for the Secure module) | |
} catch (FbGraphException fbge) { | |
flash.error(fbge.getMessage()); |
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.dhavaln.mobile.android.plugin; | |
import java.util.Date; | |
import org.json.JSONArray; | |
import android.util.Log; | |
import com.phonegap.api.PhonegapActivity; | |
import com.phonegap.api.Plugin; |
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
#import <Foundation/Foundation.h> | |
#ifdef PHONEGAP_FRAMEWORK | |
#import <PhoneGap/PGPlugin.h> | |
#else | |
#import "PGPlugin.h" | |
#endif | |
@interface AppComm : PGPlugin { | |
NSString* callbackID; | |
} |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>Home</title> | |
</head> | |
<body> | |
<div id="homePage" data-role="page"> | |
<div data-role="header" data-position="inline"> |
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
/* | |
Apache License | |
Version 2.0, January 2004 | |
http://www.apache.org/licenses/ | |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
1. Definitions. |
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
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.util.HashMap; | |
import java.util.Map; | |
import javax.servlet.ServletException; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
OlderNewer