Emulating Windows

Linux, Ubuntu, İş Hayatı 4 Yorum »

Today i needed to emulate the windows Xp, because i needed to use Internet Explorer 6.

I know using explorer 6 stupid but every computer not smart as i am or as the majority. We need to test our project on İnternet Explorer 6. I don’t like Internet Explorer (all the versions), even i don’t like Windows. I did like it someday, but it was really long time (about 9 years) ago.

After saying these all, if i said installing windows xp instead of my beautiful Linux distribution, you could easily say stupid to me. Firstly, i wanted to use Vmware-server but i couldn’t find any installation candidate at repositories. Then i started to download from its site. But i found out there is an alternative virtual machine tool called VirtualBox.

I easily installed from my distro’s add & remove programs, then i installed windows xp from its iso file. It was even faster than installation to real machine. Here is a screenshot :

Emulated Windows

Türkçesi :

Bugün internet explorerı kullanmam gerektiği için, windows xp yi linux üzerinde emülatörle çalıştırmam gerekti.

İnternet explorer 6 ya ihtiyaç duymanın salakça olduğunu biliyorum ama herkesin benim ve çoğunluk kadar zeki değil. Projemizi internet explorerda test etmemiz gerekiyordu. İnternet explorerı sevmiyorum, hatta windowsuda sevmiyorum. Bir zamanlar severdim ama bayağı bir önceydi bu (yaklaşık 9 yıl önceydi).

Eğer bunca şeyi söyledikten sonra benim güzel linux dağıtımımın yerine windows xp yi kurduğumu söyleseydim, benim hakkımda kolayca salak diyebilirdiniz. Öncelikle Vmware-server’ı kurmak istedim ama depolarda kurmaya aday bir paket bulamadım. Ardından sitesinden indirmeye başladım. Fakat Virtualbox diye alternatif bir araç olduğunu öğrendim.

Kolayca dağıtımımın program ekleme & kaldırma programından kurdum ve windows xp’yi iso dosyasından kurdum. Boş bilgisayara kurmaktan bile hızlı kurdu. Ekran görüntümüzde yukarıda…

Core’u geniş Tutki Patlamasın :) (Segmentation Fault Core Dumped C++)

Belçika, C/C++, Linux, Programlama 4 Yorum »

İngilizce bilen kardeşler için bir açıklama yapayım :D
( maksat sitenin gavur ziyaretçiside olsun :D )

For English Press 9:

I was coding a small program on C++ then I have the error;
master@slave:~/project/oop2$ g++ MyString.cc MyString.h -o trial
master@slave:~/project/oop2$ ./trial
Segmentation fault (core dumped)

It was because using a pointer without specifying its borders. It grows and grows then it violates the memory addresses belonged by other variables, methods or what ever. The solution is simple just reserving the needed memory. So how to do that? The answer is also simple. You should allocate the memory using malloc() function which is both available in C and C++.

for example you need a pointer to put inside 100 int.
int somenumber = 100; // the number of integer you will put in pointer
int *intPointer;
intPointer = (int *)malloc(somenumber * sizeof(int));
// malloc function needs the byte value of the needed area in memory
// that’s why you should multiply it with the byte value of an integer
// it is generally 4 in 32-bit and 64-bit processor aimed compilers

Don’t press 8 it is for Dutch :D, my Dutch is still poor,
Press 7 for Turkish :)

Evet Türkçesine gelince olayın, Tercüme edin Allah Allah, beni uğraştırmayın :).
Neyse ben biraz bahsedeyim yine :);

Yazdığım programda bir adet int pointer kullanıyordum (çok adet te bir tanesi patlıyordu :)) ve bu memoryde sınırlarını zorluyordu, hatta altüst edip programımı öldürüyordu. Aslında çok basit bir problem ama yeni başlayanların ve benim gibi unutup tekrar hatırlayanların sık karşılaştıkları ve harşılaşacakları bir problem bu.
Tek yapılması gereken ise işinize yarayacak kadar memory’i o değişken için ayırmanız. Bu işlem için örnek kod yukarda.
Umarım googledan gelen arkadaşların işine yarar, ve bana bol bol ziyaretçi getirir :D

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in