This blog is subject the DISCLAIMER below.

Thursday, August 30, 2007

Announcing XNA Game Studio 2.0

What’s New with XNA Game Studio?

  • XNA Game Studio 2.0 works in all versions of Visual Studio 2005. This includes Standard and Professional, as well as many other specific editions.

  • The new and improved interface makes it easier for you to manage your Xbox 360 console.

  • You’ll find that managing and building content is easier and more consistent in XNA Game Studio.

  • We’ve included project templates for content importers and processors.

  • You can configure how content is processed with the new ability to set



    parameters on Content Processors.

What’s new in the XNA Framework? Now you can:

  • Create rich multiplayer games over Xbox LIVE using the new networking APIs.


  • Create Audio more effectively with the new XACT editor!

  • Host XNA Framework games easily inside a Windows Form.

  • Use the virtualized GraphicsDevice: no more special code to handle device reset and recreate!

  • Take advantage of render targets that are more flexible, consistent, and easier to use. Xbox 360 and Windows now support multiple render targets (MRTs) as well.

  • Easily nest one component inside another thanks to improvements in GameComponent.

  • Enjoy many more enhancements and tweaks!

Most of our development on this version has been in response to your feedback. What you see here only scratches the surface of everything new in XNA Game Studio 2.0. As we near the release of XNA Game Studio coming late 2007, we'll have more information.


Source :- From XNA Blog


.. more.

Object Relational Designer (O/R Designer)

Today, I’ll talk about another feature in VS2008 beta 2, Object Relational Designer (O/R Designer), briefly for who are used sqlmental.exe LINQ CTP days, this tool replaced it with Designer tool for creating LINQ to SQL (DLINQ) entity classes and associations based on database objects plus mapping database stored procedures and user defined function to Data Context for returning data.

Data Context methods: method call database stored procedures and user defined functions and return sets.

Let’s play with (O/R Designer),

First create project from Console application type


then from VS menu project then add new item and select LINQ to SQL Classes as shown
(O/R Designer) surface will open and that’s time to drag database objects from server explorer (this requires you’ve a connection to database) and drop it on.

Hint: (O\R Designer) works just on SQL Server 2000 and later versions. In my sample I’ve

used pubs database
After dragging all tables and stored procedures, I found that (O\R Designer) has visualized my tables as entity classes and my stored procedure as Data Context methods
Let’s have some code to print all authors’ first names from authors table and execute ByRoylaty stored procedure
And this the result


.. more.

Tuesday, August 28, 2007

Webservices in Orcas

One month ago, Microsoft announced the VS 2008 beta 2, I am using the VSTS version, really I noticed a great difference from VSTS 2005 and the 2008 as I didn't use the Beta 1 of VSTS 2008.

Anyway, I am planning to write about the new features of the VSTS 2008 beta 2.

Today, I was playing with webserivce on my Vista, and I got some problems.

First, to consum any webservice, you should run VS as administrator else you'd get this error:

Although, I run it as administrator I got another error that there is not any webservice on my local machine where I run the service:
I tried to develop my service under both types HTTP and File System and no difference.
So I got a solution, and I don't know really if this problem is a bug in VSTS 2008 beta 2 or I've done some mistaks, so whatever your webservice type HTTP or File System, when you adding a web reference to your project, point out the URL as like that:
After that you can use the service well.

.. more.

Sunday, August 26, 2007

Best Linux Distribution for Java Development

I've spent the last few weeks learning the basics, coding and database development, source control...etc on Linux, as I want to completely transfer to it, that's why I'm trying as much Linux distros as I can these days (@ home and @ work, trying to spread the open-source word); I tried Ubuntu 7.04 and Fedora 7, and currently downloading openSUSE 10.2, and till now I love Ubuntu and prefer GNOME to KDE, although KDE seems to have nicer visual effects, but I feel much more comfortable with GNOME, anyway, have you got any ideas that might help me find the best distro for development especially with Java? I need a fast and reliable system that doesn't require much configuration, I'd be grateful if you could provide me with help in that, thanks!

