After 48 sleepless hours, I finally managed to mount a partition formatted using UFS (the native FreeBSD filesystem).

My configuration is:

HDA: 6 GB (This is where I installed Ubuntu: has partitions hda1, hda2, hda5)
HDC: 80 GB (This is my second hard disk: has one partition hdc1 with UFS)

[code]root@server:/# cat /proc/partitions

major minor #blocks name
3 0 3924648 hda
3 1 3694918 hda1
3 2 1 hda2
3 5 224878 hda5
22 0 78150744 hdc
22 1 78150710 hdc1

[/code]
Here is how I did it:

1. I created a mount point /home/myfiles
[code]root@server:/#mkdir /home/myfiles[/code]
2. I run the command [code]root@server:/#mount -r -t ufs -o ufstype=ufs2 /dev/hdc1 /home/myfiles[/code]

I can now read my files by going to /home/myfiles !

In case you want the drive to be remounted at reboot time, then you will have to edit the /etc/fstab file to add the mount information at the end of the file

[code]/dev/hdc1 /home/myfiles ufs auto,ro,ufstype=ufs2 0 0[/code]

Until now, it seems impossible to mount the drive in write mode. Some articles talk of re-compiling the kernel for write support.

The install was fast and painless.

I have configured it to be a LAMP in less than 20 minutes (have not counted though).


