TECH - Articles

4 Tips to Succeed in Online Marketing

​ Here are four tips to succeed in online marketing: 1. Social Media: Twitter, Facebook, and blogs are some of the most commonly used social media when it comes to marketing. Social media is an essential sales channel. But they can also be used to build trust and good relationships between the customers and the business. By creating social relationships and ties with the customers, trust will be built up, which means that customers come over and over again. In addition, social...

Read Full

CryptoCurrency

Hello,  Today I am going to talk about the cryptocurrency & how does it affect our daily life. I am writing it today because today something happened to me after that I thought I should share this information with all of you. At first let us talk about cryptocurrencies. These are some kind of virtual currency which didn't get legal permits in so many countries as a currency. Well, keeping bitcoins is not illegal but it is an unofficial currency in so many countries so like in India...

Read Full

Top 10 SSL certificates

Introduction Secure socket layer (SSL) works as the digital certificate that behaves like the base for the internet security. SSL is the digital certificate used to make the encryption connection between the user and server or user and browser. The main key point of using SSL is the protection of the sensitive information such as bank details, credit, and debit card details etc. When users initiate the process that needs credit and debit card information, the process is called...

Read Full

iMediaShare App, its features and how to download App on Android, iOS & PC

If you have a smartphone, then you can enjoy playback and the stored things like home videos, photos, movie and lots more. You can enjoy all these things by using an  iMediaShare app . Smart TV support all the latest technologies such as Miracast, DLNA and much more. iMediaShare enables you to view the stored content in Smart TV through both iOS & Android phones. This amazing app is free to download. It works with Blu-ray players, media boxes, audio systems and lots more....

Read Full

How to use and downloading process of WPS App and its features?

WPS app is used to check the security level of the network with the help of WPS protocol. WPS stands for Wi-Fi protection setup. The protocol allows the user to connect with the network using 8 digit pin number. The pin number used in the process is a predefined number in the router. Introduction WPS is a wireless network standard which enables user to connect to the router using any wireless device quickly and effortlessly. It only works for the device those are...

Read Full

Go Pro Fusion design and features

Go Pro fusion has the square design which is totally different from the Go Pro Hero 5. It is about 3.5 inches tall and wide. Though its size is different as compared to the Go Pro Hero 5 but they do have some likenesses. It also had the same rubbery texture and has same gippy patterns all over the edge of the cameras. ​ It has 180-degree camera to the front and other to the back. It has quick play button which can use to capture the photos quickly and do the recording and video. It...

Read Full

Everything you need to know about the Go Pro Hero 6

Go Pro hero 6 plays a significant role for the Go Pro. After the invention of this product, the company has gained new height. The company share jumped to the peak value just because of this wonderful innovation. Go pro now looking forward to have the great success of the Go Pro hero 6. ​ Release date People are waiting for this product. As per the information, the release of this product will take place in the month of September. This event will announce the availability...

Read Full

Content Marketing for IT Consultancies

It is important to have good content on the website. Content marketing can be vital for your organization. Content marketing is known for creating and sharing useful content with thе people. Type of the content thoroughly depend upon the operation done by the organization. Content should always be customer centered. You need to define the content after analyzing the targeted audience. Content is used to define the information which fulfills the predefined marketing goals....

Read Full

How to increase the Facebook fans for business page?

If you want to achieve success on the Facebook platform you must need a community. If you do not have community support, no one will connect with your brand. When no one is connected with the brand, it would be difficult to build a strong brand image. You always need a community that has the number of people who support and share your content.  Moreover, it is not just about the quantity, it is also important to maintain quality. You need to choose the...

Read Full

Importance of Quora Upvotes for thread and answers

​ Quora is the emerging community in the marketplace having 7 million monthly viewers. You can put your question on the Quora and get answers for the same. This is the best source to get the viral traffic for your business. To increase the distribution of the content, Quora use Upvotes method. The Upvotes signifies that the given content have high-quality content. Some people like to earn Quora Upvotes because this is the best feedback one's post can have. Importance of Upvotes...

Read Full

Facebook - How safe is it for your kid?

Imagine your 10-year-old daughter refuses to talk to you, have locked herself in the room and is showing early signs of depression from past few months. Despite your multiple efforts to know the reason behind her agony, she refuses to utter a word regarding this matter. During a psychological treatment, she reveals that one of her class mate has been bulling her from quite a while now saying that he has a picture of her’s naked and that he will post it in every social media platform. ​...

Read Full

8 Benefits of Email Encryption

​ Whether you are a businessman and a student you might be using E-mail as the primary communication tool. Nowadays all the necessary communication is taking place with the E-mails. The reason behind this is E-mail mobility, economic factor, and reliability. When you work for the organization there might be various chances that you need to get the important document through the E-mail. So it is significant that the confidential information stays safe. A wrong click can lead to a...

Read Full

Echo Dot

Echo Dot is the latest addition to the echo products line support by the Amazon. This is the cylinder-shaped device with the voice control computing used to make the connection to Alexa voice services to provide the response to the different activity such as response to the question, weather report, music, news and more. Echo dot also provides the support to control the small electronic gadgets at your home. The gadgets can be lights, switches, and thermostats. Echo dot...

Read Full

Nokia 2: All that glitters is not gold

HMD Global just announced its latest budget offering named as Nokia 2. The much rumoured smartphone was launched at a global launch event in Gurgaon. Nokia 2 is the cheapest device till now by HMD Global and acts as a entry level smartphone. The device packs in some great features while it lags at some major areas.  ​Design ​Nokia 2 boasts of a great design and build quality. The device looks premium and fits well in the hand. The device has a sculpted polycarbonate aluminium body....

Read Full

Upcoming WhatsApp feature !

WhtasApp  is a familiar name among the many Indians Who joined the group of smartphone users this year with the Jio 4G revolution.It is not quite astonishing that besides Facebook they chose what's app, for staying connected with the society as a whole. WhtasApp  too has several lucrative feature that one can not simply resist. Be it the status update feature, be it the video and audio calling feature, be it group chat feature. The developers team are constantly tryinng to update...

Read Full

Offline Methods to Get Visitors

A large number of people who set up their business online are completely ignoring the very inexpensive marketing methods at our disposal in the actual offline world. This is a reality. It's now time for you to get the offline people at once to your website. Marketing and advertising offline, utilizing the available strategies and resources is a good method to get new customers to your website. This time tested techniques have already been used in the past to attract the attention...

Read Full

The Sub 15k King: The Smartphones Battle

​The Battle of the budget smartphones is on fire at the moment. The smartphone companies are coming up with great budget smartphones to beat each other. The rivalry is increasing and it all depends upon the customer as to how to choose the best of smartphone so to ensure his value of money. Below I have enlisted the best budget smartphones that contain all the latest features and will ensure your value of money. They also ensure that you don't get fooled by the fake advertisements of...

Read Full

To get the best out of your computer

The present generation computers are very powerful, fast and comes with huge storage space. But there are still many of us having computers, which once used to be super but now has become average as compared to present day computers. Still if we maintain it properly, we can get a decent performance out of it. So following are some very useful tips, that can make a computer deliver a decent performance. ☆ Keep your drive segment, in which you have installed the Operating...

Read Full

Are dual rear cameras on chinese phones fake?

Hello everyone, one interesting talk these days is the dual rear cameraman's setup that takes DSLR quality images from smart phones. No doubt this feature has so much craze since it offers many features like lossless zoom, better quality, vibrant colours, true black and white and of course the much interesting bokeh effect (some of these features depend on type of secondary lens on phone whether telephoto or monochrome). But now a days we see a lot of small Chinese companies offering...

Read Full

Man Ki Baat - Why not deliver it on BharatNet?

Under Hon'Ble PM's flagship program BharatNet, optical fibre has been laid in thousands of villages bridging the proverbial digital divide to a great extent. Equipments have been installed in Gram Panchayat Bhawans which can be used to access internet at broadband speeds. The country is thus on the way of achieving one major milestone on the path of all round development. Here an important question arises-How good is the quality of the Optical Fibre Network being created?  And we all...

Read Full

Paint conducts electricity!!!

Hey are you wondering how can paints conduct electricity? when the paint we know are just used for paintings and preventing rust in iron bars. Read on to know more about how this revolutionary product is changing ways projects and being done.How wires in home space are being reduce and how much amount of raw resource such as plastic ,copper ,rubber can be reduced. How much amount of processing cost can be saved and the Eco-friendliness of the product ease of use. ​ Matt Johnson is the...

Read Full

Digital Solutioning Skills for Enterprises & Professionals

The demand for ‘Digital’ seems to be on rise. Quite a few IT vendors are going helter-skelter in order to catch up with the demand. Nearly every enterprise that perceives itself to be in the race, knows that the ‘game’ requires different skills, but is not sure about the capacity of the talent within the company. Many have shed work-force or are in the process and this may be giving especially the more expensive employees, a bit of anxiety. Many such employees could be seen ruing about...

Read Full

What is Locky Ransomware attack and how to protect our computer from attacks?

The global ransomware attack will not end . After WannaCry and Petya  attack , cyber criminals are now spreading an email-based Locky ransomware. The Indian Computer Emergency Response Team ( CERT-In ) has given  an alert on its website about the new Locky ransomware.  It mainly spreads through emails. Locky ransomware attackers demand payments in crypto currency Bitcoin like WannaCry  attack .  Till now, no complaint is registered in India regarding this attack...

Read Full

Blook : A Boon for Bloggers and Blog-site Owners

Today Bloggers are trying to find out fresh new opportunities to earn from their Blogs. There are number of web-sites available that pay bloggers in different ways. Some sites pay per blog, while some pay per 1000 blog views. While there are some sites that flash advertisements vis-a-vis your blog and pay you on the basis of number of times this ads are clicked. Blook is a fresh new earning opportunity in  the internet  world. Blook is an example of new opportunities that arise...

Read Full

How to make web browsing on your iPhone a whole lot faster

In the past, people used internet by means of their computer or laptop. But, the time has changed now and people have started to use mobile phones in order to search for things online. The development mobile technology and also the coming of the smartphone have made the life of people very easy. Today, they don’t want to go to virtual shops in order to purchase the things that they wanted. They can do shopping from the comfort of their smartphone and secured internet connection....

Read Full

Why Performance Testing is Important?

Performance testing is a type of testing which is conducted or handled with a very clear notion to check the  performance of  an application under heavy load. Few parameters that are all of really paramount importance when it comes to performance testing is whether the system that we are trying to test is reliable enough to be used, whether it can hold that much load and whether it will work same way when bombarded with humongous data of production. So performance t  esting is...

Read Full

Secret Gmail features you didn’t know exist

What might be one of the most challenging things for the next generation? To find a Gmail address of choice! With over 1 billion Gmail ids already taken, growing at a rate of new 100+ million users every year, it would be a gargantuan task to find a name of choice for Gmail id. Looks like, few more years and it might be hard to find a person without Gmail Address on this planet. I am sure, you have a Gmail address (may be more than one). Let’s try and find out how we could get the most out...

Read Full

Amazing Facts About Apple Company

Apple Company is one of the world’s most powerful companies. In the initial period, the company suffered an economic downturn, after that it gained such popularity that the world is seeing.  Every man has the wish to have an Apple phone sometime in life. Today we will read “Apple Facts” in this post, which no one has ever told you till date. 1. Do you know that Apple Company was founded in 1976 on the April fool (Fools Day). 2. Apple’s first logo was Newton’s picture. Not...

Read Full

Facts about Samsung

Speaking of new and attractive smartphones, Samsung’s name is remembered first. With the help of its entire Galaxy Range, Samsung has become the world’s largest smartphone maker company. Regardless of fact that Samsung has revolutionized its mobile in the field of communication, the mobile handset was not its first product. The company of South Korea started in 1938 with just a staff of 40 people. Slowly, Samsung has finally decided to fly from domestic products to becoming the biggest...

Read Full

How AI can influence the future of Indian students?

An important field of Artificial Intelligence (AI) is Machine Learning. Machine learning can be considered as the most powerful branch of AI and basically enables a machine to learn from data and then mimic the things humans can do. ​ Machine learning was in its infancy stages in the industry during the early '90s. At the time, it focused on relatively simple tasks such as assessing risk of bad debts, sorting mail by reading zip codes, etc. However, the last decade has seen...

Read Full

Top Smartphone hacks to make your life easier