By the way, I have a small - yet annoying - problem in Ubuntu that occurred on my laptop and home PC, and will try to trigger that problem on my work PC tomorrow to help me in choosing my primary Linux distro; when I shut my computer down improperly (e.g. by unplugging the power cable or pressing the Reset button), Ubuntu's response became much slower than it used to (not just after the following restart, but always)!! Sometimes it returns back to normal (but usually after leaving the computer on for some time), but mostly it makes me want to SMASH MY PC!! I click any icon such as Firefox, Terminal or Thunderbird, gives no response for about 5 seconds and then starts execution!! Any ideas?? I don't think I'm in the mail group yet, so I'd be grateful if you reply to my post here or e-mail me at aamr@fcih.net, thanks again.

.. more.

Saturday, August 25, 2007

Advanced C++ part 9 : Templates Part 1

I've decided to jump off a little and talk about templates. So we can dive into the world of STL and the wonders it can do.

As a kick-start, you can think of templates as a search-and-replace facility. No, it is not like preprocessor macros. Preprocessor macros does that at a syntactical level. But templates does it on a semantical level.

What's the difference between a class and an object of that class ? The class defines how all the set of objects act, and what data they have. A single class might have numerous objects. Similarly is the difference between class template and template class !

A class template to a template class is as a class to an object. A class template defines how the template class look like. A class template might have several template classes.

As an example, consider the class Stack. It's a simple stack with pop() and push() operations, an int array, and a top-of-stack counter members. The class is not concerned what is in the int array or what's in the top-of-stack pointer, it merely states that they exist and how they are modified and handled.

Now consider the class template Stack<T>. "It's a simple stack with pop() and push() operations, a T array, and a top-of-stack counter members". "The class template is not concerned what is the actual type of the array". It just states that we need an array of it, and that array will be treated that way.

The template class Stack<int> is typically like the normal stack we mentioned earlier. Note that Stack<int> and Stack<double> is totally different types. There code is written in separate places in the exe file. There is no relation between them whatsoever. Note that's this is the a very strong difference between templates and generics in Java or C#. Generics just uses the same code that handles Object and casts the types back and forth to the type specified in the generic definition. Since this is not the case in templates, templates can also take variable parameters.
For example, you might define a Stack<int,5> that -for example- allows only 5 items in the stack. Templates also have default parameters, if you might use Stack<> it might default to int.

We've been talking about using templates, we still didn't talk about defining them. That's the next article isA.

(P.S. Don't worry at all if you didn't get anything from this article, it will get clearer as you read and see the examples in the next articles isA. It's totally normal)

.. more.

Friday, August 24, 2007

MySQL Server on Ubuntu 6.06 Server and Client on Ubuntu 7.04 Desktop Setup & Configuration For Remote Access

Hello Linux & MySQL users :), this is my first article here, and hope it's useful! Here's the scenario I'm trying to achieve: Using VMWare, I set 2 images up, one containing Ubuntu Server 6.06 and MySQL Server, and the other containing Ubuntu Desktop 7.04 and MySQL Client tools, and I wanted to access the server remotely (on the same LAN). Note: you can do the same using 2 separate machines on the same LAN, it's not different at all. Ubuntu Server doesn't have a Desktop Manager by default and I used the command line to achieve everything (I set an X-Server and a desktop manager called Icewm up later using this tutorial: https://help.ubuntu.com/community/Installation/LowMemorySystems )

  • MySQL Server

    1. Create a root account password: sudo passwd

    2. login with your root account: su

    3. if you didn't set a LAMP (Linux, Apache, MySQL, PHP/Python...etc) server, you can download the mysql-server:
      sudo apt-get update
      sudo apt-get install mysql-server

    1. create the root account on mysql-server: mysqladmin -u root password 'yourpassword'

    2. login to mysql using the root account: mysql -p

    3. create an administrator account that has all privileges of root, e.g.

        GRANT ALL ON *.* TO aamr@'%' IDENTIFIED BY 'yourpassword'

    4. exit from mysql: exit

    5. Edit the configuration file of MySQL (/etc/mysql/my.cnf ) to enable remote access to it using any text editor such as vi: vi /etc/mysql/my.cnf

    6. go to the line “bind-address”, press INSERT and change the IP to the IP of the server, e.g. From 127.0.0.1 to 10.10.11.113

    7. After you complete editing, press Escape, then type :w to save and :q to quit


  • MySQL Client

    1. You can use the Synaptic package manager in System->Administration and search for mysql-client, mysql-query-browser, and mysql-admin and install them.

    2. Launch any of both, enter the username and password of the user you created, and there you go :)

