<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Ozzu Webmaster Forum</title>
		<description>Webmaster forums, headlines, tutorials, and information and resources for a professional webmaster, designer, programmer, and developer.</description>
		<link>http://www.ozzu.com/</link>
		<lastBuildDate>Tue, 21 May 2013 18:03:02 -0700</lastBuildDate>
				<item>
			<dc:creator>Zealous</dc:creator>
			<pubDate>Mon, 20 May 2013 05:27:59 -0700</pubDate>
			<guid>http://www.ozzu.com/programming-forum/need-alter-theme-with-featured-pictures-t108270.html</guid>
			<link>http://www.ozzu.com/programming-forum/need-alter-theme-with-featured-pictures-t108270.html</link>
			<title>Need to alter Wp theme with 2 featured pictures</title>
			<description><![CDATA[I have a theme and i need to make some alterations now there is 2 things i can do is make a new template with the slider or have a re-sized image for the posts. <br /><br />If you check the link there is a slider up top which has a 800x306 image attached to it then still on the index there is posts feed with the same image but the display is way off and just does not look good.<br /><br />I am trying to track down a way on how to use a smaller image for the post feed and still keep the same slider image size.<br /><br />Reference site: <!-- m --><span class="postlink">http://dev.zday.com.au/</span><!-- m --><br /><br />any help or ideas would be much appreciated.]]>&lt;br /&gt;&lt;br /&gt;Topic Replies: 0</description>
		</item>
				<item>
			<dc:creator>Kurthead+1</dc:creator>
			<pubDate>Sun, 19 May 2013 05:41:00 -0700</pubDate>
			<guid>http://www.ozzu.com/programming-forum/loop-t108268.html</guid>
			<link>http://www.ozzu.com/programming-forum/loop-t108268.html</link>
			<title>ie 8 loop</title>
			<description><![CDATA[Is there any specific reason this shouldnt work in IE8? Because it works in all other browsers. Says that the clear1 array is undefined, which it is.<br /><br /><p>javascript:</p><pre style="border:1px solid #000000; background-color:#eeeeee;"><br />      for(z=0;z&lt;=clear1.length;z++)<br />	     {<br />		 clear1&#91;z&#93;.checked = false;<br />             }<br />		 <br /></pre><br /><br />Ive tried defining it both ways<br /><p>javascript:</p><pre style="border:1px solid #000000; background-color:#eeeeee;"><br />clear1 = new Array(a,b,c,d,e,f,g,h,i,j,k,l,m,n);<br />clear1 = &#91;a,b,c,d,e,f,g,h,i,j,k,l,m,n&#93;;<br /></pre><br />Those letters are variables by the way.]]>&lt;br /&gt;&lt;br /&gt;Topic Replies: 1</description>
		</item>
				<item>
			<dc:creator>Kurthead+1</dc:creator>
			<pubDate>Sat, 18 May 2013 09:45:29 -0700</pubDate>
			<guid>http://www.ozzu.com/programming-forum/target-php-form-action-t108266.html</guid>
			<link>http://www.ozzu.com/programming-forum/target-php-form-action-t108266.html</link>
			<title>target php form action [solved]</title>
			<description><![CDATA[Can I make a php file for a form open in a new window instead of a tab? Its a form action php file; method post, etc. I couldnt really find any way to make it open in a new window rather than tab.]]>&lt;br /&gt;&lt;br /&gt;Topic Replies: 4</description>
		</item>
				<item>
			<dc:creator>Kurthead+1</dc:creator>
			<pubDate>Sat, 18 May 2013 02:12:01 -0700</pubDate>
			<guid>http://www.ozzu.com/programming-forum/pop-ups-t108265.html</guid>
			<link>http://www.ozzu.com/programming-forum/pop-ups-t108265.html</link>
			<title>pop ups</title>
			<description><![CDATA[I was trying to make a &quot;thank you&quot; popup window with JavaScript that executes when a form submits to a php file. It was such a hassle and when I finally got it work, aspects of it still didnt work the way I wanted, and I realized I could just make a fixed position, invisible div that becomes visible when the submit button is pressed. Is there any reason I shouldnt do this? Proper CSS can make it look just like a popup window.]]>&lt;br /&gt;&lt;br /&gt;Topic Replies: 11</description>
		</item>
				<item>
			<dc:creator>ScottG</dc:creator>
			<pubDate>Wed, 15 May 2013 10:28:04 -0700</pubDate>
			<guid>http://www.ozzu.com/programming-forum/this-random-t108260.html</guid>
			<link>http://www.ozzu.com/programming-forum/this-random-t108260.html</link>
			<title>Ok so this is random</title>
			<description><![CDATA[Sometimes Im torn between decisions when this usually happens I leave it up to a coin flip. When I flip a coin I do a best 2 of 3 of 2 of 3. <br /><br />example of 2 of 3 of 2 of 3<br />1) heads<br />2) heads<br /><br />HEADS!<br /><br />3) tails<br />4) heads<br />5) tails<br /><br />TAILS!<br /><br />6) tails<br />7) heads<br />8) tails<br /><br />TAILS!<br /><br />So I go with tails.<br /><br />So whats the point? The point is today I was bored and couldnt make a decision at work so I wrote a program that will &quot;Filp&quot; a coin 10,000 times it will then spit out the number of times it lands on yes and no, i used that instead of heads and tails. it also tells the percentage it landed on yes and no. <br /><br />Also if shows what the first flip was and the first 2 out of three results as well as the the 2 of 3 of 2 of 3, but I didnt stop there I also added in the best 3 of 5 and 3 of 5 of 3 of 5.<br /><br />This was done in PHP<br /><p>php:</p><pre style="border:1px solid #000000; background-color:#eeeeee;"><br />&lt;?php<br /><br />// Number of flips<br />$NoF = 10000;<br /><br />// Make an array to hold the counts<br />$counts = array(&quot;yes&quot; =&gt; 0, &quot;no&quot; =&gt; 0);<br /><br />// First toss<br />$tosses = array();<br /><br />// 2 of 3<br />$best_2_of_3 = array(&quot;yes&quot; =&gt; 0, &quot;no&quot; =&gt; 0);<br /><br />// 3 by 3<br />$best_3_by_3 = array(&quot;yes&quot; =&gt; 0, &quot;no&quot; =&gt; 0);<br /><br />// 3 of 5<br />$best_3_of_5 = array(&quot;yes&quot; =&gt; 0, &quot;no&quot; =&gt; 0);<br /><br />// 5 by 5<br />$best_5_by_5 = array(&quot;yes&quot; =&gt; 0, &quot;no&quot; =&gt; 0);<br /><br />// Start Fliping out<br />for($i=0; $i&lt;$NoF; $i++) {<br />	<br />	// Do a rand and check the answer<br />	if(rand(0, 1)) {<br />		<br />		// Add to yes<br />		$counts&#91;yes&#93;++;<br />		<br />		// Add to the 2 of 3 and 3 of 5<br />		$best_2_of_3&#91;yes&#93;++;<br />		$best_3_of_5&#91;yes&#93;++;<br />		<br />		<br />	} else {<br />		<br />		// Add to no<br />		$counts&#91;no&#93;++;<br />		<br />		// Add to the 2 of 3 and 3 of 5<br />		$best_2_of_3&#91;no&#93;++;<br />		$best_3_of_5&#91;no&#93;++;<br />		<br />	}<br />	<br />	// Check for first toss<br />	if(empty($tosses&#91;first&#93;)) {<br />		<br />		// Set the $first_toss<br />		$tosses&#91;first&#93; = (!empty($counts&#91;yes&#93;) ? Yes: No);<br />		<br />	}<br />	<br />	// Check for 3by3<br />	if(empty($tosses&#91;3by3&#93;)) {<br />		<br />		// Check the count of the 2 of 3<br />		if($best_2_of_3&#91;yes&#93; == 2 || $best_2_of_3&#91;no&#93; == 2) {<br />			<br />			// Figure out if it is yes or no<br />			$result = ($best_2_of_3&#91;yes&#93; == 2) ? yes : no;<br />			<br />			// Check for first grouping<br />			if(empty($tosses&#91;2of3&#93;)) {<br />				<br />				// Set the 2 of 3<br />				$tosses&#91;2of3&#93; = ucwords($result);<br />				<br />			}<br />			<br />			// Add to the $best_3_by_3<br />			$best_3_by_3&#91;$result&#93;++;<br />			<br />			// Reset the $best_2_of_3<br />			$best_2_of_3&#91;yes&#93; = 0;<br />			$best_2_of_3&#91;no&#93; = 0;<br />			<br />			// Check the 3by3<br />			if($best_3_by_3&#91;yes&#93; == 2 || $best_3_by_3&#91;no&#93; == 2) {<br />				<br />				// Figure out if it is yes or no<br />				$result = ($best_3_by_3&#91;yes&#93; == 2) ? yes : no;<br />					<br />				// Set the 3 by 3<br />				$tosses&#91;3by3&#93; = ucwords($result); <br />				<br />			}<br />			<br />		}<br />		<br />	}<br />	<br />	// Check for 5by5<br />	if(empty($tosses&#91;5by5&#93;)) {<br />		<br />		// Check the count of the 3 of 5<br />		if($best_3_of_5&#91;yes&#93; == 3 || $best_3_of_5&#91;no&#93; == 3) {<br />			<br />			// Figure out if it is yes or no<br />			$result = ($best_3_of_5&#91;yes&#93; == 3) ? yes : no;<br />			<br />			// Check for first grouping<br />			if(empty($tosses&#91;3of5&#93;)) {<br />				<br />				// Set the 2 of 3<br />				$tosses&#91;3of5&#93; = ucwords($result);<br />				<br />			}<br />			<br />			// Add to the $best_5_by_5<br />			$best_5_by_5&#91;$result&#93;++;<br />			<br />			// Reset the $best_3_of_5<br />			$best_3_of_5&#91;yes&#93; = 0;<br />			$best_3_of_5&#91;no&#93; = 0;<br />			<br />			// Check the 3by3<br />			if($best_5_by_5&#91;yes&#93; == 3 || $best_5_by_5&#91;no&#93; == 3) {<br />				<br />				// Figure out if it is yes or no<br />				$result = ($best_5_by_5&#91;yes&#93; == 2) ? yes : no;<br />					<br />				// Set the 5 by 5<br />				$tosses&#91;5by5&#93; = ucwords($result);<br />				<br />			}<br />			<br />		}<br />		<br />	}<br />	<br />}<br /><br />// Total counts<br />$total_counts = $counts&#91;yes&#93; + $counts&#91;no&#93;;<br /><br />// Calculate percentages<br />$percents = array(&quot;yes&quot; =&gt; (($counts&#91;yes&#93;/$total_counts) * 100), &quot;no&quot; =&gt; (($counts&#91;no&#93;/$total_counts) * 100))<br /><br />?&gt;<br /><br /><br />&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;<br />&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;<br />&lt;head&gt;<br />&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;<br />&lt;title&gt;Decisions Decisions&lt;/title&gt;<br />&lt;style type=&quot;text/css&quot;&gt;<br /><br />span.result {<br />	font-weight:bold;<br />	color:#F00;<br />}<br /><br />&lt;/style&gt;<br />&lt;/head&gt;<br /><br />&lt;body&gt;<br />&lt;strong&gt;Results&lt;/strong&gt;<br />&lt;br /&gt;<br />The coin was flipped &lt;span class=&quot;result&quot;&gt;&lt;?php echo $total_counts; ?&gt;&lt;/span&gt; times. It landed on &lt;strong&gt;Yes&lt;/strong&gt; &lt;span class=&quot;result&quot;&gt;&lt;?php echo $counts&#91;yes&#93;; ?&gt;&lt;/span&gt; times and &lt;strong&gt;No&lt;/strong&gt; &lt;span class=&quot;result&quot;&gt;&lt;?php echo $counts&#91;no&#93;; ?&gt;&lt;/span&gt; times.&lt;br /&gt;<br />&lt;br /&gt;<br />Percents&lt;br /&gt;<br />&lt;strong&gt;Yes&lt;/strong&gt; = &lt;span class=&quot;result&quot;&gt;&lt;?php echo $percents&#91;yes&#93;; ?&gt;&lt;br /&gt;&lt;/span&gt;<br />&lt;strong&gt;No&lt;/strong&gt; = &lt;span class=&quot;result&quot;&gt;&lt;?php echo $percents&#91;no&#93;; ?&gt;&lt;br /&gt;&lt;/span&gt;<br />&lt;br /&gt;<br />&lt;strong&gt;First Toss&lt;/strong&gt; &lt;span class=&quot;result&quot;&gt;&lt;?php echo $tosses&#91;first&#93;; ?&gt;&lt;/span&gt;<br />&lt;br /&gt;<br />&lt;strong&gt;Best 2 of 3&lt;/strong&gt; &lt;span class=&quot;result&quot;&gt;&lt;?php echo $tosses&#91;2of3&#93;; ?&gt;&lt;/span&gt;<br />&lt;br /&gt;<br />&lt;strong&gt;Best 3 by 3&lt;/strong&gt; &lt;span class=&quot;result&quot;&gt;&lt;?php echo $tosses&#91;3by3&#93;; ?&gt;&lt;/span&gt;<br />&lt;br /&gt;<br />&lt;strong&gt;Best 3 of 5&lt;/strong&gt; &lt;span class=&quot;result&quot;&gt;&lt;?php echo $tosses&#91;3of5&#93;; ?&gt;&lt;/span&gt;<br />&lt;br /&gt;<br />&lt;strong&gt;Best 5 by 5&lt;/strong&gt; &lt;span class=&quot;result&quot;&gt;&lt;?php echo $tosses&#91;5by5&#93;; ?&gt;&lt;/span&gt;<br /><br />&lt;/body&gt;<br />&lt;/html&gt;<br /></pre>]]>&lt;br /&gt;&lt;br /&gt;Topic Replies: 5</description>
		</item>
				<item>
			<dc:creator>Kurthead+1</dc:creator>
			<pubDate>Sat, 11 May 2013 02:58:42 -0700</pubDate>
			<guid>http://www.ozzu.com/programming-forum/php-operator-t108256.html</guid>
			<link>http://www.ozzu.com/programming-forum/php-operator-t108256.html</link>
			<title>PHP Operator</title>
			<description><![CDATA[Im trying to discern what the role of &quot;-&gt;&quot; is in this code. My indecisive interpretation is that &quot;-&gt;&quot; pushes the variable &quot;$a&quot;, which holds the parameter of the of the Exception into the &quot;getMessage()&quot; parameter. The tutorial doesnt elaborate.<br /><br />Also, Im curious how the syntax of the catch parameter &quot;(Exception $a)&quot; works. How the variable is just placed next to &quot;Exception&quot; rather than divided as in other parameters. I just havent seen anything coded like that in the earlier tutorial chapters, so it undermines my understanding of the rules. Basically Im asking &quot;What rule does this syntax follow?&quot; Or what are the guild-lines for this type of syntax. Thanks in advance. All of my question pertains to lines 17-19.<br /><br />(Also, sorry in advance, I explained my query to the best of my abilities and it still seems a little muddy)<br /><br /><p>php:</p><pre style="border:1px solid #000000; background-color:#eeeeee;"><br />&lt;?php<br />function checkNum($number)<br />   {<br />   if($number&gt;1)<br />      {<br />      throw new Exception(&quot;Value must be 1 or below&quot;);<br />      }<br />   return true;<br />   }<br /><br />try<br />   {<br />   checkNum(2);<br />   echo &quot;If you see this, the number is too low&quot;;<br />   }<br /><br />catch (Exception $a)<br />   {<br />   echo &quot;Message: &quot;.$a-&gt;getMessage();<br />   }<br />?&gt;<br /></pre>]]>&lt;br /&gt;&lt;br /&gt;Topic Replies: 1</description>
		</item>
				<item>
			<dc:creator>Zwirko</dc:creator>
			<pubDate>Wed, 08 May 2013 04:48:04 -0700</pubDate>
			<guid>http://www.ozzu.com/programming-forum/php-array-foreach-t108251.html</guid>
			<link>http://www.ozzu.com/programming-forum/php-array-foreach-t108251.html</link>
			<title>PHP array, foreach</title>
			<description><![CDATA[I have some image data stored in an array, usually 0-5 images, like this:<br /><br /><p>php:</p><pre style="border:1px solid #000000; background-color:#eeeeee;"><br />$gallery = array( <br />  array( <br />         &quot;href&quot; =&gt; &quot;large1.jpg&quot;,<br />          &quot;img&quot; =&gt; &quot;&lt;img src=&quot;img/1.jpg&quot;&quot;, <br />          &quot;rel&quot; =&gt; &quot;lightbox&quot;,<br />        &quot;title&quot; =&gt; &quot;image title 1&quot;,<br />       &quot;photographer&quot; =&gt; &quot;P. Griffin&quot;,<br />       &quot;date&quot; =&gt; &quot;23 June 1972&quot;,<br />       &quot;copyright&quot; =&gt; &quot;cc-by-sa 3.0&quot;,<br />        ),<br />  <br />  array( <br />         &quot;href&quot; =&gt; &quot;large2.jpg&quot;,<br />          &quot;img&quot; =&gt; &quot;&lt;img src=&quot;img/2.jpg&quot;&quot;, <br />          &quot;rel&quot; =&gt; &quot;lightbox&quot;,<br />        &quot;title&quot; =&gt; &quot;image title 2&quot;,<br />       &quot;photographer&quot; =&gt; &quot;P. Griffin&quot;,<br />       &quot;date&quot; =&gt; &quot;23 June 1972&quot;,<br />       &quot;copyright&quot; =&gt; &quot;cc-by-sa 3.0&quot;,<br />        ),<br /><br />  array( <br />         &quot;href&quot; =&gt; &quot;large3.jpg&quot;,<br />          &quot;img&quot; =&gt; &quot;&lt;img src=&quot;img/3.jpg&quot;&quot;, <br />          &quot;rel&quot; =&gt; &quot;lightbox&quot;,<br />        &quot;title&quot; =&gt; &quot;image title 3&quot;,<br />       &quot;photographer&quot; =&gt; &quot;P. Griffin&quot;,<br />       &quot;date&quot; =&gt; &quot;23 June 1972&quot;,<br />       &quot;copyright&quot; =&gt; &quot;cc-by-sa 3.0&quot;,<br />        ),<br />        <br />        ....<br />        <br />             ); <br /></pre><br /><br />Im trying to get these images and data in to an unordered list that looks like this:   <br />      <br /><p>html:</p><pre style="border:1px solid #000000; background-color:#eeeeee;">    <br />&lt;ul&gt;<br />&lt;li&gt;&lt;a href=&quot;large1.php&quot; rel=&quot;lightbox&quot; title=&quot;image title 1&quot;&gt;&lt;img src=&quot;img/1.jpg alt=&quot;&quot;/&gt;&lt;br&gt;<br />P. Griffin, 23 June 1972, cc-by-sa 3.0.&lt;/li&gt;<br /><br />&lt;li&gt; ... etc<br /> <br />&lt;/ul&gt;<br /><br /></pre><br /><br />What I have so far (obviously not very smart) is just putting each piece of info in to its own &lt;li&gt;&lt;/li&gt;<br /><br /><p>php:</p><pre style="border:1px solid #000000; background-color:#eeeeee;"><br /><br />    foreach($gallery&#91;$row&#93; as $key =&gt; $value)<br />    {<br />        echo &quot;&lt;li&gt;&quot;.$value.&quot;&lt;/li&gt;&quot;;<br />    }<br /></pre><br /><br />Any ideas how to do this?]]>&lt;br /&gt;&lt;br /&gt;Topic Replies: 3</description>
		</item>
				<item>
			<dc:creator>jordonshaw</dc:creator>
			<pubDate>Tue, 07 May 2013 20:16:30 -0700</pubDate>
			<guid>http://www.ozzu.com/programming-forum/help-with-opening-file-from-putty-text-editor-t108250.html</guid>
			<link>http://www.ozzu.com/programming-forum/help-with-opening-file-from-putty-text-editor-t108250.html</link>
			<title>Help with Opening file from Putty in Text editor</title>
			<description><![CDATA[Ive been doing PHP programming for a while; however, I have never used Linux.  The company that Im starting to work for has their webserver setup running Linux, using a LAMP stack for their webserver.  I can connect to the server using Putty and get to the web files; however, how do I then open the PHP file in my text editor to be able to modify the programming?  Sorry, Linux is very new to me!<br /><br />Thanks]]>&lt;br /&gt;&lt;br /&gt;Topic Replies: 0</description>
		</item>
				<item>
			<dc:creator>vadimak17</dc:creator>
			<pubDate>Sat, 04 May 2013 16:30:17 -0700</pubDate>
			<guid>http://www.ozzu.com/programming-forum/how-code-this-t108248.html</guid>
			<link>http://www.ozzu.com/programming-forum/how-code-this-t108248.html</link>
			<title>How to code this ?</title>
			<description><![CDATA[Hello<br />i need to make a cash register but i dont know how to do it.<br />i was thinking about to make it in loop but i dont know how to make its. i need to input a barcode of product each barcode has price an stock level. In the loop i will input a barcode all the time untile i input &quot;Done&quot; and then it will out put me total price and show me how mach  left in the stok.<br /><br />abd i was thinking do make it in dicturiany but i dont know how to make the program take out the price.<br /><br />Thank for any help ;D<br />in Python 2.7.3]]>&lt;br /&gt;&lt;br /&gt;Topic Replies: 19</description>
		</item>
				<item>
			<dc:creator>Kurthead+1</dc:creator>
			<pubDate>Thu, 02 May 2013 21:27:21 -0700</pubDate>
			<guid>http://www.ozzu.com/programming-forum/javascript-t108246.html</guid>
			<link>http://www.ozzu.com/programming-forum/javascript-t108246.html</link>
			<title>JavaScript in IE</title>
			<description><![CDATA[Im testing my cross-browser compatibility in IE8. Its a 3 part calculator and all of the functions work except for the third part. I dont want to post the code, because its a lot, but I will if its necessary. First I just wanted to find out what are some common reasons that a JS function will work perfectly in FireFox and not work in IE8.]]>&lt;br /&gt;&lt;br /&gt;Topic Replies: 6</description>
		</item>
			</channel>
</rss>