Visual Studio 2010 CTP and Training Kit

Posted in Labels: Cutting-Edge Tech, Technology News, Visual Studio.NET, Visual Studio.NET 2010 | Edit | 1 comments
Developers house is a blog for posting technical articles in different technology like Microsft, Java, Oracle ..etc
Posted on/at 10:37 PM by Admin

Posted in Labels: Cutting-Edge Tech, Technology News, Visual Studio.NET, Visual Studio.NET 2010 | Edit | 1 comments
Posted on/at 1:30 AM by Admin
Posted in Labels: Exams and Certifications, SQL Server | Edit | 0 comments
Posted on/at 5:23 AM by Admin

SQL server 2005 has many tools to help you analyze behavior, enable features, and study and enhance the performance of your server. The following sections will describe some of these tools.
1- Using SQL Server Configuration Manager
It is a Microsoft Management Console application that allows you to configure SQL Server 2005’s installed services, network configuration, and network protocols.
You can perform actions such as starting, pausing, and stopping services as well as defining the SQL Server and SQL Native Client network configuration.
Open it from
Start menu à choose All Programs à Microsoft SQL Server 2005 à Configuration Tools à SQL Server Configuration Manager
It can be used for running, stopping and restarting SQL Server services which are:
o SQL Server Integration Services
o SQL Server Full-Text Search Services
o SQL Server
o SQL Server Analysis Services
o SQL Server Reporting Services
o SQL Server BrowserSQL Server Agent
Using the SQL Server 2005 Network Configuration Node
It allows you to configure the network protocols used by each SQL Server instance by enabling or disabling the protocol.
Aliases:
Aliases are alternate names that can be used to connect to a SQL Server instance. Egypt_Server_Test will be the alias name that maps to the SQL Server instance egypt-aeid\Products , using the TCP/IP network protocol with port number 1433
2- Using SQL Server Surface Area Configuration
It is a tool that helps you enable, disable, start, or stop the features and services of your local and remote SQL Server 2005 installations. Stopping and disabling unused services allows you to reduce the surface area and makes your system more secure.
Open it from
--> Start menu --> choose All Programs --> Microsoft SQL Server 2005 --> Configuration Tools --> SQL Server Surface Area Configuration
2.1 Using Surface Area Configuration For Services And Connections
It allows you to configure the state of SQL Server services. You can stop, pause, resume, and start the SQL Server instance services. Moreover, you are able to configure whether the SQL Server instance will allow remote connections and, if so, which protocols to use
- Database Engine
- Analysis Services
- Reporting Services
- SQL Agent
- Full-Text Search
- Integration Services
- SQL Server Browser
All components have Service item for managing service settings:
Startup type : Use to configure how the service starts.
Automatic specifies that the service starts when the system starts.
Manual specifies that a user or dependent service can start the service, and that the service does not start when the system starts.
Disabled prevents the service from being started by the system, a user, or any dependent service.
Service status : Shows the status of the service.
Remote Connections for
- Database Engine
- Reporting Services
It is used to change the protocols on which SQL Server listens for incoming client connections. TCP/IP is preferred over named pipes because it requires fewer ports to be opened across the firewall
Local connections only
If selected, the Database Engine instance will only listen for shared memory connections on the local computer. Connections from remote computers will fail.
Local and remote connections
If selected, the Database Engine instance will listen for connections from the local computer and from remote computers using the selected protocols.
Using TCP/IP protocol only
If selected, the Database Engine instance listens for remote connections using TCP/IP, but not named pipes.
Using Named Pipes protocol only
If selected, the Database Engine instance listens for remote connections using named pipes, but not TCP/IP.
Using both TCP/IP and Named Pipes protocols
If selected, the Database Engine instance listens for remote connections using TCP/IP and named pipes.
2.2 Using SQL Server Surface Area Configuration for Features
It provides a single interface for enabling or disabling many Database Engine, Analysis Services, and Reporting Services features. Disabling unused features helps to secure your Microsoft SQL Server installations by reducing the SQL Server surface area.
SQL Mail, which is deprecated in favor of Database Mail, is disabled by default. Using this dialog, you can enable SQL Mail for backward compatibility.
3- Using Dependencies
Some database objects have dependencies upon other database objects. For example stored procedures may depend on objects like functions, tables, views …etcYou find dependencies by right click on any database object like tables, views, sp , fn ….etc
There are 2 types of dependencies for an object:
a- Objects that depend on 
b- Objects on which
It displays a list of those objects that are dependency-tracked, on which the selected object depends.
Using SQL Server Management Studio Templates
Templates are files that contain SQL scripts to help you create objects in the database.
You can create objects such as
o Databases
o Tables
o Views
o Indexes
o Stored procedures
o Triggers
o Statistics
o Functions
Open it from
Open SQL Server Management Studio --> View Menu --> Template Explorer
Find the sql files on hard disk from
"C:\Documents and Settings\



