FCI-Helwan blog

Just another FCI-H weblog

.NET Framework Posters (4 and 3.5)

While I am google for .NET Framework 3.5 Poster to see some new namespaces , I got .NET Framework 4 Poster so I want to share the both with you here.

.NET Framework 3.5 :

DotNet_poster_xps_large.xps 1.5 MB

DotNt_poster_xps_split.xps 1.8 MB

NET_35_Namespaces_Poster_JAN08.pdf 849 KB

NET35_Namespaces_Poster_Tiled_JAN08.pdf 25MB

All of them are available in this link

.NET Framework 4:
You can find in the next link two version for framework 4, the first is silverlight with deep zoom and the second is PDF high resolution version.
They are available in this link

June 1, 2009 Posted by | Uncategorized | Leave a comment

Intro to Caching,Caching algorithms and caching frameworks part 2

Introduction:

In this part we are going to show how to implement some of the famous replacement algorithms as we mentioned in part 1, the code in this article is just for demonstration purpose which means you will have to do some extra effort if you want to make use of it in your application (if you are going to build your own implementation and wont use any caching frameworks)

The Leftover policy:

After programmer 1 read the article he proceeded to review the comments on this article, one of these comments were talking about leftover policy, which is named “Random Cache”

Random Cache:

I am random cache, I replace any cache entry I want, I just do that and no one can complain about that, you can say the unlucky entry, by doing this I remove any overhead of tracking references or so, am better than FIFO policy, in some cases I perform even better than LRU but in general LRU is better than me.

It is comment time:

While programmer 1 was reading the rest of the comments, he found very interesting comment about implementation of some of the famous replacement policies, actually it was a link to the commenter site which has the actual implementation so programmer 1 clicked the link and here what he got:

Meet the Cache Element:

public class CacheElement {

private Object objectValue;

private Object objectKey;

private int index;

private int
hitCount;
.
. // getters and setters
.
}

This is the cache entry which will use to hold the key and the value; this will be used in all the cache algorithms implementation

Common Code for All Caches:

public final synchronized void addElement(Object key,Object value) {

int index;
Object obj;

// get the entry from the table
obj = table.get(key);

// If we have the entry already in our table
then get it and replace only its value.
if (obj != null) {
CacheElement
element;

element = (CacheElement) obj;
element.setObjectValue(value);
element.setObjectKey(key);

return;
}
}

The above code will be common for all our implementation; it is about checking if the cacheElemnet already exists in our cache, if so then we just need to place its value and we don’t need to make anything else but what if we didn’t find it ? Then we will have to dig deeper and see what will happen below.

The Talk Show:

Today’s episode is a special episode , we have special guests , they are in fact compotators we are going to hear what everyone has to say but first lets introduce our guests:

Random Cache, FIFO Cache

Let’s start with the Random Cache.

Meet Random Cache implementation:

public final synchronized void addElement(Object key,Object value) {

int index;
Object obj;

obj = table.get(key);

if (obj
!= null) {
CacheElement element;

// Just replace the value.
element = (CacheElement) obj;
element.setObjectValue(value);
element.setObjectKey(key);

return;
}

// If we haven’t
filled the cache yet, put it at the end.
if (!isFull()) {
index =
numEntries;
++numEntries;
} else {
// Otherwise, replace a random
entry.
index = (int) (cache.length * random.nextFloat());
table.remove(cache[index].getObjectKey());
}

cache[index].setObjectValue(value);
cache[index].setObjectKey(key);
table.put(key, cache[index]);
}

Analyzing Random Cache Code (Talk show):

In today’s show the Random Cache is going to explain the code line by line and here we go.
I will go straight to the main point; if I am not full then I will place the new entry that the client requested at the end of the cache (in case there is a cache miss).

I do this by getting the number of entries that resides in the cache and assign it to index (which will be the index of the current entry the client is adding) after that I increment the number of entries.

