text:
	/*
 * HTML5 Boilerplate
 *
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 *
 * Detailed information about this CSS: h5bp.com/css
 *
 * ==|== normalize ==========================================================
 */

/* =============================================================================
   HTML5 display definitions
   ========================================================================== */

article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; }
audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; }
audio:not([controls]) { display: none; }
[hidden] { display: none; }

/* =============================================================================
   Base
   ========================================================================== */

/*
 * 1. Correct text resizing oddly in IE6/7 when body font-size is set using em units
 * 2. Prevent iOS text size adjust on device orientation change, without disabling user zoom: h5bp.com/g
 */

html { font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%;
}

html, button, input, select, textarea { color: #c7c7c7; }
div {
/*	cursor:url(../cursor/SC2-ibeam-small.cur),auto; */
}

body {
	margin: 0; font-size: 1em;
	font-family: Helvetica,Arial,Verdana,sans-serif;
	color: #c7c7c7;
	background: #333 url(bg-texture.jpg) scroll;
}
.sc2font{
	font-family: eurostile,Helvetica,Arial,Verdana,sans-serif;
}
.sc2fontExt {
	font-family: eurostileExt,Helvetica,Arial,Verdana,sans-serif;
}
::-moz-selection {color: #5F618F; text-shadow: none; }
::selection { color: #5F618F; text-shadow: none; }

/* =============================================================================
   Links
   ========================================================================== */

/* a { color: #00e; }
a:visited { color: #551a8b; }
a:hover { color: #06e; }
a:focus { outline: thin dotted; }

a:hover, a:active { outline: 0; }
*/

/* =============================================================================
   Typography
   ========================================================================== */

abbr[title] { border-bottom: 1px dotted; }

b, strong { font-weight: bold; }

blockquote { margin: 1em 40px; }

dfn { font-style: italic; }

hr { display: block; height: 1px; border: 0; border-top: 1px solid #ccc; margin: 1em 0; padding: 0; }

ins { background: #ff9; color: #000; text-decoration: none; }

mark { background: #ff0; color: #000; font-style: italic; font-weight: bold; }

/* Redeclare monospace font family: h5bp.com/j */
pre, code, kbd, samp { font-family: monospace, serif; _font-family: 'courier new', monospace; font-size: 1em; }

/* Improve readability of pre-formatted text in all browsers */
pre { white-space: pre; white-space: pre-wrap; word-wrap: break-word; }

q { quotes: none; }
q:before, q:after { content: ""; content: none; }

small { font-size: 85%; }

/* Position subscript and superscript content without affecting line-height: h5bp.com/k */
sub, sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; }
sup { top: -0.5em; }
sub { bottom: -0.25em; }

/* =============================================================================
   Lists
   ========================================================================== */

ul, ol { margin: 1em 0; padding: 0 0 0 15px; }
dd { margin: 0 0 0 15px; }
ol, nav ul, nav ol { list-style: none; list-style-image: none; margin: 0; padding: 0; }

/* =============================================================================
   Embedded content
   ========================================================================== */

/*
 * 1. Improve image quality when scaled in IE7: h5bp.com/d
 * 2. Remove the gap between images and borders on image containers: h5bp.com/i/440
 */

img { border: 0; -ms-interpolation-mode: bicubic; vertical-align: middle; }

/*
 * Correct overflow not hidden in IE9
 */

svg:not(:root) { overflow: hidden; }

/* =============================================================================
   Figures
   ========================================================================== */

figure { margin: 0; }

/* =============================================================================
   Forms
   ========================================================================== */

form { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; }

/* Indicate that 'label' will shift focus to the associated form element */
label { cursor: pointer; }

/*
 * 1. Correct color not inheriting in IE6/7/8/9
 * 2. Correct alignment displayed oddly in IE6/7
 */

legend { border: 0; *margin-left: -7px; padding: 0; white-space: normal; }

/*
 * 1. Correct font-size not inheriting in all browsers
 * 2. Remove margins in FF3/4 S5 Chrome
 * 3. Define consistent vertical alignment display in all browsers
 */

button, input, select, textarea { font-size: 100%; margin: 0; vertical-align: baseline; *vertical-align: middle; }

/*
 * 1. Define line-height as normal to match FF3/4 (set using !important in the UA stylesheet)
 */

button, input { line-height: normal; }

/*
 * 1. Display hand cursor for clickable form elements
 * 2. Allow styling of clickable form elements in iOS
 * 3. Correct inner spacing displayed oddly in IE7 (doesn't effect IE6)
 */

button, input[type="button"], input[type="reset"], input[type="submit"] { cursor: pointer; -webkit-appearance: button; *overflow: visible; }

/*
 * Re-set default cursor for disabled elements
 */

button[disabled], input[disabled] { cursor: default; }

    button, input[type="button"], input[type="reset"], input[type="submit"] {
        background: none no-repeat scroll 0 0 #1F1F25;
        border: 1px solid #7B7B7B;
        color: #F2F2F2;
        font-size: 1em;
        height: 25px;
        margin-right: 10px;
        vertical-align: top;
    }
/*
 * Consistent box sizing and appearance
 */

input[type="checkbox"], input[type="radio"] { box-sizing: border-box; padding: 0; *width: 13px; *height: 13px; }
input[type="search"] { -webkit-appearance: textfield; -moz-box-sizing: content-box; -webkit-box-sizing: content-box; box-sizing: content-box; }
input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/*
 * Remove inner padding and border in FF3/4: h5bp.com/l
 */

button::-moz-focus-inner, input::-moz-focus-inner { border: 0; padding: 0; }

/*
 * 1. Remove default vertical scrollbar in IE6/7/8/9
 * 2. Allow only vertical resizing
 */

textarea { overflow: auto; vertical-align: top; resize: vertical; }

/* Colors for form validity */
input:valid, textarea:valid {  }
input:invalid, textarea:invalid { background-color: #f0dddd; }

/* =============================================================================
   Tables
   ========================================================================== */

table { border-collapse: collapse; border-spacing: 0; }
td { vertical-align: top; }

/* =============================================================================
   Chrome Frame Prompt
   ========================================================================== */

.chromeframe {
	margin: 0 15px;
	padding:20px 0;
	background: black;
	color: #A90E0E;
	font-weight:bold;
	height: 20px;
}
.ancientLink{
	color:#007CFF;
}

/* ==|== primary styles =====================================================
   Author:
   ========================================================================== */

/* ==|== media queries ======================================================
   EXAMPLE Media Query for Responsive Design.
   This example overrides the primary ('mobile first') styles
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}

/* ==|== non-semantic helper classes ========================================
   Please define your styles before this section.
   ========================================================================== */

/* For image replacement */
.ir { display: block; border: 0; text-indent: -999em; overflow: hidden; background-color: transparent; background-repeat: no-repeat; text-align: left; direction: ltr; *line-height: 0; }
.ir br { display: none; }

/* Hide from both screenreaders and browsers: h5bp.com/u */
.hidden { display: none !important; visibility: hidden; }

/* Hide only visually, but have it available for screenreaders: h5bp.com/v */
.visuallyhidden { border: 0; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }

/* Extends the .visuallyhidden class to allow the element to be focusable when navigated to via the keyboard: h5bp.com/p */
.visuallyhidden.focusable:active, .visuallyhidden.focusable:focus { clip: auto; height: auto; margin: 0; overflow: visible; position: static; width: auto; }

/* Hide visually and from screenreaders, but maintain layout */
.invisible { visibility: hidden; }

/* Contain floats: h5bp.com/q */
.clearfix:before, .clearfix:after { content: ""; display: table; }
.clearfix:after { clear: both; }
.clearfix { *zoom: 1; }

/* ==|== print styles =======================================================
   Print styles.
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */

@media print {
  * { background: transparent !important; color: black !important; box-shadow:none !important; text-shadow: none !important; filter:none !important; -ms-filter: none !important; } /* Black prints faster: h5bp.com/s */
  a, a:visited { text-decoration: underline; }
  a[href]:after { content: " (" attr(href) ")"; }
  abbr[title]:after { content: " (" attr(title) ")"; }
  .ir a:after, a[href^="javascript:"]:after, a[href^="#"]:after { content: ""; }  /* Don't show links for images, or javascript/internal links */
  pre, blockquote { border: 1px solid #999; page-break-inside: avoid; }
  thead { display: table-header-group; } /* h5bp.com/t */
  tr, img { page-break-inside: avoid; }
  img { max-width: 100% !important; }
  @page { margin: 0.5cm; }
  p, h2, h3 { orphans: 3; widows: 3; }
  h2, h3 { page-break-after: avoid; }
}

/* ===================== sc2geeks.com specific styles =================== */

/*************** top menu css *****************/
    #topmenu{ height:37px; display:block; padding:0; margin: 0;  border:1px solid; border-radius:5px; }
    #topmenu > ul {list-style:inside none; padding:0; margin:0;}
    #topmenu .currentTab {background: none repeat scroll 0 0 #263B7A;}
    #topmenu > ul > li {list-style:inside none; padding:0; margin:0; float:left; display:block; position:relative;}
    #topmenu > ul > li > a{ outline:none; display:block; position:relative; padding:12px 20px; font:bold 13px/100% Arial, Helvetica, sans-serif; text-align:center; text-decoration:none; text-shadow:1px 1px 0 rgba(0,0,0, 0.4); }
    #topmenu > ul > li:first-child > a{border-radius:5px 0 0 5px;}
    #topmenu > ul > li > a:after{ content:''; position:absolute; border-right:1px solid; top:-1px; bottom:-1px; right:-2px; z-index:99; }
    #topmenu ul li.has-sub:hover > a:after{top:0; bottom:0;}
    #topmenu > ul > li.has-sub > a:before{ content:''; position:absolute; top:18px; right:6px; border:5px solid transparent; border-top:5px solid #fff; }
    #topmenu > ul > li.has-sub:hover > a:before{top:19px;}
    #topmenu ul li.has-sub:hover > a{ background:#3f3f3f; border-color:#3f3f3f; padding-bottom:13px; padding-top:13px; top:-1px; z-index:999; }
    #topmenu ul li.has-sub:hover > ul, #topmenu ul li.has-sub:hover > div{display:block;}
    #topmenu ul li.has-sub > a:hover{background:#3f3f3f; border-color:#3f3f3f;}
    #topmenu ul li > ul, #topmenu ul li > div{ display:none; width:auto; position:absolute; top:26px; padding:10px 0; background:#3f3f3f; border-radius:0 0 5px 5px; z-index:999; }
    #topmenu ul li > ul{width:200px;}
    #topmenu ul li > ul li{display:block; list-style:inside none; padding:0; margin:0; position:relative;}
    #topmenu ul li > ul li a{ outline:none; display:block; position:relative; margin:0; padding:8px 20px; font:10pt Arial, Helvetica, sans-serif; color:#fff; text-decoration:none; text-shadow:1px 1px 0 rgba(0,0,0, 0.5); }

	#topmenu, #topmenu > ul > li > ul > li a:hover {
		background: #13212c;
		background: -moz-linear-gradient(top, #293970 0%, #0b103c 100%);
		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #293970), color-stop(100%, #0b103c));
		background: -webkit-linear-gradient(top, #293970 0%, #0b103c 100%);
		background: -o-linear-gradient(top, #293970 0%, #0b103c 100%);
		background: -ms-linear-gradient(top, #293970 0%, #0b103c 100%);
		background: linear-gradient(top, #293970 0%, #0b103c 100%);
		filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#293970', endColorstr = '#0b103c', GradientType = 0);
	}

	#topmenu{border-color: #000000 #000000 #444444;}
    #topmenu > ul > li > a{border-right:1px solid #000; color:#E4E4E4;}
    #topmenu > ul > li > a:after{border-color:#444;}
    #topmenu > ul > li > a:hover{background:#263B7A;}
/*************** top menu css ends ************/

@font-face{
	font-family:eurostileExt;
	src:url("fonts/EurostileExt-Reg.otf");
}

@font-face {
    font-family: 'eurostile';
	src: url('fonts/Eurostile-Reg.eot');
	src: local('?'), url('fonts/Eurostile-Reg.eot?#iefix') format('embedded-opentype'), url('fonts/Eurostile-Reg.woff') format('woff'), url('fonts/Eurostile-Reg.ttf') format('truetype'), url('fonts/Eurostile-Reg.svg') format('svg');
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: 'RobotoRegular';
	src: url('fonts/Roboto-Regular-webfont.eot');
	src: url('fonts/Roboto-Regular-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-Regular-webfont.woff') format('woff'),
	url('fonts/Roboto-Regular-webfont.ttf') format('truetype'),
	url('fonts/Roboto-Regular-webfont.svg#RobotoRegular') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoItalic';
	src: url('fonts/Roboto-Italic-webfont.eot');
	src: url('fonts/Roboto-Italic-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-Italic-webfont.woff') format('woff'),
	url('fonts/Roboto-Italic-webfont.ttf') format('truetype'),
	url('fonts/Roboto-Italic-webfont.svg#RobotoItalic') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoBold';
	src: url('fonts/Roboto-Bold-webfont.eot');
	src: url('fonts/Roboto-Bold-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-Bold-webfont.woff') format('woff'),
	url('fonts/Roboto-Bold-webfont.ttf') format('truetype'),
	url('fonts/Roboto-Bold-webfont.svg#RobotoBold') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoBoldItalic';
	src: url('fonts/Roboto-BoldItalic-webfont.eot');
	src: url('fonts/Roboto-BoldItalic-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-BoldItalic-webfont.woff') format('woff'),
	url('fonts/Roboto-BoldItalic-webfont.ttf') format('truetype'),
	url('fonts/Roboto-BoldItalic-webfont.svg#RobotoBoldItalic') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoCondensed';
	src: url('fonts/Roboto-Condensed-webfont.eot');
	src: url('fonts/Roboto-Condensed-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-Condensed-webfont.woff') format('woff'),
	url('fonts/Roboto-Condensed-webfont.ttf') format('truetype'),
	url('fonts/Roboto-Condensed-webfont.svg#RobotoCondensed') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoCondensedItalic';
	src: url('fonts/Roboto-CondensedItalic-webfont.eot');
	src: url('fonts/Roboto-CondensedItalic-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-CondensedItalic-webfont.woff') format('woff'),
	url('fonts/Roboto-CondensedItalic-webfont.ttf') format('truetype'),
	url('fonts/Roboto-CondensedItalic-webfont.svg#RobotoCondensedItalic') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoBoldCondensed';
	src: url('fonts/Roboto-BoldCondensed-webfont.eot');
	src: url('fonts/Roboto-BoldCondensed-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-BoldCondensed-webfont.woff') format('woff'),
	url('fonts/Roboto-BoldCondensed-webfont.ttf') format('truetype'),
	url('fonts/Roboto-BoldCondensed-webfont.svg#RobotoBoldCondensed') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoBoldCondensedItalic';
	src: url('fonts/Roboto-BoldCondensedItalic-webfont.eot');
	src: url('fonts/Roboto-BoldCondensedItalic-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-BoldCondensedItalic-webfont.woff') format('woff'),
	url('fonts/Roboto-BoldCondensedItalic-webfont.ttf') format('truetype'),
	url('fonts/Roboto-BoldCondensedItalic-webfont.svg#RobotoBoldCondensedItalic') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoThin';
	src: url('fonts/Roboto-Thin-webfont.eot');
	src: url('fonts/Roboto-Thin-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-Thin-webfont.woff') format('woff'),
	url('fonts/Roboto-Thin-webfont.ttf') format('truetype'),
	url('fonts/Roboto-Thin-webfont.svg#RobotoThin') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoThinItalic';
	src: url('fonts/Roboto-ThinItalic-webfont.eot');
	src: url('fonts/Roboto-ThinItalic-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-ThinItalic-webfont.woff') format('woff'),
	url('fonts/Roboto-ThinItalic-webfont.ttf') format('truetype'),
	url('fonts/Roboto-ThinItalic-webfont.svg#RobotoThinItalic') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoLight';
	src: url('fonts/Roboto-Light-webfont.eot');
	src: url('fonts/Roboto-Light-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-Light-webfont.woff') format('woff'),
	url('fonts/Roboto-Light-webfont.ttf') format('truetype'),
	url('fonts/Roboto-Light-webfont.svg#RobotoLight') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoLightItalic';
	src: url('fonts/Roboto-LightItalic-webfont.eot');
	src: url('fonts/Roboto-LightItalic-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-LightItalic-webfont.woff') format('woff'),
	url('fonts/Roboto-LightItalic-webfont.ttf') format('truetype'),
	url('fonts/Roboto-LightItalic-webfont.svg#RobotoLightItalic') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoMedium';
	src: url('fonts/Roboto-Medium-webfont.eot');
	src: url('fonts/Roboto-Medium-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-Medium-webfont.woff') format('woff'),
	url('fonts/Roboto-Medium-webfont.ttf') format('truetype'),
	url('fonts/Roboto-Medium-webfont.svg#RobotoMedium') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoMediumItalic';
	src: url('fonts/Roboto-MediumItalic-webfont.eot');
	src: url('fonts/Roboto-MediumItalic-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-MediumItalic-webfont.woff') format('woff'),
	url('fonts/Roboto-MediumItalic-webfont.ttf') format('truetype'),
	url('fonts/Roboto-MediumItalic-webfont.svg#RobotoMediumItalic') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoBlack';
	src: url('fonts/Roboto-Black-webfont.eot');
	src: url('fonts/Roboto-Black-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-Black-webfont.woff') format('woff'),
	url('fonts/Roboto-Black-webfont.ttf') format('truetype'),
	url('fonts/Roboto-Black-webfont.svg#RobotoBlack') format('svg');
	font-weight: normal;
	font-style: normal;

}

@font-face {
	font-family: 'RobotoBlackItalic';
	src: url('fonts/Roboto-BlackItalic-webfont.eot');
	src: url('fonts/Roboto-BlackItalic-webfont.eot?#iefix') format('embedded-opentype'),
	url('fonts/Roboto-BlackItalic-webfont.woff') format('woff'),
	url('fonts/Roboto-BlackItalic-webfont.ttf') format('truetype'),
	url('fonts/Roboto-BlackItalic-webfont.svg#RobotoBlackItalic') format('svg');
	font-weight: normal;
	font-style: normal;

}

a {
	color: #c7c7c7;
	text-decoration: none;
}

/*color: #624F3F;
a:visited {
	color: #52D4FF;
}
*/
a:hover {
	color: #52d4ff;
	text-decoration: underline;
}

a:active, a:focus {
	text-decoration: underline;
}

p {
	line-height: 16px;
	margin-bottom: 10px;
}

ul {
	padding: 0px;
	list-style-type: none;
}

h1, h2, h3, h4, h5 {
	color: #c7c7c7;
}

h1 {
	font-size: 30px;
	margin: 0 0 15px;
}

h2 {
	font-size: 25px;
	margin: 0 0 12px;
}

h3 {
	font-size: 20px;
	margin: 0 0 10px;
}

h4 {
	font-size: 16px;
	font-weight: normal;
}

#topContainer {
	margin-left:auto;
	margin-right:auto;
}

#wrap_shadow {
	background-image:url(../img/bg_shadow.png);
	background-repeat: repeat-y;
	/*padding-left: 20px;
	padding-right: 20px;*/
    box-shadow: 0px 0px 29px rgba(0, 0, 0, 0.99);
    -moz-box-shadow: 0px 0px 29px rgba(0, 0, 0, 0.99);
    -webkit-box-shadow: 0px 0px 29px rgba(0, 0, 0, 0.99);
}

.wrap_style{
	margin-left:auto;
	margin-right:auto;
	width:1018px;
}

#pageContainer {
	width: 926px;
	min-height: 800px;
	padding: 20px 45px;
	background-color:#0C0A36;
	border: 1px #333;
	border-style: none solid;
}

#leftHeader {
	height: 89px;
	float:left;
}

img.logo {
	margin:5px 0 0;
}

#rightHeader {
	width: 478px;
	height: 89px;
	float: left;
	margin-left: 20px;
}

#leftHeader #logoContainer {
	float:left;
	width: 337px;
	height: 89px;

}

#leftHeader #midImageContainer {
	float:left;
	width: 91px;
	height: 89px;

}

#rightHeader #rightHeaderTop {
	clear:both;
	height:30px;
	padding-top: 10px;
}

#rightHeader #rightHeaderBottom {
	clear:both;
	height: 49px;
}

.bgIcon {
	background-image:url(../img/bg_icon_list.png);
	background-attachment: scroll;
	background-color: transparent;
	background-repeat: no-repeat;
}

#rightHeader #rightHeaderBottom #menuContainer {
	float:left;
	height:40px;
	width: 390px;

}

#rightHeader #rightHeaderBottom #menuContainer ul {
	display:block;
	height:18px;
	margin-top: 12px;
}

