Skip to content

Instantly share code, notes, and snippets.

/*-----( 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
//Hugo Zeng
//2016/09/19
//[email protected]
int ledPin = 13;
void setup() {
pinMode(ledPin, OUTPUT);
Serial.begin(9600);
}
/*
<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');
import UIKit
import Alamofire
class RentViewController: UIViewController,UITableViewDataSource,UITableViewDelegate,NSURLSessionDataDelegate,NSURLSessionDelegate {
//class need add : UITextFieldDelegate
override func viewDidLoad() {
super.viewDidLoad()
//delegate
discountTextField.delegate = self
sizeTextField.delegate = self
//add gesture to view
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!
target 'ProjectName' do
pod 'Alamofire', '~> 3.4'
end
//UIButton
@IBOutlet weak var roofBtn: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
checkBoxBtnInit()
}
// check button init
func checkBoxBtnInit(){
// 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
<?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");
//class saleWebViewController: UIViewController, UIWebViewDelegate
@IBOutlet weak var spinner: UIActivityIndicatorView!
//網頁開始Load
func webViewDidStartLoad(webView: UIWebView) {
spinner.startAnimating() //開始轉
}
//網頁Load好了
func webViewDidFinishLoad(webView: UIWebView) {