|
Bash Functions |
 vote
 |
|
| Functions are scripts within scripts in Bash that can be used to increase speed, save on resources in a script and provide reusable information since it is stored in memory. Functions must be declared before they can be used in the Bash shell script. read more... |
|
| | permapage | score:8990 | -aweber, July 6, 2011 |
|
sed and awk tips |
 vote
 |
|
Several quick shortcuts for awk and sed...
One of my long-standing "tricks" for awk is using $NF to print the last field on every line. Since NF represents the number of fields on a line (e.g., 6), $NF represents the value of that last field (e.g., $6). Printing the last field of every line, therefore, might look like this: read more... |
|
| | permapage | score:8989 | -Ray, March 15, 2010 |
|
Minix 3.1.4 review |
 vote
 |
|
A look at the latest version of Minix...
MINIX has traditionally been an operating system with an eye toward education. Both versions 1 and 2 of the MINIX system were designed to be useful for students learning about operating systems. The code behind MINIX was small and clean, making it a practical study tool in this complex field. The latest offering of MINIX, version 3, attempts to keep the same principles as the previous versions, but also strives to be more practical as a modern, UNIX-like, operating system. read more... |
|
| | mail this link | permapage | score:8981 | -Ray, January 5, 2010 |
|
Tutorial: Linux Dialog Boxes |
 vote
 |
|
Dialog lets you create dialog boxes from Unix/Linux shell scripts...
'dialog' is a utility for building console-based 'front ends' in UNIX like operating systems.
In this brief tutorial I am mentioning the usage of few important basic controls available with this 'dialog' utility and later I have created a very simple front end application in UNIX bash scripting using dialog. read more... |
|
| | permapage | score:8967 | -Ray, January 1, 2010 |
|
Stateful web applications |
 vote
 |
|
HttpSession and friends are trickier than they look. The session state management mechanism provided by the Servlets framework, makes it easy to create stateful applications.
While there are many Web frameworks in the Java™ ecosystem, they all are based, directly or indirectly, on the Servlets infrastructure. The Servlets API provides a host of useful features, including state management through the HttpSession and ServletContext mechanisms, which allows the application to maintain state that persists across multiple user requests. However, some subtle (and largely unwritten) rules govern the use of shared state in Web applications, of which many applications unknowingly fall afoul. The result is that many stateful Web applications have subtle and serious flaws. read more... |
|
| | mail this link | permapage | score:8956 | -BlueVoodoo, October 7, 2008 |
|
Picking the best XML Parser |
 vote
 |
|
| Do you know how to select the best XML Parser for your project? Even developers who are very knowledgeable on advanced XML matters can lack a firm understanding of the fundamentals. To ensure a solid foundation, this article covers the most basic XML service: parsing. It introduces the various approaches to parsing and highlights their pros and cons. read more... |
|
| | permapage | score:8943 | -solrac, January 15, 2007 |
|
HTML5: Drag and Drop to a webpage |
 vote
 |
|
Here's a cool, simple but useful demonstration that exercises HTML5 in a novel way. Get the key methods needed to implement the File APIs to use Drag and Drop to select an image file off your local file system.
For my example, I have provided a palette from which to drag & drop into, or alternatively use the File chooser, to select image files off your local file system. For this example, please select image files only, as I have not built in any filtering or error detection for non-graphical files. read more... |
|
| | mail this link | permapage | score:8932 | -solrac, February 1, 2011 |
|
Pattern matching in shell scripting |
 vote
 |
|
This article is excerpted from the book Beginning Portable Shell Scripting.
Shell programming is heavily dependent on string processing. The term string is used generically to refer to any sequence of characters; typical examples of strings might be a line of input or a single argument to a command. Users enter responses to prompts, file names are generated, and commands produce output. Recurring throughout this is the need to determine whether a given string conforms to a given pattern; this process is called pattern matching. The shell has a fair amount of built-in pattern matching functionality. read more... |
|
| | mail this link | permapage | score:8926 | -Ray, January 1, 2009 |
|
Install FB4Linux in Eclipse |
 vote
 |
