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
/* | |
<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
//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
/*-----( 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
#include <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); | |
void setup() { | |
lcd.begin(16, 2); //define LCD Size 16 by 2 | |
// lcd line 1 |
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
#include "SPI.h" | |
#include "MFRC522.h" | |
#define SS_PIN 10 | |
#define RST_PIN 9 | |
#define SP_PIN 8 | |
MFRC522 rfid(SS_PIN, RST_PIN); | |
MFRC522::MIFARE_Key key; |
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
int number = 0 ; | |
void setup(){ | |
Serial.begin(9600); | |
} | |
void loop(){ | |
Serial.println(number); | |
number = number + 1; | |
delay(3000); |
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 | |
require 'vendor/autoload.php'; | |
const DEFAULT_URL = 'https://phpdemoccc-sd27f.firebaseio.com/'; | |
const DEFAULT_PATH = '/'; | |
$firebase = new \Firebase\FirebaseLib(DEFAULT_URL); | |
// --- get data --- | |
$k1 = $firebase->get('/k1'); |
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
#include <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE); | |
void setup() { | |
//Initialize serial library for transmitting and receiving data via USB | |
Serial.begin(9600); | |
lcd.begin(16, 2); //define LCD Size 16 by 2 |
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 serial | |
import time | |
ser = serial.Serial('/dev/tty.usbmodem1411', 9600) | |
time.sleep(1) | |
print ser.name |