Category Archives: General

Database

A database is an organized collection of data, today typically in digital form. The data are typically organized to model relevant aspects of reality (for example, the availability of rooms in hotels), in a way that supports processes requiring this information (for example, finding a hotel with vacancies).

The term database is correctly applied to the data and their supporting data structures, and not to the database management system (DBMS). The database data collection with DBMS is called a database system.

Well known DBMSs include Oracle, IBM DB2, Microsoft SQL Server, Microsoft Access, PostgreSQL, MySQL, and SQLite. A database is not generally portable across different DBMS, but different DBMSs can inter-operate to some degree by using standards like SQL and ODBC together to support a single application.

Regular expression

• It describes a pattern

• PCRE (PERL Compatible RegularExpression)

• Delimiter

o usually “/”, “#”, or “!”
o used at beginning and end of each pattern

• Literals are any characters

• Boundaries (examples)

^ start of a line

$ end of a line

\A start of a string

\Z end of a string

• Character classes delimited with [ ]

o built-in character classes; capitalization indicates absence (example)

\d digit

\D no digit

• “greediness”

o maximum match is returned

o usually need to use parentheses with alternatives

• Quantifiers (examples)

* any number of times

+ any number of times, but at least once

? 0 or 1 combination of ? with * or + makes non-greedy

• Pattern matching

o use the preg_match(pattern, string) function

o returns number of matches

o optional third param defines match

o preg_match_all() returns all matches o returns all matches in an array

• Replacing

preg_replace(search pattern, replace pattern, string)

In computing, a regular expression provides a concise and flexible means to “match” (specify and recognize) strings of text, such as particular characters, words, or patterns of characters.PHP has three sets of functions that allow you to work with regular expressions.

The most important set of regex functions start with preg. These functions are a PHP wrapper around the PCRE library (Perl-Compatible Regular Expressions). Anything said about the PCRE regex flavor in the regular expression tutorial on this website applies to PHP’s preg functions. You should use the preg functions for all new PHP code that uses regular expressions. PHP includes PCRE by default as of PHP 4.2.0 (April 2002).

The oldest set of regex functions are those that start with ereg. They implement POSIX Extended Regular Expressions, like the traditional UNIX egrep command. These functions are mainly for backward compatibility with PHP 3, and officially deprecated as of PHP 5.3.0. Many of the more modern regex features such as lazy quantifiers, lookaround and Unicode are not supported by the ereg functions. Don’t let the “extended” moniker fool you. The POSIX standard was defined in 1986, and regular expressions have come a long way since then.

The last set is a variant of the ereg set, prefixing mb_ for “multibyte” to the function names. While ereg treats the regex and subject string as a series of 8-bit characters, mb_ereg can work with multi-byte characters from various code pages. If you want your regex to treat Far East characters as individual characters, you’ll either need to use the mb_ereg functions, or the preg functions with the /u modifier. mb_ereg is available in PHP 4.2.0 and later. It uses the same POSIX ERE flavor.

HTML

HyperText Markup Language (HTML) is the main markup language for web pages. HTML elements are the basic building-blocks of webpages.

HTML is written in the form of HTML elements consisting of tags enclosed in angle brackets , within the web page content. HTML tags most commonly come in pairs like, although some tags, known as empty elements, are unpaired, for example . The first tag in a pair is the start tag, the second tag is the end tag (they are also called opening tags and closing tags). In between these tags web designers can add text, tags, comments and other types of text-based content.

The purpose of a web browser is to read HTML documents and compose them into visible or audible web pages. The browser does not display the HTML tags, but uses the tags to interpret the content of the page.

HTML elements form the building blocks of all websites. HTML allows images and objects to be embedded and can be used to create interactive forms. It provides a means to create structured documents by denoting structural semantics for text such as headings, paragraphs, lists, links, quotes and other items. It can embed scripts in languages such as JavaScript which affect the behavior of HTML webpages.

Web browsers can also refer to Cascading Style Sheets (CSS) to define the appearance and layout of text and other material. The W3C, maintainer of both the HTML and the CSS standards, encourages the use of CSS over explicitly presentational HTML markup

JavaScript

JavaScript (JS) is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented imperative, and functional programming styles.

JavaScript was formalized in the ECMAScript language standard and is primarily used in the form of client-side JavaScript, implemented as part of a Web browser in order to provide enhanced user interfaces and dynamic websites. This enables programmatic access to computational objects within a host environment.

JavaScript uses syntax influenced by that of C. JavaScript copies many names and naming conventions from Java, but the two languages are otherwise unrelated and have very different semantics. The key design principles within JavaScript are taken from the Self and Scheme programming languages.

Netscape is the software company who developed JavaScript.

Julian day

Julian day is used in the Julian date (JD) system of time measurement for scientific use by the astronomy community, presenting the interval of time in days and fractions of a day since January 1, 4713 BC Greenwich noon. Julian date is recommended for astronomical use by the International Astronomical Union.
The Julian Day Number (JDN) is the Julian day with the fractional part ignored. It is sometimes used in calendrical calculation, in which case, JDN 0 is used for the date equivalent to Monday January 1, 4713 BC in the Julian calendar.
The term Julian date is widely used to refer to the day-of-year (ordinal date) although incorrectly.

XML-RPC

XML-RPC is a remote procedure call (RPC) protocol which uses XML to encode its calls and HTTP as a transport mechanism. also refers generically to the use of XML for remote procedure call, independently of the specific protocol.

XML-RPC permits programs to make function or procedure calls across a network.

XMLRPC uses the HTTP protocol to pass information from a client computer to a server computer.

XML-RPC uses a small XML vocabulary to describe the nature of requests and responses.

XML-RPC client specify a procedure name and parameters in the XML request, and the server returns either a fault or a response in the XML response.

XML-RPC parameters are a simple list of types and content – structs and arrays are the most complex types available.

RPC

Remote Procedure Call (RPC) is an inter-process communication that allows a computer program to cause a subroutine or procedure to execute in another address space (commonly on another computer on a shared network) without the programmer explicitly coding the details for this remote interaction. That is, the programmer writes essentially the same code whether the subroutine is local to the executing program, or remote. When the software in question uses object-oriented principles, RPC is called remote invocation or remote method invocation.

Opensource

The term open source describes practices in production and development that promote access to the end product’s source materials.Before the term open source became widely adopted, developers and producers used a variety of phrases to describe the concept; open source gained hold with the rise of the Internet.

Open-source software (OSS) is computer software that is available in source code form: the source code and certain other rights normally reserved for copyright holders are provided under a software license that permits users to study, change, improve and at times also to distribute the software.

DOM

The Document Object Model (DOM) is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents.[1] Aspects of the DOM (such as its “Elements”) may be addressed and manipulated within the syntax of the programming language in use. The public interface of a DOM is specified in its application programming interface (API).

Following are the valid DOM save methods

A. save()
B. saveXML()
C. saveHTML()
D. saveHTMLFile()