#rightHeader #rightHeaderBottom #menuContainer ul li {
	display:block;
	float:left;
	margin-right:5px;
	height:20px;
}

#rightHeader #rightHeaderBottom #socialIconContainer {
	float:right;
	height:40px;
	width: 87px;

}

#rightHeader #rightHeaderBottom #socialIconContainer a img {
	height:40px;
	width: 25px;
	margin-right: 0;
	vertical-align: middle;
}

#rightHeader #rightHeaderBottom #socialIconContainer a.twitter img {
	background-position: -30px 2px;
}

#rightHeader #rightHeaderBottom #socialIconContainer a.facebook img {
	background-position: -2px 2px;
}

#rightHeader #rightHeaderBottom #socialIconContainer a.youtube img {
	background-position: -64px 2px;
}

#searchBarContainer {
	clear:both;
	height: 49px;
	width: 100%;
	font-size:0.8em;
}

#searchBarContainer #searchBar {
	float:left;
    margin: 6px 0 0 5px;
}

#searchBarContainer #searchBar #searchbox, #filterName {
	height: 21px;
	line-height: 20px;
	width: 318px;
	margin-left: 3px;
	color: #7EA6E0;
	font-family: Arial;
	font-size: 16px;
	border:1px solid #696969;
	background-color:#1F1F25;
    vertical-align: bottom;
	*margin-top: -2px;
}

#searchBarContainer #searchBar #searchBtn {
	background: #1F1F25 no-repeat;
	border: 1px solid #7B7B7B;
	color: #F2F2F2;
	font-size: 1em;
	height: 25px;
	vertical-align: top;
	width: 78px;
	margin-right: 10px;
}

#searchBarContainer #hotKeywords{
	float: left;
	height: 30px;
	width: 478px;
}

#hotKeywords ul{
	margin:3px;
}
#searchBarContainer #hotKeywords li{
	display:inline;
	margin-right:5px;
}

a.underlineLink{
	color: #7ea6e0;
	text-decoration: underline;
	vertical-align:top;
}

a.underlineLink:visited {
	color: #7ea6e0;
}

a.underlineLink:hover {
	color: #52d4ff;
	text-decoration: underline;
}

a.underlineLink:active, a.underlineLink:focus {
	text-decoration: underline;
}

#navigationContainer {
	width: 100%;
	clear: both;
	border-bottom: 2px solid #333;
	font-size: 0.8em;
    height:20px;
	padding: 10px 0 0 ;
}

#navigationContainer #showing {
	float:left;
	padding-top: 3px;
    clear:both;
}

#navigationContainer #showWinner {
	float: right;
	text-align: right;
	padding-right:0.3em;
	margin-top:0.3em;
}

#showWinner label {
	vertical-align: top;
}

#bodyContainer {
	clear:both;
	margin: 10px auto;
}

#leftnav_wrapper {
    float:left;
    width: 230px;
    clear:left;
    margin: 15px 5px 0 0;
}
#narrow_title {
    background: none repeat scroll 0 0 #333333;
    font-weight: bold;
    text-align: center;
    width: 232px;
}
#bodyContainer #leftNavigationContainer {
    padding: 3px 0 0;
    width: 230px;
	font-size:0.8em;
    border: 1px solid #333333;
}

#bodyContainer #leftNavigationContainer .navigationBlock {
	clear: both;
	margin-bottom: 15px;
    padding: 0 3px;
}

#bodyContainer #leftNavigationContainer .navigationTitle {
	clear: both;
	font-weight: 700;
	margin-bottom: 3px;
}

#bodyContainer #leftNavigationContainer .navigationItemList {
	clear: both;

}

#bodyContainer #leftNavigationContainer .navigationBottom {
	clear: both;
	border-bottom: 1px solid #333333;
	margin-right: 15px;
	display:none;
}
#bodyContainer #leftNavigationContainer .navigationTop {
	/* display:none;*/
	clear: both;
	border-bottom: 1px solid #333333;
	margin: 0 0 3px;
	/* height:10px; */
}

.navigationItemList ul {
	padding: 0 0 0 0;
}

.navigationItemList ul li {
	background: no-repeat -3px -32px;
	line-height: 1.3;
	padding: 2px 0 2px 15px;
}

.navigationItemList h4{
	font-size:1em;
	line-height: 1.1;
	margin:0;
	font-weight: normal;
}

.moreNav {
	float:right;
	margin: 0 20px 15px 0;
}

.navigationItemList ul li.more {
	background-image: none;
	text-align: right;
	padding-right: 20px;
	padding-top: 15px;
}

#conditionFilterBlock {
	clear: both;
	width: 230px;
}

#conditionFilterTitle{
	clear: both;

	font-weight:600;
	margin-bottom: 10px;
}

#conditionFilterList ul li {
	line-height: 1.3;
	padding: 0 0 5px 20px;
	font-weight:500;
}

#bodyContainer #contentContainer {
	float:right;
	width: 686px;
	padding: 3px 0 0 0;
}

