Skip to content

Instantly share code, notes, and snippets.

@josephkandi
josephkandi / gist:d7a3fd178792de444caa
Created July 28, 2014 23:43
Android networking post to Twitter API
private static class PostToTwitter extends AsyncTask<Void,Void,String>{
@Override
protected String doInBackground(Void... string) {
// Uri builder = new Uri.Builder().authority("http://yamba.peruzal.co.za")
// .appendPath("api")
// .appendPath("statuses")
// .appendPath("update.xml")
// .build();
@josephkandi
josephkandi / gist:0d5057ccb5335816a058
Last active March 10, 2016 09:34 — forked from olivierlacan/gist:4062929
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
@josephkandi
josephkandi / gist:90e69689ab2b7693c5a5
Created January 20, 2016 06:59 — forked from Gregg/gist:968534
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
//This is a comment and will be ignored by the Java compiler
//The program is fully editable
//Try changing the 'Hello World, I'm a Java program'
//to your name and click the Run button
public class HelloWorld {
//This is the main function of a Java program.
//String[] is an array of strings.
//The variable args will contain command line arguments passed to the program
public static void main (String[] args) {
//The System.out.println() is used to print output to the console
class ByteDemo {
public static void main (String[] args) {
//The byte type store values in the range from -128 to 127
//We are creating a variable named maximumUsersPerGroup and storing the value 120
byte maximumUsersPerGroup = 120;
System.out.println("maximumUsersPerGroup value is " + maximumUsersPerGroup);
//TODO
//Try changing the value of maximumUsersPerGroup to 128 and Run again
//Create your own byte type variable
//This is an example comment, notice how the compiler ignores it
//There are two slashes(//) at the beginning of the line
//The slashes denote that this is a comment
public class CommentsDemo {
public static void main(String[] args) {
//System.out.println("I will show when am commented out");
//Run it, try removing the two slashes and run again
/*
class ByteDemo {
public static void main (String[] args) {
//The byte data type store values in the range from -128 to 127
//It saves memory in large arrays
//In this case there is no saving, we could have used an int type
byte maximumUsersPerGroup = 120;
System.out.println(maximumUsersPerGroup);
//Try changing the value to a number greater than 127 and Run again
//Try changing to a value less than -128 and Run again
}
class VariablesDemo {
public static void main (String[] args) {
//When creating variable you specify the data type first
//And then the variable name afterwards, separated by a space
//This defines a variable called total
int total;
//defines a price variable that stores a number with a decimal place
double price;
class MoreVariablesDemo {
public static void main (String[] args) {
//We can declare and assign to a variable in one line
//Instead of declaring a variable
//And then assigning a value in another line
int total = 100;
//Now, try declaring and assigning the price variable into one line
//As we have done for the total variable
double price;
class NumericsDemo {
public static void main (String[] args) {
//The numeric types store numbers without decimal places
//The byte store values in the range from -128 to 127
byte maximumUsersPerGroup = 120;
System.out.println("byte " + maximumUsersPerGroup);
//Try changing the value of maximumUsersPerGroup to 128 and Run again
//short type stores values in the range from -32768 to 32767
short maximumMessageLength = 5000;