C# read only Serial port when data comes

public static void Main() { SerialPort mySerialPort = new SerialPort(“COM1”); mySerialPort.BaudRate = 9600; mySerialPort.Parity = Parity.None; mySerialPort.StopBits = StopBits.One; mySerialPort.DataBits = 8; mySerialPort.Handshake = Handshake.None; mySerialPort.DataReceived += new SerialDataReceivedEventHandler(DataReceivedHandler); mySerialPort.Open(); Console.WriteLine(“Press any key to continue…”); Console.WriteLine(); Console.ReadKey(); mySerialPort.Close(); } private static void DataReceivedHandler(object sender, SerialDataReceivedEventArgs e) { SerialPort sp = (SerialPort)sender; string indata = sp.ReadExisting();… Read More C# read only Serial port when data comes

How to upgrade your version of PHP to 7.0 on macOS Sierra

Usually, with a fresh version of macOS Sierra, you get a PHP 5.6 installed. You’ve got two options: brew or curl install Brew brew update && brew upgrade brew tap homebrew/dupes brew tap homebrew/versions brew tap homebrew/homebrew-php brew unlink php56 brew install php70 You might get an error if PHP 5.6 has not been installed by brew previously, but… Read More How to upgrade your version of PHP to 7.0 on macOS Sierra

Tổng hợp các trang web đăng ký VPS free mới nhất 2017

Thời gian gần đây , mình có giới thiệu danh sách nhà cung cấp vps free tốt nhất . Nhưng hiện tại các trang web đó đã dừng cung cấp miển phí và ra nhiều chính sách khuyến mãi khác . Hôm nay mình sẽ update thêm nhiều trang web cho reg vps với hệ điều hành Windows… Read More Tổng hợp các trang web đăng ký VPS free mới nhất 2017

How to get values which are in TextInput when Button is click in ReactNative

First you have to stock your data in a state. example: <TextInput style={styles.textInputStyle} placeholder=”Enter Name” returnKeyLabel = {“next”} onChangeText={(text) => this.setState({text})} /> Then you must pass a function that will execute when you click on the button like this: <Button onPress={() => function }> recover your value with : this.state.key example: class AwesomeProject extends Component {… Read More How to get values which are in TextInput when Button is click in ReactNative

macOS 10.12 Sierra Apache Setup: SSL

Part 3: macOS 10.12 Sierra Web Development Environment This is an updated version of our prior OS X development series. The newly released macOS 10.12 Sierra requires significant changes compared to prior releases, necessitating a thorough revamp in the process. The main change is why now use Homebrew’s Apache, rather than the built-in version, but it… Read More macOS 10.12 Sierra Apache Setup: SSL