December 28, 2009

Microsoft Access SQL to calculate the time from midnight in minutes, seconds, etc.

Filed under: Access,Database,Sample code,Software Development — mariojump @ 10:00 pm

MS Access SQL to find the time from the midnight.

MS Access’s timestmap values consist of integer part (number of days from
the certain date), and fractional part (e.g. 6am = 6/24 =0.25 day
from midnight.).

By using this, we can run a query like:

´╗┐my_timestamp_column – INT(my_timestamp_column) AS Time_From_Midnight,
/* note: date part will be lost */

INT((my_timestamp_column – INT(my_timestamp_column))*24*60*60) AS

INT(INT((my_timestamp_column – INT(my_timestamp_column))*24*60*60 ) /
60) AS Minutes_From_Midnight

FROM my_table_with_timestamp;

December 26, 2009

Re-installing GRUB Using Ubuntu Live USB

Filed under: Linux,Linux memo,Ubuntu — mariojump @ 1:24 am

GRUB can be re-installed using Ubuntu Live CD (or Live USB).
I had to do this after upgrading Vista to Windows 7, as Windows 7 installer wiped off the GRUB for Ubuntu and Vista.

Even if your HDD-Installed Ubuntu is 64bit, either 32bit or 64bit Live CD/USB can be used.

You need to know which partition you had GRUB. Mine had /boot in a partition /dev/sda6, and it made me enter:
root (hd0,5)

Here’s the step.

ubuntu@ubuntu:~$ sudo grub
Probing devices to guess BIOS drives. This may take a long time.

[ Minimal BASH-like line editing is supported. For
the first word, TAB lists possible command
completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> device (hd0) /dev/sda
device (hd0) /dev/sda
grub> root (hd0,5)
root (hd0,5)
grub> setup (hd0)
setup (hd0)
Running “embed /grub/e2fs_stage1_5 (hd0)”… 17 sectors are embedded.
Running “install /grub/stage1 (hd0) (hd0)1+17 p (hd0,5)/grub/stage2
/grub/menu.lst”… succeeded

If you use Ubuntu 9.10 Live, whose default is GRUB2, you may need to use GRUB2, or install GRUB.
My Ubuntu 9.10 was originally upgraded from 9.04, so I installed GRUB to Ubuntu 9.10 live USB.

Origo – Software Development Hosting Site for Both Open and Non-open Source Projects.

Filed under: Useful sites — mariojump @ 12:51 am
Tags: ,

There is another software development hosting site, which allows non-open (closed) source code and open source projects, Origo.

December 23, 2009

ProjectLocker – Subversion hosting service

Filed under: Useful sites — mariojump @ 8:43 am
Tags: , ,

There are many free project hosting services with source code repositories/version control systems for open source projects, like SourceForge or Google Code.

For non-open source projects, there doesn’t seem to be many choices, according to the charts below.

Subversion (SVN) Hosting Comparison

I will try ProjecLocker for now.

December 18, 2009

McAfee Virusscan Enterprise 8.5i – “Update failed to version Engine: 5400.1158”

Filed under: Uncategorized — mariojump @ 11:48 pm
Tags: , ,

In the last few weeks, McAfee Virusscan Enterprise (VSE) 8.5i on Windows XP was showing an error message, “Update failed to version Engine: 5400.1158”.

While ago, this machine also had trouble updating the engine, which I fixed by following the instruction at:

This time, I couldn’t find any info about the engine 5400.1158 in the McAfee support site, except McAfee community site.

So, I uninstalled McAfee VSE, then re-installed. It started updating its engine successfully.

December 17, 2009

Allowing root to remote-login via ssh

Filed under: Linux,Linux memo — mariojump @ 2:16 pm

In order to allow a root user to ssh-login, modify:

In this file, find a line:
PermitRootLoging no

and change it to

PermitRootLoging yes

Then, restart sshd.
Because of the security reasons, it is recommended that this change is done temporarily.

December 12, 2009

system-config-display — X configuration tool

Filed under: Linux,Linux memo — mariojump @ 12:17 am

system-config-display is an X configuration tool.

It allows you to set the display resolution, etc.

WinSCP Script – Sample

Filed under: Sample code — mariojump @ 12:00 am
Tags: ,

WinSCP has a scripting feature.
For example, if you create a batch file, which contains:

"c:\Program Files\WinSCP3\WinSCP.exe"
/script=c:\winscpscript\testscript.txt /log=c:\winscpscript\log.txt

Then, create a script file (in this example, c:\winscpscript\testscript.txt.)

# Execute with winscp.exe /script=this_filename /log=logfile.txt
option batch abort
option confirm off
# Use the ip address of your SFTP server, instead of
open sftp_login_name:the_password@

#In order to "cd" or "lcd", use these lines.
cd server_side_directory
lcd c:\client_side_directory

# Normal GET
get Get_This_File

# If you want to save as another filename:
get Get_This_File Get_This_File_local

# If you want to remove the remote file after downloading:
get -delete Get_This_File c:\client_side_directory\Get_This_File_local

# Upload sample script line
put upload_this_file remote_filename

# If you want to rename the remote filename after uploading:
mv remote_filename remote_filename_renamed


December 10, 2009

IPTraf – Network Monitor

Filed under: Linux — mariojump @ 2:07 pm
Tags: , ,

IPTraf is a network monitor tool.

It can be installed with:
$ sudo apt-get install iptraf

To run IPTtraf,
$ sudo iptraf

lspci command

Filed under: Linux — mariojump @ 1:34 pm
Tags: , , ,

lspci is a command to list all PCI devices.

# lspci -vv

displays detailed information about the PCI devices.

Next Page »

Blog at