Posts

Spring Data Reactive MongoDb :: Date Aggeration with Timezone

A short example on how to aggravate by date with a different timezone using Spring Data Reactive Mongodb. Code Snippet on github public Flux getHourlyReport() { DateOperators.Timezone timezone = DateOperators.Timezone.valueOf("America/New_York"); Aggregation aggregation = Aggregation.newAggregation(Aggregation.project() .and(DateOperators.Hour.hour("$tweet.createdAt") .withTimezone(timezone)) .as("hour") , Aggregation.group("hour").count().as("sum")); Flux data = this.mongoTemplate.aggregate(aggregation, "realTweets", Map.class); return data; }

SSIS Package : Export Data from Database, Daily to New Excel Without Using Script Task

Image
Export data from database to excel sheet with new excel per day SSIS => SQL Server Integration Services, is used for ETL (Extract, Transform and Load) type of work. It is advanced version of DTS we can say. Here we can schedule packages as jobs and it will execute without human intervention. In this article we will export the data from SQL database table to excel sheet day wise. To start with this you will need to install SQL Server 2008 with BIDS (Business Intelligence Development Studio) Now moving forward the first step would be go to File => New Project => Select “Business Intelligence Projects” from left panel and “Integration Service Project” from right panel. Give proper name and save at desired location. On OK click, it will open Package.dtsx. Create a Template folder somewhere on your hard drive. In that folder create a sample excel with just the headers that you want in the final excel. We will use this template to create new excel every day ...

Introduction to Haskell

What is Haskell? In short Haskell is yet another computer programming language. Haskell is named after Haskell Brooks Curry, a mathematician whose work is a foundation for all functional programming languages. Haskell is a polymorphically statically typed, lazy, purely functional language, way different from other biggies of current programming languages. What is Functional Languages? Haskell is a functional language. F unctional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast to the imperative programming style, which emphasizes changes in state. Why to Learn Haskell?   Haskell is very different language then currently popular languages like Java, C#, PHP, JavaScript or C++. And switch is very smooth in between these. In my internship I started working on C++ and there only I switched to Java without any learning ...

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...

What Firefox Users Want

Firefox was 1st choice of all techy guys before chrome and still it have a large user base and people love it. Still there are few things which users demands in Firefox from other browsers.    Here is the list what Firefox users wants This extension and separate/concurrent private browsing tabs and/or windows (Opera has private browsing tabs, which in my opinion are really useful). - by morally_bankrupt77 In Chrome you can have both private and normal session together but in Firefox starting private session suspend normal session and vice varsa. Dont know why private browsing is not implemented that way. - by dvgaba Auto-add of search engines and accessing them using tab in the awesome bar. When I visit amazon.com in chrome and search for something, and then the next time I open up a tab and start typing amazon.com, there is this option to hit tab and then search within amazon, without having to go to the page first. That is by far one of the things I miss the...

Firefox and great add-ons

Image
Firefox is a great browser to have as your default browser. Great speed, security and always one step ahead in innovation. And Mozilla itself takes a deep interest in users privacy and usability. Feature like "Do Not Track" and BrowserId are created for users.  Chrome is a decent browser but its a wrapper on webkit only where Firefox is true innovation and real product. Google created Chrome/Android keeping there ads business in mind. In terms of speed Firefox and Chrome are very close to each other but in terms of add-ons Firefox knockout Chrome. Install Firefox is you want innovation in browsers and you dont want to be tracked by Big "G".  And IE dont have anything to be compared with Firefox/Chrome as its a dead browsers and MS even dont roll new versions to Old versions for there own Old Windows OS.  Noscript - Best Add-on to have in your kitty. Want to know why then better try it today. Feel little annoying in starting but trust me it worth the headach...

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...