• Friday, February 28, 2014

    VB6: How to get all including hidden, system folders and files?

    Syed Masoom Rizvi
    There is a very easy way of getting all folders and files from a folder, drive including hidden and system files/folders..

    Step1: Create a new project
    Step2: Add a command button
    Step3: Add a listbox
    Step4: Copy and paste this code in your project


    1. Private Sub Command1_Click()
    2. Dim myfiles As String, mypath As String
    3. mypath = "C:\"
    4. myfiles = Dir(mypath, vbNormal + vbDirectory + vbHidden + vbSystem)
    5. Do While myfiles <> ""
    6. List1.addItem myfiles
    7. myfiles = Dir()
    8. Loop
    9. End Sub

    JQuery $.post function - jquery to load data from the server using HTTP POST

    Syed Masoom Rizvi
    POST is basically used for sending form data to server and recive output from the server.
    jQuery $.post() function sends and request data from the server using HTTP POST.

    Syntax: $.post(url,postData,CallBack);

    url: A string contains the url, to which request is send.

    postData: Form data for sending.....

    CallBack: a function which execute when the request succeeds.

    Example:

    How to set attribute of file/folder in visual basic 6

    Syed Masoom Rizvi
    To set attribute use this:

    1. Private Declare Function SetFileAttributes Lib "kernel32" Alias _
    2. "SetFileAttributesA" (ByVal lpFileName As String,_
    3. ByVal dwFileAttributes As Long) As Long
    4.  
    5. Private Sub cmd_Click()
    6. SetFileAttributes "c:\a.txt", vbArchive
    7. End Sub

    Where "c:\a.txt" is a filename, you can replace it by directory name or filename.
    Instead of vbAchrive you use:

    How to detect drive types in Visual Basic 6 (VB6)

    Syed Masoom Rizvi
    Here is an idea to detect Drive Type in VB6....

    Goto Project Menu -> References
    Tick on Windows Script Host Modal Object (scroll at last to get)
    Click Ok
    Now, Copy this function and paste in your form:

    private function mDriveType(DriveLetter as string)

    Thursday, February 27, 2014

    JQuery $.get function - jquery to load data from the server using HTTP GET

    Syed Masoom Rizvi
    GET is basically used for getting your data from the server.
    jQuery $.get() function request data from the server using HTTP GET.

    Syntax: $.get(url,CallBack);

    url: A string contains the url, to which request is send.

    CallBack: a function which execute when the request succeeds.

    Example:

    Wednesday, February 26, 2014

    Check IF file exists or not - C, C++ Programming Language

    Syed Masoom Rizvi
    This may be the best way for checking if a file exists or not. 

    Saturday, February 22, 2014

    Presentation on Internet Security

    Syed Masoom Rizvi
    Project For Computer Science Students on Internet Security.

    1. Introduction

    Internet security is a branch of computer security specifically related to the Internet, often involving browser security but also network security on a more general level as it applies to other applications or operating systems on a whole. Its objective is to establish rules and measures to use against attacks over the Internet. The Internet represents an insecure channel for exchanging information leading to a high risk of intrusion or fraud, such as phishing. Different methods have been used to protect the transfer of data, including encryption.

    Saturday, February 8, 2014

    Learn PHP - Variables

    Syed Masoom Rizvi

    Variables are those words whose value varies and use to store constants like 5,6,"hello" etc..

    In PHP variabes are declared by $(dollar sign).

    Syntax: $variable_name

    Variable may be anytype. There is no need to define variable for any data type, PHP auto define it when the first value passes to variable.

    Example:

    $x = 5; //Integer type variable

    $m = "hello"; //string type variable

    $x = 5;
    $y = 8.5; // float type variable.
    $z = $x + $y; //float type variable.
    echo $z;
    //Output: 13.5

    Rules for defining variables:
    * Variable start with alphabets.
    * It can be alphanumeric with special symbol _ .

    Learn PHP - Syntax

    Syed Masoom Rizvi
    PHP SYNTAX
    PHP script can be placed everywhere in the php file. PHP script starts with <?php and ends with ?>.
    Example:

    Learn PHP - Introduction

    Syed Masoom Rizvi

    PHP is a server side scripting language, and is a powerful tool for making dynamic and interactive Web pages quickly.PHP is a widely-used and it it is free.
    Official PHP website has installation instructions for PHP
    @ http://php.net/manual/en/install.php
    Example:
    <!DOCTYPE html>
    <html>
    <body>
    <?php
    echo "My first Php Page";
    ?>
    </body>