Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Brian
    @brmendez
    yo
    Kolo13
    @Kolo13
    hey
    Kolo13
    @Kolo13
    Yo!
    Kolo13
    @Kolo13
    Good job
    Kolo13
    @Kolo13
    definately need to go over this tonight
    Kolo13
    @Kolo13
    Yo! you here Tuan?
    Brian
    @brmendez
    Yo TUAN GET YO BUTT IN HERE!
    Kolo13
    @Kolo13
    TUAN TUAN TUAN
    Tuan Vu
    @tnahvu
    suppppp
    ( )( ) <--- that's my butt in here
    Kolo13
    @Kolo13
    Dude
    Don't make me laugh
    dobodo bop dididd didi do
    Brian
    @brmendez
    source $(brew --prefix nvm)/nvm.sh
    Kolo13
    @Kolo13
    Yo...
    Brian
    @brmendez
    hey buddy
    Tuan Vu
    @tnahvu
    how you doing dawg?
    mendez
    Kolo13
    @Kolo13
    Hello! Hello!
    Tuan Vu
    @tnahvu
    lazy var persistentStoreCoordinator: NSPersistentStoreCoordinator? = {
    // The persistent store coordinator for the application. This implementation creates and return a coordinator, having added the store for the application to it. This property is optional since there are legitimate error conditions that could cause the creation of the store to fail.
    // Create the coordinator and store
    var coordinator: NSPersistentStoreCoordinator? = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel)
    let url = self.applicationDocumentsDirectory.URLByAppendingPathComponent("JSONDemo.sqlite")
    var error: NSError? = nil
    var failureReason = "There was an error creating or loading the application's saved data."
    if coordinator!.addPersistentStoreWithType(NSSQLiteStoreType, configuration: nil, URL: url, options: nil, error: &error) == nil {
    coordinator = nil
    // Report any error we got.
    let dict = NSMutableDictionary()
    dict[NSLocalizedDescriptionKey] = "Failed to initialize the application's saved data"
    dict[NSLocalizedFailureReasonErrorKey] = failureReason
    dict[NSUnderlyingErrorKey] = error
    error = NSError(domain: "YOUR_ERROR_DOMAIN", code: 9999, userInfo: dict)
    // Replace this with code to handle the error appropriately.
    // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
    NSLog("Unresolved error (error), (error!.userInfo)")
    abort()
    }
    Kolo13
    @Kolo13
    iiiii

    func fetchHomeTimeline( completionHandler : (errorDescription: String?, tweets : [Tweet]?) -> Void) {
    let accountStore = ACAccountStore()
    let accountType = accountStore.accountTypeWithAccountTypeIdentifier(ACAccountTypeIdentifierTwitter)

    accountStore.requestAccessToAccountsWithType(accountType, options: nil) { (granted: Bool, error : NSError!) -> Void in
    
      if granted {
        let accounts = accountStore.accountsWithAccountType(accountType)
        self.twitterAccount = accounts.first as ACAccount?
        println(accounts.isEmpty)
    
        let url = NSURL(string:"https://api.twitter.com/1.1/statuses/home_timeline.json")
    
        let twitterRequest = SLRequest(forServiceType: SLServiceTypeTwitter, requestMethod: SLRequestMethod.GET, URL: url, parameters: nil)
        twitterRequest.account = self.twitterAccount
    
        twitterRequest.performRequestWithHandler({ (data, httpResponse, error) -> Void in
    
          switch httpResponse.statusCode {
            case 200...299:
              let tweets = Tweet.parseJSONDataIntoTweets(data)
              completionHandler(errorDescription: nil, tweets: tweets)
              println("This is good")
            case 400...499:
              completionHandler(errorDescription: "Client fault", tweets: nil)
            case 500...599:
              completionHandler(errorDescription: "Server fault", tweets: nil)
            default:
              println("Something")
          }
        })
      }
    }

    }

    ```func fetchHomeTimeline( completionHandler : (errorDescription: String?, tweets : [Tweet]?) -> Void) {
    let accountStore = ACAccountStore()
    let accountType = accountStore.accountTypeWithAccountTypeIdentifier(ACAccountTypeIdentifierTwitter)

    accountStore.requestAccessToAccountsWithType(accountType, options: nil) { (granted: Bool, error : NSError!) -> Void in
    
      if granted {
        let accounts = accountStore.accountsWithAccountType(accountType)
        self.twitterAccount = accounts.first as ACAccount?
        println(accounts.isEmpty)
    
        let url = NSURL(string:"https://api.twitter.com/1.1/statuses/home_timeline.json")
    
        let twitterRequest = SLRequest(forServiceType: SLServiceTypeTwitter, requestMethod: SLRequestMethod.GET, URL: url, parameters: nil)
        twitterRequest.account = self.twitterAccount
    
        twitterRequest.performRequestWithHandler({ (data, httpResponse, error) -> Void in
    
          switch httpResponse.statusCode {
            case 200...299:
              let tweets = Tweet.parseJSONDataIntoTweets(data)
              completionHandler(errorDescription: nil, tweets: tweets)
              println("This is good")
            case 400...499:
              completionHandler(errorDescription: "Client fault", tweets: nil)
            case 500...599:
              completionHandler(errorDescription: "Server fault", tweets: nil)
            default:
              println("Something")
          }
        })
      }
    }

    }
    ```

    func fetchHomeTimeline( completionHandler : (errorDescription: String?, tweets : [Tweet]?) -> Void) {
        let accountStore = ACAccountStore()
        let accountType = accountStore.accountTypeWithAccountTypeIdentifier(ACAccountTypeIdentifierTwitter)
    
        accountStore.requestAccessToAccountsWithType(accountType, options: nil) { (granted: Bool, error : NSError!) -> Void in
    
          if granted {
            let accounts = accountStore.accountsWithAccountType(accountType)
            self.twitterAccount = accounts.first as ACAccount?
            println(accounts.isEmpty)
    
            let url = NSURL(string:"https://api.twitter.com/1.1/statuses/home_timeline.json")
    
            let twitterRequest = SLRequest(forServiceType: SLServiceTypeTwitter, requestMethod: SLRequestMethod.GET, URL: url, parameters: nil)
            twitterRequest.account = self.twitterAccount
    
            twitterRequest.performRequestWithHandler({ (data, httpResponse, error) -> Void in
    
              switch httpResponse.statusCode {
                case 200...299:
                  let tweets = Tweet.parseJSONDataIntoTweets(data)
                  completionHandler(errorDescription: nil, tweets: tweets)
                  println("This is good")
                case 400...499:
                  completionHandler(errorDescription: "Client fault", tweets: nil)
                case 500...599:
                  completionHandler(errorDescription: "Server fault", tweets: nil)
                default:
                  println("Something")
              }
            })
          }
        }
      }
    Tuan Vu
    @tnahvu
    var coordinator: NSPersistentStoreCoordinator? = NSPersistentStoreCoordinator(managedObjectModel: self.managedObjectModel)
    Brian
    @brmendez
    How you doing man @Kolo13
    Brian
    @brmendez
    Hey @Kolo13 can you "hear" me?
    Kolo13
    @Kolo13
    I'm hungry!
    Brian
    @brmendez
    let avFoundationAction = UIAlertAction(title: "AVFoundation", style: UIAlertActionStyle.Default) { (action) -> Void in
                self.performSegueWithIdentifier("SHOW_AV", sender: self)
            }
    Brian
    @brmendez
    ```
    class var sharedInstance: NetworkController {
            struct Static {
                static var instance: NetworkController?
                static var token: dispatch_once_t = 0
            }
            dispatch_once(&Static.token) {
                Static.instance = NetworkController()
            }
            return Static.instance!
        }
    Kolo13
    @Kolo13
     func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -> Bool {
        println(url)
        NetworkController.sharedInstance.handleOAuthURL(url)
        return true
        //self.networkController
      }
    Brian
    @brmendez
    sounds like he was accusing me
    "accusing" me
    Brian
    @brmendez
    yo
    Kolo13
    @Kolo13

    func createGround()
    {
    let groundTexture = SKTexture(imageNamed: "ground")
    groundTexture.filteringMode = .Nearest

    let moveSprite = SKAction.moveByX(-100 * 2.0, y: 0, duration: NSTimeInterval(0.01 * groundTexture.size().width * 2.0))
    let resetGroundSprite = SKAction.moveByX(groundTexture.size().width * 2.0, y: 0, duration: 0.0)
    let moveGroundSpritesForever = SKAction.repeatActionForever(SKAction.sequence([moveGroundSprite, resetGroundSprite]))
    
    for var i:CGFloat = 0; i < 2.0 + self.frame.size.width / (groundTexture.size().width * 2.0); ++i
    {
      let sprite = SKSpriteNode(texture: groundTexture)
      sprite.physicsBody = SKPhysicsBody(rectangleOfSize: CGSize(width: groundTexture.size().width, height: groundTexture.size().height/4))
      sprite.physicsBody!.dynamic = false
      sprite.setScale(2.0)
      sprite.position = CGPointMake(i * sprite.size.width, sprite.size.height / 2.0)
      sprite.runAction(moveGroundSpritesForever)
      moving.addChild(sprite)
    }

    }

     func createGround()
      {
        let groundTexture = SKTexture(imageNamed: "ground")
        groundTexture.filteringMode = .Nearest
    
        let moveSprite = SKAction.moveByX(-100 * 2.0, y: 0, duration: NSTimeInterval(0.01 * groundTexture.size().width * 2.0))
        let resetGroundSprite = SKAction.moveByX(groundTexture.size().width * 2.0, y: 0, duration: 0.0)
        let moveGroundSpritesForever = SKAction.repeatActionForever(SKAction.sequence([moveGroundSprite, resetGroundSprite]))
    
        for var i:CGFloat = 0; i < 2.0 + self.frame.size.width / (groundTexture.size().width * 2.0); ++i
        {
          let sprite = SKSpriteNode(texture: groundTexture)
          sprite.physicsBody = SKPhysicsBody(rectangleOfSize: CGSize(width: groundTexture.size().width, height: groundTexture.size().height/4))
          sprite.physicsBody!.dynamic = false
          sprite.setScale(2.0)
          sprite.position = CGPointMake(i * sprite.size.width, sprite.size.height / 2.0)
          sprite.runAction(moveGroundSpritesForever)
          moving.addChild(sprite)
        }
      }
    Punita Ojha
    @punitaojha
    This message was deleted