Skip to main content

Posts

Access Camera HTML 5

Access camera and video, the  INPUT  element with a type of  file  is necessary: < input type = " file " accept = " image/* " > To isolate only a photos as the type to be uploaded, the  accept  attribute must match the pattern above. HTML 5 CAPTURE MEDIA DEVICE <p>Capture Image: <input type="file" accept="image/*" id="capture" capture="camera">  <p>Capture Audio: <input type="file" accept="audio/*" id="capture" capture="microphone">  <p>Capture Video: <input type="file" accept="video/*" id="capture" capture="camcorder"> 
Recent posts

Bootstrap basic stuff

creating bootstrap breadcurmb using twitter bootstrap <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu"> <li><a tabindex="-1" href="#">Action</a></li> <li><a tabindex="-1" href="#">Another action</a></li> <li><a tabindex="-1" href="#">Something else here</a></li> <li class="divider"></li> <li><a tabindex="-1" href="#">Separated link</a></li> </ul> creating bootstrap pagination and use .disabled for unclickable links and .active to indicate the current page. <div class = "pagination" > <ul> <li><a href = "#" > Prev </a></li> <li><a href = "#" > 1 </a></li> <li><a href = "#" > 2 </a>...

Datediff Function Sql Server

DateDiff function returns the  difference between to dates Suppose we have employee table and it has following rows and columns Id Name Description JoiningDate 1 Test1 Executive 10/5/2013 0:00 2 Test2 S.Executive 10/5/2012 0:00 3 Test3 Team Lead 10/5/2012 0:00 4 Test4 Jr Engineer 10/11/2014 0:00 Calculate the Employee joining Year, month and days   select name , datediff ( year , JoiningDate , getdate ()) Year   , datediff ( year , JoiningDate , getdate ()) month , datediff ( DAY , JoiningDate , getdate ()) day from Employee  where joiningdate is not null Calculate the age   Sql server in years-month and days   Declare @dateofbirth datetime   Declare @years int   declare @months int   declare @days int   declare @temp date   set @dateofbirth = '1983-04-27' ;   set @temp...

Sql server Get the Day of week

Suppose we have employee table and it has following rows and columns Id Name Description JoiningDate 1 Test1 Executive 10/5/2013 0:00 2 Test2 S.Executive 10/5/2012 0:00 3 Test3 Team Lead 10/5/2012 0:00 4 Test4 Jr Engineer 10/11/2014 0:00 select   case    DATEPART ( DW , getdate ())+ @@DATEFIRST % 7  WHEN 1 THEN 'SUNDAY'      WHEN 2 THEN 'MONDAY'      WHEN 3 THEN 'TUESDAY'      WHEN 4 THEN 'WENSDAY'      WHEN 5 THEN 'THURSDAY'      WHEN 6 THEN 'FRIDAY'      WHEN 7 THEN 'SATURDAY' END

DATEPART() Function in Sql Server

DATPART function is used to return single part such as date, time, year, hour, minute seconds. It’s very useful function datepart ( datepartstring , date ) Here is common queries we have used in sql server day by day operations Suppose we have employee table and it has following rows and columns Id Name Description JoiningDate 1 Test1 Executive 10/5/2013 0:00 2 Test2 S.Executive 10/5/2012 0:00 3 Test3 Team Lead 10/5/2012 0:00 4 Test4 Jr Engineer 10/11/2014 0:00 1)   Get Year from joining date of employee     select name , DATEPART ( year , joiningDate )   from employee 2)   Get Month from joining date of employee select name , DATEPART ( month , joiningDate ) from Employee 3)   Count employees based upon year   select name , DATEPART ( YEAR , joiningDate ) from Employee where DATEPART ( YEAR , joiningDate )= '2013'...

Difference beteween stuff and replace function in sql server

STUFF function is used to overwrite existing characters. Here is the syntax of stuff function stuff  (Expression, start, length, replace), Expression  is the string that will have characters substituted start  is the starting position length  is the number of characters in the string that are substituted replace  are the new characters interjected into the string Here is the   example of stuff function SELECT   STUFF ( 'anil kumar' ,  1 ,  2 ,   'sun' ); Output this query = sunil kumar REPLACE function to replace existing characters of all occurrences. Using the syntax REPLACE (string_expression, search_string, replacement_string), where every incidence of search_string found in the string_expression will be replaced with replacement_string. Here  is the example select   REPLACE ( 'Sunil Kumar asp.net devloper' , 'Sunil' , 'Anil'   ) output of this query is: Anil Kumar asp.net devloper ...

ORDER BY Clause using Variable in store Procedure

Let’s create the table with sample data: CREATE   TABLE  [dbo] . [Product]   (     [Id]           INT              IDENTITY  ( 1 ,  1 )   NOT   NULL,     [Name]         NVARCHAR  ( 256 )   NULL,     [CategoryId]   INT              NULL,     [Description]  NVARCHAR  ( 512 )   NULL,     [IsActive]     BIT              NULL,     [Price]        DECIMAL  ( 18 )     NOT   NULL,      CONSTRAINT  [PK_Product]  PRIMARY   KEY   CLUSTERED...

buy cloth