Archive for November, 2007

Web design online - Chapter 28 . Programming Tools and Utilities 725

Friday, November 30th, 2007

Chapter 28 . Programming Tools and Utilities 725 (Kernighan and Ritchie) C. You can control the amount and type of debugging information, if any, to embed in the resulting binary. And like most compilers, GCC can also perform code optimization. The gcc command invokes the C compiler. To use it, provide it the name of a C source file and use its -o option to specify the name of the output file. gcc will preprocess, compile, assemble, and link the program, generating an executable, often called a binary. Here s the simplest syntax : gcc infile.c [-o outfile] infile.c is a C source code file and -o says to name the output file outfile. The [] characters indicate optional arguments throughout this book. If the name of the output file is not specified, gcc names the output file a.out by default. The following example uses gcc to create the hello program from the source file hello.c. First, the source code: /* * hello.c - canonical hello world program */ #include int main(int argc, char *argv[]) { printf( Hello, Linux programming world!n ); return 0; } Now, to compile and run this program, type $ gcc hello.c -o hello If all goes well, gcc does its job silently and returns to the shell prompt. It compiles and link the source file hello.c (gcc hello.c), creating a binary named hello, as specified using the -o hello argument. If you run the program, here s the output you get: $ ./hello Hello, Linux programming world! The command that executed the hello program specifically included the current directory, denoted with a ., because having the current directory in your path is a security risk. That is, instead of a $PATH environment variable that resembles /bin:/usr/bin:/usr/local/bin:., it should be /bin:/usr/bin:/usr/ local/bin so that a cracker cannot put a dangerous command in your current directory that happens to match the name of the more benign command you really want to execute. Caution
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Web server type - 724 Part VI . Programming in Linux What

Thursday, November 29th, 2007

724 Part VI . Programming in Linux What constitutes a well-stocked Linux development toolkit? The basics include an editor to write the code, one or more compilers to turn source code into binaries, and a debugger to track down the inevitable bugs. Most people have a favorite editor, and you d have a difficult time trying to persuade them to try a new one. Most editors support some set of programming-related functionality (some more than others, to be sure). There are too many to cover in this space, so suffice it to say, You ll need an editor. Perhaps the most popular editors are vi and emacs. Vi is a commercial editor, being part of the commercial UNIX offerings, so what you can actually get is usually a clone such as vim, elvis, or (my own personal favorite) nvi (new vi). I prefer nvi because it is a port of vi from BSD UNIX to Linux. Other popular editors include pico (the Pine mail client editor made available as a separate program), jed, joe, jove, and nano. If you prefer graphical editors, gedit in GNOME and kedit in KDE also provide basic programming support. When it comes to compilers, GCC is the compiler of choice, or, if you will, the choice of the GNU generation, so this chapter only discusses GCC. Other compilers are available for Linux, such as Intel s C and C++ compiler and a very powerful (and expensive) offering from the Portland Compiler Group. Similarly, GDB, the GNU debugger, is the only debugger described in this chapter. In Chapter 27 you examined the role that programming interfaces play in simplifying the development task. Interfaces almost always include one or more libraries that implement the functionality that interfaces define. Because you need to be able to work with programming libraries, utilities for creating, examining, and manipulating libraries also occupy the well-stocked programming toolkit. To this list, most developers would add a build automation tool, such as make, because most nontrivial projects need some sort of utility that handles building and rebuilding complicated, multifile projects with a minimum of effort and time. Another challenge for large projects is tracking changes in source code and maintaining a record of what code changed, when it changed, how it changed, and who changed it. This task is the province of source code control systems, and this chapter looks at two: RCS and CVS. Using the GCC Compiler The GNU Compiler Collection (GCC) is by far the most dominant compiler (rather, the most dominant collection of compilers) used on Linux systems. It compiles programs written in C, C++, or Objective-C. GCC also compiles Fortran (under the auspices of g77) and Java (using gcj). This chapter focuses on the C compiler. GCC gives programmers extensive control over the compilation process. That process includes up to four stages: preprocessing, compilation, assembly, and linking. You can stop the process after any of these stages to examine the compiler s output at that stage. GCC can also handle the various C dialects, such as ANSI C or traditional
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Programming Tools and Utilities The preceding chapter provided