Posted in Labels: Cutting-Edge Tech, SQL Server, SQL Server 2005, Technology News | Edit | 0 comments
Posted on/at 11:56 PM by Admin
Note: I strongly suggest that you use the exact names that I use in this document to develop your solution for the purpose of learning this concept. Once you have tested and understand how it works, then you can integrate your own naming conventions.
<sectionGroup name="PhoneBook">
<section name="Person" type="CompanyName.PhoneBook.DataAccessLayer.SectionConfig, DataAccessLayer" />
<section name="Group" type="CompanyName.PhoneBook.DataAccessLayer.SectionConfig, DataAccessLayer" />
</sectionGroup>
<PhoneBook>
<Person>
<providers>
<add name="SqlPerson" type="CompanyName.PhoneBook.DataAccessLayer.SqlPersonProvider, DataAccessLayer"
connectionStringName="strcon" />
<add name="OraclePerson" type="CompanyName.PhoneBook.DataAccessLayer.OraclePersonProvider, DataAccessLayer"
connectionStringName="OracleConnection" />
<add name="AccessPerson" type="CompanyName.PhoneBook.DataAccessLayer.AccessPersonProvider, DataAccessLayer"
connectionStringName="AccessConnection" />
</providers>
</Person>
<Group>
<providers>
<add name="SqlGroup" type="CompanyName.PhoneBook.DataAccessLayer.SqlGroupProvider, DataAccessLayer"
connectionStringName="strcon" />
</providers>
</Group>
</PhoneBook>
<connectionStrings>
<add name="strcon" connectionString="Data Source=.;Initial Catalog=AhmedEid_PhoneBook;Integrated Security=True" />
<add name="OracleConnection" connectionString="oracle_connection_string" />
<add name="AccessConnection" connectionString="Access_connection_string" />
</connectionStrings>
using System;
using System.Configuration;
namespace CompanyName.PhoneBook.DataAccessLayer
{
public class SectionConfig : ConfigurationSection
{
[ConfigurationProperty("providers")]
public ProviderSettingsCollection Providers
{
get
{
return (ProviderSettingsCollection)base["providers"];
}
}
}
}
using System;
using System.Configuration.Provider;
namespace CompanyName.PhoneBook.DataAccessLayer
{
public class ProviderList : ProviderCollection
{
public override void Add(ProviderBase provider)
{
if (provider == null) throw new ArgumentNullException("The provider parameter cannot be null.");
base.Add(provider);
}
}
}
using System;
using System.Collections.Generic;
using System.Text;
using System.Web.Configuration;
using System.Configuration;
using CompanyName.PhoneBook.DataAccessLayer;
namespace CompanyName.PhoneBook.DataAccessLayer
{
public abstract class InitMember<T>
{
public static ProviderList Providers(string _providerSectionName)
{
SectionConfig qc = (SectionConfig)ConfigurationManager.GetSection(_providerSectionName);
providerCollection = new ProviderList();
// this wl instatiate PersonProvider with the class "personimpl" which inherit it
ProvidersHelper.InstantiateProviders(qc.Providers, providerCollection, typeof(T));
providerCollection.SetReadOnly();
return providerCollection;
}
private static ProviderList providerCollection;
}
}
/// <summary>
/// This will initialize the provider and add instanse to the providers list
/// </summary>
/// <param name="_Provider"></param>
/// <returns></returns>
public static PersonProvider Instance(Globals.Providers _Provider)
{
return (DataAccessLayer.PersonProvider)DataAccessLayer.InitMember
<DataAccessLayer.PersonProvider>.Providers("PhoneBook/Person")[_Provider.ToString()];
}
using System;
using CompanyName.PhoneBook.Providers;
using System.Configuration.Provider;
using System.Configuration;
using System.Web.Configuration;
namespace CompanyName.PhoneBook.DataAccessLayer
{
public abstract class PersonProvider : ProviderBase
{
/// <summary>
/// This will initialize the provider and add instanse to the providers list
/// </summary>
/// <param name="_Provider"></param>
/// <returns></returns>
public static PersonProvider Instance(Globals.Providers _Provider)
{
return (DataAccessLayer.PersonProvider)DataAccessLayer.InitMember
<DataAccessLayer.PersonProvider>.Providers("PhoneBook/Person")[_Provider.ToString()];
}
/// <summary>
/// Add new person
/// </summary>
/// <param name="_info"></param>
/// <returns></returns>
public abstract bool Add(PersonInfo _info);
/// <summary>
/// Modify selected person
/// </summary>
/// <param name="_info"></param>
/// <returns></returns>
public abstract bool Modify(PersonInfo _info);
/// <summary>
/// Delete selected person
/// </summary>
/// <param name="_PersonId"></param>
/// <returns></returns>
public abstract bool Delete(int _PersonId);
/// <summary>
/// Get all personns
/// </summary>
/// <returns></returns>
public abstract PersonInfo[] Find();
/// <summary>
/// Get info of person
/// </summary>
/// <param name="_PersonId"></param>
/// <returns></returns>
public abstract PersonInfo GetInfo(int _PersonId);
/// <summary>
/// Get personns that match a given criteria
/// </summary>
/// <param name="_Searchinfo"></param>
/// <returns></returns>
public abstract PersonInfo[] Find(SearchCriteriaInfo _Searchinfo);
}
}
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
namespace CompanyName.PhoneBook.BusinessLogicLayer
{
/// <summary>
/// You can use helper to provide common info./data needed OR to massage or add more info.
/// to your data before sending it to presentation.
/// </summary>
public abstract class Helper
{
protected static string MachineName
{
get
{
return Environment.MachineName;
}
}
}
// Add more methods/properties below
}
using System;
using System.Collections.Generic;
using System.Text;
using CompanyName.PhoneBook.Providers;
using CompanyName.PhoneBook.DataAccessLayer;
namespace CompanyName.PhoneBook.BusinessLogicLayer
{
public abstract class Person : Helper
{
static PersonProvider objPersonProvider;
/// <summary>
/// Person Cnstructor
/// </summary>
//Class Constructor: will be invoked 1 time only / Appdomain
static Person()
{
objPersonProvider = PersonProvider.Instance(Globals.Providers.SqlPerson);
}
// staticed methods for person
/// <summary>
/// Add new person
/// </summary>
/// <param name="_info"></param>
/// <returns></returns>
public static bool Add(PersonInfo _info)
{
// You can use helper to provide common info./data needed OR to
// massage or add more info. to your data before sending it to
// presentation.
// Here we use helper class to get MachineName and pass it along
// with data to presentation.
return objPersonProvider.Add(_info);
}
/// <summary>
/// Modify selected person
/// </summary>
/// <param name="_info"></param>
/// <returns></returns>
public static bool Modify(PersonInfo _info)
{
return objPersonProvider.Modify(_info);
}
/// <summary>
/// Delete selected person
/// </summary>
/// <param name="_PersonId"></param>
/// <returns></returns>
public static bool Delete(int _PersonId) { return objPersonProvider.Delete(_PersonId); }
/// <summary>
/// Get all personns
/// </summary>
/// <returns></returns>
public static PersonInfo[] Find() { return objPersonProvider.Find(); }
/// <summary>
/// Get info of person
/// </summary>
/// <param name="_PersonId"></param>
/// <returns></returns>
public static PersonInfo GetInfo(int _PersonId) { return objPersonProvider.GetInfo(_PersonId); }
/// <summary>
/// Get personns that match a given criteria
/// </summary>
/// <param name="_Searchinfo"></param>
/// <returns></returns>
public static PersonInfo[] Find(SearchCriteriaInfo _Searchinfo) { return objPersonProvider.Find(_Searchinfo); }
}
}
Person objPerson_1 = new Person(); // on class A
Person objPerson_2 = new Person(); // on class B
Person objPerson_3 = new Person(); // on class C
//Class Constructor: will be invoked 1 time only / Appdomain
static Person()
{
objPersonProvider = PersonProvider.Instance(Globals.Providers.SqlPerson);
}
public static bool Add(PersonInfo _info)
{
// Here: you can add you business logic to every method before calling the data access provider
return objPersonProvider.Add(_info);
}
// build the search criteria
SearchCriteriaInfo objSearchInfo = new SearchCriteriaInfo();
objSearchInfo.FilterNameBy = (Globals.FilterNameBy)this.cboName.SelectedValue;
objSearchInfo.GroupId = (int)cboGroup.SelectedValue;
objSearchInfo.Name = txtName.Text.Trim();
if(chkFrom.Checked)
objSearchInfo.FromDate = datefrom.Value;
if(chkTo.Checked)
objSearchInfo.ToDate = dateto.Value;
objSearchInfo.SortBy = (rdoasc.Checked) ? Globals.SortBy.Asc : Globals.SortBy.Desc;
objSearchInfo.SortByBirthDate = chkbirthdate.Checked; ;
objSearchInfo.SortByGroup = chkGroup.Checked;
objSearchInfo.SortByName = chkName.Checked;
objSearchInfo.SortByTele = chkTele.Checked;
objSearchInfo.TeleNumber = txtTeleNumber.Text.Trim();
objSearchInfo.TelephoneType = (Globals.TelephoneTypes)this.cboTeleTypes.SelectedValue;
// get result from bus logic layer
PersonInfo[] objresult = Person.Find(objSearchInfo);
// prapare the image
if (null != imgperson.Image) // picturebox control
{
MemoryStream stream = new MemoryStream();
imgperson.Image.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg);
info.Image = stream.ToArray();
}
// display the image
byte[] PImage = info.Image;
if (null != PImage)
{
MemoryStream stream = new MemoryStream(PImage);
imgperson.Image = Image.FromStream(stream);
}
make breakpoints as the following
1- AdvancedSearch form class ( presentation layer )
2- Person class of BusinessLogicLayer ( BLL layer )
3- PersonProvider Class of DataAccessLayer ( DAL layer )
4- InittMember<T> class of DataAccessLayer ( DAL layer )
the above code will provide and add the SqlPersonProvider class to the providers list to be available for any usage.
5- SqlGroupProvider class of DataAccesslayer ( DAL layer )
Posted in Labels: Architecture / Design, C#, OOP, SQL Server, Visual Studio.NET | Edit | 0 comments
Posted on/at 1:30 AM by Admin

Posted in Labels: Exams and Certifications | Edit | 1 comments
Posted on/at 2:50 AM by Admin
Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.
The motivation for starting Project Euler, and its continuation, is to provide a platform for the inquiring mind to delve into unfamiliar areas and learn new concepts in a fun and recreational context.
The intended audience include students for whom the basic curriculum is not feeding their hunger to learn, adults whose background was not primarily mathematics but had an interest in things mathematical, and professionals who want to keep their problem solving and mathematics on the edge.
The problems range in difficulty and for many the experience is inductive chain learning. That is, by solving one problem it will expose you to a new concept that allows you to undertake a previously inaccessible problem. So the determined participant will slowly but surely work his/her way through every problem.
Posted in Labels: Community, Exams and Certifications | Edit | 0 comments
Posted on/at 12:41 AM by Admin


Posted in Labels: Java, Mobile, Technology News | Edit | 0 comments