.. more.

Thursday, August 23, 2007

FCI-H 1st Java Tech Talks Week



FCI-H 1st Java Tech Talks Week
27/8 - 30/8/2007

Dear all,

FCI-H student’s community is announcing the first JTT week (Java Tech Talks), the week is held in Faculty of Computers & Information Helwan University. It starts on Monday 27/8/2007 and last till Thursday 30/8/2007 @ Hall 1, 10:00 am.


All FCI-H students and fresh-graduates are invited to attend, below is the schedule of the week:

Day 1 (Monday 27/8) - J2SE Talks

Session

Start

End

Speaker

Opening Session: Introduction to java world

10.00

11.00

Youssef Mamdouh

J2SE :The kick start

11.15

12.15

Mohsen Hasan

J2SE: Sockets/XML

12.30

01.30

Mohsen Hasan

Break

1.30

03.00

-

Database programming through JDBC

03.00

04.15

Hossam Sadik

Day 2 (Tuesday 28/8) - J2EE Talks

Session

Start

End

Speaker

Introduction to J2EE

10.00

11.00

Hossam Sadik

Web Application Architecture

11.15

12.15

Youssef Mamdouh

Servlets basics

12.15

01.30

Youssef Mamdouh

Break

01.30

03.00

-

JSP Basics

03.00

04.15

Hossam Sadik

Day 3 (Wednesday 29/8) - J2EE Talks

Session

Start

End

Speaker

MVC Pattern & FrameWorks

10.00

11.15

Youssef Mamdouh

Struts FrameWork

11.30

12.45

Youssef Mamdouh

Introduction to JSF

01.15

02.15

Hossam Sadik

JAVA EE5 & Introduction to EJB 3.0

02.30

03.30

Hossam Sadik

Day 4 (Thursday 30/8) - J2ME Talks

Session

Start

End

Speaker

Introduction to J2ME

10.00

11.15

Mohsen Hasan

Advanced J2ME - Modeling

11.30

12.45

Mohsen Hasan

Mobile Networking

01.15

02.30

Mohsen Hasan

Writing Business Document

02.45

04.00

Mohsen Hasan

.. more.

Tuesday, August 21, 2007

Java EE 5 for beginners


Java EE
(Enterprise Edition) or previously known by J2EE, “The most widespread web-development platform”.


J2EE is a platform-independent, Java environment from Sun Microsystems for developing, building and deploying Web-based enterprise applications online. Java EE platform consists of a set of components, APIs, and protocols that provide the functionality for developing multitiered, Web-based applications.


Although J2EE was mainly designed to simplify application development process in a thin client tier environment, most of the beginners who start learning Java EE complain from the sophistication of platform architecture, terms, interfering of technologies and multiplicity of development environments. Actually these are the other side of coin in open source field, while the increasing of open source development by many vendors strength the platform and introduce better services, the multiplicity of tools and terminologies affect the end developer negatively. Most of beginners get confused about EE with a lot of question they face when start learning, such as where and how to start? Read books (Java how to program, Java core....etc.) or start with web tutorials!, Read in what? Servlets, JSP, Struts, EJB or JSF!!, Which IDE and Application Server? Eclipse with WebSphere, NetBeans with JBOSS or Jdeveloper with OC4J!!. Those were samples of common questions and problems that beginners usually suffer from.


We plan to publish a series of articles which mainly target the beginner developer who want to learn Java EE from scratch, it will be extension to (Explore the Java Platform: Overview, Part I, II and III) written by Youssef Momdouh and it will cover the following:


- Overview
- Java EE architecture
- Platform components (Servlets, JSP, EJB, JSF… etc.)
- API’s specifications, such as JDBC, RMI, e-mail, JMS, web services, XML… etc.
- Application Server configuring and deploying

