Saturday, 21 May 2016

Convert Date Format To dd/mm/yy in Sql Server


If you Mssql Server is Using Some Other Date Format For Insert Date in Date Column Then Possibly Default Date format is set to US Date Format ( mm/dd/yy ) and if you want to insert date in dd/mm/yy . In order to insert date in this format you need to set Date Format to French / British ( dd/mm/yy )

So first I recommend you to Use any of Jquery Date Picker and pass the selected date / datetime as below to Insert Query as Below -

insert Table_Name (Date_Column)  values (convert(datetime,'18-06-12 10:34:09 PM',103));

Here second parameter 103 is For French Date Format dd/mm/yyyy .If you want to have dd/mm/yy then use 3 in that parameter

Different Types of Date Format Code as As Below - 

Without century (yy) (1)With century (yyyy)StandardInput/Output (3)
-0 or 100 (1,2)Default for datetime and smalldatetimemon dd yyyy hh:miAM (or PM)
1101U.S.1 = mm/dd/yy

101 = mm/dd/yyyy
2102ANSI2 = yy.mm.dd

102 = yyyy.mm.dd
3103British/French3 = dd/mm/yy

103 = dd/mm/yyyy
4104German4 = dd.mm.yy

104 = dd.mm.yyyy
5105Italian5 = dd-mm-yy

105 = dd-mm-yyyy
6106 (1)-6 = dd mon yy

106 = dd mon yyyy
7107 (1)-7 = Mon dd, yy

107 = Mon dd, yyyy
8108-hh:mi:ss
-9 or 109 (1,2)Default + millisecondsmon dd yyyy hh:mi:ss:mmmAM (or PM)
10110USA10 = mm-dd-yy

110 = mm-dd-yyyy
11111JAPAN11 = yy/mm/dd

111 = yyyy/mm/dd
12112ISO12 = yymmdd

112 = yyyymmdd
-13 or 113(1,2)Europe default + millisecondsdd mon yyyy hh:mi:ss:mmm(24h)
14114-hh:mi:ss:mmm(24h)
-20 or 120 (2)ODBC canonicalyyyy-mm-dd hh:mi:ss(24h)
-21 or 121 (2)ODBC canonical (with milliseconds) default for time, date, datetime2, and datetimeoffsetyyyy-mm-dd hh:mi:ss.mmm(24h)
-126 (4)ISO8601yyyy-mm-ddThh:mi:ss.mmm (no spaces)

Note: When the value for milliseconds (mmm) is 0, the millisecond value is not displayed. For example, the value '2012-11-07T18:26:20.000 is displayed as '2012-11-07T18:26:20'.
-127(6, 7)ISO8601 with time zone Z.yyyy-mm-ddThh:mi:ss.mmmZ (no spaces)

Note: When the value for milliseconds (mmm) is 0, the milliseconds value is not displayed. For example, the value '2012-11-07T18:26:20.000 is displayed as '2012-11-07T18:26:20'.
-130 (1,2)Hijri (5)dd mon yyyy hh:mi:ss:mmmAM

In this style, mon represents a multi-token Hijri unicode representation of the full month's name. This value will not render correctly on a default US installation of SSMS.
-131 (2)Hijri (5)dd/mm/yyyy hh:mi:ss:mmmAM

Evolution of Javascript To Jquery To AngularJS


Today’s starting programmers mostly directly dive into Jquery / angularjs , Programmers of last decade started with javascript . and Now Angularjs is on hike .

See whenever a WebPage is opened , JS / Jquery / AngularJS Code is on Client Side So Amount of Code is adds to Page will Increase Request Time .

We Use Javascript Before Jquery , Different types of Sliders , Dom Manipulations were done with lot of Javascript code like using But After Jquery We took a Relief for many things as below
Lines of Code Decides Lifeline of App as below -

Javascript -
Function changeBachground(color) {
  Document.body.style.background = color;
}
Onload=”changeBackground (‘red’);”

