Google
 

Monday, June 16, 2008

Microsoft PopFly - How to Build Gadgets and Widgets

Overview [Web Development platform using browsers]

Popfly
is the fun and easy way to build and share mashups, gadgets, and Web pages. It’s made up of online visual tools for building Web pages and mashups and a social network where you can host, share, rate, comment and even remix creations from other Popfly users. If you're new to mashups and are interested in starting there, check out a popfly Videos

you can create your own mashups,gadgets and web pages using your own msn mail account

you can download the popofly explorer and start to work on your visual studio .Net IDE
download link : http://www.popfly.com/Overview/Explorer.aspx

find more about it at http://www.popfly.com/

Thursday, June 12, 2008

Java vs .NET

Source: From internet page

Java vs .NET
Competing Platforms
In the following lines, you will be taken through a journey to discover the roots of both the Java and the .NET technologies . You will learn the story behind these two competing technologies. For everything to be clear, specially for new comers to the IT field (who might still be fighting on which is better Java or C#), I would like to start by explaining the Java and the .NET platforms, as this will untangle the issue and resolve problems clearing the way for understanding the rest of the picture easily.
Java Coalition
Sun, jointly with IBM and Netscape, developed the Java language and the Java platform. (It basically took most of the functionality of Smalltalk, a 100% object oriented language developed early by IBM).
Java Promise
If you compile a program written in Java, it will not run on a computer unless this computer has a Java platform (called JRE: java runtime environment) installed on it. Each operating system has a version of the JRE that can be installed on it. There is a JRE for Windows, a JRE for Linux, a JRE for Solaris (Sun's UNIX operating system), a JRE for Mac OS ... etc. If you compiled your Java program, the same compiled program can be run on any of those operating systems that have the JRE installed. You do NOT need to recompile (or modify) your program for each operating system in order to run on it. That was the promise of Java.
This promise, was very appealing for companies developing software for more than one operating system. Some of those companies developed their software for an operating system and then it took them several months to port it to a different operating system later on. (For instance some companies delivered the Apple Mac OS version of their program first, then ported it to windows after several months.) Java promised to make that porting instant, i.e. in zero time. Because once you compiled the Java program, it can be run on any operating system that has a JRE. That was the promise of Java and its great appeal at it started. This promise is still used to promote Java today. However, whether or not Java has fulfilled its promise is a matter of debate.
IBM
The reason why IBM joined forces with Sun to develop and promote Java was that IBM had a lot to gain from this. IBM sold many mainframes and server computers. The problem with those monster servers was that the number of programmers who could develop software for them was much fewer than programmers of regular programming languages on a PC. Just compare how many can program a mainframe using Cobol and how many know C++ or VB? This lead IBM to push Java strongly and heavily promote it. The reasoning behind this was that because Java is independent of the operating system and the machine it runs on (i.e. portable) any Java programmer can develop programs that can run on IBM's server computers, upppon which a lot of IBM's business depended. IBM had, and still has, a lot to gain from Java, and that's why it is pushing it so hard. IBM is also pushing open source for a similar reason.
Netscape
Netscape was to gain from the Java platform as well, hence the reason for its joining forces with both Sun and IBM. Netscape wanted the browser to be the center of everything. It wanted to cancel the importance of one operating system over the other. It even started the-browser-is-the-OS campaign which advocated that the browser was the important thing, and the specific OS on which it ran was irrelevant. Sure this angered its rival Microsoft. From its deep love and support for Java, Netscape even renamed its scripting language from LiveWire to JavaScript which is the name we know it now with.
Microsoft
Against those 3 giants (Netscape was relatively big at that time, before Microsoft 'sacked' it from its high position) stood Microsoft. IBM, Sun and Netscape all were to gain from Java. But for Microsoft, Java was a threat. Java promised portability across operating systems, this meant that no matter what OS you were using, you will still be able to run the program with the same functionality. This would in turn give lesser importance to which OS you are using, for you can then be using just any OS. Of course this strongly threatened Microsoft's monopoly over the operating system of the PC, namely Windows. That is why Microsoft fought ferociously against Java. Netscape stood as a pain in the neck for Microsoft for a while, and Bill Gates was unable to get any sleep at night, but when he did manage to get any, it was nothing but nightmares of Netscape dethroning Microsoft from its software empire.
Borland
Borland at first embraced the Java platform and the Java language by providing tools (IDEs) for Java. Unlike IBM and Netscape, however, it did not take sides with Sun, but remained unattached. When Microsoft launched its counterattack on Java in the form of the .NET platform, Borland quickly embraced the .NET platform as well and started providing products for both the .NET and the Java platforms. As always, borland stayed in the support-all-technologies place it has always enjoyed in the past. I personally respect Borland and the quality of their products a lot. (Think Delphi. Although I've never programmed in Pascal or Delphi before, yet I know Borland's products are cool. I've tried their analysis/design tools once in the past, then still owned by Together Software, and it was way cool and a lot of fun.)
J++
Microsoft tried to ride the Java wave by adding J++ as one of the languages supported in its Visual Studio product group. J++ was basically Java, but Microsoft tried to pack it with other stuff from its own making it less portable because it is its very portability which threatened Microsoft's thrown over the OS of the PC. Sun then launched a counter-campaign with ads calling for "100% Java" and "Pure Java" trying to lure developers into going for the original portable Java it developed and not Microsoft's J++. Failing to win the marketing campaign, and finding that Microsoft is going too far with its modification of the Java language, Sun finally filed its famous law suit against Microsoft, which stayed in courts for a couple of years. This is nothing unusual for Microsoft which had law suits against it and court struggle before with Apple, IBM and others. Microsoft is popular for that kind of thing. The law suit accused Microsoft of violating Sun's conditions for using Java by modifying it. Finally, Sun won the legal battle and received a nice amount of money in compensation from Microsoft. Moreover, according to the settlement of the case, Microsoft was allowed to continue supporting its J++ product, but was not allowed to upgrade it to later Java versions. This spelled the end to Microsoft's dreams of riding the Java wave.
C# and .NET
Finding it has lost the battle for J++, and fears of the Java threat reemerging for Microsoft, it though of a new strategy to counteract Sun's Java. Microsoft developed the .NET technology, which 'borrowed' a lot of the features of the Java platform, except that it ran on the Windows OS (aka was not portable!). They also developed C#, which was basically nothing but Java with a new name! It was almost identical to Java in all respects (think garbage collection, no pointers). It's as if they repackaged their J++ into a new name. Such action was not surprising from a company like Microsoft with its long experience in using similar stealth strategies.
The strength of the Java platform was that it supported many operating systems. In order to use the word "many" for its platform, Microsoft made its .NET platform support many programming languages! (Which was a bit absurd!). Anyway, the .NET platform used the same ideas of the Java one, except that it had different names for them (as usual with Microsoft). So now, Microsoft had a counter-element for each of the ones by Sun: Java, JRE, bytecode all had their equivalents in the Microsoft developer tools world (even the word "many!")
Java Applets vs Flash
Another feature Sun and the Java coalition tried to promote about Java besides its portability was the use of Java applets. Java applets were something Sun pushed so strongly at first and made a lot of propaganda for. The reasoning behind this was that an applet would run from within the web browser and therefore would be portable and accessible to anyone who has access to the web through a regular web browser. Netscape was also in for this. Because of the high appeal of animated graphics at the early days of the web, Sun made the mistake of heavily promoting Java applets as a way to make rich graphic animations and an interactive interface on the web. Macromedia was trying to push Flash forward to become the 'standard' in web animation and interactive web interfaces. Seeing the high competition from Java, Microsoft desided to strike again on Java, this time on the Java applet. Microsoft released Internet Explorer 5 with the Flash plugin preinstalled in it! This gave a strong push to Flash on the web, soon it became the standard for animated graphics in web pages and became a strong choice for rich interactive web applications. By doing so, Microsoft managed to kill the Java applet advantage in the filed of animation and interactivity on the web. Soon Microsoft realeased Windows XP without the JRE (needed to run Java programs) pre-installed on it. This outraged Sun, but they were unable to do anything about it except for a media campaign. By preinstalling the Flash plugin in its Inter Explorer 5 and delivering Windows XP without the JRE preinstalled, Microsoft managed to regain its controal and significantly reduce the threats of Java on its empire. Sun now is the one striving to paint a picture of coexistence of both the .NET and the Java platforms promoting the idea that both technologies can coexist together.
Instructors and Students
The business environment in which technology lives is a vital space where technology professionals must be aware of. You will not be able to advance well technically if you are not aware of the business background and the total picture of 'fights' and motives of giant software companies. I believe that a brief background about this should be an integral part of technology training. I try to brief my students with a bird's eye view of this picture before starting a technology course because it helps them see the big picture and know where they are standing instead of getting lost in a pool of technologies, terms and abbreviations.
If you had that background, no one will be able to fool you by telling you C# is better than Java, or vice versa. No one will be able to tell you Java is dead! You will also have a sense of direction to where things are heading for the future. You will not be lost anymore in a spinning stream. Its easy, with such background under your arm, to bust any hypes that technically incompetent people might be propagating, you'll simply not fall into any of the hype. You'll be more stable, not to be blow off by the slightest of winds. More importantly, you will start asking the right questions.
Microsoft is Nice
Just in order not to get the wrong impression, despite Microsoft's twisted style of dealing with things, it has made a lot of contributions to the IT field. Suffice it to say that it has:
Made thing very EASY.
Integrated a lot of bright ideas and technologies that have been developed by others (some may call that stealing, but at least they're good at copying and integrating all that together).
Made computer use popular. I lift my hat them in respect, despite their buggy software and their over hyped methods.

Monday, June 9, 2008

Microsoft .NET and J2EE

Hi MS.NET and J2EE developers , the following article is helpful

it is about Application Interoperability: Microsoft .NET and J2EE

http://msdn2.microsoft.com/en-us/library/ms978732.aspx

Sunday, May 4, 2008

Adding Items to the AOT Add-Ins Menu

Adding Items to the AOT Add-Ins Menu

The shortcut menu in the Application Object Tree (AOT) has an Add-ins menu where you can find various development tools such as the cross-reference system and the Visual MorphXplorer.

To add your own tool to the Add-ins submenu

Create a menu item for the tool.

Locate the item you want to add to the Menu Items node.

Drag the menu item onto sysContextMenu in the Menus node.

Enabling and Disabling Menu Items According to Context
All items in the sysContextMenu menu are automatically added to the Add-ins submenu. If you want to disable items according to the current context, you need to add to the verifyItem method for the SysContextMenu class.

verifyItem( identifiername MenuItemName , MenuItemType MenuItemType ) is automatically called for each item you add to the sysContextMenu menu. It takes the name of the menu item and the menu item type as parameters, and must return 0 (zero) if the item isn't available.

Example

The following extract from verifyItem shows the testing performed when the parameter is the menu item MorphXplorer.


case menuItemDisplayStr(MorphXplorer):
if (this.selectionCount() != 1
firstNode.AOTIsOld() //Does not work for old nodes
)
{
return 0;
}
if (!docNode &&
(_firstType==UtilElementType::Class
_firstType==UtilElementType::Table))
{
return 1;
}
return 0;


Tip

There are other classes called SysContextMenu*, for example, SysContextMenuCompare. These classes are used when there are several levels in the add-ins hierarchy. For example, when you activate Compare on two objects, the Add-ins submenu is also available in the Compare dialog. The first() and next() methods on sysContextMenuCompare define the proper context.

Saturday, May 3, 2008

Tabbed interface for Axapta 3.0

Features
- window management:
- view opened windows as tabs
- change windows position
- close windows
buttons:
- open form design for currently opened form
- open table browser for the active form or the table selected in the AOT
- open current field in AOT
- open Cross references for selected field (in AOT and for active form)
- copy name/path/AxPath of selected AOT items
- go to the application object of the current AOT item (for example to table form field)
- Add-Ins menu for AOT Item
- compare selected AOT item(s)
- import XPO
- search selected AOT item for something
- refresh AOD
- AxSearch integration


Go to : Axaptapedia Article

Wednesday, April 16, 2008

Do you want to work @ Microsoft :)

HI Friends , That is right ..!!!

you can find microsoft jobs at

http://www.linkedin.com/jobs?viewResults=&sik=1208362132712

also you can find it at microsoft website

http://www.microsoft.com/careers/

so trust yourself and experience , and don't hesitate to apply for microsoft jobs

Do you want to work @ Google :)

HI Friends , That is right ..!!!

while i search on google search engine about something i find a link for google jobs ,

http://www.google.com/intl/en/jobs/

also you can find jobs at

http://www.linkedin.com/jobs?viewResults=&sik=1208362132712

Don't worry , I got 1st and 2nd interviews there .....

wait my next post to describe what happened ........ :)

so trust yourself and experience , and dont hesitate to apply for Google .

Note : at google jobs , you can create your job cart and finally apply for all positions

Thanks

Jobs @ Al Fanar Co. KSA

Hi ,

We have the following vacancies at al fanar Co.

1- Dynamics NV Developer /KSA

http://www.amcham.org.eg/hr/recruitment/candidate/job_profile.asp?page=2&JobID=18422&EmployerID=1830


2- Software Development Section head /KSA

http://www.amcham.org.eg/hr/recruitment/candidate/job_profile.asp?page=2&JobID=18420&EmployerID=1830


3- Dynamics AX Consultant / KSA

http://www.amcham.org.eg/hr/recruitment/candidate/job_profile.asp?page=2&JobID=18424&EmployerID=1830

Saturday, April 12, 2008

Egypt IT Companies

ITWorxA leading Egyptian software company providing outsourcing services, located in the Nasr City Free Zone.
Raya SoftwareProvides a wide range of enterprise level solutions and software applications.
OTSOrascom Technology Solutions provides a wide range of IT solutions and services.
Nile OnlineProvides Internet connectivity services.
NoorProvides 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.
Web Design and Development
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.
Hardware
IBSImports and assembles computer hardware.
In Alexandria
Online HorizonsProvides web development and web hosting services.
Arwa SoftwareDevelops information system software products.
From Kuwait
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.
From Saudi Arabia
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.
From UAE
Axiom ComputersDevelops information systems based on Oracle and J2EE technologies.
From USA
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.
From UK
LogicaCMGProvides system integration services for IT and wireless telecommunications.
From Germany
AMSProvides information systems for the medical sector.
From Australia
IOSAn Australian based software company with a development center in Egypt.
From Canada
NTG ClarityDelives network, telecom, IT and infrastructure solutions to network service providers and medium and large enterprises.
CIT GlobalProvides ecommerce solutions

Microsoft EDC at Cairo International Conference Center-Egypt

Hi Friends ,

Microsoft EDC http://www.edc2008. com EDC 2008 is the biggest Developers Conference of the year in Egypt, and is a critical event for any developer who wants to see the newest as well as the next-generation technology. EDC is full of sessions and activities that help you to learn the current and the future of the Microsoft Platform and get to know people who are as passionate about software as you are.

here is the Agenda of the two days http://www.edc2008. com/Agenda. aspx

it is for 100 L.E. for individual invitation.

Getting Started With AJAX (Videos...)

Hi Web developers friends , nowdays there is a new trend to use AJAX technology for building your business .

ASP.NET AJAX is a free framework for quickly creating efficient and interactive Web applications that work across all popular browsers.

ASP.NET AJAX is built-into ASP.NET 3.5. It is also available as a separate download for ASP.NET 2.0.With ASP.NET AJAX you can:Create next-generation interfaces with reusable AJAX components. Enhance existing pages using powerful AJAX controls with support for all modern browsers. Access remote services and data from the browser without tons of complicated script. Take advantage of the improved efficiency and ease of use in Visual Studio 2008, with its built-in support for ASP.NET AJAX, improved JavaScript support, and a new Web page designer interface

you can getting started from the folowing URL

http://www.asp.net/ajax/

Getting Started with Silverlight

Microsoft Silverlight is a cross-browser, cross-platform client technology that helps you design, develop, and deliver media-enabled experiences and rich interactive applications on the Web.
Silverlight appeals to both designers and to developers because it provides a powerful platform that makes it easy to develop Web applications with professional-quality graphics, audio, and video for an engaging user experience. Silverlight also offers powerful tools that will improve the productivity of both designers and developers.

you can getting started from this link

http://msdn2.microsoft.com/en-us/library/bb404703.aspx

Wednesday, April 9, 2008

What is the difference between shadow and override?

Hi friends , to be ready for technical interview at any corporations you can find alot of questions to any technology like MS.Net , Java , SQL Server , Oracle , Python ....etc at http://www.geekinterview.com

solve this question :
What is the difference between shadow and override ?

find posts there

http://www.geekinterview.com/question_details/31941

Download Microsoft SharePoint 2007 VHD and Getting Started

verview

The Microsoft VHD Test Drive Program provides customers with an enhanced server-based software evaluation experience that’s faster, better supported and more flexible. You can now access the entire catalog of pre-configured Microsoft and partner products and solutions in the VHD format and start evaluating and testing today from www.microsoft.com/vhd. This download enables you evaluate Microsoft Office SharePoint Server 2007. Microsoft Office SharePoint Server 2007 is an integrated suite of server capabilities that can help improve organizational effectiveness by providing comprehensive content management and enterprise search, accelerating shared business processes, and facilitating information-sharing across boundaries for better business insight. Office SharePoint Server 2007 supports all intranet, extranet, and Web applications across an enterprise within one integrated platform, instead of relying on separate fragmented systems. Additionally, this collaboration and content management server provides IT professionals and developers with the platform and tools they need for server administration, application extensibility, and interoperability. This fully functional pre-configured VHD provides you a trial software will automatically expire after 30 days. This is a preconfigured virtual machine contained within the Virtual Hard Disk (VHD) format. Virtual Server 2005 R2 is required to run this VHD. Please refer to the system requirements section for more details.

http://www.microsoft.com/downloads/details.aspx?FamilyID=67f93dcb-ada8-4db5-a47b-df17e14b2c74&DisplayLang=en

docx2doc - convert from docx to docHome000-000-0000

A newbie's guide to .docx
.docx is the default file format in the latest version of Microsoft Word in Office 2007. All docs in the new office family is based upon an open, standardized specification called Office Open XML.

http://www.docx2doc.com/Newbies-Guide-To-docx.aspx

Application Architecture for .NET: Designing Applications and Services

Hi .Net Developers , i found a good article at msdn.com .i think it so helpful for you to deeply understand [Application Architecture for .NET: Designing Applications and Services]

i finished reading it and it so so so helpful for me , so i hope all of you read it carefully

article : http://msdn2.microsoft.com/en-us/library/ms954595.aspx

note : nearly , i will post my service oriented architecture sample using c# according to the App Architecture and SOA

Amazing development on Sharepoint ...!

Amazing development on Sharepoint ...!

By utilizing the capabilities of the NetAdvantage for ASP.NET controls, developers can create highly customized and powerful WebParts for Microsoft Windows Sharepoint (WSS) or Microsoft Office SharePoint collaboration portals and plug them directly into the SharePoint framework. SharePoint is a powerful web-based portal package that organizations are adopting as a means of online communication and collaboration. By presenting a user with a series of WebParts organized onto a single web page, information can be delivered to multiple end users. This allows developers to build interfaces that contain specific information unique to each user.

http://www.infragistics.com/hot/sharepoint.aspx

Microsoft .NET Framework SDK QuickStart (ASP.NET,Web Services...)

The QuickStart Tutorials are the fastest way to understand what the .NET Framework technology offers leading-edge developers. Inside you'll find information about the most compelling features of the .NET Framework technology, including how to put them immediately to work for you or your company

http://asp.dotnetheaven.com/

.NET Matters: Deadlock monitor

Reference : http://msdn2.microsoft.com/en-us/magazine/cc163352.aspx

.NET Matters
Deadlock monitor
Stephen ToubCode download available at: NETMatters2007_10.exe (156 KB) Browse the Code Online [ http://msdn2.microsoft.com/en-us/magazine/cc164433(printer).aspx ]
Q I'm using locks in my application to synchronize work on a bunch of threads. Unfortunately, I'm doing something incorrectly and my threads seem to just stop sometimes. I think I'm running into deadlocks, but I'm not sure how to find them. Is there any way I can do so programmatically? I'd like an exception to be thrown when a deadlock is encountered.
Q I'm using locks in my application to synchronize work on a bunch of threads. Unfortunately, I'm doing something incorrectly and my threads seem to just stop sometimes. I think I'm running into deadlocks, but I'm not sure how to find them. Is there any way I can do so programmatically? I'd like an exception to be thrown when a deadlock is encountered.
A First, it's important to understand what a deadlock among threads is and the conditions that lead to one. Threads deadlock when waiting on each other to release some resources, but by performing that blocking wait, they're not releasing the resources the other threads need in order to unblock. The threads can't make any progress until the resources are released, but because they're not making progress, the resources will never be released, the threads are locked up, and thus "deadlock." Many OS course textbooks will cite the four conditions necessary for a deadlock to occur:
A First, it's important to understand what a deadlock among threads is and the conditions that lead to one. Threads deadlock when waiting on each other to release some resources, but by performing that blocking wait, they're not releasing the resources the other threads need in order to unblock. The threads can't make any progress until the resources are released, but because they're not making progress, the resources will never be released, the threads are locked up, and thus "deadlock." Many OS course textbooks will cite the four conditions necessary for a deadlock to occur:
A limited number of a particular resource. In the case of a monitor in C# (what you use when you employ the lock keyword), this limited number is one, since a monitor is a mutual-exclusion lock (meaning only one thread can own a monitor at a time).
The ability to hold one resource and request another. In C#, this is akin to locking on one object and then locking on another before releasing the first lock, for example:
Copy Codelock(a)
{
lock(b)
{
...
}
}
No preemption capability. In C#, this means that one thread can't force another thread to release a lock.
A circular wait condition. This means that there is a cycle of threads, each of which is waiting for the next to release a resource before it can continue.
If any one of these conditions is not met, deadlock is not possible. The first condition is inherent to what a monitor is, so if you're using monitors, this one is set in stone. The second condition could be avoided by ensuring that you only ever lock one object at a time, but that's frequently not a feasible requirement in a large software project. The third condition could possibly be avoided in the Microsoft® .NET Framework by aborting or interrupting the thread holding the resource your thread requires, but a) that would require knowing which thread owned the resource, and b) that's an inherently dangerous operation (for the many reasons why, see msdn.microsoft.com/msdnmag/issues/05/10/Reliability). Thus, the way to avoid deadlocks is to avoid (or thwart) condition four.
In his article in the April 2006 issue (available at msdn.microsoft.com/msdnmag/issues/06/04/Deadlocks), Joe Duffy discusses several techniques for avoiding and detecting deadlocks, including one known as lock leveling. In lock leveling, locks are assigned numerical values, and threads must only acquire locks that have higher numbers than locks they have already acquired. This prevents the possibility of a cycle. It's also frequently difficult to do well in a typical software application today, and a failure to follow lock leveling on every lock acquisition invites deadlock.
Rather than prevent deadlocks wholesale, many systems attempt to detect them and then eliminate them once found. For example, SQL Server® can detect when deadlocks occur and abort one of the tasks involved in the cycle, thereby removing the deadlock. In his article, Joe builds a common language runtime (CLR) host that is capable of this form of deadlock detection in .NET applications that use monitors, a very cool feat. Unfortunately, using a custom CLR host isn't always practical for many .NET apps, including those that already have a custom host, like ASP.NET applications. As such, it would be beneficial to be able to utilize similar deadlock detection capabilities, without the need for a custom CLR host, such that these types of deadlocks could be detected at run time. This would be beneficial during development and testing phases, to identify coding errors where locks are being used incorrectly. It could also be used in production to detect and eliminate deadlocks as they occur (preventing a thread from causing one by blocking it from attempting the critical wait that would complete a cycle), however typical deadlock detection algorithms are costly and may not be appropriate in production systems for performance reasons. (I'll have a few comments on performance at the end of this column.)
To address this need, I've built a sample wrapper for the .NET System.Threading.Monitor class that includes deadlock detection capabilities. As with Monitor, my DdMonitor class provides Enter and Exit methods, and under the covers it delegates to the equivalent methods on Monitor. However, it also tracks monitor usage and throws exceptions when the attempted acquisition of a lock will complete a cycle, which would result in deadlock. For the rest of this column, I'll detail the implementation of this deadlock monitor class and provide additional information on its usage as well as on the advantages and disadvantages of its deployment.
The outline for the DdMonitor class is shown in Figure 1. From the start, note that DdMonitor does not completely mimic the public interface of System.Threading.Monitor. It provides the same public static TryEnter, Enter, and Exit methods, but it does not provide the Wait, Pulse, and PulseAll static public methods of its counterpart.
Figure 1 DdMonitor Class
Copy Codeclass DdMonitor
{
public static IDisposable Lock(object monitor) { ... }
public static void Enter(object monitor) { ... }
public static bool TryEnter(object monitor) { ... }
public static bool TryEnter(
object monitor, TimeSpan timeout) { ... }
public static bool TryEnter(
object monitor, int millisecondsTimeout) { ... }
public static void Exit(object monitor) { ... }
}
DdMonitor also provides a public static Lock method. Since the C# lock keyword provides a nice abstraction over Monitor, it's beneficial to provide a similar one for DdMonitor. Without the ability to modify the C# language, it's impossible for us to obtain identical syntax, but we can get close:
Copy Code// with Monitor
lock(obj) { ... }
// with DdMonitor
using(DdMonitor.Lock(obj)) { ... }
This syntactical feat is accomplished by implementing Lock, as shown in Figure 2. The Lock method delegates to DdMonitor.Enter to acquire the lock. However, it also instantiates a DdMonitorCookie object that implements IDisposable. This object's Dispose method will call DdMonitor.Exit to release the lock; this enables the developer to wrap DdMonitor.Lock in a C# using statement (Using in Visual Basic® or stack-allocation in C++/CLI) as shown previously.
Figure 2 Implementing the Lock Method
Copy Codepublic static IDisposable Lock(object monitor)
{
if (monitor == null) throw new ArgumentNullException("monitor");
IDisposable cookie = new DdMonitorCookie(monitor);
Enter(monitor);
return cookie;
}
private class DdMonitorCookie : IDisposable
{
private object _monitor;
public DdMonitorCookie(object obj) { _monitor = obj; }
public void Dispose()
{
if (_monitor != null)
{
DdMonitor.Exit(_monitor);
_monitor = null;
}
}
}
The Enter method and two of the three TryEnter methods are simple wrappers for the third TryEnter method, as shown in Figure 3. These implementations are meant to follow the same specification as implemented by Monitor's Enter and TryEnter method. Calling Enter will block until the lock is acquired (we differ slightly by design in that our Enter method will throw an exception if a deadlock is detected, rather than blocking forever), and thus delegates to TryEnter with a Timeout.Infinite timeout. Note that Timeout.In- finite equals -1, which is a special value that signals TryEnter to block until lock acquisition, rather than failing out after the specific time. In contrast, the overload of TryEnter that doesn't accept a time value defaults to using a timeout of 0, meaning that it will return false if the lock cannot be acquired immediately (again, our implementation will also throw an exception if acquiring the lock would cause a deadlock; this decision is a debatable point with TryEnter, however, so you may choose to modify the implementation accordingly). Note that TryEnter will return true if the lock was acquired or false otherwise. The second overload of TryEnter simply converts the supplied TimeSpan timeout value into a number of milliseconds, validates the argument, and delegates to the final TryEnter overload, which is where all the real work happens.
Figure 3 Implementing Enter
Copy Codepublic static void Enter(object monitor)
{
TryEnter(monitor, Timeout.Infinite);
}
public static bool TryEnter(object monitor)
{
return TryEnter(monitor, 0);
}
public static bool TryEnter(object monitor, TimeSpan timeout)
{
long totalMilliseconds = (long)timeout.TotalMilliseconds;
if (totalMilliseconds < -1
totalMilliseconds > Int32.MaxValue)
throw new ArgumentOutOfRangeException("timeout");
return TryEnter(monitor, (int)totalMilliseconds);
}
Our design is relatively straightforward, though it does involve a few interesting implementation details. The implementation begins by validating the supplied parameters, ensuring that an object was actually supplied on which to be locked and that a valid timeout was supplied (meaning either -1 or a non-zero number of milliseconds).
At this point, DdMonitor needs to access some shared state. Since there's no supported way for DdMonitor to interrogate the CLR for information about a monitor (including which thread may own it and which threads may be waiting on it), DdMonitor has to track this information manually. It does this by storing a static table of data structures that contain all of the relevant information about acquired monitors in the system, and every time an Enter or Exit operation is performed on a monitor, it updates this shared state.
Note that this has a few implications. First, while we'll see that DdMonitor does end up delegating to Monitor with the same monitor object that was supplied by the user, DdMonitor knows nothing about direct calls to Monitor's methods, and thus it's not able to update its internal state information based on any such calls that are made. This means that deadlock detection will not function properly if you mix usage of DdMonitor and Monitor (or the lock keyword) in your app, causing false negatives and possibly not preventing some deadlocks.
Another implication of this implementation is that this static table is AppDomain-specific. This shouldn't be a problem, since objects you lock on should also only live in one AppDomain. However, there are several special kinds of objects (such as Type and String) that are able to cross AppDomain boundaries, and if you lock on one of these domain-agile objects with DdMonitor from multiple domains, the static table maintained by DdMonitor in each domain will only contain a subset of the relevant information, again possibly leading to false negatives.
A third issue with this approach has to do with reliability. A lock statement in C# expands to a call to Monitor.Enter followed immediately by a try block, whose body is equivalent to the body of the lock statement and whose finally block releases the monitor. The CLR, through a bit of JIT hackery, ensures that the try block is entered if the call to Monitor.Enter succeeds; this ensures that the finally block will also be executed if Monitor.Enter succeeds, which is important in the face of asynchronous exceptions that could otherwise occur between the call to Monitor.Enter and entering the try block (for more information, see msdn.microsoft.com/msdnmag/issues/05/10/Reliability and www.bluebytesoftware.com/blog/2007/01/30/MonitorEnterThreadAbortsAndOrphanedLocks.aspx). As you'll see in our DdMonitor implementation, however, there is code that comes after the actual underlying call to Monitor.Enter and before the try block that comes after the call to DdMonitor.Enter; as such, these reliability guarantees are lost with our implementation.
You should keep all of these issues in mind in case any is dangerous to your scenarios.
Back to our implementation of TryEnter, which is shown in Figure 4; it continues by obtaining its internal lock for this shared state. Once acquired, it accesses the dictionary to find any previous data on the monitor being entered. If no such data exists, that means that no threads currently own or are waiting on the monitor. In such a case, TryEnter initializes a new MonitorState object to track this monitor and puts it back into the table.
Figure 4 Implementing TryEnter
Copy Codeprivate static Dictionary _monitorStates =
new Dictionary();
public static bool TryEnter(object monitor, int millisecondsTimeout)
{
if (monitor == null) throw new ArgumentNullException("monitor");
if (millisecondsTimeout < 0 &&
millisecondsTimeout != Timeout.Infinite)
throw new ArgumentOutOfRangeException("millisecondsTimeout");
bool thisThreadOwnsMonitor = false;
MonitorState ms = null;
try
{
lock (_globalLock)
{
if (!_monitorStates.TryGetValue(monitor, out ms))
{
_monitorStates[monitor] = ms = new MonitorState(monitor);
}
if (ms.OwningThread != Thread.CurrentThread)
{
ms.WaitingThreads.Add(Thread.CurrentThread);
ThrowIfDeadlockDetected(ms);
}
}
thisThreadOwnsMonitor = Monitor.TryEnter(
monitor, millisecondsTimeout);
}
finally
{
lock (_globalLock)
{
if (ms != null)
{
ms.WaitingThreads.Remove(Thread.CurrentThread);
if (thisThreadOwnsMonitor)
{
if (ms.OwningThread != Thread.CurrentThread)
ms.OwningThread = Thread.CurrentThread;
else ms.ReentranceCount++;
}
}
}
}
return thisThreadOwnsMonitor;
}
Copy Codeprivate class MonitorState
{
public MonitorState(object monitor) { MonitorObject = monitor; }
public object MonitorObject;
public Thread OwningThread;
public int ReentranceCount;
public List WaitingThreads = new List();
}
MonitorState stores several pieces of information about a monitor. First, it stores the monitor itself; the system uses this purely to provide diagnostic information in the event that a deadlock is detected (since it's useful for debugging to know which monitors were involved in a deadlock cycle). MonitorState also stores the Thread object for whichever thread currently owns the monitor (this value is null if it's not currently acquired), a ReentranceCount that indicates the number of times the monitor has been entered (since a thread that owns the monitor can reenter the monitor safely), and a list of waiting threads that indicates what threads are currently trying to acquire this monitor.
With a MonitorState tracking object for this monitor now in hand, TryEnter registers this thread's intent to wait on the object by adding the current Thread to the MonitorState's WaitingThreads list. Once this intent has been registered, TryEnter calls the private ThrowIfDeadlockDetected method, which does exactly what it sounds like (we'll take a look at this method's implementation shortly). If ThrowIfDeadlockDetected detects that this lock acquisition would cause a deadlock cycle, it throws an exception, preventing the lock from being acquired. Note, too, that in doing so, the finally block in which this call is wrapped will remove the current thread from the list of waiting threads.
If no deadlock is detected, it's safe for this thread to attempt to acquire the monitor, and TryEnter simply delegates to Moni- tor.TryEnter to enter the actual monitor. Regardless of whether the lock is acquired, the shared stated lock is then required. Note that I have my own lock leveling scheme here to prevent DdMonitor from causing deadlocks (which would be a really bad thing from a tool meant to prevent them). It's OK for _globalLock to be acquired while holding a lock on a user-supplied monitor, but it's not OK for the reverse to happen. That's why it's OK for me to take the lock on _globalLock in the finally block, where I may potentially already own the user-supplied monitor, but it's not OK to attempt to acquire a lock on the user-supplied monitor while holding _globalLock, which is why I first exit the lock on _globalLock before calling Monitor.TryEnter.
At this point, regardless of whether the user-supplied monitor was successfully acquired, I remove the current thread from the monitor's waiting list (it either owns the monitor or the wait failed, so in either case it's no longer waiting). Then, if the monitor was acquired, the relevant fields are updated in MonitorState.
Exiting the lock is more straightforward, as shown in Figure 5. With the exception of the argument validation, the entire body is wrapped in a lock on the _globalLock monitor. The MonitorState for the user-supplied monitor is retrieved (if it doesn't exist, this monitor was not locked and an exception is thrown), and it's checked to see which thread owns it. If it's unowned or if the owner is not the current thread, the call to Exit was erroneous and an exception is thrown. Otherwise, if the current thread has entered this monitor multiple times, the ReentranceCount is simply reduced, and if not, the OwningThread is set to null to signify the release of this thread's lock on the monitor. Additionally, if there are no threads waiting for this monitor, the MonitorState is removed from the table so that it can be garbage collected (if we failed to do this, the table could grow unbounded over time). Finally, the method delegates to Monitor.Exit to release the actual monitor.
Figure 5 Implementing Exit
Copy Codepublic static void Exit(object monitor)
{
if (monitor == null) throw new ArgumentNullException("monitor");
lock (_globalLock)
{
MonitorState ms;
if (!_monitorStates.TryGetValue(monitor, out ms))
throw new SynchronizationLockException();
if (ms.OwningThread != Thread.CurrentThread)
{
throw new SynchronizationLockException();
}
else if (ms.ReentranceCount > 0)
{
ms.ReentranceCount--;
}
else
{
ms.OwningThread = null;
if (ms.WaitingThreads.Count == 0)
monitorStates.Remove(monitor);
}
Monitor.Exit(monitor);
}
}
Now for the good part. We've seen the whole implementation, except for the actual deadlock detection algorithm, the core of which is implemented in ThrowIfDeadlockDetected (see Figure 6), which we saw called from DdMonitor.Enter earlier.
Figure 6 Detecting Cycles in Wait Chains
Copy Codeprivate static void ThrowIfDeadlockDetected(MonitorState targetMs)
{
if (targetMs.OwningThread == null) return;
Dictionary> locksHeldByThreads;
Dictionary> threadsWaitingOnLocks;
CreateThreadAndLockTables(
out locksHeldByThreads, out threadsWaitingOnLocks);
Queue threadsToFollow =
new Queue(locksHeldByThreads.Count);
threadsToFollow.Enqueue(new CycleComponentNode(
Thread.CurrentThread, targetMs, null));
while (threadsToFollow.Count > 0)
{
CycleComponentNode currentChain = threadsToFollow.Dequeue();
Thread currentThread = currentChain.Thread;
List locksHeldByThread;
if (!locksHeldByThreads.TryGetValue(
currentThread, out locksHeldByThread)) continue;
foreach (MonitorState ms in locksHeldByThread)
{
List nextThreads;
if (!threadsWaitingOnLocks.TryGetValue(
ms, out nextThreads)) continue;
foreach (Thread nextThread in nextThreads)
{
if (currentChain.ContainsThread(nextThread))
throw new SynchronizationLockException(
CreateDeadlockDescription(
currentChain, locksHeldByThreads));
threadsToFollow.Enqueue(new CycleComponentNode(
nextThread, ms, currentChain));
}
}
}
}
The ThrowIfDeadlockDetected method accepts as a parameter the MonitorState instance that represents the monitor about to be waited on. For there to be a deadlock, this monitor (which the current thread is about to wait on, and for which we've already registered that intent) needs to be held by a thread that's directly or indirectly holding this monitor and which is waiting on a monitor held by the current thread. By "directly or indirectly holding," I mean that either it acquired a lock on the monitor or that it's waiting on a monitor held by a thread that's directly or indirectly holding this monitor (sorry, I like recursion). In other words, we're looking for a cycle from this monitor, to the thread that owns it, to a monitor that thread is waiting on, to the thread that owns that monitor, and so on, until we come back to the original monitor and thread that owns it. If we can find such a cycle, we throw an exception signaling deadlock.
The implementation follows that approach. First, we check to make sure the target MonitorState is actually owned by a thread; if it's not, there's no problem waiting on it. We then generate lookup tables based on all of the information we currently have about what locks own and are waiting on what monitors (we already have all of this information in the _monitorState table, so we just refactor that information into two Dictionary data structures that will make the rest of the algorithm easier to implement).
At this point, we need to start examining threads. We start with the current thread, which we know to be waiting on the supplied MonitorState. To capture this pairing, I create a simple helper container CycleComponentNode, which, in addition to storing this data, also maintains a reference to the next node in the identified cycle. When we start the algorithm, the only node we know about is the initial thread and MonitorState, so the Next value is null.
Until we have no more threads to be examined, the next thread to be examined (or, rather, the CycleComponentNode storing that thread) is retrieved from the queue. Using the tables we created earlier, we retrieve all of the locks held by this thread; if it doesn't hold any locks, it can't be part of a deadlock (remember the conditions necessary for a deadlock, specifically the one about holding one resource while requesting another). Each of these locks is examined, and again using the tables created earlier, we look up what threads are waiting on these locks. If any of those threads exists in the current wait chain we've built up (represented in list form by the CycleComponentNode), we just found our deadlock! The CreateDeadlockDescription method enumerates all of the CycleComponentNode instances in the chain and generates a description such as the following (which is then thrown in an exception):
Copy CodeThread 24 waiting on lockP (39C82F0)
while holding lockH (36BEF47), lockK (3B3D5E3)
Thread 30 waiting on lockH (36BEF47)
while holding lockB (2CF7029), lockN (349C40A
Thread 29 waiting on lockB (2CF7029)
while holding lockP (39C82F0)
If the thread doesn't exist in the current wait chain, we still need to examine it. So, we create a CycleComponentNode around it and the MonitorState it's waiting on, and its Next value is set to the current wait chain. That way, when we eventually examine this thread and all of the threads waiting on the monitors it holds, we can search the wait chain properly for those threads.
That's it for the solution. If it doesn't meet all of your needs, you can of course modify it as necessary. For example, when blocking, you could store into the MonitorState the stack trace of the current thread, and then when a deadlock is found, include the stack traces of all relevant threads in the thrown exception's message. Or you could instead augment the solution to support additional synchronization primitives, such as System.Threading.Mutex.
Also, you should note that if you're writing native code and locking on Windows synchronization primitives, you can take advantage of the new Wait Chain Traversal APIs to perform similar and more powerful analysis. For more information regarding this, see John Robbins' Bugslayer column in the July 2007 issue of MSDN® Magazine, available at msdn.microsoft.com/msdnmag/issues/07/07/Bugslayer.
Finally, a few more thoughts on the performance of this implementation. Deadlock detection code as I've implemented here is expensive, plain and simple. As such, you might want to use it in debug builds but not in retail builds. There are a few ways to accomplish this, but one of the simplest is to augment the implementation of DdMonitor with a static property:
Copy Codeprivate static bool _useDeadlockDetection = false;
Copy Codepublic static bool UseDeadlockDetection
{
get { return _useDeadlockDetection; }
set { _useDeadlockDetection = value; }
}
With that, you can augment the implementation of Enter, TryEnter, and Exit to check this property and to use it to determine whether to implement the full-blown deadlock detection algorithm or to simply delegate to the corresponding methods on Monitor:
Copy Codepublic static void TryEnter(object monitor, int millisecondsTimeout)
{
if (UseDeadlockDetection)
{
... // existing logic here
}
else TryEnter(monitor, millisecondsTimeout);
}
To set UseDeadlockDetection in your code, you could read a value from a configuration file, or if you wanted to set the value based on the build configuration, you could use code like this:
Copy Codepublic static void Main(string [] args)
{
DdMonitor.UseDeadlockDetection =
#if DEBUG
true;
#else
false;
#endif
... // the rest of your app here
}
Setting UseDeadlockDetection to false and using DdMonitor throughout your code base won't provide identical behavior and performance to just using Monitor, but it should be very close. Just make sure that you don't change the value of UseDeadlockDetection other than at the beginning of your program; if you do change it elsewhere, you may end up using the deadlock detection for some monitor acquisitions and not for others, the dangers of which we already discussed. An alternate approach suggested by Joe Duffy would be to change the implementation of TryEnter to first avoid the deadlock detection code and delegate to Monitor.TryEnter with some configurable timeout, say 500ms (or the user-supplied timeout if it was smaller). If that call succeeds, there's no need to perform deadlock detection as the monitor was successfully acquired. If that call times out and the timeout chosen was less than the user-supplied timeout, then the full-blown deadlock detection algorithm can be run. With this, deadlocks in deployed programs would still be caught, but you wouldn't pay the cost of the detection algorithm until the first Monitor acquisition timed out. And if you pick a reasonable timeout, then it's probably timing out because of a deadlock anyway.
Send your questions and comments for Stephen to netqa@microsoft.com.
Stephen Toub is a Senior Program Manager on the Parallel Computing Platform team at Microsoft. He is also a Contributing Editor for MSDN Magazine.

Tuesday, April 8, 2008

Axapta Version Control Management System

Hi Axapat friends , according to controlling source code of applications to be easily reused and maintained during the implementation phase , so i were to use the version control managment system with microsoft dynamics axapta . This article describes how to set up the Version Control Management System (VCMS) for Microsoft Dynamics AX 4.0 using Visual Studio 2005 SourceSafe (VSS) as the version control system.


References :
- Version Control System Setup [White Paper]
- Inside Microsoft Dynamics™ AX 4.0 Book
- http://msdn2.microsoft.com/
- http://channel9.msdn.com/ShowPost.aspx?PostID=367463

it’s a pleasure to help you up on your comments , Thanks





















Monday, April 7, 2008

About blog Contents

All of contents of this blog are about computer science , information tech. topics and others .
about some of contents of this blog , are linked from other sites like microsoft , google , youtube .....etc . so am not responsible of these sites' contents
ThanksAhmed Eid

Sunday, March 16, 2008

Jobs @ Egypt Companies

You can follow up any company URL from the following post

http://egyptdevelopers.blogspot.com/2008/04/egypt-it-companies.html

and submit your cv.

Jobs @ ITSoft

Hi friends ,

if you want to apply for ITSoft Jobs at Egypt , follow the following link

http://www.itsoft.com/Career.aspx

Jobs @ ITworx

Hi friends ,

if you want to apply for ITWorx Jobs at Egypt , follow the following link

http://www.itworx.com/Company/Careers/

Tuesday, January 1, 2008

Test Your Object Oriented Programming & Data Structures .....

Test Your OOP

Hi Developers ,

try it yourself by commenting with the answers

1- What will print out?

main()
{
char *p1=“name”;
char *p2;
p2=(char*)malloc(20);
memset (p2, 0, 20);
while(*p2++ = *p1++);
printf(“%s\n”,p2);
}

2- What will be printed as the result of the operation below:

main(
)
{
int x=20,y=35;
x=y++ + x++;
y= ++y + ++x;
printf(“%d%d\n”,x,y);
}

3- What will be printed as the result of the operation below:

main(
)
{
int x=5;
printf(“%d,%d,%d\n”,x,x< <2,x>>2);
}

4- What will be printed as the result of the operation below:

#define swap(a,b) a=a+b;b=a-b;a=a-b;
void main()
{
int x=5, y=10;
swap (x,y);
printf(“%d %d\n”,x,y);
swap2(x,y);
printf(“%d %d\n”,x,y);
}

int
swap2(int a, int b)
{
int temp;
temp=a;
b=a;
a=temp;
return 0;
}

5- What will be printed as the result of the operation below:

main()
{
char *ptr = ” Cisco Systems”;
*ptr++; printf(“%s\n”,ptr);
ptr++;
printf(“%s\n”,ptr);
}

6- What will be printed as the result of the operation below:

main()
{
char s1[]=“Cisco”;
char s2[]= “systems”;
printf(“%s”,s1);
}


7- What will be printed as the result of the operation below:

main()
{
char *p1;
char *p2;
p1=(char *)malloc(25);
p2=(char *)malloc(25);

strcpy(p1,”Cisco”);
strcpy(p2,“systems”);
strcat(p1,p2);
printf(“%s”,p1);
}

8- The following variable is available in file1.c, who can access it?

static int average;

9- WHat will be the result of the following code?

#define TRUE 0 // some code

while(TRUE)
{
// some code
}

10- What will be printed as the result of the operation below:

int x;
int modifyvalue()
{
return(x+=10);
}
int changevalue(int x)
{
return(x+=1);
}

void main()
{
int x=10;
x++;
changevalue(x);
x++;
modifyvalue();
printf("First output:%d\n",x);
x++;
changevalue(x);
printf("Second output:%d\n",x);
modifyvalue();
printf("Third output:%d\n",x);
}



11- What will be printed as the result of the operation below:

main()
{
int x=10, y=15;
x = x++;
y = ++y;
printf(“%d %d\n”,x,y);
}

12- What will be printed as the result of the operation below:

main()
{
int a=0;
if(a==0)
printf(“Cisco
Systems\n”);
printf(“Cisco
Systems\n”);
}