<?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>OSTalks &#187; repository</title>
	<atom:link href="http://www.ostalks.com/tag/repository/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ostalks.com</link>
	<description>Open Source, Operating Systems, Offtopic Stuff!</description>
	<lastBuildDate>Fri, 28 May 2010 01:29:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Gambas2 in Moblin; RPMS in Ibiblio</title>
		<link>http://www.ostalks.com/2010/03/07/gambas2-in-moblin-rpms-in-ibiblio/</link>
		<comments>http://www.ostalks.com/2010/03/07/gambas2-in-moblin-rpms-in-ibiblio/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 13:51:28 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[gambas]]></category>
		<category><![CDATA[moblin]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[rpms]]></category>

		<guid isPermaLink="false">http://www.ostalks.com/?p=325</guid>
		<description><![CDATA[For those who don't know what Gambas is, it is a free development environment based on a Basic interpreter with object extensions.  I call it like VB on linux.  You can make GUI programs in Qt or GTK+ and save your compiled application in RPM format.]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>I added Gambas2 for moblin with a few caveats:<br />
- no mysql for gambas<br />
- no kde for gambas<br />
- no firebird for gambas</p>
<p>This is because these libs are not available in the official moblin repository, and I, as much as possible follow dependencies on the main repository. </p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2010/03/gambas2.png"><img src="http://www.ostalks.com/wp-content/uploads/2010/03/gambas2-300x168.png" alt="" title="gambas2" width="300" height="168" class="alignnone size-medium wp-image-329" /></a></p>
<p>For those who don&#8217;t know what Gambas is, it is a free development environment based on a Basic interpreter with object extensions.  I call it like VB on linux.  You can make GUI programs in Qt or GTK+ and save your compiled application in RPM format.</p>
<p>Also, the moblin repository for ostalks is now in ibiblio. <del datetime="2010-03-07T15:22:41+00:00"> It should be up shortly (I&#8217;ll update this blog when the files are fully uploaded).</del></p>
<p><strong>Update: </strong>Moblin rpms are now hosted at ibiblio</p>
<p>Just copy and paste this text for your moblin repository.</p>
<p>[ostalks_moblin]<br />
name=OStalks Moblin Repo $releasever – $basearch<br />
baseurl=http://mirrors.ibiblio.org/pub/mirrors/ostalks/moblin/RPMS/<br />
enabled=1<br />
gpgcheck=0</p>
<p>It should be available here:</p>
<p>http://mirrors.ibiblio.org/pub/mirrors/ostalks</p>
<p>Have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2010/03/07/gambas2-in-moblin-rpms-in-ibiblio/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Wine 1.1.38 In Moblin</title>
		<link>http://www.ostalks.com/2010/02/23/wine-1-1-38-in-moblin/</link>
		<comments>http://www.ostalks.com/2010/02/23/wine-1-1-38-in-moblin/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 00:54:50 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[moblin]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[rpms]]></category>
		<category><![CDATA[WINE]]></category>

		<guid isPermaLink="false">http://www.ostalks.com/?p=296</guid>
		<description><![CDATA[A quick post on Moblin repository updates.  I added wine 1.1.38 on my small Moblin repository.]]></description>
			<content:encoded><![CDATA[<p>Again,</p>
<p>A quick post on Moblin repository updates.</p>
<p>I added wine 1.1.38 on my small Moblin repository.  Aside from this, I added sane-backend, libieee1284.  I also backported latest gphoto2 and libgphoto2 sources into moblin as well.</p>
<p>This should all be working properly.  If there are any dependencies which I forgot to upload, please do inform me.</p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2010/02/wine.png"><img src="http://www.ostalks.com/wp-content/uploads/2010/02/wine-300x168.png" alt="" title="wine 1.1.38" width="300" height="168" class="alignnone size-medium wp-image-297" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2010/02/23/wine-1-1-38-in-moblin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moblin Repository Started</title>
		<link>http://www.ostalks.com/2010/02/22/moblin-repository-started/</link>
		<comments>http://www.ostalks.com/2010/02/22/moblin-repository-started/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 23:47:13 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[moblin]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://www.ostalks.com/?p=289</guid>
		<description><![CDATA[Hi there guys,
I noticed moblin&#8217;s repository of packages are quite limited.  Yes, I know, moblin is gonna be meego in Q2 2010, but for the moment, I need my application fix.
Presenting a little moblin rpm repository until I meego comes, or whatever&#8230;
Two applications are in there, GFtp and Gnumeric.  Those applications fitted my <a href='http://www.ostalks.com/2010/02/22/moblin-repository-started/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Hi there guys,</p>
<p>I noticed moblin&#8217;s repository of packages are quite limited.  Yes, I know, moblin is gonna be meego in Q2 2010, but for the moment, I need my application fix.</p>
<p>Presenting a little moblin rpm repository until I meego comes, or whatever&#8230;</p>
<p>Two applications are in there, GFtp and Gnumeric.  Those applications fitted my requirements for a useable netbook system.</p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2010/02/gnumeric.png"><img src="http://www.ostalks.com/wp-content/uploads/2010/02/gnumeric-300x168.png" alt="" title="gnumeric" width="300" height="168" class="alignnone size-medium wp-image-290" /></a></p>
<p><a href="http://www.ostalks.com/wp-content/uploads/2010/02/gftp.png"><img src="http://www.ostalks.com/wp-content/uploads/2010/02/gftp-300x168.png" alt="" title="gftp" width="300" height="168" class="alignnone size-medium wp-image-291" /></a></p>
<p>To use the repository, just enter this as ostalks_moblin.repo in the yum.repos.d folder (updated to ibiblio):</p>
<p>[ostalks_moblin]<br />
name=OStalks Moblin Repo $releasever – $basearch<br />
baseurl=http://mirrors.ibiblio.org/pub/mirrors/ostalks/moblin/RPMS/<br />
enabled=1<br />
gpgcheck=0</p>
<p>I am also willing to compile applications for you guys, when I do get the time &#8211; I&#8217;m doing this on my own free time.</p>
<p>Have fun installing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2010/02/22/moblin-repository-started/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Import DBF Files To MySQL Using PHP</title>
		<link>http://www.ostalks.com/2009/12/31/import-dbf-files-to-mysql-using-php/</link>
		<comments>http://www.ostalks.com/2009/12/31/import-dbf-files-to-mysql-using-php/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 00:35:35 +0000</pubDate>
		<dc:creator>clintcan</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[DBase]]></category>
		<category><![CDATA[dbf]]></category>
		<category><![CDATA[FoxPro]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[repository]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://www.ostalks.com/?p=224</guid>
		<description><![CDATA[I recently had a task to do for a friend of mine to migrate Visual FoxPro data into a mysql database.]]></description>
			<content:encoded><![CDATA[<p>I recently had a task to do for a friend of mine to migrate Visual FoxPro data into a mysql database.</p>
<p>As a programmer that doesn&#8217;t like to re-invent the wheel, I tried searching through google, but was only partially successful in getting code to insert dbf data into mysql (it was public domain code, but only had code to insert data into a table that was created earlier).</p>
<p>This is the code modified to work with any dbf file &#8211; it creates the table, then inserts the dbf data into the created table.  The code was further modified to strip whitespaces from the text values (FoxPro/DBase pads text with spaces up to the length of the field).  You may want to change this further, since this is a quick and dirty code for the sole purpose of importing dbf tables.  This works with my rpms at the repository.</p>
<p><code><br />
<?php<br />
/*<br />
 * Part 2 code modified by Clint Christopher Canada from different public domain sources<br />
 * Part 1 code created by Clint Christopher Canada. BSD licensed.<br />
 */</p>
<p>// This is Part I of the code<br />
$tbl = "table to create";<br />
$db_uname = 'mysql username';<br />
$db_passwd = 'mysql password';<br />
$db = 'database';<br />
$conn = mysql_pconnect('localhost',$db_uname, $db_passwd); </p>
<p>// Path to dbase file<br />
$db_path = ".DBF";</p>
<p>// Open dbase file<br />
$dbh = dbase_open($db_path, 0)<br />
  or die("Error! Could not open dbase database file '$db_path'.");</p>
<p>// Get column information<br />
$column_info = dbase_get_header_info($dbh);</p>
<p>// Display information<br />
//print_r($column_info);</p>
<p>$line = array();</p>
<p>foreach($column_info as $col)<br />
{<br />
	switch($col['type'])<br />
	{<br />
		case 'character':<br />
			$line[]= "`$col[name]` VARCHAR( $col[length] )";<br />
			break;<br />
		case 'number':<br />
			$line[]= "`$col[name]` FLOAT";<br />
			break;<br />
		case 'boolean':<br />
			$line[]= "`$col[name]` BOOL";<br />
			break;<br />
		case 'date':<br />
			$line[]= "`$col[name]` DATE";<br />
			break;<br />
		case 'memo':<br />
			$line[]= "`$col[name]` TEXT";<br />
			break;<br />
	}<br />
}<br />
$str = implode(",",$line);<br />
$sql = "CREATE TABLE `$tbl` ( $str );";</p>
<p>mysql_select_db($db,$conn);</p>
<p>mysql_query($sql,$conn);<br />
set_time_limit(0); // I added unlimited time limit here, because the records I imported were in the hundreds of thousands.</p>
<p>// This is part 2 of the code</p>
<p>import_dbf($db, $tbl, $db_path);</p>
<p>function import_dbf($db, $table, $dbf_file)<br />
{<br />
    global $conn;<br />
    if (!$dbf = dbase_open ($dbf_file, 0)){ die("Could not open $dbf_file for import."); }<br />
    $num_rec = dbase_numrecords($dbf);<br />
    $num_fields = dbase_numfields($dbf);<br />
    $fields = array();</p>
<p>    for ($i=1; $i<=$num_rec; $i++){<br />
        $row = @dbase_get_record_with_names($dbf,$i);<br />
        $q = "insert into $db.$table values (";<br />
        foreach ($row as $key => $val){<br />
            if ($key == 'deleted'){ continue; }<br />
            $q .= "'" . addslashes(trim($val)) . "',"; // Code modified to trim out whitespaces<br />
        }<br />
        if (isset($extra_col_val)){ $q .= "'$extra_col_val',"; }<br />
        $q = substr($q, 0, -1);<br />
        $q .= ')';<br />
        //if the query failed - go ahead and print a bunch of debug info<br />
        if (!$result = mysql_query($q, $conn)){<br />
            print (mysql_error() . " SQL: $q<br />\n");<br />
            print (substr_count($q, ',') + 1) . " Fields total.
<p>";<br />
            $problem_q = explode(',', $q);<br />
            $q1 = "desc $db.$table";<br />
            $result1 = mysql_query($q1, $conn);<br />
            $columns = array();<br />
            $i = 1;<br />
            while ($row1 = mysql_fetch_assoc($result1)){<br />
                $columns[$i] = $row1['Field'];<br />
                $i++;<br />
            }<br />
            $i = 1;<br />
            foreach ($problem_q as $pq){<br />
                print "$i column: {$columns[$i]} data: $pq<br />\n";<br />
                $i++;<br />
            }<br />
            die();<br />
        }<br />
    }<br />
}</p>
<p>?><br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ostalks.com/2009/12/31/import-dbf-files-to-mysql-using-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.115 seconds -->
