This file contains 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
const fieldValidations = [ | |
ruleRunner("name", "Name", required), | |
ruleRunner("emailAddress", "Email Address", required), | |
ruleRunner("password1", "Password", required, minLength(6)), | |
ruleRunner("password2", "Password Confirmation", mustMatch("password1", "Password")) | |
]; | |
export default class CreateAccount extends React.Component { | |
constructor() { | |
// ... |
This file contains 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
def foobar | |
hash = `git show --pretty=%h`.strip.upcase | |
contents = <<-eof | |
#ifndef VERSION_INFO_H | |
#define VERSION_INFO_H | |
#define CURRENT_GET_HASH "#{hash}" | |
#endif | |
eof | |
puts contents | |
end |
This file contains 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
// Mode options: SPI_LOOP, SPI_CPHA, SPI_CPOL, SPI_LSB_FIRST, | |
// SPI_CS_HIGH, SPI_3WIRE, SPI_NO_CS, SPI_READY | |
static uint8_t mode = SPI_CPHA; | |
static uint8_t bits = 8; | |
static uint32_t speed = 3000000; | |
static uint16_t delay = 0; | |
SPI_RESULT_T SPI_DoTransfer(char * device, uint8_t * p_rx_buf, uint8_t * p_tx_buf, uint32_t len) | |
{ | |
int fd; |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<script src="./public/jquery/jquery-2.1.0.min.js"></script> | |
<script type="text/javascript" src="public/jqplot/jquery.jqplot.min.js"></script> | |
<script type="text/javascript" src="public/jqplot/jqplot.canvasTextRenderer.min.js"></script> | |
<script type="text/javascript" src="public/jqplot/jqplot.canvasAxisLabelRenderer.min.js"></script> | |
<script type="text/javascript" src="public/jqplot/jqplot.dateAxisRenderer.min.js"></script> | |
<script type="text/javascript" src="public/jqplot/jqplot.pointLabels.min.js"></script> | |
<script type="text/javascript" src="public/jqplot/jqplot.canvasOverlay.min.js"></script> |
This file contains 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
:commmon: &common_defines | |
- __PIC24HJ128GP202__ | |
- UNITY_INT_WIDTH=16 | |
- CMOCK_MEM_INDEX_TYPE=uint16_t | |
- CMOCK_MEM_PTR_AS_INT=uint16_t | |
- CMOCK_MEM_ALIGN=1 | |
- CMOCK_MEM_SIZE=4096 |
This file contains 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 <string.h> | |
#include <stdio.h> | |
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
#include "rapidxml-1.13/rapidxml.hpp" | |
using namespace rapidxml; | |
using namespace std; |
This file contains 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
require 'win32ole' # this allows us to create instances of Windows COM objects | |
# create instances of each of our drivers | |
$filt = WIN32OLE.new("ASCOM.Simulator.FilterWheel") | |
$foc = WIN32OLE.new("ASCOM.Simulator.Focuser") | |
$tele = WIN32OLE.new("ASCOM.Simulator.Telescope") | |
$cam = WIN32OLE.new("ASCOM.Simulator.Camera") | |
# a function that disconnects from each connected device | |
def DisconnectAllDevices() |