Getting Started with the New Facebook APIs

Earlier Facebook has been launched comment replies on Facebook pages and profiles with more than 10,000 followers and now Facebook are updating the API so developers can build tools that make it easier for brands to monitor and respond to comment replies.

How to get comment replies through graph api:

Top Level Comments
The top level view of comments corresponds to what a user would see on Facebook. To get the top level view of comments in Graph API:

1
{object_id}/comments?filter=toplevel

Continue reading …

How To Merge Trunk with Branch in SVN

In This tutorial I will tell you how to merge trunk to specific branch in SVN, It is very easy and two step simple process to merge any branch.

There are following step to merge trunk to branch:

Step 1: Open Trunk folder and take the merge option
Step 2: Select ‘merge range of revisions’ option
merge range
Continue reading …

How to Connect MySQL with Perl

In This tutorial I will described simple connection script of PERL with mysql Database.
Currently I Am using DBI module of perl, where I am passing mysql parameters. Its tell compiler now we are using mysql database. DBI stands for “Database Interface” and is a database layer of PERL with simple interface for SQL queries.

Continue reading …

html special characters codes and Symbols Codes

Now I am describing how to print special character in html file like @,{ etc.When you type character from your keybord it will display as its as you have typed.But some language has special character which is not your keybord.
For this HTML introduce HEX code for regular letters, numbers, and characters.
HTML provide special set of codes, which you will insert in your HTML code and it will display on browser as the corresponding symbols or characters you want.

There are two types of entities here:

1-text
2-numeric
Both kinds begin with an ampersand (&) and end with a semicolon (;).

Example
1
© Copyright 2012

Result
html special character

ASCII   HTML HTML  
Dec Hex Symbol Number Name Description
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F

!

#
$
%
&

(
)
*
+
,
-
.
/
 
!
"
#
$
%
&
'
(
)
*
+
,
-
.
/

"

&

space
exclamation point
double quotes
number sign
dollar sign
percent sign
ampersand
single quote
opening parenthesis
closing parenthesis
asterisk
plus sign
comma
minus sign – hyphen
period
slash
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
AC
AD
AE
AF
 
¡
¢
£
¤
¥
¦
§
¨
©
ª
«
¬
­
®
¯
 
¡
¢
£
¤
¥
¦
§
¨
©
ª
«
¬
­
®
¯
 
¡
¢
£
¤
¥
¦
§
¨
©
ª
«
¬
­
®
¯
non-breaking space
inverted exclamation mark
cent sign
pound sign
currency sign
yen sign
broken vertical bar
section sign
spacing diaeresis – umlaut
copyright sign
feminine ordinal indicator
left double angle quotes
not sign
soft hyphen
registered trade mark sign
spacing macron – overline
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
B0
B1
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF
°
±
²
³
´
µ

·
¸
¹
º
»
¼
½
¾
¿
°
±
²
³
´
µ
¶
·
¸
¹
º
»
¼
½
¾
¿
°
±
²
³
´
µ
¶
·
¸
¹
º
»
¼
½
¾
¿
degree sign
plus-or-minus sign
superscript two – squared
superscript three – cubed
acute accent – spacing acute
micro sign
pilcrow sign – paragraph sign
middle dot – Georgian comma
spacing cedilla
superscript one
masculine ordinal indicator
right double angle quotes
fraction one quarter
fraction one half
fraction three quarters
inverted question mark

how to create right angle in php

below method generated right angle with help of php code.

  1. for ($i=0; $i<10; $i++) {  
  2.       for($j=1; $j<=$i$j++) {  
  3.        echo $j . “ ”;  
  4.       }  
  5.       echo ”  
  6. “;  
  7.   }  

update subscription list on exact target server

  1. <?php  
  2.     echo ‘<pre>’;  
  3. echo $path = $_SERVER['DOCUMENT_ROOT'].‘tests/tested/00 Includes/’;  
  4. require($path . ‘exacttarget_soap_client.php’);  
  5.   
  6. $wsdl = ‘https://webservice.s4.exacttarget.com/etframework.wsdl’;  
  7. try{  
  8.   
  9. /* Create the Soap Client */  
  10. $client = new ExactTargetSoapClient($wsdlarray(‘trace’=>1));  
  11.   
  12. /* Set username and password here */  
  13. $client->username = ‘xxx’;  
  14. $client->password = ‘xxx’;  
  15.   
  16. /*% ExactTarget_List */   
  17.         $list = new ExactTarget_List();  
  18.         $list->ID = “xxx”// update the list with this ID  
  19.         $list->ListName = “-modified1″// change the name of the list to ’hello’  
  20.         $list->Description = “test12366″;  
  21.           
  22.         $object = new SoapVar($list, SOAP_ENC_OBJECT, ‘List’“http://exacttarget.com/wsdl/partnerAPI”);  
  23.           
  24.         /*% ExactTarget_List */   
  25.         $list = new ExactTarget_List();  
  26.         $list->ID = “xxx”// update the list with this ID  
  27.         $list->ListName = “p-modified”// change the name of the list to ’hello’  
  28.         $list->Description = “test added list modifed66″;  
  29.           
  30.         $object1 = new SoapVar($list, SOAP_ENC_OBJECT, ‘List’“http://exacttarget.com/wsdl/partnerAPI”);  
  31.   
  32.         /* Update the list */  
  33.         $request = new ExactTarget_UpdateRequest();  
  34.         $request->Options = NULL;  
  35.         $request->Objects = array($object$object1);  
  36.         $results = $client->Update($request);  
  37.   
  38.         /*Output the results */  
  39.         var_dump($results);  
  40.   
  41.         if ($results->OverallStatus == ‘OK’)   
  42.         {  
  43.         echo ‘SUCCESS’;  
  44.         }  
  45.         else  
  46.         {  
  47.         echo ‘FAILED’;  
  48.         }  
  49.   
  50. } catch (SoapFault $e) {  
  51.   
  52.     /* output the resulting SoapFault upon an error */  
  53.     var_dump($e);  
  54. }  
  55.     echo ‘</pre>’;  
  56. ?>  

how to delete duplicate record from tables in mysql

how to delete records from tables.

  1. delete from test_table  
  2. USING test_table, test_table as vtable  
  3. WHERE (NOT test_table.Id=vtable.Id)  
  4. AND (test_table.city=vtable.city)  

magento session

  1. //Show Error Message in frontend  
  2. $message = $this->__(Error accured!.’);  
  3. Mage::getSingleton(‘core/session’)->addError($message);   
  4. $message = $this->__(Data saved Successfully’);  
  5. Mage::getSingleton(‘core/session’)->addSuccess($message);  
  6.   
  7. //Show Error Message in Admin page  
  8. $message = $this->__(‘Error accured’);  
  9. Mage::getSingleton(‘adminhtml/session’)->addSuccess($message);   
  10.   
  11. //Show Success Message in Admin page  
  12. $message = $this->__(‘Data saved Successfully’);  
  13. Mage::getSingleton(adminhtml/session’)->addError($message);  
  14.   
  15. //You can create new session using below syntax:  
  16. Mage::getSingleton(‘core/session’)->setYourVariable(‘data’);  
  17. $Data = Mage::getSingleton(‘core/session’)->getYourVariable();  
  18.   
  19. //Create session variable for single time access only.  
  20. Mage::getSingleton(‘customer/session’)->setData(‘message’array(‘success’ => ‘Record updated successfully’));  
  21.   
  22. //How to get in PHTML file session variable.  
  23. $messages = Mage::getSingleton(‘customer/session’)->getData(‘message’, true);  

How to get all region list in magento

  1. function getRegType()  
  2.     {  
  3.         $collection = Mage::getModel(‘directory/region_api’)->items(‘US’);  
  4.         Mage::log($collection);  
  5.         $i=1;  
  6.          $resArr[0]['value']=0;  
  7.               $resArr[0]['label']=“Select State”;  
  8.         foreach ($collection as $values)  
  9.         {  
  10.           
  11.               $resArr[$i]['value']=$values['name'];  
  12.               $resArr[$i]['label']=$values['name'];  
  13.               $i=$i+1;  
  14.         }  
  15.       
  16.         //return  $collection->getSelect();  
  17.         return $resArr;  
  18.     }  

get all manufacturer information

Below code is used for gel all manufacturerlist:

  1. /** 
  2.     * @function         : manufacturerList 
  3.     * @created by       : Parvez Alam 
  4.     * @creation date    : dec 12, 2011                
  5.     * @description      : This method used for get all manufacturer information 
  6.     * @params           : null 
  7.     * @returns          : array 
  8.     */  
  9. function getDdlManufacturer()  
  10.     {  
  11.         $collection = Mage::getResourceModel(‘catalog/product_attribute_collection’) ->addFieldToFilter(‘attribute_code’array(‘eq’=>‘manufacturer’))  
  12.         ->addStoreLabel(Mage::app()->getStore()->getId())  
  13.         ->load();  
  14.   
  15.         foreach($collection as $a){  
  16.         $manufArray = $a->getSource()->getAllOptions(false);  
  17.       
  18.         //echo ”<pre>”; print_r($attributes); echo ”</pre>”;die;  
  19.         }  
  20.             return $manufArray;  
  21.     }