<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SupremeTechs &#187; Programming</title>
	<atom:link href="http://supremetechs.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://supremetechs.com</link>
	<description>Anything and everything techy</description>
	<lastBuildDate>Mon, 07 May 2012 11:47:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>New Session Cookie Created on Every Page Refresh in CodeIgniter</title>
		<link>http://supremetechs.com/2012/05/07/session-cookie-created-page-refresh-codeigniter/</link>
		<comments>http://supremetechs.com/2012/05/07/session-cookie-created-page-refresh-codeigniter/#comments</comments>
		<pubDate>Mon, 07 May 2012 11:47:21 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Linux Stuff]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[codeigniter new session on page refresh]]></category>
		<category><![CDATA[codeigniter page refresh creates new session]]></category>
		<category><![CDATA[Codeigniter session]]></category>

		<guid isPermaLink="false">http://supremetechs.com/?p=765</guid>
		<description><![CDATA[CodeIgniter's way of handling session data is slick, and I use it a lot. However on my current project, I went overboard on my configuration changes and accidentally caused a problem that had me scratching my head for a few minutes. I noticed that session data wasn't persisting and that my sessions table (I opted [...]<p><a href="http://supremetechs.com/2012/05/07/session-cookie-created-page-refresh-codeigniter/">New Session Cookie Created on Every Page Refresh in CodeIgniter</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></description>
			<content:encoded><![CDATA[<p>CodeIgniter's way of handling session data is slick, and I use it a lot. However on my current project, I went overboard on my configuration changes and accidentally caused a problem that had me scratching my head for a few minutes. I noticed that session data wasn't persisting and that my sessions table (I opted for database storage of my session data) was filling up with new rows of session data every time I reloaded a page in my project. This prevented my login functionality from working. </p>
<p>The solution to my problem was a configuration detail. I had set $config['cookie_domain'] to the domain name I will eventually use for the site. CodeIgniter didn't like this because my development environment is not on that domain. So it was creating new cookie/session data every time I loaded a page. The problem made sense after I thought about it for a bit. I remembered that I had set a few extra settings in the config, and sure enough, that was the winner.</p>
<p>The problem can happen when other settings are incorrect as well. So pay close attention to those settings, and look there first if you notice that sessions are being created on every page load.</p>
<p><a href="http://supremetechs.com/2012/05/07/session-cookie-created-page-refresh-codeigniter/">New Session Cookie Created on Every Page Refresh in CodeIgniter</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://supremetechs.com/2012/05/07/session-cookie-created-page-refresh-codeigniter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clickbank Analytic Software</title>
		<link>http://supremetechs.com/2012/04/21/clickbank-analytic-software/</link>
		<comments>http://supremetechs.com/2012/04/21/clickbank-analytic-software/#comments</comments>
		<pubDate>Sun, 22 Apr 2012 03:43:54 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Internet Money]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[click bank niches]]></category>
		<category><![CDATA[clickbank analytics]]></category>
		<category><![CDATA[hot clickbank products]]></category>
		<category><![CDATA[products to promote on clickbank]]></category>
		<category><![CDATA[which products should I promote on clickbank]]></category>

		<guid isPermaLink="false">http://supremetechs.com/?p=758</guid>
		<description><![CDATA[There's a site called cb-analytics.com which has always been a great resource for information on Clickbank products. However, I've always found the site hard to navigate and I wanted a site that showed some of the "hot" clickbank products. So, I've written a site called cbniches.com which I hope will rectify these issues. The site [...]<p><a href="http://supremetechs.com/2012/04/21/clickbank-analytic-software/">Clickbank Analytic Software</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></description>
			<content:encoded><![CDATA[<p>There's a site called cb-analytics.com which has always been a great resource for information on Clickbank products. However, I've always found the site hard to navigate and I wanted a site that showed some of the "hot" clickbank products. So, I've written a site called <a href="http://cbniches.com" title="cb niches" target="_blank">cbniches.com</a> which I hope will rectify these issues. </p>
<p>The site shows all the latest products in each category and shows gravity and earnings per sale. It also has a graph for each product to show gravity over time. I think this will be pretty helpful to affiliate markets looking for new products to promote on Clickbank. Check it out at <a href="http://cbniches.com" title="cb niches" target="_blank">http://cbniches.com</a>. I wrote it with the latest version of my LavaPHP framework, another product I've been developing as open source. <a href="https://github.com/lpcustom/LavaPHP" title="lava php" target="_blank">LavaPHP can be found on github</a>, but it's still in early development.</p>
<p><a href="http://supremetechs.com/2012/04/21/clickbank-analytic-software/">Clickbank Analytic Software</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://supremetechs.com/2012/04/21/clickbank-analytic-software/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gnome 3 + Netbeans Revisited</title>
		<link>http://supremetechs.com/2012/04/16/gnome-3-netbeans-revisited/</link>
		<comments>http://supremetechs.com/2012/04/16/gnome-3-netbeans-revisited/#comments</comments>
		<pubDate>Mon, 16 Apr 2012 08:46:40 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Linux Stuff]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[netbean menus in cinnamon]]></category>
		<category><![CDATA[netbean menus in gnome 3]]></category>
		<category><![CDATA[netbean menus in linux]]></category>

		<guid isPermaLink="false">http://supremetechs.com/?p=754</guid>
		<description><![CDATA[I wrote at some point in the past about a small bug in Gnome 3 where Netbeans menus behaved strangely. My solution then was to switch to Gnome classic. Well I started using Cinnamon recently and found that it has the same issue. So I wanted to find a better solution. I came across a [...]<p><a href="http://supremetechs.com/2012/04/16/gnome-3-netbeans-revisited/">Gnome 3 + Netbeans Revisited</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I wrote at some point in the past about a small bug in Gnome 3 where Netbeans menus behaved strangely. My solution then was to switch to Gnome classic. Well I started using Cinnamon recently and found that it has the same issue. So I wanted to find a better solution.</p>
<p>I came across a strange way to fix the issue. I tried it out, and it worked beautifully, even if it is weird. </p>
<p>Unmaximize Netbeans so that it is in a Window on the desktop. Grab the top left corner of the Window and move it all the way to the top left side of the screen. Now, maximize it. The menus work again. </p>
<p>It's weird, but I'm glad it works. I spend most of my time in Netbeans, and I'm really digging Cinnamon.</p>
<p><a href="http://supremetechs.com/2012/04/16/gnome-3-netbeans-revisited/">Gnome 3 + Netbeans Revisited</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://supremetechs.com/2012/04/16/gnome-3-netbeans-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing LavaPHP &#8211; Yet Another PHP Framework</title>
		<link>http://supremetechs.com/2012/04/13/introducing-lavaphp-php-framework/</link>
		<comments>http://supremetechs.com/2012/04/13/introducing-lavaphp-php-framework/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 04:47:52 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[2012 best php framework]]></category>
		<category><![CDATA[best php framework]]></category>
		<category><![CDATA[lavaphp]]></category>

		<guid isPermaLink="false">http://supremetechs.com/?p=752</guid>
		<description><![CDATA[I've used quite a few PHP framework to varying degrees, and like many other PHP developers, I've decided to make my own. Of all the current frameworks available, I prefer CodeIgniter, because it is easy to use, has great documentation, and generally stays out of your way. Everyone has their opinion of the best PHP [...]<p><a href="http://supremetechs.com/2012/04/13/introducing-lavaphp-php-framework/">Introducing LavaPHP &#8211; Yet Another PHP Framework</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I've used quite a few PHP framework to varying degrees, and like many other PHP developers, I've decided to make my own. Of all the current frameworks available, I prefer CodeIgniter, because it is easy to use, has great documentation, and generally stays out of your way.</p>
<p>Everyone has their opinion of the best PHP framework, but I like the ones that let me write PHP and don't throw a lot of features that I don't need into the mix. I found that no matter what PHP framework I was using, I was always creating a table for users. I was always creating login functionality for users. I was always creating email confirmation functionality for users. I was always creating an admin interface for working with my configuration. I was always creating classes that helped me work with web services/REST APIs. I always need a small web service of my own for Ajax functionality. I always needed to add curl functionality just in case the hosting provider had fopen disabled (which most do). </p>
<p>Those were the things I needed. ORMs are great and all, but I really didn't want to learn proper YAML syntax just so I could setup automatic object models for my database tables. Creating models for my database isn't that much of a chore. Creating a complete user system can be. </p>
<p>So, I set out to create a framework that I can use for my own projects and have all the functionality that I find I usually need right out of the box. </p>
<p>Another thing about frameworks is that they are designed to make enterprise level sites. They aren't designed to create software system which can be distributed. By that, I mean I wanted to create a software package that could be installed by end users and used by them to create their own websites (custom CMS system with a specific purpose). A normal framework doesn't work well in this area because of the way views are usually handled. Mainly, I wanted third parties to be able to create themes for my CMS systems without much effort. With something like CodeIgniter, I could use a templating engine via a plugin or Codeigniter's own minimalist template engine, but I don't like take one piece of software and adding on a bunch of plugins.</p>
<p>First you have to learn how to use the plugin. Then you have to hope that there isn't a bug in the plugin that will spring up in your app. Then if there is some small customization that needs to be made to the plugin, you could spend days trying to figure out a way to make it work with your system, when it would have taken less time to just write your own. Using plugins also feels a bit like cheating to me, as well. I want to know every little part of my system, so that if a bug comes up, I'll know right where to look or at least have a decent idea where to look.</p>
<p>With all that said, I'm announcing my PHP framework. I've written it completely from scratch and I'm hosting it on Github. I also have purchased the dot com for it. I'm calling it LavaPHP. The motto will be "LavaPHP - Add a little lava to your LAMP" and it will have a lava lamp as it's mascot/logo. If you'd like to help with the initial development, hit me up and fork the project here:	<a href="https://github.com/lpcustom/LavaPHP" title="LavaPHP - add a little lava to your LAMP">https://github.com/lpcustom/LavaPHP</a></p>
<p><a href="http://supremetechs.com/2012/04/13/introducing-lavaphp-php-framework/">Introducing LavaPHP &#8211; Yet Another PHP Framework</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://supremetechs.com/2012/04/13/introducing-lavaphp-php-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>lwjgl.dll: Can&#8217;t load IA 32-bit .dll on a AMD 64-bit platform</title>
		<link>http://supremetechs.com/2012/03/29/lwjgldll-load-ia-32bit-dll-amd-64bit-platform/</link>
		<comments>http://supremetechs.com/2012/03/29/lwjgldll-load-ia-32bit-dll-amd-64bit-platform/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 10:51:26 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[can't load ia 32-bit .dll]]></category>
		<category><![CDATA[java game development]]></category>
		<category><![CDATA[lwjgl]]></category>

		<guid isPermaLink="false">http://supremetechs.com/?p=741</guid>
		<description><![CDATA[If you encounter this error while trying to write a game on a Windows 64 bit system using Slick2d, I can give you some insight into how to fix the issue. I'd ran into this issue some time ago, but I don't remember if I posted about it or not. I solved the problem then [...]<p><a href="http://supremetechs.com/2012/03/29/lwjgldll-load-ia-32bit-dll-amd-64bit-platform/">lwjgl.dll: Can&#8217;t load IA 32-bit .dll on a AMD 64-bit platform</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></description>
			<content:encoded><![CDATA[<p>If you encounter this error while trying to write a game on a <a href="http://supremetechs.com/category/windows/" >Windows</a> 64 bit system using Slick2d, I can give you some insight into how to fix the issue. I'd ran into this issue some time ago, but I don't remember if I posted about it or not. I solved the problem then by using a recompiled version of slick2d. It worked well, but I did something different this time around.</p>
<p>I downloaded the latest version of LWJGL and used it instead. The process of importing the libs is much the same except you use the new LWJGL and its natives instead of the ones included with slick2d. If you need help getting the imports correct, leave a comment and I'll go into it in more detail.</p>
<p><a href="http://supremetechs.com/2012/03/29/lwjgldll-load-ia-32bit-dll-amd-64bit-platform/">lwjgl.dll: Can&#8217;t load IA 32-bit .dll on a AMD 64-bit platform</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://supremetechs.com/2012/03/29/lwjgldll-load-ia-32bit-dll-amd-64bit-platform/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jMonkeyEngine &#8220;An instance of the program cannot access specified user directory&#8221;</title>
		<link>http://supremetechs.com/2012/03/26/jmonkeyengine-instance-program-access-user-directory/</link>
		<comments>http://supremetechs.com/2012/03/26/jmonkeyengine-instance-program-access-user-directory/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 07:20:17 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Linux Stuff]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[jmonkey engine linux]]></category>
		<category><![CDATA[jMonkey Engine won't start]]></category>
		<category><![CDATA[jmonkeyengine cannot access specified user direcgtory]]></category>

		<guid isPermaLink="false">http://supremetechs.com/?p=738</guid>
		<description><![CDATA[This is a simple issue and most Linux users can probably figure it out rather quickly. I don't mean to offend anyone, but the error message is pretty straight-forward when it comes to the problem. However, I'll explain it to those who run into it and want to know how to fix it. Then again, [...]<p><a href="http://supremetechs.com/2012/03/26/jmonkeyengine-instance-program-access-user-directory/">jMonkeyEngine &#8220;An instance of the program cannot access specified user directory&#8221;</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></description>
			<content:encoded><![CDATA[<p>This is a simple issue and most <a href="http://supremetechs.com/category/operating-systems/linux-stuff/" >Linux</a> users can probably figure it out rather quickly. I don't mean to offend anyone, but the error message is pretty straight-forward when it comes to the problem. However, I'll explain it to those who run into it and want to know how to fix it. Then again, I may be the only person who runs into this problem. Either way, I'm posting it for anyone who may need it.</p>
<p>The problem stems with the installation of jMonkeyEngine. The installer is a .sh file which which can be executed like so:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sh</span> jME3_SDK_Beta-Linux.sh</pre></td></tr></table></div>

<p>However, if you are like me, you may have ran it with sudo like this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">sh</span> JME3_SDK_Beta-Linux.sh</pre></td></tr></table></div>

<p>The good thing about using sudo is that the program will be installed for all users on the machine. I've not ran it without sudo to see if it will install for only the user running the installer, but I'm assuming that it will. </p>
<p>After the installation occurs, it asks you if you want to start jMonkeyEngine. If you answer yes, it will start it as root, and it will write it's hidden users directory in your home directory. The home directory will have root:root as the owner because the program was first started by the root user. </p>
<p>So when you go back and run the program again, it will not have access to the required folder. The solution is to change the owner of the folder. This is accomplished simply by typing this in a terminal while in your home folder (the terminal should open in your home folder automatically, but just to make sure we'll change directory into it first). In the following example the word "username" should be replace with your actual username.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">cd</span> ~<span style="color: #000000; font-weight: bold;">/</span>
<span style="color: #c20cb9; font-weight: bold;">chown</span> <span style="color: #660033;">-R</span> username:username .jmonkeyplatform</pre></td></tr></table></div>

<p>You should now be able to open jMonkeyEngine. The -R, for those of you interested, means "recursive", which will change the owner of all files and folder inside of .jmonkeyplatform, not just the folder itself.</p>
<p><a href="http://supremetechs.com/2012/03/26/jmonkeyengine-instance-program-access-user-directory/">jMonkeyEngine &#8220;An instance of the program cannot access specified user directory&#8221;</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://supremetechs.com/2012/03/26/jmonkeyengine-instance-program-access-user-directory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Increasing the size of tmpDSK and /tmp in a CPanel Environment</title>
		<link>http://supremetechs.com/2012/03/09/increasing-size-tmpdsk-tmp-cpanel-environment/</link>
		<comments>http://supremetechs.com/2012/03/09/increasing-size-tmpdsk-tmp-cpanel-environment/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 08:43:04 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux Stuff]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Server Stuff]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[/tmp]]></category>
		<category><![CDATA[changing tmpdsk size]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[resize tmpdsk]]></category>
		<category><![CDATA[tmpDSK]]></category>

		<guid isPermaLink="false">http://supremetechs.com/?p=716</guid>
		<description><![CDATA[I recently ran into an issue in cPanel after recompiling Apache with some new settings. I enabled the eAccelerator extension in my EasyApache configuration for PHP. Now cPanel uses a default size for its /tmp mount of 512mb. I found out rather quickly that this isn't enough for eAccelerator. I actually ended up resetting this [...]<p><a href="http://supremetechs.com/2012/03/09/increasing-size-tmpdsk-tmp-cpanel-environment/">Increasing the size of tmpDSK and /tmp in a CPanel Environment</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I recently ran into an issue in cPanel after recompiling Apache with some new settings. I enabled the eAccelerator extension in my EasyApache configuration for PHP. Now cPanel uses a default size for its /tmp mount of 512mb. I found out rather quickly that this isn't enough for eAccelerator. I actually ended up resetting this value to 4096mb (4GB). As a reminder to myself and so anyone else looking for the solution to this problem, I will outline what needs to be done below.</p>
<p>First, ssh into your server and login as root or su - root after logging in as a regular user. Now use the power of the command line. Don't panic!</p>
<p>Stop Apache, MySQL, and cPanel</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">service httpd stop
service mysql stop
service cpanel stop</pre></td></tr></table></div>

<p>Next unmount the existing /tmp</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">umount</span> <span style="color: #660033;">-l</span> <span style="color: #000000; font-weight: bold;">/</span>tmp</pre></td></tr></table></div>

<p>Remove /usr/tmpDSK</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>tmpDSK</pre></td></tr></table></div>

<p>Next, use your favorite editor (Vim in this example) to change the config file for the tmpDSK</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vim</span> <span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>securetmp</pre></td></tr></table></div>

<p>Search the file for "tmpdsksize" (in Vim type /tmpdsksize and hit enter). The line should look like this by default:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$tmpdsksize</span>     <span style="color: #339933;">=</span> <span style="color: #cc66cc;">512000</span><span style="color: #339933;">;</span>    <span style="color: #666666; font-style: italic;"># Must be larger than 250000</span></pre></td></tr></table></div>

<p>Change the 512000 to a higher number in Kilobytes. For my 4GB, I changed it to 4096000.<br />
Save the file (vim :wq enter).<br />
Run the script...</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>scripts<span style="color: #000000; font-weight: bold;">/</span>securetmp</pre></td></tr></table></div>

<p>Answer y to the two questions it asks.<br />
Finally start your services back up.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="bash" style="font-family:monospace;">service httpd start
service mysql start
service cpanel start</pre></td></tr></table></div>

<p>That should have you set with more /tmp space.</p>
<p><a href="http://supremetechs.com/2012/03/09/increasing-size-tmpdsk-tmp-cpanel-environment/">Increasing the size of tmpDSK and /tmp in a CPanel Environment</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://supremetechs.com/2012/03/09/increasing-size-tmpdsk-tmp-cpanel-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Marte Engine Define() and Check()</title>
		<link>http://supremetechs.com/2012/03/03/marte-engine-define-check/</link>
		<comments>http://supremetechs.com/2012/03/03/marte-engine-define-check/#comments</comments>
		<pubDate>Sat, 03 Mar 2012 11:10:17 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[check()]]></category>
		<category><![CDATA[define()]]></category>
		<category><![CDATA[Marte Engine]]></category>
		<category><![CDATA[marte engine key input]]></category>

		<guid isPermaLink="false">http://supremetechs.com/?p=711</guid>
		<description><![CDATA[I'm not very fond of the way that Marte Engine's Input checking occurs. It simplifies things a bit in one area and complicates things in all other areas. The simplification comes from the fact that one can list all the keys for a given action in the listener definition (define("name", keys...), and that is pretty [...]<p><a href="http://supremetechs.com/2012/03/03/marte-engine-define-check/">Marte Engine Define() and Check()</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I'm not very fond of the way that Marte Engine's Input checking occurs. It simplifies things a bit in one area and complicates things in all other areas. The simplification comes from the fact that one can list all the keys for a given action in the listener definition (define("name", keys...), and that is pretty helpful. </p>
<p>However there's something I don't really care for when it comes to the way Marte Engine handles keyboard input, namely, it's too fast. The key repeat becomes an issue when working with things like menus. </p>
<p>Disclaimer: I'm far from being a Java or game development guru. I'm merely pointing out that I ran into this issue. There could very well be a work-around for this within the Marte engine itself. I ran into this problem while trying to implement a main menu for a test game I was working on. When I would push a button, the menu selection cursor would jump to the bottom of the menu, which isn't at all what I wanted it to do.</p>
<p>The believe the reason for this is that the input definitions one can make with a define() method are set to handle only KeyDown events, while I needed a KeyPressed event. Since I could find no other way to force it to use a keypress instead of a keydown, I decided to remove my input event definitions and use a standard check on the input to see if a certain button has been pressed (down and released). This solved my issue with the key events. Now my menu cursor performs as expected.</p>
<p><a href="http://supremetechs.com/2012/03/03/marte-engine-define-check/">Marte Engine Define() and Check()</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://supremetechs.com/2012/03/03/marte-engine-define-check/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Marte Engine TextEntity setColor()</title>
		<link>http://supremetechs.com/2012/03/02/marte-engine-textentity-setcolor/</link>
		<comments>http://supremetechs.com/2012/03/02/marte-engine-textentity-setcolor/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 23:09:48 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[technology]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://supremetechs.com/?p=704</guid>
		<description><![CDATA[I've been focusing on learning Java game development over the last couple of weeks. I've found that lwjgl, Slick2d, and Marte Engine are great libraries to help with the basic game functionality. In fact, they take a lot of the work out of it and leave you to focus on the game design itself. For [...]<p><a href="http://supremetechs.com/2012/03/02/marte-engine-textentity-setcolor/">Marte Engine TextEntity setColor()</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I've been focusing on learning Java game development over the last couple of weeks. I've found that lwjgl, Slick2d, and Marte Engine are great libraries to help with the basic game functionality. In fact, they take a lot of the work out of it and leave you to focus on the game design itself. For instance, the Marte engine comes with a great resource manager class that helps keep up with images, sounds, and spritesheets for your game. Marte also has some good classes which extend Slick2D's Entity class which can be very useful. </p>
<p>The one I'm going to focus on is TextEntity, which is great for adding text to the screen. However, I was unable to change the text color for the text directly using the setColor() method from the Entity class, which is inherited by TextEntity. There's not a lot of documentation for either Slick2D or Marte, so I wasn't exactly sure if I was missing something or if I had found a problem with the class. </p>
<p>Fixing the problem is rather simple. I created a new class called MyText and copied everything over from the TextEntity class. I could have extended it, but instead I wanted a new class which extends Entity directly. Then I changed the code in the render() method as such:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> render<span style="color: #009900;">&#40;</span>GameContainer container, <span style="color: #003399;">Graphics</span> g<span style="color: #009900;">&#41;</span>	<span style="color: #000000; font-weight: bold;">throws</span> SlickException <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>font <span style="color: #339933;">==</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		font <span style="color: #339933;">=</span> container.<span style="color: #006633;">getDefaultFont</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">calculateHitBox</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	g.<span style="color: #006633;">setFont</span><span style="color: #009900;">&#40;</span>font<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>text <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		g.<span style="color: #006633;">setColor</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">getColor</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		g.<span style="color: #006633;">drawString</span><span style="color: #009900;">&#40;</span>text, x, y<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>I then added a new constructor that takes a color as the fifth parameter:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> MyText<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">float</span> x, <span style="color: #000066; font-weight: bold;">float</span> y, <span style="color: #003399;">Font</span> font, <span style="color: #003399;">String</span> text, <span style="color: #003399;">Color</span> color<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">super</span><span style="color: #009900;">&#40;</span>x,y<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">setColor</span><span style="color: #009900;">&#40;</span>color<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">font</span> <span style="color: #339933;">=</span> font<span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">setText</span><span style="color: #009900;">&#40;</span>text<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>This gave me the functionality I was after. This change basically just sets the graphics object color property to the Entity's color property, which is exactly how I thought it should have worked to begin with.</p>
<p>If there's a better way to accomplish this, let me know. I'm only intermediate with Java.</p>
<p><a href="http://supremetechs.com/2012/03/02/marte-engine-textentity-setcolor/">Marte Engine TextEntity setColor()</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://supremetechs.com/2012/03/02/marte-engine-textentity-setcolor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Slick 2D and lwjgl to Eclipse Project</title>
		<link>http://supremetechs.com/2012/02/23/adding-slick-2d-lwjgl-eclipse-project/</link>
		<comments>http://supremetechs.com/2012/02/23/adding-slick-2d-lwjgl-eclipse-project/#comments</comments>
		<pubDate>Fri, 24 Feb 2012 00:56:56 +0000</pubDate>
		<dc:creator>Randy</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[eclipse add lwjgl]]></category>
		<category><![CDATA[eclipse add slick]]></category>
		<category><![CDATA[lwjgl]]></category>
		<category><![CDATA[slick]]></category>
		<category><![CDATA[slick2d]]></category>

		<guid isPermaLink="false">http://supremetechs.com/?p=701</guid>
		<description><![CDATA[I spent some time today trying to get Slick and the light-weight java game library setup correctly in Eclipse. The tutorial I was watching was in Netbeans and I was very unfamiliar with adding libraries to a Java project in Eclipse (very familiar now). I'm going to go over how to do this as an [...]<p><a href="http://supremetechs.com/2012/02/23/adding-slick-2d-lwjgl-eclipse-project/">Adding Slick 2D and lwjgl to Eclipse Project</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></description>
			<content:encoded><![CDATA[<p>I spent some time today trying to get Slick and the light-weight java game library setup correctly in Eclipse. The tutorial I was watching was in Netbeans and I was very unfamiliar with adding libraries to a Java project in Eclipse (very familiar now). I'm going to go over how to do this as an overview, mainly just to remind me how to do it later hehe. It may also be of use to others who don't need a step by step picture guide of the process. So, here goes!</p>
<ol>
<li>Create a new project in Eclipse</li>
<li>Right-click the project and choose New -&gt; Folder (call it "lib")</li>
<li>Right-click the lib folder and choose Import... then General -&gt; File System</li>
<li>Browse to your slick folder and choose the slick.jar and the lwjgl.jar files.</li>
<li>Right-click on the project and choose Properties</li>
<li>Choose "Java Build Path" and click the "Libraries" tab</li>
<li>Click "Add Jars". It will show a tree of your project. Expand it till you see your lib folder. Expand it. Select the two jars (utilize shift for multiple selection). Click OK.</li>
<li>Click OK again to go out to the workspace.</li>
<li>Right-click on the lib folder and Import again. This time use "Archive File" instead of "File System". Click Next.</li>
<li>Browse to your slick lib folder and find "natives-win32.jar". Click open.</li>
<li>It will list some dlls on the right column. Make sure they are all checked and click finish.</li>
<li>Repeat steps 9-11 and add the natives for mac and <a href="http://supremetechs.com/category/operating-systems/linux-stuff/" >linux</a> the same way if you want them.</li>
<li>Now you need to add those natives to lwjgl. So...</li>
<li>Right-click on the project and choose properties.</li>
<li>In the Java Build Path -&gt; Libraries tab, expand lwjgw.jar and click on Native library location.</li>
<li>Click Edit. Click Workspace. Navigate to the lib folder, choose it, and click OK.</li>
<li>NOW ALMOST THERE!</li>
<li>Back in the Java Build Path -&gt; Libraries, expand slick.jar. Click JavaDoc location.</li>
<li>Click Edit. Set the javadoc location path to the location of the slick\javadoc folder.</li>
</ol>
<p>Step 20... Add a class to your project and see if it will compile correctly. Here's an example for testing.</p>
<p>GameTest.java</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
</pre></td><td class="code"><pre class="java" style="font-family:monospace;">&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.newdawn.slick.AppGameContainer</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.newdawn.slick.BasicGame</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.newdawn.slick.GameContainer</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.newdawn.slick.Graphics</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">org.newdawn.slick.SlickException</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Game <span style="color: #000000; font-weight: bold;">extends</span> BasicGame <span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> Game<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> title<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000000; font-weight: bold;">super</span><span style="color: #009900;">&#40;</span>title<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> SlickException <span style="color: #009900;">&#123;</span>
		AppGameContainer app <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> AppGameContainer<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Game<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Test Game&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		app.<span style="color: #006633;">start</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	@Override
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> render<span style="color: #009900;">&#40;</span>GameContainer container, <span style="color: #003399;">Graphics</span> g<span style="color: #009900;">&#41;</span>	<span style="color: #000000; font-weight: bold;">throws</span> SlickException <span style="color: #009900;">&#123;</span>
		g.<span style="color: #006633;">drawString</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Hello, World!&quot;</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	@Override
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> init<span style="color: #009900;">&#40;</span>GameContainer container<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> SlickException <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
&nbsp;
	@Override
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> update<span style="color: #009900;">&#40;</span>GameContainer container, <span style="color: #000066; font-weight: bold;">int</span> delta<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> SlickException <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p><a href="http://supremetechs.com/2012/02/23/adding-slick-2d-lwjgl-eclipse-project/">Adding Slick 2D and lwjgl to Eclipse Project</a> is a post from: <a href="http://supremetechs.com">SupremeTechs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://supremetechs.com/2012/02/23/adding-slick-2d-lwjgl-eclipse-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