.breadcrumb {
	border-bottom: 2px solid #787878;
	padding: 0 5px;
}

.breadcrumb ol {
    padding:0;
    line-height: 1.5;
}

.crumb li {
	font-size: 0.9em;
	float:left;
}

.breadcrumb h1 {
	font-size:1.2em;
	margin:0;
}

.crumb li span {
    margin:0 0 0 3px;
    color: #C7C7C7;
}

.crumb div {
	margin: 0 3px;
	display: inline-block;
	vertical-align: top;
}

.crumb h2.propName {
	display:none;
}
.crumb h2.propValue {
	font-size: 1em;
	font-weight: normal;
	display:inline-block;
}

.floatLeft {
	float: left;
	text-align: left;
}

.floatRight {
	float: right;
	text-align: right;
}

.icon_20 {
	width: 20px;
	height: 20px;
}

.contentListItem .raceInfo .firstLine .player .playerName {
	height: inherit;
	overflow: inherit;
	vertical-align: top;
}

.contentListItem .raceInfo .firstLine .vsText {
	float: left;
	width: 30px;
}

.contentListItem .raceInfo .firstLine .ratingContainer {
	float: left;
	width: 80px;
	padding-left:5px;
}

.rating5 {
	width: 70px;
	height: 16px;
	background-image: url(../img/rating.png);
	background-repeat: no-repeat;
	background-position: 0px 0px;
}

.rating4 {
	width: 70px;
	height: 16px;
	background-image: url(../img/rating.png);
	background-repeat: no-repeat;
	background-position: 0px -16px;
}

.rating3 {
	width: 70px;
	height: 16px;
	background-image: url(../img/rating.png);
	background-repeat: no-repeat;
	background-position: 0px -32px;
}

.rating2 {
	width: 70px;
	height: 16px;
	background-image: url(../img/rating.png);
	background-repeat: no-repeat;
	background-position: 0px -48px;
}

.rating1 {
	width: 70px;
	height: 16px;
	background-image: url(../img/rating.png);
	background-repeat: no-repeat;
	background-position: 0px -64px;
}

.rating0 {
	width: 70px;
	height: 16px;
	background-image: url(../img/rating.png);
	background-repeat: no-repeat;
	background-position: 0px -80px;
}

#bodyContainer #contentContainer .pageNav {
	height: 30px;
	margin: 15px 0;
	text-align: center;
}

#pagination {
	text-align:center;
}

#pagination .previous-off, #pagination .next-off {
	color: #666666;
	display: block;
	float: left;
	padding: 4px;
}

#pagination .active {
	color: #53585B;
	font-weight: bold;
	padding: 5px 6px 3px;
}

#pagination li {
	border: 0 none;
	font-size: 12px;
	list-style: none outside none;
	margin: 0 2px;
	padding: 0;
	text-align:center;
	display:inline;
}
#pagination li.disabled {
	color: #53585B;
	padding: 5px 2px 3px;
}

#pagination a:link, #pagination a:visited {
	color: #778899;
	padding: 4px 6px 3px;
	text-decoration: none;
}

#pagination a {
	border: 1px solid #858585;
	margin: 0 3px;
	display:inline;
	text-align: center;
}

#footerContainer {
	clear: both;
	height: 40px;
	line-height: 40px;
	text-align: center;
	border-top: 2px solid #6A6A6A;
	font-size:0.9em;
}
/**** overlay *****/
#navWrapper {
	height:320px;
}
#allNavOverLay {
	width:740px;
	border: 1px solid #666;
	box-shadow: 0 0 90px 5px #000;
	display: none;
	background-image: -ms-linear-gradient(top, #101436 0%, #000512 100%);
	background-image: -moz-linear-gradient(top, #101436 0%, #000512 100%);
	background-image: -o-linear-gradient(top, #101436 0%, #000512 100%);
	background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #101436), color-stop(1, #000512));
	background-image: -webkit-linear-gradient(top, #101436 0%, #000512 100%);
	background-image: linear-gradient(top, #101436 0%, #000512 100%);
}
.navListContainer {
	height: 280px;
	overflow-y: auto;
	padding: 5px 10px;
	font-size: 0.8em;
}
.navListContainer li {
	float:left;
}
.navListContainer h4 {
	display: block;
	width:215px;
}
#navAllTitle {
	height:26px;
	margin: 5px;
    font-size:0.9em;
}

#navAllTitle input {
    margin: 0 5px;
}

a.close{
	float: right;
	margin-right: 5px;
	margin:0;
	border: none;
	padding: 0;
}
.close img {
	width:32px;
	height:32px;
	border: none;
	margin:0;
}

/***** breadcrumb *****/
#breadcrumb{
	border-top:1px solid #333333;
	clear:right;
}
#breadcrumb h1.mapTitle {
	display: none;
}
#breadcrumb ol.crumb{
	color:#7EA6E0;
	margin: 1em 0;
	padding: 0 0 0 15px;
}

/**** image containers & dynamic images ****/
span.vertical-aligned {
	display: inline-block;
	height:100%;
	vertical-align: middle;
}
.map-image-46-container {
	float:left;
	width:46px;
	height:46px;
	border:none;
	margin: 0 3px;
	white-space: nowrap;
	text-align: center;
}
.map-image-46 {
	vertical-align: middle;
	border:none;
	margin:auto;
	padding: 0;
	max-width:46px;
	max-height: 46px;
}
.map-image-124-container {
	float:left;
	width:124px;
	height:124px;
	border:none;
	margin: 0 15px;
	white-space: nowrap;
	text-align: center;
}
.map-image-124 {
	vertical-align: middle;
	border:none;
	margin:auto;
	padding: 0;
	max-width:124px;
	max-height: 124px;
}

	/*** common styles that are used by replay list & replay detail */
#replayRow, #main
{
	position: relative;
	margin-left: 10px;
}

.userColorBar
{
	width: 8px;
	height: 80px;
	background-color: red;
	margin-top: 20px;
}

.playerSection
{
	float: left;
	margin-top: 15px;
}

.floatRight img
{
	/* float:right; */
	margin-left: 5px;
}

img.trophy
{
	margin: 0 5px;
	width: 25px;
	height: 25px;
	display: none;
}

p.playerName
{
	display: block;
	font: bold 1.1em/1 "Arial";
	width: 128px;
}

.apm
{
	font-size: 0.7em;
	color: Gray;
	margin: 7px 0;
}

.mapContainer
{
	width: 125px;
	float: left;
	margin: 0 15px;
}

#replayRow .mapContainer
{
	height: 124px;
}

/*****  index page ***********/
.clear {
	clear:both;
}
.noborder {
	border:none !important;
}
.contentListItem {
	position:relative;
	clear:both;
	margin: 5px 0;
	padding:0 0 5px 4px;
	font-size:0.9em;
	border-bottom: 1px solid #333333;
}

.fullRow {
	width:100%;
}
.contentListItem .playerSection {
	margin: 0;
	width:198px;
}
.contentListItem img.race {
	width:40px;
	height:50px;
}
.contentListItem p.playerName {
	font-size: 1.1em;
	font-weight:normal;
	margin:10px 0 0;
}
.contentListItem .trophy {
	width:16px;
	height:16px;
	margin-top:2px;
}
.contentListItem .mapContainer {
	float:left;
	width:46px;
	border:none;
	margin: 0 3px;
}
.contentListItem .mapImage {
	width:46px;
	height:46px;
}
.contentListItem .action {
	float:left;
	margin: 0 0 0 6px;
	width: 218px;
	color: #C7C7C7;
	position:relative;
}

.action{
	padding: 2px 5px;
	font-size: 0.8em;
	color: #7EA6E0;
	margin-right:30px;
}

#action {
	margin: 15px 0;
	font-size:1.1em;
}

.action p {
margin: 3px 0;
line-height: 1.1em;
max-width: 218px;
overflow:hidden;
}
.action a {
	margin: 0 0 0 5px;
}
.playerSection .colorBar {
	height:38px;
	margin-top:6px;
	width:0px;
	border-left-size:6px;
	border-left-style:solid;
}
.action a img {
	margin:-1px 0 0 2px;
}
.action .downloadRow {
	height: 13px;
	vertical-align:bottom;
	left:100px;
	position:absolute;
	top: 3px;
}
.playerSection .apm {
	font-size: 0.7em;
	color: #808080;
	margin: 4px 0;
}

.showAll {
float  :right;
margin-right:8px;
}

.external {
	background:  url("../img/external.png") no-repeat scroll right center transparent;
	padding-right:14px;
}

.source {
	font-size: 0.8em;
	color: #7e7e7e;
	padding-top:10px;
	float:right;
}

/*
 Build order styles
 */
#buildOrders table,  #buildOrders th,  #buildOrders td {
	margin: 25px auto 0 auto;
	border-collapse: collapse;
	font-size: 0.9em;
	text-align: left;
	border: 1px solid #62728B;
	vertical-align: middle;
}

#buildOrders th {
	background-color: #19397E;
	padding: 4px 5px;
	text-align: center;
}

th.time {
	width: 80px;
}
th.player {
	width: 200px;
}

#buildOrders td span {
	float:left;
}
span.thumbnail-25-container {
	width: 25px;
	height: 25px;
	overflow: hidden;
	background: #000;
	-moz-border-radius: 3px;
	-webkit-border-radius: 3px;
	border-radius: 3px;
	display:block;
	margin: 0 10px 0 5px;
	vertical-align: middle;
}
#buildOrders td span.unit-name {
	padding-top: 6px;
	line-height: 1; /* fix issue that chrome and firefox has 1 pixel difference */
}
#buildOrders td.time {
	text-align:center;
}

/* units */
.thumbnail-25-container span.unit,
.thumbnail-25-container span.building,
.thumbnail-25-container span.upgrade{
	background-image: url('../img/all-sprite.v0.gif');
	background-repeat: no-repeat;
	display:block;
	width:25px;
	height: 25px;
	float:left;
}

/* Protoss units */
.thumbnail-25-container .probe {background-position:-3px 0;}
.thumbnail-25-container .zealot {background-position:-33px 0;}
.thumbnail-25-container .stalker {background-position:-63px 0;}
.thumbnail-25-container .sentry {background-position:-93px 0;}
.thumbnail-25-container .observer {background-position:-123px 0;}
.thumbnail-25-container .immortal {background-position:-3px -33px;}
.thumbnail-25-container .warpprism {background-position:-33px -33px;}
.thumbnail-25-container .colossus {background-position:-63px -33px;}
.thumbnail-25-container .phoenix {background-position:-93px -33px;}
.thumbnail-25-container .voidray {background-position:-123px -33px;}
.thumbnail-25-container .hightemplar {background-position:-3px -66px;}
.thumbnail-25-container .darktemplar {background-position:-33px -66px;}
.thumbnail-25-container .archon {background-position:-63px -66px;}
.thumbnail-25-container .carrier {background-position:-93px -66px;}
.thumbnail-25-container .mothership {background-position:-123px -66px;}
.thumbnail-25-container .oracle {background-position:-3px -324px;}
.thumbnail-25-container .mothershipcore {background-position:-33px -324px;}
.thumbnail-25-container .tempest {background-position:-63px -324px;}

/* Terran units */
.thumbnail-25-container .scv {background-position:-3px -109px;}
.thumbnail-25-container .marine {background-position:-33px -109px;}
.thumbnail-25-container .marauder {background-position:-63px -109px;}
.thumbnail-25-container .reaper {background-position:-93px -109px;}
.thumbnail-25-container .ghost {background-position:-123px -109px;}
.thumbnail-25-container .hellion {background-position:-3px -142px;}
.thumbnail-25-container .siegetank {background-position:-33px -142px;}
.thumbnail-25-container .thor {background-position:-63px -142px;}
.thumbnail-25-container .viking {background-position:-93px -142px;}
.thumbnail-25-container .medivac {background-position:-123px -142px;}
.thumbnail-25-container .raven {background-position:-3px -175px;}
.thumbnail-25-container .banshee {background-position:-33px -175px;}
.thumbnail-25-container .battlecruiser {background-position:-63px -175px;}
.thumbnail-25-container .widowmine {background-position:-3px -357px;}
.thumbnail-25-container .hellbat {background-position:-33px -357px;}

/* Zerg units */
.thumbnail-25-container .larva {background-position:-3px -218px;}
.thumbnail-25-container .drone {background-position:-33px -218px;}
.thumbnail-25-container .overlord {background-position:-63px -218px;}
.thumbnail-25-container .zergling {background-position:-93px -218px;}
.thumbnail-25-container .queen {background-position:-123px -218px;}
.thumbnail-25-container .hydralisk {background-position:-3px -251px;}
.thumbnail-25-container .baneling {background-position:-33px -251px;}
.thumbnail-25-container .overseer {background-position:-63px -251px;}
.thumbnail-25-container .roach {background-position:-93px -251px;}
.thumbnail-25-container .infestor {background-position:-123px -251px;}
.thumbnail-25-container .mutalisk {background-position:-3px -284px;}
.thumbnail-25-container .corruptor {background-position:-33px -284px;}
.thumbnail-25-container .nydusworm {background-position:-63px -284px;}
.thumbnail-25-container .ultralisk {background-position:-93px -284px;}
.thumbnail-25-container .broodlord {background-position:-123px -284px;}
.thumbnail-25-container .viper {background-position:-3px -390px;}
.thumbnail-25-container .swarmhost {background-position:-33px -390px;}

