Wanna go for a picnic ??
page_polls
TextMagic
The TextMagic API is a web based text messaging solution for businesses. TextMagic’s Email to SMS service lets you can send and receive text messages via email. It works with any email account and can be used as an email based API. The SMS Gateway API is secure and can be integrated with TextMagic ready made SMS scripts.
For more details, please follow these links:
1. API Documentation and Usuage: http://api.textmagic.com/
2. Home Page: http://www.textmagic.com/
LOAD data INFILE/OUTFILE using SQL,MYSQL
While I was working with database, I had a sudden requirement of removing duplicate entries from database. Firstly, I thought of going ahead with Insert Ignore statements but there the problem exists if there is a primary key.
DISTINCT is one of the best statement to be used because it checks for duplicates row wise and incase if there is any tuple that is identical to any then it escapes that tuple. The question now was how do I use this in my sql statement so that I am able to remove duplicates when the primary key exits.
After googling, I came across LOADING data into FILE and then IMPORTING data back to table. I followed the suit to achieve my requriments.
The following is the sql that I used to remove duplicates from table and in the same time export all the tuples in a csv file:
SELECT DISTINCT * INTO OUTFILE ‘C:/tableName.csv/.txt/.*’ FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY “” LINES TERMINATED BY ‘\n’ FROM tableName;
The above sql statement dumps DISTINCT data from table to the file in required format.
Now, that you have the file with you and you want to import the contents back to table. There are 2 ways of doing this:
1. use phpMyAdmin
Here, you import the CSV file generated above.
Note: Please make sure that when you import values back to the table, the following actions like Fields Terminated, Optionally Enclosed are correct the way you exported above. You can make changes as per your requirements.
2. use SQL Command
LOAD DATA INFILE ‘C:/tableName.csv/.txt/.*’ INTO TABLE tableName FIELDS TERMINATED BY ‘,’ OPTIONALLY ENCLOSED BY “” LINES TERMINATED BY ‘\n’ ;
The above command will dump data from file to your database.
If you are not able to understand this or you want more information on this, please follow the following link:
SELECT INTO OUTFILE: http://dev.mysql.com/doc/refman/5.1/en/select.html
LOAD DATA INFILE : http://dev.mysql.com/doc/refman/5.1/en/load-data.html
LinkedIn API at Glance
Hi, for all those who are researching on for the use of LinkedIn API WebServices, you need to find a different way than the usual since CURL will not give you the response that you are expecting.
Since LinkedIn wants you to authenticate yourself before you start using the API Services that LinkedIn provides you with. This process is called as OAuth (OAuthentication).
Well, there are ways to get this done, using PERL and PHP or other various ways, but I got this done simply by using “ZEND FRAMEWORK”.
Since Zend Framework, provides you with various libraries that you can use to which eases your coding and allows you to complete the OAuthentication process in just few lines of codes.
Before I go ahead and show you the use of LinkedIn API using Zend Framework, you need to pull the files from the SVN Repository of Zend Framework. There are 2 sets of SVN Repository that we have to pull.
1. Zend Framework – SVN Repository Library
2. Zend Framework – SVN Repositry Incubator
The following are the instructions on how can you get them in your local:
Link from where you will get subversion:
http://framework.zend.com/wiki/display/ZFDEV/Subversion+Standards
Steps to be followed for installation:
1. Install TortoiseSVN and restart your computer
2. Create a new folder called “ZendFramework-trunk”
3. Right click on the new folder, choose “SVN Checkout”, and enter this URL: http://framework.zend.com/svn/framework/standard/trunk/
4. The Zend Framework core components will be in the subfolder “library” inside of the “ZendFramework-trunk” folder.
5. Incubator components (see next section) will be in the subfolder “incubator” inside of the “ZendFramework-trunk” folder.
6. Before reporting bugs, first update your downloaded copy of the framework by right-clicking on the “ZendFramework-trunk” folder and selecting “SVN Update”.
7. Repeat for the ZF Lab with the URL: http://framework.zend.com/svn/framework/laboratory/
Once you have the files in your local, you need to configure them so that you could them in your code. To do so, if you know PHP then you would know about the set_include_path function which easily includes each file inside another file if required.
The following is the code to include both the libraries:
set_include_path( RootPath.’incubator\library’ . PATH_SEPARATOR .
RootPath.’library’ . PATH_SEPARATOR . get_include_path());
Once you are done with this, you are all set to use the API that is provided by LinkedIn.
How to use each API that LinkedIn provides you with, will be shown in details in coming post …
Raven Tools
The Raven database contains search results for thousands of keywords. Each week the Raven engine captures 50 (100 for Bing) search results for these keywords from the major search engines. This data can be returned in XML or JSON format. Raven offers tools for researching, managing, monitoring, and reporting on SEO, online PR and social media campaigns. Customers are typically Internet marketing agencies and in-house marketing departments.
How to remove malware warning
If you see your website in firefox or google crome and you get message that your site is blocked/ malware attack then follow the steps to clean your website.
1. download Malwarebytes software form www.malwarebytes.org/
2. Install it and update the latest database
3. Scan entire pc and delete the trojans, malware. Reeboot the PC
4. After reeboot, change the password of the FTP by loging to the control panel
5. Connect to the FTP and delete the infected website files (only if you have backup files).
6. Now your FTP is clean, lets submit your website to google
7. Go to http://www.google.com/webmasters/
8. Sign in with your gmail id, Inside click on “Add a site” button
9. Add your website with www.
10. It will take you to verify ownership page, from Verification method dropdown select Upload an HTML file option
11. Follow the steps given and once finished click on “Verify” button
12. After that click on just added domain name and on left hand side TOP, Click Diagnostics, and then click Malware.
13. Click Request a review.
Once it’s confirmed that your site is clean, it can take up to a day or so for the malware warning to be removed from your site in search results.
For more details read
http://www.google.com/support/webmasters/bin/answer.py?answer=163633
Basic Javascript Functions
I was trying to play with strings and wanted to use Search and Split at one time, but there was a better option after some google, I found that you could use split and splice, well this was for my functionality but I have researched more on this and given you a simple understanding of each “Javascript String Function” in a tabular format.
Methods | Description |
---|---|
charAt(x) | Returns the character at the “x” position within the string. |
charCodeAt(x) | Returns the Unicode value of the character at position “x” within the string. |
concat(v1, v2,…) | Combines one or more strings (arguments v1, v2 etc) into the existing one and returns the combined string. Original string is not modified. |
fromCharCode(c1, c2,…) | Returns a string created by using the specified sequence of Unicode values (arguments c1, c2 etc). Method of String object, not String instance. For example: String.fromCharCode(). |
indexOf(substr, [start]) | Searches and (if found) returns the index number of the searched character or substring within the string. If not found, -1 is returned. “Start” is an optional argument specifying the position within string to begin the search. Default is 0. |
lastIndexOf(substr, [start]) | Searches and (if found) returns the index number of the searched character or substring within the string. Searches the string from end to beginning. If not found, -1 is returned. “Start” is an optional argument specifying the position within string to begin the search. Default is string.length-1. |
match(regexp) | Executes a search for a match within a string based on a regular expression. It returns an array of information or null if no match is found. |
replace( regexp, replacetext) | Searches and replaces the regular expression portion (match) with the replaced text instead. |
search(regexp) | Tests for a match in a string. It returns the index of the match, or -1 if not found. |
slice(start, [end]) | Returns a substring of the string based on the “start” and “end” index arguments, NOT including the “end” index itself. “End” is optional, and if none is specified, the slice includes all characters from “start” to end of string. |
split(delimiter, [limit]) | Splits a string into many according to the specified delimiter, and returns an array containing each element. The optional “limit” is an integer that lets you specify the maximum number of elements to return. |
substr(start, [length]) | Returns the characters in a string beginning at “start” and through the specified number of characters, “length”. “Length” is optional, and if omitted, up to the end of the string is assumed. |
substring(from, [to]) | Returns the characters in a string between “from” and “to” indexes, NOT including “to” inself. “To” is optional, and if omitted, up to the end of the string is assumed. |
toLowerCase() | Returns the string with all of its characters converted to lowercase. |
toUpperCase() | Returns the string with all of its characters converted to uppercase. |