10 Aralık 2010 Cuma

mount a usb to a sun virtual machine

lease follow the steps below:

1) Insert the usb disk which you want to mount to the sun virtual box.

2) In the sun virtual box user interface press the "settings" in the operating system that you want to study.

3) Press "Usb" in the settings menu. Press "Add filter From Device (Alt-Ins)".

4) The list of the usb devices will be shown after you press "Add filter from device" button. Select the usb device that you want to insert.

5) Hit "ok" to save the modifications.

6) Start the operating system that you want to work with.

7) After all, you have to "mount" the usb folder to a folder in your operating system. In the /dev folder you have to observe the "sda" folder which is the folder for the usb device. The name of the folder shall not be sda. It shall be "sda", "sda1", "sda2",.. or "sdb", "sdc" etc.

8) Then, you have to create a folder to map the usb device folder. Threrefore, run the command below in the command line:

[code]
mkdir   /mnt/sda1
[/code]

This command means that in the mnt folder we created a folder named "sda1". This is the folder that we will map the device.

9) Finally, enter the command in the command line:


[code]
mount    /dev/sda1      /mnt/sda1
[/code]

In this command the device mapped to a folder in your own system.

Now, you are ready to get and add folders to your usb disk.

20 Kasım 2010 Cumartesi

Strict Standards: Non-static method JLoader::import() should not be called statically


after deleting the "installation" folder and opening the website what I observe is:

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\joomla\import.php on line 29

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\joomla\import.php on line 32

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::load() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\loader.php on line 161

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\loader.php on line 138

Strict Standards: Non-static method JRequest::clean() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\joomla\import.php on line 33

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\joomla\environment\request.php on line 463

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\joomla\environment\request.php on line 464

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\joomla\environment\request.php on line 465

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\joomla\environment\request.php on line 466

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\joomla\environment\request.php on line 467

Strict Standards: Non-static method JRequest::_cleanArray() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\joomla\environment\request.php on line 468

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\joomla\import.php on line 35

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\joomla\import.php on line 38

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\loader.php on line 71

Strict Standards: Non-static method JLoader::import() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\joomla\import.php on line 39

Strict Standards: Non-static method JLoader::register() should not be called statically in C:\Program Files\EasyPHP-5.3.2\www\infinity\libraries\loader.php on line 71


SOLUTION:

open the "php.ini" file in the EasyPHP-5.3.3.1/conf_files/ and make the changes below:


1) change
Code:

Kod:
error_reporting = E_ALL | E_STRICT

by
Code:

Kod:
error_reporting = E_ALL & ~E_STRICT


2) change
Code:
Kod:
display_errors = On

by
Code:
Kod:
display_errors = Off


Warning : Be sure your error_reporting and display_errors variables are the last one to be read in the php.ini file, else yours could be overwritten by default values.
Furthermore, you can leave var $error_reporting = '-1'; unchanged in joomla configuration.php

Installing Joomla_1.5.22 using EasyPHP-5.3.3.1 a problem in the database section

I'm trying to install joomla with using easyphp. While I opened localhost website I follow the procedure for the joomla installation procedure. However, when I reach to database section I enter

localhost to "hostname" field
root to "user" field
I left the password field empty.
I enter the database that I want to use

After all these steps have been done, I hit "next" button. However, the ftp website is not opening.

The reason for this problem is "localhost" is not defined in the "hosts" file in the "C:\Windows\System32\drivers\etc" directory. Open this file and add 

127.0.0.1       localhost

Then, try again.

10 Kasım 2010 Çarşamba

error C3861: 'GetCursorPos' 'SetCursorPos': identifier not found c++

In c++ coding language and try the code snippet below, you will have an error such as below:

error C3861: 'SetCursorPos': identifier not found.

[code]
void function()
{
int xCoord = 234;
int yCoord = 345;
SetCursorPos(xCoord,yCoord);
}
[/code]


If you get such an error try to write the code below:
[code]
void function()
{
        int xCoord = 234;
int yCoord = 345;

System::Windows::Forms::Cursor::Position = Point(xCoord , yCoord );
}

[/code]

9 Kasım 2010 Salı

fatal error LNK1104: cannot open file 'cv.lib' when using openCV2.1

When I compile this code I get an error: 
[error]
fatal error LNK1104: cannot open file 'cv.lib'
[/error]

In this situtation go to the
project -> *properties -> Configuration Properties -> Linker -> Input -> Additional Dependencies

and add

"cv210d.lib" "cxcore210d.lib" "highgui210d.lib"

for debug option.


and add 

"cv210.lib" "cxcore210.lib" "highgui210.lib"

for release option.

[code]
// OpenCV_Helloworld.cpp : Defines the entry point for the console application.
// Created for build/install tutorial, Microsoft Visual C++ 2010 Express and OpenCV 2.1.0

#include "stdafx.h"

#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
#include <iostream>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
        IplImage *img = cvLoadImage("C:\\work\\kn.jpg",1);
if(img == NULL)
{
cout << "error" << endl;
}
        cvNamedWindow("Image:",CV_WINDOW_AUTOSIZE );
        cvShowImage("Image:",img);

        cvWaitKey();
        cvDestroyWindow("Image:");
        cvReleaseImage(&img);

        return 0;
}
[/code]

8 Kasım 2010 Pazartesi

helloworld application for OpenCV

Below is given a code snippet which loads an image in your computer with the function cvLoadImage and displays it in a new window.

[code]
#include <cv.h>
#include <cxcore.h>
#include <highgui.h>
#include <iostream>
using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
        IplImage *img = cvLoadImage("C:\\work\\kn.jpg",1); //if the image is opening as a gray image rather than the image you want please make sure that the address of the image is true. You can check whether the image path is true or not by checking if the pointer *img is null or not.
if(img == NULL)
{
cout << "error" << endl;
}
        cvNamedWindow("Image:",CV_WINDOW_AUTOSIZE );
        cvShowImage("Image:",img);

        cvWaitKey();
        cvDestroyWindow("Image:");
        cvReleaseImage(&img);

        return 0;
}
[/code]