পৃষ্ঠাসমূহ
Labels
Search Your Article
CS
Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.
At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.
What We Offer:
-
📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.
-
💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.
-
🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.
-
🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.
✔ Latest world News
Our Vision
To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.
Why Choose Us?
✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing
We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.
📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.
Pageviews
Friday, March 31, 2017
Ruby Built-in Functions
A complete list of Built-in Functions is given here for your reference:
Ruby Predefined Variables
The values in most predefined variables can be accessed by alternative means.
Following table lists all the Ruby's predefined variables.
Ruby Predefined Constants
NOTE: TRUE, FALSE, and NIL are backward-compatible. It's preferable to use true, false, and nil.
| Constant Name | Description |
|---|---|
| TRUE | Synonym for true. |
| FALSE | Synonym for false. |
| NIL | Synonym for nil. |
Ruby Associated Tools
Standard Ruby Tools:
The standard Ruby distribution contains useful tools along with the interpreter and standard libraries:These tools help you debug and improve your Ruby programs without spending much effort. This tutorial will give you a very good start with these tools.
Ruby - Useful Resources
Useful Links on Ruby
- Main Ruby Site − Official Ruby site. Find a complete list of all documentation, tutorials, news, etc.
- Ruby Documentation − Ruby documentation site.
Discuss Ruby
This tutorial gives a complete understanding on Ruby.
RSpec - Introduction
RSpec - Basic Syntax
Here is the RSpec code again −
RSpec - Writing Specs
First, in our new class, it is called StringAnalyzer. It’s a simple class that, you guessed it, analyzes strings. Our class has only one method has_vowels? which as its names suggests, returns true if a string contains vowels and false if it doesn’t. Here’s the implementation for StringAnalyzer −
RSpec - Matchers
expect(message).to eq "Hello World!"The keyword eql is an RSpec “matcher”. Here, we will introduce the other types of matchers in RSpec.
RSpec - Test Doubles
RSpec - Stubs
Here is the code from the section on RSpec Doubles −
RSpec - Hooks
RSpec - Tags
RSpec - Subjects
Consider this code −
RSpec - Helpers
RSpec - Metadata
Let’s take a look at an example −
RSpec - Filtering
Imagine that you have a spec file and it contains two types of tests (Examples): positive functional tests and negative (error) tests. Let’s define them like this −
RSpec - Expectations
- An Expectation is simply a statement in an it block that uses the expect() method. That’s it. It’s no more complicated than that. When you have code like this: expect(1 + 1).to eq(2), you have an
RSpec - Quick Guide
RSpec - Introduction
RSpec is a unit test framework for the Ruby programming language. RSpec is different than traditional xUnit frameworks like JUnit because RSpec is a Behavior driven development tool. What this means is that, tests written in RSpec focus on the “behavior” of an application being tested. RSpec does not put emphasis on, how the application works but instead on how it behaves, in other words, what the application actually does.RSpec - Useful Resources
Discuss RSpec
What is New in Python 3
The __future__ module
Python 3.x introduced some Python 2-incompatible keywords and features that can be imported via the in-built __future__ module in Python 2. It is recommended to use __future__ imports, if you are planning Python 3.x support for your code.For example, if we want Python 3.x's integer division behavior in Python 2, add the following import statement.
from __future__ import division
Python 3 - Overview
Python 3 - Environment Setup
Try it Option Online
We have set up the Python Programming environment online, so that you can compile and execute all the available examples online. It will give you the confidence in what you are reading and will enable you to verify the programs with different options. Feel free to modify any example and execute it online.
Python 3 - Basic Syntax
First Python Program
Let us execute the programs in different modes of programming.Python 3 - Variable Types
Based on the data type of a variable, the interpreter allocates memory and decides what can be stored in the reserved memory. Therefore, by assigning different data types to the variables, you can store integers, decimals or characters in these variables.
Python 3 - Basic Operators
Types of Operator
Python language supports the following types of operators −- Arithmetic Operators
- Comparison (Relational) Operators
- Assignment Operators
Python 3 - Decision Making
Decision structures evaluate multiple expressions, which produce TRUE or FALSE as the outcome. You need to determine which action to take and which statements to execute if the outcome is TRUE or FALSE otherwise.
Python 3 - Loops
Programming languages provide various control structures that allow more complicated execution paths.
A loop statement allows us to execute a statement or group of statements multiple times. The following diagram illustrates a loop statement −
Python 3 - Numbers
Number objects are created when you assign a value to them. For example −
var1 = 1 var2 = 10
Python 3 - Strings
var1 = 'Hello World!' var2 = "Python Programming"
Python 3 - Lists
Python has six built-in types of sequences, but the most common ones are lists and tuples, which we would see in this tutorial.
Python 3 - Tuples
Python 3 - Dictionary
Keys are unique within a dictionary while values may not be. The values of a dictionary can be of any type, but the keys must be of an immutable data type such as strings, numbers, or tuples.
Python 3 - Date & Time
What is Tick?
Time intervals are floating-point numbers in units of seconds. Particular instants in time are expressed in seconds since 12:00am, January 1, 1970(epoch).Python 3 - Functions
As you already know, Python gives you many built-in functions like print(), etc. but you can also create your own functions. These functions are called user-defined functions.
Python 3 - Modules
Simply, a module is a file consisting of Python code. A module can define functions, classes and variables. A module can also include runnable code.
Python 3 - Files I/O
Printing to the Screen
The simplest way to produce output is using the print statement where you can pass zero or more expressions separated by commas. This function converts the expressions you pass into a string and writes the result to standard output as follows −#!/usr/bin/python3Python 3 - Exceptions Handling
- Exception Handling − This would be covered in this tutorial. Here is a list standard Exceptions available in Python − Standard Exceptions.
- Assertions − This would be covered in Assertions in Python 3 tutorial.
Python 3 - Object Oriented
If you do not have any previous experience with object-oriented (OO) programming, you may want to consult an introductory course on it or at least a tutorial of some sort so that you have a grasp of the basic concepts.
Python 3 - Regular Expressions
The module re provides full support for Perl-like regular expressions in Python. The re module raises the exception re.error if an error occurs while compiling or using a regular expression.
Python 3 - CGI Programming
What is CGI?
- The Common Gateway Interface, or CGI, is a standard for external gateway programs to interface with information servers such as HTTP servers.
- The current version is CGI/1.1 and CGI/1.2 is under progress.
Python 3 - MySQL Database Access
You can choose the right database for your application. Python Database API supports a wide range of database servers such as −
Python 3 - Network Programming
Python 3 - Sending Email using SMTP
Python provides smtplib module, which defines an SMTP client session object that can be used to send mails to any Internet machine with an SMTP or ESMTP listener daemon.
Here is a simple syntax to create one SMTP object, which can later be used to send an e-mail −
import smtplib
Python 3 - Multithreaded Programming
- Multiple threads within a process share the same data space with the main thread and can therefore share information or communicate with each other more easily than if they were separate processes.
- Threads are sometimes called light-weight processes and they do
not require much memory overhead; they are cheaper than processes.
Python 3 - XML Processing
Python 3 - GUI Programming (Tkinter)
- Tkinter − Tkinter is the Python interface to the Tk GUI toolkit shipped with Python. We would look this option in this chapter.
Python 3 - Extension Programming with C
A Python extension module is nothing more than a normal C library. On Unix machines, these libraries usually end in .so (for shared object). On Windows machines, you typically see .dll (for dynamically linked library).
Python 3 - Questions and Answers
Python 3 - Quick Guide
What is New in Python 3?
The __future__ module
Python 3.x introduced some Python 2-incompatible keywords and features that can be imported via the in-built __future__ module in Python 2. It is recommended to use __future__ imports, if you are planning Python 3.x support for your code.For example, if we want Python 3.x's integer division behavior in Python 2, add the following import statement.
from __future__ import division
Python 3 - Tools/Utilities
The dis Module:
The dis module is the Python disassembler. It converts byte codes to a format that is slightly more appropriate for human consumption.Python 3 - Useful Resources
Useful Links on Python 3
- Python.org − Official Python site. Find a complete list of all documentation, installation, tutorials, news etc.
- Web Programming in Python − This topic guide attempts to cover every aspect of programming Web applications (both clients and servers) using Python.
Discuss Python 3
Python Overview
Python - Environment Setup
Local Environment Setup
Open a terminal window and type "python" to find out if it is already installed and which version is installed.- Unix (Solaris, Linux, FreeBSD, AIX, HP/UX, SunOS, IRIX, etc.)
Python Basic Syntax
First Python Program
Let us execute programs in different modes of programming.Python Variable Types
Based on the data type of a variable, the interpreter allocates memory and decides what can be stored in the reserved memory. Therefore, by assigning different data types to variables, you can store integers, decimals or characters in these variables.
Python Basic Operators
Consider the expression 4 + 5 = 9. Here, 4 and 5 are called operands and + is called operator.
Types of Operator
Python language supports the following types of operators.- Arithmetic Operators
- Comparison (Relational) Operators
- Assignment Operators
Python Decision Making
Decision structures evaluate multiple expressions which produce TRUE or FALSE as outcome. You need to determine which action to take and which statements to execute if outcome is TRUE or FALSE otherwise.
Following is the general form of a typical decision making structure found in most of the programming languages −
Python Loops
Programming languages provide various control structures that allow for more complicated execution paths.
A loop statement allows us to execute a statement or group of statements multiple times. The following diagram illustrates a loop statement −
Python Numbers
Number objects are created when you assign a value to them. For example −
var1 = 1 var2 = 10You can also delete the reference to a number object by using the del statement. The syntax of the del statement is −
Python Strings
var1 = 'Hello World!' var2 = "Python Programming"
Python Lists
Python has six built-in types of sequences, but the most common ones are lists and tuples, which we would see in this tutorial.
Python Tuples
Creating a tuple is as simple as putting different comma-separated values. Optionally you can put these comma-separated values between parentheses also. For example −
Python Dictionary
Keys are unique within a dictionary while values may not be. The values of a dictionary can be of any type, but the keys must be of an immutable data type such as strings, numbers, or tuples.
Python Date & Time
Python Functions
As you already know, Python gives you many built-in functions like print(), etc. but you can also create your own functions. These functions are called user-defined functions.
Python Modules
Simply, a module is a file consisting of Python code. A module can define functions, classes and variables. A module can also include runnable code.
Python Files I/O
Printing to the Screen
The simplest way to produce output is using the print statement where you can pass zero or more expressions separated by commas. This function converts the expressions you pass into a string and writes the result to standard output as follows −Python Exceptions Handling
- Exception Handling: This would be covered in this tutorial. Here is a list standard Exceptions available in Python: Standard Exceptions.
- Assertions: This would be covered in Assertions in Python tutorial.
Python Object Oriented
Python Regular Expressions
The module re provides full support for Perl-like regular expressions in Python. The re module raises the exception re.error if an error occurs while compiling or using a regular expression.
Python CGI Programming
What is CGI?
- The Common Gateway Interface, or CGI, is a standard for external gateway programs to interface with information servers such as HTTP servers.
- The current version is CGI/1.1 and CGI/1.2 is under progress.
Python MySQL Database Access
You can choose the right database for your application. Python Database API supports a wide range of database servers such as −
Python Network Programming
Python also has libraries that provide higher-level access to specific application-level network protocols, such as FTP, HTTP, and so on.
Python Sending Email using SMTP
Python provides smtplib module, which defines an SMTP client session object that can be used to send mail to any Internet machine with an SMTP or ESMTP listener daemon.
Here is a simple syntax to create one SMTP object, which can later be used to send an e-mail −
import smtplib
Python Multithreaded Programming
- Multiple threads within a process share the same data space with the main thread and can therefore share information or communicate with each other more easily than if they were separate processes.
- Threads sometimes called light-weight processes and they do not require much memory overhead; they are cheaper than processes.
Python XML Processing
What is XML?
The Extensible Markup Language (XML) is a markup language much like HTML or SGML. This is recommended by the World Wide Web Consortium and available as an open standard.XML is extremely useful for keeping track of small to medium amounts of data without requiring a SQL-based backbone.
Python GUI Programming (Tkinter)
- Tkinter: Tkinter is the Python interface to the Tk GUI toolkit shipped with Python. We would look this option in this chapter.
- wxPython: This is an open-source Python interface for wxWindows http://wxpython.org.
- JPython: JPython is a Python port for Java which gives Python scripts seamless access to Java class libraries on the local machine http://www.jython.org.
Python Extension Programming with C
A Python extension module is nothing more than a normal C library. On Unix machines, these libraries usually end in .so (for shared object). On Windows machines, you typically see .dll (for dynamically linked library).
Python Questions and Answers
Python Quick Guide
Python Overview:
Python is a high-level, interpreted, interactive and object oriented-scripting language.- Python is Interpreted
- Python is Interactive
- Python is Object-Oriented
- Python is Beginner's Language
Python Tools/Utilities
The dis Module:
The dis module is the Python disassembler. It converts byte codes to a format that is slightly more appropriate for human consumption.Python Useful Resources
Useful Links on Python
- Python.org − Official Python site. Find a complete list of all documentation, installation, tutorials, news etc.
Discuss Python
PyQt - Introduction
PyQt - Hello World
- Import QtGui module.
- Create an application object.
- A QWidget object creates top level window. Add QLabel object in it.
- Set the caption of label as “hello world”.
- Define the size and position of window by setGeometry() method.
- Enter the mainloop of application by app.exec_() method.
PyQt - Major Classes
| S.No. | Modules & Description |
|---|---|
| 1 |
QtCore Core non-GUI classes used by other modules |
| 2 |
QtGui Graphical user interface components |
PyQt - Using Qt Designer
Creation of a GUI interface using Qt Designer starts with choosing a top level window for the application.
PyQt - Signals & Slots
PyQt - Layout Management
setGeometry() syntax
QWidget.setGeometry(xpos, ypos, width, height)In the following code snippet, the top level window of 300 by 200 pixels dimensions is displayed at position (10, 10) on the monitor.
PyQt - QDialog Class
PyQt API has a number of preconfigured Dialog widgets such as InputDialog, FileDialog, FontDialog, etc.
PyQt - QMessageBox
Important methods and enumerations associated with QMessageBox class are given in the following table −
PyQt - Multiple Document Interface
One way to display multiple windows simultaneously is to create them as independent windows. This is called as SDI (single Document Interface). This requires more memory resources as each window may have its own menu system, toolbar, etc.
PyQt - Drag & Drop
MIME based drag and drop data transfer is based on QDrag class. QMimeData objects associate the data with their corresponding MIME type. It is stored on clipboard and then used in the drag and drop process.
PyQt - Database Handling
| Driver Type | Description |
|---|---|
| QDB2 | IBM DB2 |
| QIBASE | Borland InterBase Driver |
PyQt - Drawing API
PyQt - BrushStyle Constants
Predefined QColor Styles
| Qt.NoBrush | No brush pattern |
| Qt.SolidPattern | Uniform color |
| Qt.Dense1Pattern | Extremely dense brush pattern |
| Qt.HorPattern | Horizontal lines |
PyQt - QClipboard
QApplication class has a static method clipboard() which returns reference to clipboard object. Any type of MimeData can be copied to or pasted from the clipboard.
PyQt - QPixmap Class
Qt API has another similar class QImage, which is optimized for I/O and other pixel manipulations. Pixmap, on the other hand, is optimized for showing it on screen. Both formats are interconvertible.
The types of image files that can be read into a QPixmap object are as follows −
PyQt - Quick Guide
PyQt - Introduction
PyQt is a GUI widgets toolkit. It is a Python interface for Qt, one of the most powerful, and popular cross-platform GUI library. PyQt was developed by RiverBank Computing Ltd. The latest version of PyQt can be downloaded from its official website − riverbankcomputing.comPyQt - Useful Resources
Useful Links on PyQt
- PyQt Wiki - Wikipedia Reference for PyQt.
Discuss PyQt
Thursday, March 30, 2017
PyGTK - Introduction
PyQt is a Python port of QT library. Our PyQt tutorial can be found here. Similarly, wxPython toolkit is Python binding for wxWidgets, another popular cross-platform GUI library. Our wxPython tutorial is available here.
PyGTK - Environment
PyGTK for Microsoft Windows
The installation of PyGTK for Microsoft Windows involves the following steps −- Step 1 − Install a 32-bit Python interpreter (latest Python 2.7 distribution)
- Step 2 − Download and install GTK+ runtime.
PyGTK - Hello World
import gtkThe gtk module contains the gtk.Window class. Its object constructs a toplevel window. We derive a class from gtk.Window.
class PyApp(gtk.Window):
PyGTK - Important Classes
PyGTK - Window Class
gtk.Window class has the following constructor −
PyGTK - Button Class
The gtk.Button class has the following constructor −
gtk.Button(label = None, stock = None, use_underline = True)Wherein,
PyGTK - Label Class
Label class has a simple constructor −
PyGTK - Entry Class
Entry field can be converted in password mode using set_visibility() method of this class. Entered text is substituted by character chosen by invisible_char() method, default being '*'.
The Entry class has the following constructor −
PyGTK - Signal Handling
PyGTK - Event Handling
Some of the system events are listed below −
PyGTK - Containers
Let us now follow these steps −
PyGTK - Box Class
Child widgets in gtk.Hbox are arranged horizontally in the same row. On the other hand, child widgets of gtk.VBox are arranged vertically in the same column.
PyGTK - ButtonBox Class
PyGTK - Alignment Class
PyGTK - EventBox Class
EventBox is an invisible container that provides window to windowless widgets. It has a simple constructor without any argument −
gtk.EventBox()
PyGTK - Layout Class
- The layout widget can have infinite width and height. The maximum
value of width and height is limited by the size of unsigned integer.
PyGTK - ComboBox Class
PyGTK - ToggleButton Class
PyGTK - CheckButton Class
Constructor, methods, and signals associated with gtk.CheckButton are exactly the same as gtk.ToggleButton.
PyGTK - RadioButton Class
PyGTK - MenuBar,Menu and MenuItem
An object of the gtk.Menu class is added to the menu bar. It is also used to create context menu and popup menu. Each menu may contain one or more gtk.MenuItem widgets. Some of them can be a submenu.and have cascaded MenuItem buttons.
PyGTK - Toolbar Class
PyGTK - Adjustment Class
PyGTK - Range Class
PyGTK - Scale Class
The following methods of this abstract class are implemented by the HScale class and the VScale class −
PyGTK - Scrollbar Class
PyGTK - Dialog Class
PyGTK - MessageDialog Class
gtk.MessageDialog(parent = None, flags = 0, type = gtk.MESSAGE_INFO, buttons = gtk.BUTTONS_NONE, message_format = None)
PyGTK - AboutDialog Class
The About Dialog can contain URLs and email addresses. gtk.AboutDialog offers global hooks when the user clicks URLs and email ID
PyGTK - Font Selection Dialog
PyGTK - Color Selection Dialog
The gtk.ColorScelection widget presents a colow wheel, and entry boxes for color parameters such as HSV and RGB. New color can be selected by manipulating color wheel or entering color parameters. Its get_current_color is useful for further processing.
PyGTK - File Chooser Dialog
The following is a constructor of the gtk.FileChooserDialog class −
Dlg=gtk.FileChooserDialog (title = None, parent = None, action = gtk.FILE_CHOOSER_ACTION_OPEN, buttons = None, backend = None)The parameters are −
PyGTK - Notebook Class
PyGTK - Frame Class
A gtk.Frame object is constructed with the help of the following constructor −
frame = gtk.Frame(label = None)
PyGTK - AspectFrame Class
The ratio property of gtk.AspectFrame widget determines the widget width:height ratio. An aspect ratio of 0.5 means the width is one half the height; an aspect ratio of 2.0 means the width is twice the height. The default value for the "ratio" property is 1.0.
PyGTK - TreeView Class
- gtk.ListStore
- gtk.TreeStore
- gtk.TreeModelSort
PyGTK - Paned Class
Paned widget draws a separator slider between two panes and provides a handle to adjust their relative width/height. If the resize property of child widget inside a pane is set to True, it will resize according to the size of the panes.
PyGTK - Statusbar Class
The gtk.Statusbar widget maintains a stack of messages. Hence, new message gets displayed on top of the current message. If it is popped, earlier message will be visible again. Source of the message must be identified by context_id to identify it uniquely.
PyGTK - ProgressBar Class
When it is possible to accurately estimate how much of work is pending to be completed, the progress bar can be used in percentage mode, and the user sees an incremental bar showing percentage of completed job.
PyGTK - Viewport Class
PyGTK - ScrolledWindow Class
The following syntax is used for the constructor of the gtk.ScrolledWindow class −
sw = gtk.ScrolledWindow(hadj, vadj)The following are the methods of the gtk.ScrolledWindow class −
PyGTK - Arrow Class
Typically, Arrow object is created using the following constructor −
Arr = gtk.Arrow(arrow_type, shadow_type)The predefined arrow_type constants are −
PyGTK - Image Class
PyGTK - DrawingArea Class
PyGTK uses Cairo library for such drawing operations. Cairo is a popular 2D vector graphics library. It is written in C., although, it has bindings in most Languages such as C++, Java, Python, PHP etc. Cairo library can be used to draw on standard output devices in various operating systems. It can also be used to create PDF, SVG and post-script files.
PyGTK - SpinButton Class
PyGTK - Calendar Class
PyGTK - Clipboard Class
The following is a prototype of the gtk.Clipboard constructor −
gtk.Clipboard(display,selction)
PyGTK - Ruler Class
Ruler objects are created with their respective constructors −
hrule = gtk.Hruler() vrule = gtk.Vruler()
PyGTK - Timeout
source_id = gobject.timeout_add(interval, function, …)The second argument is the callback function you wish to have called after every millisecond which is the value of the first argument – interval. Additional arguments may be passed to the callback as function data.
The return value of this function is source_id.
PyGTK - Drag and Drop
The following steps are involved in setting up a drag-and-drop enabled application −
PyGTK - Quick Guide
PyGTK - Introduction
PyGTK is a set of wrappers written in Python and C for GTK + GUI library. It is part of the GNOME project. It offers comprehensive tools for building desktop applications in Python. Python bindings for other popular GUI libraries are also available.PyGTK - Useful Resources
Useful Links on PyGTK
- PyGTK Wiki - Wikipedia Reference for PyGTK.
Discuss PyGTK
Wednesday, March 29, 2017
PHP 7 - Introduction
What is PHP 7?
PHP 7 is a major release of PHP programming language and is touted to be a revolution in the way web applications can be developed and delivered for mobile to enterprises and the cloud. This release is considered to be the most important change for PHP after the release of PHP 5 in 2004.PHP 7 - Performance
Magento 1.9
PHP 7 proves itself more than twice as faster, as compared to PHP 5.6 while executing Magento transactions.PHP 7 - Environment Setup
Try it Option Online
We have set up the PHP Programming environment on-line, so that you can compile and execute all the available examples online. It gives you confidence in what you are reading and enables you to verify the programs with different options. Feel free to modify any example and execute it online.
PHP 7 - Scalar Type Declarations
- coercive - coercive is default mode and need not to be specified.
- strict - strict mode has to explicitly hinted.
PHP 7 - Return Type Declarations
- int
- float
- bool
- string
- interfaces
- array
- callable
PHP 7 - Null Coalescing Operator
PHP 7 - Spaceship Operator
PHP 7 - Constant Arrays
PHP 7 - Anonymous Classes
Example
<?php interface Logger { public function log(string $msg); }
PHP 7 - Closure::call()
Example - Pre PHP 7
<?php class A { private $x = 1;
PHP 7 - Filtered unserialize()
PHP 7 - IntlChar
PHP 7 - CSPRNG
- random_bytes() − Generates cryptographically secure pseudo-random bytes.
- random_int() − Generates cryptographically secure pseudo-random integers.
PHP 7 - Expectations
PHP 7 - use Statement
PHP 7 - Error Handling
PHP 7 - Integer Division
PHP 7 - Session Options
PHP 7 - Deprecated Features
PHP 4 style constructors
PHP 4 style Constructors are methods having same name as the class they are defined in, are now deprecated, and will be removed in the future. PHP 7 will emit E_DEPRECATED if a PHP 4 constructor is the only constructor defined within a class. Classes implementing a __construct() method are unaffected.PHP 7 - Removed Extensions & SAPIs
- ereg
- mssql
- mysql
- sybase_ct
PHP 7 - Quick Guide
PHP 7 - Introduction
What is PHP 7?
PHP 7 is a major release of PHP programming language and is touted to be a revolution in the way web applications can be developed and delivered for mobile to enterprises and the cloud. This release is considered to be the most important change for PHP after the release of PHP 5 in 2004.PHP 7 - Useful Resources
Useful Links on PHP
- PHP Official Website − A complete resource for PHP stuff.
- PEAR − PHP Extension and Application Repository, find a list of various useful PHP packages.
- MySQL Homepage − Here you can download the latest MySQL release.
Discuss PHP 7
PHP - Introduction
- PHP is a recursive acronym for "PHP: Hypertext Preprocessor".
- PHP is a server side scripting language that is embedded in HTML. It is used to manage dynamic content, databases, session tracking, even build entire e-commerce sites.
PHP - Environment Setup
Try it Option Online
We have set up the PHP Programming environment on-line, so that you can compile and execute all the available examples on line. It gives you confidence in what you are reading and enables you to verify the programs with different options. Feel free to modify any example and execute it on-line.
PHP - Variable Types
Here are the most important things to know about variables in PHP.
- All variables in PHP are denoted with a leading dollar sign ($).
- The value of a variable is the value of its most recent assignment.
- Variables are assigned with the = operator, with the variable on the left-hand side and the expression to be evaluated on the right.
PHP - Constants Types
PHP - Operator Types
- Arithmetic Operators
- Comparison Operators
- Logical (or Relational) Operators
- Assignment Operators
- Conditional (or ternary) Operators
PHP - Decision Making
You can use conditional statements in your code to make your decisions. PHP supports following three decision making statements −
Tuesday, March 28, 2017
PHP - Loop Types
- for − loops through a block of code a specified number of times.
- while − loops through a block of code if and as long as a specified condition is true.
- do...while − loops through a block of code once, and then repeats the loop as long as a special condition is true.
Sunday, March 26, 2017
PHP - Arrays
There are three different kind of arrays and each array value is accessed using an ID c which is called array index.
PHP - Introduction
- PHP is a recursive acronym for "PHP: Hypertext Preprocessor".
- PHP is a server side scripting language that is embedded in HTML. It is used to manage dynamic content, databases, session tracking, even build entire e-commerce sites.
PHP - Environment Setup
Try it Option Online
We have set up the PHP Programming environment on-line, so that you can compile and execute all the available examples on line. It gives you confidence in what you are reading and enables you to verify the programs with different options. Feel free to modify any example and execute it on-line.
PHP - Syntax Overview
Escaping to PHP
The PHP parsing engine needs a way to differentiate PHP code from other elements in the page. The mechanism for doing so is known as 'escaping to PHP'. There are four ways to do this −PHP - Variable Types
Here are the most important things to know about variables in PHP.
- All variables in PHP are denoted with a leading dollar sign ($).
- The value of a variable is the value of its most recent assignment.
PHP - Constants Types
PHP - Operator Types
- Arithmetic Operators
- Comparison Operators
- Logical (or Relational) Operators
- Assignment Operators
- Conditional (or ternary) Operators
PHP - Decision Making
You can use conditional statements in your code to make your decisions. PHP supports following three decision making statements −
PHP - Loop Types
- for − loops through a block of code a specified number of times.
- while − loops through a block of code if and as long as a specified condition is true.
- do...while − loops through a block of code once, and then repeats the loop as long as a special condition is true.
PHP - Strings
NOTE − Built-in string functions is given in function reference PHP String Functions
Following are valid examples of string
PHP - Web Concepts
Identifying Browser & Platform
PHP creates some useful environment variables that can be seen in the phpinfo.php page that was used to setup the PHP environment.PHP - GET & POST Methods
- The GET Method
- The POST Method
name1=value1&name2=value2&name3=value3
PHP - File Inclusion
- The include() Function
- The require() Function
PHP - Files & I/O
- Opening a file
- Reading a file
- Writing a file
- Closing a file
PHP - Functions
You already have seen many functions like fopen() and fread() etc. They are built-in functions but PHP gives you option to create your own functions as well.
PHP - Functions
You already have seen many functions like fopen() and fread() etc. They are built-in functions but PHP gives you option to create your own functions as well.
PHP - Cookies
There are three steps involved in identifying returning users −
PHP - Sessions
A session creates a file in a temporary directory on the server where registered session variables and their values are stored. This data will be available to all pages on the site during that visit.
The location of the temporary file is determined by a setting in the php.ini file called session.save_path. Before using any session variable make sure you have setup this path.
When a session is started following things happen −
PHP - Sending Emails using PHP
Windows users should ensure that two directives are supplied. The first is called SMTP that defines your email server address. The second is called sendmail_from which defines your own email address.
The configuration for Windows should look something like this −
PHP - File Uploading
Information in the phpinfo.php page describes the temporary directory that is used for file uploads as upload_tmp_dir and the maximum permitted size of files that can be uploaded is stated as upload_max_filesize. These parameters are set into PHP configuration file php.ini
PHP - Coding Standard
PHP - Predefined Variables
All the following variables are automatically available in every scope.
PHP - Regular Expressions
Using regular expression you can search a particular string inside a another string, you can replace one string by another string and you can split a string into many chunks.
PHP - Error & Exception Handling
Its very simple in PHP to handle an errors.
PHP - Bugs Debugging
PHP - Date & Time
Getting the Time Stamp with time()
PHP's time() function gives you all the information that you need about the current date and time. It requires no arguments but returns an integer.PHP & MySQL
What you should already have ?
- You have gone through MySQL tutorial to understand MySQL Basics.
- Downloaded and installed a latest version of MySQL.
PHP & MySQL
What you should already have ?
- You have gone through MySQL tutorial to understand MySQL Basics.
- Downloaded and installed a latest version of MySQL.
PHP & AJAX
What is AJAX ?
- AJAX stands for Asynchronous JavaScript and XML. AJAX is a new technique for creating better, faster, and more interactive web applications with the help of XML, HTML, CSS and Java Script.
- Conventional web application transmit information to and from the
sever using synchronous requests. This means you fill out a form, hit
submit, and get directed to a new page with new information from the
server.
PHP & XML
- XML doesn't define a specific set of tags you must use.
- XML is extremely picky about document structure.
Object Oriented Programming in PHP
PHP For C Developers
PHP For PERL Developers
PHP - Form Introduction
Dynamic Websites
The Websites provide the functionalities that can use to store, update, retrieve, and delete the data in a database.What is the Form?
A Document that containing black fields, that the user can fill the data or user can select the data.Casually the data will store in the data basePHP - Validation Example
What is Validation ?
Validation means check the input submitted by the user. There are two types of validation are available in PHP. They are as follows −PHP - Complete Form
Example
<html> <head> <style> .error {color: #FF0000;} </style>