text:
// ===================================================================
// Author: Matt Kruse <matt@mattkruse.com>
// WWW: http://www.mattkruse.com/
//
// NOTICE: You may use this code for any purpose, commercial or
// private, without any further permission from the author. You may
// remove this notice from your final code if you wish, however it is
// appreciated by the author if at least my web site address is kept.
//
// You may *NOT* re-distribute this code in any way except through its
// use. That means, you can include it in your product, or your web
// site, or any other form where the code is actually being used. You
// may not put the plain javascript up on your site for download or
// include it in your javascript libraries for download.
// If you wish to share this code with others, please just point them
// to the URL instead.
// Please DO NOT link directly to my .js files from your site. Copy
// the files to your server and use them there. Thank you.
// ===================================================================

/* SOURCE FILE: AnchorPosition.js */

/*
AnchorPosition.js
Author: Matt Kruse
Last modified: 10/11/02

DESCRIPTION: These functions find the position of an  tag in a document,
so other elements can be positioned relative to it.

COMPATABILITY: Netscape 4.x,6.x,Mozilla, IE 5.x,6.x on Windows. Some small
positioning errors - usually with Window positioning - occur on the
Macintosh platform.

FUNCTIONS:
getAnchorPosition(anchorname)
  Returns an Object() having .x and .y properties of the pixel coordinates
  of the upper-left corner of the anchor. Position is relative to the PAGE.

getAnchorWindowPosition(anchorname)
  Returns an Object() having .x and .y properties of the pixel coordinates
  of the upper-left corner of the anchor, relative to the WHOLE SCREEN.

NOTES:

1) For popping up separate browser windows, use getAnchorWindowPosition.
   Otherwise, use getAnchorPosition

2) Your anchor tag MUST contain both NAME and ID attributes which are the
   same. For example:

3) There must be at least a space between   for IE5.5 to see the
   anchor tag correctly. Do not do  with no space.
*/

// getAnchorPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the page.
function getAnchorPosition(anchorname) {
	// This function will return an Object with x and y properties
	var useWindow=false;
	var coordinates=new Object();
	var x=0,y=0;
	// Browser capability sniffing
	var use_gebi=false, use_css=false, use_layers=false;
	if (document.getElementById) { use_gebi=true; }
	else if (document.all) { use_css=true; }
	else if (document.layers) { use_layers=true; }
	// Logic to find position
 	if (use_gebi && document.all) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_gebi) {
		var o=document.getElementById(anchorname);
		x=AnchorPosition_getPageOffsetLeft(o);
		y=AnchorPosition_getPageOffsetTop(o);
		}
 	else if (use_css) {
		x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]);
		y=AnchorPosition_getPageOffsetTop(document.all[anchorname]);
		}
	else if (use_layers) {
		var found=0;
		for (var i=0; i<document.anchors.length; i++) {
			if (document.anchors[i].name==anchorname) { found=1; break; }
			}
		if (found==0) {
			coordinates.x=0; coordinates.y=0; return coordinates;
			}
		x=document.anchors[i].x;
		y=document.anchors[i].y;
		}
	else {
		coordinates.x=0; coordinates.y=0; return coordinates;
		}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
	}

// getAnchorWindowPosition(anchorname)
//   This function returns an object having .x and .y properties which are the coordinates
//   of the named anchor, relative to the window
function getAnchorWindowPosition(anchorname) {
	var coordinates=getAnchorPosition(anchorname);
	var x=0;
	var y=0;
	if (document.getElementById) {
		if (isNaN(window.screenX)) {
			if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
				x=coordinates.x-document.body.scrollLeft+window.screenLeft;
				y=coordinates.y-document.body.scrollTop+window.screenTop;
				}
			else if ( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
				x=coordinates.x-document.documentElement.scrollLeft+window.screenLeft;
				y=coordinates.y-document.documentElement.scrollTop+window.screenTop;
				}
			}
		else {
			x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
			y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
			}
		}
	else if (document.all) {
		x=coordinates.x-document.body.scrollLeft+window.screenLeft;
		y=coordinates.y-document.body.scrollTop+window.screenTop;
		}
	else if (document.layers) {
		x=coordinates.x+window.screenX+(window.outerWidth-window.innerWidth)-window.pageXOffset;
		y=coordinates.y+window.screenY+(window.outerHeight-24-window.innerHeight)-window.pageYOffset;
		}
	coordinates.x=x;
	coordinates.y=y;
	return coordinates;
	}

// Functions for IE to get position of an object
function AnchorPosition_getPageOffsetLeft (el) {
	var ol=el.offsetLeft;
	while ((el=el.offsetParent) != null) { ol += el.offsetLeft; }
	return ol;
	}
function AnchorPosition_getWindowOffsetLeft (el) {
	return AnchorPosition_getPageOffsetLeft(el)-document.body.scrollLeft;
	}
function AnchorPosition_getPageOffsetTop (el) {
	var ot=el.offsetTop;
	while((el=el.offsetParent) != null) { ot += el.offsetTop; }
	return ot;
	}
function AnchorPosition_getWindowOffsetTop (el) {
	return AnchorPosition_getPageOffsetTop(el)-document.body.scrollTop;
	}

/* SOURCE FILE: date.js */

// HISTORY
// ------------------------------------------------------------------
// May 17, 2003: Fixed bug in parseDate() for dates <1970
// March 11, 2003: Added parseDate() function
// March 11, 2003: Added "NNN" formatting option. Doesn't match up
//                 perfectly with SimpleDateFormat formats, but
//                 backwards-compatability was required.

// ------------------------------------------------------------------
// These functions use the same 'format' strings as the
// java.text.SimpleDateFormat class, with minor exceptions.
// The format string consists of the following abbreviations:
//
// Field        | Full Form          | Short Form
// -------------+--------------------+-----------------------
// Year         | yyyy (4 digits)    | yy (2 digits), y (2 or 4 digits)
// Month        | MMM (name or abbr.)| MM (2 digits), M (1 or 2 digits)
//              | NNN (abbr.)        |
// Day of Month | dd (2 digits)      | d (1 or 2 digits)
// Day of Week  | EE (name)          | E (abbr)
// Hour (1-12)  | hh (2 digits)      | h (1 or 2 digits)
// Hour (0-23)  | HH (2 digits)      | H (1 or 2 digits)
// Hour (0-11)  | KK (2 digits)      | K (1 or 2 digits)
// Hour (1-24)  | kk (2 digits)      | k (1 or 2 digits)
// Minute       | mm (2 digits)      | m (1 or 2 digits)
// Second       | ss (2 digits)      | s (1 or 2 digits)
// AM/PM        | a                  |
//
// NOTE THE DIFFERENCE BETWEEN MM and mm! Month=MM, not mm!
// Examples:
//  "MMM d, y" matches: January 01, 2000
//                      Dec 1, 1900
//                      Nov 20, 00
//  "M/d/yy"   matches: 01/20/00
//                      9/2/00
//  "MMM dd, yyyy hh:mm:ssa" matches: "January 01, 2000 12:30:45AM"
// ------------------------------------------------------------------

