Sharecodepoint popular queries
Search results for Code
Showing posts with label Code. Show all posts

Saturday, 22 October 2016

Jobs, Events, Companies, Recruitment, Employment, Job Portal Website in PHP & MySQL

Fastjob  allows you to manage categories and job listings, event, companies and etc. Fastjob provides advanced search, front-end forms for ...
Fastjob  allows you to manage categories and job listings, event, companies and etc. Fastjob provides advanced search, front-end forms for job and resume submission.



Features FastJob :


Post a Job
  • Post a job in easy steps and start receiving applications the same day.
  • Save time and receive most relevant responses using our intelligent filter technology.
  • Post unlimited free jobs.
  • Fill the form and start getting quality applications in your inbox within an hour.
  • Independent & specialized Job Posting solutions (Full Time/Contract/Walk-In) for all hiring needs.
  • Select the type of job posting as per your need.

Manage Responses
  • Create your very own centralized database of responses, accessible from anywhere.
  • Shortlisting made easier. See the most relevant resumes first.
  • Get unlimited responses.
  • Efficient and cost-effective way to manage responses online.
  • Online database for searching resumes.
  • Hire the right, relevant candidates almost instantly through Minaukri.com.
  • Innovative recruitment solutions now on the mobile.

Registered Job-seeker Benefits
  • Get Jobs regularly in your inbox.
  • Thousands of recruiters search our database daily to find candidates. Get found by them.
  • Apply in one click to more than 10,000 jobs*.
  • Get contacted by over 5,000 Recruiters.
  • Follow Companies that can hire you.
  • Ask any query from experts
  • Search for current as well as old events.
  • Post unlimited events


Screen Shots of Main Page 


Build your network
Find out where your friends work or who works at a better company and get directly introduced by one of your network contact.

Find your dream company or let it find you
Expand your network significantly and create more work opportunities by following companies and discussions on various topics that you are interested in.

Stay on top of your career
Showcase your work experience, but more important, your work achievements and recommendations from your work colleagues and clients.

Buy Minaukri Website : sharecodepoint@gmail.com.com

Tuesday, 11 October 2016

Make online quizzes template for website using html , css and javascript

In this tutorial, we will show you how to make an online quiz using HTML, CSS  and the least  Javascript usage. There are so many websites ...
In this tutorial, we will show you how to make an online quiz using HTML, CSS  and the least  Javascript usage. There are so many websites available to provide the online quizzes code but their codes are very difficult to understand as well as difficult to implement. You can easily make online quizzes with the help of simple tags of HTML, CSS, and a bit of javascript.

In the above demo screenshot, I've created only 1 question with 4 multiple choice answers. You can create as many as you like. If you want to add a new question, you just need to copy the code. There is no need to write the code again.

In this quiz system, we used just a bit of javascript. If you don't know how to write/ use  HTML, CSS and javascript, don't worry, i will give you the entire code. If you want to learn html, css and javascript then visit the below links. Here you can learn basic concepts of HTML, CSS and many more languages.

HTML Tutorials : HTML Introduction

CSS Tutorials : CSS Introduction

JavaScript Tutorials: JavaScript Introduction

Let us start to make quiz system :

HTML Code 
Design the structure of quiz. Here,we have 2 div elements. First div class "class="scp-quizzes-main"" is main div  to control the quiz structure.  Second div "class="scp-quizzes-data"" is used to control the quiz questions and answers.
<div class="scp-quizzes-main">
<div class="scp-quizzes-data">
  <h3>1. What is the output of the below c code?</h3>
    <pre>#include&lt;stdio.h> 
main() 
{
   int x = 5;
   
   if(x=5)
   { 
      if(x=5) printf("Fast");
   } 
   printf("learning");
}</pre>
<br/>
    <input type="radio" id="Fastlearning" name="question1">
       <label for="Fastlearning">1. Fastlearning</label><br/>
    <input type="radio"  name="question1">
       <label>2. learning</label><br/>
    <input type="radio" name="question1">
       <label>3. learningFast</label> <br/>
    <input type="radio" name="question1">
     <label>4. Fast</label> 
 </div>
Ratios button is used for multiple answers.  4 radio buttons with the same name are used for each question.
Note : The label for="answer" and input id ="answer" is  written with same name to display the correct answer. To make any option as correct answer, write its label for=" answer" and input id ="answer".