With virtually a phone in each and every hand on this planet, the hand mobile device has invariably become an important part of our routine. With the revolution in the devices capabilities and apps available to download, a mobile phone is used by different people in more ways than we could even imagine. For example, a real estate dealer in India uses iPhone because of the high-veracity compass it comes loaded with. In India where the direction and layout of property is very important as...

Read Full

How spinning mills spin yarn?

​ Source for textiles ​Generally, raw material used for textile goods include natural fibers like Raw cotton, Flax, Jute etc. Alternatively, synthetic fibers like Polyester can be used. Wear comfort varies based on the raw material used. A cotton inner wear gives more comfort than wearing a synthetic inner wear. To cite another example, woolen sweaters gives more warmth and comfort during winter than cotton. Likewise, based on the end use, raw material for manufacturing...

Read Full

How to signup anywhere without you Real Email id

​ Friends, Today I'm going to tell you that how to save yourself from fraud. Many times a person is asked to sign up on a website or an app, and you will afraid about that if the website leaks my information then what will I do or if the web or app is fake then by information will be sold. So, do not compromise with you privacy just use a trick to save your private informations from spammers and also you can use the web material or app material. So, The trick is -: Use Fake Emails...

Read Full

Google redesigns mobile search app with personalised news feed

Google on Wednesday announced its newly designed news feed settings for the search app for all the mobile phones.This personalised news feed displays links about hobbies, travel, sports and other topics and it looks like the new feed of Facebook and going to give stiff competition to the social media giant. ​ Google is the world's largest search engine and its parent company is Alphabet Inc. It said that the changes begin to roll out in the US in the coming days. The new name...

Read Full

Top 10 Best Android games of 2017

​ There are a lot of best Android games available in the Google Play Store. But it is difficult to choose the right one.So I have compiled the list of best android games apps which will give you the real gaming experience. Pokemon GO Pokemon Go is the real adventure game and one of the best android games in 2017. It is the hottest and hyped game of the year.Venusaur, Charizard, Blastoise, Pikachu, and many other Pokémon have been discovered.  ​  You...

Read Full

How to recover the lost files with EaseUS Data Recovery Wizard

​ EaseUS Free Data Recovery Wizard 11.0 Version – Quick Intro EaseUS Data Recovery Wizard Free is the one of the best free data recovery software. It can also recover the missed files from the virus attack or system crash. The user interface is good in the new version so that the recovery process is easy and fast. Best Features Of EaseUS Data Recovery Wizard Free 11.0 There are some exciting features of Free EaseUS Data Recovery Wizard 11.0...

Read Full

Can Power BI become leader in the Self Service BI Tools

​ ​ Though Microsoft (MS) products for BI and Analytics have been pioneers in Gartner's quadrant, but the below points are based on one of the MS Product Offering: Power BI. It showcases the potential of how Power BI can rule the Self-service BI Tool space.   Price is low MS have thrown almost all of their analytical IP into this Power BI covering all the features from MS Office product Suite. At $10 USD per month per user , we are getting a piece of technology that...

Read Full

An App That Lets You Carry Your Aadhaar On Mobile

UIDAI Launches m-Aadhaar, an App That Lets You Carry your Aadhaar On Mobile. m-Aadhaar is official mobile application developed by Unique Identification Authority of India (UIDAI) to provide an interface to Aadhaar Number Holders to carry their demographic information viz. Name, Date of Birth, Gender & Address along with photograph as linked with their Aadhaar Number in smart phones. ​ The app is currently available for Android users only. Some of the services will only...

Read Full

Run android apps on laptop using bluestack android emulator

​ All of us have been using Android applications on our smart phones regularly but at some point of time have felt certain disconnect regarding their use on our laptops and PCs. Inquisitiveness is human nature which leads them to try and search for newer possibilities and open up the doors to new innovations. For instance if I have some very useful Android app on my phone, why should not I be able to use that app on my desktop or laptop also? One such innovation, that is...

Read Full

Top 10 best digital wallet apps for safe and secure payments

​ The digital wallet is an electronic device which helps the individuals to carry out the electronic transaction. You can use the wallet for shopping at stores.An individual’s bank account is linked with the Wallet. This is the way the digital wallets work.It passed the account information to the merchant’s terminal through Near Field communication technology.Carrying money is not safe in this world.So the digital wallets help you to keep your financial transactions safely without...

Read Full

How to Use Facebook Profile Guard to Protect Your Profile Photos

​ The Facebook introduced a new tool in India which is called Facebook Profile Picture Guard tool to secure the profile picture that is being misused. It helps you to protect the picture from stalkers. The people who are not friends of us can never tag or take the screenshot of your profile picture through by implementing this profile picture guard tool. It is rolled out only for the Android mobile devices. The social giant Facebook quoted that the feature was rolled out...

Read Full

How Are Mobile Payment Solutions Taking A Firm Grip In The Market?

​ Two decades back, when the payment with plastic cards has started, the people were amazed. Later, the cashless transaction with cards accelerated at the furious pace and make a tide over the cash transactions. Slowly, the plastic cards like - a debit card, prepaid card or credit cards also become the hassle for the people with the surge in mobile payments as they have to carry the cards with them every time. Now, people are welcoming the cashless payment landscape. According to...

Read Full

Life cycle hooks in Angular js 2

​ Angular2 is the trending UI framework that enable you to create rich interface using typescript. Angular2 application are the collection of components. Like every framework it has to go through a life cycle, here in angular we called it life cycle hook . Its important to have a idea where to use these life cycle hooks. So in this blog I tried to provide an idea where to use them. List of life cycle hooks are given below ngOnChanges ngOnInit ngDoCheck ngAfterContentInit...

Read Full

What Will Internet Be Like in 100 Years?

Facebook is planning to provide everyone with internet coverage using renewable energy, for both empowering lives and being eco-friendly at the same time! The plan is to deploy giant solar powered drones, which will beam the internet to the ground, the areas which are still disconnected from the rest of the world, due to being extremely remote. Recently Facebook completed its test flight. The drone named Aquila was airborne for approximately 2 hours (1 hour 45 mins to be exact)...

Read Full

Best Free Online Photo Editor to make your photos looks awesome

According to InfoTrends, more than 1.2 trillion digital photos will be taken in 2017. If you’re like me, you constantly have your smartphone’s camera app open, ready to take pictures of your family, vacations and pets. There are dozens of affordable clip-on lenses, numerous editing and sharing apps, and countless ways to display your smartphone pictures. Check out these 8 free online photo editors to make your digital photos top-notch. VSCO ​ The VSCO web app is a hugely...

Read Full

3 Freebies To Get Free Software

However, there are lots of websites on the Internet that provides you free software, but today I want to get three such websites from where you can download the free software (Freeware, Shareware) easily. ​ http://www.filehippo.com This website is one of the most popular websites where most of the softwares can be downloaded. In this single website, you will find all the major Freeware whether it is anti virus or any media player. The best thing about this website is that here...

Read Full

Xiaomi Redmi 4 Review

After 3 years of spreading it’s roots in Indian market Xiaomi’s popularity among the user has increased tremendously. It has established it’s new bench mark by launching almost every kind of budget smart phones. The company is creating a new landmark as far as the price and specifications of the smart phones is considered. After the sought on success of Redmi 4A ,Xiaomi has recently launched the successor of Redmi 3S REDMI 4. Redmi 4 comes along with fingerprint sensor and in...

Read Full

Have Fun with YouTube

​ Hi guys!! Today I am going to tell you some of the amazing facts about YouTube that I am sure you are not familiar with. Some of the keywords which when written in youtube search box wiil produce amazing outcomes .It might sound something weird but yeah it’s true. So, let’s see what are those amazing keywords. MAKE YOUTUBE TO GO ON A SWING Type “Use the force Luke” in YouTube search box and see it having a merry-go-round. MAKE YOUTUBE COLORFUL Just type “dog...

Read Full

Using keys in React Js

​ I recently started working on a mobile website that uses  React  for its view part. One thing I found to be critical was the usage of  key . Consider the below render function render() {     const dataArray = [       { id: 1, value: 'First' },       { id: 2, value: 'Second' },       { id: 3, value: 'Three' }     ]     return (       <ul>         {           dataArray.map(data => <li>{data.value}</li>)         }       </ul>     )   } When...

Read Full

FREE PASS : Download and Earn Rs 10 Instantly

(Image Source) FreePass App – Get Rs 10 Free Recharge instantly on downloading.  We are Back with another offer where you will get free mobile recharge of Rs 10 instantly on downloading Free Pass App. So, Hurry up and download Free Pass App to avail Rs 10 Free Recharge. You  have to achieve the target of use of data, the amount of MB data recommended by the app (you can use only 10 MB/day). As soon as your target is completed, you will instantly get Rs...

Read Full

Building an Audio Player in Electron

​ ( Image Source ) I was stumbled upon by the buzz around NodeJS and cool projects and libraries being discussed by the developers around the globe. So, as a newbie developer I was curious to learn and try out the JavaScript based server side platform. I don’t have a web app in mind however I wanted to build a desktop program. The idea of audio player came to my mind, yes I know there are at least hundreds of audio player out there which does the job far better than mine, however...

Read Full

Google Betting Big on AI Future

GOOGLE said it was moving from a “ mobile-first to an AI-first world ” as it unveiled a host of new products at its I/O conference. The company announced several new features for its Google Home speaker at I/O, including voice calling, and the ability to use Google Actions – the equivalent of Amazon’s Skills – on Android devices. The focus on AI development echoed the tone of Microsoft’s recent developer conference, but it’s Amazon the company has fixed in its sights, according...

Read Full

Impact of Automation on IT Sector

Impact of Automation on IT Sector After the industrial revolution in early 1700’s automation has taken a huge upsurge. It has helped us increase the productivity, safety and profitability. Automation in past 20 years has eliminated jobs but on the other hand has created new ones. The jobs which requires more physical work have been replaced by the jobs which requires more technical aspect of work. This has improved the working environment and the standard of living of people. So...

Read Full

Top 10 Essential Digital Security Tips For Entrepreneurs

Source   ​Gigantic sort of digital security breaks that smashed some topenterprises tossed the subject of digital security to the prevalent exchange. Thoughonly extensive organizations discover their way to the features, independent companies are not freefrom a few digital security dangers. The unpleasant actuality remains that the impactof digital assault on a private company can regularly be destroying. Studies byNational Digital Security Organization together demonstrate...

Read Full

The Most popular High end games for Android - 2017 list

Gaming on the Android has been increasing over the years as the graphics and the quality of the games are increasing with the newer version of Android  So if you're tired playing minecraft and think that 8-bit gaming doesn't make the most of your glorious phone display, here is the list of some the best high profile in the playstore to suite youe high end devices    1   GODFIRE THE  RISE OF PROMETHEUS ​Size — 2.19gb Godfire is one of the most interesting games as it contain action...

Read Full

Five Easy Steps to Earn Rs 650 by Investing Rs 300 using PhonePe App

Now a days wallet & UPI services are becoming more popular, the service providers are investing more capital to gain new customers. One among them is PhonePe app and i t has launched a very attractive refer & earn program for generating new leads. (Image Source) Recently, I have used these simple method of five steps to earn Rs 650 by investing Rs 300 using PhonePe App via two mobiles in few minutes. Step 1 :   Click Here to download &...

Read Full

Bitcoin technology

​ Bitcoin is a form of digital currency , created and held electronically . No one controls it . Bitcoins aren’t printed , like dollars or euros – they’re produced by people, and increasingly businesses, running computers all around the world, using software that solves mathematical problems. It’s the first example of a growing category of money known as the cryptocurrency . Bitcoin is a digital asset and a payment system. It is commonly called a...

Read Full

Survival of the fittest?

Science is an amazing, wonderful undertaking:  it teaches us about life, the world, and the Universe. But it has not revealed to us why the universe came into existence, nor what preceded its birth in the Big Bang. Equally, biological evolution has not brought us the slightest understanding of how the first living organisms emerged from inanimate matter on this planet, and how the advanced eukaryotic cells—the highly structured building blocks of advanced life forms—ever emerged...

Read Full

Osx - Install wget on Mac OX using brew

​ Mac OS does not come automatically with wget. Often we require to download various files to install various softwares and utilities. So for downloading wget is an useful utility. Below are the steps to install wget on Mac OS. brew install wget This should work. Try to download a simple file to test wget http://www.tcpdump.org/release/libpcap-1.7.4.tar.gz Let us know if you find any...

Read Full

