Tech Insight !

Technical blog on ASP.Net, PHP, Web Development, Web hosting , Database Programming

Download Free wallpapers–Android Wallpapers, Iphone Wallpapers, Computer desktop Wallpapers

August 11th, 2011 Posted in Downloads Tags: ,

Download Free wallpapers – Android Wallpapers, Iphone Wallpapers, Computer desktop Wallpapers

15th August – 65th Independence Day India – Desktop Wallpapers
Preview
Computer Wallpaper: 1024×768 | 1280×720 | 1366×768 | 1440×900
Preview
Computer Wallpaper: 1024×768 | 1280×720 | 1366×768 | 1440×900
Krishna Janmashtami 2011 Desktop Wallpapers
Preview
Computer Wallpaper: 1024×768 | 1280×720 | 1366×768 | 1440×900
Preview
Computer Wallpaper: 1024×768 | 1280×720 | 1366×768 | 1440×900
15th August – 65th Independence Day India – Mobile Wallpapers
Preview
Mobile Wallpaper:
Samsung Android – Galaxy S (980×800)
iPhone 4 Wallpapers (640 x 960)

iPhone 3Gs, 3G & iPod Touch Wallpapers (320 x 480)
Preview
Mobile Wallpaper:
Samsung Android – Galaxy S (980×800)
Preview
Mobile Wallpaper:
Samsung Android – Galaxy S (980×800)
Krishna Janmashtami 2011 Mobile Wallpapers
Preview
Mobile Wallpaper:
Samsung Android – Galaxy S (980×800)
Preview
Mobile Wallpaper:
Samsung Android – Galaxy S (980×800)

NOTE : Also visit www.dhanashree.com

If you are in need of any Web Development feel free to Inquire us . Dhanashree Inc. Expertise in Asp.net Development, Php Development, Website designing, Open Source customisation. Dhanashree Inc can be our offshore development company / outsourcing web development company, hire dedicated web programmers.

Above information is for knowledge sharing if you have problem / issue / suggestion please intimate us with details for proper and prompt action.

Andriod SQLite introduction, Insert, Update, Delete records with SQLite database

July 25th, 2011 Posted in Andriod Tags: ,

SQLite, is a powerful SQL database library.

Two Mechanism gives Data Structured Data Persistant

1)      SQLite

2)      Content Providers

SQLite is a opensource, lightweight, single tier relational DBMS.

Each column in database is not strongly typed. So, type checking isn’t necessary when assigning or

extracting values from each column within a row.

Row and Resultset Mapping in SQLite:

“ContentValues” represents rows in a table, “Content Values” object represents a single table row.

Query in android will return as a “Cursor” objects. Cursors are pointers to the result set within the underlying data.

Following are some of functions in “Cursor” class, which helps navigation within result set.

  • moveToFirst Moves the cursor to the first row in the query result
  • moveToNext Moves the cursor to the next row
  • moveToPrevious Moves the cursor to the previous row
  • getCount Returns the number of rows in the result set
  • getColumnName Returns the name of the specified column index
  • getColumnNames Returns a string array of all the column names in the current Cursor
  • moveToPosition Moves the Cursor to the specified row
  • getPosition Returns the current Cursor position

Following code snippet, imports some of namespaces (or packages) you need to import before starting database work in android application.

import android.content.Context;

import android.database.*;

import android.database.sqlite.*;

import android.database.sqlite.SQLiteDatabase.CursorFactory;

Opening and Creating Database

Use “openOrCreateDatabase” method from the application Context class to

private static final String DATABASE_NAME = “myTestDatabase.db”;

private static final String DATABASE_TABLE = “mainTestTable”;

private static final String DATABASE_CREATE =

“create table ” + DATABASE_TABLE + ” ( _id integer primary key autoincrement,” +

“column_one text not null);”;

SQLiteDatabase myDatabase;

private void createDatabase() {

myDatabase = openOrCreateDatabase(DATABASE_NAME, Context.MODE_PRIVATE, null);

myDatabase.execSQL(DATABASE_CREATE);

}

Once you have created database,

Use the “query” method to execute a query on database; following parameters need to specify in order to execute your query.

  • An optional Boolean that specifies if the result set should contain only unique values.
  • The name of the table to query.
  • An array of strings (column names), that lists the columns to include in the result set.
  • A ‘‘where’’ clause that defines the rows to be returned. You can include ‘?’ wildcards that will

