How to write a C program without a main function?.Is it possible to do that.Yes there can be a C program without a main function.Here’s the code of the program without a main function…
#include
#define decode(s,t,u,m,p,e,d) m##s##u##t
#define begin decode(a,n,i,m,a,t,e)
int begin()
{
printf(” hello “);
}
Does the above program run without the main function? Yes, the above program runs perfectly fine even without a main function.But how,whats the logic behind it? How can we have a C program working without main ?
Here we are using preprocessor directive #define with arguments to give an impression that the program runs without main.But in reality it runs with a hidden main function.
The ‘##‘ operator is called the token pasting or token merging operator.That is we can merge two or more characters with it.
NOTE: A Preprocessor is program which processess the source code before compilation.
Look at the 2nd line of program-
#define decode(s,t,u,m,p,e,d) m##s##u##t
What is the preprocessor doing here.The macro decode(s,t,u,m,p,e,d) is being expanded as “msut” (The ## operator merges m,s,u & t into msut).The logic is when you pass (s,t,u,m,p,e,d) as argument it merges the 4th,1st,3rd & the 2nd characters(tokens).
Now look at the third line of the program-
#define begin decode(a,n,i,m,a,t,e)
Here the preprocessor replaces the macro “begin” with the expansion decode(a,n,i,m,a,t,e).According to the macro definition in the previous line the argument must de expanded so that the 4th,1st,3rd & the 2nd characters must be merged.In the argument (a,n,i,m,a,t,e) 4th,1st,3rd & the 2nd characters are ‘m’,’a’,’i’ & ‘n’.
So the third line “int begin” is replaced by “int main” by the preprocessor before the program is passed on for the compiler.That’s it…
The bottom line is there can never exist a C program without a main function.Here we are just playing a gimmick that makes us beleive the program runs without main function, but actually there exista a hidden main function in the program.Here we are using the proprocessor directive to intelligently replace the word begin” by “main” .In simple words int begin=int main.

Microsoft Project 2010 Beta

Posted by guddu | 1:23 AM

Poised for the ascent, Microsoft Project 2010 offers flexibility and choice for individuals, teams and the enterprise to effectively manage all types of work — from simple tasks to complex projects and programs. Project 2010 delivers innovative new capabilities:

* From a simple and intuitive user experience — plan, schedule and successfully complete important work
* Enhance productivity using a sophisticated yet easy-to-use tool with built in reporting and powerful collaboration capabilities
* Select the right projects, optimize scarce resources and manage costs with unified project and portfolio management
* Built on Microsoft SharePoint 2010, choose a flexible and powerful work management solution that integrates, extends, and scales for the enterprise

The openSUSE developers have released the second milestone of openSUSE 11.3. The update now has some final releases of packages rather than the release candidates found in the previous milestone. These include final versions of KDE 4.4, OpenOffice 3.2 and VirtualBox 3.1.4, but openSUSE 11.3 still has a number of bleeding edge releases including GNOME 2.30 beta 1 (2.29.90). The milestone is based on the 2.6.33 Linux kernel "with all its bug fixes and new hardware support".

There have been updates to NetworkManager, ModemManager and other network related plug-ins which do not add features, but support more hardware and include bug fixes. Other updated packages include DigiKam, evolution, Mono, GnuTLS and libgphoto2. Developers will also find Bootchart 2.0.0.9, a tool for analysing slow system booting, included.

The previous milestone's support for LXDE has now been incorporated into the installation process, allowing users to install openSUSE 11.3 with only the LXDE desktop. The openSUSE developers plan to switch to GCC 4.5.0 in the next milestone to benefit from its better optimisation. According to a new timeline page, milestone 3 is due at the start of March, and a final release mid-July. openSUSE 11.3 milestone 2 is available to download now for testing purpose; known bugs are documented on the openSUSE wiki. The developers would like special attention paid to the GNOME accessibility stack as new features in it need extensive testing.

Another patch for MIT Kerberos

Posted by guddu | 9:38 PM

A patch for the MIT's Kerberos 5 implementation is to fix integer underflows in the functions for decrypting AES and RC4 ciphertexts. The flaw can reportedly be provoked remotely by sending specially crafted ciphertexts which can, for instance, cause the Key Distribution Center (KDC) to crash. In very rare circumstances, the flaw is also said to allow the injection and execution of code. Reportedly, the exploitability of the flaw is marginally higher if the attacker holds a valid account in a Kerberos domain (realm).

All versions from krb5-1.3 are affected. The patch is available for krb5-1.6 and krb5-1.7. Updates krb5-1.6.4 and krb5-1.7.1, which are soon to be released, also fix the flaw. Until then, users need to manually install the patches for aes.c and arcfour.c and recompile Kerberos themselves. The updates are gradually becoming overdue, as they are also scheduled to close a null-pointer dereference vulnerability already publicised in early January. So far, only a patch has become available to fix this hole.

See also:

* Integer underflow in AES and RC4 decryption, security advisory from Kerberos.
* DoS vulnerability patched in MIT Kerberos, a report from The H.

Installation grails

Posted by guddu | 2:00 AM

Installation from Download

changed

Prerequisites

In order to start using Grails you need to have the following:

* An installation of Java SDK 1.4 or higher and have set your JAVA_HOME variable to the SDK install location.

Steps

* Download the latest Grails release
* Extract the archive into an appropriate location; typically C:\grails on Windows or ~/grails on Unix
* Create a GRAILS_HOME environment variable that points to the path where you extracted the archive (eg C:\grails on Windows or ~/grails on Unix)
* If you have not set the JAVA_HOME environment variable yet, create JAVA_HOME environment variable that points to the path where you have installed Java
* Append a reference to the "bin" directory within the Grails directory to your PATH variable (eg %GRAILS_HOME%\bin on Windows or $GRAILS_HOME/bin on Unix). Note that, for Windows, both PATH and GRAILS_HOME must be defined at the same environment variable level (eg. 'System variables') rather than across environment variable levels (eg. PATH under 'System variables' and GRAILS_HOME under 'User variables')
* Type "grails" at the command line, if a help message is displayed you are ready to start using Grails!
* If you get an error message, try to chmod +x the grails script inside the bin directory.

Installation from Git (The Version Control Repository)

Prerequisites

In order to start using Grails from Git you need to have the following:

* An installation of Java 1.5 or higher and have set your JAVA_HOME variable to the install location
* A working installation of Apache Ant 1.7 or higher
* JUnit (to run the build tests - put junit.jar in your ANT_HOMElib directory)
* A Git client

Steps

* Checkout Grails from the Git repository
o Run this command: git clone git://github.com/grails/grails.git (+)
* Set the GRAILS_HOME environment variable to CHECKOUT_LOCATION/grails/grails
* Add the "%GRAILS_HOME%\bin" directory to your PATH environment variable
* Add the "%GRAILS_HOME%\ant\bin directory to your PATH environment variable.
* (You may need to give the scripts in "%GRAILS_HOME%\ant\bin execute permissions.)
* Increase the java memory to 1024M by setting ANT_OPTS=-Xmx1024M
* Go to the %GRAILS_HOME% directory and type "ant jar" to build Grails
* That's it! Start developing in Grails!

Yesterday night I found myself in a big problem, I had to install IIS on a remote XP machine and I had no windows XP CD or image there. I have this image in my network but I couldn’t take the remote machine on my VPN as we both the network had same local default gateway.


I searched for the same over internet and found something that I was not very much happy so I decided to go for my own way and I extracted all the required dll, ocx, exe and other files from Windows XP CD and uploaded them on Rapidshare now any one can use this file to install IIS without having CD.


I will explain both the method and you choose which one you want to go.


Simplest method

Download the Windows XP IIS required file from here extract it and give the path of this extracted folder when it ask for dll files while installing IIS in XP without having a CD.

http://rapidshare.com/files/213300927/IIS_5.1_requierdfiles.zip


Second method

1) Download the windows XP SP 2 patch from here .

2) Extract the downloaded exe file using the bellow command in command prompt.