Wednesday, November 28th, 2007

Programming Tools and Utilities The preceding chapter provided a high-level view of Linux programming, focusing on overall development environment and the introducing the idioms that give programming on a Linux system its distinctive character. This chapter goes into greater detail and describes some of the tools and toys found on a typical Linux development system. The goal is not to turn you into a developer in 30 pages or less, but simply to explore some of the variety of tools developers use so you will at least know what they are and what they do. You ll also learn how to use some of the programs and utilities. The Well-Stocked Toolkit Whether you prefer a graphical development environment or the classic command-line environment, you need a good set of tools if you want to write, compile, and debug programs for Linux. The good news is that Linux has plenty of editors, compilers, and debuggers from which to choose. The bad news is that Linux has plenty of editors, compilers, and debuggers from which to choose. The range of options is good news for developers because they can pick the best and most appropriate tools for the development task at hand. The proliferation of choices is bad news for system administrators who need to install and maintain the tools and for people who evaluate the tools. Too many choices make choosing the right one a difficult task. This chapter discusses the most popular programs and utilities of their types. In most cases, alternatives (and sometimes multiple alternatives), exist, but I only cover one to keep the discussion simple (I try to mention the others just so you ll be familiar with their names). 2C H A8P8T E R . . . . In This Chapter Using the GCC compiler Automating builds with make Examining library utilities Exploring source code control Debugging with GDB . . . .
If you are looking for cheap and quality webhost to host and run your website check Jboss Web Hosting services.

Web hosting asp - 722 Part VI . Programming in Linux Table

Tuesday, November 27th, 2007

