This document describes rules and recommendations for developing applications and class libraries using the C# Language. The goal is to define guidelines to enforce consistent style and formatting and help developers avoid common pitfalls and mistakes. Specifically, this document covers Naming Conventions, Coding Style, Language Usage, and Object Model Design. This document was adapted from the Lance Hunt .NET Coding Standards.
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
# Macro for Unity YAML-based asset files. | |
[attr]unityyaml -text merge=unityyamlmerge diff | |
# Macro for all binary files that should use Git LFS. | |
[attr]lfs -text filter=lfs diff=lfs merge=lfs | |
# Default to auto-normalized line endings. | |
* text=auto | |
# Code |
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
proc float randAbout(float $range, float $centre) { | |
// Generate random numbers within a range | |
return rand(-$range/2, $range/2) + $centre; | |
} | |
proc string pad4(int $i) { | |
// Pad an int with zeros up to length 4 | |
return `python ("'%04d' % "+string($i))`; | |
} |
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
$InputString = 'TVqQAAMAAAAEAAAA//8AALgAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAAAA4fug4AtAnNIbgBTM0hVGhpcyBwcm9ncmFtIGNhbm5vdCBiZSBydW4gaW4gRE9TIG1vZGUuDQ0KJAAAAAAAAAA1BO7HcWWAlHFlgJRxZYCU4isYlHBlgJQeEyuUU2WAlB4THpR6ZYCUeB0TlHplgJRxZYGU7GWAlB4TKpThZYCUHhMalHBlgJQeEx2UcGWAlFJpY2hxZYCUAAAAAAAAAAAAAAAAAAAAAFBFAABkhgYAjJuBUgAAAAAAAAAA8AAiAAsCCgAA8gEAAIoBAAAAAACkIQEAABAAAAAAAEABAAAAABAAAAACAAAFAAIAAAAAAAUAAgAAAAAAANADAAAEAAAAAAAAAwBAgQAAEAAAAAAAABAAAAAAAAAAABAAAAAAAAAQAAAAAAAAAAAAABAAAAAAAAAAAAAAANhBAgB4AAAAABADAHCoAAAA8AIAWBEAAAAAAAAAAAAAAMADAMwBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAIA2AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC50ZXh0AAAAZPABAAAQAAAA8gEAAAQAAAAAAAAAAAAAAAAAACAAAGAucmRhdGEAAFpCAAAAEAIAAEQAAAD2AQAAAAAAAAAAAAAAAABAAABALmRhdGEAAAAIggAAAGACAABUAAAAOgIAAAAAAAAAAAAAAAAAQAAAwC5wZGF0YQAAWBEAAADwAgAAEgAAAI4CAAAAAAAAAAAAAAAAAEAAAEAucnNyYwAAAHCoAAAAEAMAAKoAAACgAgAAAAAAAAAAAAAAAABAAABALnJlbG9jAACwBAAAAMADAAAGAAAASgMAAAAAAAAAAAAAAAAAQAAAQgAAAAAAAAAAAAAAAAAAAAAAAAAA |
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
#pragma config(I2C_Usage, I2C1, i2cSensors) | |
#pragma config(Sensor, I2C_1, armEncoder, sensorQuadEncoderOnI2CPort, , AutoAssign) | |
#pragma config(Motor, port1, rightFrontMotor, tmotorVex393_HBridge, openLoop) | |
#pragma config(Motor, port2, leftFrontMotor, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port3, rightBackMotor, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port4, rightArmMotor, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port5, leftIntakeMotor, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port6, rightIntakeMotor, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port7, clawLiftMotor, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port8, leftArmMotor, tmotorVex393_MC29, openLoop, encoderPort, I2C_1) |
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
#pragma config(I2C_Usage, I2C1, i2cSensors) | |
#pragma config(Sensor, I2C_1, armEncoder, sensorQuadEncoderOnI2CPort, , AutoAssign) | |
#pragma config(Motor, port1, rightFrontMotor, tmotorVex393_HBridge, openLoop) | |
#pragma config(Motor, port2, leftFrontMotor, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port3, rightBackMotor, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port4, rightArmMotor, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port5, leftIntakeMotor, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port6, rightIntakeMotor, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port7, clawLiftMotor, tmotorVex393_MC29, openLoop) | |
#pragma config(Motor, port8, leftArmMotor, tmotorVex393_MC29, openLoop, encoderPort, I2C_1) |
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
<?php | |
$sname = "localhost"; | |
$usname = "root"; | |
$pword = ""; | |
$db = "day_ok"; | |
$conn = new mysqli($sname,$usname,$pword,$db); | |
$dat = date('j'); | |
$mon = date('n'); | |
$sql = "SELECT name from `dates` where date=".$dat." AND month=".$mon.";"; | |
$res = $conn->query($sql); |