Easy Python Installation 

Easy Python Installation 

STEP 1:

  • Install the Python 2.7.* or 3.* Binaries from python.org
  • You can download the latest Python bits here from the official Python homepage.
  • I typically installPython 2.7.* via the Windows x86 Installer and that is what I recommend. 
  • Here’s a direct link to the release page for the latest versionof Python as of writing this (2.7.3)- it has an X86 installer .  
  •  Once you’ve successfully run the Python installer, you should see the following icons appear in your start menu or if you’re using Windows 8 like me, on your home screen: 

               

                  python Installation step – 1

  • Once you have access to the Python command line and IDLE, you’re ready to move onto next step

STEP-2:

  • In order to make it so you can access Python via any command line prompt (and not just the Python-specific one), you’ll need to add the newly-installed Python 2.7 directory to your “Path” system environment variable.
  • This makes it easier to access Python and run scripts in whatever shell you’re using to using (Command Prompt, PowerShell,and my personal favorite: Git Bash.)
  • So, go to Control Panel –> System Properties –> Environment  Variables and select the PATH

    STEP-2                           python Installation STEP-2

    •  Click Edit

    STEP-3

    • And append the Python path to the end of the string – the default path will be something like
    • C:\Python27.
    • Also make sure you include the C:\Python27\Scripts in the Path too even if it doesn’t exist yet – this is where your package management tools, unit testing tools, and other command line-accessible Python programs will live.
    • With that in place, you can now start the Python interpreter on any command prompt by invoking the python command.
    •  Let’s get our package manager set up for Python.

    STEP-3:

    • Install pip to Manage Your Python Packages
    • There’s a couple of different options for package management in Python –pip is the one that doesn’t suck.
    • Pip makes it trivial for us to install Python packages, like Requests.
    •  And we’re going to have to install packages pretty often if we’re working with third party tools and libraries, so this is a must-have.
    • Pip has a detailed set of instructions on how to install it from source– if you don’t have the curl command on your system, just use your Git or even your web browser to download the source filementioned in their instructions.

    Step-4:

    • Once you have pip installed, you need to grab one last package –virtualenv.
    • Packages in Python are installed globally by default – which means that when a package dependency changes for one project running in a given Pythonenvironment, it changes for all of them. Not good!
    • virtualenv restores order to the universe by allowing you to create virtual Python environments, so you don’t have to worry about version conflicts between projects.
    • And now that you have pip up and running on your system, it’s trivial to install virtualenv via the command line:
    • C:\> pip install virtualenv
    • And you’re done!
    HOW TO LOCK AND UNLOCK THE FOLDER IN WINDOWS USING COMMAND PROMPT 

    HOW TO LOCK AND UNLOCK THE FOLDER IN WINDOWS USING COMMAND PROMPT 

    Hi. Its Salman here .Today I will show you how to lock and unlock a folder using windows batch file programming. This will create a new folder,import the items into the folder created .Once you click the folder the folder get locked and disappeared. Here is the batch file program. Read the below steps carefully

    1. cls
    2.  @ECHO OFF
    3.  title Folder Secure
    4.  if EXIST “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” goto UNLOCK
    5.  if NOT EXIST Secure goto MDLOCKER
    6.  :CONFIRM
    7.  echo Are you sure you want to lock the folder(Y/N)
    8.  set/p “cho=>”
    9.  if %cho%==Y goto LOCK
    10.  if %cho%==y goto LOCK
    11.  if %cho%==n goto END
    12.  if %cho%==N goto END
    13.  echo Invalid choice.
    14.  goto CONFIRM
    15.  :LOCK
    16.  ren Secure “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
    17.  attrib +h +s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
    18.  echo Folder locked
    19.  goto End
    20.  :UNLOCK
    21.  echo Enter the Password to unlock folder
    22.  set/p “pass=>”
    23.  if NOT %pass%== password goto FAIL
    24.  attrib -h -s “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}”
    25.  ren “Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}” Secure
    26.  echo Folder Unlocked successfully
    27.  goto End
    28.  :FAIL
    29.  echo Invalid password
    30.  goto end
    31.  :MDLOCKER
    32.  md Secure
    33.  echo Secure created successfully
    34.  goto End
    35.  :End
    • Copy this code and save it with  .bat  extension .
    • Once you click the batch file you will see the folder named secure .
    • You should import the files you need hide to this folder.
    • You can also change the name of the folder in replacing all the occurrence of Secure with the name you want.
    • Initially the password to open the folder Secure password.
    • You can change the password in line 23 by replacing password with password you want. 

     Thank you. 

    Login Form Using Javascript,Ajax

    Login Form Using Javascript,Ajax

    Hai. It’s salman here. Today I show you how to create a login Form Using Ajax, php and Javascript. 

    <!DOCTYPE html>
    <html>
    <head>
    <title>Submit Form Using AJAX PHP and javascript</title>

    http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js

    <link href=”css/style.css” rel=”stylesheet”>

    http://script.js

    </head>
    <body>

    Submit Form Using AJAX,PHP and javascript

    Fill Your Information!

    Name :

    Email :

    Password :

    Contact No :

    </form>

    </div>

    </div>–>

    </form>

    </div>

    </div>
    </body>
    </html>
    PHP File: ajaxjs.php
    <?php
    // Fetching Values From URL
    $name2 = $_POST[‘name1′];
    $email2 = $_POST[’email1′];
    $password2 = $_POST[‘password1’];
    $contact2 = $_POST[‘contact1’];
    $connection = mysql_connect(“localhost”, “root”, “”); // Establishing Connection with Server..
    $db = mysql_select_db(“mydba”, $connection); // Selecting Database
    if (isset($_POST[‘name1’])) {
    $query = mysql_query(“insert into form_element(name, email, password, contact) values (‘$name2’, ‘$email2’, ‘$password2′,’$contact2’)”); //Insert Query
    echo “Form Submitted succesfully”;
    }
    mysql_close($connection); // Connection Closed
    ?>
    JAVASCRIPT File: script.js

    javascript file consist of ajax functionality.
    function myFunction() {
    var name = document.getElementById(“name”).value;
    var email = document.getElementById(“email”).value;
    var password = document.getElementById(“password”).value;
    var contact = document.getElementById(“contact”).value;
    // Returns successful data submission message when the entered information is stored in database.
    var dataString = ‘name1=’ + name + ‘&email1=’ + email + ‘&password1=’ + password + ‘&contact1=’ + contact;
    if (name == ” || email == ” || password == ” || contact == ”) {
    alert(“Please Fill All Fields”);
    } else {
    // AJAX code to submit form.
    $.ajax({
    type: “POST”,
    url: “ajaxjs.php”,
    data: dataString,
    cache: false,
    success: function(html) {
    alert(html);
    }
    ajaxRequest.open(“GET”, “login.php”, true)
    });
    }
    return false;
    }