tag:blogger.com,1999:blog-68446490748947399802024-03-06T01:17:37.754-08:00ADVANCED BLOGComputer science, tech, IT, programming, tutorials, and the such.Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.comBlogger17125tag:blogger.com,1999:blog-6844649074894739980.post-64657091563233236652015-03-24T22:53:00.002-07:002015-03-24T22:53:48.244-07:00Custom Login LogoAdd this CSS to the functions.php of your active theme. Replacing /images/ with your desired logo.
function my_login_logo() { ?>
<style type="text/css">
.login h1 a {
background-image: url(<?php echo get_stylesheet_directory_uri(); ?>/images/site-login-logo.png);
padding-bottom: 30px;
}
</style>
<?php }
add_action( 'login_enqueue_scripts', 'my_login_logo' );Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-78087261265011470232015-03-10T12:47:00.002-07:002015-03-10T12:50:21.612-07:00Buddypress: Activity Remove "All Members" TabIn theme, buddypress, activity, index.php search All Members and delete line of code.Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-23133616054390211022015-02-14T15:36:00.003-08:002015-02-14T15:36:48.610-08:00Buddypress: Change Site-Wide Activity to ActivityAdd it in functions.php in your theme:<br />
<br />
<pre><code>add_filter( 'bp_get_directory_title', 'change_activity_title' );
function change_activity_title($data) {
if( $data == 'Site-Wide Activity' ) {
$data = 'Activity';
}
return $data;
}</code></pre>
Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-12495107548104401332015-02-09T17:24:00.000-08:002015-02-09T17:24:58.927-08:00Buddypress: 404 Errror Quick Fix<span style="color: #222222; font-family: Open Sans, sans-serif;"><span style="background-color: white; font-size: 12px; line-height: 24px;">Re-saving the permalinks structure. Settings < Permalinks.</span></span>Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-26361360795850839782015-01-25T15:21:00.002-08:002015-01-25T15:21:12.494-08:00New Elements in HTML5<ul>
<li>header</li>
<ul>
<li>Element is used to present the header content for a page or a section of a page</li>
</ul>
<li>footer</li>
<ul>
<li>Element represents information, such as the author and copyright information, at the end of a page or a section of a page</li>
</ul>
<li>section</li>
<ul>
<li>Element is used to represent a section in a web page</li>
</ul>
<li> article</li>
<ul>
<li>Element is used to represent independent article content</li>
</ul>
<li>aside</li>
<ul>
<li>Element is used to represent a section of content that is related to the content surrounding it. For example, a quotation from an article, presented in larger font to highlight a particular point</li>
</ul>
<li>nav</li>
<ul>
<li>Element is used to present a section in the document for navigation through web pages</li>
</ul>
</ul>
<br />Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-66980502695433129582015-01-18T13:27:00.003-08:002015-02-14T15:37:06.601-08:00Buddypress: Edit Buddypress Wall Activity Text<ul>
<li>public_html/wp-content/plugins/buddypress-wall/includes/bp-wall-loader.php<br />Open and search for "Timeline"</li>
<li>Replace both instances with desired text</li>
<li>Search for "News Feed" replace with desired text</li>
</ul>
Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-52068223945908286442015-01-18T12:15:00.004-08:002015-02-14T15:37:15.191-08:00Buddypress: Customize Registration Text on Login Screen<ul>
<li>Public_html < wp-login.php</li>
<li>Search for "Register" and changed to desired text.</li>
<li>Search result 22 of 23 </li>
</ul>
Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-47673201777469773442013-02-01T14:43:00.002-08:002013-02-01T14:43:54.981-08:00My Tribute to Nyan Cat and PokemonI came across the <a href="http://www.youtube.com/watch?v=O84vVvE2Tcc" target="_blank">Nyan Cat</a> internet meme program on <a href="http://khanacademy.org/">khanacademy</a> and decided to make my own version as a tribute.<div>
<br /></div>
<div>
<b>//Code:</b></div>
<div>
<br /></div>
<div>
<div>
var nyanscale=1.5;</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
var nyany=200;</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
var nyanx=0;</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
var drawStar = function(state, x, y) {</div>
<div>
<br /></div>
<div>
switch (state) {</div>
<div>
<br /></div>
<div>
case 0:</div>
<div>
<br /></div>
<div>
point(x, y);</div>
<div>
<br /></div>
<div>
break;</div>
<div>
<br /></div>
<div>
case 1:</div>
<div>
<br /></div>
<div>
line(x - 10, y, x - 8, y);</div>
<div>
<br /></div>
<div>
line(x + 10, y, x + 8, y);</div>
<div>
<br /></div>
<div>
line(x, y - 10, x, y - 8);</div>
<div>
<br /></div>
<div>
line(x, y + 10, x, y + 8);</div>
<div>
<br /></div>
<div>
break;</div>
<div>
<br /></div>
<div>
case 2:</div>
<div>
<br /></div>
<div>
point(x - 15, y);</div>
<div>
<br /></div>
<div>
point(x + 15, y);</div>
<div>
<br /></div>
<div>
point(x, y - 15);</div>
<div>
<br /></div>
<div>
point(x, y + 15);</div>
<div>
<br /></div>
<div>
point(x - 10, y - 10);</div>
<div>
<br /></div>
<div>
point(x + 10, y + 10);</div>
<div>
<br /></div>
<div>
point(x - 10, y + 10);</div>
<div>
<br /></div>
<div>
point(x + 10, y - 10);</div>
<div>
<br /></div>
<div>
break;</div>
<div>
<br /></div>
<div>
case 3:</div>
<div>
<br /></div>
<div>
point(x - 20, y);</div>
<div>
<br /></div>
<div>
point(x + 20, y);</div>
<div>
<br /></div>
<div>
point(x, y - 20);</div>
<div>
<br /></div>
<div>
point(x, y + 20);</div>
<div>
<br /></div>
<div>
}</div>
<div>
<br /></div>
<div>
};</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
var drawStars = function(state, dx) {</div>
<div>
<br /></div>
<div>
stroke(0, 255, 183);</div>
<div>
<br /></div>
<div>
drawStar(state, 400 - (dx % 400), 30);</div>
<div>
<br /></div>
<div>
stroke(0, 255, 9);</div>
<div>
<br /></div>
<div>
drawStar((state + 2) % 4, 400 - ((dx + 100) % 400), 100);</div>
<div>
<br /></div>
<div>
stroke(255, 0, 255);</div>
<div>
<br /></div>
<div>
drawStar((state + 1) % 4, 400 - ((dx - 60) % 400), 150);</div>
<div>
<br /></div>
<div>
drawStar((state + 3) % 4, 400 - ((dx + 200) % 400), 230);</div>
<div>
<br /></div>
<div>
stroke(255, 0, 0);</div>
<div>
<br /></div>
<div>
drawStar((state + 2), 400 - ((dx + 300) % 400), 290);</div>
<div>
<br /></div>
<div>
stroke(255, 255, 0);</div>
<div>
<br /></div>
<div>
drawStar((state + 1), 400 - ((dx - 175) % 400), 370);</div>
<div>
<br /></div>
<div>
};</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
var drawRainbowStreak = function(shift, color, dy) {</div>
<div>
<br /></div>
<div>
// each rainbow streak is sin wave</div>
<div>
<br /></div>
<div>
stroke(color);</div>
<div>
<br /></div>
<div>
var x = 0;</div>
<div>
<br /></div>
<div>
var y = 10 * sin(x * 2 + shift);</div>
<div>
<br /></div>
<div>
for (var i = 0; i < 134; i++) {</div>
<div>
<br /></div>
<div>
y = 5 * sin(4 * x + shift);</div>
<div>
<br /></div>
<div>
point(x, y + dy);</div>
<div>
<br /></div>
<div>
x += 1;</div>
<div>
<br /></div>
<div>
}</div>
<div>
<br /></div>
<div>
};</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
var drawRainbow = function(shift) {</div>
<div>
<br /></div>
<div>
var red = color(0, 0, 0);</div>
<div>
<br /></div>
<div>
var orange = color(255, 92, 71);</div>
<div>
<br /></div>
<div>
var yellow = color(247, 189, 163);</div>
<div>
<br /></div>
<div>
var green = color(255, 92, 71);</div>
<div>
<br /></div>
<div>
var blue = color(247,189,163);</div>
<div>
<br /></div>
<div>
var purple = color(0, 0, 0);</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
strokeWeight(20);</div>
<div>
<br /></div>
<div>
drawRainbowStreak(shift, red, 125);</div>
<div>
<br /></div>
<div>
drawRainbowStreak(shift, orange, 145);</div>
<div>
<br /></div>
<div>
drawRainbowStreak(shift, yellow, 165);</div>
<div>
<br /></div>
<div>
drawRainbowStreak(shift, green, 185);</div>
<div>
<br /></div>
<div>
drawRainbowStreak(shift, blue, 205);</div>
<div>
<br /></div>
<div>
drawRainbowStreak(shift, purple, 225);</div>
<div>
<br /></div>
<div>
};</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
var drawNyanTail = function(state) {</div>
<div>
<br /></div>
<div>
fill(247, 255, 0);</div>
<div>
<br /></div>
<div>
switch (state) {</div>
<div>
<br /></div>
<div>
case 1:</div>
<div>
<br /></div>
<div>
strokeWeight(27);</div>
<div>
<br /></div>
<div>
stroke(0, 0, 0);</div>
<div>
<br /></div>
<div>
bezier(147, 204, 114, 211, 97, 198, 90, 186);</div>
<div>
<br /></div>
<div>
strokeWeight(15);</div>
<div>
<br /></div>
<div>
stroke(255, 234, 0);</div>
<div>
<br /></div>
<div>
bezier(147, 204, 114, 211, 97, 198, 90, 186);</div>
<div>
<br /></div>
<div>
break;</div>
<div>
<br /></div>
<div>
case 3:</div>
<div>
<br /></div>
<div>
strokeWeight(27);</div>
<div>
<br /></div>
<div>
stroke(0, 0, 0);</div>
<div>
<br /></div>
<div>
bezier(147, 204, 148, 196, 104, 197, 97, 218);</div>
<div>
<br /></div>
<div>
strokeWeight(15);</div>
<div>
<br /></div>
<div>
stroke(247, 255, 0);</div>
<div>
<br /></div>
<div>
bezier(147, 204, 148, 196, 104, 197, 97, 218);</div>
<div>
<br /></div>
<div>
break;</div>
<div>
<br /></div>
<div>
default: // 0 and 2</div>
<div>
<br /></div>
<div>
strokeWeight(27);</div>
<div>
<br /></div>
<div>
stroke(0, 0, 0);</div>
<div>
<br /></div>
<div>
bezier(147, 204, 114, 211, 97, 203, 88, 199);</div>
<div>
<br /></div>
<div>
strokeWeight(15);</div>
<div>
<br /></div>
<div>
stroke(247, 255, 0);</div>
<div>
<br /></div>
<div>
bezier(147, 204, 114, 211, 97, 203, 88, 199);</div>
<div>
<br /></div>
<div>
}</div>
<div>
<br /></div>
<div>
};</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
var drawNyanLegs = function(state) {</div>
<div>
<br /></div>
<div>
stroke(0, 0, 0);</div>
<div>
<br /></div>
<div>
strokeWeight(6);</div>
<div>
<br /></div>
<div>
fill(255, 255, 0);</div>
<div>
<br /></div>
<div>
switch (state) {</div>
<div>
<br /></div>
<div>
case 0:</div>
<div>
<br /></div>
<div>
// front legs</div>
<div>
<br /></div>
<div>
translate(300, 251);</div>
<div>
<br /></div>
<div>
rotate(-50);</div>
<div>
<br /></div>
<div>
ellipse(0, 0, 28, 42);</div>
<div>
<br /></div>
<div>
ellipse(-28, -28, 29, 44);</div>
<div>
<br /></div>
<div>
resetMatrix();</div>
<div>
<br /></div>
<div>
// back legs</div>
<div>
<br /></div>
<div>
translate(194, 251);</div>
<div>
<br /></div>
<div>
rotate(-46);</div>
<div>
<br /></div>
<div>
ellipse(0, 0, 26, 43);</div>
<div>
<br /></div>
<div>
ellipse(-26, -25, 25, 41);</div>
<div>
<br /></div>
<div>
resetMatrix();</div>
<div>
<br /></div>
<div>
break;</div>
<div>
<br /></div>
<div>
case 1:</div>
<div>
<br /></div>
<div>
ellipse(296, 252, 28, 37);</div>
<div>
<br /></div>
<div>
ellipse(256, 252, 29, 37);</div>
<div>
<br /></div>
<div>
ellipse(187, 252, 29, 37);</div>
<div>
<br /></div>
<div>
ellipse(148, 252, 29, 37);</div>
<div>
<br /></div>
<div>
break;</div>
<div>
<br /></div>
<div>
case 2:</div>
<div>
<br /></div>
<div>
// front legs</div>
<div>
<br /></div>
<div>
translate(282, 251);</div>
<div>
<br /></div>
<div>
rotate(31);</div>
<div>
<br /></div>
<div>
ellipse(0, 0, 28, 42);</div>
<div>
<br /></div>
<div>
ellipse(-35, 20, 31, 44);</div>
<div>
<br /></div>
<div>
resetMatrix();</div>
<div>
<br /></div>
<div>
// back legs</div>
<div>
<br /></div>
<div>
translate(187, 255);</div>
<div>
<br /></div>
<div>
rotate(51);</div>
<div>
<br /></div>
<div>
ellipse(0, 0, 29, 43);</div>
<div>
<br /></div>
<div>
ellipse(-27, 31, 29, 41);</div>
<div>
<br /></div>
<div>
resetMatrix();</div>
<div>
<br /></div>
<div>
break;</div>
<div>
<br /></div>
<div>
case 3:</div>
<div>
<br /></div>
<div>
ellipse(290, 240, 28, 37);</div>
<div>
<br /></div>
<div>
ellipse(253, 240, 29, 37);</div>
<div>
<br /></div>
<div>
ellipse(187, 240, 29, 37);</div>
<div>
<br /></div>
<div>
ellipse(148, 240, 29, 37);</div>
<div>
<br /></div>
<div>
}</div>
<div>
<br /></div>
<div>
};</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
var drawNyanPoptart = function(state) {</div>
<div>
<br /></div>
<div>
stroke(0, 0, 0);</div>
<div>
<br /></div>
<div>
strokeWeight(6);</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
// poptart</div>
<div>
<br /></div>
<div>
var poptartDeltY = 0;</div>
<div>
<br /></div>
<div>
if (state === 3) {</div>
<div>
<br /></div>
<div>
poptartDeltY = -5;</div>
<div>
<br /></div>
<div>
}</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
fill(238, 255, 0);</div>
<div>
<br /></div>
<div>
ellipse(215, 185 + poptartDeltY, 163, 135);</div>
<div>
<br /></div>
<div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
</div>
<div>
<br /></div>
<div>
};</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
var drawNyanHead = function(state) {</div>
<div>
<br /></div>
<div>
strokeWeight(6);</div>
<div>
<br /></div>
<div>
stroke(0, 0, 0);</div>
<div>
<br /></div>
<div>
</div>
<div>
<br /></div>
<div>
// head</div>
<div>
<br /></div>
<div>
var headDeltY = 0;</div>
<div>
<br /></div>
<div>
var headDeltX = 0;</div>
<div>
<br /></div>
<div>
switch(state) {</div>
<div>
<br /></div>
<div>
case 0:</div>
<div>
<br /></div>
<div>
headDeltX = 10;</div>
<div>
<br /></div>
<div>
headDeltY = -6;</div>
<div>
<br /></div>
<div>
break;</div>
<div>
<br /></div>
<div>
case 2:</div>
<div>
<br /></div>
<div>
headDeltX = -2;</div>
<div>
<br /></div>
<div>
headDeltY = -6;</div>
<div>
<br /></div>
<div>
break;</div>
<div>
<br /></div>
<div>
case 3:</div>
<div>
<br /></div>
<div>
headDeltY = -15;</div>
<div>
<br /></div>
<div>
}</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
fill(238, 255, 0); </div>
<div>
<br /></div>
<div>
ellipse(275 + headDeltX, 209 + headDeltY, 108, 80);</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
// ears</div>
<div>
<br /></div>
<div>
bezier(223 + headDeltX,</div>
<div>
<br /></div>
<div>
197 + headDeltY,</div>
<div>
<br /></div>
<div>
3 + headDeltX,</div>
<div>
<br /></div>
<div>
158 + headDeltY,</div>
<div>
<br /></div>
<div>
215 + headDeltX,</div>
<div>
<br /></div>
<div>
133 + headDeltY,</div>
<div>
<br /></div>
<div>
262 + headDeltX,</div>
<div>
<br /></div>
<div>
171 + headDeltY);</div>
<div>
<br /></div>
<div>
</div>
<div>
<br /></div>
<div>
bezier(329 + headDeltX,</div>
<div>
<br /></div>
<div>
199 + headDeltY,</div>
<div>
<br /></div>
<div>
450 + headDeltX,</div>
<div>
<br /></div>
<div>
149 + headDeltY,</div>
<div>
<br /></div>
<div>
321 + headDeltX,</div>
<div>
<br /></div>
<div>
133 + headDeltY,</div>
<div>
<br /></div>
<div>
285 + headDeltX,</div>
<div>
<br /></div>
<div>
169 + headDeltY);</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
// eyes</div>
<div>
<br /></div>
<div>
strokeWeight(14);</div>
<div>
<br /></div>
<div>
point(252 + headDeltX, 207 + headDeltY);</div>
<div>
<br /></div>
<div>
point(300 + headDeltX, 207 + headDeltY);</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
// nose</div>
<div>
<br /></div>
<div>
strokeWeight(8);</div>
<div>
<br /></div>
<div>
point(283 + headDeltX, 217 + headDeltY);</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
// mouth</div>
<div>
<br /></div>
<div>
strokeWeight(4);</div>
<div>
<br /></div>
<div>
bezier(259 + headDeltX,</div>
<div>
<br /></div>
<div>
225 + headDeltY,</div>
<div>
<br /></div>
<div>
262 + headDeltX,</div>
<div>
<br /></div>
<div>
235 + headDeltY,</div>
<div>
<br /></div>
<div>
287 + headDeltX,</div>
<div>
<br /></div>
<div>
231 + headDeltY,</div>
<div>
<br /></div>
<div>
284 + headDeltX,</div>
<div>
<br /></div>
<div>
226 + headDeltY);</div>
<div>
<br /></div>
<div>
</div>
<div>
<br /></div>
<div>
bezier(300 + headDeltX,</div>
<div>
<br /></div>
<div>
225 + headDeltY,</div>
<div>
<br /></div>
<div>
300 + headDeltX,</div>
<div>
<br /></div>
<div>
232 + headDeltY,</div>
<div>
<br /></div>
<div>
282 + headDeltX,</div>
<div>
<br /></div>
<div>
232 + headDeltY,</div>
<div>
<br /></div>
<div>
284 + headDeltX,</div>
<div>
<br /></div>
<div>
226 + headDeltY);</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
// cheeks</div>
<div>
<br /></div>
<div>
strokeWeight(16);</div>
<div>
<br /></div>
<div>
stroke(255, 0, 0);</div>
<div>
<br /></div>
<div>
point(244 + headDeltX, 225 + headDeltY);</div>
<div>
<br /></div>
<div>
point(313 + headDeltX, 222 + headDeltY);</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
// eye highlights</div>
<div>
<br /></div>
<div>
strokeWeight(8);</div>
<div>
<br /></div>
<div>
stroke(255, 255, 255);</div>
<div>
<br /></div>
<div>
point(250 + headDeltX, 205 + headDeltY);</div>
<div>
<br /></div>
<div>
point(298 + headDeltX, 205 + headDeltY);</div>
<div>
<br /></div>
<div>
</div>
<div>
<br /></div>
<div>
noStroke();</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
if (mouseIsPressed) {</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
fill(255, 0, 0);</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
} else {</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
noFill();</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
}</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
rect(headDeltX+245,headDeltY+202,3310,10,90);</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
};</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
var drawNyanCat = function(state) {</div>
<div>
<br /></div>
<div>
drawNyanTail(state);</div>
<div>
<br /></div>
<div>
drawNyanLegs(state);</div>
<div>
<br /></div>
<div>
drawNyanPoptart(state);</div>
<div>
<br /></div>
<div>
drawNyanHead(state);</div>
<div>
<br /></div>
<div>
};</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
var state = 0;</div>
<div>
<br /></div>
<div>
var draw = function() {</div>
<div>
<br /></div>
<div>
background(8, 52, 107);</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
// there are only 4 states in the animation:</div>
<div>
<br /></div>
<div>
// 0, 1, 2, and 3</div>
<div>
<br /></div>
<div>
drawStars(state % 4, frameCount * 20);</div>
<div>
<br /></div>
<div>
drawRainbow(frameCount * 20);</div>
<div>
<br /></div>
<div>
drawNyanCat(state % 4);</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
// only increase the state every 4 frames, to slow</div>
<div>
<br /></div>
<div>
// down the animation</div>
<div>
<br /></div>
<div>
if (frameCount % 4 === 0) {</div>
<div>
<br /></div>
<div>
state += 1;</div>
<div>
<br /></div>
<div>
}</div>
<div>
<br /></div>
<div>
};</div>
</div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<b>//Final Form: </b><a href="http://www.khanacademy.org/cs/pikachu-bacon-fireworks-with-lazers/1236548594">http://www.khanacademy.org/cs/pikachu-bacon-fireworks-with-lazers/1236548594</a></div>
<div>
<br /></div>
Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-61699684674556321302011-06-17T20:59:00.000-07:002012-07-05T14:14:27.396-07:00Total Cost2 Logitech mice - $24<br />
Linksys switch - $15<br />
Cat 6 cables - $22<br />
Padded steel chair (needed to upgrade from steel) - $12<br />
Table from a thrift store - $30<br />
Replacement power supply (the other one was fried) - $50<br />
Speakers - $12<br />
Surge Protector - $18<br />
I rounded it up to the dollar.<br />
<br />
Total: $183<br />
<br />
<br />
If using this as an example for your own home server, you will possibly need to add the cost of two desktops, and hopefully won't need a extra power supply.<br />
<br />
UPDATE: Just a note for the Linux server flavors, I'd highly recommend CentOS it seems to be much more geared towards servers than trying to force Ubuntu or Fedora to act like one.Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-32059237182166175542010-03-19T02:14:00.001-07:002011-05-05T21:35:11.941-07:00Server Area<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpYe3bJdf0Nsk1K99q3OFR_AA9yedcUyAUuTOWYLXgM7dEFA4fVnXBYvh_ozGhJUqapnAH_XkOGlKpyvHyT6c29QSfShhyphenhyphenYSfvfDS3EoVFPmf9AbansgfTw-bt5ekfLbSDypvGayhLMTE/s1600-h/037.JPG"><img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 320px; height: 240px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpYe3bJdf0Nsk1K99q3OFR_AA9yedcUyAUuTOWYLXgM7dEFA4fVnXBYvh_ozGhJUqapnAH_XkOGlKpyvHyT6c29QSfShhyphenhyphenYSfvfDS3EoVFPmf9AbansgfTw-bt5ekfLbSDypvGayhLMTE/s320/037.JPG" alt="" id="BLOGGER_PHOTO_ID_5450271215049093970" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj1NJt3e7VZRABM2FEr_dJbXP5BEef9NPSz9iX5TBKPoKrQLIPCAWB7rpEGlOwYWemAuSp6nAmCNcoasfLAJJqyG8YV2Sl9c4EODh2olK0H_6OPata2DqDrHgI0n-VjBfOS6qL55NFz_w/s1600-h/039.JPG"><img style="float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 320px; height: 240px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj1NJt3e7VZRABM2FEr_dJbXP5BEef9NPSz9iX5TBKPoKrQLIPCAWB7rpEGlOwYWemAuSp6nAmCNcoasfLAJJqyG8YV2Sl9c4EODh2olK0H_6OPata2DqDrHgI0n-VjBfOS6qL55NFz_w/s320/039.JPG" alt="" id="BLOGGER_PHOTO_ID_5450271487974286418" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuqHbv_UMADvOcL6WbQGcx7xqra_zvagpH_cF66KPudIa9CjLD3TUukk0P503-gPZOep4emRyYMxPuHWBbyDRo81FGqASdmx9Fy7j5w3kmD5H3YFKASCetMRWtGEWbB78zxVdqU88XZKM/s1600/DSCN0102.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuqHbv_UMADvOcL6WbQGcx7xqra_zvagpH_cF66KPudIa9CjLD3TUukk0P503-gPZOep4emRyYMxPuHWBbyDRo81FGqASdmx9Fy7j5w3kmD5H3YFKASCetMRWtGEWbB78zxVdqU88XZKM/s320/DSCN0102.JPG" alt="" id="BLOGGER_PHOTO_ID_5603455438258603378" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdv9mJqLfApcq2V4Lafc2K42NAIjHWTz8iJ8jMpTWSFi7-bXYornZI-u37GxQsp4iEQ_O4QxcIuCSBV9E8_Xiv61fMClhNiqsDtaCkRrgnubNXvIUPl-H4cq2oqDdMu2cWRAdslp9Lv3I/s1600/DSCN0100.JPG"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 240px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdv9mJqLfApcq2V4Lafc2K42NAIjHWTz8iJ8jMpTWSFi7-bXYornZI-u37GxQsp4iEQ_O4QxcIuCSBV9E8_Xiv61fMClhNiqsDtaCkRrgnubNXvIUPl-H4cq2oqDdMu2cWRAdslp9Lv3I/s320/DSCN0100.JPG" alt="" id="BLOGGER_PHOTO_ID_5603455433971630338" border="0" /></a><br /><br /><br />Where the magic happens.<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><--- Gateway running Ubuntu Server.<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><--- Compaq running Fedora, kind of difficult to see with power supply cables.Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-51058734941018891682009-08-04T20:29:00.000-07:002011-06-17T20:55:27.048-07:00Server End Game PlanI am getting close to being finished setting up everything with the server and I have attempted to document most of the more interesting things that happened. My plan is to edit and touch the existing posts up a bit (e.g. I have replaced the Dell with a newer "hand-me-down"), as well as add a final one. <br />
<div><br />
</div><div>UPDATE: Not being a writer, or playing one on tv, putting all this together is taking longer than I thought it would. Not to worry though, it shall be completed! </div><div>It has also dawned on me that this server is completely ran by Linux. Having not spent much time with any Windows servers besides a class on 2003, I am unsure if that is more that Linux is overall better (perhaps, or maybe more so for developers, but I have no interest in the "religious" part of operating systems) or if it is just that free is so much more appealing than the pricey Windows server OS's when being on a low budget.</div>Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-46108549180618832222009-07-05T01:53:00.000-07:002009-07-06T22:45:18.827-07:00Home Server Part 6As a side-note I was very lucky to receive another computer from a friend of family, that also happened to be old. So I decided to set that up with the server as just a desktop computer alongside it with another open source operating system.<br /><br />Second Computer Specs:<br /><ul><li>Dell Dimension L600CX</li><li>Intel Celeron<br /></li><li>312 MB RAM</li><li>10 GB HD</li><li>Windows ME (now Ubuntu 9.04)<br /></li></ul>Other Parts:<br /><ul><li>Dell Quietkey keyboard</li><li>Logitech laser mouse</li></ul><br />Back to the server part though; I have been having some trouble with the Ubuntu Server 8.04 OS. It may just be my nowhere near complete knowledge of how the OS works, but nevertheless thankfully there is an abundance of documentation and I shall dive into it. If I am still unsuccessful then I am planning on seeing how capable Fedora 10 would be to use for server applications. This has turned out to be much more difficult then I thought it would be, but is a very good learning experience. :)Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-15583821041146249312009-06-23T19:16:00.000-07:002011-06-17T01:39:07.107-07:00Home Server Part 5<span style="font-family: arial;">Once again I scourged the internet for an operating system, this time for a server instead of just a desktop. After once again glimpsing at the Windows Server editions, I decided that the $240 minimum (Server 2003) was not very practical just for software.<br />
<br />
I think it's worth noting that even though I generally prefer Open Source Software for several reasons, I have no real problem with Windows or Mac. It simply did not seem practical.<br />
<br />
So I looked at a couple of the more popular Linux flavor options:<br />
</span><br />
<ul><li>Ubuntu Server</li>
<li>Fedora</li>
<li>SUSE</li>
</ul>After looking at them I figured it would be the simplest to try Ubuntu Server (8.04) since I was already running Ubuntu.<br />
<br />
I also bought a Linksys 5-port switch ($15) to connect to the router I have upstairs along with two 10ft and one 50ft cat-6 cables.<br />
<br />
<br />
<span style="font-family: arial;">My running total is - $66<br />
<br />
<br />
</span>Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-46235504662270484522009-06-22T23:25:00.000-07:002009-06-22T23:33:21.146-07:00Home Server Part 4So now I had everything I needed to have one whole computer, now I just needed a place to put it. Luckily, I soon found that place.<br />I got a medium size cave like corner of the basement to use, and started setting up shop. It didn't take me long to realize the 2x4 table that I was using was not going to cut it. In the end I bit the bullet and bought a six feet table ($30) and an all steel chair ($8). After I had those things I got everything set up.<br /><br />Once I had everything up and running I finally started thinking about making the computer into a little home server, and began searching for an OS again.Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-23843715661002289242009-06-22T00:26:00.000-07:002009-06-23T19:18:03.508-07:00Home Server Part 2 & 3The next part of this project was to get a monitor. I started doing a little searching around (offline and on) and the best deal I could find was on Newegg for about $130, which I did not want to spend that much.<br />Luckily though, after asking around, I found out that my nice girlfriend had an extra monitor that was just sitting in her garage. :)<br />So I took that off of her hands and saved myself from not being so frugal.<br /><br /><br /><br />After that I had to decide on the operating system. Now keeping in mind that I had a computer that was not quite on the cutting edge, I looked at my options. In the end I decided to go with Ubuntu (Linux) 8.04. It's free, and free is almost always good. Also I didn't mind the slight learning curve.Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-74834110229984433462009-06-18T12:46:00.000-07:002009-06-22T23:34:57.214-07:00Home Server Part 1Alright, so I started this project with:<br /><ul><li> One computer tower (Gateway)</li><li> A mouse</li><li> Keyboard</li><li> Almost no money</li><li> No place to put it besides the corner of my bedroom</li><li> And a <span style="font-weight: bold;">dream</span></li></ul><br />That being said, It is worth noting that I was not sure about what I was going to do with 3/4ths of a computer, the idea to make it into a server came later in the journey.<br /><br />Computer Specs:<br /><br /><ul><li>Gateway GP7-500</li><li>Pentium III (gotta love it) :)</li><li>320 MB RAM</li><li>10 GB Hard Drive<br /></li><li>OS Windows 98SE<br /></li></ul>Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0tag:blogger.com,1999:blog-6844649074894739980.post-77290491313541177842009-06-17T22:30:00.000-07:002009-07-06T22:46:45.834-07:00Low Budget Home Server PlanI'm currently setting up a server to do various jobs in my basement. I will get around to explaining the set up as I work on it and will be pointing out the problems that I face.<br /><br />Also, I will most likely be breaking it up into parts to make it easier to follow as well as to read.<br /><br /><br /><br /><span style="font-weight: bold;">UPDATE</span>: Since this is my first post I would also like to say that I will be using this space as a type of reference resource that will hopefully be helpful, organized, or at least semi-entertaining. I may also with time move some of the more useful posts into various forums that they fit into.<br />Lastly I am aware that I could use a better name for the blog. It is a work in progress, but I appreciate the constructive criticism :)Roman Shttp://www.blogger.com/profile/13193597256954525370noreply@blogger.com0