be replaced by the values passed in through the selection argument parameter.

  • An array of selection argument strings that will replace the ‘?’s in the where clause.
  • A ‘‘group by’’ clause that defines how the resulting rows will be grouped.
  • A ‘‘having’’ filter that defines which row groups to include if you specified a group by clause.
  • A string that describes the order of the returned rows.
  • An optional string that defines a limit for the number of returned rows.

SQLiteDatabase class has insert, update and delete methods to perform basic database operations.

Insert Method

To add record in databaes, use ContentValues object and use its put methods to provide a value for

each column.

ContentValues newValues = new ContentValues();

// Assign values for each row.

newValues.put(COLUMN_NAME, newValue);

[ ... Repeat for each column ... ]

Now, insert the new row by passing the Content Values object into the insert method called

on the target database — along with the table name

// Insert the row into your table

myDatabase.insert(DATABASE_TABLE, null, newValues);

Update Method

In order to update a row, you have to use update method, with ‘where’ parameter that specified condition for which row(s) data to be update, and table name and new values.

Following code snippet represents idea on update method:

// Define the updated row content.

ContentValues updatedValues = new ContentValues();

// Assign values for each row.

newValues.put(COLUMN_NAME, newValue);

[ ... Repeat for each column ... ]

String where = KEY_ID + “=” + rowId;

// Update the row with the specified index with the new values.

myDatabase.update(DATABASE_TABLE, newValues, where, null);

Delete Method

To delete a row simply call delete on a database, specifying the table name and a where clause that

returns the rows you want to delete.

String where = KEY_ID + “=” + rowId;

myDatabase.delete(DATABASE_TABLE, where, null);


NOTE : Also visit www.dhanashree.com


If you are in need of any
Web Development feel free to Inquire us . Dhanashree Inc. Expertise in Asp.net Development, Php Development,
Website designing
, Open Source customisation. Dhanashree Inc can be our offshore development company /
outsourcing web development company, hire dedicated web programmers.


Above information is for knowledge sharing if you have problem / issue / suggestion please intimate us with details for proper and prompt action.

Beginers guide for Andriod Development-Setting Environment-Sample Application

July 19th, 2011 Posted in Andriod Tags: , ,

You can take a look at android basics, and can start android application development.

http://techinsight.dhanashree.com/introduction-to-andriod-first-step-of-andriod-development

PREREQUISITE

First of all you must have at least one Android SDK installed in your computer. You can get more idea on setting up the SDK environment, on  <br/>http://developer.android.com/sdk/index.html

You also need one of TOOL for android development, I have choose, Eclipse IDE plug-in.

If you need to install Eclipse, you can download it from this location:

http://www.eclipse.org/downloads/

For SDK installation, you can refer:

http://developer.android.com/sdk/installing.html

Or In short: If have not downloaded any SDK version then

You can launch the Android SDK and AVD Manager, From within Eclipse,

Select Window > Android SDK and AVD Manager.

Here, under, Available Packages option, you can select one of Android SDK version, and click “Install Selected” button.

SETTINGS in Eclipse

Following settings you have to make (in Eclipse) before running android application.

In Eclipse IDE, go to

Window- > Android SDK and AVD Manager

And, Under Virtual Devices option, click “New” button and make virtual device that will display and show your application (or widget) inside it.

Second thing is, At least one SDK target set in Eclipse environment.

In Eclipse IDE, go to

Window- > Preference

Under “Android” option, SDK Location setting is there,

Click “Browse” button and select path of android sdk folder. (From where system can find ‘platforms’ folder under which your sdk folder will be there).

For example, I have following folder hierarchy

android-sdk-windows\platforms\android-4

So, I have to specify path up to “android-sdk-windows”.

SAMPLE ANDRIOD APPLICATION

Now you are ready to make new Android Application,

File-> New -> Project

Small window will appear, here select “Android Project” option, and click “Next” button.

Second window will display. Asking you application options:

Project Name: firstapp

Under Build target: one of sdk will be selected.

Package Name: must be specified, we can give, thesmile.andriod.widget

