h1

Microsoft SQL Server 2000 – Database Design and Implementation…

November 15, 2016

microsoft-sql-server-2000

Just got this book from PNM ( Perpustakaan Negara Malaysia ) – National Library. It’s quite an interesting book to read about using and managing SQL Server 2000. The book tells us how to do database design and how to implement it using Microsoft SQL Server 2000 Enterprise Management.

System Integration- SQL Server 2000 works with other products to form a stable and secure data store for Internet and intranet systems:
■ SQL Server 2000 works with Windows 2000 Server and Windows NT Server security and encryption facilities to implement secure data storage.
■ SQL Server 2000 forms a high-performance data storage service for Web applications running under Microsoft Internet Information Services.
■ SQL Server 2000 can be used with Site Server to build and maintain large, sophisticated e-commerce Web sites.
■ The SQL Server 2000 TCP/IP Sockets communications support can be integrated with Microsoft Proxy Server to implement secure Internet and intranet communications.
SQL Server 2000 is scalable to levels of performance capable of handling extremely large Internet sites. In addition, the SQL Server 2000 database engine includes native support for XML, and the Web Assistant Wizard helps you to generate Hypertext Markup Language (HTML) pages from SQL Server 2000 data and to post SQL Server 2000 data to Hypertext Transport Protocol (HTTP) and File Transfer Protocol (FTP) locations.

SQL Server 2000 is an RDBMS that is made up of a number of components. The  database engine is a modern, highly scalable engine that stores data in tables. SQL Server 2000 replication helps sites to maintain multiple copies of data on different computers in order to improve overall system performance while making sure that the different copies of data are kept synchronized. DTS helps you to build data warehouses and data marts in SQL Server by importing and transferring data from multiple heterogeneous sources interactively or automatically on a regularly scheduled basis. Analysis Services provides tools for analyzing the data stored in data warehouses and data marts. SQL Server 2000 English Query helps you to build applications that can customize themselves to ad hoc user questions. SQL Server 2000 Meta Data Services provides a way to store and manage metadata relating to information systems and applications. SQL Server Books Online is the online documentation provided with SQL Server 2000. SQL Server 2000 includes many
graphical and command-prompt utilities that help users, programmers,and administrators perform a variety of tasks

Table and Index Architecture – SQL Server 2000 supports indexes on views. The first index allowed on a view is a clustered index. At the time a CREATE INDEX statement is executed on a view, the result set for the view materializes and is stored in the database with the same structure as a table that has a clustered index. The data rows for each table or indexed view are stored in a collection of 8 KB data pages. Each data page has a 96-byte header containing system information, such as the identifier of the table that owns the page. The page header also includes pointers to the next and previous pages that are used if the pages are linked in a list. A row offset table is at the end of the page. Data rows fill the rest of the page, as shown in Figure 1.5.
Organization of data pages. SQL Server 2000 tables use one of two methods to organize their data pages—clustered tables and heaps:
■ Clustered tables. Clustered tables are tables that have a clustered index. The data rows are stored in order based on the clustered index key. The index is implemented as a B-tree structure that supports the fast retrieval of the rows based on their clustered index key values. The pages in each level of the index, including the data pages in the leaf level, are linked in a doubly linked list, but navigation from one level to another is done using key values.
■ Heaps. Heaps are tables that have no clustered index. The data rows are not stored in any particular order, and there is no particular order to the sequence of the data pages. The data pages are not linked in a linked list. Indexed views have the same storage structure as clustered tables.

SQL Server also supports up to 249 non-clustered indexes on each table or indexed view. The non-clustered indexes also have a B-tree structure but utilize it differently than clustered indexes. The difference is that non-clustered indexes have no effect on the order of the data rows. Clustered tables and indexed views keep their data rows in order based on the clustered index key. The collection of data pages for a heap is not affected if non-clustered indexes are defined for the table. The data pages remain in a heap unless a clustered index is defined.

Transact-SQL Debugger Window- SQL Query Analyzer comes equipped with a Transact-SQL debugger that enables you to control and monitor the execution of stored procedures. The debugger supports traditional functions, such as setting breakpoints, defining watch expressions, and single-stepping through procedures. The Transact-SQL debugger in SQL Query Analyzer supports debugging against SQL Server 2000, SQL Server 7.0, and SQL Server 6.5 Service Pack 2.

You can run Transact-SQL Debugger only from within SQL Query Analyzer.  started, the debugging interface occupies a window within that application, as shown . Transact-SQL Debugger window showing the result of debugging the Cust-OrderHist stored procedure in the Northwind database. When the Transact-SQL Debugger starts, a dialog box appears prompting you to set the values of input parameter variables. It is not mandatory for these values to be set at this time. You will have the opportunity to make modifications once the Transact-SQL Debugger window appears. In the dialog box, click Execute to continue with your session.

Due to connection constraints, it is not possible to create a new query while the debugger window is in the foreground. To create a new query, either bring an existing
query window to the foreground or open a new connection to the database. The Transact-SQL Debugger window consists of a toolbar, a status bar, and a series of window panes. Many of these components have dual purposes, serving as both control and monitoring mechanisms.

