Tags » Wrapper

Starting with virtual environments virtualenv

## Install virtual environments

sudo pip install virtualenv

## Excecute and append this line to .profile file in your home. If the file does not exist just create it. 54 more words

Installations

import java.awt.Color;
import java.util.*;
public class Person {

	private String name;
	private Color colour;
	private int numberOfSteps;
	private int getXCoord;
	private int getYCoord;

	public Person(String nm, Color clr, int numSt, int xPos, int yPos) {
		name = nm;
		colour = clr;
		numberOfSteps = numSt;
		getXCoord = xPos;
		getYCoord = yPos;

	}

	public void moveRandomly() {
		getXCoord = (int) ((Math.random()*590) + numberOfSteps);
		getYCoord = (int) ((Math.random()*395) + numberOfSteps);

	}

	public int getLocationX() {
		return getXCoord;
	}

	public int getLocationY() {
		return getYCoord;
	}

	public Color getColor() {
		return colour;
	}

}

CSE143
public class GroceryItemOrder {

	private String itm;
	private int qty;
	private double ppu;

	public GroceryItemOrder(String name, int quantity,
			                double pricePerUnit) {

		itm = name;
		qty = quantity;
		ppu = pricePerUnit;

	}

	public double getCost() {

		double total = qty * ppu;
		return total;

	}

	public void setQuantity(int quantity) {

		qty = quantity;

	}

}
CSE143

public class GroceryShopping {

	public static void main(String[] args) {
		GroceryList shopList = new GroceryList();

		//I'm a cookie monster...
		GroceryItemOrder cookies = new GroceryItemOrder("cookie", 4, 2.50);
		GroceryItemOrder milk = new GroceryItemOrder("milk", 2, 3.00);

		shopList.add(cookies);
		shopList.add(milk);

		double totalBill = shopList.getTotalCost();
		String bill = totalBill+"";

		System.out.println("Your total grocery bill is = $"+bill);

	}

}
CSE143
public class GroceryList {

	private GroceryItemOrder[] itemList;
	private int last;
	public GroceryList() {
		itemList = new GroceryItemOrder;
		last = 0;
	}

	// we assume if the grocery list has less than 10
	// items, otherwise we'll raise illegal args exception. 71 more words
CSE143

Starting with Django + mysql on mac osx

## install pip

  • sudo easy_install pip

## install mysql

  • Download Mysql from http://dev.mysql.com/downloads/mysql/
  • Run the package

## Start mysql server

  • sudo /usr/local/mysql/support-files/mysql.server start
  • 176 more words
Installations

A Gourmet Wrapper For Gourmet Cupcakes

(EMAILWIRE.COM, January 28, 2015 ) Eatonville, WA — In 2003, an interesting new trend was peaking: Gourmet Cupcakes. It was the year when one, now popular, gourmet cupcake store opened it’s doors in Manhattan, NY. 20 more words