PHP DataGrid v.1.x.x

6:45:00 AM

PHP DataGrid v.1.x.x

To download version 1.1.1 click here.

This version changes:

 - fixed bugs in getHeaderName()

 - fixed bugs in noDataFound()

 - fixed bugs in setColumnsInViewMode()

 - fixed bugs in combine_url()

 - fixed bugs in setCssClass()

To download version 1.1.0 click here.

PHP DataGrid document for version 1.x.x 

1. System Requirements

PHP DataGrid is operating system independent. You get it works on both Linux and 


Examples of code PHP DataGrid v.1.x.x

6:43:00 AM

Examples of code PHP DataGrid v.1.x.x

In datagrid.class file you can find commented lines of how to create, call and work with this class. 

All you need is to copy all commented lines of the code into you page and uncomment some lines. That's all!

Now we'll check this example to get you understanding how it works.

For example, we have a database (mySQL) with 3 tables:

country 

   CountryID

   RegionID

   Name

   Description

   Population

   PictureURL

   democraty

regions

   RegionID

   Name

democracy

   did

   description

// creating variables that we need for database connection 


PHP DataGrid Version Comparison

6:42:00 AM

PHP DataGrid Version Comparison

This is a general version comparison for PHP DataGrid class: 

Ver. 1.x.xVer. 2.x.xVer. 3.x.xVer. 4.x.x CSS emb.templatesYesYesYesYes Column sortingYesYesYesYes FilteringNoYesYesYes PaggingYesYesYesYes ExportingNoNoNoYes PrintingNoNoNoYes Automatic validationNoNoYesYes -- Client sideNoNoYesYes -- Server sideNoNoNoNo View modeYesYesYesYes -- Tabular layoutYesYesYesYes -- Columnar layoutYesYesYesYes Details modeNoYesYesYes -- Columnar layoutNoYesYesYes Add new modeNoNoYesYes -- Tabular layoutNoNoYesYes -- Columnar layoutNoNoYesYes Edit modeNoNoYesYes -- Tabular layoutNoNoYesYes -- Columnar layoutNoNoYesYes Delete modeNoNoYesYes Multi-Database supportNoNoNoYes Multi-Language supportNoNoNoYes Multi-Browser supportNoNoNoYes W3C CSS validationNoNoNoYes WYSIWYG editorNoNoNoYes

Getting Started PHP

6:39:00 AM

Getting Started PHP

PHP DataGrid - Step by Step.

Step 1.

| Creating & Calling:

Be sure you write here a true path to the datagrid.class.php file, relatively to this file.

require_once('datagrid/datagrid.class.php');

Write true values to these variable. Be sure you use a prefix if you need it. 

## *** creating variables that we need for database connection 

$DB_USER='name'; /* usually like this: prefix_name */

$DB_PASS=''; /* must be already enscrypted (recommended) */

$DB_HOST='localhost'; /* usually localhost */

$DB_NAME='dbName'; /* usually like this: prefix_dbName */


Installation

6:36:00 AM

Installation

PHP DataGrid - Step by Step.

NEW INSTALLATION (for version 3.x.x or above)

Step 1.

Upload the code_template.php file and folder named "datagrid" (with all files it includes) to your document root (public_html, www, htdocs etc.) using FTP. 

For example:

public_html/your_site/code_template.php

public_html/your_site/datagrid

Step 2.

Using phpMyAdmin or another tool, create your database and user, 

and assign that user to the database. Write down the name of the database, 

username, and password for this database for the database installation 

procedure. 


Covariance and Contravariance in C++ Standard Library

10:56:00 AM

Covariance and Contravariance in C++ Standard Library

Covariance and Contravariance are concepts that come up often as you go deeper into generic programming. While designing a language that supports parametric polymorphism (e.g., templates in C++, generics in Java, C#), the language designer has a choice between Invariance, Covariance, and Contravariance when dealing with generic types. C++'s choice is "invariance". Let's look at an example.

struct Vehicle {}; struct Car : Vehicle {}; std::vector<Vehicle *> vehicles; std::vector<Car *> cars; vehicles = cars; // Does not compile The above program does not compile because C++ templates are invariant. Of course, each time a C++ template is instantiated, the compiler creates a brand new type that uniquely represents that instantiation. Any other type to the same template creates another unique type that has nothing to do with the earlier one. Any two unrelated user-defined types in C++ can't be assigned to each-other by default. You have to provide a copy-constructor or an assignment operator.


CppCon'15 and Silicon Valley Code Camp Presentations

11:29:00 AM

CppCon'15 and Silicon Valley Code Camp Presentations

In last couple of months I did a couple of presentations about my recent projects in C++. Session videos, slides, and code for all the presentations are now available online. Both projects have functional programming at their heart. I've found exploring functional programming in modern C++ quite a fun ride. Without further ado, here's the content