Website ya The new Times (http://www.newtimes.co.rw) iba online inshuro zitari nyinshi cyane ku mwaka. Ubanza bagura bandwidth nkeya kandi bafite abasomyi benshi. Cyangwa byaterwa n’uko yenda umukuru wayo aherutse kwegura nta wamenya.

The new times website is down

Ngo umunyarwanda yaguze (yibye) impamyabumenyi ya A0 (ubundi ihabwa uwize imyaka ine cyangwa itanu muri kaminuza) ariko ageze mu kazi karamunanira. Amahirwe yagize ngo ni uko mu bo yategekaga harimo ufite impamyabumenyi ya A2 (yarize atandatu yisumbuye yose) uzi byinshi maze akajya akora ake agakora n’akuwo waminuje.

Nyuma aza kubaza uwa A2 ati ariko ko uzi byinshi ufite impamyabushozi yihe? Undi ati mfite A2. Niko kugenda aho yakuye ya yindi ya A0 ati ndashaka noneho iyitwa A2. Ntibazuyaje baba barayikoze arayitahana.

Umunsi wakurikiyeho yasubiye ku kazi ajya kureba umukuriye ati ni ukunyongeza umushahara kuko noneho nazanye indi mpamyabushobozi iruta iya mbere nari mfite. Ati kandi iyo ngiyo ikubye gatanu imwe ya mbere nari mfite.

Sinjye wahera, hahera impamyabumenyi n’abibwira ko ari zo zikora akazi !!!

For formatting dates in MySQL one can use the DATE_FORMAT function like DATE_FORMAT(`date_col or value`, dateFormatString)

In a select query, that looks like SELECT DATE_FORMAT(`date_col or value`, dateFormatString) FROM `tableName`
. In case one wants to use the server current date, the query would look like SELECT DATE_FORMAT(NOW(), dateFormatString) FROM `tableName`

For a detailed explanation of the options that can be in a dateFormatString, read the MySQL date related page (dev.mysql.com/doc/).

In the general examples below, I will use the date 22 April 2007 16:15:23 (date of creation of this article)

Language Format String Output
English %m/%d/%Y 04/22/2007
English %m/%d/%Y %H:%i 04/22/2007 16:15
English %a, %D %b %Y %H:%i Sun, 22nd Apr 2007 16:15
Français %d-%m-%Y 22-04-2007
Français %d-%m-%Y %H:%i 22-04-2007 16:15
Français %a, %D %b %Y %H:%i Dim, 22 Avr 2007 16:15
Ikinyarwanda %d-%m-%Y 22-04-2007
Ikinyarwanda %d-%m-%Y %H:%i 22-04-2007 16:15
Ikinyarwanda %a, %D %b %Y %H:%i Cyu, 22 Mata 2007 16:15
Svenska %Y-%m-%d 2007-04-22
Svenska %Y-%m-%d %H:%i 2007-04-22 16:15
Svenska %Y-%m-%d %H:%i 22-april-2007 16:15

For PHP formatString, visit http://www.php.net/date

We is free now

Maze gusoma ibyerekeye ingando z’abanyeshuri bitegura kujya muri Kaminuza i Butare n’ahandi mu Rwanda nibajije niba bitarushaho kugira akamaro iyaba bariya basore n’inkumi bakoraga ibikorwa bifitiye abaturage cyane cyane abakennye akamaro. Urugero nko kubakira abadafite amazu aho kwirirwa bicaye babwirwa politiki akenshi bahita bibagirwa kuko abenshi baba bafite uko babona ibibazo by’igihugu ku buryo ingando atari yo yabahindura imitekerereze. Nyamara bakoze akazi bari kumwe kandi gafitiye abaturage muri rusange akamaro byatuma babasha kuganira bityo n’ubwiyunge bukaziramo.

Ni ubuhe bwiyunge bushoboka mu Rwanda igihe hari abaturage batagira aho barambika umusaya cyangwa bikinga imvura n’imbeho? Ni ubuhe bwiyunge bushoboka mu gihe abaturage bashonje? Uwavuze ati amatwi ashonje ntiyumva buriya ntiyavugaga ukuri?

Aba banyeshuri bashobora gukora imirimo nko kubumba amatafari cyangwa se no kubaka inzu z’ibiti z’abadafite aho baba. Kandi bikozwe buri mwaka wasanga mu myaka nk’itanu (5) cyangwa irenzeho gato imiryango (familles) itagira aho iba yagabanutse bitangaje.

In some installations of the MySQL server, some invalid dates are legal.

At the URL http://dev.mysql.com/doc/refman/4.1/en/date-and-time-types.html I can read:
MySQL version through 4.1 accept certain “illegal” values for dates, such as '1999-11-31'. This is useful when you want to store a possibly incorrect value specified by a user (for example, in a web form) in the database for future processing. MySQL verifies only that the month is in the range from 0 to 12 and that the day is in the range from 0 to 31. These ranges are defined to include zero because MySQL allows you to store dates where the day or month and day are zero in a DATE or DATETIME column. This is extremely useful for applications that need to store a birthdate for which you do not know the exact date. In this case, you simply store the date as '1999-00-00' or '1999-01-00'. If you store dates such as these, you should not expect to get correct results for functions such as DATE_SUB() or DATE_ADD that require complete dates.

MySQL also allows you to store '0000-00-00' as a “dummy date.” This is in some cases more convenient, and uses less data and index space, than storing NULL values.

This behaviour causes problems when using the MySQL Connector/NET. First, Visual Studio 2005 DateTime structure does not accept such invalid date values. It only accepts values between “0001-01-01 00:00:00″ through “9999-12-31 23:59:59.99999″ and these values should be real dates (Check remarks at system.datetime ).

To deal with this problem, connector/NET has MySqlDateTime type that can contain such invalid dates. This class has a property, IsValidDateTime, that is set to true when the date is valid and false otherwise. Currently, the way this property is calculated does not guarantee that the value contained in a MySqlDateTime object can be easily converted into a legal DateTime object. Currently, this property will return FALSE if and only if the object contains a ZERO date (or ZERO dateTime: 0000-00-00).

To overcome this, the property checking should also check if this date is legal in .NET
I have created a sample function that can replace the one in Connector/Net 1.0.7 and I named it IsStrictlyValidDateTime.

Its definition looks like:

[code lang="C#"]
///
/// Indicates if this object contains a value that can be represented as a DateTime
///
public bool IsStrictlyValidDateTime
{
get
{
// In case this represents a zero date, return FALSE
if (year == 0 || month == 0 || day == 0)
{
return false;
}

// Check http://msdn2.microsoft.com/en-us/library/xcfzdy4x(d=ide).aspx
// Here I try assign the value of this object to a DateTime object.
// In case the date is illegal, an Exception will be thrown
// In case the date is legal, the value will be accepted
try
{
DateTime dt = new DateTime(year, month, day);
return true;
} catch (ArgumentOutOfRangeException)
{
//year is less than 1 or greater than 9999.
//-or-
//month is less than 1 or greater than 12.
//-or-
//day is less than 1 or greater than the number of days in month
return false;
} catch (ArgumentException)
{
// The specified parameters evaluate to less than MinValue or more than MaxValue
return false;
}
}
}
[/code]

And the changed file can be seen at /Types/MySqlDateTime.cs

I still don’t understand why a date like “0000-10-01″ was made invalid in .NET (ten months after date ZERO).

In MySql connector .NET, the MySqlDateTime class has no public constructor (it does have constructors but defined as internal). This makes it impossible to use that type in applications.

The bug at MySQL Bug #15112 is caused by the absent public contructor. To try and solve this problem, I added a public contructor in the file mysql-connector-net-1.0.7\mysqlclient\Types\MySqlDateTime.cs
[code lang="C#"]public MySqlDateTime()
{
// Set the value to the lowest value that a DateTime value can have
year = 1;
month = 1;
day = 1;
}
public MySqlDateTime(DateTime val)
{
year = val.Year;
month = val.Month;
day = val.Day;
hour = val.Hour;
minute = val.Minute;
second = val.Second;
}[/code]

This makes it possible to instantiate a MySqlDateTime and set it values.
One can do like :
[code lang="C#"] MySql.Data.Types.MySqlDateTime myDate = new MySql.Data.Types.MySqlDateTime();
System.Console.WriteLine(myDate.ToString()); // 0001-01-01 00:00:00

// or

MySql.Data.Types.MySqlDateTime myDate2 = new MySql.Data.Types.MySqlDateTime(new DateTime(2006,08,05,23,20,15));
System.Console.WriteLine(myDate2.ToString()); // 2006-08-05 23:20:15[/code]

The modified file can be accessed at /Types/MySqlDateTime.cs
For those who won’t re-build the connector themselves I have also uploaded a binary at /bin/net-2.0/Release/MySql.Data.dll

There is still a problem concerning the values saved into this type: for example an object of this type can report that it contains a valid date when it contains “2006-02-31 00:00:00″. This is wrong because February cannot have 31 days. So, the checking of validity of this class needs a change. Currently, the only invalid date is “0000-00-00″ (MySQL ZERO date).

Several men are in the locker room of a golf club. A cell phone on a bench rings and a man engages the hands-free speaker-function and begins to talk.
Everyone else in the room stops to listen.

MAN: “Hello”

WOMAN: “Honey, it’s me. Are you at the club?”

MAN: “Yes”

WOMAN: “I’m at the mall now and found this beautiful leather coat. It’s only $1,000. Is it OK if I buy it?”

MAN: “Sure, go ahead if you like it that much.”

WOMAN: “I also stopped by the Mercedes dealership and saw the new 2005 models. I saw one I really liked.”

MAN: “How much?”

WOMAN: “$65,000.”

MAN: “OK, but for that price I want it with all the options.”

WOMAN: “Great! Oh, and one more thing…. The house we wanted last year is back on the market. They’re asking 950,000.”

MAN: “Well, then go ahead and give them an offer, but just offer $900,000.”

WOMAN: “OK. I’ll see you later! I love you!”

MAN: “Bye, I love you, too.”The man hangs up. The other men in the locker room are looking at him in astonishment.

Then he smiles and asks: “Anyone knows whose phone is this?

« Previous PageNext Page »