Archive for March, 2007

News, Windows

Vista 3.1

Today I installed Vista with my friends and we discovered that when Microsoft says that DirectX10 can run only on Vista because they are strongly legate with the new OS they are only saying bullshits, because the new OS depends yet from Windows 3.1!! :D
Windows Vista 3.1

It’s evident in the image that the directory selection is equal to the original Windows 3.1!!
LOL! :D

php

Random image in php

If you want to show a random image in your site a good method is through a php script.
A random image example is here :)
Immagine random

You prefer the dogs, the cat or the lucky hamster? :D (refresh to randomize another image)
Continue Reading »

C, MySQL, Source Code

Convert a C# Object to a SQL string

This post is part of the SQLStringBuilder project. For the latest version of the code i suggest to take the source code from the CVS.

Every time that we need to create SQL queries in a programming language, often we do something like:

int id = GetTableID();
string place = GetPlace();
DateTime timestamp = GetLastActionDate();
string strTimestamp = Utils.GetSQLDate(DateTime.Now);
string sql = "INSERT INTO table VALUES(" + id + ",'" + place + "'," + timestamp + "')";

During the string creation we must add , ‘ and ” with attention.
In this article we will create a function that takes as input a c# Object and gives as output the formatted SQL String:

public static string GetSQLObject(object value)

Continue Reading »

.NET, C

How to use Visual Studio Snippets

Snippets are a fast and intuitive way to write ripetitive code in your project.

Let’s try the prop snippet to write a property.

Write prop in the code:

snippet property 1

Continue Reading »