722 Part VI . Programming in Linux Table 27-1 (continued) API Category Description t1lib Graphics t1lib provides an API for generating character and string glyphs from Adobe Type 1 fonts. Taglib Audio TagLib is a library for reading and editing the meta-data stored in ID3v1 and ID3v2 (MP3 files) and Ogg Vorbis comments and ID3 tags Ogg Vorbis. Zlib Data zlib provides a general-purpose, thread-safe data compression Compression library that implements the data formats defined by RFC1950, RFC1951, and RFC1952 (see ftp://ds.internic.net/rfc/ rfc1950.txt, ftp://ds.internic.net/rfc/rfc1951. txt, and ftp://ds.internic.net/rfc/rfc1952.txt). As you can see, a wide variety of APIs exist for performing an equally wide variety of programming tasks. Chances are pretty good that if you need to perform some sort of programming task, someone has written a library that you can use to do it. Summary The phrase Linux programming environments and interfaces is a shorthand term that masks a rich set of features which, taken together, only partially characterize the activity of programming on a Linux system. This chapter looked at both graphical programming IDEs and the less visually attractive but just as powerful commandline or text-mode programming environments. You also learned some of the characteristics of Linux and of Linux systems that define and shape programming and programs on and for Linux. The second part of the chapter looked at the variety of programming interfaces, the methods available for getting particular programming tasks done. You learned that you can create text-mode or command-line interfaces and that you could choose from a variety of graphical interfaces for structuring user interaction with your program. Finally, you took a fast-paced look at some of the many APIs that make it possible to do a variety of things, such as manipulate or create images or interact with a database. . . .
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

Chapter 27 . Programming Environments and Interfaces (Photoshop web design) 721

Monday, November 26th, 2007

Chapter 27 . Programming Environments and Interfaces 721 API Category Description Libtiff 2-D Graphics The TIFF library provides an API for working with images stored in the Tag Image File Format (TIFF), a widely used format for storing high-quality, high-resolution images. Libungif 2-D Graphics libungif provides an API unencumbered by patents for loading and saving images in GIF format. Libusb Hardware libusb allows user space application access to USB devices. Libvorbis Audio This library supports the Vorbis General Audio Compression Codec, commonly known as Ogg Vorbis. Ogg Vorbis is an open, patent-and-royalty-free, general-purpose compressed audio format for audio and music. Libwmf Graphics libwmf provides an API for interpreting, displaying, and converting metafile images to standard image formats such as PNG, JPEG, PS, EPS and SVG. libxml2 XML libxml2 is the XML parser library used by GNOME and KDE. Libxslt XML libxslt provides XSLT support for libxml2. XSLT is a language used to transform XML documents into other formats. Orbit CORBA ORBit is a high-performance Common Object Request Broker Architecture (CORBA) object request broker (ORB). ORBit allows programs to send requests and receive replies from other programs, regardless of the locations of the two programs. GNOME uses ORBit heavily. Pango Text layout Pango is a library for layout and rendering of text, with an emphasis on internationalization. Pango forms the core of text and font handling in GTK+-2.0. Pcre Regular The Perl-compatible regular expression (PCRE) library impleexpressions ments an API for regular expression pattern matching that uses the same syntax and semantics as Perl 5. The PCRE library is used by many programs. pilot-link PalmOS pilot-link implements a library for communicating with Palm handheld devices and with other devices that adhere to the PalmOS interface standard. gnome-pilot and KPilot.use pilot-link. Popt General popt is a C library for parsing command-line parameters. popt was heavily influenced by the getopt() and getopt_long() functions, but improves on them by allowing more powerful argument expansion and allows command-line arguments to be aliased via configuration files. Sdl Multimedia The Simple DirectMedia Layer (SDL) provides a generic, crossplatform API for low-level access to audio, keyboards, mice, joysticks, 3-D hardware via OpenGL, and 2-D framebuffers. Continued
Check Tomcat Web Hosting services for best quality webspace to host your web application.

720 Part VI . Programming in Linux Table (Cedant web hosting)

Sunday, November 25th, 2007

720 Part VI . Programming in Linux Table 27-1 (continued) API Category Description Imlib Graphics ImLib (image library) is an image loading and rendering API designed to simplify and speed up the process of loading images and obtaining X Window System. Libao Audio libao is a cross-platform audio library used by other libraries and programs that use audio, including ogg123, GAIM, and the Ogg Vorbis libraries. libart_lgpl 2-D Graphics Libart is a library for high-performance 2-D graphics used by KDE and GNOME. Libexif Graphics This library provides an API allowing programs to read, parse, edit, and save Exchangeable Image File Format (EXIF) data in image files. EXIF is a format used to store extra information in images, such as the JPEG files produced by digital cameras. Libglade Graphics The GLADE library, used heavily in GNOME programs, allows programs to load user interfaces from definitions stored in external files. This allows the interface to be changed without recompiling the program. libid3tag Audio libid3tag is a library for reading ID3 tags. ID3 tags allow extra information to be embedded in audio files. libieee1284 Hardware libieee1284 enables applications that need to communicate with (or at least identify) devices that are attached via IEEE1284-compliant parallel ports, such as scanners. Libjpeg Graphics The JPEG library provides a rich API for manipulating JPEGformat images, including reading, writing, converting, compressing, and decompressing images. Libmad Audio libmad provides a high-quality MPEG audio decoder API. libmad provides full 24-bit PCM output, so applications using this API can produce high-quality audio. Libmng Graphics libmng implements the Multiple-image Network Graphics (MNG) API. MNG provides multi-image animation capabilities similar to animated GIFs, but free of patent encumbrances. Libogg Audio libogg is a library for reading and writing ogg format bitstreams. libogg is needed to use the Ogg Vorbis audio format. Libpng Graphics The Portable Network Graphics (PNG) standard is an extensible file format for the lossless, portable, well-compressed storage of images. PNG provides a patent-free replacement for GIF. Libtermcap Hardware libtermcap implements the GNU termcap library API, a library of C functions that enable programs to send control strings to terminals in a way independent of the terminal type.
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Chapter 27 . Programming Environments and Interfaces (Web server iis) 719

Friday, November 23rd, 2007

Chapter 27 . Programming Environments and Interfaces 719 Table 27-1 describes many popular or widely used APIs, but the list provided here is far from complete. Table 27-1 Common Linux APIs API Category Description Aalib ASCII art AA-lib is an ASCII art graphics library output as ASCII art. Arts Sound The analog real-time synthesizer (aRts) is KDE s core sound system, designed to create and process sound using small, specialized modules. These modules might create a waveform, play samples, filter data, add signals, perform effects (like delay, flanger, or chorus), or output the data to the sound card. Atk Accessibility atk is a library of accessibility functions used by GNOME. Audiofile Audio audiofile, used by the esound daemon (Enlightened Sound Daemon), is a library for processing various audio file formats. You can also use it to develop your own audio-file-based applications. db4 Database The Berkeley Database (Berkeley DB) library enables developers to create applications with database support. Expat XML Expat is a stream-oriented C library for parsing XML. It is used by Python, GNOME, Xft2, and other applications. Gdbm Database The GNU Database Manager (GDBM) is a set of database routines that work similar to the standard UNIX dbm routines. gdk-pixbuf 2-D Graphics GdkPixbuf is an API for loading, scaling, compositing, and animating images. GdkPixBuf is required by many GTK+ programs. Glib General GLib is a general purpose API of C language routines. The library includes support for features such as lists, trees, hashes, memory allocation, and many other things. GLib is required by almost every GTK+ application. Glut 3-D Graphics The GL Utility Toolkit (GLUT) is a 3-D graphics library based on the OpenGL API. It provides a higher-level interface for creation OpenGL-based graphics. Gmp Mathematics The GNU Multiple Precision (GMP) API implements a library for arbitrary precision arithmetic, such as operations on signed integers, rational numbers, and floating-point numbers. Gnet Network GNet is an object-oriented library of network routines. Written in C and based on the GLib library, GNet is used by gnomeicu and Pan. Continued
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

1 on 1 web hosting - 718 Part VI . Programming in Linux .

Thursday, November 22nd, 2007

718 Part VI . Programming in Linux . OpenGL OpenGL is the industry-standard 3-D graphics toolkit. It provides the most realistic and lifelike graphics currently available for the X Window System. It is generally available as part of XFree86. More information about OpenGL is available on the Web at www.opengl.org. . Motif Motif was one of the first widget or interface toolkits available for the X Window System that combined both an interface toolkit and a window manager. Originally available only as a commercial product, it is now available in an open source version at www.openmotif.org. . Xlib Xlib is shorthand for the X library, a low-level, C-based interface to the raw X Window System protocol . If you want to write as close to the X graphics core as possible, you write Xlib-based programs. Indeed, most window managers, widget libraries, and GUI toolkits are written using Xlib function. While using straight Xlib gives you the best performance, it is extremely code intensive. Xlib is an essential ingredient of the standard X distribution. You can learn more about Xlib from the HTML manual page, available on the Web at www.the-labs.com/X11/XLib-Manual. . Xt The Xt Intrinsics are a very thin layer of functions and data structures on top of Xlib. Xt Intrinsics create an object-oriented interface that C programs can use to create graphical elements. Without other widget sets, the Intrinsics are not especially useful. Xt, like Xlib, is a part of the standard X distribution and is not available separately. Application Programming Interfaces Application programming interfaces, or APIs, provide programmers with libraries of code for performing certain tasks. There are many APIs, probably as many as there are types of programming problems that need to be solved. The ncurses library, for example, provides an API that you can use to create text-mode user interfaces. In turn, ncurses works by using either the terminfo or termcap API to perform the actual screen updates in a manner consistent with the underlying type of display device in use. If developers keep having to perform a specific type of programming task, such as updating a database, communicating over a network, getting sound out of a sound card, or performing complicated mathematical calculations, there is at least one database API, socket API, sound API, or mathematical API already in existence that they can use to simplify the task. APIs consist of three components: . Header file Declares the interface (the function calls, macros, and data structures) the developers can use in their own programs. . One or more library files Implement the interfaces declared in the header files and against which programs must be linked. . API documentation Describes how to use the API and often provides example code. The documentation might be provided in manual pages, text files, HTML files, GNU TeXinfo files, or some combination of all of these formats.
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

Chapter 27 . Programming Environments and Interfaces (Linux web host) 717

Wednesday, November 21st, 2007

Chapter 27 . Programming Environments and Interfaces 717 Creating Graphical Interfaces When it comes to creating GUIs, Linux programmers have more options available to them than they do for creating TUIs. Probably the most popular and certainly the best known toolkits used to create graphical applications are Qt and GTK+. Qt is the C++ application framework that powers KDE, the K Desktop Environment. GTK+ is the toolkit underneath GNOME, the GNU Network Object Model Environment. GTK+ is written largely in C, but it has language bindings available for many other programming languages, such as Perl, C++, and Python, so you can use GTK+ features in many programming environments. Due to the limited space available, this chapter does not show examples of Qt and GTK+ applications. For more information about GTK+, visit the GTK+ Web site at www.gtk.org. Information about the Qt framework can be seen at www.trolltech.no. Although Qt and GTK+ are the big hammers of Linux graphical development, there are many other toolkits, frameworks, and libraries that you can use to develop GUIbased applications for Linux. The following list, arranged alphabetically, describes some of the most common ones. Most of these toolkits and frameworks describe widget sets, which are implemented in one or more programming libraries. Widget is the term applied to a user interface abstraction, such as a scroll bar or a button, created using the toolkit. . Athena The Athena library was one of the earliest widget libraries available for the X Window System. It was a thin layer of abstraction on top of raw Xlib calls that made it slightly less painful to create scroll bars, text entry boxes, and other typical GUI elements. It is part of the standard X11 distribution. . 3-D Athena Toolkit The 3-D Athena Toolkit was a 3-D version of the original Athena toolkit. It gave Athena a 3-D look and was a considerable visual improvement over plain vanilla Athena. The 3-D Athena Toolkit, although no longer widely used, is still available on the Web at www.visi.com/~hawkeyd/xaw3d. html. . FLTK FLTK, which is pronounced full tick, is an acronym for the Fast Light Toolkit. FLTK is a GUI for X, MacOS X, and Microsoft Windows. Written in C++, FLTK makes it possible to write GUIs that look almost identical regardless of the platform on which the GUI runs. FLTK also supports OpenGL graphics. You can find more information about FLTK on the Web at www.fltk.org. . XForms XForms is a GUI toolkit based on Xlib. It isn t highly configurable like the other GUI toolkits discussed in this section, but its simplicity makes XForms easier to use than the other graphical toolkits. It comes with a GUI builder that makes it fast and easy to get working application up and running. More information about XForms can be found on the Web at http://world. std.com/~xforms/. Note
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

Submit web site - 716 Part VI . Programming in Linux Listing

Tuesday, November 20th, 2007

716 Part VI . Programming in Linux Listing 27-4 (continued) /* shutdown s-lang */ SLsmg_reset_smg(); SLang_reset_tty(); return 0; } To compile this program using the following command: $ gcc sreadkey.c -lslang -o sreadkey To run the program, type ./sreadkey. Figure 27-7 shows the result after typing the same text as typed for readkey.c earlier. Figure 27-7: An S-Lang-based TUI. As you can see from Figure 27-7, the basic appearance and functionality of sreadkey.c is the same as nreadkey.c. What has changed, the TUI framework used to create sreadkey.c, is invisible to the user. S-Lang-based programs can also read input piped from stdin. From a developer s perspective, there are significant differences between ncurses and S-Lang in program structure and the actual library usage, but the output is almost identical. For more information about S-Lang, including download information, visit the SLang Web page at www.s-lang.org. Note
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.