Author Archive

Preserve and Add Edge & Node Level Attributes in Networkx Diagraph

If you are looking for a way to add the node and edge level attribute to contain basic data properties to use it while processing and developing the graph algorithms. This piece of code is for you. Find below the python code that elaborated how to add node and edge level attributes. import networkx as

Introduction of Web and PHP & Mysql part 1

Introduction of Web and PHP & Mysql In this series of articles we will look into basics of world wide web (commonly know as WWW) and then Php & Mysql. We will work on real world examples and APIs. So let us start. Before diving into world of web development we need to know some

Pagination example in Php Yii Framework

Pagination example in Php Yii Framework While working we need to perform pagination.  Whether to show the list of articles, users or products, we need pagination. In Yii it is very easy to implement pagination. function actionSearch(){ $criteria = new CDbCriteria(); $count=Article::model()->count($criteria); $pages=new CPagination($count); // results per page $pages->pageSize=10; $pages->applyLimit($criteria); $models = Post::model()->findAll($criteria); $this->render('index', array( 'models'

Include JavaScript and CSS file in Yii Framework

Include JavaScript and CSS file in Yii Framework While working on a project in YII in beginning I came to know a very nice way of including JavaScript and CSS style files in the Layout / View file  in YII Framework. In YII we use clientScript->registerCoreScript and clientScript->registerCssFile functions. Please see the code below. <?php

MySQL, add a string in start of all column values

MySQL,  add a string  in start of all column values Recently I come  to know a very cool function in mysql that is CONCAT.   There  is a table in mysql database known as tbl_clients.  Structure of this table is as follows: tbl_clients id int(11) auto_increment, P.K client_name varchar(500) . . . . website varchar(500) there

Insert a document using NodeJs and mongoDB

Insert a document using Node.js and mongoDB Suppose  you have a mongoDB database for courses and you want to insert a record into the database using Node.js. First step is to install mongoDB driver for Node.js  If it is not already installed. Please open command line and run following command. > npm install mongodb This

NodeJs and Express framework basics

NodeJs and Express framework  basics We have already learned how to select data from MongoDb using Nodejs findOne. In this article we will create a baisc Hello World program using NodeJs and Express. Consider a following program below. var express = require('express'), app = express(); app.get('/', function(req, res) { res.send("Hello World!"); }); app.get('*', function(req, res)

Node Js, MongoDb select record with findOne

Node Js, MongoDb select record with findOne To select a single record from mongoDB database using  findOne() function  in Node Js var MongoClient = require('mongodb').MongoClient; //Open the connection to server MongoClient.connect('mongodb://localhost:27017/test', function(err, db){ if(err) throw err; db.collection('people').findOne({}, function(err, doc){ if(err) throw err; console.log(doc); db.close(); }); console.dir("Called findOne"); }); In the code below we use require

Angular Js – Introduction

Angular Js – Introduction Angular Js is very popular JavaScript Framework. We can say it a futuristic web standard for web development. It is developed and supported by Google and has a huge vibrant community of users. Angular is in class of frameworks that are called Data Bindings Frameworks. These data bindings frameworks are used

New features in PHP 5.6

New features in PHP 5.6 There are some very exciting features  in PHP 5.6 release. In this article we will look into new features introduced in PHP 5.6. File Upload Limit: Before PHP 5.6 upload limit was less then 2 GB but in PHP 5.6 uploads over 2GB are supported. Variadic Functions: Varidaic functions are