if (!isFull()) {
index = numEntries;
++numEntries;
}

If I don’t have enough room for the current entry, I will have to kick out a random entry (totally random, bribing isn’t allowed).

In order to get the random entry, I will use the random util. shipped with java to generate a random index and ask the cache to remove the entry that its index equal to the generated index.

else {
// Otherwise, replace a random entry.
index = (int) (cache.length * random.nextFloat());
table.remove(cache[index].getObjectKey());
}

At the end I just place the entry -either the cache was full or no- in the cache.

cache[index].setObjectValue(value);
cache[index].setObjectKey(key);
table.put(key, cache[index]);

Magnifying the Code:

It is said that when you look at stuff from a near view it is better to understand it, so that’s why we have a magnifying glass and we are going to magnify the code to get more near to it (and maybe understand it more).

Cache entries in the same voice: hi ho, hi ho, into cache we go.

New cache entry: excuse me; I have a question! (Asking a singing old cache entry near to him)

Old cache entry: go ahead.

New cache entry: I am new here and I don’t understand my role exactly, how will the algorithm handle us?

Old cache entry: cache! (Instead of man!), you remind me of myself when I was new (1st time I was added to the cache), I used to ask questions like that, let me show you what will happen.

Meet FIFO Cache Implementation:

public final synchronized void addElement(Object
key,Object value) {
int index;
Object obj;

obj = table.get(key);

if (obj != null) {
CacheElement element;

// Just replace the
value.
element = (CacheElement) obj;
element.setObjectValue(value);
element.setObjectKey(key);

return;
}

// If we haven’t
filled the cache yet, put it at the end.
if (!isFull()) {
index =
numEntries;
++numEntries;
} else {
// Otherwise, replace the current
pointer, entry with the new one
index = current;
// in order to make
Circular FIFO
if (++current >= cache.length)
current = 0;

table.remove(cache[index].getObjectKey());
}

cache[index].setObjectValue(value);
cache[index].setObjectKey(key);
table.put(key, cache[index]);
}

Analyzing FIFO Cache Code (Talk show):

After Random Cache, audience went crazy for random cache, which made FIFO a little bit jealous so FIFO started talking and said:

When there is no more rooms for the new cache entry , I will have to kick out the entry at the front (the one came first) as I work in a circular queue like manner, by default the current position is at the beginning of the queue(points to the beginning of the queue).

I assign current value to index (index of the current entry) and then check to see if the incremented current greater than or equals to the cache length(coz I want to reset current –pointer- position to the beginning of the queue) ,if so then I will set current to zero again ,after that I just kick the entry at the index position (Which is the first entry in the queue now) and place the new entry.

else {
// Otherwise, replace the current pointer,
which takes care of
// FIFO in a circular fashion.
index = current;

if (++current >= cache.length)
current = 0;

table.remove(cache[index].getObjectKey());
}

cache[index].setObjectValue(value);
cache[index].setObjectKey(key);
table.put(key, cache[index]);

Magnifying the Code:

Back to our magnifying glass we can observe the following actions happening to our entries

Conclusion:

As we have seen in this article how to implement the FIFO replacement policy and also Random replacement policy, in the upcoming articles we will try to take our magnifying glass and magnify LFU, LRU replacement policy, till then stay tuned 😉

January 15, 2009 Posted by | Uncategorized | Leave a comment

Lisp, the ultimate programming experience

It is not a yet-another-programming-language article. Lisp is so different from other “normal” programming languages. One of the core differences that it has “no syntax”.

Of course that claim “no syntax” has a double meaning. There is no programming language without a syntax. To get the trick you have to know how compilers work first.

Compilers first groups the input character stream into tokens (lexical analysis) and then parses the token stream into an abstract syntax tree intermediate representation. Then it either executes the statements (interpreted language) or generates machine instructions (compiled language)*.

The difference is that in Lisp, you directly write the abstract syntax tree. You also can manipulate it (“macros”). And you also can affect how the compiler does the lexical analysis (“reader macros”) !

