Posts

Webcam Integration using pure Js on HTML 5

Image
Hello geeks, hope you all are doing well.  In this blog post i am going to share a very simple java script code snippet through you can easily integrate your webcam into any html 5 web page.                                Now, a day most of the website provides real time webcam integration for profile picture upload or any account verification step. Some of them as per my experience are :  Bitbns  ,   Electronieum  and list goes on. Here i am using html 5 video tag, and as source of video i am integrating webcam using java script. So, first create html DOM structure using following code snippet. <video id="video" width="100%" height="100%" autoplay></video> Next  include video src for video tag in js. var video = document.getElementById('video'), vendorUrl = window.URL || window.webkitURL; if (navigator.mediaDevices.getUserMedia) { navigator.mediaDevices.getUserMedia({ video: true })

Amazon web scrapping using PHP

Image
Welcome folks, as we know that amazon is the leading e-commerce company over the entire web, and it is still growing.      Now a day peoples also using amazon's different services to make their profits. There are a lots of ways to become a part of it. Becoming merchant, web scrapping affiliate marketing are some of those.   In this blog post i am going to show you how you can use PHP to get the latest current price of product listed on amazon. Now question arises that what is the benifits to know the latest pricing of products.   Lets me explain this point, on web you may create you own website to comparing the product price site, even you can create your own e-commerce website to sell the products and forget about price up and down (your scrapper will do this for you).  Of course you have to manage the packaging and delivery services on your own. Since, on web people mostly attracts on price so keeping the price up to date is a matter of loosing or gaining a huge number or v

SCOPE_IDENTITY() Vs @@ Identity Vs IDENT_CURRENT(tableName) in Sql Server

Image
Hi there, in this blog post i am going to discuss the basic differences between SCOPE_IDENTITY(), @@Identity and IDENT_CURRENT('tableName').                 Basically all these three are used to retrieve the last inserted identity value in different session and  different scope. Let's try to understand it in detail. SCOPE_IDENTITY() :   It returns the value of identity last inserted within same session and same scope. @@Identity : It is a global variable which returns the value of identity last inserted within same session but in any scope. IDENT_CURRENT('tableName') : It returns the value of identity last inserted in any session and in any scope. Now, i am pretty sure you are wondering about what this session and scope really menu in the above mentioned points.   So, let me clear the same with an example. First we need to create two different but simple table with having the following structure. create table tableA ( id int identity(1,1)

SQL Server Identity with different possible operation on it.

Image
Hello folks,       I dentity column is very common in database design when we want to add a column as id and auto increment by itself. Some time this same feature is known as auto increment in different database(e.g. MYSQL).  Basically id column is if set as identity(auto increment), is automatically managed and increased by itself when new record(s) are inserted. So, get started with creating a new table in sql server with identity column. Either you can use sql query for this, CREATE TABLE tbl_person ( id INT IDENTITY (1, 1) PRIMARY KEY, name VARCHAR (255) NOT NULL, ); or you can use sql server management studio tool for this. You can set identity option for a column as shown in above screenshot. Here, you can set initial seed(first parameter in sql query) and increment seed (second parameter in sql query). On Successfully creation of table if we try to insert identity column column field explicitly the MSSQL server throws an error stating

Email send in Magento 2

Image
In this blog post i am going to create a new module to send email form magento custom contat form 1. Create email_templates.xml file in app/code/Contact/Us/etc <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Email/etc/email_templates.xsd"> <template id="send_email_email_template" label="Email Form" file="email_template.html" type="text" module="[Name_Space]_[Your_Module]" area="frontend"/> </config> 2. Create email_template.html in app/code/Contact/Us/view/frontend/email <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../Email/etc/email_templates.xsd"> <template id="send_email_email_template" label="Email Form" file=&quo

All in one post for magento 2.x installation and after installation troubleshoot for window users

Image
This blog is purely dedicated to window users who faced problem while installation or after installation with wamp server on windows. * 500 internal server error while navigating to magento root folder from browser   A quick solution to this is 500 Internal Server Error when installing magento2.x on windows is navigate to  httpd.conf   file of apache server, and search for this line   LoadModule version_module modules/mod_version.so you find # just before above line denoting that it is commented, you just have to uncomment this to load the required module on server, restart all services of your wamp. you may find your installation on browser now works fine. * After successfully installation of magento you may find this exception  Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file: 'D:/wamp64/www/mage23/vendor/magento/module-theme/view/frontend/templates/page/js/require_js.phtml' in module: '' block's name: '