Jquery 
$ (‘body’) .css (‘background’, ‘#ccc’);

So Simple if we can achieve something easily with less code why we will not adopt it 
Then AngularJS Came that is a complete MVC Framework . It is also Javascript Framework . So whatever you do with AngularJS you can also achieve with Javascript . But Why you need to it start it from scratch you can join angularjs repository to propose some solid changes to it and extend it if you strongly need as doing everything you need to do in a website using javascript doesn’t look good idea .

JAVASCRIPT CODE

Characters: 700

Lines of JavaScript: 13
<!DOCTYPE html>
<html>
  <body>
    <h1>Hello World with pure JavaScript</h1>
    Write some text in textbox:
    <input id="hello-input" type="text" />
    <h2 id="hello-output">Hello </h2>

    <script>
      var inputField = document.getElementById('hello-input');
      var label = document.getElementById('hello-output');

      var handleKeyup = function() {
        var value = inputField.value;
        label.innerHTML = 'Hello ' + value;
      }

      if (document.addEventListener) {
        document.addEventListener('keyup', handleKeyup);
      } else if (document.attachEvent) {
        document.attachEvent('keyup', handleKeyup);
      }
    </script>
  </body>
</html>

JQUERY

Characters: 529
Lines of JavaScript: 7
<!DOCTYPE html>
<html>
  <body>
    <h1>Hello World with jQuery</h1>
    Write some text in textbox:
    <input id="hello-input" type="text" />
    <h2 id="hello-output">Hello </h2>

    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
    <script>
      var inputField = $('#hello-input');
      var label = $('#hello-output');

      inputField.on('keyup', function() {
        var value = inputField.val();
        label.html('Hello ' + value);
      });
    </script>
  </body>
</html>

ANGULARJS

Characters: 325
Lines of JavaScript: 0
<!DOCTYPE html>
<html ng-app>
  <body>
    <h1>Hello World with AngularJS</h1>
    Write some text in textbox:
    <input type="text" ng-model="sometext" />
    <h2>Hello {{sometext}}</h2>

    <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
  </body>
</html>

Wednesday, 18 May 2016

Namotel : Make In India Failed Again


The Story of Freedom 251 is not so old and Now Again Make In India Came With a New Crappy Thing "Namotel"  . We know Namo is rocking these days in Indian Politics But that does not mean its name works everywhere . If you are doing Shit then It will not come in different way if you say NAMO .

Namo + tel  = Website Crash

Namotel is another attempt of "Make In India" To Lauch & Offer Chepest SmartPhone . The Crappy game started by Freedom 251 gave to birth to another one . This Time SmartPhone is offered at Price of "Rs 99" It is claimed to be India's Most Affordable Smartphone

In Press Conference Company's Promoter Madhav Reddy Said Smartphone will be available to be booked at Price of Rs99 from 17 May,2016 To 25 may, 2016 On Company's Official Website Namotel . Smart Phone Will Be Available on Cash On Delivery

But I think they Don't Know How To Launch A Product To 1.252 Billion Indians . This Also Doubt About the Quality of Make In India Products That they are planning To launch and also Some That they launched .

Instead of Launching Cheap SmartPhone they should Use Their Talendted People To Make Valuable , Creative and Better Quality Product Atleast Better Than Freedom 251 or Nametel

Message By Comapany That Didn't Stood Up For Even 1 Day

 'Joy and freedom represents the logo! The same joy will flourish in billion Indians in the form of smart Connect with (3 different looks and shapes) Android Smart powerful Phone at 99. We make this product to show love for India it is a 'MAKE IN INDIA' Initiative. This model is limited and it is applicable only for India and who holds Aadhar Identity.'

Namotel Rs. 99 SmartPhone Product Specification


  • 4-inch display with 480x800 pixels WVGA resolution.
  • Android 5.1 Lollipop OS 
  • 1GB RAM. 
  • 4GB of internal storage which is expandable up to 32GB via microSD card.
  • 2MP camera at the back and a VGA selfie camera
  • Connectivity options include 3G and dual-SIM.
Different Namotel Products







COMPANY WEBSITE BELOW




Tuesday, 17 May 2016

Tempdata vs Session in Asp.net MVC


Why Sessions are Not Recommended to use in MVC

One of the Fundamental Principal of Asp.Net MVC Framework is  Web is Stateless And AspDotNet MVC is Stateless AspDotnet WebForms is a try to make Stateful Modal But Its difficult to main it as this modal does not exist . Sessions Create lot of load on Cache that was biggest problem .

Using Session in AspDotNet MVC is like Putting APPLE Logo on Asus Laptop and Calling it Apple Laptop . Reality does not change .

What Is Alternative To Session in MVC

You can use TempData in place of Session . Tempdata is limited form of Session . Don’t Use Session in MVC as you are already having Tempdata and one benefit of Using Tempdata is They will automatically deleted no need to clear or remove them as we do with session

How To Use TempData In MVC

When Data is TempData is read it is immediately market for deletion at the end of request . That means you can use Value Tempdata In Tempdata Only at the Next Request . See Example Below - 

TempData is Filled With Data

TempData["SomeTemp"]= "Hey! This is MVC" ;

Tempdata Accessed in Second Request 

Object value = TempData["SomeTemp"] ;

Value in Tempdata will be Cleared After Above Line of Code . If you access in after that line of code after above line you will not found it there it will be deleted


Keep And Peek Methods 

Peek And keep methods are used to read value without marking it for deletion after reading its value . So it is acutally helping us to retain its after its first read instead of deleting tempdata

With Peek Method We get the value of Tempdata Without Marking it For Deletion . In this method we access the Tempdata value using Peek Method That tells it to Hold Value and does not mark it for deletion

With Keep Method we hold the Value of Tempdata that was marked for Deletion after its  first read . so it is using two different calls . First one is getting Tempdata Value then Second call is To Save Tempdata From Deletion

Saturday, 14 May 2016

Which is a more valuable skill in freelancing Web Development or Web Designing


Quality Of Work is Valuable in Freelancing , Along with Dedication to work , Punctuality , Quick and Efficient Decision Making & Logical Thinking etc .
If we go for Comparing Designer With Web Developer To know which one is more valuable Then I think the Comparing them makes no sense . Its like comparing Michael Jordan To Lionel Messi . So we Should . They both are from sports but we can’t compare them Both have their own games and requires different view of thinking
Both Skills are Important Part of Project . There was Time When Functionality of Website was thing that was needed in website & Design of Website was not crucial But In Today’s World Along with Functionality of Website Design , User Usability are important aspects of website .
Only Making website to look pretty is not enough In Web Designing . It should be good according to User Usability Rules , It should be Responsive to different available Screens , Performance of Page loading is also included for web designer .
I Know Web Development project lasts long as compared to some of the Web Designing Projects That’s make more person attracted to them for more earning . But Creativity has No Money Bar . If you require a Unique Web Design or Logo etc Then That may cost you more than a Web Development Project . Developing Creative Gif’s for your Business / Ads Purposes are Very Creative & Demanded Things .
There are Number of Online Website including ThemeForest ,Templatemonster , colorlib, freshdesignweb etc . These Websites Contains number of Contributions From Developers .
Web Development is regarding to working / Logical Making of website So that consumes your more time . So Other Person is not hiring you , Client is hiring your Time So More Time is consumed in Web Development That’s Why Web Developers Sometime Earns More and This Thing attract most person to go in web development
All In All We Can both web development & Web Designing Have their own Importance . All That Maters is How good you are in your Skill & Quality of work .
All The Best Feel Free to share your Views