Since you directly type the abstract syntax tree, there is no need for operator precedence rules. There is also no need for predefined/fixed operators; you can change or add any operator you want. There is also no limit on the number of the parameters of an operator (in Lisp the operator ‘+’ is a function name and can take any number of arguments, not just two).

In Lisp, since you write the syntax tree directly, there is no need for restrictions on identifier names; identifiers (“symbols”) can be made up of any sequence of character (given you provide appropriate escape sequences when necessary (mostly only on space, and parentheses). Any number not valid in the current compile radix is a valid symbol : 1027F is valid identifier under base 10 but not under base 16. (you can change the current compiler radix by code). %@!$^%^@$%^&** is valid identifier too. In fact +,-,*,/ are all function names not “hardcoded-operators”. And you can rebind them too to any other function.

Imagine the possibilities with access to the abstract syntax tree. You can build your own programming language on top of Lisp. Hence Lisp is called the “programmable programming language”. Even the CLOS (Common Lisp Object System); the Lisp’s Object Oriented implementation is implemented in pure Common Lisp macros.

Lisp can parse and evaluate Lisp expression if seven fundamental operations are provided by an underlying system. In fact Lisp was originally a mathematical model of computations of very high abstraction level, the counter part of a Turing machine model of computations. It was originally designed to write algorithms on paper, and was never meant to be implemented. It is when a student implemented those seven fundamental operations in machine code when Lisp was first executable around 50s. When the student first done; the professor who invented Lisp wasn’t happy because Lisp wasn’t mean to be executed; it was very much like executing mathematics.

Lisp was very popular in the research field, esp. for it’s fast prototyping and dynamic programming. At one point of time programming language researchers were trying a new compiler every day using Lisp as a development platform. Lisp was so popular that it had it’s own hardware that did execute Lisp instead of machine language (lookup Lisp Machines on wikipedia). But that hardware lost the battle for the much faster general purpose computers.

Lisp has many features from many decades that didn’t seem to appear but in late 90 and early 21st century. One of those features is “closures”. Which are being discussed at this moment for addition in C++0x and OpenJDK 7.0. Lisp is also the first language to ever incorporate garbage-collection (I think around 80s if not 70s). But then on the hardware available it took hours to run the GC once, so Lisp was usually considered impractical. One funny thing about Lisp GC, people used to use it at day and leave do GC all night till they come back 😀 😀

Lisp is so fundamental that any language that ever achieves the power of Lisp is only yet-another-Lisp-dialect. Lisp is different is that it has nothing called “statements”. It’s all composed of expressions. (Expression always evaluates to something unlike a statement**)

The current Lisp parenthesized notation is the same for instruction and data (of any structure). One of the funny things is that the current Lisp parenthesized notation was meant only for the underlying representation, and another FORTRAN-like syntax was going to be invented for humans but surprisingly the underlying representation won the race !!

+ A point of interest: Lisp is related somehow to the Lambda calculus. Because it’s highly functional-oriented languages. Although it is not purely functional language because it allows destructive operations.

++ Another point of interest: I don’t consider “Lisp” a language per se but a class of languages that contains all the Lisp dialects. Some stuff of this article only applies for the Common Lisp dialect. Scheme is also another Lisp dialect.

+++ Most Lisp compilers are compilers and not interpreters. Please don’t comment that Lisp is slow.

* There is another type which generates an intermediate machine-independent language that would be converted later into specific machine dependent instructions using JIT (Just-In-Time compiler). Or it can be further interpreted. Like Java byte-code or .NET MSIL.

** if(x) 1; 0; is a statement; we can’t say y = if(x) 1; 0;. Unlike y = x?1:0. So x?1:0 is an expression.

Sources: Paul Graham’s articles (look up Google). Also read his great book : On Lisp. For the compiler every day thing look up “the Lambda papers” to know what the research was about (http://library.readscheme.org/page1.html).

Some people noticed that all languages by incorporating dymanic programming, closures (lexical scopes), GC, and functional programming are eventually turning into Lisp (which were made at the 50s). It’s an interesting debate, but I personally see that being a Lisp needs such a transparent access to the syntax tree which is not usuably achievable unless you do something similar to the current Lisp syntax; that makes it yet-another-Lisp-dialect. Here you go: the famous Egg and Chicken paradox 😀

If you are geek like me you’d enjoy this “blah blah” programming language history article 🙂

January 6, 2009 Posted by | Uncategorized | Leave a comment

Introduction To WAP

Introduction:
Through this topic we will work together to understand Technology of Wireless Application Protocol (WAP), also we will take a fast tour about developing WAP Applications using ASP.net.

Technology Description:

Mobile Application :
When First Mobile arrived, it was only smart way for sending and receiving voice calls and after sometime for sending and receiving text messages. But now, it is become the most growing market for services and recreational purposes. It is also being used for accessing internet and multimedia world.

For this reason, a lot of developing and programming concepts changed to become compatible with mobile world, one of these concepts was WAP as a mobile alternative of WEB concepts for regular computers.

What is WAP ؟

From Wikipedia, WAP is an open international standard for application layer network communications in a wireless communication environment. Its main use is to enable access to the Internet (HTTP) from a mobile phone or PDA.

How it Work ؟

The Biggest different between WAP and WEB is that WAP able to work through less capabilities and slow speed in comapre with the configuration of regular computers.

WAP starts since an order come from mobile customer, it is convert HTML page to WML pages that is able to browsing through mobiles.

What is WML ؟

It is description language very similar to HTML tags, it have only some few different:

– The main Tag is <wml> instead of <html>.

– Documents splits to <card></cards>.


Introduction To WML:

This is sample from Wiki about WML document:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN"
"
http://www.phone.com/dtd/wml11.dtd" >
<wml>
   <card id="main" title="First Card">
     <p mode="wrap">This is a sample WML page.</p>
</card>
</wml>

Reading and Writing Variables in WML:

<setvar name="First_Name" value="Ahmed"/>
<setvar name="Age" value="21"/>

Later you can display it like that:

<p>First Name: $(First_Name)</p>

You can also read textbox value with the same way:

<card id="card1" title="Tutorial">
<do type="accept" label="Answer">
<go href="#card2"/>
</do>
<p>
<select name="name">
<option value="HTML">HTML Tutorial</option>
<option value="XML">XML Tutorial</option>
<option value="WAP">WAP Tutorial</option>
</select>
</p>
</card>
<card id="card2" title="Answer">
<p>
You selected: $(name)
</p>
</card>
</wml>

ASP.net Application using WAP:

Do you remember our first WAP Application in this topic?

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN"
"
http://www.phone.com/dtd/wml11.dtd" >
<wml>
   <card id="main" title="First Card">
     <p mode="wrap">This is a sample WML page.</p>
</card>
</wml>

If you want to use it through ASP.net, you have to convert it to something like that:

<%@ Page Inherits="System.Mobile.UI.MobilePage" Language="C#" %>
<%@ Register TagPrefix="mobile" Namespace="System.Mobile.UI" %>
<mobile:Form runat="server">
<mobile:Label runat="server">
This is a sample WML page.
</mobile:Label>
</Mobile:Form>

If you want to work through VB.net instead of C#, just modify the first line like that:

<%@ Page Inherits="System.Mobile.UI.MobilePage" Language="C#" %>

And now, if your web site ordered from PC, the response will contain HTML tags, if it is ordered from Mobile, the response will contains WML tags.

August 25, 2008 Posted by | Uncategorized | 1 Comment

Expression Blend

 

When WPF – the new .net technology- arrived, Microsoft try to provide some tools makes life easy to WPF Developers, one of this tools was Expression Blend, we will try to show some features about it in this topic.

Try to download it form Microsoft web site, then run it and choose new Project – WPF Application (*.exe):

 

You can now choose your name, folder and .net language you want.

Click View-Active Document View then click split view to show both code and design view:

 

In the left side, you will find all tools you need for your design including painting tools such as brushs and pens. You can find also .net components such as commandbuttons. You can also click the link to more item to show all tools:

While you are painting, you will find additional properties for each tool in the right side:

Example:

Add new <canvas>, this will the container of our picture for this example:

<Canvas>
<Canvas x:Name="MainImageCanvas" Canvas.Left="40" Canvas.Top="120">

Add new MediaElement to add a picture:

<MediaElement x:Name="MainImage" Source="c:/example/futex.jpg" Width="300" Height="300" ></MediaElement>

Now we will apply some effects through properties, this is an example of code results from some operations:

<Canvas.RenderTransform><TransformGroup>
<SkewTransform x:Name="MainSkewTransform" AngleY="-19" AngleX="0" CenterX="0" CenterY="0"/> <ScaleTransform x:Name="MainScaleTransform" ScaleY="1" ScaleX = "1" CenterX="0" CenterY="0"/></TransformGroup> </Canvas.RenderTransform></Canvas>

Press F5 now, this is a snap shot of expected results:

Now we will try to apply some shadow to the picture, so we will add <canvas> for a new picture object refer to the same file with new transformation parameters to make the second picture seems to be a shadow:

<Canvas x:Name="ReflectionImageCanvas" Canvas.Left="260" Canvas.Top="640">

<MediaElement x:Name="ReflImage" Source="c:/example/futex.jpg" Width="300" Height="300" Volume="0">

</MediaElement>

<Canvas.RenderTransform>

<TransformGroup>

<SkewTransform x:Name="ReflectionSkewTransform" AngleY="19" AngleX="-41" CenterX="0" CenterY="0" />

<ScaleTransform x:Name="ReflectionScaleTransform" ScaleY="-1" ScaleX="1" CenterX="0" CenterY="0" />

</TransformGroup>

</Canvas.RenderTransform>

</Canvas>

Previous Code Result:

Last topic in this lesson is to add some transparent to the shadow of picture through opacity property, the result XAML maybe like that:

<Canvas x:Name="ReflectionImageCanvas" Canvas.Left="260" Canvas.Top="640">

<MediaElement x:Name="ReflImage" Source="c:/example/futex.jpg" Width="300" Height="300" Volume="0">

</MediaElement>

<Canvas.RenderTransform>

<TransformGroup>

<SkewTransform x:Name="ReflectionSkewTransform" AngleY="19" AngleX="-41" CenterX="0" CenterY="0" />

<ScaleTransform x:Name="ReflectionScaleTransform" ScaleY="-1" ScaleX="1" CenterX="0" CenterY="0" />

</TransformGroup>

</Canvas.RenderTransform>

<Canvas.OpacityMask>

<LinearGradientBrush StartPoint="0.5,0.0" EndPoint="0.5,1.0">

<GradientStop Offset="0.345" Color="#00000000" x:Name="ReflGradientStop1" />

<GradientStop Offset="1.0" Color="#CC000000" x:Name="ReflGradientStop2" />

</LinearGradientBrush>

</Canvas.OpacityMask>

</Canvas>

Now, you have to try to edit the position of shadow by changing top and left manually, the result must be something like that:

Full XAML Code:

<Canvas>
            <Canvas x:Name="MainImageCanvas" Canvas.Left="40" Canvas.Top="120">

                <MediaElement x:Name="MainImage" Source="c:/example/FUTEX.JPG" Width="300" Height="300" >
                </MediaElement>
                <Canvas.RenderTransform>
                    <TransformGroup>
                        <SkewTransform x:Name="MainSkewTransform" AngleY="-19" AngleX="0" CenterX="0" CenterY="0"/>
                        <ScaleTransform x:Name="MainScaleTransform" ScaleY="1" ScaleX = "1" CenterX="0" CenterY="0"/>
                    </TransformGroup>
                </Canvas.RenderTransform>
            </Canvas>
            <Canvas x:Name="ReflectionImageCanvas" Canvas.Left="267" Canvas.Top="645">
                <MediaElement x:Name="ReflImage" Source="c:/example/futex.jpg" Width="300" Height="300" Volume="0">
                </MediaElement>
                <Canvas.RenderTransform>
                    <TransformGroup>
                        <SkewTransform x:Name="ReflectionSkewTransform" AngleY="19" AngleX="-41" CenterX="0" CenterY="0" />
                        <ScaleTransform x:Name="ReflectionScaleTransform" ScaleY="-1" ScaleX="1" CenterX="0" CenterY="0" />
                    </TransformGroup>
                </Canvas.RenderTransform>
                <Canvas.OpacityMask>
                    <LinearGradientBrush StartPoint="0.5,0.0" EndPoint="0.5,1.0">
                        <GradientStop Offset="0.345" Color="#00000000" x:Name="ReflGradientStop1" />
                        <GradientStop Offset="1.0" Color="#CC000000" x:Name="ReflGradientStop2" />
                    </LinearGradientBrush>
                </Canvas.OpacityMask>
            </Canvas>
        </Canvas>

 

Don’t forget that MediaElement can accept any type of media, try to attach video and see the result.

Anyway, you can copy this XAML code to a WPF .net solution and the same result will apply to your form.

August 24, 2008 Posted by | Uncategorized | Leave a comment

When database log file increases incredibly?

Working as DBA, I face problems daily and for the importance of the organization I work for; problems should be solved immediately.  past days I had log file which its size exceeds 70 GB unreasonably… I’ve low disk space problem, clients access this database denied from doing any operation since log file can’t allocate more free space on storage area, really all solutions weren’t applied due to some restrictions, one of the solutions is to copy data from this database and transmit it to another database (which you can control  log file growth) this solutions failed because SQL Server needs the new database has a log file its size like the old one aka 70 GB!!!!!

Another is to detach the database and trying attaching it without log file, fails also, since log file not exists.

While searching on this problem I’ve found someone has big size log file asks this question and I found the solution is to create a new database from the .mdf file of the old one and you shouldn’t put the .ldf (log file(s)) besides. because SQL Server searching for the .ldf and if it didn’t it creates another one with small size. and now old log file isn’t belong to new created database and you can delete it and save more space 🙂

Code to create database from .mdf file

sql code

August 19, 2008 Posted by | Uncategorized | 2 Comments

Google Code Jam

Google Code Jam is a coding competition in which professional and student programmers are asked to solve complex algorithmic challenges in a limited amount of time. The contest is all-inclusive: Google Code Jam lets you program in the coding language and development environment of your choice.

Google Code Jam begins in July and continues in August, when you will compete in online rounds against contestants from around the world. The Top 500 participants will advance to onsite competitions at a local Google office to compete against those in their region (Asia Pacific; Europe, Middle East and Africa; and the Americas). The Top 100 will participate in the final round at the Google Headquarters in Mountain View, California on Friday, November 14.

Don’t be left out! Make sure to register between June 17 and July 17, and show your coding creativity in Google Code Jam.

Prize Overview.

The top 100 finalists will divide over $80,000 in prize money:

Competitor(s) Prize
1st Place $10,000
2nd Place $5000
3rd Place $2500
4th – 10th Place $1500
11th – 30th Place $1000
31st – 50th Place $750
51st – 75th Place $500
76th – 100th Place $250

The Code Jam link :
http://code.google.com/codejam/

July 10, 2008 Posted by | Uncategorized | Leave a comment

Code Snippet :Oracle via C#

Select statement :

OracleCommand myOracleCommand = new OracleCommand();

OracleConnection myOracleConn = new OracleConnection();

myOracleConn.ConnectionString = “user id=userid ; data source=ERPDEV ; password=xxxxx”;

myOracleConn.Open();

myOracleCommand.Connection = myOracleConn;

try

{

string strSQLFields = “select QUESTIONANSWER from FCIH where QUESTIONTEXT =’any text’ ROWNUM <= 2)";

myOracleCommand.CommandText = strSQLFields;

myOracleCommand.CommandType = CommandType.Text;

OracleDataReader OracleDataReader1 = myOracleCommand.ExecuteReader();

if (OracleDataReader1.Read())

{

if (!(OracleDataReader1.IsDBNull(0)))

{

answer = OracleDataReader1.GetString(0);

}

}

if (!OracleDataReader1.IsClosed)

OracleDataReader1.Close();

if (myOracleConn.State == ConnectionState.Open)

myOracleConn.Close();

}

catch (Exception ex)

{

throw new ArgumentException(ex.Message.ToString());

}

Insert statment :

//new record

OracleCommand myOracleCommand4Insert = new OracleCommand();

OracleConnection myOracleConn4Insert = new OracleConnection();

myOracleConn4Insert.ConnectionString = “user id=ultimus ; data source=ERPDEV ; password=kmbpm263”;

myOracleConn4Insert.Open();

myOracleCommand4Insert.Connection = myOracleConn4Insert;

try

{

string strSQLFields4Insert = “INSERT INTO FCIHTABLE( TENDERNAME, TENDERNO )”;

string strSQLValues4Insert = “:TENDERNAME,TENDERNO.NEXTVAL”;

string strSQL4Insert = strSQLFields4Insert + ” VALUES (“ + strSQLValues4Insert + “)”;

myOracleCommand4Insert.CommandText = strSQL4Insert;

myOracleCommand4Insert.CommandType = CommandType.Text;

myOracleCommand4Insert.Parameters.Add(“TENDERNAME”, “any tender name”);

myOracleCommand4Insert.ExecuteNonQuery();

}

catch (Exception ex)

{

throw new ArgumentException(“Error In Insert You Suggestions to DataBase: “ + ex.Message.ToString());

}

July 10, 2008 Posted by | Uncategorized | 3 Comments

Top 10 syntax (Oracle and SQL)

As my experience in Microsoft development, I was think that the syntax for retrieving top 10 records in SQL server is same with Oracle but unfortunately they were different so here the syntax of both :

SQL SERVER :

SELECT TOP 10 age FROM Employees

ORACLE :

SELECT age FROM Employees WHERE ROWNUM <= 10

July 10, 2008 Posted by | Uncategorized | 1 Comment

Imagine Cup 2009 in Egypt

It is great to announce the next imagine cup 2009 and the most great it will be held in Egypt .Registration is opened now .

what is Imagine Cup ?

The world’s premier student technology competition, 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 seventh year, the Imagine Cup has grown to be a global event. More than 200,000 students from 100 countries entered the competition in 2008. 370 competitors from 121 teams representing 61 countries/regions attended the July 2008 worldwide finals in Paris, France. To learn more about the Imagine Cup, visit the What Is the Imagine Cup page.

What is the theme of the Imagine Cup 2009 and what city will host the World Finals?

This year’s theme is “Imagine a world where technology helps solves the toughest problems facing us today.” The United Nations has identified some of the hardest challenges in the world today in its Millennium Goals. This year the Imagine Cup uses these ambitious challenges as a guiding light to inspire change all over the world. Learn more about the eight Millennium Goals.

The Worldwide Finals will be held in Cairo, Egypt. Visit the Explore the Imagine Cup page to learn about the history, winners, and former themes of the Imagine Cup.

How soon can I register?

Registration for Imagine Cup 2009 is now open.

The official home page :
http://www.imaginecup.com/
FQA page :
http://imaginecup.com/Support/FAQ.aspx

July 10, 2008 Posted by | Uncategorized | 3 Comments