Now click “Finish” button.

‘Package Explorer’ window inside IDE will show your project (firstapp).

It will contain various folders:

SRC : contains various .java files, inside which you have to write your code.(in this example there will be FirstappActivity.java file)

RES: this resource folder contains folders inside it like ‘layout’, ’values’ , ‘drawable-ldpi’ etc…

drawable-ldpi : folder is for images you wants to use in application

layout : folder contains .xml files, Layouts are same as Forms in window application, it represents screens of your application.

In our example this file will contain following code.

<?xml version=“1.0″ encoding=“utf-8″?>

<LinearLayout xmlns:android=“http://schemas.android.com/apk/res/android”

android:orientation=“vertical”

android:layout_width=“fill_parent”

android:layout_height=“fill_parent”

>

<TextView

android:layout_width=“fill_parent”

android:layout_height=“wrap_content”

android:text=“@string/hello”

/>

</LinearLayout>

values : folder will have strings.xml file, which stores application level various strings like application name, and small text.

Most important file in your project is, AndroidManifest.xml , which contains application level behavior settings.

There will be <activity> tag, inside <application>, this tag specifies which layout will be loaded at first when you application is launched.

If you focus on following lines,

<activity android:name=“.FirstappActivity”

android:label=“@string/app_name”>

<intent-filter>

<action android:name=“android.intent.action.MAIN” />

<category android:name=“android.intent.category.LAUNCHER” />

</intent-filter>

</activity>

In Eclipse IDE, go to

Run -> Run

Select, ‘Android Application’ option, and your Virtual device will show home screen in few minutes.

You can go to menu in your ‘virtual device’ and see widget “Firstapp” (for our example), clicking it will show a screen with text, “Hello World, Firstapp activity.”


NOTE : Also visit www.dhanashree.com


If you are in need of any
Web Development feel free to Inquire us . Dhanashree Inc. Expertise in Asp.net Development, Php Development,
Website designing
, Open Source customisation. Dhanashree Inc can be our offshore development company /
outsourcing web development company, hire dedicated web programmers.


Above information is for knowledge sharing if you have problem / issue / suggestion please intimate us with details for proper and prompt action.

Introduction to Andriod – First step towards Andriod application development

July 19th, 2011 Posted in Andriod Tags: ,

Andriod is a sofware stack(specially design for mobile devices), consists of Operating system, middleware and applications.

Or we can say, Android is a combination of three components:

  • A free, open-source operating system for mobile devices
  • An open-source development platform for creating mobile applications
  • Devices, particularly mobile phones, that run the Android operating system and the applications
    created for it

Following are Key concepts that builds Andriod.

Application framework:enabling reuse and replacement of components
SQLite: is serverless, lightweight,relational, transactional SQL database engine, designed for structured data storage.
Dalvik virtual machine: optimized for mobile devices
Integrated browser: based on the open source WebKit engine
Optimized graphics: powered by a custom 2D graphics library; 3D graphics based on the OpenGL ES 1.0 specification (hardware acceleration optional)
Media support: for common audio, video, and still image formts (MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, GIF)
Hardware Support functions : GSM Telephony, Bluetooth, EDGE, 3G, and WiFi ,Camera, GPS, compass, and accelerometer (hardware dependent)
Rich development environment: including a device emulator, tools for debugging, memory and performance profiling, and a plugin for the Eclipse IDE.


NOTE : Also visit www.dhanashree.com


If you are in need of any
Web Development feel free to Inquire us . Dhanashree Inc. Expertise in Asp.net Development, Php Development,
Website designing
, Open Source customisation. Dhanashree Inc can be our offshore development company /
outsourcing web development company, hire dedicated web programmers.


Above information is for knowledge sharing if you have problem / issue / suggestion please intimate us with details for proper and prompt action.

Multiple jquery.ajax Request on same page and server variable for Tracking Status of Process

June 22nd, 2011 Posted in Ajax, J-Query Tags: ,

Once i was stuck with a process(long running for loop) at server side in asp.net, hence i thought to change code in such a way that some how i got intimation about how much work that process has done.

I have decided to make two pages,
one page when called starts a long running process,
And, Second page i call frequently from java script(with jQuery.ajax()), and that page gives me status (% of work done) of process start by first page.