The series is designed in a simple form to avert the common difficulties which usually face the beginners, each article will describe new concept -according to the course table- followed by applied example. Finally there will be an assignment to test your understanding for the concept, we also will try to help you in troubleshooting as much as we can.


Please, do not hesitate to provide us with your notes, feedback and reviews, to enhance the introduced content and spread the benefits. Wish you find it useful.


References:
http://en.wikipedia.org/wiki/J2EE#Java_EE_5_application_server_certified



.. more.

Saturday, August 18, 2007

SilverLight 1.0 and Silverlight 1.1 Alpha

in the name of ALLAH

Microsoft Announced the Release of SilverLight 1.0 and Announced about SilverLight 1.1 Alpha
This is a pre-release version of Silverlight that developers may use for evaluation.



Download both Version 1.0 and 1.1 for MS Windows and Mac OS x from Here,
Download Some Videos from Here
and FAQ From here

.. more.

Internet Explorer Developer Toolbar

The Internet Explorer Developer Toolbar provides several features for exploring and understanding Web pages. These features enable you to:

The Internet Explorer Developer Toolbar provides several features for exploring and understanding Web pages. These features enable you to:

  • - Explore and modify the document object model (DOM) of a Web page.
  • - Locate and select specific elements on a Web page through a variety of techniques.
  • - Selectively disable Internet Explorer settings.
  • - View HTML object class names, ID's, and details such as link paths, tab index values, and access keys.
  • - Outline tables, table cells, images, or selected tags.
  • - Validate HTML, CSS, WAI, and RSS web feed links.
  • - Display image dimensions, file sizes, path information, and alternate (ALT) text.
  • - Immediately resize the browser window to a new resolution.
  • - Selectively clear the browser cache and saved cookies. Choose from all objects or those associated with a given domain.
  • - Display a fully featured design ruler to help accurately align and measure objects on your pages.
  • - Find the style rules used to set specific style values on an element.
  • - View the formatted and syntax colored source of HTML and CSS.
Click Here To Download ... and Here For More Information

.. more.

Installing Drupal with PHP 5.2, Apache2.2 and MySql 5.0

Drupal is an open source Content management system (CMS) which can create rich content light weight web sites, you can visit www.drupal.org for information about drupal.
This post targets the setup process of drupal on a Windows environment. Linux version of this post will be available soon.


Drupal is based on PHP,simply, it is a framework built using php, so in order to get it working you need to setup the environment suitable for PHP to work.

A- You need:
1- A web server (Apache is recommended for drupal however IIS is supported)
2- PHP itself
3- A data base server (Drupal supports both MYSQL 4.1+ and PostgreSql 7.3+)

1- Apache:
# you can get latest version of apache (2.2) from Here
-- Setup:
Apache is very light weight web server with very easy to install procedures.
2- PHP:
# you can download PHP 5.2.3 HERE
-- Setup:
It is recommended to download the Zip package and extract it manually to a folder usually C:\PHP

3- MySql:
# Mysql is a very efficient,light weight and easy to use data base server, currently the lastest version is 5.0 and u can find it HERE also you will find a set of usefull tools for mysql such as GUI admin which is very good instead of mysql command line.

B- Setting up PHP to work with Apache:
you need to configure apache to identify .PHP files and to process them upon request, this can be done by:
1- open the directory named Conf in the installation directory of Apache
2- edit the text file named httpd and:
- look for DirectoryIndex and add index.php so it looks like this:
DirectoryIndex index.html index.html.var index.php

- look for Addtype Section and add after the last sentence these lines
AddType application/x-httpd-php .php .phtml
AddType application/x-httpd-php-source .phps

3- Now you need to load the php module for the apache to deal with, add these lines to the httpd file after the last LoadModule line:
LoadModule php5_module "C:/php/php5apache2_2.dll"
PHPIniDir "C:/php"
# of course directories here are relative.

What wont work:
1- Opening a .php file directly by left clicking it.
for apache to deal with a php file it has to be located in htdocs folder located in the apache installation directory and you can call a .php file by writing this in the address field of your web browser: http://localhost/"filename".php

