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
#! /usr/bin/python | |
from optparse import OptionParser | |
import os | |
import sys | |
__version__ = '1.1' | |
__author__ = 'Joe Vasquez <joe.vasquez@gmail.com>' | |
if __name__ == '__main__': |
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 put_together(): | |
print "---ENTERING LIST ASSEMBLY---" | |
together = currentbhl+afbhl | |
print "Lists joined. Sorting and removing duplicates..." | |
together_unique = sorted(list(set(together))) | |
print '%s duplicates found and removed' % (len(together) - len(together_unique)) | |
print "---EXITING LIST ASSEMBLY---" | |
return together |
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
String str; //string that has been provided | |
Char findeMe = 'a'; //character we're looking for | |
int count = 0; //number of times we found findMe | |
for(int i = 0; i < str.length(); i++) { | |
if(findMe.equals(str.charAt(i))) | |
count++; | |
} |
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
/**File name:PA2 ConvertDecimalstoBinary.java | |
Your name: Omar Aguilar | |
Instructor Name: Professor Grady | |
Date: 12/16/10 | |
Class Name: UMUC 141A851 | |
University Name: UMUC DE Asia | |
*/ | |
import javax.swing.JOptionPane; //import class for JOptionalPane |
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
<%--form.jsp--%> | |
<%@page session="false" import="java.util.Iterator"%> | |
<%--Retrieve the Status bean from the Request scope--%> | |
<jsp:useBean id="status" scope="request" class="util.Status"/> | |
<html> | |
<head><title>Registration Form</title></head> | |
<body> | |
<p><b>Registration Form</b></p> | |
<%--Verification error presentation | |
The Controller verifies the form parameters and adds Exception |
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
package web; | |
//Business logic component imports | |
import domain.Course; | |
import domain.Student; | |
import domain.RegisterService; | |
//Servlet imports | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; | |
import javax.servlet.ServletContext; |
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
//Course.java | |
//This domain object represents a course. The data attributes are | |
//all package-private to allow access to them in the CourseService class. | |
package domain; | |
public class Course implements java.io.Serializable { | |
int objectID; | |
String semester; | |
String number; | |
String title; | |
//The default constructor is public to be accessible from JSP View pages. |
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
//Status.java | |
package util; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
public class Status { | |
//The list of Exception objects | |
private ArrayList exceptions; | |
public Status() {exceptions=new ArrayList();} | |
public boolean isSuccessful() {return (exceptions.size()==0);} | |
public void addException(Exception ex) {exceptions.add(ex);} |
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
$(function(){ | |
$('#content').scrollPagination({ | |
'contentPage': 'democontent.html', // the url you are fetching the results | |
'contentData': {}, // these are the variables you can pass to the request, for example: children().size() to know which page you are | |
'scrollTarget': $(window), // who gonna scroll? in this example, the full window | |
'heightOffset': 10, // it gonna request when scroll is 10 pixels before the page ends | |
'beforeLoad': function(){ // before load function, you can display a preloader div | |
$('#loading').fadeIn(); | |
}, | |
'afterLoad': function(elementsLoaded){ // after loading content, you can use this function to animate your new elements |
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
/** | |
* Hello Generator | |
* | |
* Joe Vasquez <joe.vasquez@gmail.com> | |
* | |
* I wish I knew more assembly! | |
**/ | |
#include <fstream> | |
#include <iostream> |
OlderNewer