Following is two JavaScript functions,

That uses JQuery’s Ajax request,

First function is intended to update page with some kind of intimation to user (like 30% work has been done).

function getFrequentUpdate() {

jQuery.ajax({
url: “getFrequentUpdate.aspx?” + “tmp=” + Math.random() * 1000,
async: true,
type: ‘GET’,
cache: false,
success: function(msg) {
jQuery(“#divMsg”).html(” Current Progress is: ” + msg);

var runtimeProgress = (parseInt(msg) * 100) / parseInt(jQuery(“#hdTotalObject”).val());
runtimeProgress = Math.ceil(parseFloat(runtimeProgress));
runtimeProgress = parseFloat(runtimeProgress) * 10;

jQuery(“#divProgress”).css(‘width’, runtimeProgress + ‘px’);
}
});

}

Second function calls a page that starts a long running process.

function startLongRunningProcess() {
getFrequentUpdate();
myintval = setInterval(‘getFrequentUpdate()’, myDelay);

jQuery.ajax({
url: “someProcess.aspx?” + “tmp=” + Math.random() * 1000,
async: true,
type: ‘GET’,
cache: false,
success: function(msg) {

window.clearInterval(myintval);
jQuery(“#lblStartBackup”).html(“Process has been completed successfully.”);

}
});

}

Main challenging task is to update page with % of work long running process has done.

Here, I have first tried with using session variable, but later I came to know that somehow, when, I tried to run multiple pages together, and if they access SESSION variable, one of process was stopped, until second one has finished.

To overcome that issue, I have used a class in “App_Code” folder with STATIC VARIABLE that can be used application wide:

static public int MyStatusVariable = 0;

In my case, my long running process was updating above server variable and first Ajax function was fetching it frequently, with interval specified with in

myintval = setInterval(‘ getFrequentUpdate ()’, 2000);


NOTE : Also visit www.dhanashree.com


If you are in need of any
Web Development feel free to Inquire us . Dhanashree Inc. Expertise in Asp.net Development, Php Development,
Website designing
, Open Source customisation. Dhanashree Inc can be our offshore development company /
outsourcing web development company, hire dedicated web programmers.


Above information is for knowledge sharing if you have problem / issue / suggestion please intimate us with details for proper and prompt action.

Copy Tables and Data using SMO (Sql Server Management Object) in asp.net

June 22nd, 2011 Posted in .Net 2.0, Database, SQL server 2005 Tags: ,

SMO (Sql Server Management Object) can be used in .net application for dealing with database objects like table, stored procedure, views, and functions.

Basically you have to use “Microsoft.SqlServer.Management.Smo” namespace to use its classes in your application.

Additionally you need to use Microsoft.SqlServer.Management.Sdk.Sfc assembly.

I have used following assemblies for this sample code:

using System.Data;
using Microsoft.SqlServer.Management.Common;
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Sdk.Sfc;
using smo = Microsoft.SqlServer.Management.Smo;

Following code mentions use of SMO to copy tables and data.

/* SOURCE Database */
string myDBServer = “sourceDBServer”;
string myDBUsername = “testuser”;
string myDBPassword = “password”;
string myDBDatabase = “firstDB”;
//

/* DESTINATION Database */
string destServer = “destinationDBServer”;
string destLogin = “testuser”;
string destPassword = “password”;
string destDatabase = “targetDB”;
//

ServerConnection con = new ServerConnection(myDBServer, myDBUsername, myDBPassword);
smo.Server sqlServer = new smo.Server(con);
Database db = sqlServer.Databases[myDBDatabase];

Transfer transfer = new Transfer(db);
transfer.CopyAllUsers = true;
transfer.CreateTargetDatabase = false;
transfer.CopyAllObjects = false;
transfer.CopyAllTables = true;
transfer.CopyData = true;
transfer.Options.WithDependencies = true;
transfer.Options.DriAll = true;
transfer.Options.ContinueScriptingOnError = false;

//use following code if want to create destination databaes runtime
/*
ServerConnection destConnection = new ServerConnection(destServer, destLogin, destPassword);
Server destServerObj = new Server(destConnection);
Database newdb = new Database(destServerObj, destDatabase);
newdb.Create();
transfer.CreateTargetDatabase = true;
*/
transfer.CreateTargetDatabase = false;
transfer.DestinationLoginSecure = true;
transfer.DestinationServer = destServer;
transfer.DestinationLogin = destLogin;
transfer.DestinationPassword = destPassword;
transfer.DestinationDatabase = destDatabase;
transfer.ScriptTransfer();
transfer.TransferData();

Personally I think aobve programm is very usefull when we need to take backup SQL Server database.


NOTE : Also visit www.dhanashree.com


If you are in need of any
Web Development feel free to Inquire us . Dhanashree Inc. Expertise in Asp.net Development, Php Development,
Website designing
, Open Source customisation. Dhanashree Inc can be our offshore development company /
outsourcing web development company, hire dedicated web programmers.


Above information is for knowledge sharing if you have problem / issue / suggestion please intimate us with details for proper and prompt action.

PHP $_SERVER and $HTTP_SERVER_VARS

April 11th, 2011 Posted in PHP, Uncategorized

$_SERVER is an array containing information such as headers, paths, and script locations. The entries in this array are created by the web server. There is no guarantee that every web server will provide any of these.

$HTTP_SERVER_VARS contains the same initial information, but is not a superglobal. (Note that $HTTP_SERVER_VARS and $_SERVER are different variables and that PHP handles them as such)

$_SERVER ['PHP_SELF']

The filename of the currently executing script, relative to the document root.
For instance, $_SERVER ['PHP_SELF'] in a script at the address http://example.com/test.php/foo.bar would be /test.php/foo.bar.

$_SERVER ['argv']

Array of arguments passed to the script. When the script is run on the command line, this gives C-style access to the command line parameters. When called via the GET method, this will contain the query string.

$_SERVER ['argc']
Contains the number of command line parameters passed to the script (if run on the command line).

$_SERVER ['SERVER_ADDR']

The IP address of the server under which the current script is executing.

$_SERVER ['SERVER_NAME']

The name of the server host under which the current script is executing. If the script is running on a virtual host, this will be the value defined for that virtual host.

$_SERVER ['SERVER_SOFTWARE']

Server identification string, given in the headers when responding to requests.

$_SERVER ['SERVER_PROTOCOL']

Name and revision of the information protocol via which the page was requested;
i.e. ‘HTTP/1.0′;

$_SERVER ['REQUEST_METHOD']

Which request method was used to access the page?
i.e. ‘GET’, ‘HEAD’, ‘POST’, ‘PUT’.
Note: PHP script is terminated after sending headers (it means after producing any output without output buffering) if the request method was HEAD.

$_SERVER ['REQUEST_TIME']

The timestamp of the start of the request.

$_SERVER ['QUERY_STRING']

The query string, if any, via which the page was accessed.

$_SERVER ['DOCUMENT_ROOT']

The document root directory under which the current script is executing, as defined in the server’s configuration file.

$_SERVER ['HTTP_ACCEPT']

Contents of the Accept: header from the current request, if there is one.

$_SERVER ['HTTP_ACCEPT_CHARSET']

Contents of the Accept-Charset: header from the current request, if there is one.
Example: ‘iso-8859-1,*, utf-8′.

$_SERVER ['HTTP_ACCEPT_ENCODING']

Contents of the Accept-Encoding: header from the current request, if there is one.
Example: ‘gzip’.

$_SERVER ['HTTP_ACCEPT_LANGUAGE']

Contents of the Accept-Language: header from the current request, if there is one.
Example: ‘en’.

$_SERVER ['HTTP_CONNECTION']

Contents of the Connection: header from the current request, if there is one.
Example: ‘Keep-Alive’.

$_SERVER ['HTTP_HOST']

Contents of the Host: header from the current request, if there is one.


$_SERVER ['HTTP_REFERER']

The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted.

$_SERVER ['HTTP_USER_AGENT']

Contents of the User-Agent: header from the current request, if there is one. This is a string denoting the user agent being which is accessing the page. A typical example is: Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586). Among other things, you can use this value with get_browser () to tailor your page’s output to the capabilities of the user agent.

$_SERVER ['HTTPS']

Set to a non-empty value if the script was queried through the HTTPS protocol.

Note: Note that when using ISAPI with IIS, the value will be off if the request was not made through the HTTPS protocol.

$_SERVER ['REMOTE_ADDR']

The IP address from which the user is viewing the current page.

$_SERVER ['REMOTE_HOST']

The Host name from which the user is viewing the current page. The reverse dns lookup is based off the REMOTE_ADDR of the user.

Note: Your web server must be configured to create this variable. For example in Apache you’ll need HostnameLookups On inside httpd.conf for it to exist. See also gethostbyaddr ().

$_SERVER ['REMOTE_PORT']

The port being used on the user’s machine to communicate with the web server.

$_SERVER ['SCRIPT_FILENAME']

The absolute pathname of the currently executing script.

$_SERVER ['SERVER_ADMIN']

The value given to the SERVER_ADMIN (for Apache) directive in the web server configuration file. If the script is running on a virtual host, this will be the value defined for that virtual host.

$_SERVER ['SERVER_PORT']

The port on the server machine being used by the web server for communication.
For default setups, this will be ‘80′. Using SSL, for instance, will change this to whatever your defined secure HTTP port is.

$_SERVER ['SERVER_SIGNATURE']

String containing the server version and virtual host name which are added to server-generated pages, if enabled.

$_SERVER ['PATH_TRANSLATED']

File system- (not document root-) based path to the current script, after the server has done any virtual-to-real mapping.

$_SERVER ['SCRIPT_NAME']

Contains the current script’s path. This is useful for pages which need to point to themselves. The __FILE__ constant contains the full path and filename of the current (i.e. included) file.

$_SERVER ['REQUEST_URI']

The URI which was given in order to access this page.
For instance, ‘/index.html’.

$_SERVER ['PHP_AUTH_DIGEST']

When running under Apache as module doing Digest HTTP authentication this variable is set to the ‘Authorization’ header sent by the client (which you should then use to make the appropriate validation).

$_SERVER ['PHP_AUTH_USER']

This variable is set to the username provided by the user.

$_SERVER ['PHP_AUTH_PW']

This variable is set to the password provided by the user.

$_SERVER ['AUTH_TYPE']

This variable is set to the authentication type.


NOTE : Also visit www.dhanashree.com


If you are in need of any
Web Development feel free to Inquire us . Dhanashree Inc. Expertise in Asp.net Development, Php Development,
Website designing
, Open Source customisation. Dhanashree Inc can be our offshore development company /
outsourcing web development company, hire dedicated web programmers.


Above information is for knowledge sharing if you have problem / issue / suggestion please intimate us with details for proper and prompt action.

Call Google Geocoding API from PHP, Google Map Geocoder PHP Class

February 8th, 2011 Posted in PHP, Web Developement, XML Tags: ,

Geocoding is the process of finding associated geographic coordinates (often expressed as latitude and longitude) from other geographic data, such as street addresses, or zip codes (postal codes). With geographic coordinates the features can be mapped and entered into Geographic Information Systems, or the coordinates can be embedded into media such as digital photographs via geotagging.

Below is the Geocoder PHP class it will return geographic coordinates (often expressed as latitude and longitude) from other geographic data, such as street addresses, or zip codes (postal codes), Country, City, State using Google map API.

PHP INI Setting
First check the setting XML DOM Setting on the php.ini files. Enable the xml in php.ini extensions
enable

;php_xsl
php_xsl ( for it to work )

Get Google Map API Key
http://code.google.com/apis/maps/signup.html

Geocoder Class

class Geocoder{

var $_GoogleMapsKey;

function Geocoder($apiky) // Construct define GOOGLE MAP API key
{
$this->_GoogleMapsKey=$apiky;
}
function getLatLong($address=”",$city=”",$state=”",$postcode=”",$country=”")
{
$query=urlencode($address.”,”.$city.”,”.$state.”,”.$postcode.”,”.$country); // Passed Query
$url=”http://maps.google.com/maps/geo?q=”.$query.”&output=xml&key=”.$this->_GoogleMapsKey; // URL
return $this->getCoordinates($url);
}
function getCoordinates($file) // This class return Coordinates Values
{

$doc = new DOMDocument();
$doc->load($file);
$coordinates = $doc->getElementsByTagName(“coordinates”);

foreach( $coordinates as $coordinate)
{

$coordinatesval = $coordinates->item(0)->nodeVa$coval=explode(“,”,$coordinatesval);
return $coval[0].”,”.$coval[1];

}
}

}

Define Geocoder Class

Example 1:

$g=new Geocoder(“”); // add your Google Map API Key
echo $g->getLatLong(“main bazar”,”dhrol”,”gujarat”,”india”);

Example 2:

$g=new Geocoder(“”); // add your Google Map API Key
echo $g->getLatLong(“address”,”city”,”postcode”,”country”);

Now you can view geographic coordinates (latitude and longitude) using Google map Geocoder class.


NOTE : Also visit www.dhanashree.com


If you are in need of any
Web Development feel free to Inquire us . Dhanashree Inc. Expertise in Asp.net Development, Php Development,
Website designing
, Open Source customisation. Dhanashree Inc can be our offshore development company /
outsourcing web development company, hire dedicated web programmers.


Above information is for knowledge sharing if you have problem / issue / suggestion please intimate us with details for proper and prompt action.

ASP.NET error BC30456: ‘CreateResourceBasedLiteralControl’ is not a member of [file name]

February 5th, 2011 Posted in .net framework, asp.net

Recently we came across an error in asp.net web application, on a web server.

error BC30456: ‘CreateResourceBasedLiteralControl’ is not a member of [file name of master page/ control file].

We have tried to find error in many blogs and reputed site, but it did not helped us to solve this issue.

Then we guess it may be error due to temporary files in .net folder, or reference not updated to recent compiled version of applicaitn.

Finally, it is solved by just Deleting the directory in which error was throwing, and then uploading(or copying) same directory  to server and error gone immediately.

Hope, this helps some one facing same error.


NOTE : Also visit www.dhanashree.com


If you are in need of any
Web Development feel free to Inquire us . Dhanashree Inc. Expertise in Asp.net Development, Php Development,
Website designing
, Open Source customisation. Dhanashree Inc can be our offshore development company /
outsourcing web development company, hire dedicated web programmers.


Above information is for knowledge sharing if you have problem / issue / suggestion please intimate us with details for proper and prompt action.

how to import mysql dump to database-import mysql dumps

December 22nd, 2010 Posted in MySQL, PHP, Uncategorized Tags: ,

If you wanted to import large mysql dump file to database.

See below for how to import mysql dump using only one file.

Step 1: Download dump file. (e.g. demodb.sql).
Step 2: Change connection, username, password, database variable values.
Step 3: Change dump file name with proper path.
Step 4: Run this page.

Import mysql dump file code.

+++++++++++++++++++++++++++++++++++++++++++++++++++++

<?php

$host =”Your Host”;              // Change host (e.g localhost)
$dbusername =”Database username”; // Change Database Username
$dbpassword =”Database password”; // Change Database Password
$database =”Your database”;        // Change Database
$dumpfile = “Your Dump file”;        // Set dump file path (e.g. demodb.sql)
mysql_connect($host,$dbusername,$dbpassword);
mysql_select_db($dumpfile);
$file = fopen($dumpfile, ‘r’);
print ‘<pre>’;
print mysql_error();
$temp = ”;
$count = 0;

while($line = fgets($file)) {
if ((substr($line, 0, 2) != ‘–’) && (substr($line, 0, 2) != ‘/*’) && strlen($line) > 1) {
$last = trim(substr($line, -2, 1));
$temp .= trim(substr($line, 0, -1));
if ($last == ‘;’) {
mysql_query($temp);
$count++;
$temp = ”;
}
}
}

echo mysql_error();
echo “Total {$count} queries fire(s).\n”;
echo “Enjoing this fastest mysql dump importer..\n”;
echo ‘</pre>’;

?>

+++++++++++++++++++++++++++++++++++++++++++++++++++++

Enjoying this fastest mysql dump importer.


NOTE : Also visit www.dhanashree.com


If you are in need of any
Web Development feel free to Inquire us . Dhanashree Inc. Expertise in Asp.net Development, Php Development,
Website designing
, Open Source customisation. Dhanashree Inc can be our offshore development company /
outsourcing web development company, hire dedicated web programmers.


Above information is for knowledge sharing if you have problem / issue / suggestion please intimate us with details for proper and prompt action.