CSS Code
This CSS used for the radio button to change the radio button style.
input[type=radio] {
    display:none; 
}
input[type=radio] + label {
    display:inline-block;
 width:95%;
 padding:10px;
 border:1px solid #ddd;
 margin-bottom:10px;
 cursor:pointer;
}
input[type=radio] + label:hover{ border:1px solid #000000;}
input[type=radio]:checked + label { 
   background-image: none;
   background-color:#0C0;
 color:#fff;
 border:1px solid #0C0 !important;
 -webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}

Wrong answer style
.worngans{ background-color:#F36;color:#fff; border:1px solid #F36 !important;-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
-ms-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;}
JavaScript Code
jquery.min.js Javascript files will need to be referenced on the page your quiz is on, in order for the quiz to work. To reference, you'll need to add this line between the opening and closing head tags.
<script src="http://www.fastlearning.in/controller/js/jquery-1.9.1.min.js"></script>

This is the javascript where the wrong answer is specified. Add this javascript code between the opening and closing head tags.
<script type="text/javascript">
 $(document).ready(function() {
    $('label').click(function() {
        $('label').removeClass('worngans');
        $(this).addClass('worngans');
    });
});
</script>

If you have any doubts regarding the creation of an android app then leave your doubts in the comment box.

Thursday, 14 July 2016

Send Email In PHP using PHP Function, Simple E-Mail and Mail Form

Email is the most popular Internet service today. A plenty of emails are sent and delivered each day. The goal of this tutorial is to demon...
Email is the most popular Internet service today. A plenty of emails are sent and delivered each day. The goal of this tutorial is to demonstrate how to generate and send emails in PHP.

So, you want to send automated email messages from your PHP application. This can be in direct response to a user's action, such as signing up for your site, or a recurring event at a set time, such as a monthly newsletter. Sometimes email contains file attachments, both plain text and HTML portions, and so on. To understand how to send each variation that may exist on an email.

Note that to send email with PHP you need a working email server that you have permission to use: for Unix machines, this is often Sendmail; for Windows machines, you must set the SMTP directive in your php in file to point to your email server.

PHP allows you to send e-mails directly from a script.

The PHP mail() Function 
The PHP mail() function is used to send emails from inside a script.

Syntax
mail(to, subject, message, headers, parameters)

ParameterDescription
toRequired. Specifies the receiver / receivers of the email
subjectRequired. Specifies the subject of the email.
Note: This parameter cannot contain any newline characters
messageRequired. Defines the message to be sent. Each line should be separated with a LF (\n). Lines should not exceed 70 characters
headersOptional. Specifies additional headers, like From, Cc, and Bcc. The additional headers should be separated with a CRLF (\r\n)
parametersOptional. Specifies an additional parameter to the sendmail program
Note: For the mail functions to be available, PHP requires an installed and working email system. The program to be used is defined by the configuration settings in the php in file.

PHP Simple E-Mail
The simplest way to send an email with PHP is to send a text email.
In the example below we first declare the variables ($to, $subject, $message, $from, $headers), then we use the variables in the mail() function to send an e-mail:
<?php
$to = "emailexample@sharecodepoint.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "someonelse@abc.com";
$headers = "From:" . $from;
if(mail($to,$subject,$message,$headers))
{
echo "Mail Sent.";
}else{
echo "Unable to send email";
}
?>
PHP Mail Form
With PHP, you can create a feedback-form on your website. The example below sends a text message to a specified e-mail address:
<html>
<body>

<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
  {
  //send email
  $email = $_REQUEST['email'] ;
  $subject = $_REQUEST['subject'] ;
  $message = $_REQUEST['message'] ;
  mail("someone@example.com", $subject,
  $message, "From:" . $email);
  echo "Thank you for using our mail form";
  }
else
//if "email" is not filled out, display the form
  {
  echo "<form method='post' action='mailform.php'>
  Email: <input name='email' type='text'><br>
  Subject: <input name='subject' type='text'><br>
  Message:<br>
  <textarea name='message' rows='15' cols='40'>
  </textarea><br>
  <input type='submit'>
  </form>";
  }
?>

</body>
</html>
This is how the example above works:
  • First, check if the email input field is filled out
  • If it is not set (like when the page is first visited); output the HTML form
  • If it is set (after the form is filled out); send the email from the form
  • When submit is pressed after the form is filled out, the page reloads, sees that the email input is set, and sends the email

Note: This is the simplest way to send e-mail, but it is not secure.
About Developer
Sandeep Singh
I am Programmer and I love to implementing new ideas in the workplace

Wednesday, 11 May 2016

Create a Notepad in Java

This tutorial is on how to create a simple Notepad application in Java.  A simple notepad that supports files openings, creations, savings ...
This tutorial is on how to create a simple Notepad application in Java.  A simple notepad that supports files openings, creations, savings and save as document. It also support Select All/Cut/Copy/Paste/Font Size/ Family/Style/Check the File Size/  operations. Another operations supported are letter count and lines count operations. Download Source Code

Notepad project is a desktop application which is implemented in Java platform.You can download Notepad desktop application project in Java with source code . This Java Project is for desktop mini and major project with source code.  This source code is imported in eclipse, netbeans for application development.

The only difference being that, this editor has been created using JAVA for the front-end interface. The text edited in the editor is stored in the desired location.

Notepad in Java features: 
  • Menu Bar for File, Edit, Format and View.
  • To create a new document.txt file.
  • Save a .txt file.
  • Edit texts with cut, copy and paste function with dialog box .
  • Format texts with Changing the font size , font family and font style.
  • View file Status With Size , Count the number of lines and Count the letter.

Step 1:
Firstly import the package of java files.
import java.io.*;
import java.util.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.applet.Applet;

java.io.*; package :- The java.io package contains nearly every class you might ever need to perform input and output (I/O) in Java.

java.util.*; package :-  contains the collections framework, legacy collection classes, event model, date and time facilities, internationalization, and miscellaneous utility classes.

java.swing.*; package :-  javax. (Java X) The prefix used for a package of Java standard extensions. For example, javax.servlet contains the classes and interfaces for running servlets, while javax.ejb is the standard extension for Enterprise JavaBeans.

java.awt.*; package :- provides classes for AWT api such as TextField, Label, TextArea, RadioButton, CheckBox, Choice, List etc.

java.awt.event.*; package :- Changing the state of an object is known as an event. For example, click on button, dragging mouse etc. The java.awt.event package provides many event classes and Listener interfaces for event handling.

java.applet.Applet.*; package :- Applet is a special type of program that is embedded in the webpage to generate the dynamic content. It runs inside the browser and works at client side.

Step 2:
First we want to create  a class :notepad .  Inside the notepad class, we will create our objects within notepad constructor. We want a TextArea which is the area containing the file information and MenuBar containing the MenuItems like :- File, Edit and etc. The JFrame will lead to our Notepad class which will contain the Notepad code.
public class notepad extends KeyAdapter  implements ActionListener, KeyListener
{
 
 static int active =0;
 static int fsize=17;
 
 JFrame frame1;
 JMenuBar npMenuBar;
 JMenu file, edit, format, view;
 JMenuItem newdoc, opendoc, exit, savedoc, saveasdoc, copydoc, pastedoc, remdoc,  fontfamily, fontstyle, fontsize, status;
 JTextArea maintext;
 JTextField title;
 Font font1;
 JPanel bottom;
 JLabel details, pastecopydoc;
 JList familylist, stylelist, sizelist;
 JScrollPane sb;

 String familyvalue[]={"Agency FB","Antiqua","Architect","Arial","Calibri","Comic Sans","Courier","Cursive","Impact","Serif"};
 String sizevalue[]={"5","10","15","20","25","30","35","40","45","50","55","60","65","70"};
 int [] stylevalue={ Font.PLAIN, Font.BOLD, Font.ITALIC };
 String [] stylevalues={ "PLAIN", "BOLD", "ITALIC" };
 String ffamily, fsizestr, fstylestr;
 int fstyle;
 int cl;
 int linecount;
 String tle ;
 String topicstitle = "";
 JScrollPane sp;
 
notepad(){

 frame1 = new JFrame("Notepad Fast");

 font1=new Font("Arial",Font.PLAIN,17);

 bottom = new JPanel();
 details = new JLabel();
 pastecopydoc = new JLabel();

 familylist = new JList(familyvalue);
 stylelist = new JList(stylevalues);
 sizelist = new JList(sizevalue);


 familylist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
 sizelist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
 stylelist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

 bottom.add(details);

 maintext = new JTextArea();

 sp=new JScrollPane(maintext);
 title = new JTextField(100);

 sb = new JScrollPane(maintext);

 maintext.setMargin( new Insets(5,5,5,5) );

 maintext.setFont(font1);
 frame1.add(maintext);

 npMenuBar = new JMenuBar();

 file = new JMenu("File");
 edit = new JMenu("Edit");
 format = new JMenu("Format");
 view = new JMenu("View");

 newdoc = new JMenuItem("New Document");
 opendoc = new JMenuItem("Open Document");
 savedoc = new JMenuItem("Save Document");
 saveasdoc = new JMenuItem("Save As Document");
 exit = new JMenuItem("Exit");

 copydoc = new JMenuItem("Copy Document");
 remdoc = new JMenuItem("Remove Document");
 pastedoc = new JMenuItem("Paste Document");

 fontfamily = new JMenuItem("Set Font Family");
 fontstyle = new JMenuItem("Set Font Style");
 fontsize = new JMenuItem("Set Font Size");
 status = new JMenuItem("Status");

 file.add(newdoc);
 file.add(opendoc);
 file.add(savedoc);
 file.add(saveasdoc);
 file.add(exit);

 edit.add(copydoc);
 edit.add(pastedoc);
 edit.add(remdoc);

 format.add(fontfamily);
 format.add(fontstyle);
 format.add(fontsize);

 view.add(status);

 npMenuBar.add(file);
 npMenuBar.add(edit);
 npMenuBar.add(format);
 npMenuBar.add(view);

 frame1.setJMenuBar(npMenuBar);
 frame1.add(bottom, BorderLayout.SOUTH);

 newdoc.addActionListener(this);
 copydoc.addActionListener(this);
 pastedoc.addActionListener(this);
 remdoc.addActionListener(this);
 status.addActionListener(this);
 savedoc.addActionListener(this);
 saveasdoc.addActionListener(this);

 fontfamily.addActionListener(this);
 fontsize.addActionListener(this);
 fontstyle.addActionListener(this);

 exit.addActionListener(this);

 maintext.addKeyListener(this);

 frame1.setSize(600,600);     
 frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 frame1.setLocationRelativeTo(null);
 frame1.setVisible(true);
}
For each option, we created a ActionListener and give the appropriate code for each.

Step 3:
Create the ActionPerformed method and then give the command to perform the action.
public void actionPerformed(ActionEvent ae)
{
 if(ae.getSource()== newdoc)
 {
 frame1.setTitle("New Document.txt");
 maintext.setText("");
 }
 else if (ae.getSource()== copydoc)
 {
  String texts= maintext.getText();
  pastecopydoc.setText(texts);
  JOptionPane.showMessageDialog(null, "Copy Text "+texts);
 }
 else if(ae.getSource()== remdoc)
 {
  maintext.setText("");
  JOptionPane.showMessageDialog(null, "Removed");
 }
 else if (ae.getSource() == pastedoc)
 {
  if(maintext.getText().length() != 0)
  {
   maintext.setText(maintext.getText());
  }
  else
  {
  maintext.setText(pastecopydoc.getText());
  }
 }
 else if(ae.getSource()== status)
 {
  try{
   if(active ==0)
   {
    File f = new File(tle+".txt");
    details.setText("Size: "+f.length());
   }
  }
  catch (Exception e)
  {
   
  }
 }
 else if (ae.getSource()== fontfamily)
  {

     JOptionPane.showConfirmDialog(null, familylist, "Choose Font Family", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
  ffamily=String.valueOf(familylist.getSelectedValue());
  font1=new Font(ffamily,fstyle,fsize);
  maintext.setFont(font1);
  }
 else if (ae.getSource()== fontstyle)
  {

     JOptionPane.showConfirmDialog(null, stylelist, "Choose Font Style", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
  fstyle=stylevalue[stylelist.getSelectedIndex()];
  font1=new Font(ffamily,fstyle,fsize);
  maintext.setFont(font1);
  }
 else if (ae.getSource()== fontsize)
  {

     JOptionPane.showConfirmDialog(null, sizelist, "Choose Font Size", JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);
  fsizestr=String.valueOf(sizelist.getSelectedValue());
  fsize =Integer.parseInt(fsizestr);
  font1=new Font(ffamily,fstyle,fsize);
  maintext.setFont(font1);
  }
 else if(ae.getSource()==exit)
  {
   frame1.dispose();
  }
 
}

Step 4:
Create the keyTyped method. This method is to count the letters and lines with keyboard's key press.
public void keyTyped(KeyEvent ke){
 cl= maintext.getText().length();
 linecount = maintext.getLineCount();
 details.setText("Length: "+cl+" Line: "+linecount);
}
Step 5:
public static void main(String ar[]) 
{
  new notepad();
}
}
Project Complete!
That's it! Below is the full code .Download the files. Thanks for reading!

 

Version 23.2.3.4 - 2016 - 2020 - © Sharecodepoint | Made in India. | Copyright Content | Facebook | Twitter | Instagram | Youtube