الخميس، 18 ديسمبر 2008

Egypt IT Companies

Egypt IT Companies


ITWorxA leading Egyptian software company providing outsourcing services
Raya SoftwareProvides a wide range of enterprise level solutions and software applications.
OTS Orascom Technology Solutions provides a wide range of IT solutions and services.
Nile Online Provides Internet connectivity services.
Noor Provides Internet solutions and infrastructure.
Intercom EnterprisesProvides business solutions based on IBM technologies.
OpenCraftAn Egyptian software company providing IT solutions based on open source systems.
MacroCellA software company providing e-business and payment processing solutions.
GNS EgyptProvides e-business solutions.
SANDDevelops information systems.
IT SynergyProvides GIS and other services based on open source technology.
ConnectionDevelops GIS solutions.
quTIPProvides mobile information system solutions.
MSCIProvides consultancy, training, system integration and outsourcing services.
Giza SystemsDevelops information systems.
MicrotechAn Egyptian software company providing ERP solutions.
RITsolProvides ERP solutions.
ITGDevelops financial information systems.
AthearIT services company.
AssetAn Egyptian software company developing Arabic CMS products.
Comsys SoftwareDevelops retail management systems and other information systems.
EME ITProvides system integration solutions.
SICCAn Egyptian IT company providing barcode readers and other automatic data collection solutions.
AsgaTechAn Egyptian software company working in mobile solutions.
InformatiqueAn Egyptian software company providing Education systems and other solutions.
OmegaSoftDesigns and builds industrial ERP systems.
Bayan-TechProvides localization solutions.
RDIDevelops Arabic language technologies and multimedia CDs.
FC&EDDesigns and develops electronics devices and software.
Ebb & TideProvides web and multimedia solutions.
United OFOQDevelops HR software and other information systems.
4SProvides information systems and software development services.
SANAtechDevelops information systems and solutions based on open source technology.
Binary WorksDevelops web-based e-learning solutions.
IKDProvides Internet and wireless solutions.
Nile NetworksProvides network services.
eBSEGProvides e-business solutions.
EgyMarkProvides e-business solutions.
NRGDevelops enterprise solutions and web portals.
Cairo ITDevelops e-learning solutions.
GNSProvides web-based solutions for the tourism industry.
ArkanProvides web design, web development and hosting services.
Bit and BitsProvides website design and development services.
InSoftProvides website development services.
GozoorProvides web site design, web development and web hosting services.
Nile CreationsProvides web site design and development services.
MicroaxonProvides web development services.
We AreProvides advertising and web design services.
Design Co-ordinators InteractiveProvides web site desing, CD presentations and tours and Flash animation services.
LojineProvides web marketing and graphic desing services.
MRCO EgyptProvides web design and online marketing services.
Code-CornerProvides web development and web hosting services.
IBSImports and assembles computer hardware.
Online HorizonsProvides web development and web hosting services.
Arwa SoftwareDevelops information system software products.
SakhrA leading software company with an R&D center in Egypt providing Arabic language technologies and enterprise solutions, located in the Nasr City Free Zone
HarfA software company based in Egypt developing Islamic software.
ITSoftCMMI level 4 certified Software Company located in the Nasr City Free Zone.
MCRProvides system integration and consulting services.
Arabia ITProvides off-the-shelf software programs and publications.
B9matA Saudi company providing web solutions with a development center in Cairo.
Axiom ComputersDevelops information systems based on Oracle and J2EE technologies.
EDSProvides business and technology solutions.
SanteonA software company with offices in the US and Cairo.
eRevMaxDevelops software solutions for the tourism industry.
PicostationA US based software company with a development center in Egypt developing a mobile phone photo blogging application.
Net Pate GroupProvides web design and development services.
NordixValue added reseller of IT products. Provides network services.
LogicaCMGProvides system integration services for IT and wireless telecommunications.
AMSProvides information systems for the medical sector.
IOSAn Australian based software company with a development center in Egypt.
NTG ClarityDelives network, telecom, IT and infrastructure solutions to network service providers and medium and large enterprises.
CIT GlobalProvides ecommerce solutions

الأربعاء، 17 ديسمبر 2008

Strings and String Builders


Strings and String Builders

ü System.String provides a set of members for working with text.

ü They also provide the means to manipulate that data through their members.

string s = "this is some text to search";

s = s.Replace ("search", "replace");

Console.WriteLine(s);

Note

We determine any word we want to replace from the text and method match the word you want to replace and replace it with the new word.

ü Strings of type System.String are immutable (ثابت) in .NET and also in java. That means any change to a string causes the runtime to create a new string and abandon (يتخلى عن) the old one. That happens invisibly, and many programmers might be surprised to learn that the following code allocates four new strings in memory:

string str;

str = "Ahmed"; // "Ahmed"

str += "Rabie"; // "Ahmed Rabie"

str += "Ahmed"; // "Ahmed Rabie Ahmed"

str += "El Bohoty"; // "Ahmed Rabie Ahmed El Bohoty"

Console.WriteLine(str);


Note

Only the last string has a reference; the other three will be disposed of during garbage collection. Avoiding these types of temporary strings helps avoid unnecessary garbage collection, which improves performance. There are several ways to avoid temporary strings:

Use the String class’s Concat, Join, or Format methods to join multiple items in a single statement.

Use the StringBuilder class to create dynamic (mutable) strings.

The StringBuilder solution is the most flexible because it can span multiple statements. The default constructor creates a buffer 16 bytes long, which grows as needed. You can specify an initial size and a maximum size if you like. The following code demonstrates using StringBuilder:

System.Text.StringBuilder sb = new System.Text.StringBuilder (30);

