Skip to content

Instantly share code, notes, and snippets.

View amarjitdhillon's full-sized avatar
🎯
Focusing

Amarjit Singh Dhillon amarjitdhillon

🎯
Focusing
View GitHub Profile
public class writeToCassandra {
private static Session session;
private static Cluster cluster;
private static final String CREATE_KEYSPACE_QUERY = "CREATE KEYSPACE data WITH replication= {'class':'SimpleStrategy', 'replication_factor':1};";
private static final String createTable = "CREATE TABLE test.patient(id int, heart_rate int, PRIMARY KEY(id));" ;
public static void main(String[] args) throws Exception {
import UIKit
import FBSDKLoginKit
class loginViewController: UIViewController , FBSDKLoginButtonDelegate {
override func viewDidLoad() {
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Any] = [:]) -> Bool {
let handled = FBSDKApplicationDelegate.sharedInstance().application(app, open: url, sourceApplication: options[UIApplicationOpenURLOptionsKey.sourceApplication] as! String! , annotation: options[UIApplicationOpenURLOptionsKey.annotation])
return handled
}
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
// Override point for customization after application launch.
return true
}
space is imp