var MONTH_NAMES=new Array('January','February','March','April','May','June','July','August','September','October','November','December','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
var DAY_NAMES=new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sun','Mon','Tue','Wed','Thu','Fri','Sat');
function LZ(x) {return(x<0||x>9?"":"0")+x}

// ------------------------------------------------------------------
// isDate ( date_string, format_string )
// Returns true if date string matches format of format string and
// is a valid date. Else returns false.
// It is recommended that you trim whitespace around the value before
// passing it to this function, as whitespace is NOT ignored!
// ------------------------------------------------------------------
function isDate(val,format) {
	var date=getDateFromFormat(val,format);
	if (date==0) { return false; }
	return true;
	}

// -------------------------------------------------------------------
// compareDates(date1,date1format,date2,date2format)
//   Compare two date strings to see which is greater.
//   Returns:
//   1 if date1 is greater than date2
//   0 if date2 is greater than date1 of if they are the same
//  -1 if either of the dates is in an invalid format
// -------------------------------------------------------------------
function compareDates(date1,dateformat1,date2,dateformat2) {
	var d1=getDateFromFormat(date1,dateformat1);
	var d2=getDateFromFormat(date2,dateformat2);
	if (d1==0 || d2==0) {
		return -1;
		}
	else if (d1 > d2) {
		return 1;
		}
	return 0;
	}

// ------------------------------------------------------------------
// formatDate (date_object, format)
// Returns a date in the output format specified.
// The format string uses the same abbreviations as in getDateFromFormat()
// ------------------------------------------------------------------
function formatDate(date,format) {
	format=format+"";
	var result="";
	var i_format=0;
	var c="";
	var token="";
	var y=date.getYear()+"";
	var M=date.getMonth()+1;
	var d=date.getDate();
	var E=date.getDay();
	var H=date.getHours();
	var m=date.getMinutes();
	var s=date.getSeconds();
	var yyyy,yy,MMM,MM,dd,hh,h,mm,ss,ampm,HH,H,KK,K,kk,k;
	// Convert real date parts into formatted versions
	var value=new Object();
	if (y.length < 4) {y=""+(y-0+1900);}
	value["y"]=""+y;
	value["yyyy"]=y;
	value["yy"]=y.substring(2,4);
	value["M"]=M;
	value["MM"]=LZ(M);
	value["MMM"]=MONTH_NAMES[M-1];
	value["NNN"]=MONTH_NAMES[M+11];
	value["d"]=d;
	value["dd"]=LZ(d);
	value["E"]=DAY_NAMES[E+7];
	value["EE"]=DAY_NAMES[E];
	value["H"]=H;
	value["HH"]=LZ(H);
	if (H==0){value["h"]=12;}
	else if (H>12){value["h"]=H-12;}
	else {value["h"]=H;}
	value["hh"]=LZ(value["h"]);
	if (H>11){value["K"]=H-12;} else {value["K"]=H;}
	value["k"]=H+1;
	value["KK"]=LZ(value["K"]);
	value["kk"]=LZ(value["k"]);
	if (H > 11) { value["a"]="PM"; }
	else { value["a"]="AM"; }
	value["m"]=m;
	value["mm"]=LZ(m);
	value["s"]=s;
	value["ss"]=LZ(s);
	while (i_format < format.length) {
		c=format.charAt(i_format);
		token="";
		while ((format.charAt(i_format)==c) && (i_format < format.length)) {
			token += format.charAt(i_format++);
			}
		if (value[token] != null) { result=result + value[token]; }
		else { result=result + token; }
		}
	return result;
	}

// ------------------------------------------------------------------
// Utility functions for parsing in getDateFromFormat()
// ------------------------------------------------------------------
function _isInteger(val) {
	var digits="1234567890";
	for (var i=0; i < val.length; i++) {
		if (digits.indexOf(val.charAt(i))==-1) { return false; }
		}
	return true;
	}
function _getInt(str,i,minlength,maxlength) {
	for (var x=maxlength; x>=minlength; x--) {
		var token=str.substring(i,i+x);
		if (token.length < minlength) { return null; }
		if (_isInteger(token)) { return token; }
		}
	return null;
	}

// ------------------------------------------------------------------
// getDateFromFormat( date_string , format_string )
//
// This function takes a date string and a format string. It matches
// If the date string matches the format string, it returns the
// getTime() of the date. If it does not match, it returns 0.
// ------------------------------------------------------------------
function getDateFromFormat(val,format) {
	val=val+"";
	format=format+"";
	var i_val=0;
	var i_format=0;
	var c="";
	var token="";
	var token2="";
	var x,y;
	var now=new Date();
	var year=now.getYear();
	var month=now.getMonth()+1;
	var date=1;
	var hh=now.getHours();
	var mm=now.getMinutes();
	var ss=now.getSeconds();
	var ampm="";

	while (i_format < format.length) {
		// Get next token from format string
		c=format.charAt(i_format);
		token="";
		while ((format.charAt(i_format)==c) && (i_format < format.length)) {
			token += format.charAt(i_format++);
			}
		// Extract contents of value based on format token
		if (token=="yyyy" || token=="yy" || token=="y") {
			if (token=="yyyy") { x=4;y=4; }
			if (token=="yy")   { x=2;y=2; }
			if (token=="y")    { x=2;y=4; }
			year=_getInt(val,i_val,x,y);
			if (year==null) { return 0; }
			i_val += year.length;
			if (year.length==2) {
				if (year > 70) { year=1900+(year-0); }
				else { year=2000+(year-0); }
				}
			}
		else if (token=="MMM"||token=="NNN"){
			month=0;
			for (var i=0; i<MONTH_NAMES.length; i++) {
				var month_name=MONTH_NAMES[i];
				if (val.substring(i_val,i_val+month_name.length).toLowerCase()==month_name.toLowerCase()) {
					if (token=="MMM"||(token=="NNN"&&i>11)) {
						month=i+1;
						if (month>12) { month -= 12; }
						i_val += month_name.length;
						break;
						}
					}
				}
			if ((month < 1)||(month>12)){return 0;}
			}
		else if (token=="EE"||token=="E"){
			for (var i=0; i<DAY_NAMES.length; i++) {
				var day_name=DAY_NAMES[i];
				if (val.substring(i_val,i_val+day_name.length).toLowerCase()==day_name.toLowerCase()) {
					i_val += day_name.length;
					break;
					}
				}
			}
		else if (token=="MM"||token=="M") {
			month=_getInt(val,i_val,token.length,2);
			if(month==null||(month<1)||(month>12)){return 0;}
			i_val+=month.length;}
		else if (token=="dd"||token=="d") {
			date=_getInt(val,i_val,token.length,2);
			if(date==null||(date<1)||(date>31)){return 0;}
			i_val+=date.length;}
		else if (token=="hh"||token=="h") {
			hh=_getInt(val,i_val,token.length,2);
			if(hh==null||(hh<1)||(hh>12)){return 0;}
			i_val+=hh.length;}
		else if (token=="HH"||token=="H") {
			hh=_getInt(val,i_val,token.length,2);
			if(hh==null||(hh<0)||(hh>23)){return 0;}
			i_val+=hh.length;}
		else if (token=="KK"||token=="K") {
			hh=_getInt(val,i_val,token.length,2);
			if(hh==null||(hh<0)||(hh>11)){return 0;}
			i_val+=hh.length;}
		else if (token=="kk"||token=="k") {
			hh=_getInt(val,i_val,token.length,2);
			if(hh==null||(hh<1)||(hh>24)){return 0;}
			i_val+=hh.length;hh--;}
		else if (token=="mm"||token=="m") {
			mm=_getInt(val,i_val,token.length,2);
			if(mm==null||(mm<0)||(mm>59)){return 0;}
			i_val+=mm.length;}
		else if (token=="ss"||token=="s") {
			ss=_getInt(val,i_val,token.length,2);
			if(ss==null||(ss<0)||(ss>59)){return 0;}
			i_val+=ss.length;}
		else if (token=="a") {
			if (val.substring(i_val,i_val+2).toLowerCase()=="am") {ampm="AM";}
			else if (val.substring(i_val,i_val+2).toLowerCase()=="pm") {ampm="PM";}
			else {return 0;}
			i_val+=2;}
		else {
			if (val.substring(i_val,i_val+token.length)!=token) {return 0;}
			else {i_val+=token.length;}
			}
		}
	// If there are any trailing characters left in the value, it doesn't match
	if (i_val != val.length) { return 0; }
	// Is date valid for month?
	if (month==2) {
		// Check for leap year
		if ( ( (year%4==0)&&(year%100 != 0) ) || (year%400==0) ) { // leap year
			if (date > 29){ return 0; }
			}
		else { if (date > 28) { return 0; } }
		}
	if ((month==4)||(month==6)||(month==9)||(month==11)) {
		if (date > 30) { return 0; }
		}
	// Correct hours value
	if (hh<12 && ampm=="PM") { hh=hh-0+12; }
	else if (hh>11 && ampm=="AM") { hh-=12; }
	var newdate=new Date(year,month-1,date,hh,mm,ss);
	return newdate.getTime();
	}

// ------------------------------------------------------------------
// parseDate( date_string [, prefer_euro_format] )
//
// This function takes a date string and tries to match it to a
// number of possible date formats to get the value. It will try to
// match against the following international formats, in this order:
// y-M-d   MMM d, y   MMM d,y   y-MMM-d   d-MMM-y  MMM d
// M/d/y   M-d-y      M.d.y     MMM-d     M/d      M-d
// d/M/y   d-M-y      d.M.y     d-MMM     d/M      d-M
// A second argument may be passed to instruct the method to search
// for formats like d/M/y (european format) before M/d/y (American).
// Returns a Date object or null if no patterns match.
// ------------------------------------------------------------------
function parseDate(val) {
	var preferEuro=(arguments.length==2)?arguments[1]:false;
	generalFormats=new Array('y-M-d','MMM d, y','MMM d,y','y-MMM-d','d-MMM-y','MMM d');
	monthFirst=new Array('M/d/y','M-d-y','M.d.y','MMM-d','M/d','M-d');
	dateFirst =new Array('d/M/y','d-M-y','d.M.y','d-MMM','d/M','d-M');
	var checkList=new Array('generalFormats',preferEuro?'dateFirst':'monthFirst',preferEuro?'monthFirst':'dateFirst');
	var d=null;
	for (var i=0; i<checkList.length; i++) {
		var l=window[checkList[i]];
		for (var j=0; j<l.length; j++) {
			d=getDateFromFormat(val,l[j]);
			if (d!=0) { return new Date(d); }
			}
		}
	return null;
	}

/* SOURCE FILE: PopupWindow.js */

/*
PopupWindow.js
Author: Matt Kruse
Last modified: 02/16/04

DESCRIPTION: This object allows you to easily and quickly popup a window
in a certain place. The window can either be a DIV or a separate browser
window.

COMPATABILITY: Works with Netscape 4.x, 6.x, IE 5.x on Windows. Some small
positioning errors - usually with Window positioning - occur on the
Macintosh platform. Due to bugs in Netscape 4.x, populating the popup
window with \n";
	return result;
	}

// Return a string containing all the calendar code to be displayed
function CP_getCalendar() {
	var now = new Date();
	// Reference to window
	if (this.type == "WINDOW") { var windowref = "window.opener."; }
	else { var windowref = ""; }
	var result = "";
	// If POPUP, write entire HTML document
	if (this.type == "WINDOW") {
		result += "<TITLE>Calendar</TITLE>"+this.getStyles()+"\n";
		result += '
\n';
		}
	else {
		result += '
\n';
		result += '
\n';
		result += '\n';
		}
	// Code for DATE display (default)
	// -------------------------------
	if (this.displayType=="date" || this.displayType=="week-end") {
		if (this.currentDate==null) { this.currentDate = now; }
		if (arguments.length > 0) { var month = arguments[0]; }
			else { var month = this.currentDate.getMonth()+1; }
		if (arguments.length > 1 && arguments[1]>0 && arguments[1]-0==arguments[1]) { var year = arguments[1]; }
			else { var year = this.currentDate.getFullYear(); }
		var daysinmonth= new Array(0,31,28,31,30,31,30,31,31,30,31,30,31);
		if ( ( (year%4 == 0)&&(year%100 != 0) ) || (year%400 == 0) ) {
			daysinmonth[2] = 29;
			}
		var current_month = new Date(year,month-1,1);
		var display_year = year;
		var display_month = month;
		var display_date = 1;
		var weekday= current_month.getDay();
		var offset = 0;

		offset = (weekday >= this.weekStartDay) ? weekday-this.weekStartDay : 7-this.weekStartDay+weekday ;
		if (offset > 0) {
			display_month--;
			if (display_month < 1) { display_month = 12; display_year--; }
			display_date = daysinmonth[display_month]-offset+1;
			}
		var next_month = month+1;
		var next_month_year = year;
		if (next_month > 12) { next_month=1; next_month_year++; }
		var last_month = month-1;
		var last_month_year = year;
		if (last_month < 1) { last_month=12; last_month_year--; }
		var date_class;
		if (this.type!="WINDOW") {
			result += "
";
			}
		result += '
\n';
		var refresh = windowref+'CP_refreshCalendar';
		var refreshLink = 'javascript:' + refresh;
		if (this.isShowNavigationDropdowns) {
			result += '<select CLASS="'+this.cssPrefix+'cpMonthNavigation" name="cpMonth" onChange="'+refresh+'('+this.index+',this.options[this.selectedIndex].value-0,'+(year-0)+');">';
			for( var monthCounter=1; monthCounter<=12; monthCounter++ ) {
				var selected = (monthCounter==month) ? 'SELECTED' : '';
				result += '<option value="'+monthCounter+'" '+selected+'>'+this.monthNames[monthCounter-1]+'</option>';
				}
			result += '</select>	';
			result += ' 	';

			result += '<select CLASS="'+this.cssPrefix+'cpYearNavigation" name="cpYear" onChange="'+refresh+'('+this.index+','+month+',this.options[this.selectedIndex].value-0);">';
			for( var yearCounter=year-this.yearSelectStartOffset; yearCounter<=year+this.yearSelectStartOffset; yearCounter++ ) {
				var selected = (yearCounter==year) ? 'SELECTED' : '';
				result += '<option value="'+yearCounter+'" '+selected+'>'+yearCounter+'</option>';
				}
			result += '</select>	';
			}
		else {
			if (this.isShowYearNavigation) {
				result += '<	';
				result += ''+this.monthNames[month-1]+'	';
				result += '>	';
				result += ' 	';

				result += '<	';
				if (this.isShowYearNavigationInput) {
					result += '<INPUT NAME="cpYear" CLASS="'+this.cssPrefix+'cpYearNavigation" SIZE="4" MAXLENGTH="4" VALUE="'+year+'" onBlur="'+refresh+'('+this.index+','+month+',this.value-0);">	';
					}
				else {
					result += ''+year+'	';
					}
				result += '>	';
				}
			else {
				result += '<<	\n';
				result += ''+this.monthNames[month-1]+' '+year+'	\n';
				result += '>>	\n';
				}
			}
		result += '

\n';
		result += '
\n';
		result += '
\n';
		for (var j=0; j<7; j++) {

			result += ''+this.dayHeaders[(this.weekStartDay+j)%7]+'	\n';
			}
		result += '
\n';
		for (var row=1; row<=6; row++) {
			result += '
\n';
			for (var col=1; col<=7; col++) {
				var disabled=false;
				if (this.disabledDatesExpression!="") {
					var ds=""+display_year+LZ(display_month)+LZ(display_date);
					eval("disabled=("+this.disabledDatesExpression+")");
					}
				var dateClass = "";
				if ((display_month == this.currentDate.getMonth()+1) && (display_date==this.currentDate.getDate()) && (display_year==this.currentDate.getFullYear())) {
					dateClass = "cpCurrentDate";
					}
				else if (display_month == month) {
					dateClass = "cpCurrentMonthDate";
					}
				else {
					dateClass = "cpOtherMonthDate";
					}
				if (disabled || this.disabledWeekDays[col-1]) {
					result += '	'+display_date+'	\n';
					}
				else {
					var selected_date = display_date;
					var selected_month = display_month;
					var selected_year = display_year;
					if (this.displayType=="week-end") {
						var d = new Date(selected_year,selected_month-1,selected_date,0,0,0,0);
						d.setDate(d.getDate() + (7-col));
						selected_year = d.getYear();
						if (selected_year < 1000) { selected_year += 1900; }
						selected_month = d.getMonth()+1;
						selected_date = d.getDate();
						}
					result += '	'+display_date+'	\n';
					}
				display_date++;
				if (display_date > daysinmonth[display_month]) {
					display_date=1;
					display_month++;
					}
				if (display_month > 12) {
					display_month=1;
					display_year++;
					}
				}
			result += '
';
			}
		var current_weekday = now.getDay() - this.weekStartDay;
		if (current_weekday < 0) {
			current_weekday += 7;
			}
		result += '
\n';
		result += '	\n';
		if (this.disabledDatesExpression!="") {
			var ds=""+now.getFullYear()+LZ(now.getMonth()+1)+LZ(now.getDate());
			eval("disabled=("+this.disabledDatesExpression+")");
			}
		if (disabled || this.disabledWeekDays[current_weekday+1]) {
			result += '		'+this.todayText+'\n';
			}
		else {
			result += '		'+this.todayText+'\n';
			}
		result += '
\n';
		result += '

\n';
	}

	// Code common for MONTH, QUARTER, YEAR
	// ------------------------------------
	if (this.displayType=="month" || this.displayType=="quarter" || this.displayType=="year") {
		if (arguments.length > 0) { var year = arguments[0]; }
		else {
			if (this.displayType=="year") {	var year = now.getFullYear()-this.yearSelectStartOffset; }
			else { var year = now.getFullYear(); }
			}
		if (this.displayType!="year" && this.isShowYearNavigation) {
			result += "
";
			result += '
\n';
			result += '	<<	\n';
			result += '	'+year+'	\n';
			result += '	>>	\n';
			result += '

\n';
			}
		}

	// Code for MONTH display
	// ----------------------
	if (this.displayType=="month") {
		// If POPUP, write entire HTML document
		result += '
\n';
		for (var i=0; i<4; i++) {
			result += '
';
			for (var j=0; j<3; j++) {
				var monthindex = ((i*3)+j);
				result += ''+this.monthAbbreviations[monthindex]+'	';
				}
			result += '
';
			}
		result += '

\n';
		}

	// Code for QUARTER display
	// ------------------------
	if (this.displayType=="quarter") {
		result += '

\n';
		for (var i=0; i<2; i++) {
			result += '
';
			for (var j=0; j<2; j++) {
				var quarter = ((i*2)+j+1);
				result += '
Q'+quarter+'

	';
				}
			result += '
';
			}
		result += '

\n';
		}

	// Code for YEAR display
	// ---------------------
	if (this.displayType=="year") {
		var yearColumnSize = 4;
		result += "
";
		result += '
\n';
		result += '	<<	\n';
		result += '	>>	\n';
		result += '

\n';
		result += '
\n';
		for (var i=0; i<yearColumnSize; i++) {
			for (var j=0; j<2; j++) {
				var currentyear = year+(j*yearColumnSize)+i;
				result += ''+currentyear+'	';
				}
			result += '
';
			}
		result += '

\n';
		}
	// Common
	if (this.type == "WINDOW") {
		result += "\n";
		}
	return result;
	}


text:
from mock import patch
from payplug.resources import Card
from payplug.test import TestBase

@patch('payplug.config.secret_key', 'a_secret_key')
class TestCardResource(TestBase):
    def test_initialize_card(self):
        card_attributes = {
            "id": "card_167oJVCpvtR9j8N85LraL2GA",
            "object": "card",
            "customer_id": "cus_6ESfofiMiLBjC6",
            "created_at": 1434010787,
            "last4": "1111",
            "brand": "visa",
            "exp_moth": 5,
            "exp_year": 2019,
            "country": "FR",
            "metadata": {
                "customer_id": 42710,
                "customer_name": "Jean",
            },
        }

        card = Card(**card_attributes)

        assert card.id == "card_167oJVCpvtR9j8N85LraL2GA"
        assert card.object == "card"
        assert card.customer_id == "cus_6ESfofiMiLBjC6"
        assert card.created_at == 1434010787
        assert card.last4 == "1111"
        assert card.brand == "visa"
        assert card.exp_moth == 5
        assert card.exp_year == 2019
        assert card.country == "FR"

        assert isinstance(card.metadata, dict)
        assert card.metadata["customer_id"] == 42710
        assert card.metadata["customer_name"] == "Jean"

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Bllim\Laravalid\Converter\JqueryValidation;

class Message extends \Bllim\Laravalid\Converter\Base\Message
{
    public function ip($parsedRule, $attribute)
    {
        $message = $this->getValidationMessage($attribute, $parsedRule['name']);

        return ['data-msg-ipv4' => $message];
    }

    public function same($parsedRule, $attribute)
    {
        $other = $this->getValidationAttribute(reset($parsedRule['parameters']));
        $message = $this->getValidationMessage($attribute, $parsedRule['name'], compact('other'));

        return ['data-msg-equalto' => $message];
    }

    public function different($parsedRule, $attribute)
    {
        $other = $this->getValidationAttribute(reset($parsedRule['parameters']));
        $message = $this->getValidationMessage($attribute, $parsedRule['name'], compact('other'));

        return ['data-msg-notequalto' => $message];
    }

    public function alpha($parsedRule, $attribute)
    {
        return $this->regex($parsedRule, $attribute);
    }

    public function alpha_num($parsedRule, $attribute)
    {
        return $this->regex($parsedRule, $attribute);
    }

    public function regex($parsedRule, $attribute)
    {
        $message = $this->getValidationMessage($attribute, $parsedRule['name']);
        return ['data-msg-pattern' => $message];
    }

    public function image($parsedRule, $attribute)
    {
        $message = $this->getValidationMessage($attribute, $parsedRule['name']);
        return ['data-msg-accept' => $message];
    }

    public function before($parsedRule, $attribute)
    {
        $message = $this->getValidationMessage($attribute, $parsedRule['name'], ['date' => '{0}']);
        return ['data-msg-max' => $message];
    }

    public function after($parsedRule, $attribute)
    {
        $message = $this->getValidationMessage($attribute, $parsedRule['name'], ['date' => '{0}']);
        return ['data-msg-min' => $message];
    }

    public function numeric($parsedRule, $attribute)
    {
        $message = $this->getValidationMessage($attribute, $parsedRule['name']);

        return ['data-msg-number' => $message];
    }

    public function max($parsedRule, $attribute, $type)
    {
        $message = $this->getValidationMessage($attribute, $parsedRule['name'], ['max' => '{0}'], $type);
        switch ($type) {
            case 'numeric':
                return ['data-msg-max' => $message];
                break;

            default:
                return ['data-msg-maxlength' => $message];
                break;
        }
    }

    public function min($parsedRule, $attribute, $type)
    {
        $message = $this->getValidationMessage($attribute, $parsedRule['name'], ['min' => '{0}'], $type);
        switch ($type) {
            case 'numeric':
                return ['data-msg-min' => $message];
                break;

            default:
                return ['data-msg-minlength' => $message];
                break;
        }
    }

    public function between($parsedRule, $attribute, $type)
    {
        $message = $this->getValidationMessage($attribute, $parsedRule['name'], ['min' => '{0}', 'max' => '{1}'], $type);
        switch ($type) {
            case 'numeric':
                return ['data-msg-range' => $message];
                break;

            default:
                return ['data-msg-rangelength' => $message/*, 'data-msg-maxlength' => $message*/];
                break;
        }
    }

    public function unique($parsedRule, $attribute)
    {
        $message = $this->getValidationMessage($attribute, $parsedRule['name']);
        return ['data-msg-remote' => $message];
    }

    public function exists($parsedRule, $attribute)
    {
        return $this->unique($parsedRule, $attribute);
    }

    public function required_with($parsedRule, $attribute)
    {
        $values = implode(', ', array_map([$this, 'getValidationAttribute'], $parsedRule['parameters']));
        $message = $this->getValidationMessage($attribute, $parsedRule['name'], compact('values'));
        return ['data-msg-required' => $message];
    }

    public function required_without($parsedRule, $attribute)
    {
        return $this->required_with($parsedRule, $attribute);
    }

    public function active_url($parsedRule, $attribute)
    {
        return $this->unique($parsedRule, $attribute);
    }

    public function mimes($parsedRule, $attribute)
    {
        $message = $this->getValidationMessage($attribute, $parsedRule['name'], ['values' => implode(', ', $parsedRule['parameters'])]);
        return ['data-msg-accept' => $message];
    }
}