|
| Flash development in Linux is often left to a generic text editor used with the free Flex SDK. It is certainly possible to code this way, but you do lose out on a lot of the functionality of a more specific IDE. The FB4Linux project provides a plugin for Eclipse that provides a similar environment to FlashBuilder 4. The only downside is that the installation instructions gloss over a few of the details required to get the plugin installed in Eclipse 3.5.2, which is the version of Eclipse that is available in the Ubuntu software repositories at the time of writing. This article shows you how to get FB4Linux up and running from start to finish. read more... |
|
| | mail this link | permapage | score:8926 | -mcasperson, July 27, 2010 |
|
Tutorial: Eclipse CruiseControl |
 vote
 |
|
| This Eclipse tutorial gives you a high-level overview of how to use CruiseControl, Luntbuild, and Anthill with Eclipse. This tutorial shows you how the Eclipse Perl Integration (EPIC) plug-in for Eclipse can help you test Perl applications. One is a traditional Perl debugger, the other tests Perl regular expressions. read more... |
|
| | permapage | score:8879 | -solrac, February 18, 2006 |
|
Dependency injection with AspectJ and Spring |
 vote
 |
|
Dependency injection and aspect-oriented programming are complementary techniques, so it's natural to want to use them together. This article shows you how to add some power to your programming by combining dependency injection of the Spring framework with aspects written using AspectJ.
In this article, I show you how to combine the dependency injection of the Spring framework effectively with aspects written using AspectJ 5. I assume you have a basic knowledge of AOP (although if you don't, you'll find some good starting points in the Resources section), so I'll begin my discussion by analyzing the key roles and responsibilities involved in a dependency injection-based solution. From there, I'll show you how to configure singleton aspects via dependency injection. read more... |
|
| | mail this link | permapage | score:8876 | -solrac, December 17, 2005 |
|
Parsing a Web Form with Shell Scripts |
 vote
 |
|
Parse your web form input fields with CGI using Unix/Linux shell scripts...
CGI scripts for processing web forms can be written in any language, even shell scripts. The hardest part is parsing the input from the form.
The input is delivered using one of two methods, GET or POST. The GET method adds the information to the end of the URL, and the web server makes it available to the CGI program in the environment variable, QUERY_STRING. The POST method places it on the program's standard input. read more... |
|
| | mail this link | permapage | score:8869 | -Ray, February 12, 2007 |
|
Programming Language Tradeoffs: 3GL vs 4GL |
 vote
 |