Only limited functionality might be available from some of these components after
a procedure has been completed or aborted. For example, you cannot set breakpoints
or scroll between entries in either of the variable windows when the procedure
is not running.

p/s:-  Some of the articles above is taken from the excerpt – Microsoft SQL Server 2000 – Database Design and Implementation. The book is written and published by Microsoft Press year 2003.

Practical Reporting with Ruby and Rails.

practical-reporting-with-ruby-and-rails

Finally, got this book from National Library – PNM ( Perpustakaan Negara Malaysia ) about Ruby and Rails. Most of the examples in this book use Active Record as a database access library. Active Record is a simple way to access databases and database tables in Ruby. It is a powerful object-relational mapping (ORM) library that lets you easily model databases using an object-oriented interface. Besides being a stand-alone ORM package for Ruby, Active Record will also be familiar to web application developers as the model part of the web application framework Ruby on Rails (see http://ar.rubyonrails.org/).
Active Record has a number of advantages over traditional ORM packages. Like the rest of the Rails stack, it emphasizes configuration by convention. This means that Active Record assumes that your tables and fields follow certain conventions unless you explicitly tell it otherwise. For example, it assumes that all tables have an artificial primary key named id (if you have a different primary key, you can override it, of course). It also assumes that the name of each table is a pluralized version of the model (that is, class) name; so if you have a model named Item, it assumes that your database table will be named items.

Active Record lets you define one or more models, each of which represents a single
database table. Class instances are represented by rows in the appropriate database table. The fields of the tables, which will become your object’s attributes, are automatically read from the database, so unlike other ORM libraries, you won’t need to repeat your schema in two places or tinker with XML files to dictate the mapping. However, the relationships between models in Active Record aren’t automatically read from the database, so you’ll need to place code that represents those relationships in your models.Creating a model in Active Record gives you quite a few features for free. You can automatically add, delete, find, and update records using methods, and those methods can make simple data tasks very trivial.

Grouping refers to a way to reduce a table into a subset, where each row in the subset
represents the set of records having a particular grouped value or values. For example, if
you were tracking automobile accidents, and you had a table of persons, with their age and number of accidents, you could group by age and retrieve every distinct age in he database. In other words, you would get a list of the age of every person, with the duplicates removed.

If you were using an Active Record model named Person with an age column, you
could find all of the distinct ages of the people involved, as follows:
ages = Person.find(:all, :group=>’age’).

However, to perform useful work on grouped queries, you’ll typically use aggregate functions. For example, you’ll need to use aggregate functions to retrieve the average accidents per age group or the count of the people in each age group. You’ve probably encountered a number of aggregate functions already. Some common ones are MAX and MIN, which give you the maximum and minimum value; AVG, which gives you the average value; SUM, which returns the sum of the values; and COUNT, which returns the total number of values. Each database engine may define different statistical functions, but nearly all provide those just mentioned. Continuing with the Active Record model named Person with an age column, you could find the highest age from your table as follows:
oldest_age = Person.calculate(:max, :age)
Note that calculate takes the max function’s name, as a symbol, as its first argument,but Active Record also has a number of convenience functions named after their respective
purposes: count, sum, minimum, maximum, and average. For example, the following two
lines are identical:
average_accident_count = Person.calculate(:avg, :accident_count)
average_accident_count = Person.average(:accident_count)

You have many choices for creating charts with Ruby. For example, you can do simple
charting in straight Hypertext Markup Language (HTML) and Cascading Style Sheets (CSS). Chapter 7 shows you how to use Markaby, a templating language for Ruby, to create your own HTML bar charts. Chapter 11 demonstrates how to use CSS helpers to create charts in Rails. Here, we’ll look at the Gruff and Scruffy graphing libraries, and then use Gruff in a couple of examples. Gruff (http://gruff.rubyforge.org/) provides a simple, Ruby-based interface to enter data and display details. After writing the code, you call a simple command to render the graph to a file. For example, if you had a collection of vintage guitars and wanted to display a simple bar chart with their values.

Generally, clients love spreadsheets. Often, they don’t have the expertise to manipulate data using SQL or a programming language like Ruby, but they do know how to perform calculations and analyze data using Microsoft Excel or a similar tool. If their data is directly delivered in their format of choice, they can skip a step and save time. (In fact,some less computer-savvy users may not realize that they can copy and paste data from a web page, so exporting to an Excel-compatible format may enable them to act on data in ways they could not before.)

p/s:- The article above is taken from the excerpt from the book Practical Reporting with Ruby and Rails , written by David Berube and publish by Apress year 2008.

h1

Deploying Rails Application – A Step by Step Guide…..

September 1, 2016

deploying ruby and rails application

Finally , got this book from National Library (PNM) last month. It tells us about how to deploy Ruby and Rails Application by using Mongrel , Rake , Capistrano installation and deploy it in rails.The keys to using Subversion with Rails are maintaining the right structure. You want to keep the right stuff under source control and keep the wrong stuff out. Setting up your application’s repository right the first time will save you time and frustration. A number of items in a Rails application do not belong in source control. Many a new Rails developer has clobbered his team’s database.yml file or checked in a 5MB log file. Both of these problems are with the Subversion setup, not with Rails or even the Rails developer. In an optimal setup, each developer would have their own database.yml file and log files. Each development or production instance of your application will have its own  version of these files, so they need to stay out of the code repository. You might already have a Subversion repository already, but I’ll assume you don’t and walk you through the entire process from scratch.

Many simple applications simply run off the trunk. Others will feel more comfortable deploying from a stable branch. Several great books address this topic better than I possibly could, but I do want you to get a feel for what’s involved. For detailed information on this topic, you should read Pragmatic Version Control [Mas05].
The changes you do on trunk might not be fully tested, or you could be in the middle of a major refactoring when an urgent bug report comes in. You need to have the ability to deploy a fixed version of the application without having to deploy the full set of changes since the last deployment. In Subversion, you can copy a branch of development to another name, and you can set up Capistrano to deploy from your stable branch instead of your development branch. Developers call this technique stable branch deployment. Let’s create the stable branch, which will be a copy of trunk:
$ svn copy –message “Create the stable branch” ֓
file:///home/ezra/deployit/trunk ֓
file:///home/ezra/deployit/branches/stable
Committed revision 234.

When you are ready to merge a set of changes to the stable branch, check the last commit message on the branch to know which revisions you need to merge:
$ svn log –revision HEAD:1 –limit 1 ֓
file:///home/ezra/deployit/branches/stable
——————————————————-
r422 | ezra | 2007-05-30 21:30:27 -0500 (30 may 2007) | 1 line
Merged r406:421 from trunk/
——————————————————-
Using the information in the log message, you can now merge all the changes to the branch:
$ svn merge –revision 422:436 ֓
file:///home/ezra/deployit/trunk .
A app/models/category.rb
M app/models/forum.rb
A db/migrate/009_create_category.rb

Finally, commit and deploy:
$ svn commit –message “Merged r422:436 from trunk/”
A app/models/category.rb

Transmitting file data ….
Committed revision 437.
$ cap deploy_with_migrations

You now have a good Subversion repository, and you can use it to
deploy. You’ve ignored the files that will break your developers’ will or just your application, and you’ve used common Rails conventions. Still, you should know a few things about developing with Subversion with successful deployment in mind.

You need to install Capistrano only on your development machine, not the server, because Capistrano runs commands on the server with a regular SSH session. If you’ve installed Rails, you probably already have RubyGems on your system. To install Capistrano, issue this command on your local machine:
local$ sudo gem install capistrano
Attempting local installation of ‘capistrano’
Local gem file not found: capistrano*.gem
Attempting remote installation of ‘capistrano’
Successfully installed capistrano-2.0.0
Successfully installed net-ssh-1.1.1
Successfully installed net-sftp-1.1.0
Installing ri documentation for net-ssh-1.1.1…
Installing ri documentation for net-sftp-1.1.0…
Installing RDoc documentation for net-ssh-1.1.1…
Installing RDoc documentation for net-sftp-1.1.0…
While you are installing gems, install the termios gem as well. (Sorry, termios is not readily available for Windows.) By default, Capistrano echoes your password to the screen when you deploy. Installing the termios gem keeps your password hidden from wandering eyes.

p/s:- This is a good book to read when a user or a programmer wants to deploy ruby and rails in their server or production machine. Some of these excerpt are taken from the book Deploying Rails Application – A Step By Step Guide written by Ezra Zygmuntowicz , Bruce Tate and Clinton Begin , publish by The Pragmatic Bookshelf.

The Ultimate CSS Reference.

Ultimate CSS Reference

Got this book from National Library (PNM) last month. It tells us about the usage , syntax and implementation of CSS in HTML website design and website programming. In XML documents, including XHTML served as XML, an external style sheet can be referenced using a processing instruction (PI). Such processing instructions are normally part of the XML prologue, coming after the XML declaration, but before the doctype declaration (if there is one) and the root element’s start tag. This example shows an XML prologue with a persistent style sheet (base.css), a preferred style sheet (default.css), and an alternative style sheet (custom.css):

<?xml version=”1.0″ encoding=”utf-8″?>
<?xml-stylesheet type=”text/css” href=”/base.css”?>
<?xml-stylesheet type=”text/css” href=”/default.css”
title=”Default”?>
<?xml-stylesheet type=”text/css” href=”/custom.css”
title=”Custom” alternate=”yes”?>

An external style sheet can’t contain SGML comments (<!– … –>) or HTML tags (including <style> and <style>). Nor can it use SGML character references (such as ©) or character entity references (such as &copy;). If you need to use special characters in an external style sheet, and they can’t be represented through the style sheet’s character encoding, specify them with CSS escape
notation.
■ The content type of the style element type in HTML is CDATA, which means that character references (numeric character references or character entity references) in an internal style sheet aren’t parsed. If you need to use special characters in an internal style sheet, and they can’t be represented with the document’s character encoding, specify them with CSS escape notation (p. 43).
In XHTML, the content type is #PCDATA, which means that character references are parsed, but only if the document’s served as XML.
■ Unlike in style elements, character references are parsed in style attributes, even in HTML.

Some of the early browser implementations of CSS were fraught with problems—they only supported parts of the specification, and in some cases, the implementation of certain CSS features didn’t comply with the specification. Today’s browsers generally provide excellent support for the latest CSS specification, even incorporating features that aren’t yet in the official specification, but will likely appear in the next version. Due to the   implementation deficiencies in early browsers, many old style sheets were written to work with the then-contemporary browsers rather than to comply.

So how does doctype sniffing work? Which declarations trigger standards mode, quirks mode, and almost standards mode? The document type definition reference, for HTML and XHTML, consists of the string PUBLIC followed by a formal public identifier (FPI), optionally followed by a formal system identifier (FSI), which is the URL for the DTD.
Here’s an example of a doctype declaration that contains both an FPI and an FSI:
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01//EN”
http://www.w3.org/TR/html4/strict.dtd”&gt;
This example contains only the FPI:
<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
Doctype sniffing works by detecting which of these parts are present in the doctype declaration. If an FPI is present, but an FSI isn’t, browsers generally choose quirks mode, since this was the common way of writing doctype declarations in the old days. Browsers also choose quirks mode if the doctype declaration is missing altogether—which used to be very common—or is malformed.

The @import at-rule is a mechanism for importing one style sheet into another. It should be followed by a URI value and a semicolon, but it’s possible to use a string value instead of the URI value. Where relative URIs are used, they’re interpreted as being relative to the importing style sheet. You can also specify one or more media types to which the imported style sheet applies—simply append a comma-separated list of media types to the URI.

Here’s an example of a media type specification:

@import url(/css/screen.css) screen, projection;

The @import rules in a style sheet must precede all rule sets. An @import rule that follows one or more rule sets will be ignored. As such, the example below shows an incorrect usage; because it appears after a rule set, the following @import rule will be ignored:

html {
background-color: #fff;
color: #000;
}
/* The following rule will be ignored */
@import url(“other.css”);

p/s:- There are lots of CSS syntax and CSS programming language that we can learn from. The book tells us some part of the CSS syntax and language that we can implement in HTML website coding. Some of the articles above is an excerpt from the book -The Ultimate CSS Reference written by Tommy Olsen and Paul O`Brien published by SitePoint Pty Ltd.

 

 

 

 

 

 

 

 

h1

Beginning C# 2008 Databases-From Novice to Professional….

July 30, 2016

beginning c# 2008 databases

Just got this book from PNM (National Library) this month. The book tells us about using programming in C# by making databases using SQL Server. This book focuses on accessing databases using C# 2008 as a development tool in conjunction with the new release of Visual Studio 2008 and .NET Framework 3.5. The SQL Server that it uses is SQL Server 2005.

SQL Server 2005 is one of the most advanced relational database management systems (RDBMSs) available. An exciting feature of SQL Sever 2005 is the integration of the .NET CLR into the SQL Server 2005 database engine , making it possible to implement database objects using managed code written in a .NET language such as Visual C# .NET or Visual Basic .NET. Besides this , SQL Server 2005 comes with multiple services such as analysis services , data transformation services , reporting services , notification services , and Service Broker. SQL Server 2005 offers one common environment , named SQL Server Management Studio , for both database developers and database administrators (DBAs).

Query by Example (QBE) is an alternative , graphical-based , point-and-click way of querying a database. It differs from SQL in that it has a graphical  user interface that allows users to write queries by creating example tables on the screen. QBE is especially suited for queries that are not too complex and can be expressed in terms of a few tables. Each database vendor offers its own implementation of SQL that conforms at some level to the standard but typically extends it. T-SQL does just that , and some of the SQL used in this book may not work if you try it with a database server other than SQL Server. Common table expressions (CTE) are new to SQL Serve 2005. A CTE is a named temporary result set that will be used by the FROM clause of a SELECT query. You then use the result set in any SELECT , INSERT , UPDATE , or DELETE query defined within the same scope as the CTE.

Most queries require information from more than one table. A join is a relational operation that produces a table by retrieving data from two ( not necessarily distinct) tables and matching their rows according to a join specification. Different types of joins exist , which you’ll look at individually , but keep in mind that every join is a binary operation , that is  , one table is joined to another , which may be the same table since tables can be joined to themselves. The join operation is a rich and somewhat complex topic.

Stored procedures can have parameters that can be used for input or output and single-integer return values (that default to zero) , and they can return zero or more result sets. They can be called from client programs or other stored procedures. Because stored procedures are so powerful , they are becoming the preferred mode for much database programming , particularly for multitier applications and web services , since (among their many benefits) they can dramatically reduce network traffic between clients and database servers.

p/s:- Quite an interesting book to read…Good book to read for people or students who want to learn C# in writing programming in databases…Some of the article is an excerpt from the book Beginning C# 2008 Databases – From Novice to Professional written by Vidya Vrat Agarwal and James Huddleston publish by Apress.

 

macs_all-in-one

Macs – All-In-One for Dummies.

Borrowed this book from National Library ( PNM ) this month..This book tells us about the history , architecture of the Mac Computers and Notebooks and the Mac Operating System.

The type of processor in your Mac can determine the applications (also known as apps or software) your Mac can run. Before buy any software , make sure that it can run on your computer. To identify the type of processor  used in your Mac , click the Apple menu in the upper-left corner of the screen and choose About this Mac. An About this Mac window appears , listing your processor as Intel Core 2 Duo , Core i3 , Core i5 , Core i7 , or Xeon. If your Mac doesn’t have one of the previously mentioned processors , you won’t be able to run Mac OSX Mavericks , version 10.9. This means that Core Solo and Core Duo models can’t run Mavericks. What’s more, to use Mavericks , you also need at least 2GB RAM (random access memory).

The dock is a rectangular strip that contains app , file , and folder icons. It lies in wait just out of sight either at the bottom or on the left or right side of the Desktop. When you hover the pointer in the area where the Dock is hiding , it appears , displaying the app , file , and folder icons stored there. When you use your Mac for the first time, the Dock already has icons for many of the pre-installed apps , as well as the Downloads folder and a Trash icon. You click an icon to elicit an action , which is usually to open an app or file , although you can also remove the icon from the Dock or activate a setting so that app opens when you log in to your Mac.

The Finder is an app that lets you find , copy , move , rename , delete , and open files and folders on your Mac. You can run apps directly from the Finder although the Dock makes finding and running apps you use frequently much more convenient. The Finder runs all the time. To switch to the Finder , click the Finder icon on the Dock ( the Picasso-like faces icon on the far left , or top , of the Dock) or just click an area of the Desktop outside any open windows. You know you’re in the Finder because the app menu is Finder , as opposed to Pages , System Preferences , or some other app name.

iCloud remotely stores and syncs data that you access from various devices – your Mac and other Apple devices , such as iPhones , iPads , and iPods , and PCs running Windows. Sign in to the same iCloud account on different devices , and the data for activated apps syncs ; that is , you find the same data on all your devices , and when you make a change on one device , it shows up on the others. The initial setup on your Mac or the creation of an iCloud Apple ID as explained previously activates your iCloud account and places a copy of the data from Mail , Contacts , Calendar , Notes , Reminders , and Safari from your Mac to the cloud ( that is , the Apple data storage equipment). Here , we show you how to work with the iCloud preferences ,sync devices , and sign in to and use the iCloud website.

p/s:- This books begins by focusing on the basics for all the aspects of using Mac with the  latest operating system , OSX 10.9 Mavericks. A good book to have…Some of the articles are excerpt taken from the book Macs – All-In-One for Dummies written by Joe Hutsko and Barbara Boyd , publish by John Wiley & Sons Inc , 4th Edition.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

h1

Introduction To Expert Systems…

June 4, 2016

expert system

Introduction To Expert Systems. 

Borrowed this book from National Library – PNM – last month. An expert system can be distinguished from a more conventional applications program in that : It simulates human reasoning about a problem domain , rather than simulating the domain itself. This distinguishes expert systems from more familiar programs that involve mathematical modeling or computer animation. It performs reasoning over representations of human knowledge , in addition to doing numerical calculations or data retrieval. The knowledge in the program is normally expressed in some special-purpose language and kept separate from the code that performs the reasoning. These distinct program modules are referred to as the knowledge base and inference engine , respectively.

Expert systems encode the domain-dependent knowledge of everyday practitioners in some field , and use this knowledge to solve problems , instead of using comparatively domain-independent methods derived from computer science or mathematics. The process of constructing an expert systems is often called knowledge engineering , and is considered to be ‘applied artificial intelligence’.

In the field of expert systems , knowledge representation implies that we have some systematic way of codifying what  an expert knows about some domain.However , it would be a mistake to suppose that representation is the same thing as encoding , in the sense of encryption. If one encodes a message by transposing its constituent symbols in some regular fashion , the resultant piece of code would not be a representation of the contents of the message from an artificial intelligence point of view , even if the code were machine-readable and easy to store in the memory of the machine.

The notion of a symbol is so pervasive in the current theory and practice of artificial intelligence that its importance is easily overlooked. It is this notion that forms the crucial link between artificial intelligence and formal systems of logic and mathematics. In the simplest possible terms , a symbol is something that stands for something else. This ‘something else’ is usually called the designation of the symbol. It is the thing that the symbol refers to or represent. The designation may be a physical object or it may be a concept , but the symbol itself is physical. The idea behind symbolic computation is that we want to allow symbols to stand for anything at all. Programming languages based on this paradigm provide a number of primitive data structures for associating symbols with other symbols , as well as primitive operations for manipulating symbols and their associated structures.

p/s:- Some of the article above is an excerpt from the book Introduction to Expert Systems , written by Peter Jackson and published by Addison Wesley.

 

Programming Engineering Computations in Java.

Programming engineering computations in java

Borrowed this book from National Library (PNM) last month . It’s quite an interesting book to read for those who taken Java language as one of the programming language as a subject to study..The basic module of a Java program is referred to as the class. The definition of the module is the class. A class contain the information (data) and the functionality (method). The Java libraries have several classes.

A Java program contains the definition of the classes. The statements in a Java program are written in the body of the method in a class. The variables and the methods in a Java program are written in the body of the class. This makes Java , a structured language.

The compilation of the Java source code file is performed by typing the statement, javac filename.java in the command prompt of the Java bin folder. The CLASS_NAME.java program is compiled by typing javac CLASS_NAME.java in the command prompt of the Java bin folder. If the program compiles without error message , the java compiler creates a class file in the name of the Java source code file and the command prompt will be displayed as j2sdk1.4.1>bin>  in the console window.

The java class file is executed by typing java filename in the command prompt of the Java bin folder , without the class extension. The output of the java program is displayed in the console window. The compiled CLASS_NAME.java program is executed by typing java CLASS_NAME in the command prompt of the Java bin folder.

The data type  used in the numerical computations in engineering are: 1. Integer 2. Floating Point 3. Double Precision. 4. Character. 5. Boolean. An integer variable in Java is declared using the syntax, int variable_name;  . The initialization of the variable is performed as int variable_name = initial_value ;

The Java compiler has the java.lang.String class for the creation of the instances of the String class. The String class has several methods to process the instances of the String class. The instances of the String class can be created by reading the text from the console window or the input file , and using statements in the program.

Error messages can be obtained from the methods performing the tasks in the Java programs using exceptions. An exception in Java is performed by using a try block , catch block , and finally block. A try block enclosed in the curly braces performs a task. If a statement in the try block throws an exception , a catch block can be written to receive a specific type of exception. The statements in catch block instruct the computer to perform a specific task after receiving a specific  type of error message from the try block. A finally block is written to specify the task to be performed after the try and the catch blocks.

In summary , this book covers topics about File Processing in Java , Matrix Computations in Java , Exceptions in Numerical Computations in Java , Classes , Inheritance and Polymorphism , Graphical User Interface , Graphics , Java Applet and Programming Threads in Java.

p/s:- Some of the article above is an excerpt from the book – Programming Engineering Computations in Java – written by Dr. Raja Subramaniam and published by Firewall Media.

 

 

 

 

 

h1

Systems Programming…

May 7, 2016

system programming

Borrowed this book from National Library (PNM) last month. A book that’s tell us about compiler , compiler’s data structure , interpreter , parsers , how to build and encode compilers and what happens when a program code build , run and compile…Assembler is also discussed in this book , using an assembly language to write a program..also discussed is about linkers and loaders , how linkers and loaders run in the background when a certain program compiles…

When our program is compiled , initially the compiler takes the input source program and breaks it into stream of tokens. The tokens can be keywords , identifiers , relational operators and so on. these tokens are gouped together by the syntax analysis phase of compiler in order to detect the syntax of  programming constructs. If from a group of tokens the syntax can not be identified then a syntax error may get generated.

Creating a compiler is a critical task. Hence we can automate the process of building compiler by using automated tools for generating various phases of compiler. LEX and YACC are such tools. The LEX is used for generating the lexical analyzer program for the compiler and YACC is used to generate the syntax analyzer program automatically.

Recursion is the basic problem for implementing macro calls within macros. If a macro call is encountered during the expansion of a macro, the macro processor will have to expand the included macro call and then finish expanding the enclosing macro. The second call might be expanded by a second macro processor , which would look up the macro definition in the MDT and return the expanded code to the first macro processor. Having many macro processor is neither efficient nor general. If a single macro processor is to handle such nested macro calls, it must in some way save its status when it encounters nested calls.

To handle macro calls within macros , the macro processor must be able to work recursively i.e. to process one macro before it is finished with another , then continue with the previous one.

In Conclusion , its a good book to read . It tells us about operating system and it’s components , how assembler and compilers works , dynamic linking , i/o , file and memory  management , cpu scheduling and process synchronization.

p/s:- Some of the article above is an excerpt from the book Systems Programming written by A.A.Puntambekar and I.A.Dhotre publish by Technical Publications Pune – Fourth Revised Edition 2010.

BuddyPress…

buddypress

Borrowed this book from National Library (PNM) last month…It’s quite an awesome and an interesting book to read about BuddyPress. BuddyPress is a platform to create a social community on your website. It integrates with the WordPress blogging platform , such as member blogs and blog tracking features.

One of the most attractive features of the WordPress and BuddyPress platform is the ease in which you can install , set up , and use the platform to manage and maintain your web site. You don’t need to be a programmer to get BuddyPress up and running. Even someone new  to WordPress and BuddyPress can have a full featured web site , blog , and social community up and running in a relatively short period.

Another way to extend your BuddyPress social community is to customize the look and layout of your site with BuddyPress themes and templates. BuddyPress comes packaged with themes for you to use.The BuddyPress default themes include all the basic elements that you need when starting a new BuddyPress social community on your web site. you can extend your community in several ways by using the plugins and themes released by members of the BuddyPress community , but these default themes are an easy way to get started.

First thing first , you need to visit the BuddyPress Settings page to configure the general settings of your BuddyPress community. BuddyPress comes packaged with several different components and features that you can enable within your community. You do not have to use all of the available components – as a site administrator , you have the option to use only what you need  and leave the rest. The following steps take you through the basic settings:-

1- Log in to your WordPress MU dashboard

Point your browser to http://yourdomain.com/wp-login.php ,          enter your WordPress admin username and password , and                then click the Log In button.

2- Expand the BuddyPress menu.

On the left side  of your WordPress MU dashboard , click the              drop-down arrow on the BuddyPress menu. This expands the            BuddyPress menu and displays several links beneath the                    menu title.

3- Browse to the BuddyPress Settings page.

Click the general settings links on the BuddyPress menu.                    This loads the BuddyPress Settings page.

Lastly , you have to install WordPress plugin , install BuddyPress as a plugin in your WordPress installation , and there you go…You have your own WordPress and BuddyPress…

p/s:- Some of this article is taken from the excerpt from the book BuddyPress for Dummies , written by Lisa Sabin Wilson , publish by Wiley Publishing Inc.

 

 

 

 

 

 

 

 

 

 

h1

Professional PaperVision3D….

April 9, 2016

professional papervision3d

This book I borrowed from PNM (National Library) and it’s quite an interesting book to read. It tells you about the installation of papevision3d , some computer graphics stuff and how to code using papervision3d and java. The view frustum contains everything that’s visible in a 3D scene. The view frustum is pyramid-shaped and at its apex is the camera. The viewable volume is bounded by a polyhedron. Its entry plane is called the near clip plane and the end of its viewing volume is called the far clip plane. The cube inside the viewable volume shown above is projected onto the viewport while the pyramid outside is not drawn ; it’s culled.

To succesfully map  x and y coordinates to the projection plane ( or viewport ) you must map the view frustum shown above to a cube. Without going into all the details , you accomplish this using a projection matrix. Most 3D operations are accomplished using matrix algebra , which is beyond the scope of this book but addressed on the book’s website. The depth in the view frustum is what determines the z-sorting values.

Running a Papervision3D application is like simultaneously recording and projecting your 3D scene . The scene is the middleman. It’s what the camera films and what the projector projects. You can think of the whole process as a combination of a movie camera and projector that both films and projects your 3D scene simultaneously. The scene is what the camera is pointed at and the objects are the items that the camera films. the material are what your objects are dressed in and  determine how the light interacts with the scene elements. The reels  on your projector are your renderer and as your reels turn ( using onEnterFrame or Timer methods ) they cast the recorded scene onto your screen which is your viewport. Finally , at a the heart of Papevision3D is the DisplayObject3D class.

Crucial to understanding how Papervision3D handles objects is to grasp how vertices are manipulated to create 3D computer graphics. The most important thing to remember when dealing with 3D graphics in Papervision3D is that “a vetex is a vertex”. No matter how complex your 3D objects become , it all eventually boils down to a group of vertices arranged in triangles. Papervision3D’s vertex class is Vertex3D. It holds the 3D position of your vertices and a few methods for those vetices. Technically speaking a vertex is an instance of a data structure. That instance contains the attributes of your point in space…wherever it may be.

Lastly , Papervision3D is a framework that encompass computer graphics that can manipulate objects , graphics and media in one application using java language. Papervision3D can be downloaded in the internet…

p/s: – Some of the article above is taken from the excerpt of Professional PaperVision3D written by Michael Lively published by John Wiley and Sons , Limited.

 

Data Structures and Algorithm Analysis in Java…

data structures and analysis in java - pearson

This book also I borrowed from PNM ( National Library ) that tells us about data structure – linked list , queue , stack , trees , hashing , heaps , sorting , algorithm and much more…But the coding of the data structure now we are using is java language.

The most important resource to analyze is generally the running time. Several factors affect the running time of a program. Some , such as the compiler and computer used , are obviously beyond the scope of any theoretical model , so , although they are important , we cannot deal with them here. The other main factors are the algorithm used and the input  to the algorithm. Typically , the size of the input is the main consideration. We define two functions , T avg (N) and T worst (N) , as the average and worst-case running time , respectively , used by an algorithm on input of size N. Clearly , T avg (N) ≤ T worst (N). If there is more than one input , these functions may have more than one argument.

The most confusing aspect of analyzing algorithms probably centers around the logarithm. We have laready seen that some divide-and-conquer algorithms will run in O(N log N) time. Besides divide-and-conquer algorithms , the most frequent appearance of logarithms centers around the following general rule. An algorithm is O(log N) if it takes constant (O(1)) time to cut the problem size by a fraction ( which is usually 1/2). On the other hand , if constant time is required to merely reduce the problem by a constant amount ( such as to make the problem smaller by 1 ) , then the algorithm is O(N).

It should be obvious that only special kinds of problems can be O(log N). For instance , if the input is a list of N numbers , an algorithm must take Ω(N) merely to read the input in .Thus , when we talk about O(log N) algorithms for these kinds of problems , we usually presume that the input is preread.

Once an analysis has been performed , it is desirable to see if the answer is correct and as good as possible. One way to do this is to code up the program and see if the empirically observed running time matches the running time predicted by the analysis. When N doubles , the running time goes up by a factor of 2 for linear programs , 4 for quadratic program , and 8 for cubic programs. Programs that run in logarithmic time take only an additive constant longer when N doubles , and programs that run in O(N log N) take slightly more than twice as long to run under the same circumstances. These increases can be hard to spot if the lower-order terms have relatively large coefficients and N is not large enough. An example is the jump form N=10 to N=100 in the running time for the various implementations of the maximum subsequence sum problem. It also can be very difficult to differentiate linear programs from O(N log N) programs purely on empirical evidence.

Lastly , this book mainly talks about data structure , algorithm analysis , coding data structure in java language and some exercise that can strenghten your basic subjects in data structure.

p/s:- Some of the articles is an excerpt from Data Structure and Algorithm Analysis in Java – Second Edition written by Mark Allen Weiss published by Pearson Education Inc.

 

 

 

 

 

 

 

h1

Microsoft SQL Server 2008 Programming and Cascading Style Sheets – Separating Content From Presentation…

February 13, 2016

professional_microsoft_sql_server_2008_programming

Microsoft SQL Server 2008 Programming.

This is book is mainly about the usage and programming using Microsoft SQL Server 2008 , how to do database setup , inserting , updating , deleting tables and so on…I borrowed it from the National Library (PNM). It teaches us the basic syntax of using Microsoft SQL Server 2008 programming language. Databases are made up of many things , but none is more central to the make-up of a database than tables are. A table can be thought of as equating to an accountant’s ledger or an Excel spreadsheet. It is made up of what is called domain data (columns) and entity data (rows). The actual data for the database is stored in the tables.

SQL Server is a large product and the various pieces of it utilize a host of services that run in the background on your server. A full installation will encompass nine different services , and seven of these can be managed from this part of the SQL Server Configuration Manager ( the other two are services that act as background support ).

SQL Server provides several of what are referred to as Net-Libraries (network libraries) , or NetLibs. These are dynamic-link libraries (DLLs) that SQL Server uses to communicate with certain network protocols. NetLibs serve as something of an insulator between your client application and the network protocol , which is essentially the language that one network card uses to talk to another , that is to be used. They serve the same function at the server end , too. The NetLibs supplied with SQL Server 2008 include Named Pipes , TCP/IP (the default) , Shared Memory and VIA ( a special virtual interface that your storage-hardware vendor may support ).

Every time you run a query , SQL Server parses your query into its component parts and then sends it to the query optimizer. The query optimizer is the part of SQL Server that figures out the best way to run your query to balance fast results with minimum impact to other users . When you use the Show Estimated Execution Plan option , you receive a graphical representation and additional information about how SQL Server plans to run your query. Similarly , you can tun on the Include Actual Execution Plan option. Most of the time , this will be the same as the estimated execution plan , but you will occasionally see differences here due to changes that the optimizer decides to make while running the query , as well as changes in the actual cost of running the query versus what the optimizer thinks is going to happen.

p/s:- Some of these articles are excerpt from the book –  Beginning Microsoft SQL Server 2008 Programming – written by Robert Vieira and publish by Wiley Publishing Inc.

cascading style sheets

Cascading Style Sheets – Separating Content From Presentation

This book i borrowed from the National Library (PNM). It tell us about how to use the Cascading Style Sheets , the origin of it , the foundation and concepts , the XHTML and CSS. CSS at its core is extremely simple and powerful. It allows you to attach style rules to HTML markup elements , such as the <p> or <a> element. These rules define the presentational aspects of the HTML elements to which they apply, such as color or typeface.

The <style> element appears in the <head> element of an XHTML document. Its type attribute declares that the style language is CSS , and it overrides the default stylesheet language used by the browser when rendering stylesheets. Actually, there are no other style languages in use by browsers today , except for Netscape Navigator 4.x’s proprietary JavaScript Stylesheets (JSSS) , which use the type attribute value “text/javascript” , now virtually obsolete as the browser fades from existence. However, as with many things in CSS , the type attribute looks forward to a time when browsers provide support for multiple style languages.

The popularity and power of a general-purpose SGML document type such as HTML wasn’t lost on XML’s designers , however , and as a transitional step toward the future , the HTML vocabulary wan reimplemented in XML as XHTML , the basis of most of our examples in this book. By making use of a well-known and proven generic document type , XML’s creators hope to leverage the knowledge of millions of web author while tightening down the screws with regard to syntax. As a result , a valid XHTML document may be viewd in any modern browser ( and even in most legacy browsers ) without much difficulty , and it may also be used by tools designed to interpret and manage XML documents , because it is itself an application of XML. Eventually , the Web’s architects expect that we’ll all be suing XHTML with our own , or with widely adopted , XML formats such as SVG , MathML , RDF , RSS , and others.

If you’re using XSLT or some other transformation language , you may need to document the naming convention several times or show the relationships between the storage format ( whether document repository , object database , relational database , or flat files ) , the transformation rules (whether XSLT or some other software package with XML support ) , the output format (whether another custom XML document , XHTML , legacy HTML , or another format ) , and the associated files , such as CSS stylesheets , Javascript files , and so forth.

p/s:-  Some of these articles are taken form the excerpt  from the book – Cascading Style Sheets – Separating Content From Presentation – written by Owen Briggs , Steven Champeon , Eric Costello and Matt Patterson – publish by Friendsof – an Apress Company.