<?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>Robert Mullaney&#039;s Blog</title>
	<atom:link href="http://www.robertmullaney.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.robertmullaney.com</link>
	<description>PHP, MySQL, HTML, CSS, jQuery and More!</description>
	<lastBuildDate>Sat, 19 May 2012 19:42:00 +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>Number Pad (NumLock On) ASCII ALT Key Character Codes</title>
		<link>http://www.robertmullaney.com/2012/05/19/number-pad-numlock-ascii-alt-key-character-codes/</link>
		<comments>http://www.robertmullaney.com/2012/05/19/number-pad-numlock-ascii-alt-key-character-codes/#comments</comments>
		<pubDate>Sat, 19 May 2012 19:41:26 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[ascii]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=644</guid>
		<description><![CDATA[Just a quick reference list for numeric pad key sequences for typing ASCII characters not found on the keyboard. All you have to do is turn NumLock on, hold the ALT key, type the desired number, then let go of the ALT key. Have fun ASCII Codes 1 2 3 4 5 6 7 8 [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick reference list for numeric pad key sequences for typing ASCII characters not found on the keyboard.</p>
<p>All you have to do is turn NumLock on, hold the ALT key, type the desired number, then let go of the ALT key. Have fun <img src='http://www.robertmullaney.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<table id="asciiCodes" summary="Number Pad ASCII Character Codes" border="1">
<caption>ASCII Codes</caption>
<tbody>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
</tr>
<tr>
<td>☺</td>
<td>☻</td>
<td>♥</td>
<td>♦</td>
<td>♣</td>
<td>♠</td>
<td>•</td>
<td>◘</td>
<td>○</td>
<td>◙</td>
<td>♂</td>
<td>♀</td>
<td>♪</td>
<td>♫</td>
<td>☼</td>
<td>►</td>
</tr>
<tr>
<td>17</td>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
<td>26</td>
<td>27</td>
<td>28</td>
<td>29</td>
<td>30</td>
<td>31</td>
<td>32</td>
</tr>
<tr>
<td>◄</td>
<td>↕</td>
<td>‼</td>
<td>¶</td>
<td>§</td>
<td>▬</td>
<td>↨</td>
<td>↑</td>
<td>↓</td>
<td>→</td>
<td>←</td>
<td>∟</td>
<td>↔</td>
<td>▲</td>
<td>▼</td>
<td></td>
</tr>
<tr>
<td>33</td>
<td>34</td>
<td>35</td>
<td>36</td>
<td>37</td>
<td>38</td>
<td>39</td>
<td>40</td>
<td>41</td>
<td>42</td>
<td>43</td>
<td>44</td>
<td>45</td>
<td>46</td>
<td>47</td>
<td>48</td>
</tr>
<tr>
<td>!</td>
<td>&#8220;</td>
<td>#</td>
<td>$</td>
<td>%</td>
<td>&amp;</td>
<td>&#8216;</td>
<td>(</td>
<td>)</td>
<td>*</td>
<td>+</td>
<td>,</td>
<td>-</td>
<td>.</td>
<td>/</td>
<td>0</td>
</tr>
<tr>
<td>49</td>
<td>50</td>
<td>51</td>
<td>52</td>
<td>53</td>
<td>54</td>
<td>55</td>
<td>56</td>
<td>57</td>
<td>58</td>
<td>59</td>
<td>60</td>
<td>61</td>
<td>62</td>
<td>63</td>
<td>64</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>:</td>
<td>;</td>
<td>&lt;</td>
<td>=</td>
<td>&gt;</td>
<td>?</td>
<td>@</td>
</tr>
<tr>
<td>65</td>
<td>66</td>
<td>67</td>
<td>68</td>
<td>69</td>
<td>70</td>
<td>71</td>
<td>72</td>
<td>73</td>
<td>74</td>
<td>75</td>
<td>76</td>
<td>77</td>
<td>78</td>
<td>79</td>
<td>80</td>
</tr>
<tr>
<td>A</td>
<td>B</td>
<td>C</td>
<td>D</td>
<td>E</td>
<td>F</td>
<td>G</td>
<td>H</td>
<td>I</td>
<td>J</td>
<td>K</td>
<td>L</td>
<td>M</td>
<td>N</td>
<td>O</td>
<td>P</td>
</tr>
<tr>
<td>81</td>
<td>82</td>
<td>83</td>
<td>84</td>
<td>85</td>
<td>86</td>
<td>87</td>
<td>88</td>
<td>89</td>
<td>90</td>
<td>91</td>
<td>92</td>
<td>93</td>
<td>94</td>
<td>95</td>
<td>96</td>
</tr>
<tr>
<td>Q</td>
<td>R</td>
<td>S</td>
<td>T</td>
<td>U</td>
<td>V</td>
<td>W</td>
<td>X</td>
<td>Y</td>
<td>Z</td>
<td>[</td>
<td>\</td>
<td>]</td>
<td>^</td>
<td>_</td>
<td>`</td>
</tr>
<tr>
<td>97</td>
<td>98</td>
<td>99</td>
<td>100</td>
<td>101</td>
<td>102</td>
<td>103</td>
<td>104</td>
<td>105</td>
<td>106</td>
<td>107</td>
<td>108</td>
<td>109</td>
<td>110</td>
<td>111</td>
<td>112</td>
</tr>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
<td>d</td>
<td>e</td>
<td>f</td>
<td>g</td>
<td>h</td>
<td>i</td>
<td>j</td>
<td>k</td>
<td>l</td>
<td>m</td>
<td>n</td>
<td>o</td>
<td>p</td>
</tr>
<tr>
<td>113</td>
<td>114</td>
<td>115</td>
<td>116</td>
<td>117</td>
<td>118</td>
<td>119</td>
<td>120</td>
<td>121</td>
<td>122</td>
<td>123</td>
<td>124</td>
<td>125</td>
<td>126</td>
<td>127</td>
<td>128</td>
</tr>
<tr>
<td>q</td>
<td>r</td>
<td>s</td>
<td>t</td>
<td>u</td>
<td>v</td>
<td>w</td>
<td>x</td>
<td>y</td>
<td>z</td>
<td>{</td>
<td>|</td>
<td>}</td>
<td>~</td>
<td>⌂</td>
<td>Ç</td>
</tr>
<tr>
<td>129</td>
<td>130</td>
<td>131</td>
<td>132</td>
<td>133</td>
<td>134</td>
<td>135</td>
<td>136</td>
<td>137</td>
<td>138</td>
<td>139</td>
<td>140</td>
<td>141</td>
<td>142</td>
<td>143</td>
<td>144</td>
</tr>
<tr>
<td>ü</td>
<td>é</td>
<td>â</td>
<td>ä</td>
<td>à</td>
<td>å</td>
<td>ç</td>
<td>ê</td>
<td>ë</td>
<td>è</td>
<td>ï</td>
<td>î</td>
<td>ì</td>
<td>Ä</td>
<td>Å</td>
<td>É</td>
</tr>
<tr>
<td>145</td>
<td>146</td>
<td>147</td>
<td>148</td>
<td>149</td>
<td>150</td>
<td>151</td>
<td>152</td>
<td>153</td>
<td>154</td>
<td>155</td>
<td>156</td>
<td>157</td>
<td>158</td>
<td>159</td>
<td>160</td>
</tr>
<tr>
<td>æ</td>
<td>Æ</td>
<td>ô</td>
<td>ö</td>
<td>ò</td>
<td>û</td>
<td>ù</td>
<td>ÿ</td>
<td>Ö</td>
<td>Ü</td>
<td>¢</td>
<td>£</td>
<td>¥</td>
<td>₧</td>
<td>ƒ</td>
<td>á</td>
</tr>
<tr>
<td>161</td>
<td>162</td>
<td>163</td>
<td>164</td>
<td>165</td>
<td>166</td>
<td>167</td>
<td>168</td>
<td>169</td>
<td>170</td>
<td>171</td>
<td>172</td>
<td>173</td>
<td>174</td>
<td>175</td>
<td>176</td>
</tr>
<tr>
<td>í</td>
<td>ó</td>
<td>ú</td>
<td>ñ</td>
<td>Ñ</td>
<td>ª</td>
<td>º</td>
<td>¿</td>
<td>⌐</td>
<td>¬</td>
<td>½</td>
<td>¼</td>
<td>¡</td>
<td>«</td>
<td>»</td>
<td>░</td>
</tr>
<tr>
<td>177</td>
<td>178</td>
<td>179</td>
<td>180</td>
<td>181</td>
<td>182</td>
<td>183</td>
<td>184</td>
<td>185</td>
<td>186</td>
<td>187</td>
<td>188</td>
<td>189</td>
<td>190</td>
<td>191</td>
<td>192</td>
</tr>
<tr>
<td>▒</td>
<td>▓</td>
<td>│</td>
<td>┤</td>
<td>╡</td>
<td>╢</td>
<td>╖</td>
<td>╕</td>
<td>╣</td>
<td>║</td>
<td>╗</td>
<td>╝</td>
<td>╜</td>
<td>╛</td>
<td>┐</td>
<td>└</td>
</tr>
<tr>
<td>193</td>
<td>194</td>
<td>195</td>
<td>196</td>
<td>197</td>
<td>198</td>
<td>199</td>
<td>200</td>
<td>201</td>
<td>202</td>
<td>203</td>
<td>204</td>
<td>205</td>
<td>206</td>
<td>207</td>
<td>208</td>
</tr>
<tr>
<td>┴</td>
<td>┬</td>
<td>├</td>
<td>─</td>
<td>┼</td>
<td>╞</td>
<td>╟</td>
<td>╚</td>
<td>╔</td>
<td>╩</td>
<td>╦</td>
<td>╠</td>
<td>═</td>
<td>╬</td>
<td>╧</td>
<td>╨</td>
</tr>
<tr>
<td>209</td>
<td>210</td>
<td>211</td>
<td>212</td>
<td>213</td>
<td>214</td>
<td>215</td>
<td>216</td>
<td>217</td>
<td>218</td>
<td>219</td>
<td>220</td>
<td>221</td>
<td>222</td>
<td>223</td>
<td>224</td>
</tr>
<tr>
<td>╤</td>
<td>╥</td>
<td>╙</td>
<td>╘</td>
<td>╒</td>
<td>╓</td>
<td>╫</td>
<td>╪</td>
<td>┘</td>
<td>┌</td>
<td>█</td>
<td>▄</td>
<td>▌</td>
<td>▐</td>
<td>▀</td>
<td>α</td>
</tr>
<tr>
<td>225</td>
<td>226</td>
<td>227</td>
<td>228</td>
<td>229</td>
<td>230</td>
<td>231</td>
<td>232</td>
<td>233</td>
<td>234</td>
<td>235</td>
<td>236</td>
<td>237</td>
<td>238</td>
<td>239</td>
<td>240</td>
</tr>
<tr>
<td>ß</td>
<td>Γ</td>
<td>π</td>
<td>Σ</td>
<td>σ</td>
<td>µ</td>
<td>τ</td>
<td>Φ</td>
<td>Θ</td>
<td>Ω</td>
<td>δ</td>
<td>∞</td>
<td>φ</td>
<td>ε</td>
<td>∩</td>
<td>≡</td>
</tr>
<tr>
<td>241</td>
<td>242</td>
<td>243</td>
<td>244</td>
<td>245</td>
<td>246</td>
<td>247</td>
<td>248</td>
<td>249</td>
<td>250</td>
<td>251</td>
<td>252</td>
<td>253</td>
<td>254</td>
<td>255</td>
<td></td>
</tr>
<tr>
<td>±</td>
<td>≥</td>
<td>≤</td>
<td>⌠</td>
<td>⌡</td>
<td>÷</td>
<td>≈</td>
<td>°</td>
<td>∙</td>
<td>·</td>
<td>√</td>
<td>ⁿ</td>
<td>²</td>
<td>■</td>
<td></td>
<td></td>
</tr>
<tr>
<td>02222</td>
<td>0169</td>
<td>0153</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>®</td>
<td>©</td>
<td>™</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2012/05/19/number-pad-numlock-ascii-alt-key-character-codes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use .htaccess to force SSL and WWW prefix</title>
		<link>http://www.robertmullaney.com/2012/05/09/htaccess-force-ssl-www-prefix/</link>
		<comments>http://www.robertmullaney.com/2012/05/09/htaccess-force-ssl-www-prefix/#comments</comments>
		<pubDate>Wed, 09 May 2012 14:53:19 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=642</guid>
		<description><![CDATA[Just a quick snippet showing how to force the HTTPS protocol (SSL) and the &#8220;www&#8221; sub-domain&#8230; RewriteEngine On RewriteCond %{SERVER_PORT} 80 [OR] RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ https://www.mydomain.com/$1 [R=301,L] There are other ways to achieve the same result, but I find this method is clean and requires the least amount of overhead to incorporate.]]></description>
			<content:encoded><![CDATA[<p>Just a quick snippet showing how to force the HTTPS protocol (SSL) and the &#8220;www&#8221; sub-domain&#8230;</p>
<p><code>RewriteEngine On<br />
RewriteCond %{SERVER_PORT} 80 [OR]<br />
RewriteCond %{HTTP_HOST} !^www\. [NC]<br />
RewriteRule ^(.*)$ https://www.<span style="color: #ff0000;">mydomain.com</span>/$1 [R=301,L]</code></p>
<p>There are other ways to achieve the same result, but I find this method is clean and requires the least amount of overhead to incorporate.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2012/05/09/htaccess-force-ssl-www-prefix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find all files and directories with specific permissions (eg: CHMOD) using LS and GREP commands on Linux</title>
		<link>http://www.robertmullaney.com/2012/03/26/find-files-directories-permissions-chmod-ls-grep-commands-linux/</link>
		<comments>http://www.robertmullaney.com/2012/03/26/find-files-directories-permissions-chmod-ls-grep-commands-linux/#comments</comments>
		<pubDate>Mon, 26 Mar 2012 17:33:21 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=632</guid>
		<description><![CDATA[Just a quick snippet that I used today to find all files/folders with specific permissions in a directory before moving a site from a development server to a production environment&#8230; ls -Rl &#124; grep -i 'rwxrwxrwx' Note: The example above looks for all files and directories with maxed out (eg: 0777) permissions]]></description>
			<content:encoded><![CDATA[<p>Just a quick snippet that I used today to find all files/folders with specific permissions in a directory before moving a site from a development server to a production environment&#8230;</p>
<pre>ls -Rl | grep -i 'rwxrwxrwx'</pre>
<p>Note: The example above looks for all files and directories with maxed out (eg: 0777) permissions <img src='http://www.robertmullaney.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2012/03/26/find-files-directories-permissions-chmod-ls-grep-commands-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Riding on the dragon (2010/2011)</title>
		<link>http://www.robertmullaney.com/2012/03/13/riding-on-the-dragon-2010-2011/</link>
		<comments>http://www.robertmullaney.com/2012/03/13/riding-on-the-dragon-2010-2011/#comments</comments>
		<pubDate>Tue, 13 Mar 2012 19:28:27 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=630</guid>
		<description><![CDATA[Someone asked me to upload some pics of me on the dragon &#8211; US 129 @ NC/TN state line  ]]></description>
			<content:encoded><![CDATA[<p>Someone asked me to upload some pics of me on the dragon &#8211; US 129 @ NC/TN state line <img src='http://www.robertmullaney.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.robertmullaney.com/wp-content/uploads/2012/01/KEN_5148.jpg"><img class="alignnone size-thumbnail wp-image-611" title="KEN_5148" src="http://www.robertmullaney.com/wp-content/uploads/2012/01/KEN_5148-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://www.robertmullaney.com/wp-content/uploads/2012/03/IMG_0273.jpg"><img class="alignnone size-thumbnail wp-image-629" title="IMG_0273" src="http://www.robertmullaney.com/wp-content/uploads/2012/03/IMG_0273-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://www.robertmullaney.com/wp-content/uploads/2012/03/IMG_0272.jpg"><img class="alignnone size-thumbnail wp-image-628" title="IMG_0272" src="http://www.robertmullaney.com/wp-content/uploads/2012/03/IMG_0272-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://www.robertmullaney.com/wp-content/uploads/2012/03/IMG_0274.jpg"><img class="alignnone size-thumbnail wp-image-626" title="IMG_0274" src="http://www.robertmullaney.com/wp-content/uploads/2012/03/IMG_0274-150x150.jpg" alt="" width="150" height="150" /></a> <a href="http://www.robertmullaney.com/wp-content/uploads/2012/03/IMG_0275.jpg"><img class="alignnone size-thumbnail wp-image-627" title="IMG_0275" src="http://www.robertmullaney.com/wp-content/uploads/2012/03/IMG_0275-150x150.jpg" alt="" width="150" height="150" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2012/03/13/riding-on-the-dragon-2010-2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improved database table structure for CodeIgniter sessions</title>
		<link>http://www.robertmullaney.com/2012/03/09/improved-database-table-structure-for-codeigniter-sessions/</link>
		<comments>http://www.robertmullaney.com/2012/03/09/improved-database-table-structure-for-codeigniter-sessions/#comments</comments>
		<pubDate>Fri, 09 Mar 2012 17:03:05 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[codeigniter]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sessions]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=620</guid>
		<description><![CDATA[I had a problem where CodeIgniter sessions stored in the database were creating multiple session_id&#8217;s (each time the session library was called) for the same user. Here is how my session configuration is defined&#8230; $config['sess_cookie_name']        = 'my-session'; $config['sess_expiration']        = 60*60*2; //2 hours $config['sess_expire_on_close']    = TRUE; $config['sess_encrypt_cookie']    = FALSE; $config['sess_use_database']    = TRUE; $config['sess_table_name']       [...]]]></description>
			<content:encoded><![CDATA[<p>I had a problem where CodeIgniter sessions stored in the database were creating multiple session_id&#8217;s (each time the session library was called) for the same user.</p>
<p>Here is how my session configuration is defined&#8230;</p>
<pre>$config['sess_cookie_name']        = 'my-session';
$config['sess_expiration']        = 60*60*2; //2 hours
$config['sess_expire_on_close']    = TRUE;
$config['sess_encrypt_cookie']    = FALSE;
$config['sess_use_database']    = TRUE;
$config['sess_table_name']        = 'sessions';
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent']    = TRUE;
$config['sess_time_to_update']    = 300;</pre>
<p>Here is the updated table structure&#8230;</p>
<pre>CREATE TABLE IF NOT EXISTS `sessions` (
  `session_id` varchar(32) NOT NULL default '0',
  `ip_address` varchar(16) NOT NULL default '0',
  `user_agent` varchar(255) NOT NULL,
  `last_activity` int(10) unsigned NOT NULL default '0',
  `user_data` text NOT NULL,
  PRIMARY KEY  (`session_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;</pre>
<p>My solution&#8230; First, I increased the <em>user_agent</em> field to 255 characters in length. Then, since <em>session_id</em> is always 32 characters in length, I reduced that from 40. If you have any other suggestions, feel free to leave a comment.</p>
<p>Hope this helps someone else having the same problem with CodeIgniter sessions that are being stored in the database <img src='http://www.robertmullaney.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2012/03/09/improved-database-table-structure-for-codeigniter-sessions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Get distinct (unique) month and year of records in a mysql table</title>
		<link>http://www.robertmullaney.com/2012/02/16/get-distinct-unique-month-year-records-mysql-table/</link>
		<comments>http://www.robertmullaney.com/2012/02/16/get-distinct-unique-month-year-records-mysql-table/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 16:49:52 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[dates]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=612</guid>
		<description><![CDATA[Here is a quick snippet to pulls the month and year from any date field in a MySQL table&#8230; SELECT DATE_FORMAT(date_added, '%b %Y') AS sDate, COUNT(post_id) AS iCount FROM blog_posts GROUP BY sDate ORDER BY sDate DESC sDate iCount Jan 2012 4 Dec 2011 16 Nov 2011 0 Oct 2011 12 Mostly for my reference, [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a quick snippet to pulls the month and year from any date field in a MySQL table&#8230;</p>
<pre>SELECT DATE_FORMAT(date_added, '%b %Y') AS sDate, COUNT(post_id) AS iCount FROM blog_posts GROUP BY sDate ORDER BY sDate DESC</pre>
<table border="1">
<thead>
<tr>
<th>sDate</th>
<th>iCount</th>
</tr>
</thead>
<tbody>
<tr>
<td>Jan 2012</td>
<td align="right">4</td>
</tr>
<tr>
<td>Dec 2011</td>
<td align="right">16</td>
</tr>
<tr>
<td>Nov 2011</td>
<td align="right">0</td>
</tr>
<tr>
<td>Oct 2011</td>
<td align="right">12</td>
</tr>
</tbody>
</table>
<p>Mostly for my reference, but hope it helps someone else <img src='http://www.robertmullaney.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2012/02/16/get-distinct-unique-month-year-records-mysql-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reset Gallery3 Admin Password using phpMyAdmin</title>
		<link>http://www.robertmullaney.com/2012/01/27/reset-gallery3-admin-password-phpmyadmin/</link>
		<comments>http://www.robertmullaney.com/2012/01/27/reset-gallery3-admin-password-phpmyadmin/#comments</comments>
		<pubDate>Fri, 27 Jan 2012 21:05:05 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[phpmyadmin]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=606</guid>
		<description><![CDATA[Just a quote note in case I need to find it again later&#8230; If you forgot your admin password for Gallery3 by Menalto, open the users table via phpMyAdmin and replace the existing encrypted password with the following. $P$DyhWrqfmMF/XKPf3CtPn0pIQDZpQKu Now, you can log in using 12345 as the password. Make sure you change this immediately [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quote note in case I need to find it again later&#8230;</p>
<p>If you forgot your admin password for Gallery3 by Menalto, open the users table via phpMyAdmin and replace the existing encrypted password with the following.</p>
<pre>$P$DyhWrqfmMF/XKPf3CtPn0pIQDZpQKu</pre>
<p>Now, you can log in using 12345 as the password. Make sure you change this immediately after logging back in!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2012/01/27/reset-gallery3-admin-password-phpmyadmin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Horizontal icon (footer) layout for Facebook chat contacts window&#8230; kind of like the Mac OSX app bar</title>
		<link>http://www.robertmullaney.com/2012/01/19/horizontal-footer-icon-layout-facebook-chat-contactswindow-like-mac/</link>
		<comments>http://www.robertmullaney.com/2012/01/19/horizontal-footer-icon-layout-facebook-chat-contactswindow-like-mac/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 04:01:04 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=596</guid>
		<description><![CDATA[If you came here looking for the code, that will be a bit further down the road. Here is the plan&#8230; Take this&#8230; Note: The above screen has my hide offline users mod applied And make it look more like this&#8230; This is a &#8220;for fun&#8221; project and will be completed as time permits. So [...]]]></description>
			<content:encoded><![CDATA[<p>If you came here looking for the code, that will be a bit further down the road. Here is the plan&#8230;</p>
<p>Take this&#8230;</p>
<p><a href="http://www.robertmullaney.com/wp-content/uploads/2012/01/fb-chat.jpg"><img class="alignnone size-full wp-image-598" title="fb-chat" src="http://www.robertmullaney.com/wp-content/uploads/2012/01/fb-chat.jpg" alt="" width="203" height="243" /></a></p>
<p>Note: The above screen has my <a href="http://www.robertmullaney.com/2012/01/18/hide-offline-contacts-facebook-chat/">hide offline users</a> mod applied <img src='http://www.robertmullaney.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>And make it look more like this&#8230;</p>
<p><a href="http://www.robertmullaney.com/2012/01/19/horizontal-footer-icon-layout-facebook-chat-contactswindow-like-mac/ht3737-lion-desktop-003eee-en/" rel="attachment wp-att-597"><img class="alignnone size-medium wp-image-597" title="HT3737-Lion-Desktop-003eee-en" src="http://www.robertmullaney.com/wp-content/uploads/2012/01/HT3737-Lion-Desktop-003eee-en-300x244.png" alt="" width="300" height="244" /></a></p>
<p>This is a &#8220;for fun&#8221; project and will be completed as time permits. So check back soon for progress updates.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2012/01/19/horizontal-footer-icon-layout-facebook-chat-contactswindow-like-mac/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hide offline contacts from Facebook chat</title>
		<link>http://www.robertmullaney.com/2012/01/18/hide-offline-contacts-facebook-chat/</link>
		<comments>http://www.robertmullaney.com/2012/01/18/hide-offline-contacts-facebook-chat/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 01:42:21 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=592</guid>
		<description><![CDATA[If you&#8217;re like me, you stay logged into Facebook throughout the day. I work online so this is not uncommon. One thing I have always hated is that there are no preferences for how you want to filter that list. Personally I find it pointless to show you offline contacts in an instant chat interface. [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like me, you stay logged into Facebook throughout the day. I work online so this is not uncommon.</p>
<p>One thing I have always hated is that there are no preferences for how you want to filter that list. Personally I find it pointless to show you offline contacts in an instant chat interface. I know some people use it to leave messages, but I am not one of them.</p>
<p>Assuming you know how to modify your browser&#8217;s custom style sheet, this is all you need to add and those offline users will no longer be visible!</p>
<pre>.fbChatOrderedList li.item,
.fbChatOrderedList li.separator {
    display: none !important;
}
.fbChatOrderedList li.active,
.fbChatOrderedList li.mobile {
    display: block !important;
}</pre>
<p>Feel free to post questions, comments or even improvements.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2012/01/18/hide-offline-contacts-facebook-chat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IMPROVED: Open all external links in a new window using jQuery</title>
		<link>http://www.robertmullaney.com/2012/01/17/improved-open-external-links-new-window-jquery/</link>
		<comments>http://www.robertmullaney.com/2012/01/17/improved-open-external-links-new-window-jquery/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 18:29:21 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=589</guid>
		<description><![CDATA[In the original post I covered how to use jQuery to automatically make external links open in a new window. The method however was slightly flawed in my opinion since&#8230; It did not check form action attributes It assumed ANY link starting with &#8220;http[s]://&#8221; was external Here is my new and improved method for making [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a href="http://www.robertmullaney.com/2010/11/08/open-all-external-links-in-a-new-window-using-jquery/">original post</a> I covered how to use jQuery to automatically make external links open in a new window. The method however was slightly flawed in my opinion since&#8230;</p>
<ol>
<li>It did not check form action attributes</li>
<li>It assumed ANY link starting with &#8220;http[s]://&#8221; was external</li>
</ol>
<p>Here is my new and improved method for making all external site links open in a new window. It now includes form tags, one less selector for secure and non-secure link urls, AND excludes any of those which link to an internal page where the full url may have been specified.</p>
<pre>$('a[href*="://"], form[action*="://"]').not($('a[href*="://'+location.host+'"]')).attr('target','_blank');</pre>
<p>A quick breakdown&#8230;</p>
<ol>
<li>a[href*="<span style="color: #ff0000;">://</span>"] and form[action*="<span style="color: #ff0000;">://</span>"] matches the elements where a full url has been specified</li>
<li>.not($(&#8216;a[href*="://'+location.host+'"]&#8216;)) excludes all matched items that include the current host (eg: http://<span style="color: #ff0000;">www.robertmullaney.com</span>/)</li>
<li>finally we update the target attribute of the the remaining links open in a new window</li>
</ol>
<p>Why this is important:</p>
<p style="padding-left: 30px;">Once you have a user on your site, the worst thing you can do is send them away. Also, you will easily annoy them if all links open in new windows and cause them to leave anyhow. This way, only the links that pull them away from site site are opened in new windows. When they are done on the external sites, they close the browser and there your site remains.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2012/01/17/improved-open-external-links-new-window-jquery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculate the total height of child elements of a clipped (overflow: hidden) parent tag</title>
		<link>http://www.robertmullaney.com/2012/01/03/calculate-total-height-child-elements-clipped-parent-tag/</link>
		<comments>http://www.robertmullaney.com/2012/01/03/calculate-total-height-child-elements-clipped-parent-tag/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 17:41:19 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[calculation]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[manipulation]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=578</guid>
		<description><![CDATA[Ever have an element with clipped content and wanted to know the total height of the elements contained therein? I have a client who wants the height of the main content to be clipped to a preset height (don&#8217;t ask me why). Which means I need to dynamically add a &#8220;read more&#8221; link to expand [...]]]></description>
			<content:encoded><![CDATA[<p>Ever have an element with clipped content and wanted to know the total height of the elements contained therein? I have a client who wants the height of the main content to be clipped to a preset height (don&#8217;t ask me why). Which means I need to dynamically add a &#8220;read more&#8221; link to expand the container and show all the content.</p>
<p>Well, here&#8217;s how you calculate the combined height of the children with jQuery&#8230;<span id="more-578"></span></p>
<p><strong>HTML</strong></p>
<pre>&lt;div id="container" style="height: 1em; overflow: hidden"&gt;
    &lt;p&gt;content&lt;br /&gt;content&lt;br /&gt;content&lt;br /&gt;
    content&lt;br /&gt;content&lt;br /&gt;content&lt;br /&gt;
    content&lt;br /&gt;content&lt;br /&gt;content&lt;/p&gt;
    &lt;p&gt;content&lt;br /&gt;content&lt;br /&gt;content&lt;br /&gt;
    content&lt;br /&gt;content&lt;br /&gt;content&lt;br /&gt;
    content&lt;br /&gt;content&lt;br /&gt;content&lt;/p&gt;
&lt;/div&gt;</pre>
<p><strong>JavaScript</strong></p>
<pre>var totalHeight = 0;
$("#container").children().each(function(){
    totalHeight += $(this).outerHeight(true); // true = include margins
});
alert("Total Height: " + totalHeight + "px");</pre>
<p><strong>Result</strong></p>
<pre>Total Height: 360px</pre>
<p>All you have to do is loop over each child element inside the parent element, adding its outerHeight (which includes margins, borders and padding) to the totalHeight variable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2012/01/03/calculate-total-height-child-elements-clipped-parent-tag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remove www prefix from domain using PHP</title>
		<link>http://www.robertmullaney.com/2012/01/01/remove-www-prefix-from-domain-using-php/</link>
		<comments>http://www.robertmullaney.com/2012/01/01/remove-www-prefix-from-domain-using-php/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 20:47:49 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[manipulation]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[regex]]></category>
		<category><![CDATA[regular expressions]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=573</guid>
		<description><![CDATA[I see this question a lot and usually it comes down to getting the current host name for use with cookies. Lets say I want to make a domain-wide cookie, that does not include the standard www prefix such as www.robertmullaney.com. In order for the cookie to work with or without the www prefix, it [...]]]></description>
			<content:encoded><![CDATA[<p>I see this question a lot and usually it comes down to getting the current host name for use with cookies. Lets say I want to make a domain-wide cookie, that does not include the standard www prefix such as www.robertmullaney.com. In order for the cookie to work with or without the www prefix, it needs to become &#8216;.robertmullaney.com&#8217;.</p>
<pre>preg_replace('/^www\./i', '.', $_SERVER['HTTP_HOST'])</pre>
<p>Now, some of you may be looking for a way to determine the top-level domain for something like this.subdomain.robertmullaney.com. That is not an easy solution (since many TLDs have multiple suffixes like .co.uk). If that&#8217;s what you&#8217;re looking for, check back later and see if I have come up with a good solution&#8230; that one&#8217;s tricky.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2012/01/01/remove-www-prefix-from-domain-using-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy New Year 2012</title>
		<link>http://www.robertmullaney.com/2012/01/01/happy-new-year-2012/</link>
		<comments>http://www.robertmullaney.com/2012/01/01/happy-new-year-2012/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 08:19:07 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=571</guid>
		<description><![CDATA[I&#8217;d like to wish all of my visitors and fellow coders a happy and prosperous new year. Keep checking out my blog in 2012 for some new sections included but not limited to java, c++ and iphone/android app development. This should be a good year.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d like to wish all of my visitors and fellow coders a happy and prosperous new year. Keep checking out my blog in 2012 for some new sections included but not limited to java, c++ and iphone/android app development. This should be a good year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2012/01/01/happy-new-year-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calculator: Convert Xbox Live Microsoft Points (MSP) to USD</title>
		<link>http://www.robertmullaney.com/2011/12/07/calculator-convert-xbox-live-microsoft-points-to-usd/</link>
		<comments>http://www.robertmullaney.com/2011/12/07/calculator-convert-xbox-live-microsoft-points-to-usd/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 04:02:22 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Gaming]]></category>
		<category><![CDATA[calculation]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[microsoft points]]></category>
		<category><![CDATA[xbox]]></category>
		<category><![CDATA[xbox live]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=526</guid>
		<description><![CDATA[Here is a calculator (requires JavaScript) to convert Xbox Live Microsoft Points into USD (dollars) and vice versa. Microsoft Point Converter USD MSP Simply enter an amount into either field and the conversion is automatic. PS: If you leech my code, at least link to me for credit]]></description>
			<content:encoded><![CDATA[<p>Here is a calculator (requires JavaScript) to convert Xbox Live Microsoft Points into USD (dollars) and vice versa.</p>
<form>
<fieldset>
<legend>Microsoft Point Converter</legend>
<input id="usd" type="text" value="0" /> USD<br />
<input id="msp" type="text" value="0" /> MSP</fieldset>
</form>
<p>Simply enter an amount into either field and the conversion is automatic.</p>
<p>PS: If you leech my code, at least link to me for credit <img src='http://www.robertmullaney.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><script type="text/javascript">// <![CDATA[
 jQuery(function() { ratio = 0.0125; jQuery('#usd').keyup(function(event) { result = parseInt(jQuery(this).val().replace(/[^0-9\.]+/g, '')) / ratio; if (isNaN(result)) result = 0; jQuery('#msp').val(result); }); jQuery('#msp').keyup(function(event) { result = parseFloat(jQuery(this).val().replace(/[^0-9\.]+/g, '')) * ratio; if (isNaN(result)) result = 0; jQuery('#usd').val(result.toFixed(2)); }); });
// ]]&gt;</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2011/12/07/calculator-convert-xbox-live-microsoft-points-to-usd/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My HTML5 base template (skeleton file) with jQuery from Google CDN</title>
		<link>http://www.robertmullaney.com/2011/11/18/my-html5-base-template-skeleton-file-jquery-google-cdn/</link>
		<comments>http://www.robertmullaney.com/2011/11/18/my-html5-base-template-skeleton-file-jquery-google-cdn/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 19:09:24 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery ui]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=471</guid>
		<description><![CDATA[Below is the standard HTML5 template I start most of my projects with. It includes the latest 1.x version of jQuery, jQuery UI, and the desired jQuery UI theme. It also has a conditional comment that checks to see if the current browser older than IE9 and includes HTML5Shiv to make sure new elements are [...]]]></description>
			<content:encoded><![CDATA[<p>Below is the standard HTML5 template I start most of my projects with. It includes the latest 1.x version of jQuery, jQuery UI, and the desired jQuery UI theme. It also has a conditional comment that checks to see if the current browser older than IE9 and includes HTML5Shiv to make sure new elements are rendered properly in older IE browsers.</p>
<p>While I don&#8217;t claim this is the best skeleton HTML5 template, I think it is a very solid foundation to start from <img src='http://www.robertmullaney.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<pre>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
&lt;meta charset="utf-8"&gt;
&lt;title&gt;Untitled&lt;/title&gt;
&lt;meta name="keywords" content=""&gt;
&lt;meta name="description" content=""&gt;
&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&gt;&lt;/script&gt;
&lt;script src="//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"&gt;&lt;/script&gt;
&lt;link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1/themes/ui-lightness/jquery-ui.css"&gt;
&lt;!--[if lt IE 9]&gt;&lt;script src="//html5shiv.googlecode.com/svn/trunk/html5.js"&gt;&lt;/script&gt;&lt;![endif]--&gt;
&lt;script&gt;
$(function() {
    //DOM is Ready
});
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;/body&gt;
&lt;/html&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2011/11/18/my-html5-base-template-skeleton-file-jquery-google-cdn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP: Incrementing/decrementing a numeric string that has letter (alpha) prefixes</title>
		<link>http://www.robertmullaney.com/2011/11/16/php-increment-decrement-numeric-string-letteralpha-prefixes/</link>
		<comments>http://www.robertmullaney.com/2011/11/16/php-increment-decrement-numeric-string-letteralpha-prefixes/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 19:02:49 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[numbers]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[strings]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=468</guid>
		<description><![CDATA[I see this question quite a bit in programming discussions and forums. I&#8217;ll be linking to this post from now on to avoid re-posting the same replies every time someone asks. String Value: XYZ123 Desired Result: XYZ124 The majority of solutions I have read regarding this problem require splitting the string or using regular expressions [...]]]></description>
			<content:encoded><![CDATA[<p>I see this question quite a bit in programming discussions and forums. I&#8217;ll be linking to this post from now on to avoid re-posting the same replies every time someone asks.</p>
<p><strong>String Value:</strong> XYZ123</p>
<p><strong>Desired Result:</strong> XYZ124</p>
<p>The majority of solutions I have read regarding this problem require splitting the string or using regular expressions to manipulate the numeric portion. The overhead for complex solutions for such a simple problem are simply overkill. The example below shows the easiest way to increment the string  and requires minimal overhead&#8230;<span id="more-468"></span></p>
<pre>$str = 'XYZ123';
echo $str++; // Output: XYZ124</pre>
<p>It couldn&#8217;t be any easier. To decrement, simply modify the &#8216;++&#8217; operator as follows&#8230;</p>
<pre>$str = 'XYZ123';
echo $str--; // Output: XYZ122</pre>
<p>Now, if your numeric string ends with a letter, this method will perform differently than you might expect.</p>
<pre>$str = '123ABC';
echo $str++; // Output: 123ABD</pre>
<p>Here as an example performed using a for loop.</p>
<pre>&lt;?php
$str = '35A990';
for ($i = 0; $i &lt; 16; $i++) {
    echo $str++ . ' ';
}
// Output: 35<span style="color: #ff0000;">A</span>990 35<span style="color: #ff0000;">A</span>991 35<span style="color: #ff0000;">A</span>992 35<span style="color: #ff0000;">A</span>993 35<span style="color: #ff0000;">A</span>994 35<span style="color: #ff0000;">A</span>995 35<span style="color: #ff0000;">A</span>996 35<span style="color: #ff0000;">A</span>997 35<span style="color: #ff0000;">A</span>998 35A999 35<strong><span style="color: #ff0000;">B</span></strong>000 35<strong><span style="color: #ff0000;">B</span></strong>001 35<strong><span style="color: #ff0000;">B</span></strong>002 35<strong><span style="color: #ff0000;">B</span></strong>003 35<strong><span style="color: #ff0000;">B</span></strong>004 35<strong><span style="color: #ff0000;">B</span></strong>005
?&gt;</pre>
<p>Note: Since we exceeded the upper limit of the numeric portion, the preceding alpha character &#8216;A&#8217; is incremented to &#8216;B&#8217; (in <span style="color: #ff0000;">red</span> above). Be sure you understand this behavior before implementing this method.</p>
<p>Feel free to comment if you have any questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2011/11/16/php-increment-decrement-numeric-string-letteralpha-prefixes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bookmarklet: Submit a login form using javascript within a bookmark</title>
		<link>http://www.robertmullaney.com/2011/10/23/bookmarklet-submit-login-form-javascript-bookmark/</link>
		<comments>http://www.robertmullaney.com/2011/10/23/bookmarklet-submit-login-form-javascript-bookmark/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 14:38:41 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[bookmark]]></category>
		<category><![CDATA[bookmarklet]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=449</guid>
		<description><![CDATA[If you&#8217;re like me, you have many bookmarks to administration areas that require authentication. For you, this script is a priceless time-saver. Let&#8217;s say your login page has a form similar to the following&#8230; &#60;form action="/login.php" method="post"&#62;     &#60;label&#62;Username: &#60;input type="text" name="user"&#62;&#60;/label&#62;     &#60;label&#62;Password: &#60;input type="password" name="pass"&#62;&#60;/label&#62;     &#60;input type="submit" value="Log In"&#62; &#60;/form&#62; Some logins [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re like me, you have many bookmarks to administration areas that require authentication. For you, this script is a priceless time-saver.</p>
<p>Let&#8217;s say your login page has a form similar to the following&#8230;</p>
<pre>&lt;form action="/login.php" method="post"&gt;
    &lt;label&gt;Username: &lt;input type="text" name="user"&gt;&lt;/label&gt;
    &lt;label&gt;Password: &lt;input type="password" name="pass"&gt;&lt;/label&gt;
    &lt;input type="submit" value="Log In"&gt;
&lt;/form&gt;</pre>
<p>Some logins simply cannot be stored in the browser&#8217;s password system. So, to save you the extra effort of manually logging in on each visit to such pages, create a bookmark that automatically logs you into the system.</p>
<p>Here&#8217;s the code to submit that form using a bookmarklet&#8230;<span id="more-449"></span></p>
<p><span style="color: #ff0000;">Red</span> text indicates what <strong>should</strong> be changed&#8230;</p>
<pre>javascript:'&lt;html&gt;&lt;body onload="document.forms[0].submit()"&gt;&lt;form method="post" action="<span style="color: #ff0000;">http://yourdomain.com/login.php</span>"&gt;&lt;input type="hidden" name="<span style="color: #ff0000;">user</span>" value="<span style="color: #ff0000;">yourusername</span>"&gt;&lt;input type="hidden" name="<span style="color: #ff0000;">pass</span>" value="<span style="color: #ff0000;">yourpassword</span>"&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;'</pre>
<p>As long as you have a basic understanding of HTML forms and JavaScript, you should be able to modify the above code to suit your specific needs <img src='http://www.robertmullaney.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Warning:</strong> Since your username and password are stored in plain-text within the bookmark, you should <span style="text-decoration: underline;">never</span> implement this script on a computer or device accessible by other users.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2011/10/23/bookmarklet-submit-login-form-javascript-bookmark/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>jQuery Add Bookmark to Favorites Script</title>
		<link>http://www.robertmullaney.com/2011/10/18/jquery-add-bookmark-to-favorites-script/</link>
		<comments>http://www.robertmullaney.com/2011/10/18/jquery-add-bookmark-to-favorites-script/#comments</comments>
		<pubDate>Tue, 18 Oct 2011 18:40:43 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[bookmark]]></category>
		<category><![CDATA[dialog]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery ui]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=440</guid>
		<description><![CDATA[Here is a quick example of how to use jQuery along with traditional browser sniffing techniques to create a dynamic &#8220;Bookmark Us&#8221; link. Google CDN (latest 1.x version, theme)&#8230; &#60;script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"&#62;&#60;/script&#62; &#60;script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"&#62;&#60;/script&#62; &#60;link type="text/css" rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1/themes/blitzer/jquery-ui.css" /&#62; The javascript&#8230; $(function() {     $('&#60;div id="dialog"&#62;&#60;/div&#62;').dialog({         modal: true,         autoOpen: false,         buttons: [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a quick example of how to use jQuery along with traditional browser sniffing techniques to create a dynamic &#8220;Bookmark Us&#8221; link.</p>
<p>Google CDN (<strong><span style="color: #ff0000;">latest 1.x version</span></strong>, <span style="color: #008000;"><strong>theme</strong></span>)&#8230;</p>
<pre>&lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/<strong><span style="color: #ff0000;">1</span></strong>/jquery.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/<strong><span style="color: #ff0000;">1</span></strong>/jquery-ui.min.js"&gt;&lt;/script&gt;
&lt;link type="text/css" rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/<strong><span style="color: #ff0000;">1</span></strong>/themes/<strong><span style="color: #008000;">blitzer</span></strong>/jquery-ui.css" /&gt;</pre>
<p>The javascript&#8230;<span id="more-440"></span></p>
<pre>$(function() {
    $('&lt;div id="dialog"&gt;&lt;/div&gt;').dialog({
        modal: true,
        autoOpen: false,
        buttons: {
            Ok: function() {
                $(this).dialog('close');
            }
        }
    });
    var faveMetaKey = (navigator.appVersion.indexOf('Mac') != -1) ? 'CMD' : 'CTRL';
    var faveLetter = 'D';
    var faveText = 'Bookmark Us';
    if ($.browser.opera) {
        $('#addBookmark').attr('rel', 'sidebar');
        if (parseInt($.browser.version, 10) &lt; 9) {
            faveLetter = 'T';
            $('#addBookmark').text(faveText + ' (' + faveMetaKey + '+' + faveLetter + ')');
        }
    } else if (/konqueror/.test(navigator.userAgent.toLowerCase())) {
        faveLetter = 'B';
        $('#addBookmark').text(faveText + ' (' + faveMetaKey + '+' + faveLetter + ')');
    } else if (window.external || window.sidebar) {
        $('#addBookmark').text(faveText);
    }
    $('#addBookmark').click(function(event) {
        event.preventDefault();
        if (window.external) { // IE
            window.external.AddFavorite(window.location.href, document.title);
        } else if (window.sidebar) { // FireFox
            window.sidebar.addPanel(document.title, window.location.href, '');
        } else {
            if ($.browser.opera &amp;&amp; parseInt($.browser.version, 10) &gt;= 9) {
                // do nothing (added rel="sidebar" above)
            } else {
                $('#dialog').dialog('option', 'title', faveText);
                $('#dialog').html('Press ' + faveMetaKey + '+' + faveLetter + ' to ' + faveText + '.');
                $('#dialog').dialog('open');
            }
        }
    });
});</pre>
<p>The HTML anchor (link)&#8230;</p>
<pre>&lt;a id="addBookmark" href="#"&gt;Bookmark Us (CTRL + D)&lt;/a&gt;</pre>
<p>You can see from the HTML above that we set our link using generic defaults in case the user&#8217;s browser doesn&#8217;t process the script correctly.</p>
<p>In our JavaScript, we first add a generic dialog to the DOM in case automated bookmarks are not supported. Next we set our defaults: <em>faveMetaKey</em>, <em>faveLetter</em> key, and <em>faveText</em>. Only the <em>rel=&#8221;sidebar&#8221;</em> attribute is required for this to work with Opera, but we also have to check the Opera version to re-assign the letter key for older versions. The check for Konqueror was required since it uses a letter key that no other browser is known to use. Then, if we know that automated bookmarking is allowed, we can just omit the key combination since the link should work (IE &amp; FF).</p>
<p>Now for our almighty <a href="http://api.jquery.com/click/" target="_blank">click()</a> function. First, we kill the event with <a href="http://api.jquery.com/event.preventDefault/" target="_blank">preventDefault()</a>. Then we do our conditional checks for Internet Explorer and FireFox (both of which can be automated). If all else fails, we make sure it&#8217;s not Opera 9+, then tell the user which key combination to press within the <a href="http://jqueryui.com/demos/dialog/" target="_blank">jQuery-UI Dialog</a>.</p>
<p>Let me know if you run into any browser/OS combinations with which this method fails. Try to limit concerns regarding browser versions to those released within the last 5 years, thanks <img src='http://www.robertmullaney.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I would also appreciate feedback regarding key combinations not included in my script. I&#8217;m pretty sure I covered them all, but one can never be sure.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2011/10/18/jquery-add-bookmark-to-favorites-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Easily prevent Flash of Unstyled Content (FOUC) with jQuery</title>
		<link>http://www.robertmullaney.com/2011/08/29/prevent-flash-of-unstyled-content-fouc-jquery/</link>
		<comments>http://www.robertmullaney.com/2011/08/29/prevent-flash-of-unstyled-content-fouc-jquery/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 19:27:27 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[fouc]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery ui]]></category>
		<category><![CDATA[unstyled content]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=424</guid>
		<description><![CDATA[I have a project which uses jQuery UI for tables (formatting), buttons, tabs, etc. Even though my local resources and remotely hosted ones are saved in the browser&#8217;s cache, I still have situations where a FOUC (Flash of Unstyled Content) occurs. Here is a simple solution&#8230; $(function() { $('body').hide(); $(window).load(function(){ $('body').show(); }); }); Adjust the [...]]]></description>
			<content:encoded><![CDATA[<p>I have a project which uses <a href="http://jqueryui.com/" target="_blank">jQuery UI</a> for tables (formatting), buttons, tabs, etc. Even though my local resources and <a href="http://code.google.com/apis/libraries/devguide.html#jquery" target="_blank">remotely hosted</a> ones are saved  in the browser&#8217;s cache, I still have situations where a FOUC (Flash of Unstyled Content) occurs.<span id="more-424"></span></p>
<p>Here is a simple solution&#8230;</p>
<pre>$(function() {
    $('<span style="color: #ff0000;">body</span>').hide();
    $(window).load(function(){
        $('<span style="color: #ff0000;">body</span>').show();
    });
});</pre>
<p>Adjust the <span style="color: #ff0000;">selector</span> to your needs of course <img src='http://www.robertmullaney.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2011/08/29/prevent-flash-of-unstyled-content-fouc-jquery/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Make the jQuery UI Datepicker use a jQuery Button</title>
		<link>http://www.robertmullaney.com/2011/08/26/make-jquery-ui-datepicker-use-jquery-button/</link>
		<comments>http://www.robertmullaney.com/2011/08/26/make-jquery-ui-datepicker-use-jquery-button/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 20:35:06 +0000</pubDate>
		<dc:creator>Robert Mullaney</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[datepicker]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[jquery ui]]></category>

		<guid isPermaLink="false">http://www.robertmullaney.com/?p=414</guid>
		<description><![CDATA[It has been bugging me for some time that the datepicker widget uses a normal button unless you tell it to use an image. Seeing that we are using the jQuery-UI framework, it makes sense to me that the button should be styled as such. After playing with the selectors and trying it a few [...]]]></description>
			<content:encoded><![CDATA[<p>It has been bugging me for some time that the datepicker widget uses a normal button unless you tell it to use an image. Seeing that we are using the jQuery-UI framework, it makes sense to me that the button should be styled as such. After playing with the selectors and trying it a few different ways, here is how I made that boring datepicker button become a jQuery-UI button (with calendar icon).<span id="more-414"></span></p>
<pre>$(function() {
    $('input[name="some_date_field"]').datepicker({
        showOn: 'button'
    });
    $('button.ui-datepicker-trigger').button({
        text: false,
        icons: {
            primary: 'ui-icon-calendar',
            secondary: ''
        }
    });
});</pre>
<p>Note: Since my datepicker button was displayed inside a  jQuery-UI Dialog, some extra CSS rules were required to make it look right. You may not need them, but if you end up with a huge unsightly button, adjust the following rules.</p>
<pre>button.ui-datepicker-trigger {
    font-size: 65% !important;
    vertical-align: top !important;
    margin-left: 3px !important;
}</pre>
<p>Comments and questions are always welcome <img src='http://www.robertmullaney.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.robertmullaney.com/2011/08/26/make-jquery-ui-datepicker-use-jquery-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

