Wednesday, February 21, 2018

How to imporve programming Skills

In this post you will understand how can i improve programming skills.Programming(coding) is just a part of process of problem solving, You should need to understand the underlying problem and efficient solution within given constraint.Constantly find small problems that you care about which can be solved programmatically and practice, practice, practice.

So i will better tell you,how to be better at problem solving:

Step 1: Learn

Programming Language & Computer science fundamental :-
 First & foremost ,you should be proficient in any one of the popular languages(C/C++/Java/Python), I will advise you to chose between c++ or Java ,since both are widely accepted across all coding competitions and have better resources to get yourself trained. Apart from knowing the language
make sure you are pretty good in debugging and testing your own written code
with all the scenarios.

Some of the Resources you can go through it to improve your coding skills:

CodingBat java:    www.codingbat.com/java
coursera c++:       www.coursera.org/course/cplusplus4c

Data Structure and Algorithm:-
You can be a good programmer if you know a programming language well but to become a great programmer you need to understand underlying data structure and algorithms.

Learn all the basic data structures - array, list, tree, graph, trie, dictionary/map, set, etc.
Learn the advanced data structures whatever you can - suffix array, suffix tree etc.
Implement data structures in whatever languages you know.
Understand the basic operations (read, write, etc,) time complexity for those data structures.
Understand the strength & weaknesses of each of those.
Remember the data structure support by the language libraries (STL, classes etc.).

Algorithms:
  • Learn all the easy algorithms - sorting, searching, graph algos, etc.
  • Learn all the advanced algorithms whatever you can - dynamic programming, backtracking, etc.
  • You need to master algorithm complexity computation.
  • You need to learn how to design your custom algorithm as per the need.
  • Keep implementing lots of algorithms

Step 2: Practice

Improve your speed and accuracy in coding by participating in various online resources.

STEP 3: Propagate

Form a study group and keep practicing daily. Try developing your own algorithms/applications; try answering a few questions on Stack Overflow.You can even organize workshops for the juniors in your college.

Finally i could say the following key points:

  1. Write a lots of code, compile, run, debug.
  2. Read lots of code authored by others, may be from popular open source projects.
  3. Keep learning new languages, new data structures, new algorithms, new tools year after year.


If your really love this blog share to your friends and follow the for more updates.


Saturday, February 17, 2018

switch statement in C

In this post you will learn about switch case statement in C programming language.The control statement that allows us to make a decision from the number of choices is called a  switch statement.Switch statement is a control statement that allows us to choose only one choice among the many given choices. The expression in switch evaluates to return an integral value, which is then compared to the values present in different cases. It executes that block of code which matches the case value. If there is no match, then default block is executed(if present).
The general form of switch statement is:

switch(integer expression)
{
    case value-1:
        block-1;
        break;
    case value-2:
        block-2;
        break;
    case value-3:
        block-3;
        break;
    case value-4:
        block-4;
           break;
    default:
           default-block;
        break;
}

Example:

#include<stdio.h>
void main( )
{
    int a, b, c, choice;
    while(choice != 3)
    {
        /* Printing the available options */
        printf("\n 1. Press 1 for addition");
        printf("\n 2. Press 2 for subtraction");
        printf("\n Enter your choice");
        /* Taking users input */
        scanf("%d", &choice);
      
        switch(choice)
        {
            case 1:
                printf("Enter 2 numbers");
                scanf("%d%d", &a, &b);
                c = a + b;
                printf("%d", c);
                break;
            case 2:
                printf("Enter 2 numbers");
                scanf("%d%d", &a, &b);
                c = a - b;
                printf("%d", c);
                break;
            default:
                printf("you have passed a wrong key");
                printf("\n press any key to continue");
        }
    }
}

Example 2:

int main()
{
int i;
printf("enter an integer");
scanf("%d",&i);
switch(i)
{
case 1: printf("one");
            break;
case 2: printf("two");
            break;
case 3: printf("three");
            break;
case 4: printf("four");
             break;
default: printf("invalid number");
}
return 0;
}
There are some things that you simply cannot do with a  switch .
These are:

(a)  A float expression cannot be tested using a  switch 
(b)  Cases can never have variable expressions (for example it is
wrong to say  case a +3 :  )
(c)  Multiple cases cannot use same expressions.

