// jQuery
$(document).ready(function() {
// 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
#Basic commands | |
git init //Initalize Local Git Repository | |
git add <file> //Add Files to index | |
git status //check status of working tree | |
git commit //commit changes in index | |
#remote commands | |
git push //push to remote Repository | |
git pull //pull latest from remote Repository | |
git clone //clone Repository into new directory |
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
[Unit] | |
Description=RFCOMM service | |
After=bluetooth.service | |
Requires=bluetooth.service | |
[Service] | |
ExecStartPre=/usr/bin/sdptool add --channel=3 SP | |
ExecStart=/usr/bin/rfcomm watch hci0 3 setsid /sbin/agetty -L rfcomm0 --keep-baud 115200,38400,9600 xterm -a pi | |
Restart=on-failure | |
RestartSec=5s |
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
#!/bin/bash | |
#vcgencmd measure_volts <id> | |
#Shows voltage. id can be one of core, sdram_c, sdram_i, sdram_p, and defaults to core if not specified | |
for id in core sdram_c sdram_i sdram_p ; do \ | |
echo -e "$id:\t$(vcgencmd measure_volts $id)" ; \ | |
done | |
#Shows core temperature of BCM2835 SoC. | |
vcgencmd measure_temp | |
#or |
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
# Python v3.4.2 console based script | |
# Set Raspberry Pi GPIO ports Low depending on user input | |
# User enters number between 0 and 15, GPIO ports 22, 23, 24 & 25 | |
# are set as BCD representations of the decimal input. | |
# GPIO ports are weighted 0, 2, 4, 8 [GPIO 22, 23, 24, 25] | |
# Number 99 entered quits the script | |
# GPIO ports connect to AD8-11 ports on HT12E encoder chip | |
# user input is BCD coded & used to set AD8-11 ports | |
# GPIO port 17 is used to send trigger pulse to activate the HT12E for 1 complete cycle |
Operation | Code |
---|---|
New List |
List<Integer> x = new ArrayList<Integer>(); |
Copy List |
List<Integer> x = new ArrayList<Integer>(y); |
Add an element to the List |
x.add(element) |
Get an elemenet from the List |
x.get(index) |
Clear the list | x.clear() |
New HashMap |
HashMap<Integer, String> x = new HashMap<Integer, String>(); |
Add element to the map | x.put(key, value) |
Get an element from the map | x.get(key) |
- Java Identifiers
- Data types
- How to define our own data type in java(enum)
- Variables
- Scope of Variables
- Loops in Java(Practice)
- For-each loop in Java
- For Loop in Java | Important points
- Decision Making(if, if-else, switch, break, continue, jump)(Practice)
- Switch Statement in Java(Practice)
This file will cover important coding practices that are important to stress when coding this program. Listed below are some of the more important details that should be stressed. Each programmer has his/her own way to deliver code. The importance of having similar coding conventions throughout this program are listed below.
- 80% of the time spent on a piece of software goes to maintenance.
- Hardly any software is maintained for its whole life by the original author.
- Code conventions improve the readability of the software, allowing engineers to understand new code more quickly and thoroughly.
- If you ship your source code as a product, you need to make sure it is as well packaged and clean as any other product you create.
OlderNewer