Archive

Archive for the ‘develop’ Category

Tcl scripting and SQLite

December 24th, 2008

Tcl scripting and SQLite

Tcl tutorial
Download Tcl/Tk (source/binary)
SQLite API (tclsh)
Download SQlite (source/binary)
A simple example (taken from sqlite.org):

#!/usr/bin/tclsh
if {$argc!=2} {
  puts stderr "Usage: %s DATABASE SQL-STATEMENT"
  exit 1
}
load /usr/lib/tclsqlite3.so Sqlite3
sqlite3 db [lindex $argv 0]
db eval [lindex $argv 1] x {
  foreach v $x(*) {
    puts "$v = $x($v)"
  }
  puts ""
}
db close

database, develop, projects, security, windows ,

qTranslate Tag Fix WordPress 2.7

December 22nd, 2008

qTranslate Tag Fix WordPress 2.7

qTranslate is a plugin to makes creation of multilingual content as easy as working with a single language.

But … qTranslate 2.0 crash my WordPress :’(

It’s 1:15 A.M. I dont have much time to check now what’s the problem, next days I’m going to Nuevo Leon with my family so i decide to downgrade to qTranslate 1.1.6

Again “str_replace()” fix the tag cloud (wp-includes/category-template.php) WordPress 2.7:

	foreach ( $tags as $key => $tag ) {
		$count = $counts[ $key ];
		$tag_link = '#' != $tag->link ? clean_url( $tag->link ) : '#';
		$tag_id = isset($tags[ $key ]->id) ? $tags[ $key ]->id : $key;
		$tag_name = $tags[ $key ]->name;
		$a[] = "<a class="tag-link-$tag_id" style="font-size: " title="&quot; . attribute_escape( $topic_count_text_callback( $count ) ) . &quot;" href="$tag_link">$tag_name</a>";
	}

develop, web ,

Win32 Installers

December 21st, 2008

Win32 Installers

Sometimes you need to distribute your program to another computers one option is make a installer

Nullsoft Scriptable Installer System (WebSite)

You are Delphi/Pascal developer ?

Inno setup Compiler (WebSite)

You want quick and easy installer, without scripting language ?

Little Install Builder (WebSite)

If you are on Visual Studio you can use publish wizard on build menu.

develop, windows

MySQL 5.1

December 17th, 2008

MySQL 5.1

“We ran a side by side comparison between MySQL and Oracle both partitioned and unpartitioned. MySQL outperformed Oracle at least 2:1 in all like for like tests and, at the extreme, well partitioned MySQL was over 31 times faster than vanilla Oracle tables.”

Guy Adams

Chief Technical Officer

Parallel Ltd.

Downloads:

http://dev.mysql.com/downloads/mysql/5.1.html#downloads

MySQL Workbench:

http://dev.mysql.com/downloads/workbench/5.1.html

GUI Tools:

http://dev.mysql.com/downloads/gui-tools/5.0.html

Connectors:

http://www.mysql.com/products/connector/

database, develop

Google Native Client

December 11th, 2008

Google Native Client

Native Client is an open-source research technology for running x86 native code in web applications

WebSite: http://code.google.com/p/nativeclient/

More information on Google Code Blog

Download native client

develop, hardware, web ,

Fixing the Time

December 7th, 2008

Fixing the Time

function total(year) {
  var seconds = 365 * 24 * 60 * 60; //Normal Year;
  var plus = 24 * 60 * 60; // Leap year have one more day
  var leap = false;
  if ((year % 4 == 0 &amp;&amp; year % 100 != 0) || year % 400 == 0) leap = true;
  if (leap) seconds += plus;
  if (year == 1972) seconds += 2;
  if (year &gt; 1972 &amp;&amp; year &lt; 1980) seconds += 1;
  if (year &gt; 1980 &amp;&amp; year &lt; 1984) seconds += 1;
  if (year &gt; 1988 &amp;&amp; year &lt; 1991) seconds += 1;
  if (year &gt; 1991 &amp;&amp; year &lt; 1996) seconds += 1;
  if (year &gt; 1996 &amp;&amp; year &lt; 1999) seconds += 1;
  if (year == 1985 || year == 1987 || year == 2005 || year == 2008) seconds += 1;
  document.write('Year: '+year+', Total of secods: '+seconds+'
');
}
total(1972);
total(1975);
total(1980);
total(1981);
total(2004);
total(2005);
total(2006);
total(2007);
total(2008);
total(2009);

Result:

Year: 1972, Total of secods: 31622402

Year: 1975, Total of secods: 31536001

Year: 1980, Total of secods: 31622400

Year: 1981, Total of secods: 31536001

Year: 2004, Total of secods: 31622400

Year: 2005, Total of secods: 31536001

Year: 2006, Total of secods: 31536000

Year: 2007, Total of secods: 31536000

Year: 2008, Total of secods: 31622401

Year: 2009, Total of secods: 31536000

Leap Second (http://en.wikipedia.org/wiki/Leap_second)

Leap Years (http://en.wikipedia.org/wiki/Leap_year)

develop, security, web , , ,

JavaFX 1.0 Release

December 5th, 2008

JavaFX 1.0 Release

JavaFX is a rich client platform for building cross-device applications and content. Designed to enable easy creation and deployment of rich internet applications (RIAs) with immersive media and content, the JavaFX platform ensures that RIAs look and behave consistently across diverse form factors and devices.

See the Tutorial, Samples, and FAQ.

Download JavaFX SDK.

develop, web