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 needed libraries )-----*/ | |
#include <SoftwareSerial.h> | |
/*-----( Declare Constants and Pin Numbers )-----*/ | |
#define SSerialRX 10 //Serial Receive pin RO (receive out) | |
#define SSerialTX 11 //Serial Transmit pin DI (data in) | |
#define SSerialTxControl 3 //RS485 Direction control (DE&RE jump together to pin3) | |
#define RS485Transmit HIGH // status : send data via 485 |
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
//Hugo Zeng | |
//2016/09/19 | |
//[email protected] | |
int ledPin = 13; | |
void setup() { | |
pinMode(ledPin, OUTPUT); | |
Serial.begin(9600); | |
} |
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
/* | |
<div class="div1"></div> | |
<div class="div2" id="Header"></div> | |
<div class="div3" id="someDiv"></div> | |
*/ | |
<script> | |
window.addEventListener('scroll', function(ev) { | |
var someDiv = document.getElementById('someDiv'); |
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 | |
import Alamofire | |
class RentViewController: UIViewController,UITableViewDataSource,UITableViewDelegate,NSURLSessionDataDelegate,NSURLSessionDelegate { | |
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 need add : UITextFieldDelegate | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
//delegate | |
discountTextField.delegate = self | |
sizeTextField.delegate = self | |
//add gesture to 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
source 'https://github.com/CocoaPods/Specs.git' | |
platform :ios, '9.0' | |
use_frameworks! | |
target 'ProjectName' do | |
pod 'Alamofire', '~> 3.4' | |
end |
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
//UIButton | |
@IBOutlet weak var roofBtn: UIButton! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
checkBoxBtnInit() | |
} | |
// check button init | |
func checkBoxBtnInit(){ |
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
// IRR swift version | |
// [email protected] | |
// reference http://www.codeproject.com/Tips/461049/Internal-Rate-of-Return-IRR-Calculation | |
// 2016/06/23 | |
import UIKit | |
func computeIRR(cashFlows:[Int],numOfFlows:Int) -> Double{ | |
//const |
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
<?php | |
/* Set Connection Credentials */ | |
$serverName = "(local)"; //Local database | |
$connectionInfo = array( "Database"=>"your_DatabaseName", "CharacterSet" =>"UTF-8"); // /* SET database name */ | |
/* For Cloud Connection Credentials */ | |
//$serverName = "192.168.1.4\SQLEXPRESS,1433"; // /* SET IP */ | |
//$connectionInfo = array( "Database"=>"DB_name", "UID"=>"your_id", "PWD"=>"your_pwd" ,"CharacterSet" =>"UTF-8"); |
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 saleWebViewController: UIViewController, UIWebViewDelegate | |
@IBOutlet weak var spinner: UIActivityIndicatorView! | |
//網頁開始Load | |
func webViewDidStartLoad(webView: UIWebView) { | |
spinner.startAnimating() //開始轉 | |
} | |
//網頁Load好了 | |
func webViewDidFinishLoad(webView: UIWebView) { |