/* Terran building */
.thumbnail-25-container .barracks {background-position:-300px -1px;}
.thumbnail-25-container .supplydepot {background-position:-330px -1px;}
.thumbnail-25-container .commandcenter {background-position:-360px -1px;}
.thumbnail-25-container .orbitalcommand {background-position:-390px -1px;}
.thumbnail-25-container .planetaryfortress {background-position:-420px -1px;}
.thumbnail-25-container .refinery {background-position:-300px -31px;}
.thumbnail-25-container .engineeringbay {background-position:-330px -31px;}
.thumbnail-25-container .missileturret {background-position:-360px -31px;}
.thumbnail-25-container .sensortower {background-position:-390px -31px;}
.thumbnail-25-container .bunker {background-position:-420px -31px;}
.thumbnail-25-container .ghostacademy {background-position:-300px -61px;}
.thumbnail-25-container .factory {background-position:-330px -61px;}
.thumbnail-25-container .starport {background-position:-360px -61px;}
.thumbnail-25-container .armory {background-position:-390px -61px;}
.thumbnail-25-container .fusioncore {background-position:-420px -61px;}
.thumbnail-25-container .techlab {background-position:-300px -91px;}
.thumbnail-25-container .reactor {background-position:-330px -91px;}

/* Protoss building */
.thumbnail-25-container .nexus {background-position:-300px -121px;}
.thumbnail-25-container .pylon {background-position:-330px -121px;}
.thumbnail-25-container .assimilator {background-position:-360px -121px;}
.thumbnail-25-container .forge {background-position:-390px -121px;}
.thumbnail-25-container .warpgate {background-position:-420px -121px;}
.thumbnail-25-container .gateway {background-position:-300px -151px;}
.thumbnail-25-container .cyberneticscore {background-position:-330px -151px;}
.thumbnail-25-container .futoncannon {background-position:-360px -151px;}
.thumbnail-25-container .twilightcouncil {background-position:-390px -151px;}
.thumbnail-25-container .roboticsfacility {background-position:-420px -151px;}
.thumbnail-25-container .stargate {background-position:-300px -181px;}
.thumbnail-25-container .fleetbeacon {background-position:-330px -181px;}
.thumbnail-25-container .roboticsbay {background-position:-360px -181px;}
.thumbnail-25-container .templararchive {background-position:-390px -181px;}
.thumbnail-25-container .darkshrine {background-position:-420px -181px;}

/* Zerg building */
.thumbnail-25-container .hachery {background-position:-300px -241px;}
.thumbnail-25-container .spawningpool {background-position:-330px -241px;}
.thumbnail-25-container .evolutionchamber {background-position:-360px -241px;}
.thumbnail-25-container .extractor {background-position:-390px -241px;}
.thumbnail-25-container .banelingnest {background-position:-420px -241px;}
.thumbnail-25-container .sporecrawler {background-position:-300px -271px;}
.thumbnail-25-container .spinecrawler {background-position:-330px -271px;}
.thumbnail-25-container .infestationpit {background-position:-360px -271px;}
.thumbnail-25-container .hydraliskden {background-position:-390px -271px;}
.thumbnail-25-container .spire {background-position:-420px -271px;}
.thumbnail-25-container .nydusnetwork {background-position:-300px -301px;}
.thumbnail-25-container .hive {background-position:-330px -301px;}
.thumbnail-25-container .ultraliskcavern {background-position:-360px -301px;}
.thumbnail-25-container .greaterspire {background-position:-390px -301px;}
.thumbnail-25-container .roachwarren {background-position:-420px -301px;}
.thumbnail-25-container .lair {background-position:-300px -331px;}

/* Terran upgrade */
.thumbnail-25-container .upgradeterraninfantryarmor1 {background-position:-600px -1px;}
.thumbnail-25-container .upgradeterraninfantryarmor2 {background-position:-630px -1px;}
.thumbnail-25-container .upgradeterraninfantryarmor3 {background-position:-660px -1px;}
.thumbnail-25-container .upgradeterraninfantryweapons1 {background-position:-690px -1px;}
.thumbnail-25-container .upgradeterraninfantryweapons2 {background-position:-720px -1px;}
.thumbnail-25-container .upgradeterraninfantryweapons3 {background-position:-750px -1px;}

.thumbnail-25-container .researchstimpack {background-position:-600px -31px;}
.thumbnail-25-container .researchcombatshield {background-position:-630px -31px;}
.thumbnail-25-container .researchconcussiveshells {background-position:-660px -31px;}
.thumbnail-25-container .researchpersonalcloaking {background-position:-690px -31px;}
.thumbnail-25-container .researchmoebiusreactor {background-position:-720px -31px;}
.thumbnail-25-container .researchinfernalpreigniter {background-position:-750px -31px;}

.thumbnail-25-container .upgradevehicleweapons1 {background-position:-600px -61px;}
.thumbnail-25-container .upgradevehicleweapons2 {background-position:-630px -61px;}
.thumbnail-25-container .upgradevehicleweapons3 {background-position:-660px -61px;}
.thumbnail-25-container .UpgradeVehiclePlating1 {background-position:-690px -61px;}
.thumbnail-25-container .UpgradeVehiclePlating2 {background-position:-720px -61px;}
.thumbnail-25-container .UpgradeVehiclePlating3 {background-position:-750px -61px;}

.thumbnail-25-container .upgradeshipweapons1 {background-position:-600px -91px;}
.thumbnail-25-container .upgradeshipweapons2 {background-position:-630px -91px;}
.thumbnail-25-container .upgradeshipweapons3 {background-position:-660px -91px;}
.thumbnail-25-container .upgradeshipplating1 {background-position:-690px -91px;}
.thumbnail-25-container .upgradeshipplating2 {background-position:-720px -91px;}
.thumbnail-25-container .upgradeshipplating3 {background-position:-750px -91px;}

.thumbnail-25-container .researchcaduceusreactor {background-position:-600px -121px;}
.thumbnail-25-container .researchcorvidreactor {background-position:-630px -121px;}
.thumbnail-25-container .researchdurablematerials {background-position:-660px -121px;}
.thumbnail-25-container .researchcloakingfield {background-position:-690px -121px;}
.thumbnail-25-container .researchweaponrefit {background-position:-720px -121px;}
.thumbnail-25-container .researchbehemothreactor {background-position:-750px -121px;}

/* Zerg upgrade */
.thumbnail-25-container .evolvegroundcarapace1 {background-position:-600px -181px;}
.thumbnail-25-container .evolvegroundcarapace2 {background-position:-630px -181px;}
.thumbnail-25-container .evolvegroundcarapace3 {background-position:-660px -181px;}
.thumbnail-25-container .evolvemeleeattacks1 {background-position:-690px -181px;}
.thumbnail-25-container .evolvemeleeattacks2 {background-position:-720px -181px;}
.thumbnail-25-container .evolvemeleeattacks3 {background-position:-750px -181px;}

.thumbnail-25-container .evolvemissileattacks1 {background-position:-600px -211px;}
.thumbnail-25-container .evolvemissileattacks2 {background-position:-630px -211px;}
.thumbnail-25-container .evolvemissileattacks3 {background-position:-660px -211px;}
.thumbnail-25-container .evolveburrow {background-position:-690px -211px;}
.thumbnail-25-container .evolveadrenalglands {background-position:-720px -211px;}
.thumbnail-25-container .evolvemetabolicboost {background-position:-750px -211px;}

.thumbnail-25-container .evolvegroovedspines {background-position:-600px -241px;}
.thumbnail-25-container .evolvemuscularaugments {background-position:-630px -241px;}
.thumbnail-25-container .evolvepneumatizedcarapace {background-position:-660px -241px;}
.thumbnail-25-container .evolveventralsacs {background-position:-690px -241px;}
.thumbnail-25-container .evolvecentrifugalhooks {background-position:-720px -241px;}
.thumbnail-25-container .evolveglialreconstitution {background-position:-750px -241px;}

.thumbnail-25-container .evolvetunnelingclaws {background-position:-600px -271px;}
.thumbnail-25-container .evolvepathogenglands {background-position:-630px -271px;}
.thumbnail-25-container .evolveneuralparasite {background-position:-660px -271px;}
.thumbnail-25-container .evolvechitinousplating {background-position:-690px -271px;}
.thumbnail-25-container .evolveenduringlocusts {background-position:-720px -271px;}

.thumbnail-25-container .evolveflyerattacks1 {background-position:-600px -301px;}
.thumbnail-25-container .evolveflyerattacks2 {background-position:-630px -301px;}
.thumbnail-25-container .evolveflyerattacks3 {background-position:-660px -301px;}
.thumbnail-25-container .evolveflyercarapace1 {background-position:-690px -301px;}
.thumbnail-25-container .evolveflyercarapace2 {background-position:-720px -301px;}
.thumbnail-25-container .evolveflyercarapace3 {background-position:-750px -301px;}

/* Protoss upgrades */
.thumbnail-25-container .upgradegroundweapons1 {background-position:-600px -331px;}
.thumbnail-25-container .upgradegroundweapons2 {background-position:-630px -331px;}
.thumbnail-25-container .upgradegroundweapons3 {background-position:-660px -331px;}
.thumbnail-25-container .upgradegroundarmor1 {background-position:-690px -331px;}
.thumbnail-25-container .upgradegroundarmor2 {background-position:-720px -331px;}
.thumbnail-25-container .upgradegroundarmor3 {background-position:-750px -331px;}

.thumbnail-25-container .upgradeairweapons1 {background-position:-600px -361px;}
.thumbnail-25-container .upgradeairweapons2 {background-position:-630px -361px;}
.thumbnail-25-container .upgradeairweapons3 {background-position:-660px -361px;}
.thumbnail-25-container .upgradeairarmor1 {background-position:-690px -361px;}
.thumbnail-25-container .upgradeairarmor2 {background-position:-720px -361px;}
.thumbnail-25-container .upgradeairarmor3 {background-position:-750px -361px;}

.thumbnail-25-container .upgradeshields1 {background-position:-600px -391px;}
.thumbnail-25-container .upgradeshields2 {background-position:-630px -391px;}
.thumbnail-25-container .upgradeshields3 {background-position:-660px -391px;}
.thumbnail-25-container .researchcharge {background-position:-690px -391px;}
.thumbnail-25-container .researchblink {background-position:-720px -391px;}
.thumbnail-25-container .researchgraviticboosters {background-position:-750px -391px;}


text:
package paysimple

