Skip to main content

Posts

Showing posts from February, 2014

Get Google Calendar Event List in WordPress

<a href="https://console.cloud.google.com/apis/credentials">Get Your Api Credentials Here</a> <a href="https://calendar.google.com/calendar">Get your Calender ID</a> <?php include_once("wp-load.php"); function  get_calender_events() { $params = array(); /*Get current date*/ $current_date  = date('Y-m-d H:i:s'); /*Convert it to google calendar's rfc_format */ $rfc_format = date("c", strtotime($current_date)); $params[] = 'orderBy=startTime'; $params[] ='maxResults=100'; $params[] = 'timeMin='.urlencode($rfc_format); $url_param = ''; foreach($params as $param) { $url_param.= '&'.$param; } $calender_id = "calender_id"; $client_key =  "client_key"; $url = "https://www.googleapis.com/calendar/v3/calendars/".$calender_id."/events?key=".$client_key."&singleEvents=true".$url_param; $list_events = wp_remote_post($url,

How can get all products of magento

How can get all products details in magento <?php $res = Mage::getSingleton('core/resource'); $eav = Mage::getModel('eav/config'); $nameattr = $eav->getAttribute('catalog_category', 'name'); $nametable = $res->getTableName('catalog/category') . '_' . $nameattr->getBackendType(); $nameattrid = $nameattr->getAttributeId();

OOPs Interview questions and answers

Top OOPs interview questions and answers are below Questions : 1 What is Object Oriented Programming ? Answers : 1 It is a problem solving technique to develop software systems. It is a technique to think real world in terms of objects. Object maps the software model to real world concept. These objects have responsibilities and provide services to application or other objects. Questions : 2 What is a Class ? Answers : 2 A class describes all the attributes of objects, as well as the methods that implement the behavior of member objects. It is a comprehensive data type which represents a blue print of objects. It’s a template of object. Questions : 3 What is an Object ? Answers : 3 It is a basic unit of a system. An object is an entity that has attributes, behavior, and identity. Objects are members of a class. Attributes and behavior of an object are defined by the class definition. Questions : 4 What is the relation between Classes a

Database Interview Questions And Answers for freshers and experienced

Database (DBMS) interview questions and answers are below Questions : 1 What is database or database management systems (DBMS)? and - What’s the difference between file and database? Can files qualify as a database? Answers : 1 Database provides a systematic and organized way of storing, managing and retrieving from collection of logically related information. Secondly the information has to be persistent, that means even after the application is closed the information should be persisted. Finally it should provide an independent way of accessing data and should not be dependent on the application to access the information. Main difference between a simple file and database that database has independent way (SQL) of accessing information while simple files do not File meets the storing, managing and retrieving part of a database but not the independent way of accessing data. Many experienced programmers think that the main difference is that file can not

Mysql Interview Questions And Answers for freshers and experienced

Mysql interview questions and answers are below ' Questions : 1 how to do login in mysql with unix shell Answers :1 By below method if password is pass and user name is root # [mysql dir]/bin/mysql -h hostname -u root -p pass Questions : 2 how you will Create a database on the mysql server with unix shell Answers : 2 mysql> create database databasename; Questions : 3 how to list or view all databases from the mysql server. Answers : 3 mysql> show databases; Questions : 4 How Switch (select or use) to a database. Answers : 4 mysql> use databasename; Questions : 5 How To see all the tables from a database of mysql server. Answers : 5 mysql> show tables; Questions : 6 How to see table's field formats or description of table . Answers : 6 mysql> describe tablename; Questions : 7 How to delete a database from mysql server. Answers : 7 mysql> drop database data