C:\Downloads\Software>WindowsXP-KB835935-SP2-ENU.exe /extract d:\xpsp2

Here c:\downloads\software is the folder where this WindowsXP-KB835935-SP2-ENU.exe file is stored and d:\xpsp2 is location where all the files from this file will get extracted.

3) When extraction is done install IIS and give the path of i386 folder in d:\xpsp2\i386 folder it will take all the necessary files from this location.


Precaution: The above method will work only for windows XP 32 bit version. For 64 bit version you need to download separate sp2 file.


If you feel not safe for installing files from my zipped file you can download those 118 file from www.dlldownload.com


I hope it was useful and helped you to solve your problem.


Thanks for being here

With Registry Mechanic you can safely clean, repair and optimize the Windows® registry with a few simple mouse clicks! Problems with the Windows® registry are a common cause of Windows® crashes, slow performance and error messages. By using a registry cleaner regularly and fixing registry errors your system should not only be more stable but it will also help improve your system performance without expensive hardware upgrades.

Registry Mechanic uses a high-performance detection algorithm to quickly identify missing and invalid references in your Windows® registry. These problems can occur for many reasons including being left-behind after the un-installation or incorrect removal of software, by missing or corrupt hardware drivers, or orphaned startup programs.
Don’t compromise your registry with the second best!


• World’s most popular registry cleaner with over 60 million downloads.

• Recommended by experts and editors as the world’s best registry cleaner.

• Clean the registry to fix Windows errors and crashes.

• Registry defrag to optimize your PC for better performance.

• FREE customer support for all users.

• Easy to use. Designed for both expert and novice users.

• 100% Money Back Guarantee.

With a few easy steps our registry cleaner will scan your entire registry for any invalid entries and provides a list of the registry errors found, you can then choose to selectively clean each item or automatically repair them all. For your convenience and protection Registry Mechanic can also make a backup of any repairs made so that you can easily recover any changes if required.


Rapidshare
http://rapidshare.com/files/285717621/Registry.Mechanic.v8.0.0.907.rar
Hotfile
http://hotfile.com/dl/13639992/66df3f9/Registry.Mechanic.v8.0.0.907.rar.html

 
free website hit counter
free-website-hit-counters.com