Thursday, February 15, 2018

How to do final year project for Computer Science students

In this post you will learn the procedure to make final projects for computer science students.
There are four main phases in developing a final year project:

  1. Choosing the right project
  2. Planning and execution of the project
  3. Documentation of the project
  4. Management of the project

Given that you are going to spend a lot of time working on your project, it is essential that you pick a project which you like and which you are capable of doing. It is important to note that these are not necessarily the same things: just because you like a particular project does not mean you are qualified to do it.

Planning and execution of the project

The main activities that comprise of this phase of project development are:


1. Identifying a problem to be solved

2. Generating project requirements

3. Developing a computational model for the solution

4. Performing system analysis

5. Designing of the system

6. Implementing and Integrating the modules

7. Testing the solution

8. Documenting the project

9. Managing the project

A detailed explanation of the above activities is given here:

Steps involved in planning and executing a final year project

Documentation of the project

It is extremely important that you document your work at every stage of your project. The best way to organize your writing is to keep a log book of all work in progress. Every thought and observation you have on your project should go into this book, along with notes of meetings with your supervisor, results, theoretical developments, calculations, everything. This log book will become an invaluable source of material when you come to write up your project in the final report. However, don’t wait until the end of the project to begin the process of formal documentation. Write a formal report on completion of each phase of the project. These reports will become an excellent basis for your final report.

Management of the project

One of them most important things you will learn when doing your project is the need to manage your time. Final Year Projects require a considerable amount of time. A project schedule is an indispensable tool: building it forces you into thinking about all the things you need to do, their inter-relationships, the time each will take, and what each one will be used for. In drawing up your project schedule, you may find it useful to use a standard project management tool (such as Microsoft Project). These tools make it easy to draw the schedule and to track your progress. However, they won’t do the planning for you, i.e. they can’t identify tasks, subtasks, effort, duration, etc. That’s something you have to do yourself.

Wednesday, February 14, 2018

Personality Development tips for students

Personality is defined as the blend of qualities that makes a person unique from the other folks. It mostly arises from within and makes you who you are. Your personality is judged by your way of talking, confidence,values, behavior and education which makes you interesting and likeable to be with.

First of all it is very important to understand what type of personality you have and then improve and work on it.

So the first thing is to know yourself. Analyze your strengths and weakness. Identify areas you need to work on. Be sincere with yourself.

  1. Have a positive approach to life and situations. Don't just say positive things, but also think positive. Your thoughts, words and action all need to be positive. Try to find some thing positive from every situation.
  2.  Learn some new talents, hobbies. Try to do something which you have been avoiding or postponing. Then next time when there is a chance to show your new talent, deliver in front of all.
  3. Share your opinions and ideas with others. Do not be afraid to speak up. This will boost your confidence.
  4. If you are shy, try socialing. Meet new people and involve yourself into large number of things.
  5. Find time to read, listen to something motivational everyday. Even if it is for 10 minutes, it is enough for the day.
  6. If you speak too much, try to listen to others as well. When we listen to others there is greater chance for us to learn something new. Pay full attention when others are speaking and do not get distracted.
  7. Mind your body language. Non verbal communication is as important as verbal communication to enhance your personality. Always walk straight, do not droop. Maintain eye contact while speaking. Your voice should be soft and not very loud and well pitched.
  8. Pay attention to your attire. Always dress as per occasion. This will give nice impression and also boost your looks and confidence. Wear well maintained polished footwear also.
  9. Be confident of yourself. Always wear a smile on your face.
  10. Manage time properly. Fit in daily tasks well so that you have time for leisure also.
  11. Learn some negotiation skills and some conflict management skills.
Watch Video for more information: How to improve personality Development Tips

What are the highest paid Government jobs in India

In this post you will know the highest paid government jobs in India.While every government job in India offers decent remunerations and job benefits here are some that really stand out in the terms of salary and respect earned.

1- IAS/ IFS/ IPS - The administrative services is undoubtedly the most well paid job in India, not only does it pay a good salary but also are highly respectable.

2- State Public Service Commission - After the UPSC come the SPSCs, equally respectable if not equally well paid jobs like the IAS and others.