C- Back to Drupal:
for druapl to start working you have to copy the folder named drupal-5.1 downloaded from drupal web site to the htdocs folder of apache, and type this in your web browser:
http://localhost/drupal-5.1
Ooops,
a page may appear with the message saying that your web server does provide any data base supported by drupal. How can this happen? we already installed Mysql!!!
The answer is in PHP itself, at this point you may get confused about the reason of that error and you start going in circles and reinstalling apache and PHP as well as mysql, this is not the error...
the problem is simply that mysql module is not installed in php

D- Installing Mysql to work with PHP
1- make sure that u have the Dll files requried for mysql in the ext folder (php_mysql.dll)
2- make sure that php.ini file is present in the PHP folder, AND NOT PHP.INI.RECOMMENDED, rename this to php.ini.
3- php.ini and look for
extension_dir = ".\" and change it to
extension_dir = ".\ext"
4- look for the line extension=php_mysql.dll in the dynamic extensions sections and uncomment it by removing the ';' on its left.

As a basic test, many sites recommend writing a simple php script file the returns php info on your machine and running it to make sure that everything is fine, however, on some machines - including mine- after setting up the mysql module, this simple script does not work. To test, just point to this in your browser http://localhost/drupal-5.1
it is supposed now that you will see a database configuration page with the drupal logo above, this indicates that we are approaching the last step.

E- Drupal into action:
drupal needs a database with full access permissions to manipulate many aspects for building and managing sites, so we need to create a database in Mysql dedicated to Drupal, this can be done by writing some commands to the command line:
1- create a database in mysql for example named "drupaldb"

  mysqladmin -u username -p create drupaldb
2- manage ur database

mysql -u username -p

3- Setting the permissions to the user u created and logged in with to mysql, as this user
name will be supplied to drupal to work with it

GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE

TEMPORARY TABLES, LOCK TABLES ON drupaldb.* TO 'username@localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;

where user name is the drupal user name and password is this user's password.

now, supply the required information to the database configuration page of drupal, and hopefully every thing works now :).
 



.. more.

Friday, August 17, 2007

Another Solution to DateTime problems (.Net)

Now that I read th last post, I remembered another solution that can be implemented on the Application level rather than the implementing it in your SQL statements,

