Wednesday, November 18, 2009

How do I add /3gb to boot.ini in XP Home SP3 32-bit

right click My Computer and select Properties. Click the Advanced and choose Settings under Startup and Recovery. In the window that loads click Edit to add the /3GB switch manually.

How to Downgrade from Vista into XP

Use Fdisk to delete all the partitions.

Format the C:

In the Bios change Sata Controller Mode from AHCI into Compatability.

Install Windows XP

Saturday, September 26, 2009

Converting EndNote References into BibTex Format

It is easy to convert references from your EndNote library into BibTeX format. This technique can also be used when a database does not support download in BibTeX format. In such cases, download the references to EndNote and then convert them into BibTeX.

Select the references in your EndNote library which you want to convert to BibTeX.

Go to the EndNote Style Manager, and select the style BibTeX Export.

Click on File and select Export.

When the dialog box opens, choose a name for your file and the location where you wish to save it. The file must be a text file (*.txt). In recent versions of EndNote, you must select the output style at the bottom of the Export File Name dialog box.

Open this file in a plain text editor (e.g. Notepad) to confirm that it is in BibTeX format. Close the file and change the name to BibTeX format, e.g. myrefs.bib

Wednesday, July 8, 2009

How to create C++ DLL and use it in VBA?

To create a new dynamic link library (DLL) project

  1. From the File menu, select New and then Project….

  2. From the Project types pane, under Visual C++, select Win32.

  3. From the Templates pane, select Win32 Console Application.

  4. Choose a name for the project, such as DLL3, and enter it in the Name field. Choose a name for the solution, such as DLL3, and enter it in the Solution Name field.

  5. Press OK to start the Win32 application wizard. From the Overview page of the Win32 Application Wizard dialog, press Next.

  6. From the Application Settings page of the Win32 Application Wizard, under Application type, select DLL if it is available or Console application if DLL is not available. Some versions of Visual Studio do not support creating a DLL project using wizards. You can change this later to make your project compile into a DLL.

  7. From the Application Settings page of the Win32 Application Wizard, under Additional options, select Empty project.

  8. Press Finish to create the project.


To add a class to the dynamic link library

  1. To create a header file for a new class, from the Project menu, select Add New Item…. The Add New Item dialog will be displayed. From the Categories pane, under Visual C++, select Code. From the Templates pane, select Header File (.h). Choose a name for the header file, such as DLL3.h, and press Add. A blank file will be displayed.

  2. Use same steps in (1) to add .cpp file (for the code) and .def file (for the functions and subroutine names to be used in VBA).
Note: __stdcall is required for any C/C++ function that you want to use with VB.

Calling a DLL C++ function from a VB application

DLL3.h

__declspec(dllexport) double __stdcall Multiply(double a, double b);

DLL3.cpp

#include "DLL3.h"

__declspec(dllexport) double __stdcall Multiply(double a, double b)
{
return a * b;
}


DLL3.def

EXPORTS
Multiply

VBA CODE

Private Declare Function Multiply Lib "PATH\DLL3.dll" (ByVal n1 As Double, ByVal n2 As Double) As Double

Sub testDLLFunctions()

Dim r As Double
r = Multiply(5, 6)
MsgBox r

End Sub

Calling a DLL C++ class from a VB application

http://www.codeproject.com/KB/DLL/XDllPt3.aspx


Monday, May 18, 2009

Extension creation main steps (as a folder)

1-create the file chrome.manifest at the top of your extension's folder (with the values , overlays)

2-create the file install.rdf at the top of your extension's folder (with the values, information about the extension)

3-Locate your default profile folder.(C:\Documents and Settings\eyad\Application Data\Mozilla\Firefox\Profiles\mz8tjh1o.dev\extensions)

4- inside this directory create a file with the extension id as its name (e.g. iyad@iyad.net), then inside this file point where is the extension located in the harddisk (D:\FirstExtesnsion\helloworld\)

5- to add the javascript files add the file name in clc_utilsOverlay.xul

To package extension just zip the contents folder and rename the extension into xpi

NOTE: in FireVox the main file for mathML rules are clc_mathml_main.js located in clc-utils\chrome\content\clc_utils

Thursday, April 23, 2009

Clustering Libraries

Java : Weka
C++ : Cluto

Thursday, April 9, 2009

Running OpenGL program

remove #include "stdafx.h"
from the project properties, C/C++ => precompiled headers
select Not Using Precompiled Headers

and then just run the OpenGL program (notice that you already added the GL and Lib files into VC\Platform SDK\..)