3- Defense Services - Army always take care of there men, and a good package is one such way of ensuring that. But more than anything else the sheer volume of respect that an officer gets makes it totally worth it.

4- Public Sector Banks - Apart from the above mentioned the public sector banks also offer a decent salary to people joining as POs, Clerks or Specialist Officers.

5- Energy and Petroleum PSUs, Railways - In case you are an engineer, this should be a dream job for you. Junior Engineers at various PSUs and the Railways are also some of the highest paid professionals in India.

6-Professor in University: Respected profession with highest pay band in government sector.

7-Scientist (NASA, ISRO, DRDO, Research Labs): Highly talented and highly paid brains in government research labs.

8-Judicial Services (Justice Of India, Justice In High Courts, District Judge): Government high officials used to keep in highest pay bracket.

9-MLA, MP: Your highness government can withdraw high pay as per their wish and can enjoy maximum government provided facilities

However, A good pay package is not a gift it needs to be earned, and to earn it one must successfully compete with Lakhs of aspirants who take the entrance exams  every year and to do be successful you must start your preparation now.

Top Technology trends in 2018

Technology has become a necessity rather than a desire. There are several emerging tech trends that’ll shape a big part of our business and lifestyle in the year 2018.We are surrounded by technology at almost every front of our lives.

Technological innovations are exciting as they promise to change the way the world currently functions. These innovations lead to a better and a more comfortable life for people. Since the last few decades, technology has experienced exponential growth and continues to do so. Technology is a part of our everyday life, right from using showers that provide us the ability to have infotainment while we take a shower to self-driven cars, technology has never failed to amaze its users. Every day there is a possibility of technology coming up with an innovation that was not present just the day before. So, here are five tech trends to watch out for in 2018!.



Taking intelligent things to a new level:

Artificial intelligence and machine learning communicate allows machines to communicate with their users in a manner that eases the user’s life. Artificial intelligence is the base of all smart things that know how to behave in accordance to human expectations and how to learn from them. In the past few months, the creation of bots has been on a rise. As AI is improving itself, people can hope to get introduced to bots and smart devices that understand the concept of collaboration and communication with each other.

Expanding reach of blockchain

Decentralization stands as one of the critical features of blockchain technology. Blockchain as technology has experienced tremendous growth and applications of blockchain exist across numerous industries. There were still few industries that are untouched by the blockchain industry and soon we could experience how blockchain can advance in other sectors thus, easing out our lives.
 
Enlightening lives with big data

We are in the age of information and organizations are collecting data to help us in times when we need this information the most. During the last few years, big data has experienced impeccable growth and achieved applications across industry with only one aim - making human life better. Often businesses have ample information that can help them increase sales, but they fail in data management. In 2018, people and CTOs can expect more companies to evolve their data management techniques and be able to maintain weight between data control and accessibility.
Taking cloud storage higher

When people refer to cloud storage, flexibility is the first word that comes to their minds. In the last few years, the speed at which cloud storage is growing is being appreciated by organizations across industries. In 2018, people can expect their storage facilities to be faster than the conventional methods.
Converting everything to smart things

IoT is driven by innovation and is a technology that has supplied the world with exceptional products. Some of these products include smartwatches, smartphones, smart TVs, and smart cars. Looking at these products, saying that almost everything can be converted to intelligent things would not be wrong.

These smart devices operate by themselves, without any human intervention, and have led to a more automated human lives. In 2018, people can expect these devices to take a massive leap by automating and converting things that are not smart currently, into smarter things.

Monday, February 12, 2018

What are the Career Opportunities after studying Computer Engineering

In this post you will know, what to do after completion of engineering or graduate.Being a good computer engineer can get you a numerous job options.
 Computer science is one of the country’s hottest and most in-demand professional fields, the Bureau of Labor Statistics projected an 18 percent growth nationally for all computer occupations between 2012 and 2022.

Software developers, applications - 23%
Software developers, systems software - 20%
Computer network architects - 15%
Network and computer system admins - 12%
Computer network support specialist - 7%
Computer hardware engineers - 7%

Talk about web development there are three roles that are currently in demand by the IT industry:

