This file contains hidden or 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 main | |
| import "fmt" | |
| // fibonacci is a function that returns | |
| // a function that returns an int. | |
| func fibonacci() func() int { | |
| a := 0 | |
| b := 0 |
This file contains hidden or 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
| export class AuthFormViewModel { | |
| email: string; | |
| password: string; | |
| } |
This file contains hidden or 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
| class ChatViewController: JSQMessagesViewController { | |
| // 訊息資料 | |
| var messages = [[String: Any]]() | |
| // 訊息記錄節點 | |
| var messageRef: FIRDatabaseReference! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| // Do any additional setup after loading the view. |
This file contains hidden or 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
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Net; | |
| using System.Net.Security; | |
| using System.Security.Cryptography.X509Certificates; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using UnityEngine; |
This file contains hidden or 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
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Threading; | |
| using UnityEngine; | |
| using UnityEngine.Networking; | |
| namespace Azure | |
| { | |
| public class Authentication |
This file contains hidden or 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
| // | |
| // GalleryTools.h | |
| // Unity-iPhone | |
| // | |
| // Created by 默司 on 2017/5/9. | |
| // | |
| // | |
| #import <Foundation/Foundation.h> |
This file contains hidden or 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 | |
| extension UIView { | |
| @discardableResult func constraint(attribute attr1: NSLayoutAttribute, relatedBy: NSLayoutRelation = .equal, toItem: Any? = nil, attribute attr2: NSLayoutAttribute? = nil, multiplier: CGFloat = 1, constant: CGFloat = 0) -> NSLayoutConstraint { | |
| self.translatesAutoresizingMaskIntoConstraints = false | |
| let attr = attr2 ?? attr1 | |
| return NSLayoutConstraint(item: self, attribute: attr1, relatedBy: relatedBy, toItem: toItem, attribute: attr, multiplier: multiplier, constant: constant) |
This file contains hidden or 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
| var Home = { | |
| Box: function () { | |
| this.color = 'black'; | |
| this.paint = function (value, cb) { | |
| // delay 3 seconds. | |
| //var now = new Date().getTime(); | |
| //while (new Date().getTime() < now + 3000) { | |
| // /* do nothing */ | |
| //} | |
| this.color = value; |
This file contains hidden or 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
| .yt-live-chat-renderer-0 { | |
| background: transparent; | |
| } | |
| .yt-live-chat-renderer { | |
| height: 0; | |
| padding: 0; | |
| font-size: 0; | |
| } |
This file contains hidden or 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
| // | |
| // VideoViewController.swift | |
| // SideMenuCALayerDemo | |
| // | |
| // Created by 默司 on 2017/3/1. | |
| // Copyright © 2017年 默司. All rights reserved. | |
| // | |
| import UIKit | |
| import AVFoundation |