Get last and current quarter in javascript

function getQuarter(id) {
var d = new Date();
var quarter = Math.floor((d.getMonth() / 3));

switch (id) {
case "Current":
var firstDate = new Date(d.getFullYear(), quarter * 3, 1);
var endDate = new Date(firstDate.getFullYear(), firstDate.getMonth() + 3, 0);
break;
case "Previous":
var firstDate = new Date(d.getFullYear(), quarter * 3 - 3, 1);
var endDate = new Date(firstDate.getFullYear(), firstDate.getMonth() + 3, 0);
break;
}
}

 

JSON date to Date object – javascript

While working with web services or API with json return, we will get date values in different format, we can’t use this as is where required.

To convert to date object we need to extract integer value and then pass to Date object, below example shows how to get valid date object.

[javascript]
var json = “/Date(-1827639000000)/”
var mytime = new Date(parseInt(json.replace(“/Date(“, “”).replace(“)/”,””), 10));
alert(mytime);
alert(mytime.toUTCString());

[/javascript]

.NET Framework overview and version history

The .NET framework is a Microsoft robust technology that support to build and run next generation of applications on desktop and mobiles devices. This consist of the common language runtime (CLR) and framework class library.
The CLR is the foundation of the .NET framework, it provides core services like memory management, process management, threads management, remoting, code accuracy, code safety, compilation, security of data and robustness and other system services.
The class library is an object oriented collection of reusable types that we can use to develop user friendly, command line application using windows or web forms.

.NET framework can be install on any Microsoft windows OS i.e. Windows XP and later OS. It also requires minimum configuration which is available globally.
Processor 1GHz, RAM 512 MB, Minimum free HDD space 5GB.

The following table shows version history and correlates each version with visual studio, operating system. Each new version retain features from the previous version. With .NET Framework CLR also have its own version numbers. All the details described in the table describe below.

.Net Version Released Date CLR Version Features Visual Studio Supported Operating Systems
4.6.1 ?2015-11-17 ?4.0

Support for X509 certificates containing ECDSA

Always Encrypted support for hardware protected keys in ADO.NET

Spell checking improvements in WPF

?2015 Update 1 ?7,8,8.1, 10, Server 2008, 2008 R2, 2012, 2012 R2
4.6 ?2015-07-20 ?4.0

Compilation using .NET Native

Introduced RyuJIT, a new JIT compiler for 64-bit systems

Introduced Open Source .Net Framework Packages

Support for Code page encodings

Improvements to event tracing

?2015 ?7,8,8.1, 10, Server 2008, 2008 R2, 2012, 2012 R2
4.5.2 ?2014-05-05 ?4.0

New APIs for transactional systems and ASP.NETSystem DPI resizing in Windows Forms controls

Profiling improvements

ETW and stress logging improvements

?- ?7,8,8.1, 10, Server 2008, 2008 R2, 2012, 2012 R2
4.5.1 ?2013-10-17 ?4.0

?Additional performance improvements

Support for automatic binding redirection

Expanded support for Store apps

?2013 ?7,8,8.1, 10, Server 2008, 2008 R2, 2012, 2012 R2
4.5 ?2012-08-15 ?4.0

Support Windows Store apps

More updates in WCF, WPF

Asynchronous file operation

Improvement in parallel computing

?2012 ?7,8,8.1, 10, Server 2008, 2008 R2, 2012, 2012 R2
4.0 ?2010-04-12 ?4.0

Parallel Computing

Networking

Cross Platform development

Code Contracts

Background garbage collection

?2010 ?7,8,8.1, 10, Server 2008, 2008 R2, 2012, 2012 R2
3.5 ?2007-11-19 ?2.0

AJAX Support

LINQ
Dynamic Data

?2008 ?7,8,8.1, 10, Server 2008, 2008 R2
3.0 ?2006-11-06 ?2.0

WCF

WPF

Card Space

?Added Blend ?Vista, Server 2008, 2008 R2
2.0 ?2005-11-07 ?2.0

64bit Support

ACL Support

Remoting

Generics Classes

FTP Support

?2005 ?XP, Server 2003, 2008, 2008 R2
1.1 ?2003-04-24 ?1.1

?.NET Compact Framework

ADO.NET and .NET Framework security
More updates in asp.net

?2003 ?XP , Server 2003
1.0 ?2002-02-13 ?1.0 Initial version of the .NET Framework ?Visual Studio .NET ?XP

How to crop images using Jquery

Recently I came across a business requirement where users can upload photo’s and resize them best to fit in the UI. I done done goggling to and found a jquery plugin which can integrate in all web applications easily.

This plugin named in jCrop.