Ana içeriğe atla

Kayıtlar

Php urlencode and Curl

I struggle again with curl and html parsing. The VIEWSTATE variables are sometimes hard to deal with. Strange enough, php and curl adds +%0A to the end of an urlencoded variable. And as you might guess this poisons the VIEWSTATE mechanism. A workaround that I used is to trim +%0A at the end of urlencoded strings by substr function.

Clonezilla and Windows XP cloning

This was a long and tiring day.I learned a lot about clonezilla and windows xp. I first tried to clone partitions and whole disks in different ways. In clonezilla terms these are device to image file or device to device. I couldnt much succeded in device to device option. May be due to lack of reading howto and wiki. Clonezilla first asks the device or place where  the image is going to be stored or read from. That comes to me weird at the beginning to me but later I got used to it. I cloned partitions or disks to images which are located in usb disks,local disks or even on an ssh server.This was fun. Then when it comes to restore the problems begin :) .OK. Yes there are some problems which are behind the doors and waiting you after or while restoring images. Firstly Clonezilla cant restore to a smaller hard drive or partition. To make it restore to a smaller drive in FAQ it is stated that one must use gparted or else to shrink the original partition before making the image. So thi...

Windows 7 Windows Explorer fix

On a computer when right clicked on the desktop one was getting the alert saying that "Windows Explorer stopped working.Trying to find solutions.." etc. I first tried to do "sfc /scannow" on a root command prompt which gave that everything is OK. Then I started investigating the cause of Windows Explorer's crash by navigating through Event Viewer. And I found entries which clued that explorer.exe's crash is due to shell extensions dll file. Then I realised that there is a good shell extensions viewer provided free by Nirsoft at http://www.nirsoft.net/utils/shexview.html. Thanks to these guys I used the program and found the third party extension which I guess infected by a malicious program. First disabled it and checked that if it causes the crash, then removed the Registry keys of it. Voila now the explorer.exe is working just fine.  

VirtualBox 4.0 Closed Source Edition On Ubuntu Server 10.10

Ok trying to configure a windows xp guest on this server, I did the directions on the manual at virtualbox.org. I used VBoxHeadless which is great for a server environment. Previously I tried virtual OSE provided by Ubuntu repos whose version is 3.2.8 at the time.But it seemed that OSE doesnt support vrdp although here is a post claiming otherwise http://forums.freebsd.org/showthread.php?t=13499. Then I decided to install closed source edition from the provider according to this post http://www.howtoforge.com/vboxheadless-running-virtual-machines-with-virtualbox-4.0-on-a-headless-ubuntu-10.10-server.Everything worked fine and I installed the guest host. Then I noticed that there are two mouse pointers and the resolution is not adjustable. Then after some work I reinvented (remembered) that one must need to install guest additions thing too. After installing it now the machine working nice.

Getting along with Django

These days I am tackling with Django on a centos server. I installed django package downloaded from its site.Started a simple app. Now trying to use database mysql. When it ocmes to mysql I needed to install some packages like mysql-devel,python-devel and most importantly MySQL-python (notice the capital letters). An older version of this is in centos stable repos.After some search I learned I can install it in different ways like compiling or using test repo.I chose the former and installed python-setuptools. And then I realised that there is easy_install in this package which helps me installing the required MySQL-python package. And voila.

Getting along with JQuery,Validation,Masked Input

JQuery is a nice library with whom I havent played till yesterday. Since yesterday I am struggling with this nice library, actually not solely with it but with validation plugin. That plugin is nice too but when it comes to integrating it with another plugin which you guess Masked Input, I was having problems. Because my form is dinamic and I am adding elements whose names are the as previous ones, I have struggled a lot. But at the end I did what I wanted to do. This jQuery.validator.addMethod("acceptreg", function(value, element, param) {   return value.match(new RegExp("^" + param + "$")); }); small code piece helped me a lot when validating text and phone fields and their integration with Masked Input. I know validation plugin normally does validate against phone but my case was different. I declared such a method as described above and used it inside with tel: { required: true, minlength:11, maxlength:11,acceptreg: "[0-9]{3}-[0-9]{7}" }, I d...