content top

Watching a directory for files event in python

Watching a directory for files event in python

watchdog is a python package uses to notify linux kernel subsystem to watch for any changes to the filesystem. This is very handy package Lets create a watcher using watchdog and save information to DB when any event occur. 1. Firstly I will write watcher class which look like import time import psycopg2 from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler class Watcher: DIRECTORY_TO_WATCH =...

Read More

Create date-range selector with angularjs directives

Create date-range selector with angularjs directives

Directives are most important components in angularjs application. Although Angularjs ships wide range of directives. But sometimes you will need to create your custom directives. So, Lets started a very important directive ‘Date-Range-Selector’ directives. we will use bootstrap daterangepicker, momentjs So, lets start custom directives angular.module(‘app’). .directive(‘dateRange’, function() { return {...

Read More

Soap server authentication using nusoap

Soap server authentication using nusoap

Problem scenario: You want to create a secure soap server with nusoap library. In the nusoap library there is no better way to make authentication Efficient solved scenario: There is 2 way to make authentication 1. You may create a custom function which works for authentication and you need to pass username and password in every call 2. You may send authentication data in soap header. All time you process the username and password data...

Read More

Create a socket server in php and run as a service

Create a socket server in php and run as a service

Problem scenario: Suppose you have a ecommerce site where customer can put an order. Then site will be notify you via sms or any device when new order found Efficient Solved scenario: You have to build a socket sever which check the new order and response you, then you will collect the new order from your e-commerce site Prerequisites PHP Sockets library. The extension is enabled at compile time using the –enable-sockets configure...

Read More

widget create in a miniute

widget create in a miniute

in wordpress you can create your widget in a simple manner, the process is so simple given below the widget plugins name is “widget-test”. you can modified that as your need /* Plugin Name: widget-test */ ##never forget this function configuration ##never forget add $before_widget,$before_title, $after_title and $after_widget ## example given below function widget_test($args) { extract($args); echo...

Read More
content top