Of course we have three parts of the problem. The first is how to display dates without any problems; like misinterpretation (dates like 2/3/2007 & 3/2/2007, if you don't know how your DB interpret dates) or throwing exceptions. The second is how to read user-input dates. The third is how to write dates to the DB in the right form & again without misinterpretation.

Displaying dates in the right form:


Remember that the problem is not just about the user misinterpret the displayed date, it's also your problem when you come to next part. for eg when displaying dates for the user to edit.

In this part we have to display the date with an enforced format that's:

string myDateFormat = ConfigurationManager.AppSettings["myDateFormat"];
Date.ToString(myDateFormat);

This way we can enforce the date format we want & also it's just a matter of configuration (just edit the configuration file to change the format of dates across a whole solution without rebuilding).

Reading user-input dates:


Now we come to last part, which much related to the previous part. Now after displaying the dates properly to the users, we need to make sure that the input of the user through editing the displayed ones or just typing new ones won't be misinterpreted. the solution itself comes in two parts:

  1. First, the input field must be validated according to the same format we are using through the solution, better be by retrieving the format string from the configuration file as we did in the previous part (for the same reasons; allowing all-in-one configuration).
  2. Given that that enforced a When parsing the date, use "ParseExact" not "Parse" to parse your date.

DateTime myTime = DateTime.ParseExact(myStringTime, myDateFormat, null);

Writing dates to your DB:


Now that we have the properly parsed date we should format in like the format below while writing to the DB

"yyyy-MM-dd"

Enforce the above format when writing dates to DB. The format is the standard format that won't be misinterpreted by the DB.

Conclusion:


Don't use Date.Pasre(...), unparameterized Date.ToString(), always use Date.ParseExact(...), & parametrized Date.ToString(). This way our application won't be affected by the date format of the machine it's running on or that of the DB server it's communicating with (either on the same machine or not).

.. more.

Solveing DateTime problem (SQL Server)

Are you created a table have a dateTime field before ? Are this field made a problem with your application because both of them have a different format ? if you don't want to change the operating system dateTime format to unify both …..

Read , this article that try to solve this headaches .

By the way , I found two SQL Server functions that may be a way to solve the problem because they provides a number of options you can use to format a date/time string.

  • getdate()

  • convert ( , )

by mixing the usage of both you can get your goal as this :

select convert(varchar, getdate(), 9)

that returns :

Dec 11 2007 11:11:11:111AM

You have many date and time schemes by changing the second parameter in Convert function (use one of the below values to change the format).

Rang (1 to 7 + 10 + 101 to 107 + 110 + 111 ) Date format

Rang ( form 8 + 14 ) Time format

Rang ( 9 or 109 ) DateTime format

Explore this simple Demo :


create table fci_blog_table1
(
z datetime null
)
/*Demo1 ,How to insert */
insert into fci_blog_table1 values ( convert(varchar, getdate(), 1))

create proc fci_blog_pro1 /*to make a stored proceure*/
@x int output
as
select @x = 1
WHILE (@x < style="color: rgb(51, 51, 255);">BEGIN

select convert(varchar, getdate(), @x)
select @x = @x + 1
END

PRINT 'Have a nice time'

DECLARE @TheCount int
EXEC fci_blog_pro1
@x = @TheCount OUTPUT
Select TheCount = @TheCount

.. more.

Thursday, August 16, 2007

Imagine Cup 2008

The Imagine Cup:

The Imagine Cup is one way Microsoft is encouraging young people to apply their imagination, their passion and their creativity to technology innovations that can make a difference in the world – today. Now in its fifth year, the Imagine Cup has grown to be a truly global competition focused on finding solutions to real world issues.

Competition Categories :
Software Design .
Embedded Development .
Game Development .
Project Hoshimi .
IT Challenge .
Algorithm .
Photography .
Short Film .
Interface Design .

For more information visit Imagine Cup web site .
The registration opens in on August 25th.

.. more.

Monday, August 13, 2007

.netBUTTON

.netBUTTON provides real-time dynamic button generation with results that look so attractive it is difficult to believe they were not individually hand crafted in Photoshop .
It works throw Dot Net 2005 ( for both desktop and web application controls ) .
It Supports ASP.NET validation controls .
it Sets text font, size and style along with color, background color and more .
See more features here .



.. more.

Saturday, August 11, 2007

Projects Day @ FCIH

The IEEE Student Branch @ FCIH is holding a Project day for the next year faculty seniors (4th graders) to allow them know about the ideas of FCIH graduates GPs, to inspire them new ideas & allow continuity of already pursued ones instead of reinventing the wheel...

The day will be next Wednesday @ 10:00 am, isA...So please send an e-mail message to m.shady@ieee.org confirming your attendance...

Please, tell your colleges about the day; tell your graduated friends to come to present their projects (please give them the above e-mail address too to confirm their attendance), and students to allow them get the chance to attend the day...

Don't miss the day...Let us all bring the genuine within ;)

.. more.

Thursday, August 02, 2007

Microsoft announced next Windows version just three years away codename "Windows 7"

Microsoft announced next Windows version just three years away codename "Windows 7"

Microsoft Corp. on Friday confirmed an approximate timeline for the next Windows release, seeking to smooth things over with corporate customers stung by its past product delays.
The next version of the flagship PC operating system -- known for now by the internal code name "Windows 7" -- will be released in about three years, according to a series of presentation slides from Microsoft's global sales meeting this week.

more on http://seattlepi.nwsource.com/business/324570_msftwindows21.html

.. more.

FCI-H rocked MIE and EED competitions

FCI-H rocked MIE and EED competitions, as Mr. Amr Ghoniem achieved the 1st place over 8 competitors in post graduation projects, Kernel team achieved the 2nd place in MIE competition and FuTex group achieved the 1st place in EED IT-Computer Science competition.

Excuse me, FCI-H RULES!!

Congratulation all.

.. more.