Skip to main content

Posts

Using a SOAP service as DLL

By default, when you do an Add Service Reference operation, the WCF runtime will generate the client-side proxy for you. The simplest way to use it is to instantiate the client proxy with a constructor that takes no parameters, and just grab the info from the app.config : YourServiceClient proxy = new YourServiceClient(); This requires the config file to have a <client> entry with your service contract - if not, you'll get the error you have. But the client side proxy class generated by the WCF runtime also has additional constructors - one takes an endpoint address and a binding, for instance: BasicHttpBinding binding = new BasicHttpBinding(); binding.Security.Mode = BasicHttpSecurityMode.Transport;  EndpointAddress epa = new EndpointAddress("http://example.com/api/?wsdl"); YourServiceClient proxy = new YourServiceClient(binding, epa); With this setup, no config file at all is needed - you're defining everything in code. Of course, you can also s...

NodeJs Quick File Server

Installation $ npm install finalhandler API var finalhandler = require(‘finalhandler’); Example var http = require('http'); var finalhandler = require('finalhandler'); var serveStatic = require('serve-static'); var serve = serveStatic("./"); var server = http.createServer(function(req, res){ var done = finalhandler(req, res) serve(req, res, done) }); server.listen(8000); API Details

MYSQL Incremental Backup

Blogs by Others: http://www.sqlpronews.com/2010/0511.html http://mossiso.com/2012/07/24/backing-up-mysql-with-replication-and-incremental-files-part-1.html http://clean-clouds.com/2012/03/22/1785/ Leading Authority on MYSQL backups: http://www.xaprb.com/blog/?s=incremental+backup Different Methods: http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html QUESTIONS TO ASK BEFORE ADOPTING A TECHNIQUE: http://www.mysqlperformanceblog.com/2009/03/03/10-things-you-need-to-know-about-backup-solutions-for-mysql/ Questions on stackoverflow: http://stackoverflow.com/questions/4411057/how-to-do-a-incremental-backup-in-mysql Example Implementation: http://standish.home3.org/mysql-backup Cautions and Dangers: http://www.mysqlperformanceblog.com/2009/05/14/why-mysqls-binlog-do-db-option-is-dangerous/ Commands: http://linuxcommand.org/man_pages/mysqldump1.html http://dev.mysql.com/doc/refman/5.1/en/mysqlbinlog.html Must Knows: http://dev.mysql.com/doc/r...

PHP Design Patterns

Resources: Wikipedia has a good article on design patterns. The C2 Wiki is another good place to look for information about design patterns like observer , singleton , and more. The original Design Patterns book is a must-read for any engineer. O'Reilly's Head First Design Patterns is a lighter-weight way to get into design patterns. The book PHP Hacks has several hacks for design patterns that extend beyond the examples shown here. See the developerWorks article " Five more PHP design patterns " to learn about five additional design patterns that you

Database migrations using DbDeploy & Phing

Install Phing The best way to download and install phing is using PEAR . This can be done on Linux or Windows assuming you have the pear script in your PATH with three shell commands. shell> pear channel-discover pear.phing.info shell> pear config-set preferred_state beta shell> pear install [--alldeps] phing/phing Example Application structure As an example, we’re going to develop a simple application with the following directory structure. example/ |-- db/ | `-- deltas/ |-- deploy/ | `-- scripts/ |-- library/ `-- public/ The db directory contains sql files for using and manipulating our database and the deploy directory contains our build scripts that set the migrations in motion. The library directory contains our application code and the public folder will contain scripts and files accessible directly from the web, but will not be the focus of this article. Build scripts This section shows you how to develop the build scripts that will run ...

Useful Links for the Month

As a Dev, Every day we come across some interesting links. I will be jotting down such interesting links every week with the tag " Useful Links " 15 surefire ways to speed up your website CSS3 vs CSS HTML5 standards 8 Current Technologies That Will Shape Our Future Making Facebook Self Healing Scribe - server for aggregating streaming log data   HTTrack - Website Copier