<?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>Javi Blog</title>
	<atom:link href="http://www.javiblog.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javiblog.com</link>
	<description>&#124; My Development Knowledgebase</description>
	<lastBuildDate>Thu, 10 Nov 2011 02:41:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Using an HTTP tunnel to connect with a remote MySQL server</title>
		<link>http://www.javiblog.com/2011/11/using-an-http-tunnel-to-connect-with-remote-mysql/</link>
		<comments>http://www.javiblog.com/2011/11/using-an-http-tunnel-to-connect-with-remote-mysql/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 02:32:18 +0000</pubDate>
		<dc:creator>javiblog</dc:creator>
				<category><![CDATA[Devel shortcuts]]></category>

		<guid isPermaLink="false">http://www.javiblog.com/?p=77</guid>
		<description><![CDATA[Most hosting providers won&#8217;t let you connect to MySQL remotely, if you feel like PHPMyAdmin is a slow method to manage your databases you can opt for a desktop manager like Navicat (Windows,Mac OS X,Linux) or EMS SQL Manager (Windows) and define an HTTP tunnel as a connection method. You have to place the PHP [...]]]></description>
			<content:encoded><![CDATA[<p>Most hosting providers won&#8217;t let you connect to MySQL remotely, if you feel like PHPMyAdmin is a slow method to manage your databases you can opt for a desktop manager like <a href="http://www.navicat.com">Navicat</a> (Windows,Mac OS X,Linux) or <a href="http://www.sqlmanager.net/products/mysql/manager/">EMS SQL Manager </a>(Windows) and define an HTTP tunnel as a connection method.<span id="more-77"></span></p>
<p>You have to place the PHP tunnel file shipped with the installation package  somewhere in your Web server.</p>
<p>On Navicat connection properties as follows:</p>
<p><a href="http://www.javiblog.com/wp-content/uploads/2011/11/Captura-de-pantalla-2011-11-09-a-las-20.29.39.png"><img class="alignnone size-full wp-image-80" title="Captura de pantalla 2011-11-09 a la(s) 20.29.39" src="http://www.javiblog.com/wp-content/uploads/2011/11/Captura-de-pantalla-2011-11-09-a-las-20.29.39.png" alt="" width="614" height="606" /></a></p>
<p><a href="http://www.javiblog.com/wp-content/uploads/2011/11/Captura-de-pantalla-2011-11-09-a-las-20.12.58.png"><img class="alignnone size-full wp-image-78" title="Captura de pantalla 2011-11-09 a la(s) 20.12.58" src="http://www.javiblog.com/wp-content/uploads/2011/11/Captura-de-pantalla-2011-11-09-a-las-20.12.58.png" alt="" width="614" height="606" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.javiblog.com/2011/11/using-an-http-tunnel-to-connect-with-remote-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Synchronize PHP Web Forms with MySQL table fields</title>
		<link>http://www.javiblog.com/2011/11/synchronize-phpwebform-with-mysql-table-fields/</link>
		<comments>http://www.javiblog.com/2011/11/synchronize-phpwebform-with-mysql-table-fields/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 02:35:13 +0000</pubDate>
		<dc:creator>javiblog</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.javiblog.com/?p=65</guid>
		<description><![CDATA[I have writen this  PHP Class a couple of years ago, its very practical for small systems in order to speed up maintenance. Can be used to: Generate form to edit data stored in MySQL databases. It can generate HTML forms with several types of fields, executing SQL queries to retrieve the default values of the [...]]]></description>
			<content:encoded><![CDATA[<p>I have writen this  PHP Class a couple of years ago, its very practical for small systems in order to speed up maintenance.</p>
<p>Can be used to:</p>
<ul>
<li>Generate form to edit data stored in MySQL databases.</li>
<li>It can generate HTML forms with several types of fields, executing SQL queries to retrieve the default values of the MySQL database table fields.</li>
<li>The class can generate text or textarea form inputs depending on length of the database table text fields.</li>
<li>It can also generate checkbox, radio, and select inputs to edit enum or set database table fields.</li>
<li>The output can be customized with configurable CSS styles and Javascript code.<br />
<span id="more-65"></span></li>
</ul>
<p>Here is an short usage example:</p>

<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar" style="right: 15px;" ><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a><a href="http://betterwp.net/wordpress-plugins/bwp-syntax/" class="bwp-syntax-copy-switch" title="Better WordPress Syntax Plugin"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"style=" height: 252px;"><table class="php"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="de1"><pre class="de1"><span class="co1">// Generate textfield</span>
<span class="kw1">echo</span> <span class="re0">$formAt</span><span class="sy0">-&gt;</span><span class="me1">genStrField</span><span class="br0">&#40;</span><span class="st0">&quot;car_rental&quot;</span><span class="sy0">,</span> <span class="co1">// table</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;customer_name&quot;</span> &nbsp;<span class="co1">// column</span>
&nbsp;
<span class="co1">// Generate radio-set from enum column</span>
<span class="co1">//(Automatically select the default value in column)</span>
<span class="kw1">echo</span> <span class="re0">$formAt</span><span class="sy0">-&gt;</span><span class="me1">genEnumSetField</span><span class="br0">&#40;</span><span class="st0">&quot;car_rental&quot;</span><span class="sy0">,</span> <span class="co1">// table</span>
<span class="st0">&quot;rent_mode&quot;</span> <span class="co1">//column</span>
&nbsp;
<span class="co1">// Generate a select object table based</span>
<span class="re0">$formAt</span><span class="sy0">-&gt;</span><span class="me1">setSelectIniLabel</span><span class="br0">&#40;</span><span class="st0">&quot;Select a Car&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span> <span class="co1">// Set the first option</span>
<span class="kw1">echo</span> <span class="re0">$formAt</span><span class="sy0">-&gt;</span><span class="me1">genCatalogueField</span><span class="br0">&#40;</span><span class="st0">&quot;cars&quot;</span><span class="sy0">,</span> <span class="co1">// table</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;car_id&quot;</span><span class="sy0">,</span> <span class="co1">//column for value</span>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="st0">&quot;car&quot;</span> <span class="co1">// column for label</span>
<span class="br0">&#41;</span><span class="sy0">;</span></pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">// Generate textfield
echo $formAt-&gt;genStrField("car_rental", // table
                      "customer_name"  // column

// Generate radio-set from enum column
//(Automatically select the default value in column)
echo $formAt-&gt;genEnumSetField("car_rental", // table
"rent_mode" //column

// Generate a select object table based
$formAt-&gt;setSelectIniLabel("Select a Car"); // Set the first option
echo $formAt-&gt;genCatalogueField("cars", // table
                                "car_id", //column for value
                                "car" // column for label
);</pre></div></div>

<p>You can download it from <a href="http://www.phpclasses.org" target="_blank">PHPClasses.org</a> at <a href="http://www.phpclasses.org/package/4396-PHP-Generate-forms-to-edit-data-in-MySQL-tables.html" target="_blank">http://www.phpclasses.org/package/4396-PHP-Generate-forms-to-edit-data-in-MySQL-tables.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.javiblog.com/2011/11/synchronize-phpwebform-with-mysql-table-fields/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Windows applications on Mac OS X Lion using wine</title>
		<link>http://www.javiblog.com/2011/11/installing-windows-applications-on-mac-os-x-lion-using-wine/</link>
		<comments>http://www.javiblog.com/2011/11/installing-windows-applications-on-mac-os-x-lion-using-wine/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 02:00:47 +0000</pubDate>
		<dc:creator>javiblog</dc:creator>
				<category><![CDATA[OS Tricks & Fixes]]></category>
		<category><![CDATA[Mac OS X]]></category>
		<category><![CDATA[wine]]></category>

		<guid isPermaLink="false">http://www.javiblog.com/?p=41</guid>
		<description><![CDATA[What is Wine? Wine let you run Windows software  on Unix-like operating systems, Mac OS is one of them. With wine, you can install and run these applications just like you would in Windows. 1. Install Apple Xcode Open App Store, search and install Xcode. 2. Install the Java runtime (JRE) Use the following instructions: [...]]]></description>
			<content:encoded><![CDATA[<h3>What is Wine?</h3>
<p><span class="Apple-style-span" style="font-weight: normal;">Wine let you run Windows software  on Unix-like operating systems, Mac OS is one of them. With wine, you can install and run these applications just like you would in Windows.<br />
<span id="more-41"></span></span></p>
<h3>1. Install Apple Xcode</h3>
<p>Open App Store, search and install Xcode.</p>
<h3>2. Install the Java runtime (JRE)</h3>
<p>Use the following instructions: <a href="http://kb2.adobe.com/cps/909/cpsid_90908.html#main_Solution_2_">http://kb2.adobe.com/cps/909/cpsid_90908.html#main_Solution_2_</a></p>
<h3>3. Get the latest version of XQuartz</h3>
<p>XQuartz are the supporting libraries and applications that forms the X11 that Apple has shipped with OS X since version 10.5.</p>
<p>Get the latest release from here: <a href="http://xquartz.macosforge.org/">http://xquartz.macosforge.org/</a></p>
<p>Open .dmg, doble click to xQuartz.pkg and follow the instructions.</p>
<h3>4. Get the wonderful MacPorts package manager</h3>
<p>MacPorts will let you install open source programs  in Mac OS without suffering: <a href="http://www.macports.org/install.php">http://www.macports.org/install.php</a>, choose Lion Disk Image (dmg), open and install pkg.</p>
<p>You´ll need to do some configurations:</p>
<p>Open Terminal (Applications &gt; Utilities &gt; Terminal) and type the following line by line</p>

<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar"><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a><a href="http://betterwp.net/wordpress-plugins/bwp-syntax/" class="bwp-syntax-copy-switch" title="Better WordPress Syntax Plugin"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"><table class="bash"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
</pre></td><td class="de1"><pre class="de1"><span class="kw3">echo</span> <span class="kw3">export</span> <span class="re2">PATH</span>=<span class="sy0">/</span>opt<span class="sy0">/</span>local<span class="sy0">/</span>bin:<span class="sy0">/</span>opt<span class="sy0">/</span>local<span class="sy0">/</span>sbin:\<span class="re1">$PATH</span>$<span class="st_h">'\n'</span><span class="kw3">export</span> <span class="re2">MANPATH</span>=<span class="sy0">/</span>opt<span class="sy0">/</span>local<span class="sy0">/</span><span class="kw2">man</span>:\<span class="re1">$MANPATH</span> <span class="sy0">|</span> <span class="kw2">sudo</span> <span class="kw2">tee</span> <span class="re5">-a</span> <span class="sy0">/</span>etc<span class="sy0">/</span>profile</pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">echo export PATH=/opt/local/bin:/opt/local/sbin:\$PATH$'\n'export MANPATH=/opt/local/man:\$MANPATH | sudo tee -a /etc/profile</pre></div></div>


<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar"><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a><a href="http://betterwp.net/wordpress-plugins/bwp-syntax/" class="bwp-syntax-copy-switch" title="Better WordPress Syntax Plugin"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"><table class="bash"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
</pre></td><td class="de1"><pre class="de1"><span class="kw3">export</span> <span class="re2">PATH</span>=<span class="sy0">/</span>opt<span class="sy0">/</span>local<span class="sy0">/</span>bin:<span class="sy0">/</span>opt<span class="sy0">/</span>local<span class="sy0">/</span>sbin:<span class="re1">$PATH</span></pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">export PATH=/opt/local/bin:/opt/local/sbin:$PATH</pre></div></div>


<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar"><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a><a href="http://betterwp.net/wordpress-plugins/bwp-syntax/" class="bwp-syntax-copy-switch" title="Better WordPress Syntax Plugin"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"><table class="bash"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
</pre></td><td class="de1"><pre class="de1"><span class="kw3">export</span> <span class="re2">MANPATH</span>=<span class="sy0">/</span>opt<span class="sy0">/</span>local<span class="sy0">/</span><span class="kw2">man</span>:<span class="re1">$MANPATH</span></pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">export MANPATH=/opt/local/man:$MANPATH</pre></div></div>


<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar"><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a><a href="http://betterwp.net/wordpress-plugins/bwp-syntax/" class="bwp-syntax-copy-switch" title="Better WordPress Syntax Plugin"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"><table class="bash"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
</pre></td><td class="de1"><pre class="de1"><span class="kw1">if</span> <span class="br0">&#91;</span> <span class="sy0">`</span>sysctl <span class="re5">-n</span> hw.cpu64bit_capable<span class="sy0">`</span> <span class="re5">-eq</span> <span class="nu0">1</span> <span class="br0">&#93;</span> ; <span class="kw1">then</span> <span class="kw3">echo</span> <span class="st0">&quot;+universal&quot;</span> <span class="sy0">|</span> <span class="kw2">sudo</span> <span class="kw2">tee</span> <span class="re5">-a</span> <span class="sy0">/</span>opt<span class="sy0">/</span>local<span class="sy0">/</span>etc<span class="sy0">/</span>macports<span class="sy0">/</span>variants.conf; <span class="kw1">else</span> <span class="kw3">echo</span> <span class="st0">&quot;not 64bit capable&quot;</span>; <span class="kw1">fi</span></pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">if [ `sysctl -n hw.cpu64bit_capable` -eq 1 ] ; then echo "+universal" | sudo tee -a /opt/local/etc/macports/variants.conf; else echo "not 64bit capable"; fi</pre></div></div>

<h3></h3>
<h3>5. Finally install wine using MacPorts</h3>
<p>Open Terminal (Applications &gt; Utilities &gt; Terminal) and type</p>

<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar"><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a><a href="http://betterwp.net/wordpress-plugins/bwp-syntax/" class="bwp-syntax-copy-switch" title="Better WordPress Syntax Plugin"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"><table class="bash"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
</pre></td><td class="de1"><pre class="de1"><span class="kw2">sudo</span> port <span class="kw2">install</span> <span class="kw2">wine</span></pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">sudo port install wine</pre></div></div>

<p>You will be asked for your administration password.<br />
The process could take a few minutes, please be patient.</p>
<h3>6. Install a windows application</h3>
<p>In terminal type</p>

<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar"><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a><a href="http://betterwp.net/wordpress-plugins/bwp-syntax/" class="bwp-syntax-copy-switch" title="Better WordPress Syntax Plugin"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"><table class="bash"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
</pre></td><td class="de1"><pre class="de1"><span class="kw2">wine</span> <span class="kw2">install</span> setup.exe</pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">wine install setup.exe</pre></div></div>

<p>you should point to your applications installer path.</p>
<h3>7. Run</h3>

<div class="bwp-syntax-block clearfix">
<div class="bwp-syntax-toolbar"><div class="bwp-syntax-control"><a href="javascript:;" class="bwp-syntax-source-switch" title="View Source Code"></a><a href="http://betterwp.net/wordpress-plugins/bwp-syntax/" class="bwp-syntax-copy-switch" title="Better WordPress Syntax Plugin"></a></div></div>
<div class="bwp-syntax-wrapper clearfix bwp-syntax-simple"><table class="bash"><tbody><tr class="li1"><td class="ln"><pre class="de1">1
2
</pre></td><td class="de1"><pre class="de1"><span class="kw3">cd</span> <span class="re1">$HOME</span><span class="sy0">/</span>.wine
<span class="kw2">wine</span> app.exe</pre></td></tr></tbody></table></div>
<div class="bwp-syntax-source"><pre class="no-parse">cd $HOME/.wine
wine app.exe</pre></div></div>

<p>Hope it be helpful for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.javiblog.com/2011/11/installing-windows-applications-on-mac-os-x-lion-using-wine/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