Front-end development : HTML, CSS, JavaScript and Angular.js
Back-end development: Ruby, Python, R, Node.js, Cloud etc.
MEAN Stack/Full Stack development :MongoDB, Express.js, Angular.js, Node.js

Here’s to ease your research - giving you few names of the platforms that provides you the learning skills on the latest technology. MOOCs such as Udemy, Edureka, edWisor and Simplilearn etc. are examples of such platforms.

Udacity: they offer upgraded curriculum and great learning skills, certifications and nano degrees, hire talent source but still no job assurance.
 
Udemy:  good learning skills, live sessions and just certifications but no job assurance.
 
edWisor : a career path, good learning skills, technical sessions, projects and hands-on experience plus a job assurance.
Simplilearn : skills on the said technologies but limit itself only till certifications and no job assurance.





 

what is the best laptop i can buy as a CS student

In this post you will know which is the best laptop for computer science students.The very basic thing a programmer need is to a laptop which has good speed. The focus should be on the processor speed, it should be minimum 2GHZ or more. The laptop RAM should not be less than 4GB.

The most basic of laptops will get the job done, so anything above that is for your own comfort. To be honest, you can just use the school's lab computers. However, my philosophy has been to go for a lightweight laptop with long battery life, as high a resolution screen as you can get, and a good keyboard.

  • Apple MacBook Pro 13" or MacBook Air (11" or 13")
  • Dell Vostro 1440, 3450, and V131
  • Lenovo Thinkpad T and X series
  • Toshiba Portege R830 and R835

The MacBooks are nice , but you'll probably load Windows on them, just to keep things easy. Keep in mind that you will buy something new when you graduate, so plan your purchase around what you can afford to replace in 2 years. Processing power, HD capacity, etc. are not important, especially for a computer that can easily get stolen or broken.

Also, if you end up taking any digital logic courses, you will want a few extra USB ports and will definitely need Windows, because most of the IDEs for FPGAs and micro controllers are only available on Windows.

The very basic thing a programmer need is to a laptop which has good speed. The focus should be on the processor speed, it should be minimum 2GHZ or more. The laptop RAM should not be less than 4GB.

WHAT TO LOOK FOR IN A LAPTOP FOR PROGRAMMING?

The very basic thing a programmer need is to a laptop which has good speed. The focus should be on the processor speed, it should be minimum 2GHZ or more. The laptop RAM should not be less than 4GB.

Laptop Starting price in India:



I will say the specs or some of the features to watch out for when buying a laptop. Because, the same model with the same specs is not available in all parts of the world.

CPU : Intel i5/i7 (6th/7th gen preferably, and buy one with a quad-core rather than a dual-core processor)

RAM : Minimum 8 gigs, buy one with 1*8 GB rather than 2*4 GB , with an expandable slot.

Display : Full HD (either 13.3 or 15.6 inches) , you’ll clear notice that there’s a great difference between the 1366*768 and the 1920*1080 displays.

GPU -:Nvidia GTX series graphics (only if you are a gamer and do some heavy Photoshop work, else the built in Intel HD graphics would suffice)

HDD :1 Terabyte. SSD’s are costlier, but they reduce boot time.

Backlit keyboard : They are definitely useful when you work during late hours. The keyboard layout is very important since certain laptops with tightly packed keys are not comfortable for typing.

OS :Instead of buying one with Windows, choose one with the DOS or Linux. It will definitely save you few thousand bucks and you can always install an OS later as per your wish.

Ports -:USB 3.0, HDMI ports are a must, type-C port is a bonus.
Laptops with ultrabays are better since they can be used in multiple ways (GPU/Optical Drive/SSD)

Optical drive : Not necessary as the CD’s and DVD’s are replaced by USB drives nowadays.

The Macbooks are very good for programming but if you are looking for a laptop for coding/designing/playing games/watching movies you should consider an alternative. The Thinkpad series of Lenovo, Envy series of Hewlett-Packard and the Dell ultrabooks are very good options to consider for CS students.

Thursday, February 8, 2018

JQuery Interview Questions and answers

In this post you will learn frequently asked JQUERY interview questions for freshers and Experienced candidates.

