Sunday, December 13, 2009

Thunderbird and Yahoo

1- Download YPops (POP3 server to access Yahoo), and follow instructions in the link

http://ypopsemail.com/documentation/37-email-configuration/60-thunderbird

Important: Choose None from the security check, otherwise it will not work

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\..)

Sunday, March 29, 2009

How to normalize data points to be within specefic range?

(score - min) / range, range is abs(Min)+abs(Max)
this will give always numbers between 0 and 1

score / (range/2) will normalize numbers between -1 and 1

This can be used if you want to graph a set of points on a limited workspace like a computer screen.

Thursday, March 5, 2009

Conference Paper Writing Notes

* write the abstract lastly. Remember, a good abstract should contain the purpose of the study, the methods used, the results and the conclusions. Why it is important? What you did? How you do it? Which method is used? Results.

Are you writing an abstract for the publication or have I misunderstood? If so, here are a few questions that may help focus the mind (none of your answers can be more than 50 words):
1. list 3-5 readers;
2. What did you do?
3. Why did you do it?
4.What happened?
5 What do the results mean in theory?
6. What do the results mean in practice?
7.What ... Read Moreis the key benefit (to the reader)?
8. What remains unresolved? the 50 word limit is a very good exercise in being clear and conscise.


* In the introduction
what's, why, what's new.
identify problem, identify strength and weakness of existing strategies, summary of results

At the end describe the problem and what are the difficulties? so for each problem you identify you will need references to someone that discusses such problem.

without going into details, identify strengths and weaknesses of
the existing approaches

summarize your contributions to the problem, with special
highlight of what is really novel;

1- Don't insult other work in the field, instead take advantage of approaches used before.
2-Describe the term before using it.
3-instead of listing previous work , group them according to what approach they follow. Also, give the reason of weakness of the approach if any.
4- include any diagram, pseudo code that describes the work.
5-describe system components in abstract (top level view) and then give details about each component.
6-Re-Read.
7- If introducing new methods give examples to explain how they can be applied.
8-emphasize the motivation behind the chosen design, possibly contrasting it
with other options); you will need to convince the reader why this is the
right approach.
9-You are not writing a user manual but a methodology

General Notes:
when you use 'e.g.' and 'i.e.' they always need to be followed by a comma (e.g., and i.e., )

never use short forms like don't or isn't in a paper (you always write do not and is not)

Never say easy or difficult without giving a details to the user (better to not say them, just describe the methodology and the user will identify the easy or difficulty of your description).

Notes in Case you have user studies:

1- The goal of the study (what do you want to measure)

2- Characteristics of the users you are using in the study.

3- Conditions in which the experiment is performed.

4- How you are conducting the experiment and how you are measuring the data.

5- Analyze the data collected and draw conclusions.

Sunday, February 22, 2009

ماذا يعني ان "تحمل مليون دولار في صحراء قاحلة

عن مدونة محمد عمر

كان معي مبلغا "كبيرا" من المال، حوالي ثلاثة آلاف ليرة لبنانية. صرفت ليّ القوى الأمنية المشتركة راتب شهر مقدما حتى استطيع شراء أكل باي طريقة. احمل المبلغ في جيبي لعل وعسى أجد محلا ما مفتوحا اشتري منه علبة تونا او علبة مرتديلا. لا شيء.

ماذا يعني ان "تحمل مليون دولار في صحراء قاحلة"، يقول مراسل قناة العربية عن مهزلة هدنة غزة التي قررها "جيش الرب" لثلاث ساعات يوميا.

ماذا يعني ان تدخل شقة شبه مدمرة. وترى ذهبا ومجوهرات تركها سكان الشقة. تترك كل متاع الدنيا هذا لتبحث عن كسرة خبز او مرطبان مربى او مخلل او ما تبقى من مونة البيت او ملابس داخلية نظيفة، او بقية ماء في المواسير او الخزانات لتبل ريقك وتغسل وجهك وتمسح جسمك او بطاريات لتستمع للإذاعة...

ماذا يعني ان تستمع للإذاعة؟ لتعرف أين يكمن الموت القادم. او متى ستبدأ الهدنة التي قررها مبعوث سيد البيت الأبيض، فيليب حبيب، بالتشاور مع شفيق الوزان، رئيس وزراء لبنان آنذاك، وارييل شارون.. ام لتسمع ما إذا كان "العرب" نظموا يوم غضب احتجاجا على الموت العبثي والمجاني والة الحرب وجنود جيش الرب.