How to use for entity framework code first with mysql using visual studio 2015

Hello everyone, this article is targeted to .net developer who wants to use Mysql as a back end and entity framework  as ORM with code-first approach. Minimum Requirement VS2015 MySqlConnector with Visual Studio If you don't have MySql Connector in your system download from this link and install https://dev.mysql.com/downloads/windows/visualstudio/ I have created a console application for this demo.After adding a console application  add these packages by using Nuget....

Read Full

Determine Operating System type using Java

Hi, In this post we will try to determine Operating system type using Java One of the system properties,   os.name   can help us in achieving that. Below code can detect Windows, Mac, Unix, Solaris. Determine Operating System using Java: package Selenium; public class DetermineOS {     public static String OS = System.getProperty("os.name").toLowerCase();     public static void main(String[] args){         System.out.println(OS);...

Read Full

Building Blocks of Angular2

In Angular2 we have 8 building blocks that help us to create an angular application. In this article I have mention 6 of them so that we get an idea what are they and where they can be used this is the architecture overview. This is just a brief introduction. Each building blocks will be explained in near future in separate articles. Modules:  In our angular application we must have at least one module class conventionally it is Appmodule and also called as a root module ....

Read Full

How to setup angular2 in visual studio ide

As a .net developer we always want that we can develop our application in Visual Studio IDE . So in this article our main focus is to add Angular2 with typescript project in VS IDE. To do that we must have these thing installed in our machine Node.js ( greater than version 4.6.*) and (npm greater than version 3.*.*). Visual Studio 2015 Update 3 Install Typescript 2 for VS2015 from link  download typescript from here Note : We need to configure External web tool as mention...

Read Full

301 Page redirect, misunderstanding I had.

As the title suggest, I misunderstood 301 page redirect in one of my web applications which led to, that's right, a Bug! Let's first try to understand why we need a page redirect and how should we use it. I will try my best to explain this using some scenarios below. Scenario 1 Suppose you have a website whose url is https://sellon.india.com . This website has all the things for SEO (Search Engine Optimization). Now your team has developed a new and better web application which...

Read Full

How to solve IE/Edge CORS error ?

As a web developer, it is highly likely that you have encountered below while trying to fetch data from other domain. XMLHTTPrequest cannot load <api_name>. No 'Acess-Control-Allow-Origin' header is present on the requested resource. Origin <your_website> is therefore not allowed to access But, ever encountered a scenario where it is working fine on every other browser on the planet but not on Internet Explorer or Edge . This can be a little frustrating. Below is...

Read Full

Web Server vs Application Server Difference Explained

Web servers are used to server static content over the http request. while application servers are used to serve dynamic content over variety of requests. Web servers also act as protecting container to the application server, restricting direct access to the application server by the client. In this the port on which web server is running is accessible from outside, whereas access to port on which application server is closed and client can only contact web server thus...

Read Full

MYSQL difference between count(*) and count(column_name)

Earlier we have published about Mysql Count Function  which is used to return the total number of rows present in any database table. Count function is mainly used where we want to fetch the total number of records in any of the given table. Problem Statement So the question arises is that what is the difference between count(*) and count(column_name)? count(*) count(*) returns the total number of rows in any table irrespective of the values inside the columns. count(column_name)...

Read Full

MYSQL Dump - How to take mysql dump or export mysql data

Some times we get a requirement to take mysql dump from remote server to share within our teams or ofter we use to get mysql backup at some regular interval to keep a backup copy of your MYSQL databases. There can be lot more scenarios where we require to take mysql backup. We take this with the help of MYSQLDUMP command. The syntax of mysqldump command is  MYSQLDUMP -u user -p password database_name > file_name.sql  user - User name of the user that...

Read Full

Find the name of the hostel which has second highest capacity from hostel_list table

Problem Overview Suppose we have a table hostel_list   - List of hostels +----+-------------------+-----------+----------+ | id | name | occupancy | capacity | +----+-------------------+-----------+----------+ |  1 | ASHOK BHAVAN | 2 | 1090 | |  2 | KAILASH BHAVAN | 2 | 990 | |  3 | RUDRAKSH BHAVAN | 2 | 990 | |  4 | KAVERI BHAVAN | 1 | 690 | |  5 | BHAGIRATHI BHAVAN | 4 | 2140 | |  6...

Read Full

Calculate nth Highest salary of an employee

In this article I am emphasizing the ways to get the nth record from a table . Here I have took a old example of employee salary.  Now first we need a table  EmployeeSalary  CREATE TABLE [dbo].[EmployeeSalary](     [EmployeeID] [int] IDENTITY(1,1) NOT NULL,     [EmployeeName] [nvarchar](50) NOT NULL,     [Salary] [money] NOT NULL,  CONSTRAINT [PK_EmployeeSalary] PRIMARY KEY CLUSTERED (     [EmployeeID] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,...

Read Full

Incorrect table definition there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

Error I was getting this error in adding a table in MYSQL Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause My new MYSQL table looks something like this. create table table_name (col1 int(5) auto_increment primary key, col2 varchar(300), col3 varchar(500), col4 int(3), col5 tinyint(2), col6 timestamp default current_timestamp , col7 timestamp default current_timestamp...

Read Full

How to use ninject dependency injection in mvc

Overview While working on MVC application in asp.net sometime we need to inject dependency also know as DI(Dependency Injection). DI is itself a separate topic to study which I left for some other day. Refer here for more info on  DI Dependency Injection According to the wikipedia In  software engineering ,  dependency injection   is a  software design pattern   that implements  inversion of control   for resolving dependencies....

Read Full

Find Amit's hostel name using hostel_list and student_list MYSQL database tables

Problem Overview Suppose we have two tables a) hostel_list - List of hostels +----+-------------------+-----------+----------+ | id | name | occupancy | capacity | +----+-------------------+-----------+----------+ |  1 | ASHOK BHAVAN | 2 | 1090 | |  2 | KAILASH BHAVAN | 2 | 990 | |  3 | RUDRAKSH BHAVAN | 2 | 990 | |  4 | KAVERI BHAVAN | 1 | 690 | |  5 | BHAGIRATHI BHAVAN | 4 | 2140 | |  6...

Read Full

Knuth–Morris–Pratt Algorithm for Pattern Matching Implementation in Javascript

Algorithm Knuth–Morris–Pratt Algorithm also known as KMP Algorithm is a well known algorithm for pattern matching. As per wikipedia ,  In  computer science , KMP  searches for occurrences of a "word"   W   within a main "text string"   S   by employing the observation that when a mismatch occurs, the word itself embodies sufficient information to determine where the next match could begin, thus bypassing re-examination of previously matched characters....

Read Full

ASP.NET Web API — Part 1

Hello All, For   Asp.net   Web API, I am going to write a series of technical articles. Few of them will cover conceptual point, few will cover demos and in few of them, I will try to dig deep into it by covering important technical point like routing, hosting, security stuff. So in this series of articles, Lets start with light node, what is   ASP.NET   Web API and why we should go for it. What ??? So   ASP.NET   Web API is a framework that help in building...

Read Full

What can be the maximum number of rows in a MYSQL Database Table?

Interview Question Series:   This question was asked in one of the top startups interview from one of my friend. Question here is What can be a maximum number of rows that a MYSQL Database table can contain? Suppose you have a MYSQL Database  and a database table in it called users . So this table contains a list of users. Each row in this table contains unique user. So The question is what can be the maximum number of users that can be inserted in user's table. If...

Read Full

Enlisting servers connected to mysql machine

Few days back our DBA updated the DNS entry of one of the slave to point it to newly created machine, with better configuration and disk space. Now we were required to switch all mysql connections (built by our app servers) from old machine to new one. show processlist gave me huge list of connections which made the enlisting of unique servers a tedious task. Hence I spent some time and wrote this query: select count(1), user, substring(host, 1, length(host) -...

Read Full

Binary Search Tree Search a Node Implementation in Javascript

Overview Searching in binary tree is easy as nodes in binary search tree are in sorted order. With each node traversal in binary search tree we skip about half of the tree left to traverse. We have covered insertion in the last post  Binary Search Tree Insert node Implementation in Javascript Now let us see how to search in a binary search tree Algo //Check if the root node's value is equal to the value we are searching for //    If not than move to the left child if node's value...

Read Full

Binary Search Tree Insert node Implementation in Javascript

Overview Binary search trees commonly knows as BST are a special type of trees which are sorted in nature. In binary search tree every node is larger than its left child and smaller than its right child. This feature makes it easy to search, insert and delete a node from binary search tree.  Algo //Check if root node is empty or not //    If yes then assign new node to root //    If not than iterate. Iterate method will check the node value to add from left and right child of...

Read Full

Linked List Node Swapping Implementation in Javascript

Overview You are given a linked list. Write a program for swapping two nodes by value. If you don't know how to create linked list than you can go through previous article  Linked List Insertion Implementation in javascript Example Suppose you are given a linked list 1 -> 3 -> 9 -> 14 -> 17 You need to swap the node having value 3 and 14, So now modified linked list will be 1 -> 14 -> 9 -> 3 -> 17 Implementation //Method to swap two nodes of a...

Read Full

Linked List Size or Count in Javascript

Overview Find size or count of the linked list. You have given a linked list and you need to find out the size of that linked list. There are probably two ways to find out the count of the linked list. 1) By Recursion Method - In this we will recursively call the node and increment the counter. 2) By Iteration Method - In this we will iterate over the linked list and will find out the count. If you don't know how to create linked list than you can go through previous article...

Read Full

Linked List Delete Node By Key in Javascript

Overview To delete a node by key we need to traverse the whole linked until we find a node which has value equal to key and than we can delete that node.  If you don't know how to create linked list than you can go through previous article Linked List Insertion Implementation in javascript Example Suppose You have given a linked list 4 -> 5 -> 7 -> 10 -> 14 1. Now delete the node with key 7. So we will traverse linked list from node by node. and will keep...

Read Full

Linked List Delete Node By Postion in Javascript

Overview To delete a node by position we need to traverse the whole linked list until we reach a position on which we need delete a node. If you don't know how to create linked list than you can go through previous article Linked List Insertion Implementation in javascript Example Suppose You have given a linked list 4 -> 5 -> 7 -> 10 -> 14 1) Now delete the node at position 1 (head is at position 0). So we will traverse linked list from node by node. and...

Read Full

Linked List Introduction

Linked List is a basic data structure. Unlike arrays which have fixed length Linked list have variable length. Thus Linked List have advantage over arrays where we don't know the number of elements to be inserted before hand. Linked list consists of nodes, details of node are as follows. Basic Structure of Linked List node contains Value - The value of the element. Next - Pointer to the next element of the node.  Value Pointer      |           |     V          V...

Read Full

MYSQL NOW Function

MYSQL NOW Overview MYSQL NOW Function is used to return system's current data and time. NOW Function will basically return the date and time of that system on which you are running on your query. If running on your system then Now will return your system's data and time and if you are running this function on any remote server than Now Function will return remote server's data and time. MYSQL NOW Syntax Syntax for MYSQL Now Function is SELECT NOW() FROM table_name;...

Read Full

MYSQL SQRT Function

MYSQL SQRT Overview MYSQL SQRT Function is used to calculate square root of the input values. We can use MYSQL SQRT function while fetching data from database and can return SQRT of any of the column values. MYSQL SQRT Function comes handy when we need to calculate or use square root while processing or making any mysql Query. MYSQL SQRT Function can only be used on positive numbers and not on negative numbers. if you will give negative numbers to MYSQL SQRT Function it...

Read Full

MYSQL LEN Function

MYSQL LEN Overview MYSQL LEN Function is used to return length of the input column text value. LEN function does not include spaces that occurs in the start and end of the string. It means that LEN function will first perform trim function to remove spaces and then MYSQL LEN Function will calculate the length of the string. MYSQL LEN Syntax SELECT LEN(column_name) FROM table_name WHERE [condition]. MYSQL LEN Example Let us have a look at an example of MYSQL LEN function...

Read Full

MYSQL MID Function

MYSQL MID Overview MYSQL MID function is used to return a sub string characters from any text field column on the basis of start point and length of the sub string to return. MID function takes three input column_name => Name of the field from which sub string will be returned. start => Starting point of substring to return. length => Length of characters from start point to return. MYSQL MID Syntax Syntax for MYSQL MID function is...

Read Full

MYSQL LCASE Function

Overview MYSQL LCASE() function is used to return the column value in lower case while fetching data from database. LCASE function will return only input column in lower case not all columns in that table.  Suppose you have to show values from some column in lowercase to user despite of type of case of values store in any particular column, so in that case you have two options either you will fetch data from db and than will convert it to lowercase in your business logic or...

Read Full

MYSQL UCASE Function

MYSQL UCASE() function is used to return the column value in upper case while fetching data from database. UCASE function will return only input column in upper case not all columns in that table. Syntax for UCASE function is SELECT UCASE(column_name) FROM table_name; Let us look more into it with the help of an example Consider table student_list containing details for student. +-----+------------------+--------+-----------+ | sid | name | year |...

Read Full

MYSQL SUM Function

MYSQL Sum Overview MYSQL SUM() function returns the aggregated summation of all the values for input column name. There are lot of real scenario application uses for MYSQL SUM function like calculate total population of a state by finding sum of its city wise population. Other use can be to find out the total salary given by company by finding out the sum of all the employee's salary. Other use case of MYSQL Sum function can be suppose in one table you have list of...

Read Full

MYSQL MAX Function

MYSQL MAX Function is used to find the maximum values for any input column_name. MAX aggregate Function is used to find the maximum value present in any column name like highest salary. Syntax for MAX Function is SELECT MAX(column_name) FROM table_name; Let us look on a example for this, Consider table hostel_list which is containing list of hostel details. +----+-------------------+-----------+----------+ | id | name | occupancy | capacity...

Read Full

MYSQL LAST Function

MYSQL LAST Function returns the last match, value, row or redord for a given condition. Last function is more useful when we have to get what is the last entry in the table for any given condition or situation. Syntax fot MYSQL LAST Function is SELECT LAST(column_name) FROM table_name WHERE [condition]; Let us understand better with an example. Consider student_list table with details for all the students.  +-----+------------------+--------+-----------+ | sid | name...

Read Full

MYSQL FIRST Function

MYSQL FIRST Function returns the first match, value, row or redord for a given condition. First function is more useful when we have to get what is the first entry in the table for any given condition or situation. Syntax fot MYSQL FIRST Function is SELECT FIRST(column_name) FROM table_name WHERE [condition]; Let us understand better with an example. Consider student_list table with details for all the students. +-----+------------------+--------+-----------+ | sid...

Read Full

MYSQL COUNT Function

MYSQL COUNT function is used to return the total number of rows present in any database table. Count function is mainly used where we want to fetch the total number of records in any of the given table. Syntax for MYSQL Count() Function is SELECT COUNT(column_name) FROM table_name WHERE [condition]; Let us take a deeper look at count function with the help of an example Consider table student_list which contains the list of students...

Read Full

MYSQL AVG Function

MYSQL AVG function is used to find out the average value of the column value that is provided as input to AVG function. It will return the aggregated average of all the values. AVG function is quite useful when we are doing some sort of analysis and needs to find the average value such as average salary, or avergae family strength in some city. Syntax for MYSQL AVG function is  SELECT AVG(column_name) FROM table_name; Let us have close look at it with the help...

Read Full

MYSQL Functions

Often we are required to perform lot of aggregations on columns containing string and numeric data. For this purpose MYSQL provides lot of in-built functions.  These MYSQL functions are defined to provide single value for all the aggregations by running functions or operations on the column provided to them as input. MYSQL Provides lot of functions that are listed below MYSQL AVG() Function - MYSQL AVG function will calculate the average value of all the input column values....

Read Full

MYSQL Null Function

Various REDBMS provide MYSQL NULL Functions in different forms. NVL(), IFNULL(), COALESCE() All provide same functionality to treat NULL values as 0.  MYSQL provides ISNULL() function to check whether the given column value passed in this is NULL or not. it gives outcome as 1 if value is NULL and 0 if it is something other than NULL. Syntax for ISNULL() function is SELECT column1_name, ISNULL(column2_name) FROM table_name; IFNULL() and COALESCE() function are used to...

Read Full

MYSQL Auto Increment

MYSQL Auto Increment is used to declare any field as auto increment. Which means that whenever a new record is inserted into the table this value will gets generated by incrementing its value in previous row. Often it is used as a primary key as it generated unique value for each record.  Often when we create a new table. We use to keep an Id field thats purpose is to uniquely define each record. So we can keep this record is auto increment primary key as this will get auto...

Read Full

MYSQL Sub Queries

MYSQL sub queries are referred as a subquery within a query. Subquery is used to fetch values and pass in another query as input. In MYSQL we can write subquery to fetch data and provide that data as input to the other query. Then other query can use that data as a conditions which is provided by subquery. In MYSQL we can use subquery within queries like INSERT, UPDATE, DELETE and SELECT. A Subquery can also be used wit all the MYSQL Operators. Often a Subquery is used to...

Read Full

MYSQL Clone Table

Overview MYSQL Clone Tables can be referred as exact replica of an existing table. And to perform certain operations which you can not apply on original table as it is currenlty used by lot of enitities. For this purpose you can create a clone table of the exisitng table. There are various ways to create clone table. One way of creating a clone table is to use CREATE TABLE AS SELECT command Syntax Syntax for creating a clone table by this way is CREATE TABLE table_name...

Read Full

MYSQL Temporary Table

MYSQL Temporary tables is the functionality provided by various RDBMS. This is used to create temporary tables which provide same funtionalities as of regular tables such as SELECT, UPDATE, INSERT, DELETE options but for the current logged in session only. Temporary tables acts very useful when we need to operate some operation on temporary data for temporary cases. As we know temporary tables only exist for the current logged in session in database so you will not find you...

Read Full

MYSQL Default Constraint

Overview MYSQL Default Constraint is used to set default value for any column in a database table. Column gets populated with the default value if no value is specified while insertion. Syntax Syntax for setting default constraint while creating a table is CREATE TABLE table_name (column1 data_type DEFAULT default_value, column2 data_type); Syntax for setting default value in already created table is ALTER TABLE table_name MODIFY column_name DEFAULT default_value;...

Read Full

MYSQL Wildcards

Overview Special characters are used as wild cards in MYSQL. MYSQL Wildcards are used to fetch data from table with the LIKE clause. We can use LIKE clause with wildcards to match substring or string with some pattern in database table. MYSQL Wildcards are % ==> It matches one or more characters. _ ==> It matches one character. [list_of_characters] ==> In this it applies sets, ranges of string characters. [! or ^list_of_characters] ==> In this this is...

Read Full

MYSQL Expressions

Overview MYSQL Expressions are used to evaluate to a value. MYSQL Expressions can be combination of one or more values, operators and MYSQL functions that evaluate to a value.  Expressions are used to query database for a specific data set. We can assume MYSQL Expressions as formulas that are used in MYSQL Queries to fetch and process data. Syntax Basic syntax for MYSQL Expressions is SELECT * FROM hostel_name where [expressions]; Different kind of MYSQL Expressions are as...

Read Full

MYSQL Indexes

Overview Indexes helps in faster retrieval of data from database table. Database application uses indexes to retrieve data fast. Indexes are separate tables which are used to lookup on database tables to fetch data faster. Indexes are like index that you have in books. If you want to directly go to any chapter or topic than you search for that topic or chapter in index and directly go to that page. This is how index works. We create lookup tables having pointers to our data in...

Read Full

MYSQL Unique Key

Overview Unique Key is used to define uniqueness in data in any column of a table. Primary Key and Unique key both are used to maintain uniqueness in a table.  Despite of lot of same functionalities in primary and unique keys. There are lot of differences as well. Unique key can have null values where as primary key does not. There can be lot of unique keys in a table but only one primary key. A primary key by default has unique constraint in it. Syntax Create Table with...

Read Full

MYSQL Foreign Key

Overview MYSQL Foreign Key constraint is always defined as primary key constraint in another table. Foreign key column can only have those values which are mentioned in another table's primary key column. Foreign key acts as a reference key to the primary key in another table. Foreign key can be a single column or a combination of columns. Syntax Syntax for defining Foreign key is CREATE table table_name (column1 data_type, column2 data type, column1...

Read Full

MYSQL Primary Key

Overview MYSQL Primary Key is a property of column which uniquely defines each row or we can say record in a database table. In a table we can define one or more column as primary key. In simple words we can say that Primary key is a column or a group of column which uniquely defines row in a table. So for no two columns can have same data for a primary key. Primary key column cannot contain null value. Composite Key When two or more than two column combines to form primary...

Read Full

MYSQL Truncate Table

Overview MYSQL Truncate table is used to delete all data inside the database table at once. Unlike delete it deletes all data at once without going to each line one by one leaving the empty table behind. MYSQL Truncate table also makes only one entry in transaction log file. You can say that truncate statement is like delete statement without a where clause to delete all data at once. Syntax Syntax for MYSQL Truncate table statement is TRUNCATE TABLE table_name;...

Read Full

MYSQL Alter Table

Overview SQL Alter table is used to update the database table structure of an existing table. Alter table command can add, delete or modify any of the column in an exisitng table. Lot of time we get a requirement to either add a new column, delete an existing column or change the name, place, data type or data a column can hold, In all such requirement we can use SQL Alter statement. Syntax for SQL Alter statement for add, drop and modify a column is mentioned below in...

Read Full

MYSQL Insert Into Select

Overview MYSQL INSERT INTO SELECT query is used to select data from one table and to copy that selected data into another existing table. Either we can copy all the data or we can also select a subset of data from the table which satisfies the given condition. Largely it is used to take backup or to copy the existing rows, records from one table to another existing table. we can also say that MYSQL INSERT INTO SELECT is used to create new table by copying data from existing table....

Read Full

MYSQL Select Into

Overview MYSQL SELECT INTO query is used to select data from one table and to copy that selected data into new table. Either we can copy all the data or we can also select a subset of data from the existing table which satisfies the given condition. Largely it is used to take backup or to copy the existing rows, records from one table to another new table. we can also say that MYSQL SELECT INTO is used to create new table by copying data from existing table. Syntax Syntax for...

Read Full

MYSQL Using Views

Overview A view is a virtual table stored in database. View can contains all the rows and columns of one or more table combined using a MYSQL Statement. It will act just like a real table, the only difference is that a view is a virtual table not a real table. We can add Where conditions, MYSQL functions and can also use join statements to create a view and than show that view as if data is coming from one single table.  Views are useful in collating the data from different...

Read Full

MYSQL Having Clause

Overview MYSQL Having Clause works with Group BY Clause. Having clause applies the condition on the groups returned by the group by clause. Final rows contains only those groups which passes the having condition. In other words Having Clause will only returns those aggregate values which will meet the Having condition in the select query. Syntax Syntax for Having Clause is SELECT column_names FROM table_name WHERE conditions GROUP BY column_name HAVING [condition]....

Read Full

MYSQL Limit Clause

Overview MYSQL Limit Clause is used to return a subset of the total rows in a table. Limit takes two numbers total results to return and offset (optional). Suppose if you say limit 20,10 than it will return 20 records after first 10 records. MYSQL Limit clause is heavily used in designing pagination features. Syntax Syntax for MYSQL Limit Clause is SELECT column_name FROM table_name LIMIT NUMBER,OFFSET; Example Let us have a look at this with some examples...

Read Full

MYSQL Aliases

Overview MYSQL Aliases are used to temporarily assign a different name to a table and columns headings while they are making a SELECT query. Often when we use Joins on table we use aliases at that time. Aliases are also used to make tables and column names more readable while we are fetching data through comples queries. Syntax Syntax for Aliases for columns and tables are given below SELECT column_name AS temp_column_name FROM table_name; SELECT column_name...

Read Full

MYSQL Null & Not Null Operator

Overview Null values represent a blank values in a database table. Suppose you insert data for four column in table having six column. So at that time the rest of the two columns will have either the null value or the default value if there is any default value set for those column in table. At times when we are working on MYSQL Queries we get the requirement to fetch rows by checking whether the column has Null values or doesnt have null values. So for such requirements...

Read Full

MYSQL Union Clause

Overview MYSQL Union Operator is used to combine select query result for two or more than two tables. As MYSQL Union Opertor combines result set for two or more than two select fetch statements than all the select statement must have same set of columns, same set of columns in expression, same data types with same or different data length. Union operator is used to select only distinct or unique values in default case. If we want to fetch all the possible Union of...

Read Full

Evaluate Postfix Expressions Using Stack In Javascript

Postfix expressions are easy to evaluate in comparison to infix expressions.  What is Infix notation? The expression of the form of   a op b , where operator is in between of bot the operands. What is Postfix notation? The expression of the form of   a b op ,  where both the operands are followed by operator. We have told Infix To Postfix Conversion Using Stack in Javascript  in previous article. Postfix expressions don't have brackets and thus they are easy to evaluate. Here...

Read Full

Minimum number of bracket reversals needed to make an expression balanced

Overview You will be provided a string containing opening and closing brackets, You need to identify that how many reversals is required to balance the brackets. For Ex " {} " this is balanced but this is not "{{{}", You need to make this balanced by doing reversal " }{{{{} " This is not balanced you need 3 reversals to make this a balanced bracket string. " }{}{{{} " This is not a balanced string and you cannot make it as balanced as it...

Read Full

How to Add Comparison Feature in Replace in C-Sharp

Overview In C# we have Replace method that contains 2 overload methods Replace(string,string) Replace(char,char) What if you need to compare the 1 st  parameter (string to be replaced) by using StringComparison.OrdinalIgnoreCase. Example I have a string and I want to change but what when we have “ cusTomiZed” is come in different case like “ customized” var testString="This is my cusTomiZed message"; Console.WriteLine("Old String is...

Read Full

Infix To Postfix Conversion Using Stack in Javascript

Here we go with the javascript program to convert infix to postfix notation. What is Infix notation? The expression of the form of a op b , where operator is in between of bot the operands. What is Postfix notation? The expression of the form of a b op ,  where both the operands are followed by operator. Here we will see the implementation to convert infix notation to postfix notation. As it is also easier for compliers also to read from left to right or from right to left....

Read Full

Command Query Separation (CQS) in C#

CQS is the principle of development where we need to separate c ommand from query. Its a basic rule that a developer must follow. Segregation of command with query is very important.  But question is what are these term ? Command: Which change the state of a system. In event driven programming the function that effect the system's state is command.  The method whose return type are void are supposed to be command type. Example:  A button click event in web form is...

Read Full

Write a method to generate binary numbers from 1 to n

Given a number n, Print all the binary number from 1 to n. Few Examples can be :- 1) n=3 Binary Numbers will be 1 10 11 2) n=7 Binary Numbers will be 1 10 11 100 101 110 111 In a simple way we can also create a decimal to binary method and call that inside a loop from 1 to n. But In this we will be solving this with the help of the Queue Data Structure. To see Queue's Basic Implementation in Javascript read here . Algo...

Read Full

Queue Basic Implementation in Javascript

Basic Methods :- Queue consists of methods like  Enqueue - Method to add an item to queue Dequeue - Method to remove an item from the queue IsEmpty - Method to check whether Queue is empty or not? Rear - Method to fetch the rear pointer of the queue. Front - Method to fetch the front pointer of the queue.  Size - Method to return the size of the queue. For full source code you can follow the link  https://github.com/oyewiki/DataStructures/blob/master/Queue/Queue.js...

Read Full

Stack Basic Implementation in Javascript

Global Variables :- Top - Holds the count of the top element in stack. Stack - Array which holds all the element inside stack. Basic functions :- IsEmpty - Returns true if stack is empty, false if not. Push - Pushes an element to the top of the stack. Pop - Remove and return an element from the top of the stack. Peek - Returns the top element from the stack. Print - Print all the stack elements and some basic property details about stack. Size - Returns the...

Read Full

Linux and Unix More Command

Overview Linux More Command is used to display text from any file one screen at a time. Unlike editors More command doesn't requires to load the whole file a once. This comes handy when we are reading a large file. More command provides a filter for pagination by showing one screenfull text at a time. More command is not as powerful as Less command but it is alsp quite simple and easy to use. Syntax more [-dlfpcsu] [-num] [+/pattern] [+linenum] [file ...] Options...

Read Full

Linux and Unix Free Command

Overview Linux Free command comes handy when we need to find out the free and consumed space in our system. Linux free command displays the total amount of free and used amount of physical as well as swap memory, It also tell us about shared memory, cached memory and memory in buffer. The shared memory column represent either the Shemm value or Mem Shared value. Syntax free [options] Options -b, --bytes Display the amount of memory in bytes....

Read Full

Linux and Unix Uptime Command

Overview Linux Uptime Command is used to tell from how long the system has been running. As per linux manual uptime gives a one line display of the following information. The current time, how long the system has been running, how many users are currently logged on, and the system load averages for the past 1, 5, and 15 minutes. This is the same information contained in the header line displayed by w. System load averages is the average number of processes that...

Read Full

Linux and Unix Reboot Command

Overview Commands like reboot, halt or poweroff are used to reboot or stop the system. These programs are used to reboot, halt or stop the system by system administrator. As per linux manual when these commands are called with --force or when in runlevel 0 or 6, this tool invokes the reboot(2) system call itself (with REBOOTCOMMAND argument passed) and directly reboots the system. Otherwise this simply invokes the shutdown(8) tool with the appropriate arguments without...

Read Full

Linux and Unix Shutdown Command

Command Overview Linux Shutdown command is used to bring the system down. According to linux manual which states as shutdown arranges for the system to be brought down in a safe way. All logged-in users are notified that the system is going down and, within the last five minutes of TIME, new logins are prevented. TIME may have different formats, the most common is simply the word 'now' which will bring the system down immediately. Other valid formats are +m, where m is...

Read Full

Linux and Unix Head Command

Linux Head Command Overview Linux Head Command prints the lines from the top of the file. By default it prints the first 10 lines of a file. If more than one file is given in the input than it shows the top lines from the files precedes by the file name as header. Linux Head Command Syntax head [--options] [file_name(s)] Linux Head Command Options -c, --bytes=[-]K print the first K bytes of each file; with the leading '-', print all but the last K bytes of each file...

Read Full

Linux and Unix LS Command

Linux LS Command Overview Linux LS Command is used give the list of the content in a directory. It list out the files and directory inside any directory and by default it prints them by sorting them alphabettically. It is one of the most common, basic and most used command in a linux. It is pretty much useful if we know all options provided by ls command. Linux LS Command Syntax ls [options]... [File]... Linux LS Command Options -a, --all do not ignore...

Read Full

Linux and Unix SCP Command

Overview scp -- secure copy (remote file copy program) As the name suggests Linux SCP Command is used to securely transfer files from source machine to destination machine. Often we get requirements to transfer some file from remote server to our local machine or say we need to transfer some file from our local machine to our colleague's machine and here file can be a movie as well :D. In such cases we uses we use Linux SCP Command.  Syntax Syntax for Linux SCP Command is...

Read Full

Linux and Unix CP Command

Linux CP Command Overview Linux "cp" command is used to copy file(s) or directory(s) from one directory to another. So Linux "cp" command comes handy when you are restructuring your directory. Linux CP Command Syntax cp [--options] Source Destination-Directory Linux CP Command Examples Consider file sample_file.txt and directory sample_dir and destination directory as /var/www/dest_dir Linux CP Command Example Case 1: Let us copy file...

Read Full

Linux and Unix Chmod Command

Overview Before describing CHMOD Command let us understand a little about the files, how they are structured in linux and who all can access it and what type of access users have on these files. For this we require to use Linux LS command . LS -l Suppose it prints drwxr-xr-x 18 ankur staff 612 Jun 22 09:21 abcDir In this we can break it into several parts. So let us have a look on them drwxr-xr-x It denotes the type directory or file and also denotes what type...

Read Full

Linux and Unix Chown Command

Overview Linux CHOWN command is used to change the owner or/and group of any file or directory. Linux Chown command has the capability to define ownership of any file or directory. Some interesting usage of Linux CHOWN command is  If only owner is provided with CHOWN command than only owner of the file is changes without changing the group of the file. To change both owner as well as group of the file, we need to provide owner and group separated by colon. If only colon group name...

Read Full

Linux and Unix Chgrp Command

Overview Linux CHGRP Command is used to change the group ownership of a file. By using Linux CHGRP command we can change the group recursively for all the files and directories inside. we have also covered CHOWN , CHMOD in previous steps. Syntax chgrp [OPTION]... GROUP FILE... chgrp [OPTION]... --reference=RFILE FILE... Options -c, --changes like verbose but report only when a change is made -f, --silent, --quiet suppress...

Read Full

Linux and Unix Cat Command

Linux Cat Command Overview Linux Cat Command is used to concatenate two or more files. It reads the text from all the files or standard intput and prints on the standard output. There are lot of practical uses of cat command. It can be used to create a new file, concatenate tow or more files, merge two files into one. Linux Cat Command Syntax c at [OPTION]... [FILE]... Linux Cat Command Options -A, --show-all equivalent to -vET -b, --number-nonblank...

Read Full

Linux and Unix Tail Command

Linux Tail Command Overview Linux Tail Command is used to fetch last or we can say latest lines from a file. By default it will return last 10 lines from input file and will show them on standard output. If we will provide more than one file than it will print last 10 lines of each file seperated by header with the respective file name. Linux Tail command is also used to monitor server logs. As when we paas "-f" as a parameter with tail than tail doesnt stop at the end...

Read Full

Linux and Unix RM Command

Overview Linux RM command is used to remove files and directories from the files system. By default it does not removes directories on its own. For deleting directories use --recursive (-r or -R) with Linux RM command. Syntax rm [OPTION]... FILE... Options -f, --force ignore nonexistent files and arguments, never prompt -i prompt before every removal -I prompt once before removing more than three files, or when removing recursively....

Read Full

Linux and Unix MV Command

Linux MV Command Overview Linux " mv " command is used either to rename a file or a directory or move/relocate a file or directory to new location in the file system. So we can use linux mv command to either move a file from source to destination, old to new location or we can rename a file from old to new name. Linux MV Command Syntax mv [--options] Source Destination Linux MV Command Example Consider we have a file with name hostel_list.txt and in a...

Read Full

MYSQL Cartesian Join

Overview MYSQL Cartesian Join returns the cartesian product of two or more joined tables. Thus It joins every row of each table with other tables. Some time Cartesian Join is also referred as Cross Join.  It tends to Join all the rows of each table with every possible row of other tables on the basis of specified conditions. There are other type of Joins as well which are explained in MYSQL Joins . Syntax Syntax for Cartesian Join or Cross Join is Select * from table...

Read Full

MYSQL Self Join

Overview MYSQL Self Join is a join which is used to combine table with itself on the basis of a condition. In MYSQL Self join table will be combined with itself as another table. Syntax Syntax for MYSQL Self join is SELECT tab1.column, tab2.column FROM table tab1, table tab2 WHERE tab1.column1_value = tab2.column2_value;...

Read Full

MYSQL Full Join

Mysql Full Join Overview SQL Full Join will return combination of rows from both the tables on the basis of common field by filling NULL values on non matching rows. Full Join will basically give you a combination of both the tables. Mysql Full Join Syntax Syntax for Full Join is: SELECT left_table.column, right_table.column FROM left_table FULL JOIN right_table ON left_table.field = right_table.field; Mysql Full Join Example Let us have a look with the...

Read Full

MYSQL Right Join

Mysql Right Join Overview Right Join as the name suggests it returns all the result from the right table i.e. table 2 and all the rows that matches the ON clause from left table i.e. table 1. So Right Join will return all the rows from right table and it will return either matching rows from left table or null for non matching rows. Even if it will not find any matching rows in left table at all in that case also it will return all the rows from right table. Mysql Right...

Read Full

MYSQL Left Join

Mysql Left Join Overview Left Join as the name suggests it returns all the result from the left table i.e. table 1 and all the rows that matches the ON clause from right table i.e. table 2. So Left Join will return all the rows from left table and it will return either matching rows from right table or null for non matching rows. Even if it will not find any matching rows in right table at all in that case also it will return all the rows from left table. Mysql Left Join...

Read Full

MYSQL Inner Join

Mysql Inner Join Overview Among all the available MYSQL Joins Inner Join is the most common type of join. Inner Join is used to combine data from two or more tables. Inner Join combines all the data from all the tables having common data and are also fufilling the condition. Inner Join are also known as Equi Join . Let us have a look at an example having two tables Mysql Inner Join Syntax Syntax for SQL Inner Join is SELECT left_table.column, right_table.column...

Read Full

MYSQL Joins

Overview MYSQL joins are used to combine data from two or more database tables on the basis of some common value in the tables. We apply joins by passing where conditions so we can use all the operators applicable with where clause like < , > , <=, >=, !=, <>, between, like, Not, = and lot more. Here we will be explaining 5 types of joins in next few articles MYSQL Inner Join MYSQL Left Join MYSQL Right Join MYSQL Full Join MYSQL Self Join...

Read Full

MYSQL Between Clause

Overview Between Clause is used to check where conditions between two values for a column. You can actually fetch, update, delete data by applying a condition between two values. Syntax Syntax for Between Clause is SELECT * FROM table_name WHERE column_name BETWEEN (Val1, Val2); Example Suppose we want to fetch list of hostels which have max_capacity between 1000 to 3000 students. SELECT * FROM hostel_list where max_capacity BETWEEN 1000 and 3000;...

Read Full

MYSQL In Clause

Overview In clause helps us to apply a range of values or multiple values in a where condition to match with. It is more commonly used when we want to match a column value to any from a group of values. Syntax Syntax for In Clause is SELECT * FROM table_name WHERE column_name in (Val1, Val2, .... ValN); Example Let us consider hostel_list table, which contains the list of hostels with their occupancy and capacity limits....

Read Full

MYSQL Like Clause

Overview Like clause is used with Where clause to apply condition. As the name suggests Like clause is used to fetch all the records where a column matches/contains a word. Syntax Syntax for Like clause is SELECT * FROM table_name where column_name LIKE 'random_value'; Example Suppose we need to find all the hostel name which ends with 'SH' like KAILASH BHAVAN is one of them. So the query for this will be SELECT * FROM hostel_list WHERE name LIKE '%SH %'; In...

Read Full

MYSQL Group By

Overview Group By operator is used for grouping our data on the basis of column values. It is very useful when we want our data to be represented in groups. Syntax Syntax for Group By Operator is SELECT * FROM table_name GROUP BY column_name; Example Suppose we want fetch list of hostels but ir should be in order where all the hostels with same occupancy_type should be toghether. For this we can write MYSQL query like this SELECT * FROM hostel_list GROUP...

Read Full

MYSQL Order By

Overview Order By Operator is used when we want to arrange you results in a particular order. Order by is used against any of the table column in either ascending or descending order. Syntax Syntax is for Order By is SELECT * FROM table_name WHERE ORDER BY column_name [order]. You can pass order value as asc and desc. Asc is used for ascending order and Desc is used for descending order. Example For ex. Consider hostel list table which contains list of hostel...

Read Full

MYSQL Distinct

Overview Distinct Statement is used to find out the distinct values in any of the columns. Syntax Syntax for Distinct Statement is SELECT DISTINCT column_name FROM table_name; Example Let us get a clear picture with the help of an example Consider table hostel_list containing the list of hostels +----+-------------------+-----------+----------+ | id | name | occupancy | capacity | +----+-------------------+-----------+----------+ |  1 | ASHOK BHAVAN |...

Read Full

MYSQL And & Or Operator

Overview While using where condition in mysql query we can use AND and OR operands. Syntax Syntax for using AND and OR operator are SELECT * FROM table_name where [conditions]; Example Let us dig deeper with the help of an example Consider table hostel_list containing list of hostels. +----+-------------------+-----------+----------+ | id | name | occupancy | capacity | +----+-------------------+-----------+----------+ |  1 | ASHOK BHAVAN | 2 |...

Read Full

MYSQL Operators

MYSQL Provide various operators to specify the conditions with Where clause. You can use multiple mysql operators in where clause to connect one or more conditons in your mysql statement. Below is the list of operators that MYSQL provides Arithmetic Operator Comparison Operator Logical Operator Negate Operator...

Read Full

MYSQL Delete Table

Mysql Delete Table Overview Whenever you need to delete anything from your table, you can use Delete command Mysql Delete Table Syntax Syntax for delete command is DELETE FROM table_name where [conditions]; Mysql Delete Table Example Let us look more into this with the help of an example. Let us consider table hostel_list which contains the list of hostel. +----+-------------------+-----------+----------+ | id | name | occupancy | capacity...

Read Full

MYSQL Update Table

Overview When you are required to update any data in the exisitng table you can use mysql update command Syntax Syntax for update data in any table is UPDATE table_name SET col1_name = col1_new_value, col2_name = col2_new_value where [conditions]; Example Let us look into this with the help of an example and consider table hostel_list which contains list of hostels. +----+-------------------+-----------+----------+ | id | name | occupancy | capacity...

Read Full

MYSQL Where Condition

Overview Where condition is used to fetch data from the table on the basis of some conditions on some of the data columns. Syntax Syntax for using where clause is SELECT * FROM table_name WHERE (conditions); Example Let us have a deeper look on this with the help of an example Let us consider our hostel_list table which contains the list of hostels. +----+-------------------+-----------+----------+ | id | name | occupancy | capacity...

Read Full

MYSQL Select Table

Overview To fetch data from database table we use select command. Syntax Syntax for select command is SELECT (Col1, Col2) FROM table_name; Example Let us dig in some of the data that we inserted in insert step in our hostel_list. I have added four hostel details in our list. To select all data in our hostel list table, the mysql query will be SELECT * FROM hostel_list; +----+-------------------+-----------+----------+ | id | name | occupancy...

Read Full

MYSQL Insert Into

Overview Now in previous few steps you were learning how to create , desc and delete table. Now let us see how to insert data into our tables. Insert into command is used to insert data into our tables. Syntax Syntax for insert command is INSERT INTO table_name (Col1, Col2.... ColN) values (Val1, Val2... ValN); Here in this command the number of columns passed should be equal to number of values passed. and Val1 will always corresponds to Col1. That means...

Read Full

MYSQL Drop Table

Overview To remove/delete a sql table from database we use DROP command. Syntax Syntax for dropping a table is  DROP TABLE table_name; Example For ex. If we want to drop abc table create in last step . Than the sql query will be DROP TABLE abc;...

Read Full

MYSQL Create Table Like

Overview Sometimes you can get a requirement where you need to create a new table like an already exiting with different table name. There you can use " create table like " command. Syntax Syntax for create table like command is CREATE TABLE table_name like already_exiting_table_name; CREATE TABLE table_name AS SELECT [COL1, COL2] FROM already_exiting_table_name [WHERE]; Example For ex: If you want to create abc table like hotel_list table...

Read Full

MYSQL Desc Table

Overview To see description, structure, column names and data types of any existing table you can use command Desc table. Syntax Syntax for this is DESC table_name; Example Let us see the table hostel_list that we just created in last step DESC hostel_list; +----------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra...

Read Full

MYSQL Create Table

Overview Table is where database store structured data. For creating a simple or you can say basic database table you need a unique table name in that database and need to define columns and their data types. CREATE TABLE command is used for this purpose. Syntax Syntax for creating a simple database table is CREATE TABLE table_name (column_one data_type, column_two data_type, column_three data_type, primary key(column_name)); Example Now let us create...

Read Full

MYSQL Use Database

Mysql Use Database Overview After logging in to database. Before accessing any data or doing any operation, we are required to select a database. which we do using USE command. Mysql Use Database Syntax Syntax for selecting database is. USE db_name; Mysql Use Database Example As we have created hostel database in previous step than to start using that database we need to select that database. Mysql Use Database Example Case 1: To select hostel database the command...

Read Full

MYSQL Show Database

Overview Previously we have covered Mysql Create Database and Mysql Drop Database . Now let us have a look on Mysql Show command. To see the list of available databases we can use the Show databases command. Syntax Syntax for getting list of databases is SHOW databases; it will give the list of available...

Read Full

MYSQL Drop Database

Mysql Drop Database Overview Drop database command is used to drop an existing database. Admin user rights are required for drop command. MYSQL Drop Database Syntax Syntax for SQL drop database command is DROP DATABASE db_name; Mysql Drop Database Example Say if you want to create hostel database that you created in previous step. DROP DATABASE hostel;...

Read Full

Mysql Create Database

Mysql Create Database Overview Create database command is used to create a new database. Admin user rights are required for creating database. Mysql Create Database Syntax The syntax for SQL create database command is CREATE DATABASE db_name; Mysql Create Database Example Say if you want to create a database with name hostel. CREATE DATABASE hostel;...

Read Full

MYSQL Syntax

MYSQL syntax or query follows a particular rules and regulation which are denoted as MYSQL Syntax. Every MYSQL query starts with standard operators and ends with the semicolon. Some of The Most Important MYSQL Commands CREATE DATABASE - creates a new database ALTER DATABASE - modifies a database CREATE TABLE - creates a new table ALTER TABLE - modifies a table DROP TABLE - deletes a table INSERT INTO - inserts new data into a database SELECT...

Read Full

MYSQL Data Types

MYSQL data types defines what type of data a column can contains. While creating a column you need to define the data type that you would be saving in that column. Through these data types SQL understands what type of data is in column and how to show that data while retrieving that data. Below is the list of various data types and their descriptions. bit  ==> Numeric value, can hold from 0 to 1. tinyint ==> Numeric value, can hold from 0 to 255. smallint...

Read Full

MYSQL RDBMS Concept

RDBMS stands for Relational Database Management System. RDBMS data are stored in database tables, record and fields in structured manner. Each RDBMS table consists of table rows and each row consists of data in the form of fields. RDBMS is collection of data stored in table consisting of rows and columns. RDBMS also provides several operators to define, manipulate the data stored into the tables and indexes. Most RDBMS use SQL as a database query language. Edgar Codd is the one...

Read Full

MYSQL Overview

SQL stands for Structured Query Language. SQL is a language for Computer to manage, process and retrive large amount of data stored in relational database. By using SQL you can execute queries against database, insert new data, update data, can delete and modify data. SQL queries are classified as Data Definition Language (DDL) The standard for group of commands which are used to define structures in a database are called Data Definition Language (DDL). DDL statements such...

Read Full

Linux and Unix Uniq Command

Linux Uniq Command Overview Linux Uniq Command return the uniq content from the input text or from the input file data. It filters out all the duplicate data and thus returning unique data. You can provide input data by using it with some other command such as sort -u | uniq or you can provide input data in a text file to uniq command. Similarly either you can provide its output to some other command as standard output or you can save the output in a file. To summarise It...

Read Full

Linux and Unix Sort Command

Linux SORT Command Overview Linux and Unix sort command is used to sort the data. Either any other command like grep or less can provide input data to sort command or sort can be used to sort data present in a text file. We can provide output of other command to sort command as input. We can also provide data inside text file as a input to sort command Linux SORT Command Syntax Syntax for sort command is SORT [--options] [--input_data] Linux Sort Command Example...

Read Full

SQL DATEDIFF Function

SQL DATEDIFF OVERVIEW SQL DATEDIFF Function is used to calculate difference between two dates. SQL DATEDIFF Function is very useful in cases where you are required to apply any condition by checking differences between two dates. One can use SQL DATEDIFF function with all the SQL SELECT, UPDATE, DELETE, INSERT Statements and all the operators. SQL DATEDIFF SYNTAX SQL Syntax for DATEDIFF Function is SELECT *, DATEDIFF(date_column1, date_column2) FROM table_name;...

Read Full

Linked List Insertion Implementation in Javascript

We told about linked list basic structure in post  Linked List Introduction . In Linked List insertion can be done by adding a node. The value will be the one that we need to insert and next pointer depends on the position on which we are inserting that node.  We can insert a new node in three different ways in linked list. They are as follows Let us first initialise the linked list  "use strict"; var Node = require("./LListNode"); var LinkedList = function(){ ...

Read Full

SQL NOW Function

SQL NOW Overview SQL NOW Function is used to return system's current data and time. NOW Function will basically returnt the date and time of that system on which you are running on your query. If running on your system then Now will return your system's data and time and if you are running this function on any remote server than Now Function will return remote server's data and time. SQL NOW Syntax Syntax for SQL Now Function is SELECT NOW() FROM table_name; SQL...

Read Full

SQL SQRT Function

SQL SQRT Overview SQL SQRT Function is used to calculate square root of the input values. We can use SQL SQRT function while fetching data from database and can return SQRT of any of the column values. SQL SQRT Function comes handy when we need to calculate or use square root while processing or making any sql Query. SQL SQRT Function can only be used on positive numbers and not on negative numbers. if you will give negative numbers to SQL SQRT Function it will return null....

Read Full

SQL LEN Function

SQL LEN Overview SQL LEN Function is used to return length of the input column text value. LEN function does not include spaces that occurs in the start and end of the string. It means that LEN function will first perform trim function to remove spaces and then SQL LEN Function will calculate the length of the string. SQL LEN Syntax SELECT LEN(column_name) FROM table_name WHERE [condition]. SQL LEN Example Let us have a look at an example of SQL LEN function...

Read Full

SQL MID Function

SQL MID Overview SQL MID function is used to return a sub string characters from any text field column on the basis of start point and length of the sub string to return. MID function takes three input column_name => Name of the field from which sub string will be returned. start => Starting point of substring to return. length => Length of characters from start point to return. SQL MID Syntax Syntax for SQL MID function is SELECT...

Read Full

SQL LCASE Function

Overview SQL LCASE() function is used to return the column value in lower case while fetching data from database. LCASE function will return only input column in lower case not all columns in that table. SQL LCASE Syntax Syntax for LCASE function is SELECT LCASE(column_name) FROM table_name; SQL LCASE Example Let us look more into it with the help of an example Consider table student_list containing details for student....

Read Full

SQL UCASE Function

SQL UCASE() function is used to return the column value in upper case while fetching data from database. UCASE function will return only input column in upper case not all columns in that table. Syntax for UCASE function is SELECT UCASE(column_name) FROM table_name; Let us look more into it with the help of an example Consider table student_list containing details for student. +-----+------------------+--------+-----------+ | sid | name | year | hostel_id...

Read Full

SQL SUM Function

Overview SQL SUM() function returns the aggregated summation of all the values for input column name. There are lot of real scenario application uses for SUM function like calculate total population of a state by finding sum of its city wise population. Other use can be to find out the total salary given by company by finding out the sum of all the employee's salary. Other use case can be suppose in one table you have list of purchased goods than you can use sql sum function...

Read Full

SQL MAX Function

SQL MAX Function is used to find the maximum values for any input column_name. MAX aggregate Function is used to find the maximum value present in any column name like highest salary. Syntax for MAX Function is SELECT MAX(column_name) FROM table_name; Let us look on a example for this, Consider table hostel_list which is containing list of hostel details. +----+-------------------+-----------+----------+ | id | name | occupancy | capacity...

Read Full

SQL LAST Function

SQL LAST Function returns the last match, value, row or redord for a given condition. Last function is more useful when we have to get what is the last entry in the table for any given condition or situation. Syntax fot SQL LAST Function is SELECT LAST(column_name) FROM table_name WHERE [condition]; Let us understand better with an example. Consider student_list table with details for all the students.  +-----+------------------+--------+-----------+ | sid | name...

Read Full

SQL FIRST Function

SQL FIRST Function returns the first match, value, row or redord for a given condition. First function is more useful when we have to get what is the first entry in the table for any given condition or situation. Syntax fot SQL FIRST Function is SELECT FIRST(column_name) FROM table_name WHERE [condition]; Let us understand better with an example. Consider student_list table with details for all the students. +-----+------------------+--------+-----------+ | sid | name...

Read Full

SQL COUNT Function

SQL COUNT function is used to return the total number of rows present in any database table. Count function is mainly used where we want to fetch the total number of records in any of the given table. Syntax for SQL Count() Function is SELECT COUNT(column_name) FROM table_name WHERE [condition]; Let us take a deeper look at count function with the help of an example Consider table student_list which contains the list of students...

Read Full

SQL AVG Function

SQL AVG function is used to find out the average value of the column value that is provided as input to AVG function. It will return the aggregated average of all the values. AVG function is quite useful when we are doing some sort of analysis and needs to find the average value such as average salary, or avergae family strength in some city. Syntax for SQL AVG function is  SELECT AVG(column_name) FROM table_name; Let us have close look at it with the help of example....

Read Full

SQL Functions

Often we are required to perform lot of aggregations on columns containing string and numeric data. For this purpose SQL provides lot of in-built functions.  These SQL functions are defined to provide single value for all the aggregations by running functions or operations on the column provided to them as input. SQL Provides lot of functions that are listed below SQL AVG() Function - SQL AVG function will calculate the average value of all the input column values. SQL...

Read Full

SQL Null Function

Various REDBMS provide SQL NULL Functions in different forms. NVL(), IFNULL(), COALESCE() All provide same functionality to treat NULL values as 0.  MYSQL provides ISNULL() function to check whether the given column value passed in this is NULL or not. it gives outcome as 1 if value is NULL and 0 if it is something other than NULL. Syntax for ISNULL() function is SELECT column1_name, ISNULL(column2_name) FROM table_name; IFNULL() and COALESCE() function are used to...

Read Full

SQL Auto Increment

SQL Auto Increment is used to declare any field as auto increment. Which means that whenever a new record is inserted into the table this value will gets generated by incrementing its value in previous row. Often it is used as a primary key as it generated unique value for each record.  Often when we create a new table. We use to keep an Id field thats purpose is to uniquely define each record. So we can keep this record is auto increment primary key as this will get auto...

Read Full

SQL Sub Queries

SQL sub queries are referred as a subquery within a query. Subquery is used to fetch values and pass in another query as input. In SQL we can write subquery to fetch data and provide that data as input to the other query. Then other query can use that data as a conditions which is provided by subquery. In SQL we can use subquery within queries like INSERT, UPDATE, DELETE and SELECT. A Subquery can also be used wit all the SQL Operators. Often a Subquery is used to provide data to...

Read Full

SQL Clone Table

SQL Clone Tables can be referred as exact replica of an existing table. And to perform certain operations which you can not apply on original table as it is currenlty used by lot of enitities. For this purpose you can create a clone table of the exisitng table. There are various ways to create clone table. One way of creating a clone table is to use CREATE TABLE AS SELECT command Syntax for creating a clone table by this way is CREATE TABLE table_name AS SELECT [COL1,...

Read Full

SQL Temporary Table

SQL Temporary tables is the functionality provided by various RDBMS. This is used to create temporary tables which provide same funtionalities as of regular tables such as SELECT, UPDATE, INSERT, DELETE options but for the current logged in session only. Temporary tables acts very useful when we need to operate some operation on temporary data for temporary cases. As we know temporary tables only exist for the current logged in session in database so you will not find you...

Read Full

SQL Default Constraint

SQL Default Constraint is used to set default value for any column in a database table. Column gets populated with the default value if no value is specified while insertion. Syntax for setting default constraint while creating a table is CREATE TABLE table_name (column1 data_type DEFAULT default_value, column2 data_type); Syntax for setting default value in already created table is ALTER TABLE table_name MODIFY column_name DEFAULT default_value; Syntax for...

Read Full

SQL Check Constraint

SQL CHECK Constraint is used to set the range of values that can be set in a column. You can apply CHECK Constraint on any column to set the range of value that can be set in that column while insertiong and updation. Syntax for setting SQL CHECK Constraint is CREATE TABLE table_name (column1_name data_type, column2_name data_type, CHECK (column_name condition)); Syntax for setting CHECK Constraint in already created table is ALTER TABLE table_name ADD...

Read Full

SQL Wildcards

Overview Special characters are used as wild cards in SQL. SQL Wildcards are used to fetch data from table with the LIKE clause. We can use LIKE clause with wildcards to match substring or string with some pattern in database table. SQL Wildcards are % ==> It matches one or more characters. _ ==> It matches one character. [list_of_characters] ==> In this it applies sets, ranges of string characters. [! or ^list_of_characters] ==> In this this is used...

Read Full

SQL Expressions

SQL Expressions are used to evaluate to a value. SQL Expressions can be combination of one or more values, operators and SQL functions that evaluate to a value.  Expressions are used to query database for a specific data set. We can assume SQL Expressions as formulas that are used in SQL Queries to fetch and process data. Syntax Basic syntax for SQL Expressions is SELECT * FROM hostel_name where [expressions]; Different kind of SQL Expressions are as follows SQL Date...

Read Full

SQL Indexes

Overview Indexes helps in faster retrieval of data from database table. Database application uses indexes to retrieve data fast. Indexes are separate tables which are used to lookup on database tables to fetch data faster. Indexes are like index that you have in books. If you want to directly go to any chapter or topic than you search for that topic or chapter in index and directly go to that page. This is how index works. We create lookup tables having pointers to our data in...

Read Full

SQL Unique Key

Overview Unique Key is used to define uniqueness in data in any column of a table. Primary Key and Unique key both are used to maintain uniqueness in a table.  Despite of lot of same functionalities in primary and unique keys. There are lot of differences as well. Unique key can have null values where as primary key does not. There can be lot of unique keys in a table but only one primary key. A primary key by default has unique constraint in it. Syntax Create Table with...

Read Full

SQL Foreign Key

Overview SQL Foreign Key constraint is always defined as primary key constraint in another table. Foreign key column can only have those values which are mentioned in another table's primary key column. Foreign key acts as a reference key to the primary key in another table. Foreign key can be a single column or a combination of columns. Syntax Syntax for defining Foreign key is CREATE table table_name (column1 data_type, column2 data type, column1...

Read Full

SQL Primary Key

Overview SQL Primary Key is a property of column which uniquely defines each row or we can say record in a database table. In a table we can define one or more column as primary key. In simple words we can say that Primary key is a column or a group of column which uniquely defines row in a table. So for no two columns can have same data for a primary key. Primary key column cannot contain null value. Composite Key When two or more than two column combines to form primary key...

Read Full

SQL Truncate Table

Overview SQL Truncate table is used to delete all data inside the database table at once. Unlike delete it deletes all data at once without going to each line one by one leaving the empty table behind. SQL Truncate table also makes only one entry in transaction log file. You can say that truncate statement is like delete statement without a where clause to delete all data at once. Syntax Syntax for SQL Truncate table statement is TRUNCATE TABLE table_name; Examples...

Read Full

SQL Alter Table

Overview SQL Alter table is used to update the database table structure of an existing table. Alter table command can add, delete or modify any of the column in an exisitng table. Lot of time we get a requirement to either add a new column, delete an existing column or change the name, place, data type or data a column can hold, In all such requirement we can use SQL Alter statement. Syntax for SQL Alter statement for add, drop and modify a column is mentioned below in...

Read Full

SQL Insert Into Select

Overview SQL INSERT INTO SELECT query is used to select data from one table and to copy that selected data into another existing table. Either we can copy all the data or we can also select a subset of data from the table which satisfies the given condition. Largely it is used to take backup or to copy the existing rows, records from one table to another existing table. we can also say that SQL INSERT INTO SELECT is used to create new table by copying data from existing table....

Read Full

SQL Select Into

Overview SQL SELECT INTO query is used to select data from one table and to copy that selected data into new table. Either we can copy all the data or we can also select a subset of data from the existing table which satisfies the given condition. Largely it is used to take backup or to copy the existing rows, records from one table to another new table. we can also say that SQL SELECT INTO is used to create new table by copying data from existing table. Syntax Syntax for...

Read Full

SQL Using Views

Overview A view is a virtual table stored in database. View can contains all the rows and columns of one or more table combined using a SQL Statement. It will act just like a real table, the only difference is that a view is a virtual table not a real table. We can add Where conditions, SQL functions and can also use join statements to create a view and than show that view as if data is coming from one single table.  Views are useful in collating the data from different tables and...

Read Full

SQL Having Clause

Overview SQL Having Clause works with Group BY Clause. Having clause applies the condition on the groups returned by the group by clause. Final rows contains only those groups which passes the having condition. In other words Having Clause will only returns those aggregate values which will meet the Having condition in the select query. Syntax Syntax for Having Clause is SELECT column_names FROM table_name WHERE conditions GROUP BY column_name HAVING [condition]....

Read Full

SQL Top Clause

Overview SQL Top Clause is used to return a subset of the total rows in a table. TOP takes a number or a percent as input and will return those data from the table. TOP Clause is not supported by all RDBMS. But Most of the RDBMS provide same funtionality eiher by using TOP CLause or some other clause. Syntax Syntax for TOP Clause is SELECT TOP NUMBER column_name FROM table_name; SELECT TOP PERCENT column_name FROM table_name; MYSQL Provides this functionality...

Read Full

SQL Aliases

Overview SQL Aliases are used to temporarily assign a different name to a table and columns headings while they are making a SELECT query. Often when we use Joins on table we use aliases at that time. Aliases are also used to make tables and column names more readable while we are fetching data through comples queries. Syntax Syntax for Aliases for columns and tables are given below SELECT column_name AS temp_column_name FROM table_name; SELECT column_name...

Read Full

SQL Null & Not Null Operator

Overview Null values represent a blank values in a database table. Suppose you insert data for four column in table having six column. So at that time the rest of the two columns will have either the null value or the default value if there is any default value set for those column in table. At times when we are working on SQL Queries we get the requirement to fetch rows by checking whether the column has Null values or doesnt have null values. So for such requirements we...

Read Full

SQL Union Clause

Overview SQL Union Operator is used to combine select query result for two or more than two tables. As SQL Union Opertor combines result set for two or more than two select fetch statements than all the select statement must have same set of columns, same set of columns in expression, same data types with same or different data length. Union operator is used to select only distinct or unique values in default case. If we want to fetch all the possible Union of select...

Read Full

SQL Cartesian Join

Overview SQL Cartesian Join returns the cartesian product of two or more joined tables. Thus It joins every row of each table with other tables. Some time Cartesian Join is also referred as Cross Join.  It tends to Join all the rows of each table with every possible row of other tables on the basis of specified conditions. There are other type of Joins as well which are explained in SQL Joins . Syntax Syntax for Cartesian Join or Cross Join is Select * from table...

Read Full

SQL Self Join

Overview SQL Self Join is a join which is used to combine table with itself on the basis of a condition. In SQL Self join table will be combined with itself as another table. Syntax Syntax for SQL Self join is SELECT tab1.column, tab2.column FROM table tab1, table tab2 WHERE tab1.column1_value = tab2.column2_value;...

Read Full

SQL Full Join

Overview SQL Full Join will return combination of rows from both the tables on the basis of common field by filling NULL values on non matching rows. Full Join will basically give you a combination of both the tables. Syntax Syntax for Full Join is: SELECT left_table.column, right_table.column FROM left_table FULL JOIN right_table ON left_table.field = right_table.field; Examples Let us have a look with the help of following table i) hostel_list containing list...

Read Full

SQL Right Join

Overview Right Join as the name suggests it returns all the result from the right table i.e. table 2 and all the rows that matches the ON clause from left table i.e. table 1. So Right Join will return all the rows from right table and it will return either matching rows from left table or null for non matching rows. Even if it will not find any matching rows in left table at all in that case also it will return all the rows from right table. Syntax Syntax for SQL Right Join is...

Read Full

SQL Left Join

Overview Left Join as the name suggests it returns all the result from the left table i.e. table 1 and all the rows that matches the ON clause from right table i.e. table 2. So Left Join will return all the rows from left table and it will return either matching rows from right table or null for non matching rows. Even if it will not find any matching rows in right table at all in that case also it will return all the rows from left table. Syntax Syntax for SQL Left Join is...

Read Full

SQL Inner Join

Overview Among all the avaialable SQL Joins Inner Join is the most common type of join. Inner Join is used to combine data from two or more tables. Inner Join combines all the data from all the tables having common data and are also fufilling the condition. Inner Join are also known as EquiJoin . Let us have a look at an example having two tables Syntax Syntax for SQL Inner Join is SELECT left_table.column, right_table.column FROM left_table INNER JOIN right_table...

Read Full

SQL Joins

Overview SQL joins are used to combine data from two or more database tables on the basis of some common value in the tables. We apply joins by passing where conditions so we can use all the operators applicable with where clause like < , > , <=, >=, !=, <>, between, like, Not, = and lot more. Here we will be explaining 5 types of joins in next few articles SQL Inner Join SQL Left Join SQL Right Join SQL Full Join SQL Self Join SQL Cartesian...

Read Full

SQL Between Clause

Overview Between Clause is used to check where conditions between two values for a column. You can actually fetch, update, delete data by applying a condition between two values. Syntax Syntax for Between Clause is SELECT * FROM table_name WHERE column_name BETWEEN (Val1, Val2); Example Suppose we want to fetch list of hostels which have max_capacity between 1000 to 3000 students. SELECT * FROM hostel_list where max_capacity BETWEEN 1000 and 3000;...

Read Full

SQL In Clause

Overview In clause helps us to apply a range of values or multiple values in a where condition to match with. It is more commonly used when we want to match a column value to any from a group of values. Syntax Syntax for In Clause is SELECT * FROM table_name WHERE column_name in (Val1, Val2, .... ValN); Example Let us consider hostel_list table, which contains the list of hostels with their occupancy and capacity limits....

Read Full

SQL Like Clause

Overview Like clause is used with Where clause to apply condition. As the name suggests Like clause is used to fetch all the records where a column matches/contains a word. Syntax Syntax for Like clause is SELECT * FROM table_name where column_name LIKE 'random_value'; Example Suppose we need to find all the hostel name which ends with 'SH' like KAILASH BHAVAN is one of them. So the query for this will be SELECT * FROM hostel_list WHERE name LIKE '%SH %'; In...

Read Full

SQL Group By

Overview Group By operator is used for grouping our data on the basis of column values. It is very useful when we want our data to be represented in groups. Syntax Syntax for Group By Operator is SELECT * FROM table_name GROUP BY column_name; Example Suppose we want fetch list of hostels but ir should be in order where all the hostels with same occupancy_type should be toghether. For this we can write SQL query like this SELECT * FROM hostel_list GROUP BY...

Read Full

SQL Order BY

Overview Order By Operator is used when we want to arrange you results in a particular order. Order by is used against any of the table column in either ascending or descending order. Syntax Syntax is for Order By is SELECT * FROM table_name WHERE ORDER BY column_name [order]. You can pass order value as asc and desc. Asc is used for ascending order and Desc is used for descending order. Example For ex. Consider hostel list table which contains list of hostel...

Read Full

SQL Distinct

Overview Distinct Statement is used to find out the distinct values in any of the columns. Syntax Syntax for Distinct Statement is SELECT DISTINCT column_name FROM table_name; Example Let us get a clear picture with the help of an example Consider table hostel_list containing the list of hostels +----+-------------------+-----------+----------+ | id | name | occupancy | capacity | +----+-------------------+-----------+----------+ |  1 | ASHOK BHAVAN |...

Read Full

SQL AND & OR Operator

Overview While using where condition in sql query we can use AND and OR operands. Syntax Syntax for using AND and OR operator are SELECT * FROM table_name where [conditions]; Example Let us dig deeper with the help of an example Consider table hostel_list containing list of hostels. +----+-------------------+-----------+----------+ | id | name | occupancy | capacity | +----+-------------------+-----------+----------+ |  1 | ASHOK BHAVAN | 2 |...

Read Full

SQL Operators

SQL Provide various operators to specify the conditions with Where clause. You can use multiple sql operators in where clause to connect one or more conditons in your sql statement. Below is the list of operators that SQL provides Arithmetic Operator Comparison Operator Logical Operator Negate Operator...

Read Full

SQL Delete Table

Overview Whenever you need to delete anything from your table, you can use Delete command Syntax Syntax for delete command is DELETE FROM table_name where [conditions]; Example Let us look more into this with the help of an example. Let us consider table hostel_list which contains the list of hostel. +----+-------------------+-----------+----------+ | id | name | occupancy | capacity | +----+-------------------+-----------+----------+ |  1 | ASHOK BHAVAN...

Read Full

SQL Update Table

Overview When you are required to update any data in the exisitng table you can use sql update command Syntax Syntax for update data in any table is UPDATE table_name SET col1_name = col1_new_value, col2_name = col2_new_value where [conditions]; Example Let us look into this with the help of an example and consider table hostel_list which contains list of hostels. +----+-------------------+-----------+----------+ | id | name | occupancy | capacity...

Read Full

SQL Where Condition

Overview Where condition is used to fetch data from the table on the basis of some conditions on some of the data columns. Syntax Syntax for using where clause is SELECT * FROM table_name WHERE (conditions); Example Let us have a deeper look on this with the help of an example Let us consider our hostel_list table which contains the list of hostels. +----+-------------------+-----------+----------+ | id | name | occupancy | capacity...

Read Full

SQL Select Table

Overview To fetch data from database table we use select command. Syntax Syntax for select command is SELECT (Col1, Col2) FROM table_name; Example Let us dig in some of the data that we inserted in insert step in our hostel_list. I have added four hostel details in our list. To select all data in our hostel list table, the sql query will be SELECT * FROM hostel_list; +----+-------------------+-----------+----------+ | id | name | occupancy...

Read Full

SQL Insert Into

Overview Now in previous few steps you were learning how to create , desc and delete table. Now let us see how to insert data into our tables. Insert into command is used to insert data into our tables. Syntax Syntax for insert command is INSERT INTO table_name (Col1, Col2.... ColN) values (Val1, Val2... ValN); Here in this command the number of columns passed should be equal to number of values passed. and Val1 will always corresponds to Col1. That means...

Read Full

SQL Drop Table

Overview To remove/delete a sql table from database we use DROP command. Syntax Syntax for dropping a table is  DROP TABLE table_name; Example For ex. If we want to drop abc table create in last step . Than the sql query will be DROP TABLE abc;...

Read Full

SQL Create Table Like

Overview Sometimes you can get a requirement where you need to create a new table like an already exiting with different table name. There you can use " create table like " command. Syntax Syntax for create table like command is CREATE TABLE table_name like already_exiting_table_name; CREATE TABLE table_name AS SELECT [COL1, COL2] FROM already_exiting_table_name [WHERE]; Example For ex: If you want to create abc table like hotel_list table...

Read Full

SQL Desc Table

Overview To see description, structure, column names and data types of any existing table you can use command Desc table. Syntax Syntax for this is DESC table_name; Example Let us see the table hostel_list that we just created in last step DESC hostel_list; +----------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra...

Read Full

SQL Create Table

Overview Table is where database store structured data. For creating a simple or you can say basic database table you need a unique table name in that database and need to define columns and their data types. CREATE TABLE command is used for this purpose. Syntax Syntax for creating a simple database table is CREATE TABLE table_name (column_one data_type, column_two data_type, column_three data_type, primary key(column_name)); Example Now let us create...

Read Full

SQL Use Database

Overview After logging in to database. Before accessing any data or doing any operation, we are required to select a database. which we do using USE command. Syntax Syntax for selecting database is. USE db_name; Example As we have created hostel database in previous step than to start using that database we need to select that database. To select hostel database the command will be. USE hostel. For any reason if hostel database doesn't exist. we will get an...

Read Full

SQL Show Database

Overview To see the list of available databases we can use the Show databases command. Syntax Syntax for getting list of databases is SHOW databases; it will give the list of available...

Read Full

SQL Drop Database

Overview Drop database command is used to drop an existing database. Admin user rights are required for drop command. Syntax Syntax for SQL drop database command is DROP DATABASE db_name; Example Say if you want to create hostel database that you created in previous step. DROP DATABASE hostel;...

Read Full

SQL Create Database

Overview Create database command is used to create a new database. Admin user rights are required for creating database. Syntax The syntax for SQL create database command is CREATE DATABASE db_name; Example Say if you want to create a database with name hostel. CREATE DATABASE hostel;...

Read Full

SQL Data Type

SQL data types defines what type of data a column can contains. While creating a column you need to define the data type that you would be saving in that column. Through these data types SQL understands what type of data is in column and how to show that data while retrieving that data. Below is the list of various data types and their descriptions. bit  ==> Numeric value, can hold from 0 to 1. tinyint ==> Numeric value, can hold from 0 to 255. smallint ==>...

Read Full

SQL Syntax

SQL syntax or query follows a particular rules and regulation which are denoted as SQL Syntax. Every SQL starts with standard operators and ends with the semicolon. Some of The Most Important SQL Commands CREATE DATABASE - creates a new database ALTER DATABASE - modifies a database CREATE TABLE - creates a new table ALTER TABLE - modifies a table DROP TABLE - deletes a table INSERT INTO - inserts new data into a database SELECT - retrieves data...

Read Full

SQL RDBMS Concept

RDBMS stands for Relational Database Management System. RDBMS data are stored in database tables, record and fields in structured manner. Each RDBMS table consists of table rows and each row consists of data in the form of fields. RDBMS is collection of data stored in table consisting of rows and columns. RDBMS also provides several operators to define, manipulate the data stored into the tables and indexes. Most RDBMS use SQL as a database query language. Edgar Codd is the one...

Read Full

SQL Overview

SQL stands for Structured Query Language. SQL is a language for Computer to manage, process and retrive large amount of data stored in relational database. By using SQL you can execute queries against database, insert new data, update data, can delete and modify data. SQL queries are classified as Data Definition Language (DDL) The standard for group of commands which are used to define structures in a database are called Data Definition Language (DDL). DDL statements such...

Read Full