Skip to main content

Posts

Showing posts from March, 2016

Check Image extension using input type file in html using Jquery

Here is the code : $fileinput1.on("change", function () {                 var input = this;                 var url = $(input).val();                 var ext = url.substring(url.lastIndexOf('.') + 1).toLowerCase();                 if (input.files && input.files[0] && (ext == "png" || ext == "jpeg" || ext == "jpg")) {                     var FR = new FileReader();                     FR.onload = function (e) {                          var imagetocheck = new Image();                         imagetocheck.src = e.target.result;                         imagetocheck.onload = function () {                             var width = this.width;                             var height = this.height;                             if (width == 50 && height == 50) {                                                            }                             else {                                                                 alert

Divide any number into Equal parts in SQL SERVER

First Create One function that will generate very first part  CREATE FUNCTION pGetCallsCount (  @totalcall INT = 51,  @Count INT  = 4 ) RETURNS INT AS BEGIN DECLARE @result1 INT  DECLARE @r INT  = @totalcall % @Count  IF(@r=0)  BEGIN  IF(@count=1)  SET @result1=@totalcall  ELSE   SET @result1=@totalcall/@count   END  ELSE   BEGIN    SET @result1=(@Count-@r)+@totalcall -- surely divided   SET @result1=@result1/@Count   END   RETURN @result1 END GO Then Call that function to create next parts like mentioned below :- DECLARE @totalcall INT = 43 DECLARE @Count INT  = 4 DECLARE @r INT  = @totalcall % @Count DECLARE @totalsum INT=0 DECLARE @result INT DECLARE @totalcalldemo INT SELECT @totalcalldemo=@totalcall WHILE(@totalsum<>@totalcalldemo) BEGIN SELECT @result=dbo.pGetCallsCount(@totalcall,@Count) -- (51,4), SET @totalcall=@totalcall-@result SET @Count=@Count-1 SET @totalsum=@totalsum+@result PRINT @result END  OUTPUT 11 11 11 10

microsoft.reportviewer.webforms version=9.0.0.0 error in ASP.NET

Here is the solution :-- Hi, Could not load file or assembly 'Microsoft.ReportViewer.ProcessingObjectModel, Version=9.0.0.0, You need to install Microsoft Report Viewer Redistributable 2005. It’s available in the following address: http://www.microsoft.com/downloads/details.aspx?familyid=8A166CAC-758D-45C8-B637-DD7726E61367&displaylang=en Thanks.