Thursday, 24 July 2014

How To Share Internet Connection Via Bluetooth Between Two Computers?

I use Icom bluetooth usb device for my pc  and I wanted to share internet between my computer and laptop over Bluetooth.
It was not an easy job. It cannot be done by Windows Internet Connection Sharing (ICS)  But finally I figured out a way to do it.
You have two computers with Bluetooth
Computer 1 has internet connection
Computer 2 You want to share internet connection with.
1. Install a proxy server on Computer 1. I used ezProxy. (http://www.brothersoft.com/ezproxy-download-19060.html)
2. Join two computers by Bluetooth Personal Area Networking (PAN).
3. On computer 2 go to Tools > Internet Options > Connections > LAN Settings.
Check use a Proxy Server for your LAN box.
4. Give IP address and Port Number assigned to Proxy by Computer1.
5. Enjoy surfing net on Computer 2. Happy Browsing

Saturday, 12 July 2014

Hindi Textbox using Google Translator API

To type in Hindi in Text Box use following Java Script API.

Read More

How to Put a Video Clip in a Website

A basic understanding of how HTML coding works can help you understand how to put a video clip on your website or blog. The HTML code is used to tell your website which video it should display, what kinds of controls it should make available and how large the screen on which the clip will play should be. The controls also can tell the page if it is allowed to open to a full screen.

Read More

Friday, 11 July 2014

How to Create Random Numbers & Characters

This page shows you how to create a random sequence of numbers and/or text. The function which generates the random string can be called from any event handler - the example below uses a button.
Step 1
Add the following code to your head:
<script language="javascript" type="text/javascript">
function randomString() {
 var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
 var string_length = 8;
 var randomstring = '';
 for (var i=0; i<string_length; i++) {
  var rnum = Math.floor(Math.random() * chars.length);
  randomstring += chars.substring(rnum,rnum+1);
 }
 document.randform.randomfield.value = randomstring;
}
</script>
Variables to set:
  1. chars - The random string will be created from these characters.
  2. string_length - The length of the random string.

Step 2

Use the following code for your text field and button:
<form name="randform">
<input type="button" value="Create Random String" onClick="randomString();">&nbsp;
<input type="text" name="randomfield" value="">
</form>


 

Font Converter Utility

About Font converter Utility
Utility is for Persons working with KrutiDev and Mangal font. This utility is for converting text typed in Mangal font to KrutiDev or for converting KrutiDev to Mangal font. User can either paste or type the text in textbox and get text in required Font.

Click Here

Jquery Infinite Scroll

Scroll is a jQuery plugin for infinite scrolling. Infinite scrolling; also known as lazy loading, endless scrolling, autopager, endless pages, etc.;
This is the ability to load content via AJAX within the current page or content area as you scroll down. The new content can be loaded automatically each time you scroll to the end of the existing content, or it can be triggered to load by clicking a navigation link at the end of the existing content.
Download Code

Monday, 7 July 2014

Flux Slider jQuery plugin

Today I will make review (example of implementation) of fresh and cool slider plugin – Flux. This slider using CSS3 animation with great transition effects (like: bars, zip, blinds, blocks, concentric, warp). And, what is most great – now it can support 3D transitions too (bars3d, cube, tiles3d, Blinds3D effects). Of course, not all browsers support 3D transitions (I tested in Chrome – can confirm that it working here).
Here are list of supported browsers:
  • Chrome
  • Firefox 4
  • iOS
  • Opera 11
  • Safari
Firstly – you can download our package:

Animated Scroll to Top

Due to a number of requests, I'm writing a detail tutorial on how to create an animated scroll to top as seen on Web Designer Wall. It is very simple to do with jQuery (just a few lines of code). It checks if the scrollbar top position is greater than certain value, then fade in the scroll to top button. Upon the link is clicked, it scrolls the page to the top. 

Download

Other Demos1     |           Other Demos2

What is Google Translate?

Google Translate is a free translation service that provides instant translations between dozens of different languages. It can translate words, sentences and web pages between any combination of our supported languages. With Google Translate, we hope to make information universally accessible and useful, regardless of the language in which it’s written.

<div id="google_translate_element"></div><script>
functiongoogleTranslateElementInit() {
newgoogle.translate.TranslateElement({
pageLanguage: 'en',
layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL
  }, 'google_translate_element');
}
</script>
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script><divalign="left">
 
</div>

Datepicker

The datepicker is tied to a standard form input field. Focus on the input (click, or use the tab key) to open an interactive calendar in a small overlay. Choose a date, click elsewhere on the page (blur the input), or hit the Esc key to close. If a date is chosen, feedback is shown as the input's value.

Download



How to Remove Watermark from Wowslider.

Wowslider is the best image slider so far it creates image slides within few minutes with just a few click without any coding or all that kind of stuff.Wowslider is free to download but it displays a watermark like Wowslider.com as shown in the image below and removing watermark costs money.Today I will show you guys how to remove watermark from Wowslider free.

Replace the file wowslider.js with this file
Download

Disable Right Click and Cut,Copy And Paste Option In Form

This article will show you how to disable the right click, cut, copy and paste option 


<script>
function alpha(e) {
var k;
document.all ? k = e.keyCode : k = e.which;
return ((k > 64 && k < 91) || (k > 96 && k < 123) || k == 8 || (k >= 48 && k <= 57));
}
</script>

<input type="password"  onpaste="return false" onkeypress="return alpha(event)" />

Sunday, 6 July 2014

Java Script Menu

A menu with the default configuration, disabled items and nested menus. A list is transformed, adding theming, mouse and keyboard navigation support. Try to tab to the menu then use the cursor keys to navigate.

Demo Download



Accordion

Displays collapsible content panels for presenting information in a limited amount of space.

Click headers to expand/collapse content that is broken into logical sections, much like tabs. Optionally, toggle sections open/closed on mouseover.
The underlying HTML markup is a series of headers (H3 tags) and content divs so the content is usable without JavaScript.

Download

Other Demo


Browser Back Click Disable

<SCRIPT type="text/javascript">
    window.history.forward();
    function noBack() { window.history.forward(); }
</SCRIPT>

Genrate Random Number In Textbox

Genrate Random Number In Textbox Than Try It

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script language="javascript" type="text/javascript">
function randomString() {
var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ";
var string_length = 6;
var randomstring = '';
for (var i=0; i<string_length; i++) {
var rnum = Math.floor(Math.random() * chars.length);
randomstring += chars.substring(rnum,rnum+1);
}
document.randform.randomfield.value = 'STU'+randomstring;
}
</script>
</head>

<body>
<form name="randform">
<input type="text" name="randomfield" onclick="randomString()" >
</form>
</body>
</html>

Remove Special Symbol

If you are looking for removal for special and junk characters, you can use
strings filename
otherwise, if you want to remove some specified special characters
you can do 

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Remove Special Characters from the Textbox using JavaScript</title>
<script language="javascript" type="text/javascript">
function RemoveSpecialChar(txtName) {
if (txtName.value != '' && txtName.value.match(/^[\w ]+$/) == null) {
txtName.value = txtName.value.replace(/[\W]/g, '');
}
}
</script>
</head>
<body>
<div>
<b>Enter Text:</b><input id="txtName"  type="text" onKeyUp="javascript:RemoveSpecialChar(this)" />
</div>
</body>
</html>

Uploading Files Into Database

Building a database-


CREATE TABLE `file` (
    `id`        Int Unsigned Not Null Auto_Increment,
    `name`      VarChar(255) Not Null Default 'Untitled.txt',
    `mime`      VarChar(50) Not Null Default 'text/plain',
    `size`      BigInt Unsigned Not Null Default 0,
    `data`      MediumBlob Not Null,
    `created`   DateTime Not Null,
    PRIMARY KEY (`id`)
)


=========================================================
Uploading the file


<!DOCTYPE html>
<head>
    <title>MySQL file upload example</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
    <form action="add_file.php" method="post" enctype="multipart/form-data">
        <input type="file" name="uploaded_file"><br>
        <input type="submit" value="Upload file">
    </form>
    <p>
        <a href="list_files.php">See all files</a>
    </p>
</body>
</html>

==========================================================
Add the file to the database

<?php
// Check if a file has been uploaded
if(isset($_FILES['uploaded_file'])) {
    // Make sure the file was sent without errors
    if($_FILES['uploaded_file']['error'] == 0) {
        // Connect to the database
        $dbLink = new mysqli('127.0.0.1', 'user', 'pwd', 'myTable');
        if(mysqli_connect_errno()) {
            die("MySQL connection failed: ". mysqli_connect_error());
        }

        // Gather all required data
        $name = $dbLink->real_escape_string($_FILES['uploaded_file']['name']);
        $mime = $dbLink->real_escape_string($_FILES['uploaded_file']['type']);
        $data = $dbLink->real_escape_string(file_get_contents($_FILES  ['uploaded_file']['tmp_name']));
        $size = intval($_FILES['uploaded_file']['size']);

        // Create the SQL query
        $query = "
            INSERT INTO `file` (
                `name`, `mime`, `size`, `data`, `created`
            )
            VALUES (
                '{$name}', '{$mime}', {$size}, '{$data}', NOW()
            )";

        // Execute the query
        $result = $dbLink->query($query);

        // Check if it was successfull
        if($result) {
            echo 'Success! Your file was successfully added!';
        }
        else {
            echo 'Error! Failed to insert the file'
               . "<pre>{$dbLink->error}</pre>";
        }
    }
    else {
        echo 'An error accured while the file was being uploaded. '
           . 'Error code: '. intval($_FILES['uploaded_file']['error']);
    }

    // Close the mysql connection
    $dbLink->close();
}
else {
    echo 'Error! A file was not sent!';
}

// Echo a link back to the main page
echo '<p>Click <a href="index.html">here</a> to go back</p>';
?>

==========================================================

Listing all existing files

<?php
// Connect to the database
$dbLink = new mysqli('127.0.0.1', 'user', 'pwd', 'myTable');
if(mysqli_connect_errno()) {
    die("MySQL connection failed: ". mysqli_connect_error());
}

// Query for a list of all existing files
$sql = 'SELECT `id`, `name`, `mime`, `size`, `created` FROM `file`';
$result = $dbLink->query($sql);

// Check if it was successfull
if($result) {
    // Make sure there are some files in there
    if($result->num_rows == 0) {
        echo '<p>There are no files in the database</p>';
    }
    else {
        // Print the top of a table
        echo '<table width="100%">
                <tr>
                    <td><b>Name</b></td>
                    <td><b>Mime</b></td>
                    <td><b>Size (bytes)</b></td>
                    <td><b>Created</b></td>
                    <td><b>&nbsp;</b></td>
                </tr>';

        // Print each file
        while($row = $result->fetch_assoc()) {
            echo "
                <tr>
                    <td>{$row['name']}</td>
                    <td>{$row['mime']}</td>
                    <td>{$row['size']}</td>
                    <td>{$row['created']}</td>
                    <td><a href='get_file.php?id={$row['id']}'>Download</a></td>
                </tr>";
        }

        // Close table
        echo '</table>';
    }

    // Free the result
    $result->free();
}
else
{
    echo 'Error! SQL query failed:';
    echo "<pre>{$dbLink->error}</pre>";
}

// Close the mysql connection
$dbLink->close();
?>

===========================================================


Downloading a file

<?php
// Make sure an ID was passed
if(isset($_GET['id'])) {
// Get the ID
    $id = intval($_GET['id']);

    // Make sure the ID is in fact a valid ID
    if($id <= 0) {
        die('The ID is invalid!');
    }
    else {
        // Connect to the database
        $dbLink = new mysqli('127.0.0.1', 'user', 'pwd', 'myTable');
        if(mysqli_connect_errno()) {
            die("MySQL connection failed: ". mysqli_connect_error());
        }

        // Fetch the file information
        $query = "
            SELECT `mime`, `name`, `size`, `data`
            FROM `file`
            WHERE `id` = {$id}";
        $result = $dbLink->query($query);

        if($result) {
            // Make sure the result is valid
            if($result->num_rows == 1) {
            // Get the row
                $row = mysqli_fetch_assoc($result);

                // Print headers
                header("Content-Type: ". $row['mime']);
                header("Content-Length: ". $row['size']);
                header("Content-Disposition: attachment; filename=". $row['name']);

                // Print data
                echo $row['data'];
            }
            else {
                echo 'Error! No image exists with that ID.';
            }

            // Free the mysqli resources
            @mysqli_free_result($result);
        }
        else {
            echo "Error! Query failed: <pre>{$dbLink->error}</pre>";
        }
        @mysqli_close($dbLink);
    }
}
else {
    echo 'Error! No ID was passed.';
}
?>