<?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>Graphic Maniacs</title>
	<atom:link href="http://graphicmaniacs.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://graphicmaniacs.com</link>
	<description></description>
	<lastBuildDate>Wed, 18 Jan 2012 13:08:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Getting a list of WordPress hook actions</title>
		<link>http://graphicmaniacs.com/note/getting-a-list-of-wordpress-hook-actions/</link>
		<comments>http://graphicmaniacs.com/note/getting-a-list-of-wordpress-hook-actions/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 13:08:40 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://graphicmaniacs.com/?p=907</guid>
		<description><![CDATA[Sometimes content is outputted somewhere where I don&#8217;t need (when I run do_action), and I can&#8217;t really see what action does that. So to get the list of WordPress actions attached to a hook, use this kind of code: global $wp_filter; var_dump&#40;$wp_filter&#91;'comment_form'&#93;&#41;; You will get then something like this: array&#40;1&#41; &#123; &#91;10&#93;=&#62; array&#40;2&#41; &#123; &#91;&#34;wp_comment_form_unfiltered_html_nonce&#34;&#93;=&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes content is outputted somewhere where I don&#8217;t need (when I run <strong>do_action</strong>), and I can&#8217;t really see what action does that. So to get the list of WordPress actions attached to a hook, use this kind of code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$wp_filter</span><span style="color: #339933;">;</span>
<span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$wp_filter</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'comment_form'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>You will get then something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=&gt;</span>
  <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;wp_comment_form_unfiltered_html_nonce&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=&gt;</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;function&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=&gt;</span>
      string<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">37</span><span style="color: #009900;">&#41;</span> <span style="color: #0000ff;">&quot;wp_comment_form_unfiltered_html_nonce&quot;</span>
      <span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;accepted_args&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=&gt;</span>
      int<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;akismet_add_comment_nonce&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=&gt;</span>
    <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;function&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=&gt;</span>
      string<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">25</span><span style="color: #009900;">&#41;</span> <span style="color: #0000ff;">&quot;akismet_add_comment_nonce&quot;</span>
      <span style="color: #009900;">&#91;</span><span style="color: #0000ff;">&quot;accepted_args&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">=&gt;</span>
      int<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Pretty cool, now we know what produces all that output.</p>
]]></content:encoded>
			<wfw:commentRss>http://graphicmaniacs.com/note/getting-a-list-of-wordpress-hook-actions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to disable Flash, JavaScript and Cookies in Google Chrome</title>
		<link>http://graphicmaniacs.com/note/how-to-disable-flash-javascript-and-cookies-in-google-chrome/</link>
		<comments>http://graphicmaniacs.com/note/how-to-disable-flash-javascript-and-cookies-in-google-chrome/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 13:51:37 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Miscellaneous]]></category>

		<guid isPermaLink="false">http://graphicmaniacs.com/?p=901</guid>
		<description><![CDATA[For those who just need the shortcuts, here&#8217;s the link to JavaScript and Cookies options: chrome://settings/content For Flash, Silverlight, Quicktime and other similar addons, the link is: chrome://plugins This page can be found by searching for:disable javascript chromechrome flash cookiesdisable cookies and javascript on google chrome?disable javascript google chromeflash cookies in chromehow to disable javascript [...]]]></description>
			<content:encoded><![CDATA[<p>For those who just need the shortcuts, here&#8217;s the link to JavaScript and Cookies options:</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">chrome://settings/content</pre></div></div>

<p>For Flash, Silverlight, Quicktime and other similar addons, the link is:</p>

<div class="wp_syntax"><div class="code"><pre class="js" style="font-family:monospace;">chrome://plugins</pre></div></div>

<h4>This page can be found by searching for:</h4><div class='search-terms'><span>disable javascript chrome</span><span>chrome flash cookies</span><span>disable cookies and javascript on google chrome?</span><span>disable javascript google chrome</span><span>flash cookies in chrome</span><span>how to disable javascript in chrome</span></div><br /><br />]]></content:encoded>
			<wfw:commentRss>http://graphicmaniacs.com/note/how-to-disable-flash-javascript-and-cookies-in-google-chrome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Issue with Flash uploader and Suhosin PHP patch</title>
		<link>http://graphicmaniacs.com/note/issue-with-flash-uploader-and-suhosin-php-patch/</link>
		<comments>http://graphicmaniacs.com/note/issue-with-flash-uploader-and-suhosin-php-patch/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 10:36:54 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://graphicmaniacs.com/?p=892</guid>
		<description><![CDATA[This is a very simply situation: we use multiple files Flash uploader to display progress, and for other extended functionality when uploading files. But this issue was killing me. After installing Suhosin patch, the session was breaking after any file upload. This was made because Suhosin checks the User-Agent also, and Flash has a different [...]]]></description>
			<content:encoded><![CDATA[<p>This is a very simply situation: we use multiple files Flash uploader to display progress, and for other extended functionality when uploading files. But this issue was killing me. After installing Suhosin patch, the session was breaking after any file upload.</p>
<p>This was made because <strong>Suhosin checks the User-Agent</strong> also, and Flash has a different user agent from the browser. Even providing a session id to Flash won&#8217;t solve the issue because Suhosin checks the user agents when session_id/session_start is called.</p>
<p>To solve this issue, simply disable user agent encrypting, but leave the IP address encrypting in php.ini:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">suhosin<span style="color: #339933;">.</span>session<span style="color: #339933;">.</span>encrypt <span style="color: #339933;">=</span> On
suhosin<span style="color: #339933;">.</span>session<span style="color: #339933;">.</span>cryptraddr <span style="color: #339933;">=</span> On
suhosin<span style="color: #339933;">.</span>session<span style="color: #339933;">.</span>cryptua <span style="color: #339933;">=</span> Off</pre></div></div>

<h4>This page can be found by searching for:</h4><div class='search-terms'><span>flash suhosin</span><span>deactivate suhosin</span><span>flash uploader php</span><span>suhosin session encrypt flash</span></div><br /><br />]]></content:encoded>
			<wfw:commentRss>http://graphicmaniacs.com/note/issue-with-flash-uploader-and-suhosin-php-patch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Coloring regions in Google Maps JavaScript API v3</title>
		<link>http://graphicmaniacs.com/note/coloring-regions-in-google-maps-javascript-api-v3/</link>
		<comments>http://graphicmaniacs.com/note/coloring-regions-in-google-maps-javascript-api-v3/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 21:38:57 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://graphicmaniacs.com/?p=745</guid>
		<description><![CDATA[Want to color a map region in Google Maps V3? Easy as pie: load map, centrify on a particular point, define polygon points and options, attach polygon to map with polygon.setMap: Loading &#8230; &#60;div id=&#34;color-maps&#34; style=&#34;height: 400px&#34;&#62; &#60;div style='padding-top: 180px; text-align: center'&#62;Loading ...&#60;/div&#62; &#60;/div&#62; &#160; &#60;script type='text/javascript' src='http://maps.googleapis.com/maps/api/js?sensor=false'&#62;&#60;/script&#62; &#60;script type='text/javascript'&#62; function colormaps() { // 1. [...]]]></description>
			<content:encoded><![CDATA[<p>Want to color a map region in Google Maps V3? Easy as pie: load map, centrify on a particular point, define polygon points and options, attach polygon to map with polygon.setMap:</p>
<div id="color-maps" style="height: 400px">
<div style='padding-top: 180px; font: normal 24px Arial; text-align: center'>Loading &#8230;</div>
</div>
<p><script type='text/javascript' src='http://maps.googleapis.com/maps/api/js?sensor=false'></script><br />
<script type='text/javascript'>
function colormaps() {
  var myLatlng = new google.maps.LatLng(25, -70);
  var myOptions = {
    zoom: 4,
    center: myLatlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  var map = new google.maps.Map(document.getElementById("color-maps"), myOptions);
  var triangleCoords = [
    new google.maps.LatLng(25.774252, -80.190262),
    new google.maps.LatLng(18.466465, -66.118292),
    new google.maps.LatLng(32.321384, -64.75737),
    new google.maps.LatLng(25.774252, -80.190262)
  ];
  var bermudaTriangle = new google.maps.Polygon({
    paths: triangleCoords,
    strokeColor: "#E01B2F",
    strokeOpacity: 0.8,
    strokeWeight: 2,
    fillColor: "#E01B2F",
    fillOpacity: 0.35
  });
  bermudaTriangle.setMap(map);
}
google.maps.event.addDomListener(window, 'load', colormaps);
</script></p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;color-maps&quot;</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">&quot;height: 400px&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;div</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">'padding-top: 180px; text-align: center'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Loading ...<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'text/javascript'</span> <span style="color: #000066;">src</span>=<span style="color: #ff0000;">'http://maps.googleapis.com/maps/api/js?sensor=false'</span><span style="color: #000000; font-weight: bold;">&gt;</span><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;script</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">'text/javascript'</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
function colormaps() {
  // 1. setup map
  var myLatlng = new google.maps.LatLng(25, -70);
  var myOptions = {
    zoom: 4,
    center: myLatlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  }
  var map = new google.maps.Map(document.getElementById(&quot;color-maps&quot;), myOptions);
  // 2. define points and polygon
  var triangleCoords = [
    new google.maps.LatLng(25.774252, -80.190262),
    new google.maps.LatLng(18.466465, -66.118292),
    new google.maps.LatLng(32.321384, -64.75737),
    new google.maps.LatLng(25.774252, -80.190262)
  ];
  var bermudaTriangle = new google.maps.Polygon({
    paths: triangleCoords,
    strokeColor: &quot;#E01B2F&quot;,
    strokeOpacity: 0.8,
    strokeWeight: 2,
    fillColor: &quot;#E01B2F&quot;,
    fillOpacity: 0.35
  });
  // 3. attach polygon to map
  bermudaTriangle.setMap(map);
}
google.maps.event.addDomListener(window, 'load', colormaps);
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/script<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<h4>This page can be found by searching for:</h4><div class='search-terms'><span>script php polygon google maps v3</span><span>how to fill color to a partcular regions on google maps</span><span>google map v3 php mysql</span><span>google maps v3 and coulor part of map</span><span>script polygon google maps with data mysql</span><span>heightmap polygon</span><span>google maps v3 regions</span><span>google maps v3 php api</span><span>google maps regions api</span><span>google maps polygons api v3</span></div><br /><br />]]></content:encoded>
			<wfw:commentRss>http://graphicmaniacs.com/note/coloring-regions-in-google-maps-javascript-api-v3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL regexp word boundary explained</title>
		<link>http://graphicmaniacs.com/note/mysql-regexp-word-boundary-explained/</link>
		<comments>http://graphicmaniacs.com/note/mysql-regexp-word-boundary-explained/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 07:58:32 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://graphicmaniacs.com/?p=856</guid>
		<description><![CDATA[The word boundary regexp is something you may need when a list of data is saved in a single column. Example: id numbers 1 2,34,647 2 78,102,342 3 34,78,103 Now our task would be to select IDs where numbers contain &#8220;2&#8243; and &#8220;34&#8243;. One would say that we can do SELECT * FROM mytable WHERE [...]]]></description>
			<content:encoded><![CDATA[<p>The word boundary regexp is something you may need when a list of data is saved in a single column. Example:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">id   numbers
1    2,34,647
2    78,102,342
3    34,78,103</pre></div></div>

<p>Now our task would be to select IDs where numbers contain &#8220;2&#8243; and &#8220;34&#8243;. One would say that we can do</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">SELECT * FROM mytable WHERE numbers LIKE &quot;2&quot; OR numbers LIKE &quot;34&quot;</pre></div></div>

<p>But that won&#8217;t work correctly, because 2 will match 2, 102 and 342, which is something we don&#8217;t need. In this case MySQL word boundary regex comes handy:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">SELECT * FROM mytable WHERE numbers REGEXP &quot;[[:&lt;:]]2[[:&gt;:]]&quot; OR numbers REGEXP &quot;[[:&lt;:]]34[[:&gt;:]]&quot;</pre></div></div>

<p>Take a look at <strong>[[:&lt;:]]</strong> and <strong>[[:&gt;:]]</strong>. This is all we need here. The word boundary regex makes sure the match we are looking for is a standalone word, matching without commas and spaces, and making sure the &#8220;2&#8243; word doesn&#8217;t have additional letters/numbers on left/right side. This is pretty awesome and saves our day!</p>
<h4>This page can be found by searching for:</h4><div class='search-terms'><span>mysql regex json</span><span>mysql regex</span><span>mysql regexp</span><span>mysql regexp search explained</span><span>mysql replace word boundary</span><span>mysql where like word boundary</span><span>php mysql regexp word boundary</span><span>word boundary</span></div><br /><br />]]></content:encoded>
			<wfw:commentRss>http://graphicmaniacs.com/note/mysql-regexp-word-boundary-explained/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