import (
	"encoding/json"
	"testing"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

var customerExample = `{
    "MiddleName": null,
    "AltEmail": null,
    "AltPhone": null,
    "MobilePhone": null,
    "Fax": null,
    "Website": null,
    "BillingAddress": {
        "StreetAddress1": "123 Some St",
        "StreetAddress2": null,
        "City": "Denver",
        "StateCode": "CO",
        "ZipCode": "80202",
        "Country": null
    },
    "ShippingSameAsBilling": true,
    "ShippingAddress": {
        "StreetAddress1": "123 Some St",
        "StreetAddress2": null,
        "City": "Denver",
        "StateCode": "CO",
        "ZipCode": "80202",
        "Country": null
    },
    "Company": "ABC Company",
    "Notes": "This is a note about ABC Company.",
    "CustomerAccount": "TP-117",
    "FirstName": "Test",
    "LastName": "Person",
    "Email": "testperson@abcco.com",
    "Phone": "8005551212",
    "Id": 255939,
    "LastModified": "2013-10-01T19:16:38.5061103Z",
    "CreatedOn": "2013-10-01T19:16:38.5061103Z"
}`

// An actual customer response
var customerResponseExample = `{
  "Meta": {
    "Errors": null,
    "HttpStatus": "Created",
    "HttpStatusCode": 201,
    "PagingDetails": null
  },
  "Response": {
    "Website": null,
    "ShippingAddress": null,
    "Fax": null,
    "Id": 292152,
    "MobilePhone": null,
    "FirstName": "Test B.",
    "Phone": null,
    "MiddleName": null,
    "LastName": "Customer",
    "Company": null,
    "AltPhone": null,
    "CreatedOn": "2015-03-11T05:31:53.2209562Z",
    "Email": null,
    "ShippingSameAsBilling": false,
    "CustomerAccount": null,
    "BillingAddress": null,
    "LastModified": "2015-03-11T05:31:53.2209562Z",
    "AltEmail": null,
    "Notes": null
  }
}`

func TestCustomer(t *testing.T) {
	var customer Customer
	require.Nil(t, json.Unmarshal([]byte(customerExample), &customer))

	assert.Equal(t, 255939, customer.ID)
	assert.Equal(t, "Test", customer.FirstName)
	assert.Equal(t, "Person", customer.LastName)
	assert.Equal(t, "", customer.MiddleName)

	var response CustomerResponse
	require.Nil(t, json.Unmarshal([]byte(customerResponseExample), &response))
	customer = response.Response

	assert.Equal(t, 292152, customer.ID)
	assert.Equal(t, "Test B.", customer.FirstName)
	assert.Equal(t, "Customer", customer.LastName)
	assert.Equal(t, "", customer.MiddleName)

}

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AInBox.Astove.Core.Extensions
{
    public static class ExceptionExtensions
    {
        public static string GetExceptionMessage(this Exception ex)
        {
            return (ex.InnerException != null) ? ex.InnerException.Message : ex.Message;
        }

        public static string GetExceptionMessageWithStackTrace(this Exception ex)
        {
            var formatStr = "Message: {0} \n\n Stack Trace: {1}";
            return (ex.InnerException != null) ? string.Format(formatStr, ex.InnerException.Message, ex.InnerException.StackTrace) : string.Format(formatStr, ex.Message, ex.StackTrace);
        }
    }
}


text:
<?php

/**
 * This file is part of the Aggregator library.
 *
 * @author Łukasz Makuch <kontakt@lukaszmakuch.pl>
 * @license MIT http://opensource.org/licenses/MIT
 */

namespace lukaszmakuch\Aggregator;

use lukaszmakuch\Aggregator\LabelGenerator\Builder\BareLabelGeneratorBuilder;
use lukaszmakuch\Aggregator\LabelGenerator\Builder\DefaultLabelGeneratorBuilder;
use lukaszmakuch\Aggregator\LabelGenerator\Exception\UnableToGenerateLabel;
use lukaszmakuch\Aggregator\LabelGenerator\LabelingVisitorUser;
use lukaszmakuch\Aggregator\ScalarPresenter\Builder\DefaultScalarPresenterBuilder;
use lukaszmakuch\Aggregator\ScalarPresenter\Exception\UnableToPresentByVisitor;
use lukaszmakuch\Aggregator\ScalarPresenter\Impl\LabelingPresenter;
use lukaszmakuch\Aggregator\XmlPresenter\Builder\DefaultXmlPresenterBuilder;
use lukaszmakuch\Aggregator\XmlPresenter\Exception\UnableToCreateXml;
use lukaszmakuch\Aggregator\XmlPresenter\XmlPresenter;
use PHPUnit_Framework_TestCase;

class UnsupportedAggregator implements Aggregator
{
    public function accept(AggregatorVisitor $v)
    {
        return $v->visit($this);
    }

    public function aggregate($subject)
    {
    }

    public function __clone()
    {
    }
}

/**
 * Checks exceptions.
 *
 * @author Łukasz Makuch <kontakt@lukaszmakuch.pl>
 */
class ExceptionTest extends PHPUnit_Framework_TestCase
{
    /**
     * @var AggregatorVisitor
     */
    private $scalarPresenter;

    /**
     * @var XmlPresenter
     */
    private $xmlPresenter;

    protected function setUp()
    {
        $this->scalarPresenter = (new DefaultScalarPresenterBuilder())
            ->registerDependency(
                LabelingVisitorUser::class,
                (new DefaultLabelGeneratorBuilder())->build()
            )
            ->build();
        $this->xmlPresenter = (new DefaultXmlPresenterBuilder())->build();
    }

    public function testUnableToVisitForScalar()
    {
        $this->setExpectedExceptionRegExp(UnableToPresentByVisitor::class);
        $this->scalarPresenter->visit(new UnsupportedAggregator());
    }

    public function testUnableToAcceptForScalar()
    {
        $this->setExpectedExceptionRegExp(UnableToPresentByVisitor::class);
        (new UnsupportedAggregator())->accept($this->scalarPresenter);
    }

    public function testUnableToVisitForXml()
    {
        $this->setExpectedExceptionRegExp(UnableToCreateXml::class);
        $this->xmlPresenter->visit(new UnsupportedAggregator());
    }

    public function testUnableToAcceptForXml()
    {
        $this->setExpectedExceptionRegExp(UnableToCreateXml::class);
        (new UnsupportedAggregator())->accept($this->xmlPresenter);
    }

    public function testUnableToVisitForLabel()
    {
        $this->setExpectedExceptionRegExp(UnableToGenerateLabel::class);
        $this->buildLabelGenerator()->visit(new UnsupportedAggregator());
    }

    public function testUnableToAcceptForLabel()
    {
        $this->setExpectedExceptionRegExp(UnableToGenerateLabel::class);
        (new UnsupportedAggregator())->accept($this->buildLabelGenerator());
    }

    /**
     * @return LabelingPresenter
     */
    private function buildLabelGenerator()
    {
        return (new BareLabelGeneratorBuilder())->build();
    }
}


text:
import React from 'react';
import {Link} from "react-router-dom";
import _ from 'lodash';
import PropTypes from 'prop-types';
import RedditPostUpvotes from './assets/upvotes';
import RedditPostTitle from './assets/title';
import RedditPostComments from "./assets/comments";
import RedditPostCreated from "./assets/created";

const RedditPostsBodyItemMobile = ({post}) => {
  const {id, title, selftext} = post;

  return (
    <Link to={`/reddit/post/${id}/${_.kebabCase(title)}`}>

        <RedditPostTitle post={post}/>
        <RedditPostCreated post={post}/>

        {selftext}

        <RedditPostComments post={post}/>
        <RedditPostUpvotes post={post}/>

    </Link>
  )
};

RedditPostsBodyItemMobile.propTypes = {
  post: PropTypes.object
};

export default RedditPostsBodyItemMobile;


text:
var _              = require('lodash'),
    ActionAbstract = require('./action-abstract.js');

/**
 * delete field
 * @see  http://dev.smsapi.pl/#!/contacts%2Ffields/delete
 * @param {Object} options
 * @param {String} id
 */
function ContactsFieldsDelete(options, id){
    ActionAbstract.call(this, options);
    this._id = id || null;
}

ContactsFieldsDelete.prototype = Object.create(ActionAbstract.prototype);

/**
 * get/set id
 * @param  {String} [id]
 * @return {ContactsFieldsDelete} or {String}
 */
ContactsFieldsDelete.prototype.id = function(id){
    if (_.isUndefined(id))
        return this._id;

    this._id = id;
    return this;
};

/**
 * execute
 * @return {Promise}
 */
ContactsFieldsDelete.prototype.execute = function(){
    return this.request()
        .delete('contacts/fields/' + String(this._id))
        .data(this.params())
        .execute();
};

module.exports = ContactsFieldsDelete;


text:
<!DOCTYPE html>

	<meta charset="UTF-8">
	<title>  setData() followed by clearData() in same event handler  - cut event on document</title>

FAILED (This TC requires JavaScript enabled)

	<form><input autofocus id="input_text"></form>


text:
#include "arm_math.h"

/**
 * @ingroup groupFilters
 */

/**
 * @defgroup Corr Correlation
 *
 * Correlation is a mathematical operation that is similar to convolution.
 * As with convolution, correlation uses two signals to produce a third signal.
 * The underlying algorithms in correlation and convolution are identical except that one of the inputs is flipped in convolution.
 * Correlation is commonly used to measure the similarity between two signals.
 * It has applications in pattern recognition, cryptanalysis, and searching.
 * The CMSIS library provides correlation functions for Q7, Q15, Q31 and floating-point data types.
 * Fast versions of the Q15 and Q31 functions are also provided.
 *
 * \par Algorithm
 * Let a[n] and b[n] be sequences of length srcALen and srcBLen samples respectively.
 * The convolution of the two signals is denoted by
 *

 *                   c[n] = a[n] * b[n]
 *

 * In correlation, one of the signals is flipped in time
 *

 *                   c[n] = a[n] * b[-n]
 *

 *
 * \par
 * and this is mathematically defined as
 * \image html CorrelateEquation.gif
 * \par
 * The pSrcA points to the first input vector of length srcALen and pSrcB points to the second input vector of length srcBLen.
 * The result c[n] is of length 2 * max(srcALen, srcBLen) - 1 and is defined over the interval n=0, 1, 2, ..., (2 * max(srcALen, srcBLen) - 2).
 * The output result is written to pDst and the calling function must allocate 2 * max(srcALen, srcBLen) - 1 words for the result.
 *
 * Note
 * \par
 * The pDst should be initialized to all zeros before being used.
 *
 * Fixed-Point Behavior
 * \par
 * Correlation requires summing up a large number of intermediate products.
 * As such, the Q7, Q15, and Q31 functions run a risk of overflow and saturation.
 * Refer to the function specific documentation below for further details of the particular algorithm used.
 *
 *
 * Fast Versions
 *
 * \par
 * Fast versions are supported for Q31 and Q15.  Cycles for Fast versions are less compared to Q31 and Q15 of correlate and the design requires
 * the input signals should be scaled down to avoid intermediate overflows.
 *
 *
 * Opt Versions
 *
 * \par
 * Opt versions are supported for Q15 and Q7.  Design uses internal scratch buffer for getting good optimisation.
 * These versions are optimised in cycles and consumes more memory(Scratch memory) compared to Q15 and Q7 versions of correlate
 */

/**
 * @addtogroup Corr
 * @{
 */
/**
 * @brief Correlation of floating-point sequences.
 * @param[in]  *pSrcA points to the first input sequence.
 * @param[in]  srcALen length of the first input sequence.
 * @param[in]  *pSrcB points to the second input sequence.
 * @param[in]  srcBLen length of the second input sequence.
 * @param[out] *pDst points to the location where the output result is written.  Length 2 * max(srcALen, srcBLen) - 1.
 * @return none.
 */

void arm_correlate_f32(
  float32_t * pSrcA,
  uint32_t srcALen,
  float32_t * pSrcB,
  uint32_t srcBLen,
  float32_t * pDst)
{

#ifndef ARM_MATH_CM0

  /* Run the below code for Cortex-M4 and Cortex-M3 */

  float32_t *pIn1;                               /* inputA pointer */
  float32_t *pIn2;                               /* inputB pointer */
  float32_t *pOut = pDst;                        /* output pointer */
  float32_t *px;                                 /* Intermediate inputA pointer */
  float32_t *py;                                 /* Intermediate inputB pointer */
  float32_t *pSrc1;                              /* Intermediate pointers */
  float32_t sum, acc0, acc1, acc2, acc3;         /* Accumulators */
  float32_t x0, x1, x2, x3, c0;                  /* temporary variables for holding input and coefficient values */
  uint32_t j, k = 0u, count, blkCnt, outBlockSize, blockSize1, blockSize2, blockSize3;  /* loop counters */
  int32_t inc = 1;                               /* Destination address modifier */

  /* The algorithm implementation is based on the lengths of the inputs. */
  /* srcB is always made to slide across srcA. */
  /* So srcBLen is always considered as shorter or equal to srcALen */
  /* But CORR(x, y) is reverse of CORR(y, x) */
  /* So, when srcBLen > srcALen, output pointer is made to point to the end of the output buffer */
  /* and the destination pointer modifier, inc is set to -1 */
  /* If srcALen > srcBLen, zero pad has to be done to srcB to make the two inputs of same length */
  /* But to improve the performance,
   * we include zeroes in the output instead of zero padding either of the the inputs*/
  /* If srcALen > srcBLen,
   * (srcALen - srcBLen) zeroes has to included in the starting of the output buffer */
  /* If srcALen < srcBLen,
   * (srcALen - srcBLen) zeroes has to included in the ending of the output buffer */
  if(srcALen >= srcBLen)
  {
    /* Initialization of inputA pointer */
    pIn1 = pSrcA;

    /* Initialization of inputB pointer */
    pIn2 = pSrcB;

    /* Number of output samples is calculated */
    outBlockSize = (2u * srcALen) - 1u;

    /* When srcALen > srcBLen, zero padding has to be done to srcB
     * to make their lengths equal.
     * Instead, (outBlockSize - (srcALen + srcBLen - 1))
     * number of output samples are made zero */
    j = outBlockSize - (srcALen + (srcBLen - 1u));

    /* Updating the pointer position to non zero value */
    pOut += j;

    //while(j > 0u)
    //{
    //  /* Zero is stored in the destination buffer */
    //  *pOut++ = 0.0f;

    //  /* Decrement the loop counter */
    //  j--;
    //}

  }
  else
  {
    /* Initialization of inputA pointer */
    pIn1 = pSrcB;

    /* Initialization of inputB pointer */
    pIn2 = pSrcA;

    /* srcBLen is always considered as shorter or equal to srcALen */
    j = srcBLen;
    srcBLen = srcALen;
    srcALen = j;

    /* CORR(x, y) = Reverse order(CORR(y, x)) */
    /* Hence set the destination pointer to point to the last output sample */
    pOut = pDst + ((srcALen + srcBLen) - 2u);

    /* Destination address modifier is set to -1 */
    inc = -1;

  }

  /* The function is internally
   * divided into three parts according to the number of multiplications that has to be
   * taken place between inputA samples and inputB samples. In the first part of the
   * algorithm, the multiplications increase by one for every iteration.
   * In the second part of the algorithm, srcBLen number of multiplications are done.
   * In the third part of the algorithm, the multiplications decrease by one
   * for every iteration.*/
  /* The algorithm is implemented in three stages.
   * The loop counters of each stage is initiated here. */
  blockSize1 = srcBLen - 1u;
  blockSize2 = srcALen - (srcBLen - 1u);
  blockSize3 = blockSize1;

  /* --------------------------
   * Initializations of stage1
   * -------------------------*/

  /* sum = x[0] * y[srcBlen - 1]
   * sum = x[0] * y[srcBlen-2] + x[1] * y[srcBlen - 1]
   * ....
   * sum = x[0] * y[0] + x[1] * y[1] +...+ x[srcBLen - 1] * y[srcBLen - 1]
   */

  /* In this stage the MAC operations are increased by 1 for every iteration.
     The count variable holds the number of MAC operations performed */
  count = 1u;

  /* Working pointer of inputA */
  px = pIn1;

  /* Working pointer of inputB */
  pSrc1 = pIn2 + (srcBLen - 1u);
  py = pSrc1;

  /* ------------------------
   * Stage1 process
   * ----------------------*/

  /* The first stage starts here */
  while(blockSize1 > 0u)
  {
    /* Accumulator is made zero for every iteration */
    sum = 0.0f;

    /* Apply loop unrolling and compute 4 MACs simultaneously. */
    k = count >> 2u;

    /* First part of the processing with loop unrolling.  Compute 4 MACs at a time.
     ** a second loop below computes MACs for the remaining 1 to 3 samples. */
    while(k > 0u)
    {
      /* x[0] * y[srcBLen - 4] */
      sum += *px++ * *py++;
      /* x[1] * y[srcBLen - 3] */
      sum += *px++ * *py++;
      /* x[2] * y[srcBLen - 2] */
      sum += *px++ * *py++;
      /* x[3] * y[srcBLen - 1] */
      sum += *px++ * *py++;

      /* Decrement the loop counter */
      k--;
    }

    /* If the count is not a multiple of 4, compute any remaining MACs here.
     ** No loop unrolling is used. */
    k = count % 0x4u;

    while(k > 0u)
    {
      /* Perform the multiply-accumulate */
      /* x[0] * y[srcBLen - 1] */
      sum += *px++ * *py++;

      /* Decrement the loop counter */
      k--;
    }

    /* Store the result in the accumulator in the destination buffer. */
    *pOut = sum;
    /* Destination pointer is updated according to the address modifier, inc */
    pOut += inc;

    /* Update the inputA and inputB pointers for next MAC calculation */
    py = pSrc1 - count;
    px = pIn1;

    /* Increment the MAC count */
    count++;

    /* Decrement the loop counter */
    blockSize1--;
  }

  /* --------------------------
   * Initializations of stage2
   * ------------------------*/

  /* sum = x[0] * y[0] + x[1] * y[1] +...+ x[srcBLen-1] * y[srcBLen-1]
   * sum = x[1] * y[0] + x[2] * y[1] +...+ x[srcBLen] * y[srcBLen-1]
   * ....
   * sum = x[srcALen-srcBLen-2] * y[0] + x[srcALen-srcBLen-1] * y[1] +...+ x[srcALen-1] * y[srcBLen-1]
   */

  /* Working pointer of inputA */
  px = pIn1;

  /* Working pointer of inputB */
  py = pIn2;

  /* count is index by which the pointer pIn1 to be incremented */
  count = 0u;

  /* -------------------
   * Stage2 process
   * ------------------*/

  /* Stage2 depends on srcBLen as in this stage srcBLen number of MACS are performed.
   * So, to loop unroll over blockSize2,
   * srcBLen should be greater than or equal to 4, to loop unroll the srcBLen loop */
  if(srcBLen >= 4u)
  {
    /* Loop unroll over blockSize2, by 4 */
    blkCnt = blockSize2 >> 2u;

    while(blkCnt > 0u)
    {
      /* Set all accumulators to zero */
      acc0 = 0.0f;
      acc1 = 0.0f;
      acc2 = 0.0f;
      acc3 = 0.0f;

      /* read x[0], x[1], x[2] samples */
      x0 = *(px++);
      x1 = *(px++);
      x2 = *(px++);

      /* Apply loop unrolling and compute 4 MACs simultaneously. */
      k = srcBLen >> 2u;

      /* First part of the processing with loop unrolling.  Compute 4 MACs at a time.
       ** a second loop below computes MACs for the remaining 1 to 3 samples. */
      do
      {
        /* Read y[0] sample */
        c0 = *(py++);

        /* Read x[3] sample */
        x3 = *(px++);

        /* Perform the multiply-accumulate */
        /* acc0 +=  x[0] * y[0] */
        acc0 += x0 * c0;
        /* acc1 +=  x[1] * y[0] */
        acc1 += x1 * c0;
        /* acc2 +=  x[2] * y[0] */
        acc2 += x2 * c0;
        /* acc3 +=  x[3] * y[0] */
        acc3 += x3 * c0;

        /* Read y[1] sample */
        c0 = *(py++);

        /* Read x[4] sample */
        x0 = *(px++);

        /* Perform the multiply-accumulate */
        /* acc0 +=  x[1] * y[1] */
        acc0 += x1 * c0;
        /* acc1 +=  x[2] * y[1] */
        acc1 += x2 * c0;
        /* acc2 +=  x[3] * y[1] */
        acc2 += x3 * c0;
        /* acc3 +=  x[4] * y[1] */
        acc3 += x0 * c0;

        /* Read y[2] sample */
        c0 = *(py++);

        /* Read x[5] sample */
        x1 = *(px++);

        /* Perform the multiply-accumulates */
        /* acc0 +=  x[2] * y[2] */
        acc0 += x2 * c0;
        /* acc1 +=  x[3] * y[2] */
        acc1 += x3 * c0;
        /* acc2 +=  x[4] * y[2] */
        acc2 += x0 * c0;
        /* acc3 +=  x[5] * y[2] */
        acc3 += x1 * c0;

        /* Read y[3] sample */
        c0 = *(py++);

        /* Read x[6] sample */
        x2 = *(px++);

        /* Perform the multiply-accumulates */
        /* acc0 +=  x[3] * y[3] */
        acc0 += x3 * c0;
        /* acc1 +=  x[4] * y[3] */
        acc1 += x0 * c0;
        /* acc2 +=  x[5] * y[3] */
        acc2 += x1 * c0;
        /* acc3 +=  x[6] * y[3] */
        acc3 += x2 * c0;

      } while(--k);

      /* If the srcBLen is not a multiple of 4, compute any remaining MACs here.
       ** No loop unrolling is used. */
      k = srcBLen % 0x4u;

      while(k > 0u)
      {
        /* Read y[4] sample */
        c0 = *(py++);

        /* Read x[7] sample */
        x3 = *(px++);

        /* Perform the multiply-accumulates */
        /* acc0 +=  x[4] * y[4] */
        acc0 += x0 * c0;
        /* acc1 +=  x[5] * y[4] */
        acc1 += x1 * c0;
        /* acc2 +=  x[6] * y[4] */
        acc2 += x2 * c0;
        /* acc3 +=  x[7] * y[4] */
        acc3 += x3 * c0;

        /* Reuse the present samples for the next MAC */
        x0 = x1;
        x1 = x2;
        x2 = x3;

        /* Decrement the loop counter */
        k--;
      }

      /* Store the result in the accumulator in the destination buffer. */
      *pOut = acc0;
      /* Destination pointer is updated according to the address modifier, inc */
      pOut += inc;

      *pOut = acc1;
      pOut += inc;

      *pOut = acc2;
      pOut += inc;

      *pOut = acc3;
      pOut += inc;

      /* Increment the pointer pIn1 index, count by 4 */
      count += 4u;

      /* Update the inputA and inputB pointers for next MAC calculation */
      px = pIn1 + count;
      py = pIn2;

      /* Decrement the loop counter */
      blkCnt--;
    }

    /* If the blockSize2 is not a multiple of 4, compute any remaining output samples here.
     ** No loop unrolling is used. */
    blkCnt = blockSize2 % 0x4u;

    while(blkCnt > 0u)
    {
      /* Accumulator is made zero for every iteration */
      sum = 0.0f;

      /* Apply loop unrolling and compute 4 MACs simultaneously. */
      k = srcBLen >> 2u;

      /* First part of the processing with loop unrolling.  Compute 4 MACs at a time.
       ** a second loop below computes MACs for the remaining 1 to 3 samples. */
      while(k > 0u)
      {
        /* Perform the multiply-accumulates */
        sum += *px++ * *py++;
        sum += *px++ * *py++;
        sum += *px++ * *py++;
        sum += *px++ * *py++;

        /* Decrement the loop counter */
        k--;
      }

      /* If the srcBLen is not a multiple of 4, compute any remaining MACs here.
       ** No loop unrolling is used. */
      k = srcBLen % 0x4u;

      while(k > 0u)
      {
        /* Perform the multiply-accumulate */
        sum += *px++ * *py++;

        /* Decrement the loop counter */
        k--;
      }

      /* Store the result in the accumulator in the destination buffer. */
      *pOut = sum;
      /* Destination pointer is updated according to the address modifier, inc */
      pOut += inc;

      /* Increment the pointer pIn1 index, count by 1 */
      count++;

      /* Update the inputA and inputB pointers for next MAC calculation */
      px = pIn1 + count;
      py = pIn2;

      /* Decrement the loop counter */
      blkCnt--;
    }
  }
  else
  {
    /* If the srcBLen is not a multiple of 4,
     * the blockSize2 loop cannot be unrolled by 4 */
    blkCnt = blockSize2;

    while(blkCnt > 0u)
    {
      /* Accumulator is made zero for every iteration */
      sum = 0.0f;

      /* Loop over srcBLen */
      k = srcBLen;

      while(k > 0u)
      {
        /* Perform the multiply-accumulate */
        sum += *px++ * *py++;

        /* Decrement the loop counter */
        k--;
      }

      /* Store the result in the accumulator in the destination buffer. */
      *pOut = sum;
      /* Destination pointer is updated according to the address modifier, inc */
      pOut += inc;

      /* Increment the pointer pIn1 index, count by 1 */
      count++;

      /* Update the inputA and inputB pointers for next MAC calculation */
      px = pIn1 + count;
      py = pIn2;

      /* Decrement the loop counter */
      blkCnt--;
    }
  }

  /* --------------------------
   * Initializations of stage3
   * -------------------------*/

  /* sum += x[srcALen-srcBLen+1] * y[0] + x[srcALen-srcBLen+2] * y[1] +...+ x[srcALen-1] * y[srcBLen-1]
   * sum += x[srcALen-srcBLen+2] * y[0] + x[srcALen-srcBLen+3] * y[1] +...+ x[srcALen-1] * y[srcBLen-1]
   * ....
   * sum +=  x[srcALen-2] * y[0] + x[srcALen-1] * y[1]
   * sum +=  x[srcALen-1] * y[0]
   */

  /* In this stage the MAC operations are decreased by 1 for every iteration.
     The count variable holds the number of MAC operations performed */
  count = srcBLen - 1u;

  /* Working pointer of inputA */
  pSrc1 = pIn1 + (srcALen - (srcBLen - 1u));
  px = pSrc1;

  /* Working pointer of inputB */
  py = pIn2;

  /* -------------------
   * Stage3 process
   * ------------------*/

  while(blockSize3 > 0u)
  {
    /* Accumulator is made zero for every iteration */
    sum = 0.0f;

    /* Apply loop unrolling and compute 4 MACs simultaneously. */
    k = count >> 2u;

    /* First part of the processing with loop unrolling.  Compute 4 MACs at a time.
     ** a second loop below computes MACs for the remaining 1 to 3 samples. */
    while(k > 0u)
    {
      /* Perform the multiply-accumulates */
      /* sum += x[srcALen - srcBLen + 4] * y[3] */
      sum += *px++ * *py++;
      /* sum += x[srcALen - srcBLen + 3] * y[2] */
      sum += *px++ * *py++;
      /* sum += x[srcALen - srcBLen + 2] * y[1] */
      sum += *px++ * *py++;
      /* sum += x[srcALen - srcBLen + 1] * y[0] */
      sum += *px++ * *py++;

      /* Decrement the loop counter */
      k--;
    }

    /* If the count is not a multiple of 4, compute any remaining MACs here.
     ** No loop unrolling is used. */
    k = count % 0x4u;

    while(k > 0u)
    {
      /* Perform the multiply-accumulates */
      sum += *px++ * *py++;

      /* Decrement the loop counter */
      k--;
    }

    /* Store the result in the accumulator in the destination buffer. */
    *pOut = sum;
    /* Destination pointer is updated according to the address modifier, inc */
    pOut += inc;

    /* Update the inputA and inputB pointers for next MAC calculation */
    px = ++pSrc1;
    py = pIn2;

    /* Decrement the MAC count */
    count--;

    /* Decrement the loop counter */
    blockSize3--;
  }

#else

  /* Run the below code for Cortex-M0 */

  float32_t *pIn1 = pSrcA;                       /* inputA pointer */
  float32_t *pIn2 = pSrcB + (srcBLen - 1u);      /* inputB pointer */
  float32_t sum;                                 /* Accumulator */
  uint32_t i = 0u, j;                            /* loop counters */
  uint32_t inv = 0u;                             /* Reverse order flag */
  uint32_t tot = 0u;                             /* Length */

  /* The algorithm implementation is based on the lengths of the inputs. */
  /* srcB is always made to slide across srcA. */
  /* So srcBLen is always considered as shorter or equal to srcALen */
  /* But CORR(x, y) is reverse of CORR(y, x) */
  /* So, when srcBLen > srcALen, output pointer is made to point to the end of the output buffer */
  /* and a varaible, inv is set to 1 */
  /* If lengths are not equal then zero pad has to be done to  make the two
   * inputs of same length. But to improve the performance, we include zeroes
   * in the output instead of zero padding either of the the inputs*/
  /* If srcALen > srcBLen, (srcALen - srcBLen) zeroes has to included in the
   * starting of the output buffer */
  /* If srcALen < srcBLen, (srcALen - srcBLen) zeroes has to included in the
   * ending of the output buffer */
  /* Once the zero padding is done the remaining of the output is calcualted
   * using convolution but with the shorter signal time shifted. */

  /* Calculate the length of the remaining sequence */
  tot = ((srcALen + srcBLen) - 2u);

  if(srcALen > srcBLen)
  {
    /* Calculating the number of zeros to be padded to the output */
    j = srcALen - srcBLen;

    /* Initialise the pointer after zero padding */
    pDst += j;
  }

  else if(srcALen < srcBLen)
  {
    /* Initialization to inputB pointer */
    pIn1 = pSrcB;

    /* Initialization to the end of inputA pointer */
    pIn2 = pSrcA + (srcALen - 1u);

    /* Initialisation of the pointer after zero padding */
    pDst = pDst + tot;

    /* Swapping the lengths */
    j = srcALen;
    srcALen = srcBLen;
    srcBLen = j;

    /* Setting the reverse flag */
    inv = 1;

  }

  /* Loop to calculate convolution for output length number of times */
  for (i = 0u; i <= tot; i++)
  {
    /* Initialize sum with zero to carry on MAC operations */
    sum = 0.0f;

    /* Loop to perform MAC operations according to convolution equation */
    for (j = 0u; j <= i; j++)
    {
      /* Check the array limitations */
      if((((i - j) < srcBLen) && (j < srcALen)))
      {
        /* z[i] += x[i-j] * y[j] */
        sum += pIn1[j] * pIn2[-((int32_t) i - j)];
      }
    }
    /* Store the output in the destination buffer */
    if(inv == 1)
      *pDst-- = sum;
    else
      *pDst++ = sum;
  }

#endif /*   #ifndef ARM_MATH_CM0 */

}

/**
 * @} end of Corr group
 */


text:
1. This exercise calls for you to write some async flow-control code. To start off with, you'll use callbacks only.

2. Expected behavior:
	- Request all 3 files at the same time (in "parallel").
	- Store output ASAP (don't just blindly wait for all to finish loading)
	- BUT, Store outputs in proper (obvious) order: "file1", "file2", "file3".
	- After all 3 are done, output "Complete!".


text:
package voxngine.graphics;

import java.nio.FloatBuffer;
import java.nio.IntBuffer;

import static org.lwjgl.opengl.GL15.*;

/**
 * This class represents a Vertex Buffer Object (VBO).
 *
 * @author Heiko Brumme
 */
public class Rbo implements RenderObject {

    /**
     * Stores the handle of the RBO.
     */
    private final int id;

    private final int target;

    /**
     * Stores the number of vertices or indices in the RBO.
     */
	private int count;

    /**
     * Creates a Vertex Buffer Object (RBO).
     */
    public Rbo(int target) {
        id = glGenBuffers();
        this.target = target;
    }

    /**
     * Binds this RBO with specified target. The target in the tutorial should
     * be GL_ARRAY_BUFFER most of the time.
     *
     * @param target Target to bind
     */
    public void bind() {
        glBindBuffer(target, id);
    }

    public void unbind() {
    	glBindBuffer(target, 0);
    }

    /**
     * Upload vertex data to this VBO with specified target, data and usage. The
     * target in the tutorial should be GL_ARRAY_BUFFER and usage
     * should be GL_STATIC_DRAW most of the time.
     *
     * @param target Target to upload
     * @param data Buffer with the data to upload
     * @param usage Usage of the data
     */
    public void uploadData(FloatBuffer data, int usage) {
        glBufferData(target, data, usage);
    }

    /**
     * Upload null data to this RBO with specified target, size and usage. The
     * target in the tutorial should be GL_ARRAY_BUFFER and usage
     * should be GL_STATIC_DRAW most of the time.
     *
     * @param target Target to upload
     * @param size Size in bytes of the RBO data store
     * @param usage Usage of the data
     */
    public void uploadData(long size, int usage) {
        glBufferData(target, size, usage);
    }

    /**
     * Upload sub data to this RBO with specified target, offset and data. The
     * target in the tutorial should be GL_ARRAY_BUFFER most of the
     * time.
     *
     * @param target Target to upload
     * @param offset Offset where the data should go in bytes
     * @param data Buffer with the data to upload
     */
    public void uploadSubData(long offset, FloatBuffer data) {
        glBufferSubData(target, offset, data);
    }

    /**
     * Upload element data to this RBO with specified target, data and usage.
     * The target in the tutorial should be GL_ELEMENT_ARRAY_BUFFER
     * and usage should be GL_STATIC_DRAW most of the time.
     *
     * @param target Target to upload
     * @param data Buffer with the data to upload
     * @param usage Usage of the data
     */
    public void uploadData(IntBuffer data, int usage) {
        glBufferData(target, data, usage);
    }

    /**
     * Deletes this VBO.
     */
    public void delete() {
        glDeleteBuffers(id);
    }

    /**
     * Getter for the Vertex Buffer Object ID.
     *
     * @return Handle of the RBO
     */
    public int getID() {
        return id;
    }

    public int getCount() {
    	return count;
    }

    public void setCount(int count) {
    	this.count = count;
    }
}


text:
package record

import (
	"encoding/json"
	"fmt"
	"strings"
	"sync"
	"time"

	"github.com/golang/groupcache/lru"

	"k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/util/clock"
	"k8s.io/apimachinery/pkg/util/sets"
	"k8s.io/apimachinery/pkg/util/strategicpatch"
	"k8s.io/client-go/util/flowcontrol"
)

const (
	maxLruCacheEntries = 4096

	// if we see the same event that varies only by message
	// more than 10 times in a 10 minute period, aggregate the event
	defaultAggregateMaxEvents         = 10
	defaultAggregateIntervalInSeconds = 600

	// by default, allow a source to send 25 events about an object
	// but control the refill rate to 1 new event every 5 minutes
	// this helps control the long-tail of events for things that are always
	// unhealthy
	defaultSpamBurst = 25
	defaultSpamQPS   = 1. / 300.
)

// getEventKey builds unique event key based on source, involvedObject, reason, message
func getEventKey(event *v1.Event) string {
	return strings.Join([]string{
		event.Source.Component,
		event.Source.Host,
		event.InvolvedObject.Kind,
		event.InvolvedObject.Namespace,
		event.InvolvedObject.Name,
		event.InvolvedObject.FieldPath,
		string(event.InvolvedObject.UID),
		event.InvolvedObject.APIVersion,
		event.Type,
		event.Reason,
		event.Message,
	},
		"")
}

// getSpamKey builds unique event key based on source, involvedObject
func getSpamKey(event *v1.Event) string {
	return strings.Join([]string{
		event.Source.Component,
		event.Source.Host,
		event.InvolvedObject.Kind,
		event.InvolvedObject.Namespace,
		event.InvolvedObject.Name,
		string(event.InvolvedObject.UID),
		event.InvolvedObject.APIVersion,
	},
		"")
}

// EventFilterFunc is a function that returns true if the event should be skipped
type EventFilterFunc func(event *v1.Event) bool

// EventSourceObjectSpamFilter is responsible for throttling
// the amount of events a source and object can produce.
type EventSourceObjectSpamFilter struct {
	sync.RWMutex

	// the cache that manages last synced state
	cache *lru.Cache

	// burst is the amount of events we allow per source + object
	burst int

	// qps is the refill rate of the token bucket in queries per second
	qps float32

	// clock is used to allow for testing over a time interval
	clock clock.Clock
}

// NewEventSourceObjectSpamFilter allows burst events from a source about an object with the specified qps refill.
func NewEventSourceObjectSpamFilter(lruCacheSize, burst int, qps float32, clock clock.Clock) *EventSourceObjectSpamFilter {
	return &EventSourceObjectSpamFilter{
		cache: lru.New(lruCacheSize),
		burst: burst,
		qps:   qps,
		clock: clock,
	}
}

// spamRecord holds data used to perform spam filtering decisions.
type spamRecord struct {
	// rateLimiter controls the rate of events about this object
	rateLimiter flowcontrol.RateLimiter
}

// Filter controls that a given source+object are not exceeding the allowed rate.
func (f *EventSourceObjectSpamFilter) Filter(event *v1.Event) bool {
	var record spamRecord

	// controls our cached information about this event (source+object)
	eventKey := getSpamKey(event)

	// do we have a record of similar events in our cache?
	f.Lock()
	defer f.Unlock()
	value, found := f.cache.Get(eventKey)
	if found {
		record = value.(spamRecord)
	}

	// verify we have a rate limiter for this record
	if record.rateLimiter == nil {
		record.rateLimiter = flowcontrol.NewTokenBucketRateLimiterWithClock(f.qps, f.burst, f.clock)
	}

	// ensure we have available rate
	filter := !record.rateLimiter.TryAccept()

	// update the cache
	f.cache.Add(eventKey, record)

	return filter
}

// EventAggregatorKeyFunc is responsible for grouping events for aggregation
// It returns a tuple of the following:
// aggregateKey - key the identifies the aggregate group to bucket this event
// localKey - key that makes this event in the local group
type EventAggregatorKeyFunc func(event *v1.Event) (aggregateKey string, localKey string)

// EventAggregatorByReasonFunc aggregates events by exact match on event.Source, event.InvolvedObject, event.Type,
// event.Reason, event.ReportingController and event.ReportingInstance
func EventAggregatorByReasonFunc(event *v1.Event) (string, string) {
	return strings.Join([]string{
		event.Source.Component,
		event.Source.Host,
		event.InvolvedObject.Kind,
		event.InvolvedObject.Namespace,
		event.InvolvedObject.Name,
		string(event.InvolvedObject.UID),
		event.InvolvedObject.APIVersion,
		event.Type,
		event.Reason,
		event.ReportingController,
		event.ReportingInstance,
	},
		""), event.Message
}

// EventAggregatorMessageFunc is responsible for producing an aggregation message
type EventAggregatorMessageFunc func(event *v1.Event) string

// EventAggregratorByReasonMessageFunc returns an aggregate message by prefixing the incoming message
func EventAggregatorByReasonMessageFunc(event *v1.Event) string {
	return "(combined from similar events): " + event.Message
}

// EventAggregator identifies similar events and aggregates them into a single event
type EventAggregator struct {
	sync.RWMutex

	// The cache that manages aggregation state
	cache *lru.Cache

	// The function that groups events for aggregation
	keyFunc EventAggregatorKeyFunc

	// The function that generates a message for an aggregate event
	messageFunc EventAggregatorMessageFunc

	// The maximum number of events in the specified interval before aggregation occurs
	maxEvents uint

	// The amount of time in seconds that must transpire since the last occurrence of a similar event before it's considered new
	maxIntervalInSeconds uint

	// clock is used to allow for testing over a time interval
	clock clock.Clock
}

// NewEventAggregator returns a new instance of an EventAggregator
func NewEventAggregator(lruCacheSize int, keyFunc EventAggregatorKeyFunc, messageFunc EventAggregatorMessageFunc,
	maxEvents int, maxIntervalInSeconds int, clock clock.Clock) *EventAggregator {
	return &EventAggregator{
		cache:                lru.New(lruCacheSize),
		keyFunc:              keyFunc,
		messageFunc:          messageFunc,
		maxEvents:            uint(maxEvents),
		maxIntervalInSeconds: uint(maxIntervalInSeconds),
		clock:                clock,
	}
}

// aggregateRecord holds data used to perform aggregation decisions
type aggregateRecord struct {
	// we track the number of unique local keys we have seen in the aggregate set to know when to actually aggregate
	// if the size of this set exceeds the max, we know we need to aggregate
	localKeys sets.String
	// The last time at which the aggregate was recorded
	lastTimestamp metav1.Time
}

// EventAggregate checks if a similar event has been seen according to the
// aggregation configuration (max events, max interval, etc) and returns:
//
// - The (potentially modified) event that should be created
// - The cache key for the event, for correlation purposes. This will be set to
//   the full key for normal events, and to the result of
//   EventAggregatorMessageFunc for aggregate events.
func (e *EventAggregator) EventAggregate(newEvent *v1.Event) (*v1.Event, string) {
	now := metav1.NewTime(e.clock.Now())
	var record aggregateRecord
	// eventKey is the full cache key for this event
	eventKey := getEventKey(newEvent)
	// aggregateKey is for the aggregate event, if one is needed.
	aggregateKey, localKey := e.keyFunc(newEvent)

	// Do we have a record of similar events in our cache?
	e.Lock()
	defer e.Unlock()
	value, found := e.cache.Get(aggregateKey)
	if found {
		record = value.(aggregateRecord)
	}

	// Is the previous record too old? If so, make a fresh one. Note: if we didn't
	// find a similar record, its lastTimestamp will be the zero value, so we
	// create a new one in that case.
	maxInterval := time.Duration(e.maxIntervalInSeconds) * time.Second
	interval := now.Time.Sub(record.lastTimestamp.Time)
	if interval > maxInterval {
		record = aggregateRecord{localKeys: sets.NewString()}
	}

	// Write the new event into the aggregation record and put it on the cache
	record.localKeys.Insert(localKey)
	record.lastTimestamp = now
	e.cache.Add(aggregateKey, record)

	// If we are not yet over the threshold for unique events, don't correlate them
	if uint(record.localKeys.Len()) < e.maxEvents {
		return newEvent, eventKey
	}

	// do not grow our local key set any larger than max
	record.localKeys.PopAny()

	// create a new aggregate event, and return the aggregateKey as the cache key
	// (so that it can be overwritten.)
	eventCopy := &v1.Event{
		ObjectMeta: metav1.ObjectMeta{
			Name:      fmt.Sprintf("%v.%x", newEvent.InvolvedObject.Name, now.UnixNano()),
			Namespace: newEvent.Namespace,
		},
		Count:          1,
		FirstTimestamp: now,
		InvolvedObject: newEvent.InvolvedObject,
		LastTimestamp:  now,
		Message:        e.messageFunc(newEvent),
		Type:           newEvent.Type,
		Reason:         newEvent.Reason,
		Source:         newEvent.Source,
	}
	return eventCopy, aggregateKey
}

// eventLog records data about when an event was observed
type eventLog struct {
	// The number of times the event has occurred since first occurrence.
	count uint

	// The time at which the event was first recorded.
	firstTimestamp metav1.Time

	// The unique name of the first occurrence of this event
	name string

	// Resource version returned from previous interaction with server
	resourceVersion string
}

// eventLogger logs occurrences of an event
type eventLogger struct {
	sync.RWMutex
	cache *lru.Cache
	clock clock.Clock
}

// newEventLogger observes events and counts their frequencies
func newEventLogger(lruCacheEntries int, clock clock.Clock) *eventLogger {
	return &eventLogger{cache: lru.New(lruCacheEntries), clock: clock}
}

// eventObserve records an event, or updates an existing one if key is a cache hit
func (e *eventLogger) eventObserve(newEvent *v1.Event, key string) (*v1.Event, []byte, error) {
	var (
		patch []byte
		err   error
	)
	eventCopy := *newEvent
	event := &eventCopy

	e.Lock()
	defer e.Unlock()

	// Check if there is an existing event we should update
	lastObservation := e.lastEventObservationFromCache(key)

	// If we found a result, prepare a patch
	if lastObservation.count > 0 {
		// update the event based on the last observation so patch will work as desired
		event.Name = lastObservation.name
		event.ResourceVersion = lastObservation.resourceVersion
		event.FirstTimestamp = lastObservation.firstTimestamp
		event.Count = int32(lastObservation.count) + 1

		eventCopy2 := *event
		eventCopy2.Count = 0
		eventCopy2.LastTimestamp = metav1.NewTime(time.Unix(0, 0))
		eventCopy2.Message = ""

		newData, _ := json.Marshal(event)
		oldData, _ := json.Marshal(eventCopy2)
		patch, err = strategicpatch.CreateTwoWayMergePatch(oldData, newData, event)
	}

	// record our new observation
	e.cache.Add(
		key,
		eventLog{
			count:           uint(event.Count),
			firstTimestamp:  event.FirstTimestamp,
			name:            event.Name,
			resourceVersion: event.ResourceVersion,
		},
	)
	return event, patch, err
}

// updateState updates its internal tracking information based on latest server state
func (e *eventLogger) updateState(event *v1.Event) {
	key := getEventKey(event)
	e.Lock()
	defer e.Unlock()
	// record our new observation
	e.cache.Add(
		key,
		eventLog{
			count:           uint(event.Count),
			firstTimestamp:  event.FirstTimestamp,
			name:            event.Name,
			resourceVersion: event.ResourceVersion,
		},
	)
}

// lastEventObservationFromCache returns the event from the cache, reads must be protected via external lock
func (e *eventLogger) lastEventObservationFromCache(key string) eventLog {
	value, ok := e.cache.Get(key)
	if ok {
		observationValue, ok := value.(eventLog)
		if ok {
			return observationValue
		}
	}
	return eventLog{}
}

// EventCorrelator processes all incoming events and performs analysis to avoid overwhelming the system.  It can filter all
// incoming events to see if the event should be filtered from further processing.  It can aggregate similar events that occur
// frequently to protect the system from spamming events that are difficult for users to distinguish.  It performs de-duplication
// to ensure events that are observed multiple times are compacted into a single event with increasing counts.
type EventCorrelator struct {
	// the function to filter the event
	filterFunc EventFilterFunc
	// the object that performs event aggregation
	aggregator *EventAggregator
	// the object that observes events as they come through
	logger *eventLogger
}

// EventCorrelateResult is the result of a Correlate
type EventCorrelateResult struct {
	// the event after correlation
	Event *v1.Event
	// if provided, perform a strategic patch when updating the record on the server
	Patch []byte
	// if true, do no further processing of the event
	Skip bool
}

// NewEventCorrelator returns an EventCorrelator configured with default values.
//
// The EventCorrelator is responsible for event filtering, aggregating, and counting
// prior to interacting with the API server to record the event.
//
// The default behavior is as follows:
//   * Aggregation is performed if a similar event is recorded 10 times in a
//     in a 10 minute rolling interval.  A similar event is an event that varies only by
//     the Event.Message field.  Rather than recording the precise event, aggregation
//     will create a new event whose message reports that it has combined events with
//     the same reason.
//   * Events are incrementally counted if the exact same event is encountered multiple
//     times.
//   * A source may burst 25 events about an object, but has a refill rate budget
//     per object of 1 event every 5 minutes to control long-tail of spam.
func NewEventCorrelator(clock clock.Clock) *EventCorrelator {
	cacheSize := maxLruCacheEntries
	spamFilter := NewEventSourceObjectSpamFilter(cacheSize, defaultSpamBurst, defaultSpamQPS, clock)
	return &EventCorrelator{
		filterFunc: spamFilter.Filter,
		aggregator: NewEventAggregator(
			cacheSize,
			EventAggregatorByReasonFunc,
			EventAggregatorByReasonMessageFunc,
			defaultAggregateMaxEvents,
			defaultAggregateIntervalInSeconds,
			clock),

		logger: newEventLogger(cacheSize, clock),
	}
}

func NewEventCorrelatorWithOptions(options CorrelatorOptions) *EventCorrelator {
	optionsWithDefaults := populateDefaults(options)
	spamFilter := NewEventSourceObjectSpamFilter(optionsWithDefaults.LRUCacheSize,
		optionsWithDefaults.BurstSize, optionsWithDefaults.QPS, optionsWithDefaults.Clock)
	return &EventCorrelator{
		filterFunc: spamFilter.Filter,
		aggregator: NewEventAggregator(
			optionsWithDefaults.LRUCacheSize,
			optionsWithDefaults.KeyFunc,
			optionsWithDefaults.MessageFunc,
			optionsWithDefaults.MaxEvents,
			optionsWithDefaults.MaxIntervalInSeconds,
			optionsWithDefaults.Clock),
		logger: newEventLogger(optionsWithDefaults.LRUCacheSize, optionsWithDefaults.Clock),
	}
}

// populateDefaults populates the zero value options with defaults
func populateDefaults(options CorrelatorOptions) CorrelatorOptions {
	if options.LRUCacheSize == 0 {
		options.LRUCacheSize = maxLruCacheEntries
	}
	if options.BurstSize == 0 {
		options.BurstSize = defaultSpamBurst
	}
	if options.QPS == 0 {
		options.QPS = defaultSpamQPS
	}
	if options.KeyFunc == nil {
		options.KeyFunc = EventAggregatorByReasonFunc
	}
	if options.MessageFunc == nil {
		options.MessageFunc = EventAggregatorByReasonMessageFunc
	}
	if options.MaxEvents == 0 {
		options.MaxEvents = defaultAggregateMaxEvents
	}
	if options.MaxIntervalInSeconds == 0 {
		options.MaxIntervalInSeconds = defaultAggregateIntervalInSeconds
	}
	if options.Clock == nil {
		options.Clock = clock.RealClock{}
	}
	return options
}

// EventCorrelate filters, aggregates, counts, and de-duplicates all incoming events
func (c *EventCorrelator) EventCorrelate(newEvent *v1.Event) (*EventCorrelateResult, error) {
	if newEvent == nil {
		return nil, fmt.Errorf("event is nil")
	}
	aggregateEvent, ckey := c.aggregator.EventAggregate(newEvent)
	observedEvent, patch, err := c.logger.eventObserve(aggregateEvent, ckey)
	if c.filterFunc(observedEvent) {
		return &EventCorrelateResult{Skip: true}, nil
	}
	return &EventCorrelateResult{Event: observedEvent, Patch: patch}, err
}

// UpdateState based on the latest observed state from server
func (c *EventCorrelator) UpdateState(event *v1.Event) {
	c.logger.updateState(event)
}


text:
@interface ABBall : SKSpriteNode

// Method to drop in a new ball where the user taps the screen
// of the type the user currently has specified.
+ (instancetype)newBallNodeAtLocation:(CGPoint)location ofType:(int)ballType withBouncyness:(CGFloat)bouncyness;

@end


text:
/* --------------------------------------------------------------

   reset.css
   * Resets default browser CSS.

   Based on work by Eric Meyer:
   * meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/

-------------------------------------------------------------- */

html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, code,
del, dfn, img, q, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	font-weight: inherit;
	font-style: inherit;
	font-size: 100%;
	font-family: inherit;
	vertical-align: baseline;
}

/* body { background: #fff; } */

table { border-collapse: collapse; border-spacing: 0; }
caption, th, td { text-align: left; font-weight:400; }

/* Remove possible quote marks (") from <q>, <blockquote>. */
blockquote:before, blockquote:after, q:before, q:after { content: ""; }
blockquote, q { quotes: "" ""; }

a img { border: none; }

/* HTML5 tags */
header, section, footer, aside, nav, article, figure { display: block; }

/* --------------------------------------------------------------

   The mighty WebKit font smoothing
   See: http://maxvoltar.com/archive/-webkit-font-smoothing

-------------------------------------------------------------- */

body { -webkit-font-smoothing: antialiased; }

/* --------------------------------------------------------------

   Cross-browser kerning-pairs & ligatures
   See: http://www.aestheticallyloyal.com/public/optimize-legibility/

-------------------------------------------------------------- */

/* body {text-rendering: optimizeLegibility;} */


text:
@class Appirater;

@protocol AppiraterDelegate <NSObject>

@optional
-(BOOL)appiraterShouldDisplayAlert:(Appirater *)appirater;
-(void)appiraterDidDisplayAlert:(Appirater *)appirater;
-(void)appiraterDidDeclineToRate:(Appirater *)appirater;
-(void)appiraterDidOptToRate:(Appirater *)appirater;
-(void)appiraterDidOptToRemindLater:(Appirater *)appirater;
-(void)appiraterWillPresentModalView:(Appirater *)appirater animated:(BOOL)animated;
-(void)appiraterDidDismissModalView:(Appirater *)appirater animated:(BOOL)animated;
@end