|
Level of Abstraction The level of abstraction that a programming language provides is all about tradeoffs. Lower level languages (I'll inaccurately call them 3GL's) supply a few small operations which can be combined with great flexibility to accomplish almost anything. The cost, of course, is in the time-consuming detail in which each and every bit of code must be cast. Conversely, high level languages (loosely, 4GL's) and application generators include meta-operations which provide much more functionality for a given amount of code. Once again, there is a cost. Here the big penalty is a loss of flexibility -- which is proportional to the size of the functional units. There are a prohibitively large number of ways in which a few small operations can be combined to create large ones. Therefore, only the most common of these large functions can be reasonably implemented in a high level language before the point of diminishing returns is reached. As the language integrates more large functions into its syntax, its complexity eventually reaches a point where a high level of skill is required to use it effectively.
Special-purpose Libraries The original distinction between 3GL and 4GL languages has long been blurred by the availability of prepackaged libraries. For example, there are a wide variety of special-purpose function and class libraries on the market for C and C++. These tools lets experienced programmers use their general-purpose language skills while adding only the specialized components needed to complete an application. The details of using the library follow the patterns that they already know, leaving them to learn only the minimum necessary to write their specialized program.
Applications Generators Meanwhile, programming with some application generators no longer resembles traditional coding -- but the same type of decisions are being made and the same kind of work is being done. The units of functionality are larger, of course, and the methods of manipulating the chunks of logic are usually different as well. Only if the generator is a good match for the application, however, will the potential productivity advantage of this approach be fully achieved. In selecting such a tool, the same tradeoffs that apply to the choice of 4GL's versus 3GL's must be considered. Application generators don't represent a fundamental change in the nature of programming but rather just another point in the continuum of low and high-level programming.
Intermediate Code To blur the distinction further, the ability of some 4GL's to generate 3GL intermediate code would seem to give the developer the best of both worlds. It retains the productivity of high-level programming and provides access to the machine efficiency and low-level flexibility of a 3GL -- just as the libraries for 3GL's seem to do. While this approach should result in an environment that is as flexible as the 3GL alone, it comes with a tradeoff. To exercise the flexibility of the 3GL it becomes necessary to program in two languages, which increases maintenance costs and training requirements.
The Right Tool for the Job Versus Expertise Further complicating the issue is the matter of expertise. A very specialized language may be the most productive for a particular application. However, experts in a more generalized language might complete the application on schedule more predictably than would neophytes with a special-purpose language. Of course, the practitioners of the general-purpose language get more opportunities to hone their skills.
Because of this effect, choosing the best language for each particular application might not always be the optimum overall strategy.
[The author codes in C and PHP and no longer uses COBOL, Atari BASIC, Visual BASIC, FORTRAN, ALGOL, Natural, RPG, or IBM 370 Assembly.]
|
|
| | mail this link | permapage | score:8866 | -Ray, June 24, 2001 (Updated: November 29, 2002) |
|
Tutorial: Build a Real-Time web tool with jQuery, XMPP and PHP |
 vote
 |
|
| Real-Time apps have been popularized by social-notification tools like Twitter and Friendfeed. With a Real-Time web app you can get website information as soon as it's published. Learn techniques that allow you to create responsive, continually updated web applications that conserve server resources while providing a slick user experience using jQuery, XMPP and PHP. read more... |
|
| | permapage | score:8852 | -solrac, August 1, 2010 |
|
Tutorial: Write your own operating system |
 vote
 |
|
A rather ambitious tutorial.
Writing an operating system is something that can not only be interesting (if you're one of those people that get turned on by Int 13....) but it is also a great learning experience. Through creating your own operating system you will learn exactly what goes on behind the scenes, elevating you above the average programmer... [In addition to the tutorial linked from [read more] below, you might also be interested in this FAQ on developing your own OS. -Ed] read more... |
|
| | mail this link | permapage | score:8845 | -Ray, June 18, 2003 (Updated: August 24, 2008) |
|
Free download: C/C++ Eclipse Plugin |
 vote
 |
|
C/C++ IDE Plugin for the Eclipse Project workbench provides a fully functional C and C++ Integrated Development Environment (IDE). The IDE is not bound to any compiler; it can be used with any C/C++ compiler (for example, gcc). C/C++ IDE Plugin includes its own C/C++ parser for gathering information from projects. The parsed information is then used by other tools to provide information about the project. The C/C++ Plugin is written in Java and is therefore platform-independent.
Eclipse is a kind of universal tool platform - an open extensible IDE for anything and nothing in particular. Find out what eclipse is all about - check out the white paper (requires Acrobat Reader 4.0 or later), read some technical articles, visit the newsgroups, take a look at the projects, and pick up the latest downloads. Don't forget to check out the Eclipse Project FAQ and online documentation. [The Eclipse downloads index page is here. -Ed] read more... |
|
| | mail this link | permapage | score:8842 | -Anonymous, October 30, 2001 (Updated: March 20, 2007) |
|
Vim Plugins: ragtag.vim |
 vote
 |
|
In this part I introduce you to a plugin called "ragtag.vim."
The best parts of RagTag are mappings for editing HTML tags. It has a mapping for quickly closing open HTML tags, a mapping for quickly turning the typed word into a pair of open/close HTML tags, several mappings for inserting HTML doctype, linking to CSS stylesheets, loading JavaScript ... and it includes mappings for wrapping the typed text in a pair of tags for PHP, or for ASP or eRuby, and {% .. %} for Django. read more... |
|
| | permapage | score:8842 | -pkrumins, March 7, 2010 |
|
Vim plugins: snipmate.vim |
 vote
 |
|
This article introduces the snipmate vim plugin.
Snipmate.vim is probably the best snippets plugin for vim. A snippet is a piece of often-typed text or programming construct that you can insert into your document by using a trigger followed by a .
For example, you type "for" and press TAB, and the plugin inserts "for (i = 0; i < n; i++) { }" in your code! read more... |
|
| | permapage | score:8822 | -pkrumins, August 10, 2009 |
|
|