1. what is jQuery?
ans: JQuery is javascript library or javascript framework which helps in how to traverse HTML documents,to do animations,and add Ajax interaction to any web page. It is mainly used to reduce lines of code as huge code written in javascript,can be done easily with JQuery in few lines.

2. What does $ mean in JQuery?
 ans: Dollar sign is nothing but it's an alias for jQuery. see the below jQuery code

$(document).ready(function)
{
});

here $ sign can be replaced with "jQuery"keyword like
jQuery(document).ready(functioin)
{
}); 

3)What are the advantage of using jQuery?
ans:
  • Easy to use and learn.
  • Easily expandable.
  • Cross-browser support (IE 6.0+, FF 1.5+, Safari 2.0+, Opera 9.0+)
  • Easy to use for DOM manipulation and traversal.
  • Large pool of built in methods.
  • AJAX Capabilities.
  • Methods for changing or applying CSS, creating animations.
  • Event detection and handling.
  • Tons of plug-ins for all kind of needs.
4)Why you should be using jQuery?
Ans:
Based on the manipulation of the HTML DOM (Document Object Model) and designed to simplify the client-side scripting of HTML, jQuery incorporates parts of HTML and CSS. Thousands of companies and individuals are on the jQuery bandwagon, and you should be, too.

5)How JavaScript and jQuery are different?
ans:
jQuery is not a programming language but a well written JavaScript code. It is a library/framework built with Javascript. It is very popular because it (nearly universally) abstracts away cross-browser compatibility issues and it emphasises unobtrusive and callback-driven Javascript programming. Javascript is the core programming language.

6)How you will use Jquery means requirement needed for using jquery?
ans:
Nothing more need to do just olny download jquery library(.js file) from any of the jquery site Download jquery and just linked with your html pages like all other javascript file
as follows:
code:
< script src="jquery.js" language="javascript" type="text/javascript">

7)How do you select an item using css class or ID and get the value by use of jquery?
ans:
If an element of html like < div> , < p> or any tag have ID MyId and class used MyClass then we select the element by below jquery code

Code:
$('#MyId') for ID and for classs $('.MyClass')
and for value
Code:
var myValue = $('#MyId').val();
// get the value in var Myvalue by id
Or for set the value in selected item
Code:
$('#MyId').val("print me");
// set the value of a form input

8)How to get the server response from an AJAX request using Jquery?
ans:
When invoking functions that have asynchronous behavior We must provide a callback function to capture the desired result. This is especially important with AJAX in the browser because when a remote request is made, it is indeterminate when the response will be received.
Below an example of making an AJAX call and alerting the response (or error):
Code:
$.ajax({
     url: 'EmpRecords.php',
     success: function(response) {
        alert(response);
     },
     error: function(xhr) {
        alert('Error!  Status = ' + xhr.status);
     }
});

9)What is $(document).ready() function? Why should you use it?
ans:
This is one of the most important and frequently asked jQuery Interview question. The ready() function is used to execute code when document is ready for manipulation. jQuery allows you to execute code, when DOM is fully loaded i.e. HTML has been parsed and DOM tree has been constructed. Main benefit of $(document).ready() function is that, it works in all browsers, jQuery handles cross browser difficulties for you.

10)Difference between JavaScript window.onload event and jQuery ready function?
ans:

Main difference between JavaScript onload event and jQuery ready function is that former not only waits for DOM to be created but also waits until all external resources are fully loaded including heavy images, audios and videos. If loading images and media content takes a lot of time, the user can experience significant delay on execution of code defined in window.onload event.

On the other hand jQuery ready() function only waits for the DOM tree, and does not wait for images or external resource loading, which means faster execution. Another advantage of using jQuery $(document).ready() is that you can use it multiple times in your page, and browser will execute them in the order they appear in HTML page, as opposed to onload technique, which can only be used for a single function. Given this benefits, it’s always better to use jQuery ready() function than JavaScript window.onload event.

11)what are the different types of selectors in JQuery?
ans:
There are 3 types of selectors in jquery
1.css selector
2.XPath selector
3.Custom selector

12)How can you select all elements in a page using jquery?
ANS:
To select all elements in a page,we can use all selectors,for that we need to use * symbol

code:
<script language="javascript" type="text/javascript">
$("*").css("border","2px dotted blue");
</script>