sb.Append ("Ahmed"); // Build string.

sb.Append("Rabie");

sb.Append("Ahmed");

sb.Append("El Bohoty");

string s = sb.ToString(); // Copy result to string.

Console.WriteLine(s);

Comparing the Behavior of Reference and Value Types

What Is a Reference Type?

Reference types store the address of their data, also known as a pointer, on the stack. The actual data that address refers to is stored in an area of memory called the heap. The runtime manages the memory used by the heap through a process called garbage collection. Garbage collection recovers memory periodically as needed by disposing of items that are no longer referenced.

Comparing the Behavior of Reference and Value Types

Because reference types represent the address of data rather than the data itself, assigning one reference variable to another doesn’t copy the data. Instead, assigning a reference variable to another instance merely creates a second copy of the reference, which refers to the same memory location on the heap as the original variable.

Consider the following simple structure declaration:

class Program

    {

        static void Main(string[] args)

        {

            Numbers n1 = new Numbers(0);

            Numbers n2 = n1;

            n1.val += 1;

            n2.val += 2;

            Console.WriteLine("n1={0},n2={1}", n1, n2);

        }

    }

    struct Numbers

    {

        public int val;

        public Numbers(int _val)

        { val = _val; }

        public override string ToString()

        { return val.ToString(); }

    }  

This code would display “n1 = 1, n2 = 2” because a structure is a value type, and copying a value type results in two distinct values. However, if you change the Numbers type declaration from a structure to a class, the same application would display “n1 = 3, n2 = 3”.

 Changing Numbers from a structure to a class causes it to be a reference type rather than a value type. When you modify a reference type, you modify all copies of that reference type.

Identify Types as Value or Reference

   SByte a = 0;

            Byte b = 0;

            Int16 c = 0;

            Int32 d = 0;

            Int64 e = 0;

            string s = "";

            Exception ex = new Exception();

            object[] array_types ={ a, b, c, d, e, s, ex };

            foreach (object o in array_types)

            {

                string type;

                if (o.GetType().IsValueType)

                    type = "Value Type";

                else

                    type = "Refrence Type";

                Console.WriteLine("{0}:{1}", o.GetType(), type);

            }

الثلاثاء، 16 ديسمبر 2008

.NET Interview Questions Book

الاثنين، 15 ديسمبر 2008

Web Site Scraping

Converting Data from MS Excel to SQL Server 2005

Converting Data from MS Excel to SQL Server 2005

In this article, I show you how to load data from a worksheet of .XLS (MS Excel) file to a table in SQL Server 2005.


I have an Excel worksheet with the following data. The file name is books.xls and worksheet name is Sheet1.

Title

Authors

Price

Java complete reference

Ahmed Rabie

495

Beginning Hibernate

Ahmed Rabie

299

Professional AJAX

Ahmed Rabie

399


Now we want to load this data to SQL Server table.  So, we have to create a table called BOOKS in SQL Server 2005 with the following structure.

title

varchar(50)

authors

varchar(100)

price

money


In order to access data from Excel document, we have to create an ODBC  DSN ( Data Source Name) that refers to ODBC driver for Excel and books.xls document, take the following steps:

Invoke control panel -> performance and maintenance -> administrative tools -> Data Source (ODBC)

  1. In ODBC Data Source Administrator  program, select User DSN tab and click on  Add button
  2. From list of drivers select Microsoft Excel Driver (*.xls)
  3. Click on Finish button.
  4. Give  DsnName and name of the Data source
  5. Click on Select Workbook and select books.xls from file system.
  6. Click on Ok button.

Create a new Console Application with C# in Visual Studio.NET 2005 and write the following code.

 

 

 

 

 

using System;

using System.Data;

using System.Data.SqlClient;

using System.Data.Odbc;

 

namespace database

{

    class ConvertExcelToSqlServer

    {

        static void Main(string[] args)

        {

        //connect to MS Excel

       OdbcConnection excelcon = new OdbcConnection("dsn=DsnName");

       excelcon.Open();

OdbcCommand excelcmd = new OdbcCommand("select * from [sheet1$]", excelcon);

            OdbcDataReader dr = excelcmd.ExecuteReader();

 

            SqlConnection sqlcon = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Administrator\My Documents\xxxxxxxxxx.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");

            sqlcon.Open();

 SqlCommand cmd = new SqlCommand("insert into books values (@title,@authors,@price)", sqlcon);

            cmd.Parameters.Add("@title", SqlDbType.VarChar, 50);

            cmd.Parameters.Add("@authors", SqlDbType.VarChar, 100);

            cmd.Parameters.Add("@price", SqlDbType.Money);

 

            while (dr.Read())

            {

                cmd.Parameters[0].Value = dr[0];

                cmd.Parameters[1].Value = dr[1];

                cmd.Parameters[2].Value = dr[2];

                cmd.ExecuteNonQuery();

            }

            excelcon.Close();

            sqlcon.Close();

Console.WriteLine("Loaded data from MS Excel workbook to Sql Server Database Table");

        }

    }

}

 

The above program does the following.

  • Imports namespaces related to SQL Server and ODBC drivers
  • Connects to MS Excel workbook (books.xls) using MSEXCEL data source name that was created earlier.
  • Sheet1 is the name of the worksheet in books.xls
  • Reads data from sheet1 and load data into ODBCDataReader
  • Connects to Sql Server 2005 express edition using .NET Data provider for Sql Server. The default database is MSDB.
  • Creates a command to insert into BOOKS table with three parameters.Defines parameters with approriate data types.
  • Next it reads one row from DataReader and copies values into parameters of INSERT command. Then it executes insert command.
  • Finally it closes connection of Excel and Sql Server.