Posts

Showing posts with the label Hello World

WCF Service Creation With C#

Image
CodeProject Basic WCF Service Creation in C#.Net => Part1 Hello All, this is the start up guide to create WCF service. This article is a pictorial step by step help to create WCF application. WCF (Windows Communication Foundation) is a part of .Net 3.0. So you need to install Visual Studio 2008 to use WCF. It is platform for SOA. WCF provides a way to create loosely coupled application. WCF is intended to provide services that are distributed and interoperable. It unifies ASMX and .NET Remoting, MSMQ and can be easily extended to support new protocol. When we create a Service, to expose the functionality to the world, it needs to be hosted into Host Process. Service Host will be used to expose the end point of the service to other Service or Clients. Let’s start with the steps... We will start with VS 2008. Create a File -> New Project -> WCF ->WCFClassLibrary project as shown below Select WCF in left panel and WCF Service Library in...

Getting Started With ForkJoinPool - Map & Reduce of Java

CodeProject ForkJoinPool - Java's Map & Reduce ForkJoinPool ::FJP is a executor service for Fork-Join Taks or tasks which can computed using divide and conqor or we can say FJP is inbuild Map & Reduce framework in Java.                FJP implements work-steal so all threads try to find and execute task submitted by other tasks in FJP or external program. FJP try to maintain active threads as per number of processor available.   FJP provides below methods to submit task ::==> Call Type External Task Clients i.e. main method Inner Task Divide and Conquer Calls Call from non-fork/join clients  Call from within fork/join computations Arrange async execution  execute(ForkJoinTask)  ForkJoinTask.fork() Await and obtain result  invoke(ForkJoinTask)  ForkJoinTask.invoke() Arrange exec and obtain Future  submit(ForkJoinTask...

My 1st Haskell Program

From past few days I was thinking to do something in Haskell. Gone though few blogs and also tried my hands on tryhaskell only Haskell interactive tutorial. It was way different then my bread & butter Java. So wasn't able to understand much. And now was feeling to write a factorial program in Haskell. My first experiment with Haskell.  Downloaded Haskell from here Now Install Haskell similar the way you installed millions of software. Haskell itself update %PATH% variable so you are not ready to rock and roll in Haskell. Haskell comes with ghci, ghc and runhaskell utilities to interpret, compile or run haskell programs. ghci provide haskell prompt where you can execute haskell statements on the fly. ghc is haskell compiler which compile haskell program and produce an exe on successful compilation. runhaskell utility run haskell program on the fly. Below is mine 1st real haskell program Line 1 Prototype of factorial function. Line 2 Body of factorial program...

Hello Vertx Javascript

Everyone is talking about node.js but another new kid in town is vert.x which is similar in nature to node (talking in terms of javascript server side programming). So today we will write Hello World in vertx.    Steps ::  Click  here  to download vertx or go to vertx home page here Create environment variable VERTX_HOME with value as extracted vertx directory Add %VERTX_HOME%\bin to %PATH% Now you are ready to code. Here is the code load('vertx.js') //Configure Vertx server to listen on port 8080 for incoming http requests vertx.createHttpServer().requestHandler(function(req) {   req.response.end("<html><body><h1>Hello from vert.x!</h1></body></html>"); }).listen(8080, 'localhost'); stdout.println("Server is running on " + "http://127.0.0.1:8080"); Save above code as server-helloworld.js Start node server as >vertx  run server-helloworld.js Server is running o...

Starting With Node on Windows - Part2

In last post   we start with node on windows and create a simple console based "Hello World" program in node. But node is designed to serve on HTTP protocol so today we will write our 1st server side node program. Here is the code //Load http module required for http protocol communications var http = require('http'); //Configure http server to respond all request with Hello World From Node Server var server = http.createServer(function (request, response) { response.writeHead(200, {"Content-Type": "text/plain"}); response.end("Hello World From Node Server\n"); }); // Listen on port 8080, IP defaults to 127.0.0.1 server.listen(8080); // Put a friendly message on the terminal console.log("Server running at http://127.0.0.1:8080/"); Save above code as server-helloworld.js Start node server as >node server-helloworld.js Server running at http://127.0.0.1:8080/ Now go to http://127.0.0.1:8080/  ...

Starting With Node on Windows

Hello World is good way to go with any new language/framework in programming world. Today we will start with Node.js which takes javascript to server side. Setup      1. Download Node from  here      2. Add a new environment variable NODE_HOME and also add this variable in windows PATH Thats all! Now you are ready to rock and roll. Hello World - Console console.log("Hello World"); Save this line as Hello-colsole.js Run it from windows command line >node Hello-cosole.js Hello World