عندما غادرنا بيروت عرفنا أن الشعب الجزائري تظاهر بمئات الآلاف احتجاجا على خسارة فريقه الوطني ظلما أمام منتخب ألمانيا في بطولة كأس العالم. عرفنا ان المئات من العرب والإيرانيين ابدوا استعدادهم او هم تطوعوا للقتال إلى جانبنا. ماذا كان يعنينا لو عرفنا هذه المعلومة ونحن تحت الحصار مثلا؟

ماذا يعني أهل غزة الآن، كل هذا البث المباشر لموتهم؟ هل يعنيهم هذا بشيء كما كان يعنينا في بيروت. هل يفيدهم بشيء أم أنها "لعبة الإعلام" ولعبة الرجال الأطفال وهم بما لديهم فرحون. ماذا يعني المحاصر ان يرتفع ضغط دم المواطن العربي او يصاب بجلة وهو يشاهد البث المباشر لمراسلين فرحين بإتقانهم "لواجبهم المهني"...

ماذا يعني ان تكون محاصرا وتعرف ان قرية "العزيرية" في جنوب الواق الواق انتفضت تضامنا معك، وأنت لا تستطيع ان ترى او تسمع شيئا عن زوجتك او حبيبتك او طفلك الذي لا يبعد عنك سوى أمتارا معدودات.

يقول أب غزيّ لمراسل قناة "الجزيرة" أمس. أنا هنا مع طفلي الجريح لكني لا اعرف ماذا يحدث لزوجتي وبقية أطفالي الذين تركتهم في البيت..

ويقول الطبيب الغزي الذي استشهدت زوجته الاوكرانية وابنه :" أنا هنا في المستشفى مع ابني الجريح، لكن أشلاء زوجتي وطفلي الآخر لا تزال في المنزل ولا اعلم ولا استطيع ان اذهب الى هناك لا اعرف ما حصل معهما او لأجمع أشلائهم للدفن...".

ماذا يعني المحاصر ان تنقل له الفضائيات كل العالم وهو لا يعرف ماذا حدث بأشلاء زوجته. وماذا يعني المحاصر عندما لا يستطيع ان يرسل برقية لطمأنة أهلة في الأردن من بيروت الغربية. ماذا يعني المحاصر كل "ثورة الانفو ميديا" هذه...

ماذا يعني المحاصر ان يشاهد الغضب العربي، والمحللين العسكريين والسياسيين الذين انهزموا في عشرات الحروب، وأبو مازن يتفتل بطائرات الايرباص، ونبيل عمرو يستعرض كل يوم تشكيلة جكيتات الجلد الفاخرة. والنطاقين الإعلاميين باسم "جيش الدفاع الإسرائيلي" يدافعون عن حقهم في القتل؟

هل يمتلك المحاصر ترف الماء والكهرباء والوقت ليشاهد هذا الكرنفال والبهورة الاعلامية؟

وماذا يعني المحاصر وهو يسمع هدير الغضب العربي الساطع، هذا ان امتلك ترف او وسائل السماع والمشاهدة؟.

لمن تبث هذه الفضائيات التي حولت دمنا وأشلائنا ودمارنا وأطفالنا إلى كرنفال بالألوان.؟

هل شاهد أحدكم مهرجان الألعاب النارية فوق غزة ليلا.. هل استمع أحدكم لأصوات القصف. هل شاهدتم المقاطع التي تبثها الفضائيات لعمليات القصف المصورة من قبل الجيش الإسرائيلي كلعبة اتاري..

هل شاهد أحدكم صور أطفالنا هناك. هل أصبحت فضائياتنا " سبيس تون" بزي حربي؟

عندما كنا في بيروت الغربية لم يكن يعنيني المواطن من كل مهرجان الاعلام والألوان سوى شيء واحد. متى سوف يتم التوصل الى هدنة ليخرج إلى الضوء ليبحث عن مكان فيه ماء أو طعام أقسى ما كان يتمناه المحاصر ان يعرف أين يجد متجرا مفتوحا ليحصل منه على علبة تونة وما عدا ذلك فقد كان غير ذي صلة...

لمن تبث هذه الفضائيات فضيحة موتنا العلني هذا؟.

لأهل غزة الذين لا يمتلكون كهرباء ولا بطاريات ولا ترف الوقت، أم لنصبح فرجة لشعوب العالم او للشعوب العربية المكبوتة والمقهورة لتعاني من ارتفاع في ضغط الدم والشرايين والجلطات والسكر...الخ.

هل فكر هذا الإعلام باحتياجات المحاصر. بماذا يريد؟ من سوف يرشد أب غزي لطريقة آمنة لحماية أطفاله. من يرشد أهل غزة الآن إلى طرق التكييف مع الحصار؟

هل فكر كل المراسلين والإعلاميين المنحازين وغير المنحازين، الموضوعيين وغير الموضوعيين، بأهل غزة، بماذا يريدون، بخدمة هؤلاء غير نقل جريمة إبادتهم إلى العالم...!

هل سأل إعلامي واحد أهل غزة ماذا تريدون من الإعلام؟

ماذا يعني ان يكون الاعلام موضوعيا ونزيها وغير منحاز ودقيق طالما الضحية لا تشاهد نفسها وطالما الضحية تبحث عن فرن خبز يعمل ولا تدري اين هو ولا أي الطرق الآمنة تسلك اليه.؟؟

لمصلحة من تحول هذه الفضائيات، كلها، جريمة إبادة شعب كامل إلى "قصة موت معلن"؟؟؟

سوبر مان لم يكن شجاعاً

تحت عنوان "سوبر مان لم يكن شجاعاً" عرضت مدونة "شهاب الأزهر" تقول : " من خلال احتكاكي بالأطفال لطبيعة عملي الخيري الذي أقوم به تعلمت أن أكون جاهزا وأنا معهم لأي سؤال أو أي رد مفاجئ وغير طبيعي ، وذات يوم، وبعد حكاية "طوييييييلة عريضة" عن أبطال الإسلام وعلى رأسهم سيف الله المسلول خالد بن الوليد رضي الله عنه، وقد قام الكل للوضوء لأن الصلاة اقترب موعدها جلس أحدهم بجواري وقال إنه متوضئ، ثم نظر عاليا في سقف المسجد ثم توجه إليّ بالسؤال:"هوّا سوبرمان شجاع؟؟"

- "أأ آآ..!! ليه؟، بتسأل ليه!!"

- لا أبدا...!!

- "طيب هوا أشجع والاّ سيدنا خالد بن الوليد؟؟؟.. أصل سوبرمان هوا كمان مبيتغلبش".
- "لأ طبعا.. سيدنا خالد أشجع يا حبيبي.. سوبرمان دا شخصية خيالية لا وجود لها".

سوبر مان .. أسطورة صنعها الغرب وسوق لها بحرفية

- "ما أنا عااااااااارف!!.. بس افرض كان موجود.. مين كان هيبقى أشجع من التاني؟؟؟"

- لا يا حبيبي.. سيدنا خالد بن الوليد كان هيبقى هوا الأشجع طبعا.. وهنا نظر إليّ في لهفة متطلعا إلى حيثيات الحكم، فتابعت:

- "اسمع يا حبيبي، لو فيه طريق ضلمة (مظلم) جدا.. وفيه منكم اتنين(اثنان) واحد معه لمبة(مصباح) والتاني لأ.. والاتنين مشوا في الطريق.. مين هيكون الأشجع؟؟.. فرد الجميع.. اللي ما معهوش لمبة طبعا يا أستاذ".

- "طيب سوبرمان -لو كان موجودا- معه قوة عضلية خارقة ويستطيع الطيران والغوص تحت الماء.. باختصار سوبرمان لا يهزم حسب الأسطورة.. صح؟"، فقالوا جميعا:

- آه.. صح يا أستاذ.

- طيب أيهما أشجع.. أن تقاتل والهزيمة محتملة، أم أن تقاتل وأنت لا تهزم؟

وهنا لمحت ابتسامة الفتى من بين الجميع أثناء صيحاتهم وهتافهم باسم ابن الوليد -رضي الله عنه.


علمني أشبالي أن الشجاعة لا تنبت إلا في أرض الخوف. لقد اكتشفت أن سوبرمان النبيل الذي يحارب من أجل الضعفاء لم يكن شجاعا حسبما تخيلته الأسطورة؛ لأنه ببساطة كان بطلا لا يقهر، وغير قابل للهزيمة كما يزعمون.. لكن الشجعان حقا ومن يستحقون أن يلقبوا بلقب السوبر هذا هم الذي يناضلون من أجل الضعفاء ومن أجل الحرية برغم المخاوف.. مخاوف المعتقلات والعصي الأمنية وبطش الظالمين.. فكم في زماننا هذا من "الأقوياء الأخفياء" الذين يستحقون لقب "سوبر" بجدارة.

Sunday, February 15, 2009

TinyXML C++ Small XML Parser

Download the library from
http://www.grinninglizard.com/tinyxml/

To use it in visual studio 2005

Add tinyxml.cpp, tinyxml.h, tinyxmlerror.cpp, tinyxmlparser.cpp, tinystr.cpp, and tinystr.h to your project


project->setting->precompinled header ->select not using precompiled header (in order to not add #include "stdafx.h" to allthe files)

In the program header add

#include
#include
using namespace std;
#include "tinyxml.h"

Thursday, February 12, 2009

Configuring Xerces C++ in Visual Studio 2005

Visual studio programs should ALWAYS begin with the following line:
#include "stdafx.h"

unzip the xerces-c-3.0.0.zip


add the bin to the path environment varibale in windows

To add include

Select Project>Settings to bring up the project settings dialog box. Select All Configurations from the Settings combo box, click the C++ tab, select the General category, and add the Xerces include path to the Additional include directories text box.


To add library files

Select Project>Settings to bring up the project settings dialog box. Select All Configurations from the Settings combo box, click the Linker tab, select the General category, and add the Xerces lib path to the Additional library directories text box.


In the Project>Settings=>linker=>input=> add to the dependency
xerces-c_3.lib
xerces-c_3D.lib
xerces-c_static_3.lib
xerces-c_static_3D.lib



The Xerces DLLs (xerces-c_2_3_0.dll and for debug purpose xerces-c_2_3_0D.dll) are in xerces\bin. Copy both of them into the directory, where they can be available for all applications (in Windows\system)


Adding command argument to visual studio

right click on the project, click properties; now you will see th property pages for the project. Select Debugging under Configuration Properties on the left pane.
On right pane, look for Command Arguments. Fill it to whatever you want.

Wednesday, February 4, 2009

Setup Novint Flacon Project Steps in Visual C++ 2005

Add the file glut.h from example/src to your header files


project->properties->C/C++ -> general -> select Additional Include Directories and add
$(NOVINT_DEVICE_SUPPORT)\include


project->properties->Linker-> general -> select Additional Library Directories and add
$(NOVINT_DEVICE_SUPPORT)\lib



project->properties->Linker-> input-> select Additional Dependancies and add
hdl.lib


to support strings in regular way in the project code
project->properties-> general ->Character set -> select use Multibyte

Wednesday, January 21, 2009

OpenGL Installation With Visual C++

Visual Studio 6
all DLL file in SYSTEM
{
Glut32.dll
Opengl32.dll
Glu32.dll
}

all Include Folder's in Include Folder in VC++
{
GL
Mui
}

all Lib file's in Lib folder in VC++
{
Glaux.lib
Glu32.dll
Opengl32.lib
Glut32.lib
}

Visual Studio 2005

Windows comes with OpenGL, and Visual Studio comes with the OpenGL libraries, but neither of them comes with GLUT. Get the newest version of GLUT here: GLUT 3.7.6 for Windows.

Put the following files in the following locations:

Install Glut into the following directories:

glut32.dll -> C:\Windows\System or C:\WinNT\System
glut32.lib -> C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib
glut32.h -> C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\gl

Use Visual Studio's menu Project options ( Project --> Properties)

The Property Page dialog will open. Once it appears, do the following:

Select the Configuration combo box, select All Configuration

In the left pane, select the linker subtree and then click the Input option. Add the following code to the
Additional Dependencies text in the right pane.

Copy and Paste: opengl32.lib glu32.lib glut32.lib



Monday, January 19, 2009

CYGWIN -Linux environment in Windows

CYGWIN is a tool similar to the UnixUtilities (but with easier installation), you can choose what Linux packages you want to install with it and work in Linux command line in Windows. It is easy to Install and use tool, with easy way to add and remove Linux packages.