13)What are jQuery Events?
ans:
Events are actions performed on a specific condition that are used for dynamic web pages. When we perform these actions on an HTML page, we can do whatever we want. We use some event handlers to perform the action. Some important handlers are bind(), unbind(), blur(), off(), hover(), on(), one(), ready(), trigger() etc.

14)What are jQuery plugins and what is the advantage of using a plugin?
ans:
A plug-in is piece of code written in a standard JavaScript file. These files provide useful jQuery methods which can be used along with jQuery library methods. jQuery plugins are quite useful as its piece of code which is already written by someone and re-usable, which saves your development time.

15)What is the difference between .empty(), .remove() and .detach() methods in jQuery?
ans:

All these methods .empty(), .remove() and .detach() are used for removing elements from DOM but they all are different.

.empty(): This method removes all the child element of the matched element while remove() method removes set of matched elements from DOM.

.remove(): We use .remove() when we want to remove the element itself, as well as everything inside it. In addition to the elements themselves, all bound events and jQuery data associated with the elements are removed.

.detach(): This method is the same as .remove(), except that .detach() keeps all jQuery data associated with the removed elements. This method is useful when removed elements are to be reinserted into the DOM at a later time.

16)What is the difference between bind() and live() method in jQuery?
ans:
The binding of event handlers are the most confusing part of jQuery for many developers working on jQuery projects. Many of them unsure of which is better to use. In this article we will see the main differences between Bind and Live methods in jQuery.

Bind() Method
The bind method will only bind event handlers for currently existing items. That means this works for the current element.

$(document).ready(function () { 
$('p').bind('click', function () {
alert("Example of Bind Method"); 
e.preventDefault();
  }); 
 
Live() Method
The Live method can bind event handlers for currently existing items or future items.

$(document).ready(function() {
$('P').live('click', function() { 
alert("Example of live method");
e.preventDefault(); 
});
$('body').append(''); });

17)What is the difference between eq() and get() methods in jQuery?
ans:
eq() returns the element as a jQuery object. This method constructs a new jQuery object from one element within that set and returns it. That means that you can use jQuery functions on it.

get() returns a DOM element. The method retrieves the DOM elements matched by the jQuery object. But it is a DOM element and it is not a jQuery-wrapped object. So jQuery functions can’t be used.

Wednesday, February 7, 2018

PHP Login Form using Session

In this post you will learn login form source code using session without storing details in the database. In our next post you will see login form using session storing details in database.

Step 1: First create login page named as index.php

<?php>
session_start();    // Session start
if(isset($_POST['check']))    // Check form submit with IF Isset function
{
$username="lucky";    // set variable value
$password="123";        // set variable value
if($_POST['username']==$username && $_POST['password']==$password)   // Check Given user name, password and Variable user name password are same
{
$_SESSION['username']=$username;    // set session from given user name
header('location:mainpage.php');
}
else
{
$err="Authentication Failed Try again!";
}
}
?>
 <html>
<head>
<title>Main Page</title>
</head>
<body>
<Center>
<?php if(isset($err)){ echo $err; } ?>      <!-- Print Error -->

<form method="POST" name="loginauth" target="_self">
 User Name: <input name="username" size="30" type="text" />
<br/><br/>
Pass Word: <input name="password" size="20" type="password" />
<br/><br/>
<input name="check" type="submit" value="Authenticate" />
 </form>
</center>
</body>
</html>

Step 2: Now create mainpage.php

<?php
session_start();    //session start
if(!isset($_SESSION['username']))     //if session not found redirect to homepage
{
header('location:index.php');
}
echo "Welcome &nbsp;";
echo $_SESSION['username'];      //retrieved using session
?>
 <html>
<head>
</head>
<body>
<center>
<h2>Welcome to Main page</h2>
<a href="logout.php">logout</a>
</center>
</body>
</html>

Step 3: Now create LOGOUT.PHP page for destroy the session

<?php
session_start();
if(!isset($_SESSION['username']))     //if session not found redirect to homepage
{
header('location:index.php');
}
unset($_SESSION['username']);       // Session Found Unset the variable values
session_destroy();                  // Destroy the session
header('location:index.php');
?>


OUTPUT: