bookmark_borderBangla to Hex

Here is my Bangla to Hex converter using php and little ajax. Thanks to Mr. Jamil for giving me this idea.

index.php

<html>
<head>
<script type=”text/javascript” src=”ajax.js”> </script>
</head>
<body>
<div align=”center”><h1>Bangla HEX</h1></div>
<div align=”center”>salahuddin66.blogspot.com</div>
<br><br>
<form>
Input in UTF-8: <input type=”text” name=”input” onkeyup=”show(this.value)”>
</form>
<p>Hex: <span id=”txtHint”></span></p>
</body>
</html>


ajax.js

var xmlHttp

function show(str0)
{
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
{
alert (“Browser does not support HTTP Request”)
return
}
var url=”show.php”
url=url+”?q=”+str0
url=url+”&sid=”+Math.random()
xmlHttp.onreadystatechange=stateChanged
xmlHttp.open(“GET”,url,true)
xmlHttp.send(null)
}

function stateChanged()
{
if (xmlHttp.readyState==4 || xmlHttp.readyState==”complete”)
{
document.getElementById(“txtHint”).innerHTML=xmlHttp.responseText
}
}

function GetXmlHttpObject()
{
var xmlHttp=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
{
//Internet Explorer
try
{
xmlHttp=new ActiveXObject(“Msxml2.XMLHTTP”);
}
catch (e)
{
xmlHttp=new ActiveXObject(“Microsoft.XMLHTTP”);
}
}
return xmlHttp;
}

show.php

<?php

$q=$_GET[“q”];

unibin2hex($q);

function unibin2hex($u) {
$k = mb_convert_encoding($u, ‘UCS-2LE’, ‘UTF-8’);

$position = 0;

$run = strlen($u)/3;

for($i=0; $i

bookmark_borderHDD Partitioning in Linux

Technically, a hard disk should contain either as many as four primary partitions, or one to three primaries along with a single extended partition. Each of these partitions are described by a 16-byte entry in the Partition Table which is located in the Master Boot Record.

src: http://en.wikipedia.org/wiki/Partition_(computing)

Many poeple confused with Linux partitioning system when they are installing Linux for the first time. In linux they see hda1 then hda5 but they are familiar with C:, D: etc

your HDD can be recognize by hda, hdb,hdc,hdd, sda, sdb etc depending on the master, slave and cable position. Here i am describing with hda


A HDD with 4 Primary Partitions


here hda4 is the full extended partion so extended partition start from hda5

generally a windows / most of the PC has this type of partition system.

here hda2 is the full extended partion and hda3 and hda4 are reserved as we can create 2 more primary partitions so extended partition start from hda5

Extended partition generally start from hda5

so if anyone want to install linux in his G: drive then he need to delete the hda8 then create 2 partitions

one swap space (it can be compare with windows virtual memory) ram * 2 (size recomanded) and another root / partition.

Note: I would suggest to create swap first then root / partition and at the last of the HDD sector more then or at least 8 MB free unallocated space. When user need to reinstall windows sometimes it creates problem, if there is no free unallocated space.

bookmark_borderRecover GRUB after reinstall windows

Boot using a Live CD or Installation CD.

mount your linux partition. Chroot, mount /proc and give the grub specific command to overwrite or update the mbr or where you want.

like my Linux root in /dev/hda6

after boot with the Live CD

#mkdir /mnt/lin (create a folder to use as a mount point)
#mount /dev/hda6 /mnt/lin
#chroot /mnt/lin
# mount /proc
#grub-install /dev/hda
or
#update-grub

the update-grub and grub-install command will work of Debian, Ubuntu and Debian based distro. If your are using other distribution. Read their grub policy and command. Here chroot will enable you to access the existing Linux system using the live CD kernel.

note: If you use normal Installation CD to recover grub then you might need to give the path known by the kernel. Like then you may need to use ../disc0/part4/ etc instead of /dev/hda6. You can find the exact path by execution a script called os-prober that generally comes with the installation CD of Debian.

bookmark_border./config.guess: No such file or directory

today i was trying to compile gaim, I installed autoconf, automake and other necessary libs to compile but it show me

salahuddin@debian:~/Desktop/compile/gaim-1.5.0$ ./configure
checking build system type… /bin/sh: ./config.guess: No such file or directory
configure: error: cannot guess build type; you must specify one

later I found it is a err of automake in my Debian testing

debian:/home/salahuddin/Desktop/compile/gaim-1.5.0# automake –add-missing
configure.ac:5: version mismatch. This is Automake 1.10,
configure.ac:5: but the definition used by this AM_INIT_AUTOMAKE
configure.ac:5: comes from Automake 1.9.5. You should recreate
configure.ac:5: aclocal.m4 with aclocal and run automake again.
configure.ac:38: required file `./config.rpath’ not found
configure.ac:3: installing `./config.guess’
src/protocols/gg/Makefile.am:7: compiling `libgg.c’ with per-target flags requires `AM_PROG_CC_C_O’ in `configure.ac’
Makefile.am: required file `./README’ not found
Makefile.am: installing `./COPYING’
configure.ac:1201: required file `plugins/Makefile.in’ not found
configure.ac:1201: required file `plugins/docklet/Makefile.in’ not found
configure.ac:1201: required file `plugins/gevolution/Makefile.in’ not found
configure.ac:1201: required file `plugins/gaim-remote/Makefile.in’ not found
configure.ac:1201: required file `plugins/gestures/Makefile.in’ not found
configure.ac:1201: required file `plugins/perl/Makefile.in’ not found
configure.ac:1201: required file `plugins/perl/common/Makefile.PL.in’ not found
configure.ac:1201: required file `plugins/ssl/Makefile.in’ not found
configure.ac:1201: required file `plugins/tcl/Makefile.in’ not found
configure.ac:1201: required file `plugins/ticker/Makefile.in’ not found
configure.ac:1201: required file `sounds/Makefile.in’ not found
Makefile.am:43: required directory ./plugins does not exist
Makefile.am:43: required directory ./sounds does not exist
debian:/home/salahuddin/Desktop/compile/gaim-1.5.0#

The problem solved & now while i give ./configure

salahuddin@debian:~/Desktop/compile/gaim-1.5.0$ ./configure
checking build system type… i686-pc-linux-gnu
checking host system type… i686-pc-linux-gnu
checking target system type… i686-pc-linux-gnu
checking for a BSD-compatible install… /usr/bin/install -c
checking whether build environment is sane… yes

bookmark_borderInstall Debian GNU/Hurd


I have installed Debian GNU/Hurd in my PC for testing.

(i am installing in hda1)
#mke2fs -b 4096 -o hurd /dev/hda1
#mount -t ext2 /dev/hda1 /gnu
#cd /gnu
#tar –same-owner -xvjpf ~/gnu.tar.bz2

I add in my /boot/grub/menu.list

title Debian GNU/Hurd
kernel (hd0,0)/boot/gnumach.gz root=device:hd0s1 -s
module (hd0,0)/hurd/ext2fs.static –multiboot-command-line=${kernel-command-line}
–host-priv-port=${host-port} –device-master-port=${device-port}
–exec-server-task=${exec-task} -T typed ${root} $(task-create)
$(task-resume)
module (hd0,0)/lib/ld.so.1 /hurd/exec $(exec-task=task-create)
savedefault

Here Hurd has not yet been configured, it must be started in single user mode. Adding a `-s’.
Assuming that the first drive (i.e. `(hd0)’) is the master on the primary controller.

boot into your Hurd system. give “login root”

>login root
# export TERM=mach

to setup packages and hurd
# ./native-install

reboot and edit /boot/grub/menu.list (just remove the -s option) the grub you are using at that time.

title Debian GNU/Hurd
kernel (hd0,0)/boot/gnumach.gz root=device:hd0s1
module (hd0,0)/hurd/ext2fs.static –multiboot-command-line=${kernel-command-line}
–host-priv-port=${host-port} –device-master-port=${device-port}
–exec-server-task=${exec-task} -T typed ${root} $(task-create)
$(task-resume)
module (hd0,0)/lib/ld.so.1 /hurd/exec $(exec-task=task-create)
savedefault

boot the hund again and give the ./native-install again to finish the setup.

GNU Hurd Link
Debian GNU/Hurd install Link
Hurd Live CD Link