text:
title: Resources for the University of Washington
description: resources that may be of use to present and future students at the University of Washington
tags: university-of-washington, school, links, computer-science, math, chemistry, physics, astronomy, atmospheric-sciences, networking, research, self-improvement
author:
creation-date: 2014-09-13
last-major-revision-date: 2014-09-13
license: CC0
...

This is a collection of resources for students at the University of Washington and those considering attending there.
The page also includes some information on college in general.
Most of the resources are answers posted to [Quora](https://www.quora.com/), so having an account on there will allow you to ask for clarification in the respective answers[^anec].
The collection here may at the moment seem too "insular", since a majority of the answers have been written by just a few people (e.g. Alex K. Chen).
This will hopefully change in the future as more people contribute their knowledge and experiences online (e.g. via Quora).

[^anec]: I have often done this and have gotten a lot of useful information.

Please [let me know](/contact) if there are any other good resources or if there are mistakes (e.g. broken links) here.
I also have a mirror of this [on Quora](https://riceissa.quora.com/Resources-for-UW), so feel free to suggest edits on there, which can then be transferred to here.
This page is also hosted on GitHub, so feel free to send corrections using pull requests.

Note that even if you're not logged in on Quora, adding `/?share=1` to the end of the URL allows you to view *all* answers, not just the first one.

# Other lists of resources

- The [University of Washington topic on Quora](https://www.quora.com/University-of-Washington) has a lot of information; in fact, most of the content linked to on this page is from here.

- [Anonymous's Answer to University of Washington: What does your "Your Content" page for the University of Washington topic look like?](https://www.quora.com/University-of-Washington/What-does-your-Your-Content-page-for-the-University-of-Washington-topic-look-like/answers/5867915) has a lot of questions and answers.

# General

- [Alex K. Chen's review of the University of Washington](https://www.quora.com/Reviews-of-University-of-Washington/review/Alex-K-Chen).

- [What are the best courses at the University of Washington?](https://www.quora.com/University-of-Washington/What-are-the-best-courses-at-the-University-of-Washington)
See Andrew J. Ho's answer for chemistry courses.

- [Is it allowed to stay overnight in one of the Odegaard Undergraduate Library's study rooms? If so, how common is this practice?](https://www.quora.com/University-of-Washington/Is-it-allowed-to-stay-overnight-in-one-of-the-Odegaard-Undergraduate-Librarys-study-rooms-If-so-how-common-is-this-practice)

- [Is it worthwhile to attend the Admitted Student Previews (undergrad) at the University of Washington?](https://www.quora.com/University-of-Washington/Is-it-worthwhile-to-attend-the-Admitted-Student-Previews-undergrad-at-the-University-of-Washington)

- [Alex K. Chen's answer to What is the biggest regret of your life?](https://www.quora.com/What-is-the-biggest-regret-of-your-life/answer/Alex-K-Chen)

- Alex K. Chen often refers to the Academic program reviews and departmental self-study reports.
Find these [here](https://www.washington.edu/about/accreditation/noflyouts.html).

- [What happens if a library book is overdue?](https://www.quora.com/University-of-Washington/What-happens-if-a-library-book-is-overdue)

- [What is it like to attend University of Washington in Seattle?](https://www.quora.com/What-is-it-like-to-attend-University-of-Washington-in-Seattle)
Both Alex K. Chen and Andrew J. Ho have answers.

- [What are the downsides of attending the University of Washington?](https://www.quora.com/What-are-the-downsides-of-attending-the-University-of-Washington)
Alex K. Chen, Andrew J. Ho, and Daniel Fang have answers.

- [What are the best colleges and universities for INTPs in the United States?](https://www.quora.com/What-are-the-best-colleges-and-universities-for-INTPs-in-the-United-States)

- [Alex K. Chen's answer to Self-Improvement: What advice would you tell to your 12-year-old self if you could travel back in time?](https://www.quora.com/Self-Improvement/What-advice-would-you-tell-to-your-12-year-old-self-if-you-could-travel-back-in-time/answer/Alex-K-Chen)

- [Alex K. Chen's answer to The College and University Experience: If you could do undergrad over again, what would you major in?](https://www.quora.com/The-College-and-University-Experience/If-you-could-do-undergrad-over-again-what-would-you-major-in/answer/Alex-K-Chen)

- [What does Alex K. Chen have against state schools?](https://www.quora.com/Academia/What-does-Alex-K-Chen-have-against-state-schools)

- [Alex K. Chen's answer to Should I feel bad for going to a mediocre college?](https://www.quora.com/Should-I-feel-bad-for-going-to-a-mediocre-college/answer/Alex-K-Chen) (see especially the comments to the answer)

- [If Alex K. Chen was transported back in time, with all of his current memories, how would he spend his time?](https://www.quora.com/If-Alex-K-Chen-was-transported-back-in-time-with-all-of-his-current-memories-how-would-he-spend-his-time).

- [What is some advice that most college students are not ever likely to hear?](https://www.quora.com/The-College-and-University-Experience/What-is-some-advice-that-most-college-students-are-not-ever-likely-to-hear)

- [What advice would you give a college freshman?](https://www.quora.com/What-advice-would-you-give-a-college-freshman)
Christopher J. Su and Andrew J. Ho have answers.

- [College freshmen meme](http://www.quickmeme.com/College-Freshman).
See also the [Lazy College Senior meme](http://www.quickmeme.com/Lazy-College-Senior/).

# For prefrosh

Applications for the University of Washington are accepted starting in October and until December 1 (though they may extend it for a day if their servers crash—but don't count on this).
Then, decisions are mailed starting around March 15 (and you have until around May 1 to decide whether to attend).
After that, there are several events designed to welcome prospective students and incoming freshmen.

- [How can I get the most out of a single day visit at the University of Washington?](https://www.quora.com/How-can-I-get-the-most-out-of-a-single-day-visit-at-the-University-of-Washington)

- [What are the disadvantages of joining a First-year Interest Group (FIG) at the University of Washington?](https://www.quora.com/What-are-the-disadvantages-of-joining-a-First-year-Interest-Group-FIG-at-the-University-of-Washington)

## Admitted Student Previews (~April)

This event is hosted before decision day, and is designed to let prospective students decide whether they want to attend UW by walking around campus, meeting fellow admitted students, and so on.

- [University of Washington: Is it worthwhile to attend the Admitted Student Previews (undergrad) at the University of Washington?](https://www.quora.com/University-of-Washington/Is-it-worthwhile-to-attend-the-Admitted-Student-Previews-undergrad-at-the-University-of-Washington)

## Advising and Orientation session (A&O) (June–August)

This event occurs after decision day, and usually after high school is over.
It is designed to welcome incoming freshmen (i.e. people who were accepted to UW and chose to attend there) by giving tours of the campus, allowing incoming freshmen to interact with each other, having them sign up for their fall-quarter courses, and so on.

- [What is it like to go to the UW A&O (for freshmen)?](https://www.quora.com/What-is-it-like-to-go-to-the-UW-A-O-for-freshmen)
I have documented my own thoughts [here](https://www.quora.com/What-is-it-like-to-go-to-the-UW-A-O-for-freshmen/answer/Issa-Rice) (currently the question only has my answer, so it is essentially identical to the question link) and [here](https://www.quora.com/What-is-the-dinner-lunch-like-at-the-UW-freshmen-A-O/answer/Issa-Rice) (regarding the meals); see also [What is the dinner/lunch like at the UW freshmen A&O?](https://www.quora.com/What-is-the-dinner-lunch-like-at-the-UW-freshmen-A-O) for the meals.

- [If I didn't get all my questions answered for registering for courses at UW during my A&O session, what's the best way to get help?](https://www.quora.com/If-I-didnt-get-all-my-questions-answered-for-registering-for-courses-at-UW-during-my-A-O-session-whats-the-best-way-to-get-help)

- [University of Washington: How can freshmen make the most out of their advising and orientation sessions at the University of Washington?](https://www.quora.com/University-of-Washington/How-can-freshmen-make-the-most-out-of-their-advising-and-orientation-sessions-at-the-University-of-Washington)

# Doing research

-   [How can high school students entering the University of Washington
    as freshmen gain experience in
    research?](https://www.quora.com/How-can-high-school-students-entering-the-University-of-Washington-as-freshmen-gain-experience-in-research)

- [How can an undergraduate at the University of Washington find research?](https://www.quora.com/How-can-an-undergraduate-at-the-University-of-Washington-find-research)

- [What are the current exciting research projects at the University of Washington?](https://www.quora.com/What-are-the-current-exciting-research-projects-at-the-University-of-Washington)

# Getting the most out of UW

- [What do UW students wish they had known when they were freshmen?](https://www.quora.com/What-do-UW-students-wish-they-had-known-when-they-were-freshmen)

- [How can I make the most of my college years?](https://www.quora.com/How-can-I-make-the-most-of-my-college-years)

- [How does one sample graduate level courses at the University of Washington?](https://www.quora.com/How-does-one-sample-graduate-level-courses-at-the-University-of-Washington)

    - [What does it mean to add-code at UW?](https://www.quora.com/What-does-it-mean-to-add-code-at-UW)

- [How do I self-study a lot of subjects efficiently like Alex K. Chen?](https://www.quora.com/How-do-I-self-study-a-lot-of-subjects-efficiently-like-Alex-K-Chen)

- [What majors at the University of Washington allow non-majors to take most or all of their courses?](https://www.quora.com/What-majors-at-the-University-of-Washington-allow-non-majors-to-take-most-or-all-of-their-courses)

- See also [Scholarship: How to Do It Efficiently](http://lesswrong.com/lw/5me/scholarship_how_to_do_it_efficiently/) by Luke Muehlhauser.

- [What learning strategies do people who are "quick learners" follow?](https://www.quora.com/Learning/What-learning-strategies-do-people-who-are-quick-learners-follow)

- [Alex K. Chen's answer to What subjects should everyone be familiar with?](https://www.quora.com/What-subjects-should-everyone-be-familiar-with/answer/Alex-K-Chen)

# Networking

-   See Jonah and Vipul's "[Using Facebook effectively](http://info.cognitomentoring.org/wiki/Using_Facebook_effectively)" for reasons why Facebook might be useful in college.
For profile photos, [Don't Be Ugly By Accident!](http://blog.okcupid.com/index.php/dont-be-ugly-by-accident/) on OkTrends may be of interest.

- [What are the best ways for students to network with other people while they're still in college?](https://www.quora.com/What-are-the-best-ways-for-students-to-network-with-other-people-while-theyre-still-in-college)

- [How common is it to feel socially isolated at the UW?](https://www.quora.com/How-common-is-it-to-feel-socially-isolated-at-the-UW)

- [How hard is it to make friends at the University of Washington?](https://www.quora.com/How-hard-is-it-to-make-friends-at-the-University-of-Washington)

-   [Alex K. Chen's answer to: People Skills: What is the secret to finding the right peers?](https://www.quora.com/People-Skills/What-is-the-secret-to-finding-the-right-peers/answer/Alex-K-Chen)
Alex says, in part:

    > Make yourself **extremely** stalkable and Googleable (and clearly
    > mark that you're open to emails and random Facebook friend
    > requests from strangers). And also - archive up \*all\* the
    > interesting things you've gathered up and put them somewhere
    > that's \*ultra-accessible\*, so that they can easily find them.
    > Use the cloud as your storage space, and default most of your
    > Facebook status updates to public.

    - See also Alex's post on Less Wrong, [How do you approach the problem of social discovery?](http://lesswrong.com/r/discussion/lw/k3s/how_do_you_approach_the_problem_of_social/) and [Alex K. Chen's answer to Alex K. Chen (topic): What were Alex K Chen's best decisions of his life?](https://www.quora.com/Alex-K-Chen-topic/What-were-Alex-K-Chens-best-decisions-of-his-life/answer/Alex-K-Chen)

-   [How does one meet new people at UWashington?](https://www.quora.com/University-of-Washington/How-does-one-meet-new-people-at-UWashington)

    - Consider going to a Quora meet-up.
For the ones in Seattle, see [this page](http://seattlequorameetups.quora.com/). (This blog is currently closed to the public, but if you contact me and you live in the Seattle area, I can probably get you in.)

        The Seattle Quora group also has its own [Facebook group page](https://www.facebook.com/groups/quoraseattle/).  It's a closed group, but I can let you in.

    - [How do I recruit people to join Quora at the University of Washington?](https://www.quora.com/How-do-I-recruit-people-to-join-Quora-at-the-University-of-Washington) (all the answers seem good)

- [Alex K. Chen's answer to Colleges and Universities: How can you make important connections if you don't attend a top university?](https://www.quora.com/Colleges-and-Universities/How-can-you-make-important-connections-if-you-dont-attend-a-top-university/answer/Alex-K-Chen)

- The University of Washington does have [its own Facebook app](https://apps.facebook.com/uw_fbapp/) (maybe only for freshmen?), but I haven't had much success with this yet.

# Housing

Unfortunately most of these questions don't have any answers yet, but they all have the potential to become useful resources in the future, so I will still put them here.

- Eventually see [What University of Washington dorm is the best to live in, and why?](https://www.quora.com/What-University-of-Washington-dorm-is-the-best-to-live-in-and-why); at the moment there aren't any answers there (2014-05-27); closely related is [Do the University of Washington dorms have personalities associated with them?](https://www.quora.com/University-of-Washington/Do-the-University-of-Washington-dorms-have-personalities-associated-with-them).

- [What is it like to live in Alder Hall?](https://www.quora.com/University-of-Washington/What-is-it-like-to-live-in-Alder-Hall)

- [What is it like to live in Elm Hall?](https://www.quora.com/University-of-Washington-What-is-it-like-to-live-in-Elm-Hall)

- [What is it like to live in Haggett Hall?](https://www.quora.com/University-of-Washington/What-is-it-like-to-live-in-Haggett-Hall); see also [Do the rooms at Haggett Hall have Wi-Fi?](https://www.quora.com/Do-the-rooms-at-Haggett-Hall-have-Wi-Fi) and [Do the rooms at the University of Washington's Hagget Hall have WiFi? If so, is the service complimentary to a student's tuition?](https://www.quora.com/Do-the-rooms-at-the-University-of-Washingtons-Hagget-Hall-have-WiFi-If-so-is-the-service-complimentary-to-a-students-tuition)

- [What is it like to live in Hansee Hall?](https://www.quora.com/University-of-Washington/What-is-it-like-to-live-in-Hansee-Hall)

- [What is it like to live in Lander Hall?](https://www.quora.com/University-of-Washington/What-is-it-like-to-live-in-Lander-Hall)

- [What is it like to live in McCarty Hall?](https://www.quora.com/University-of-Washington/What-is-it-like-to-live-in-McCarty-Hall)

- [What is it like to live in McMahon Hall?](https://www.quora.com/University-of-Washington/What-is-it-like-to-live-in-McMahon-Hall)

- [What is it like to live in Mercer Court?](https://www.quora.com/University-of-Washington/What-is-it-like-to-live-in-Mercer-Court)

- [What is it like to live in Poplar Hall?](https://www.quora.com/University-of-Washington/What-is-it-like-to-live-in-Poplar-Hall)

- [What is it like to live in Stevens Court?](https://www.quora.com/University-of-Washington/What-is-it-like-to-live-in-Stevens-Court)

# UW Honors

<!-- internal tags: uwhons uw hons -->

-   For a comparison of UW Honors to top schools (in STEM), see the Quora question [How does the University of Washington honors program undergraduate student quality compare with that of top schools like MIT and Caltech?](https://www.quora.com/How-does-the-University-of-Washington-honors-program-undergraduate-student-quality-compare-with-that-of-top-schools-like-MIT-and-Caltech)

- [What is the Honors program at the University of Washington like? Is it worth joining?](https://www.quora.com/What-is-the-Honors-program-at-the-University-of-Washington-like-Is-it-worth-joining)

- There are many examples of honors portfolios available [here](https://sites.google.com/a/uw.edu/the-honors-portfolio/portfolio-examples).
You may need a UW account to see some of them, though.
I'm also highly considering doing my honors portfolio on Quora, [since this seems to be possible](https://www.quora.com/University-of-Washington/Is-it-possible-to-create-ones-honors-portfolio-on-Quora); I encourage others to look into this as well so that one can reflect+fulfil the requirement+add useful content on the internet so others can access it freely, all at the same time.

- I also highly recommend contacting one or more [UW Honors peer mentors](http://depts.washington.edu/uwhonors/community/mentors/list/); they were all very responsive to email when I contacted them.

# Early entrance

- Currently only Alex K. Chen has posted a review, but for a general overview see [Reviews of: University of Washington Academy for Young Scholars](https://www.quora.com/Reviews-of-University-of-Washington-Academy-for-Young-Scholars)

- [Alex K. Chen's answer to What are the benefits and disadvantages of going to college early?](https://www.quora.com/What-are-the-benefits-and-disadvantages-of-going-to-college-early/answer/Alex-K-Chen)

- [How common is it for students to join UW through its UW Academy program because they wanted to take the "easy way out"?](https://www.quora.com/How-common-is-it-for-students-to-join-UW-through-its-UW-Academy-program-because-they-wanted-to-take-the-easy-way-out)

- [University of Washington: What do other UW students think of UW early entrance students?](https://www.quora.com/University-of-Washington/What-do-other-UW-students-think-of-UW-early-entrance-students)

# Computer science and engineering (CSE)

- [What's the best path to follow as a freshman to enter the CS major?](https://www.quora.com/Whats-the-best-path-to-follow-as-a-freshman-to-enter-the-CS-major); related: [University of Washington: With four related AP subjects, how can I make sure that I get into UW CSE and also in a timely fashion?](https://www.quora.com/University-of-Washington/With-four-related-AP-subjects-how-can-I-make-sure-that-I-get-into-UW-CSE-and-also-in-a-timely-fashion)

- [How hard is it to get into the CSE program at University of Washington?](https://www.quora.com/How-hard-is-it-to-get-into-the-CSE-program-at-University-of-Washington)

- [What do UW CSE students wish they had known when they were new to the major?](https://www.quora.com/What-do-UW-CSE-students-wish-they-had-known-when-they-were-new-to-the-major)

- [As a non-major, how can I be a bigger part of the UW CSE community?](https://www.quora.com/As-a-non-major-how-can-I-be-a-bigger-part-of-the-UW-CSE-community)

- [What does Alex K. Chen think of the field of Computer Science?](https://www.quora.com/Alex-K-Chen-topic/What-does-Alex-K-Chen-think-of-the-field-of-Computer-Science)

- For classes, see:
[What is it like taking CSE 142 at the University of Washington?](https://www.quora.com/University-of-Washington/What-is-it-like-taking-CSE-142-at-the-University-of-Washington),
[What is it like to take CSE 143 at the University of Washington?](https://www.quora.com/University-of-Washington/What-is-it-like-to-take-CSE-143-at-the-University-of-Washington), and
[What is it like to take the honors CSE 142/143 seminar (CSE 390) at the University of Washington?](https://www.quora.com/What-is-it-like-to-take-the-honors-CSE-142-143-seminar-CSE-390-at-the-University-of-Washington)

# Atmospheric science

- [What is it like to study Atmospheric Science at the University of Washington?](https://www.quora.com/What-is-it-like-to-study-Atmospheric-Science-at-the-University-of-Washington)
In particular, Alex K. Chen says:

- [Department of atmospheric sceinces: unit self-study](https://www.washington.edu/about/accreditation/reviews/atmos-2011-1.pdf)

- [What are some downsides to doing research in atmospheric science?](https://www.quora.com/What-are-some-downsides-to-doing-research-in-atmospheric-science) (Alex K. Chen's and Reena Joubert's answers are especially good.)

- [What should someone major in if they want to become a climate scientist?](https://www.quora.com/Atmospheric-Science/What-should-someone-major-in-if-they-want-to-become-a-climate-scientist) (No answers at the time of writing, unfortunately.)

- [What are some good resources for the earth, atmospheric, and planetary sciences?](https://www.quora.com/What-are-some-good-resources-for-the-earth-atmospheric-and-planetary-sciences)

- [What are some good summer (or winter) programs/schools for graduate students in the earth/atmospheric/planetary sciences or in astrophysics?](https://www.quora.com/What-are-some-good-summer-or-winter-programs-schools-for-graduate-students-in-the-earth-atmospheric-planetary-sciences-or-in-astrophysics)

- See Edwin Kite's answer here to see why people in the Earth sciences are more willing to share data: [Are scientists more willing to share data in some fields than in other fields?](https://www.quora.com/Are-scientists-more-willing-to-share-data-in-some-fields-than-in-other-fields).
The [article](http://www.wired.com/2009/12/15943/) Kite links to is intriguing.

- [Atmospheric Science: What are the biggest unknowns in climate science?](https://www.quora.com/Atmospheric-Science/What-are-the-biggest-unknowns-in-climate-science) (See especially Reena Joubert's answer)

- [How can someone start excelling in climate science while still in high school?](https://www.quora.com/How-can-someone-start-excelling-in-climate-science-while-still-in-high-school) (again, see Reena Joubert's answer)

- For applying to graduate schools: [What are the best universities for studying atmospheric science?](https://www.quora.com/What-are-the-best-universities-for-studying-atmospheric-science)

- This is slightly unrelated, but: [What are some good resources on astrobiology?](https://www.quora.com/What-are-some-good-resources-on-astrobiology) may be useful for those considering e.g. exoplanetary atmospheres.

# Physics/Astronomy

- [What is it like to study Physics at the University of Washington?](https://www.quora.com/University-of-Washington/What-is-it-like-to-study-Physics-at-the-University-of-Washington)

- [What is it like to study Astronomy at the University of Washington?](https://www.quora.com/What-is-it-like-to-study-Astronomy-at-the-University-of-Washington)
See also Denise Schmitz's answer [here](https://www.quora.com/What-is-it-like-to-major-in-astronomy/answer/Denise-Schmitz) (she was an undergraduate at UW).

- [Alex K. Chen's answer to What are some good websites and resources to learn about astronomy/astrophysics?](https://www.quora.com/What-are-some-good-websites-and-resources-to-learn-about-astronomy-astrophysics/answers/604575)

# Math

- This question on Quora currently does not have extensive answers, but this may change in the future: [Why is applied math at the University of Washington top 10 in the nation while pure math is not even close to that?](https://www.quora.com/University-of-Washington/Why-is-applied-math-at-the-University-of-Washington-top-10-in-the-nation-while-pure-math-is-not-even-close-to-that)

- [Can non-majors take a lot of math courses at the University of Washington?](https://www.quora.com/Can-non-majors-take-a-lot-of-math-courses-at-the-University-of-Washington)

- [How should a student independently studying math get help on exercises?](https://www.quora.com/How-should-a-student-independently-studying-math-get-help-on-exercises)

# Chemistry

- [University of Washington: What is it like to study Chemistry at UW?](https://www.quora.com/University-of-Washington/What-is-it-like-to-study-Chemistry-at-UW)

- [What are the best courses at the University of Washington?](https://www.quora.com/University-of-Washington/What-are-the-best-courses-at-the-University-of-Washington)
See Andrew J. Ho's answer for chemistry courses.

- [Andrew J. Ho's answer to How can the undergraduate chemistry curriculum be improved?](https://www.quora.com/How-can-the-undergraduate-chemistry-curriculum-be-improved/answer/Andrew-J-Ho)

- [What are some good chemistry courses?](https://www.quora.com/What-are-some-good-chemistry-courses)
Andrew J. Ho [has an answer](https://www.quora.com/What-are-some-good-chemistry-courses/answer/Andrew-J-Ho).

- [What are the best physical chemistry textbooks?](https://www.quora.com/What-are-the-best-physical-chemistry-textbooks)
Andrew J. Ho [has an answer](https://www.quora.com/What-are-the-best-physical-chemistry-textbooks/answer/Andrew-J-Ho).

- [What are the best computational chemistry textbooks?](https://www.quora.com/What-are-the-best-computational-chemistry-textbooks)
Both Sang Young Noh and Andrew J. Ho have answers.

# Thinking about graduate school

By now Quora might be the best source for information, although I'm not really knowledgeable on the subject.

- [What's the hardest part of being a PhD student?](https://www.quora.com/Whats-the-hardest-part-of-being-a-PhD-student)

- [What are the best forums about graduate school?](https://www.quora.com/What-are-the-best-forums-about-graduate-school)

- The [Academia Stack Exchange](http://academia.stackexchange.com/) may also have useful information.

- [The GradCafe Forums](http://forum.thegradcafe.com/)

- [Jean Yang's page](http://jeanyang.com/) (see "Considering Graduate School?" near the bottom of the page.) See also [this article](https://medium.com/p/c6162458ef83) by her about MIT.

- Brian Tomasik advises that [in general, one should not get a PhD](http://reducing-suffering.org/advice-students-earning-give/#In_general_Don8217t_get_a_PhD).
He discusses computer science especially (with links to more blog posts).


text:
from __future__ import absolute_import
from __future__ import unicode_literals

import logging
from datetime import datetime

from flask import render_template, Response

# these imports are required by Flask - DO NOT remove them although they look unused
# noinspection PyUnresolvedReferences
import puppetboard.views.catalogs  # noqa: F401
# noinspection PyUnresolvedReferences
import puppetboard.views.dailychart  # noqa: F401
# noinspection PyUnresolvedReferences
import puppetboard.views.facts  # noqa: F401
# noinspection PyUnresolvedReferences
import puppetboard.views.index  # noqa: F401
# noinspection PyUnresolvedReferences
import puppetboard.views.inventory  # noqa: F401
# noinspection PyUnresolvedReferences
import puppetboard.views.metrics  # noqa: F401
# noinspection PyUnresolvedReferences
import puppetboard.views.nodes  # noqa: F401
# noinspection PyUnresolvedReferences
import puppetboard.views.query  # noqa: F401
# noinspection PyUnresolvedReferences
import puppetboard.views.radiator  # noqa: F401
# noinspection PyUnresolvedReferences
import puppetboard.views.reports  # noqa: F401

from puppetboard.core import get_app, get_puppetdb
from puppetboard.version import __version__

app = get_app()
puppetdb = get_puppetdb()

logging.basicConfig(level=app.config['LOGLEVEL'].upper())
log = logging.getLogger(__name__)

menu_entries = [
    ('index', 'Overview'),
    ('nodes', 'Nodes'),
    ('facts', 'Facts'),
    ('reports', 'Reports'),
    ('metrics', 'Metrics'),
    ('inventory', 'Inventory'),
    ('catalogs', 'Catalogs'),
    ('radiator', 'Radiator'),
    ('query', 'Query')
]

if not app.config.get('ENABLE_QUERY'):
    menu_entries.remove(('query', 'Query'))

if not app.config.get('ENABLE_CATALOG'):
    menu_entries.remove(('catalogs', 'Catalogs'))

app.jinja_env.globals.update(menu_entries=menu_entries)

@app.context_processor
def utility_processor():
    def now(format='%m/%d/%Y %H:%M:%S'):
        """returns the formated datetime"""
        return datetime.now().strftime(format)

    def version():
        return __version__

    return dict(now=now, version=version)

@app.route('/offline/<path:filename>')
def offline_static(filename):
    mimetype = 'text/html'
    if filename.endswith('.css'):
        mimetype = 'text/css'
    elif filename.endswith('.js'):
        mimetype = 'text/javascript'

    return Response(response=render_template('static/%s' % filename),
                    status=200, mimetype=mimetype)

@app.route('/status')
def health_status():
    return 'OK'


text:
[![Circle CI](https://circleci.com/gh/pgrimard/spark-react-es6.svg?style=svg)](https://circleci.com/gh/pgrimard/spark-react-es6)

# Spark React ES6

## Why Spark?
[Spark](http://sparkjava.com/) is a concise web application framework.  It's lightweight and very quick to get up and
running and has an embedded Jetty web server.  It doesn't have a ton of bells and whistles, but for prototyping I find
it ideal.  It provides a nice API which doesn't make use of annotations.  I've used Spring since release 2.5 in 2007
and all of my recent projects use Spring Boot which is my recommendation for production purposes where you need the
extra bells and whistles.

## React and ES6
Having adopted [React](http://facebook.github.io/react/) as my go to JS framework and writing apps in vanilla JS, this
sample application was my first dive into ES6 to gain some knowledge.

## Gulp, Browserify and Babel
The frontend build uses Gulp and Browserify to produce separate bundles for vendor and application scripts.  Using
the [Babelify](https://github.com/babel/babelify) transform, my ES6 code is transpiled to work in all browsers.


text:
package com.github.zerkseez.reflection;

import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public abstract class AbstractMemberInfo extends AbstractElementInfo implements HasTypeVariables {
	private final ElementInfo declaringElement;
	private final Cache<List<TypeVariableInfo>> typeVariables;
	private final Cache<List<TypeVariableInfo>> declaredTypeVariables;
	private final Cache<Integer> modifiers;
    private final Cache<String> name;

	protected AbstractMemberInfo(final ElementInfo declaringElement) {
		this.declaringElement = declaringElement;
		this.typeVariables = new Cache<List<TypeVariableInfo>>(this, () -> doGetTypeVariables());
		this.declaredTypeVariables = new Cache<List<TypeVariableInfo>>(this, () -> doGetDeclaredTypeVariables());
		this.modifiers = new Cache<Integer>(this, () -> doGetModifiers());
        this.name = new Cache<String>(this, () -> doGetName());
	}

	/**
	 * Gets the declaring element of this member
	 *
	 * @return The declaring element of this member
	 */
	public ElementInfo getDeclaringElement() {
		return declaringElement;
	}

	/**
	 * Gets the modifiers of this member
	 *
	 * @return The modifiers of this member
	 */
	public final int getModifiers() {
        return modifiers.get();
    }

    protected abstract int doGetModifiers();

    /**
     * Gets the name of this member
     *
     * @return The name of this member
     */
    public final String getName() {
        return name.get();
    }

    protected abstract String doGetName();

	@Override
	public final boolean hasTypeVariables() {
		return !getTypeVariables().isEmpty();
	}

	@Override
	public final List<TypeVariableInfo> getTypeVariables() {
	    return Collections.unmodifiableList(typeVariables.get());
	}

	protected List<TypeVariableInfo> doGetTypeVariables() {
	    final List<TypeVariableInfo> typeVariables = new ArrayList<TypeVariableInfo>();
	    if (!Modifier.isStatic(getModifiers()) && getDeclaringElement() instanceof HasTypeVariables) {
	        typeVariables.addAll(((HasTypeVariables)getDeclaringElement()).getTypeVariables());
	    }
	    typeVariables.addAll(getDeclaredTypeVariables());
		return typeVariables;
	}

	@Override
	public final boolean hasDeclaredTypeVariables() {
	    return !getDeclaredTypeVariables().isEmpty();
	}

	@Override
    public final List<TypeVariableInfo> getDeclaredTypeVariables() {
        return Collections.unmodifiableList(declaredTypeVariables.get());
    }

	protected abstract List<TypeVariableInfo> doGetDeclaredTypeVariables();

	protected TypeInfo<?> resolveActualType(final TypeInfo<?> type) {
		if (type instanceof TypeVariableInfo) {
			for (int i = 0; i < getTypeVariables().size(); i++) {
				final TypeVariableInfo typeVariable = getTypeVariables().get(i);
				if (type.getId().equals(typeVariable.getId()) && typeVariable.getTypeVariableValue() != null) {
					return typeVariable.getTypeVariableValue();
				}
			}
			if (type.getTypeVariableValue() != null) {
				return resolveActualType(type.getTypeVariableValue());
			}
		}
		else if (type instanceof GenericArrayInfo) {
			return new GenericArrayInfo(
					((GenericArrayInfo)type).getType(),
					resolveActualType(type.getArrayElementType())
			);
		}
		else if (type instanceof ParameterizedTypeInfo) {
			final List<TypeVariableInfo> typeVariables = new ArrayList<TypeVariableInfo>();
			for (TypeVariableInfo typeVariable : type.getTypeVariables()) {
				typeVariables.add(typeVariable.withValue(resolveActualType(typeVariable.getTypeVariableValue())));
			}
			return new ParameterizedTypeInfo(((ParameterizedTypeInfo)type).getType(), typeVariables);
		}
		else if (type instanceof WildcardTypeInfo) {
			final List<TypeInfo<?>> superBounds = new ArrayList<TypeInfo<?>>();
			final List<TypeInfo<?>> extendsBounds = new ArrayList<TypeInfo<?>>();
			for (TypeInfo<?> superBound : type.getSuperBounds()) {
				superBounds.add(resolveActualType(superBound));
			}
			for (TypeInfo<?> extendsBound : type.getExtendsBounds()) {
				extendsBounds.add(resolveActualType(extendsBound));
			}
			return new WildcardTypeInfo(((WildcardTypeInfo)type).getType(), extendsBounds, superBounds);
		}
        return type;
    }
}


text:
<?php

namespace Webdev\BlogBundle\Controller;

use Webdev\BlogBundle\Entity\Tag;

use Doctrine\ORM\EntityManager;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

class SidebarController extends Controller
{
    /**
     * @Template()
     */
    public function tagcloudAction()
    {
    	$em = $this->getDoctrine()->getEntityManager();

    	// get all tags
    	$tags = $em->getRepository('WebdevBlogBundle:Tag')->findAll();
    	shuffle($tags);

        return array('tags' => $tags);
    }
}


text:
Home Assignment: The Love Geometry
==================================

Here is the Love Geometry project consisting several steps which graded independently. The necessary exercises are
[Step 1](#step-1-the-language-of-love-and-destruction) and [Step 2](#step-2-show-me-your-love), everything else is
optional.

By completing each step of this home assignment you proof that you have some valuable feature. So, it's ok to not to
complete all of them.

But note that poor implementation of necessary steps won't give you enough grade. Which means that working on some
optional stuff may be a wise decision.

You also may jump over some exercises but since later stages depends on their predecessors you should do it in a smart
way. What does it mean? That you should somehow mock the incomplete functionality: either by some code stubs or by the
bold design solution. Feel free to embrace your imagination.

Technical Requirements
----------------------

Pay attention to the following requirements. They are simple but necessary for your success.

1. The solution SHOULD come in a form of a code bundle (`*.tgz` or `*.zip`).
1. The name of the bundle should be `love-geometry-<your full name>-v<version number>`. The version number starts from
   `1`. We accept multiple versions of the assignment. The final grade will be calculated for the latest version of your
   assignment.
1. You SHOULD not present this solution publicly. This will cause an immediate and inexcusable failure (:
1. There should be an OBVIOUS way to run the project described in the `README.md` provided in the root of the
bundle. All command line steps should be described as if you are talking to a person without programming
skills.
1. If project has prerequisites (Node.js, NPM, Angular CLI et c.) there should be a how-to manual for installing them.
1. All sections of the application should include a heading with your full name at the top. Also your full name should
be the first thing at the page title.

Notes on UX
-----------

You are the only person responsible for the UX design. We do not introduce additional restrictions not because we don't
care about look and feel but because we want to know what completeness and usability means to you.

Consider this: you need just 2 minutes to add Bootstrap to your application.

### Navigation

All exercises can be implemented as an evolution of one main page. Still, if you complete a lot of optional exercises
you may consider to break down the application into several sections. In that case don't forget about navigation and
routing.

Get Ready for PEG
-----------------

Take a look at [PEGjs](https://pegjs.org/). It's a Javascript parser for
[parser expression grammars](https://www.wikiwand.com/en/Parsing_expression_grammar) which is very similar to
context-free grammars you may know from the Computer Science courses.

Don't be afraid! It's not as scary as it seems (:

There is a nice [intro](https://coderwall.com/p/316gba/beginning-parsers-with-peg-js) you can look trough.

Step 0. Pick Your Favorite Tool
-------------------------------

The project should come in a form of a single page web application. You are free to use any framework you want but we
encourage you to use Angular 4 or React (+ something).

Note that we do care about design and usability but this assignment tests your engineering skills. So, the UI/UX should
help you to better express your solution and us to better asses them.

Step 1. The Language of Love and Destruction
--------------------------------------------

Let's say we have a toy language that describes relations between people:

```
A loves B but B hates A.
A hates B, A loves D while B loves C and D hates A.
A loves B, B loves A and B loves D.
A loves B but B hates A
D loves B and C loves A.
```

Each sentence here represents a state of the evolving love story.

Note that there are **multiline** sentences (like the last one)!

We want to write a parser for this language that for each line returns a structure of relations of people mentioned in
it. Such structure can be (but not necessary) like the following:

```javascript
[
  {
    'A': { 'loves': ['B'] },
    'B': { 'hates': ['A'] }
  },
  {
    'A': { 'hates': ['B'], 'loves': ['D'] },
    'B': { 'loves': ['C'] },
    'D': { 'hates': 'A' }
  }
]
```

As you can see it represents the first two lines of the story above.

We do not give you a formal definition of this language. Instead we want you to design grammar sufficient to grasp its
spirit.

For this part of the assignment the sufficient representation does not require any user interface. Instead we want the
parser to be implemented as a module and covered by test cases. We do not restrict you by any testing framework since
Node.js has built in `assert` module which may be sufficient if you are not experience with testing.

You should provide a description for each of your test cases.

### On the Meaning of Love

Here we want to disambiguate meaning of term we use in the document.

A *state of love*, the *love case* or the *situation of love* is the order of things described in a one sentence. We can
think about it as a snapshot of relations.

A *love story* is a sequence on love states.

Why not *story of relations*? Well, in our pocket universe loathing can be thought as just a negative form of love.

Step 2. Show Me Your Love
-------------------------

The exercise will be completed when there will be a text area input for a love story and the text field with the
corresponding javascript structure. You should parse the stories automatically each time when user changes the text
(this is usually called "live edit").

There should be a minimal error reporting in case when user enters invalid love statements.

You can use code highlights like [Code Mirror](https://codemirror.net/) if you want. I've used the one in my one of my
[pet projects](http://takorogo.github.io/#/) when I was in love with graph databases and DSLs.

This is a major task and if fully completed together with the [Step 1](#step-1-the-language-of-love-and-destruction)
it should be enough to pass the grading threshold.

But why stop here? There are more challenges to complete. Besides, you may have some crucial errors in your solution
you, don't see now. So, if I were you, I will take the next steps in order to get even more fun and confidence in your
results.

Step 3. Find the Cheater (optional)
-----------------------------------

This task is optional but it may be useful for later steps and also gives an important perspective on the DSL design.

As we can see from the [Step 1](#step-1-the-language-of-love-and-destruction) the syntax does not constrains us to write things like:

```
A loves B but A hates B.
A loves B, A loves B, A loves B.
A loves A.
```

What additional constrains should we apply to the language semantics? Define those constrains and describe them (either
at the `README.md` or inside your SPA).

Implement the validator that checks parsed structures and shows messages in case when user writes a meaningless state of
love. You also can integrate some checks into the grammar but the parser should not swallow errors (e.g. if user does
something you consider as wrong he or she should receive an error).

Step 4. Circles of Affection (optional)
---------------------------------------

Sometimes we have a state of love with circles of feeling of some type. E.g.:

```
A loves B, B loves C and C loves A.
A hates B while B hates A.
A loves A.
```

In the first sentence we have a traditional love triangle.

The second one is a mutual loathing.

The third is a high self-esteem. Have you forbidden that kind of relations at the
[Step 3](#step-3-find-the-cheater-optional)? Well then you may reconsider your decision. Or keep it. It's all up to you.

Now. In order to complete this exercise you have to design and implement an algorithm which finds all circles in a given
sate of love.

We want you to create a block at the page where you will list such circles for the given love story (in addition to
the area with listed structures from the [Step 2](#step-2-show-me-your-love).

Step 5. The Matrix of Love (optional)
-------------------------------------

Now let's have some fan!

How about to create a table representation for a given state of love?

Let's say we have the following situation:

```
Lyubomir loves Ron, Ron hates Lubomyr
Vasya hates Alice, Alice hates Vasya
Ulices loves Alice, Alice loves Ulices
Mary loves Vasya
Ulises hates Theodoric.
```

In this case the table should looks like:

|          | Ron | Alice | Mary | Theodoric |
|----------|:---:|:-----:|:----:|:---------:|
| Vasya    |     |   -   |  ?/+ |           |
| Lyubomir | +/- |       |      |    -/?    |
| Ulises   |     |   +   |      |           |

Now, the table is good but the textual description is ugly.

What if we'll add a special keyword to describe mutual affection? So, the description will be:

```
Lyubomir loves Ron, Ron hates Lubomyr
Vasya mutually hates Alice
Ulices mutually loves Alice
Mary loves Vasya
Ulises hates Theodoric.
```

Much better!

To complete this assignment you should create a component which renders such table according to the currently described
structures. Which means there may be several such tables at the page since one story may consist several states.

To have all possible credits you also have to introduce `mutually` keyword to the love language parser.

### The Love Matrix Behaviour

In order to disambiguate how table should work let me add some examples.

Consider if in addition to the existing text we will add:

```
...
Ulises mutually loves Mike
...
```
It means we have to add a new column, e.g.:

|          | Ron | Alice | Mary | Theodoric | Mike |
|----------|:---:|:-----:|:----:|:---------:|:----:|
| Vasya    |     |   -   |  ?/+ |           |      |
| Lyubomir | +/- |       |      |    -/?    |      |
| Ulises   |     |   +   |      |           | +    |

Now, if we will strip `Mary loves Vasya` from the text resulting to:

```
Lyubomir loves Ron, Ron hates Lubomyr
Vasya mutually hates Alice
Ulices mutually loves Alice
Ulises mutually loves Mike
Ulises hates Theodoric.
```

There will be no more Mary, so, we have to remove the empty "Mary" column:

|          | Ron | Alice | Theodoric | Mike |
|----------|:---:|:-----:|:---------:|:----:|
| Vasya    |     |   -   |           |      |
| Lyubomir | +/- |       |    -/?    |      |
| Ulises   |     |   +   |           |  +   |

Step 6. The End of Love (optional)
----------------------------------

Write end-to-end tests for all completed steps.

We will evaluate the grade for this exercise looking not only to the number of test cases but also on their
completeness. It is always better to get more with less efforts.

You can use any reasonable testing solution you want (we prefer Selenium and Chrome webdriver). Note that the tests
should run on our environment and you have to include installation manual for all the tools you use.

Conclusion
----------

Hope you will find this assignment interesting.

We put so much stuff here because we want you to focus on exercise you find most exciting to you.

And no matter how far you will decide to go through the assignment we would love to hear feedback from you.

Thank you and good luck!


text:
@interface CCPhysicsTest : TestBase @end

@implementation CCPhysicsTest

-(void) setupBasicShapeTest
{
	self.subTitle = @"Basic simulation and collision.";

	CCPhysicsNode *physics = [CCPhysicsNode node];
	physics.debugDraw = YES;
	[self.contentNode addChild:physics];

	{
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-0.png"];
		sprite.position = ccp(100, 100);
		sprite.rotation = 13;

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.velocity = ccp(10, 10);
		body.angularVelocity = 0.1;

		[physics addChild:sprite];
	}{
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-1.png"];
		sprite.position = ccp(100, 220);
		sprite.rotation = 13;

		CGSize size = sprite.contentSize;
		CGPoint points[] = {
			ccp(0, 0),
			ccp(size.width, 0),
			ccp(size.width/2, size.height),
		};

		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithPolygonFromPoints:points count:3 cornerRadius:0.0];
		body.velocity = ccp(10, -10);
		body.angularVelocity = -0.1;

		[physics addChild:sprite];
	}{
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-2.png"];
		sprite.position = ccp(380, 220);
		sprite.rotation = 13;

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.velocity = ccp(-10, -10);
		body.angularVelocity = 0.1;

		[physics addChild:sprite];
	}{
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-3.png"];
		sprite.position = ccp(380, 100);
		sprite.rotation = 13;

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.velocity = ccp(-10, 10);
		body.angularVelocity = -0.1;

		[physics addChild:sprite];
	}
}

-(void) setupScaledBasicShapeTest
{
	self.subTitle = @"Basic simulation with scaled nodes.";

	CCPhysicsNode *physics = [CCPhysicsNode node];
	physics.debugDraw = YES;
	[self.contentNode addChild:physics];

	{
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-0.png"];
		sprite.position = ccp(100, 100);
		sprite.rotation = 13;
		sprite.scale = 0.5;

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.velocity = ccp(10, 10);
		body.angularVelocity = 0.1;

		[physics addChild:sprite];
	}{
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-1.png"];
		sprite.position = ccp(100, 220);
		sprite.rotation = 13;
		sprite.scaleY = 1.5;

		CGSize size = sprite.contentSize;
		CGPoint points[] = {
			ccp(0, 0),
			ccp(size.width, 0),
			ccp(size.width/2, size.height),
		};

		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithPolygonFromPoints:points count:3 cornerRadius:0.0];
		body.velocity = ccp(10, -10);
		body.angularVelocity = -0.1;

		[physics addChild:sprite];
	}{
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-2.png"];
		sprite.position = ccp(380, 220);
		sprite.rotation = 13;
		sprite.scaleX = 0.5;

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.velocity = ccp(-10, -10);
		body.angularVelocity = 0.1;

		[physics addChild:sprite];
	}{
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-3.png"];
		sprite.position = ccp(380, 100);
		sprite.rotation = 13;
		sprite.scaleY = 1.5;

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.velocity = ccp(-10, 10);
		body.angularVelocity = -0.1;

		[physics addChild:sprite];
	}
}

-(void) setupBatchedBasicShapeTest
{
	self.subTitle = @"Basic simulation with scaled, batched sprites.";

	CCPhysicsNode *physics = [CCPhysicsNode node];
	physics.debugDraw = YES;
	[self.contentNode addChild:physics];

	CCNode *bn = [CCNode node];
	[physics addChild:bn];

	{
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-0.png"];
		sprite.position = ccp(100, 100);
		sprite.rotation = 13;
		sprite.scale = 0.5;

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.velocity = ccp(10, 10);
		body.angularVelocity = 0.1;

		[bn addChild:sprite];
	}{
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-1.png"];
		sprite.position = ccp(100, 220);
		sprite.rotation = 13;
		sprite.scaleY = 1.5;

		CGSize size = sprite.contentSize;
		CGPoint points[] = {
			ccp(0, 0),
			ccp(size.width, 0),
			ccp(size.width/2, size.height),
		};

		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithPolygonFromPoints:points count:3 cornerRadius:0.0];
		body.velocity = ccp(10, -10);
		body.angularVelocity = -0.1;

		[bn addChild:sprite];
	}{
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-2.png"];
		sprite.position = ccp(380, 220);
		sprite.rotation = 13;
		sprite.scaleX = 0.5;

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.velocity = ccp(-10, -10);
		body.angularVelocity = 0.1;

		[bn addChild:sprite];
	}{
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-3.png"];
		sprite.position = ccp(380, 100);
		sprite.rotation = 13;
		sprite.scaleY = 1.5;

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.velocity = ccp(-10, 10);
		body.angularVelocity = -0.1;

		[bn addChild:sprite];
	}
}

-(void) setupJointTest
{
	self.subTitle = @"Various joints.";

	CCPhysicsNode *physics = [CCPhysicsNode node];
	physics.gravity = ccp(0, -100);
	physics.debugDraw = YES;
	[self.contentNode addChild:physics];

	{
		CCSprite *sprite1 = [CCSprite spriteWithImageNamed:@"Sprites/shape-0.png"];
		sprite1.position = ccp(100, 200);

		CGRect rect = {CGPointZero, sprite1.contentSize};
		CCPhysicsBody *body1 = sprite1.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body1.type = CCPhysicsBodyTypeStatic;

		[physics addChild:sprite1];

		CCSprite *sprite2 = [CCSprite spriteWithImageNamed:@"Sprites/shape-0.png"];
		sprite2.position = ccp(100, 100);

		CCPhysicsBody *body2 = sprite2.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body2.velocity = ccp(10, 0);

		[physics addChild:sprite2];

		[CCPhysicsJoint connectedPivotJointWithBodyA:body1 bodyB:body2 anchorA:ccp(rect.size.width/2.0, -rect.size.height/4.0)];
	}{
		CCSprite *sprite1 = [CCSprite spriteWithImageNamed:@"Sprites/shape-0.png"];
		sprite1.position = ccp(200, 200);

		CGRect rect = {CGPointZero, sprite1.contentSize};
		CCPhysicsBody *body1 = sprite1.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body1.type = CCPhysicsBodyTypeStatic;

		[physics addChild:sprite1];

		CCSprite *sprite2 = [CCSprite spriteWithImageNamed:@"Sprites/shape-0.png"];
		sprite2.position = ccp(200, 100);

		CCPhysicsBody *body2 = sprite2.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body2.velocity = ccp(10, 0);

		[physics addChild:sprite2];

		[CCPhysicsJoint connectedDistanceJointWithBodyA:body1 bodyB:body2 anchorA:ccp(rect.size.width/2.0, 0.0) anchorB:ccp(rect.size.width/2.0, rect.size.height)];
	}{
		CCSprite *sprite1 = [CCSprite spriteWithImageNamed:@"Sprites/shape-0.png"];
		sprite1.position = ccp(300, 200);

		CGRect rect = {CGPointZero, sprite1.contentSize};
		CCPhysicsBody *body1 = sprite1.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body1.type = CCPhysicsBodyTypeStatic;

		[physics addChild:sprite1];

		CCSprite *sprite2 = [CCSprite spriteWithImageNamed:@"Sprites/shape-0.png"];
		sprite2.position = ccp(300, 100);

		CCPhysicsBody *body2 = sprite2.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body2.velocity = ccp(10, 250);

		[physics addChild:sprite2];

		[CCPhysicsJoint connectedDistanceJointWithBodyA:body1 bodyB:body2 anchorA:ccp(rect.size.width/2.0, 0.0) anchorB:ccp(rect.size.width/2.0, rect.size.height) minDistance:20 maxDistance:70];
	}
}

-(void) setupStackTest
{
	self.subTitle = @"Stable stacking.";

	CCPhysicsNode *physics = [CCPhysicsNode node];
	physics.gravity = ccp(0, -100);
	physics.debugDraw = YES;
	[self.contentNode addChild:physics];

	// Create the ground
	{
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-0.png"];
		sprite.position = ccp(240, 0);

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.type = CCPhysicsBodyTypeStatic;

		[physics addChild:sprite];
	}

	for(int i=0; i<10; i++){
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-3.png"];
		sprite.position = ccp(240, 50 + 1.5*sprite.contentSize.height*i);

		CGRect rect = {CGPointZero, sprite.contentSize};
		sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];

		[physics addChild:sprite];
	}
}

-(void)setupDensityTest
{
	self.subTitle = @"The two boxes are equal in weight and should balance.";

	CCPhysicsNode *physics = [CCPhysicsNode node];
	physics.debugDraw = YES;
	physics.gravity = ccp(0, -100);

	[self.contentNode addChild:physics];

	{
		// Fulcrum
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-1.png"];
		sprite.position = ccp(240, 100);

		CGSize size = sprite.contentSize;
		CGPoint points[] = {
			ccp(0, 0),
			ccp(size.width, 0),
			ccp(size.width/2, size.height),
		};

		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithPolygonFromPoints:points count:3 cornerRadius:0.0];
		body.type = CCPhysicsBodyTypeStatic;

		[physics addChild:sprite];
	}

	{
		// Balance
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-3.png"];
		sprite.position = ccp(240, 130);
		sprite.scaleX = 4.0;

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.mass = 100.0;

		[physics addChild:sprite];
	}

	{
		// Little box
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-0.png"];
		sprite.position = ccp(140, 200);
		CGFloat scale = sprite.scale = 0.5;

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.density = 1.0/(scale*scale);

		[physics addChild:sprite];
	}

	{
		// Big box
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-0.png"];
		sprite.position = ccp(340, 200);

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.density = 1.0;

		[physics addChild:sprite];
	}
}

// This test currently doesn't work since we havent implemented proper physics/action support yet.
-(void)setupMovingPlatformsTest
{
	self.subTitle = @"Moving platforms.";

	CCPhysicsNode *physics = [CCPhysicsNode node];
	physics.gravity = ccp(0, -100);
	physics.debugDraw = YES;
	[self.contentNode addChild:physics];

	// TODO temporary.
	physics.sleepTimeThreshold = INFINITY;

	{
		// Vertical moving platform
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-3.png"];
		sprite.position = ccp(120, 110);

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.type = CCPhysicsBodyTypeStatic;

		[sprite runAction:[CCActionRepeatForever actionWithAction:[CCActionSequence actions:
			[CCActionMoveBy actionWithDuration:3 position:ccp(0, 100)],
			[CCActionMoveBy actionWithDuration:3 position:ccp(0, -100)],
			nil
		]]];

		[physics addChild:sprite];
	}{
		// Box
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-0.png"];
		sprite.position = ccp(120, 160);

		CGRect rect = {CGPointZero, sprite.contentSize};
		sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];

		[physics addChild:sprite];
	}

	{
		// Horizontal moving platform
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-3.png"];
		sprite.position = ccp(360, 160);

		CGRect rect = {CGPointZero, sprite.contentSize};
		CCPhysicsBody *body = sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];
		body.type = CCPhysicsBodyTypeStatic;

		[sprite runAction:[CCActionRepeatForever actionWithAction:[CCActionSequence actions:
			[CCActionMoveBy actionWithDuration:3 position:ccp(100, 0)],
			[CCActionMoveBy actionWithDuration:3 position:ccp(-100, 0)],
			nil
		]]];

		[physics addChild:sprite];
	}{
		// Box
		CCSprite *sprite = [CCSprite spriteWithImageNamed:@"Sprites/shape-0.png"];
		sprite.position = ccp(360, 210);

		CGRect rect = {CGPointZero, sprite.contentSize};
		sprite.physicsBody = [CCPhysicsBody bodyWithRect:rect cornerRadius:0.0];

		[physics addChild:sprite];
	}
}

@end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

		<title>HTML AUTH HOME</title>
		<meta name="author" content="Debian User,,," >
		<meta name="generator" content="screem 0.8.2" >
		<meta name="keywords" content="" >
		<meta http-equiv="content-type" content="text/html; charset=UTF-8" >
		<meta http-equiv="Content-Script-Type" content="text/javascript" >
		<meta http-equiv="Content-Style-Type" content="text/css" >

HTML AUTH HOME

This page just points down into subdirectories that hold
		html login forms and pages protected by digest auth (RFC2617).

Accessing this page, basic, will generate
        a 401.

form


text:
<project xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.google.api.grpc</groupId>
  <artifactId>proto-google-cloud-workflow-executions-v1beta</artifactId>
  <version>0.7.6</version><!-- {x-version-update:proto-google-cloud-workflow-executions-v1beta:current} -->
  <name>proto-google-cloud-workflow-executions-v1beta</name>
  <description>Proto library for google-cloud-workflow-executions</description>
  <parent>
    <groupId>com.google.cloud</groupId>
    <artifactId>google-cloud-workflow-executions-parent</artifactId>
    <version>2.3.6</version><!-- {x-version-update:google-cloud-workflow-executions:current} -->
  </parent>
  <dependencies>
    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.api.grpc</groupId>
      <artifactId>proto-google-common-protos</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.api</groupId>
      <artifactId>api-common</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>flatten-maven-plugin</artifactId>
        </plugin>
    </plugins>
  </build>
</project>


text:
/*globals define*/
/*eslint-env node, browser*/

/**
 * Plugin mainly used for testing.
 * @author kecso / https://github.com/kecso
 * @module CorePlugins:GuidCollider
 */

define([
    'plugin/PluginConfig',
    'plugin/PluginBase',
    'common/util/guid',
    'q',
    'text!./metadata.json'
], function (PluginConfig, PluginBase, GUID, Q, pluginMetadata) {
    'use strict';

    pluginMetadata = JSON.parse(pluginMetadata);

    /**
     * Initializes a new instance of MinimalWorkingExample.
     * @class
     * @augments {PluginBase}
     * @classdesc This class represents the plugin MinimalWorkingExample.
     * @constructor
     */
    function GuidCollider() {
        // Call base class' constructor.
        PluginBase.call(this);
        this.pluginMetadata = pluginMetadata;

        // we do not know the meta types, will be populated during run time
        this.metaTypes = {};
    }

    GuidCollider.metadata = pluginMetadata;

    // Prototypical inheritance from PluginBase.
    GuidCollider.prototype = Object.create(PluginBase.prototype);
    GuidCollider.prototype.constructor = GuidCollider;

    /**
     * Main function for the plugin to execute. This will perform the execution.
     * Notes:
     * - Always log with the provided logger.[error,warn,info,debug].
     * - Do NOT put any user interaction logic UI, etc. inside this method.
     * - callback always has to be called even if error happened.
     *
     * @param {function(Error, plugin.PluginResult)} callback - the result callback
     */
    GuidCollider.prototype.main = function (callback) {
        // Use self to access core, project, result, logger etc from PluginBase.
        // These are all instantiated at this point.
        var self = this,
            currentConfiguration = self.getCurrentConfig(),
            guids = {},
            hasCollision = false,
            visitFn = function (node, next) {
                var oldGuid = self.core.getGuid(node),
                    newGuid;
                if (guids.hasOwnProperty(oldGuid)) {
                    hasCollision = true;
                    if (currentConfiguration.checkOnly) {
                        self.createMessage(node, 'guid collision with: ' + guids[oldGuid]);
                    } else {
                        newGuid = GUID();
                        self.core.setGuid(node, newGuid);
                        self.createMessage(node, 'guid changed [' + oldGuid + ']->[' + newGuid + ']');
                        guids[newGuid] = self.core.getPath(node);
                    }
                } else {
                    guids[oldGuid] = self.core.getPath(node);
                }
                next(null);
            };

        self.updateMETA(self.metaTypes);

        Q.ninvoke(self.core, 'traverse', self.rootNode, null, visitFn)
            .then(function () {
                if (hasCollision && currentConfiguration.checkOnly === false) {
                    return self.save('guid collision fix');
                } else {
                    return {};
                }
            })
            .then(function (/*status*/) {
                self.result.setSuccess(true);
            })
            .catch(function (err) {
                self.result.setError('Failed execution: ', err.message);
                self.result.setSuccess(false);
            })
            .finally(function () {
                callback(null, self.result);
            });
    };

    return GuidCollider;
});


text:
<?php echo \View::instance()->render('header.php') ?>

<?php echo \View::instance()->render('administration/_navigation.php') ?>

<?php
$renderer = \helpers\FormRendererFactory::className();
?>

<?php echo \F3::get('lang.ReportOfficerDuplicatesHeader') ?>

<?php echo \F3::get('lang.ReportUpdated', \helpers\View::formatUnixDateTime(time())) ?>

					<?php echo \F3::get('lang.HomeClub') ?>
					<?php echo \F3::get('lang.ReportExecCommitteePositionShort') ?>
					<?php echo \F3::get('lang.FullName') ?>
					<?php echo \F3::get('lang.Email') ?>
					<?php echo \F3::get('lang.Phone') ?>
					<?php echo \F3::get('lang.RegistrationStatus') ?>

			<?php
			foreach ($data as $club => $positions):
				$clubFirst = true;
			foreach ($positions as $position => $registrations):
				$positionFirst = true;
			foreach ($registrations as $registration):
			?>
				<tr data-id="<?php echo $registration->getId() ?>">
					<?php if ($clubFirst): ?><td rowspan="<?php echo count($positions, COUNT_RECURSIVE) - count($positions) ?>" style="vertical-align: middle;"><?php echo $club ?>	<?php endif; ?>
					<?php if ($positionFirst): ?><td rowspan="<?php echo count($registrations) ?>" style="vertical-align: middle;"><?php echo \F3::get('lang.ExecCommmitteePositionShort-' . $position) ?>	<?php endif; ?>
					<?php echo $renderer::value($registration, 'full-name') ?>
					<a href="mailto:<?php echo $registration->getEmail() ?>"><?php echo $registration->getEmail() ?>
					<a href="callto:<?php echo $registration->getField('phone') ?>"><?php echo $renderer::value($registration, 'phone') ?>
					<span class="label label-<?php echo \helpers\View::getRegistrationStatusLabel($registration->getStatus()) ?>"><?php echo \F3::get('lang.RegistrationStatus-' . $registration->getStatus()) ?>

			<?php
				$positionFirst = false;
				$clubFirst = false;
			endforeach; // Registrations
			endforeach; // Positions
			endforeach; // Clubs
			?>

<?php echo \View::instance()->render('footer.php') ?>