satishgaudo.com

Understanding technology

Archive for June, 2009

memcached: high-performance, distributed memory object caching system

memcached is a high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.memcached drop the database load to almost nothing, yielding faster page load times for users, better resource utilization, and faster access to the databases on a memcache miss.For more details [...]

25 June 2009 at 20:30 - Comments
satish_gaude at 20:33 on 25 June 2009
td2n8pf at 11:05 on 11 July 2009
Thanks . thats a great post

TWO DIMensional array implementation in ORACLE PLSQL

  CREATE OR REPLACE PROCEDURE “INSTUPDT_EXTENDEDLICENCE” (   tmp_int_subidFrom IN NUMBER, tmp_subKindid IN NUMBER, frm_str_subSelected IN VARCHAR2, frm_str_optionSelected IN VARCHAR2, tmp_added_by IN CHAR, tmp_addedby_id IN NUMBER   ) IS   – define two dim array TYPE data_t IS TABLE OF NUMBER INDEX BY binary_integer; TYPE array_t IS TABLE OF data_t INDEX BY binary_integer; arrPriv array_t;   kindid VARCHAR2(50); extlicenceid NUMBER(11); tmp_str_subSelected VARCHAR2(5000); tmp_str_optionSelected VARCHAR2(5000);   tmpExtLicId NUMBER; tmpDefaultValue VARCHAR2(10);   iPrivId NUMBER(11); iPrivValue [...]

21 June 2009 at 13:34 - Comments
Mary at 07:12 on 24 June 2009
Pretty good post. I just came across your site and wanted to say that I have really enjoyed reading your ...
Loved your latest post, by the way.

implementation of limit in queries

Example for implementation of limit in queries:SELECT temp.*,rownum FROM (

SELECT sp.company_name, sp.contact_phone, sp.office_fax, sp.sub_id, sb.branch_id, sb.branch_url, sp.Office_Address.Address1 || ‘, ‘ || sp.Office_Address.Address2 || ‘, ‘ || sp.Office_Address.Address3 || ‘, ‘ || sp.Office_Address.City || ‘, ‘ || sp.Office_Address.County as address FROM subscriber_primary sp, subscriber_branch sb, subscriber_info si WHERE si.sub_id=sp.sub_id AND sb.sub_id=sp.sub_id AND si.sub_kind_id=4 AND sp.primacy_no=1 AND sb.branch_level = ‘0′ ) temp GROUP BY temp.contact_phone, temp.office_fax, temp.sub_id, temp.branch_id, temp.branch_url, temp.address, rownum having rownum>=2 AND rownum<4

21 June 2009 at 13:29 - Comments

Create table using the existing tables

Example code for dynamically creating table using the tables existing:

CREATE TABLE HIP_TASK_INFO_satish as SELECT HIP_TASK_ID , HIP_TASK_ID as HIP_TASK_BUDGET_ID, HIP_TASK_ID as HIP_DUTY_DETAIL_ID, IS_ACTIVE, IS_DELETE, ADDDT FROM HIP_TASK_INFO

21 June 2009 at 13:28 - Comments

oracle stored procedure

This is an example of writing an stored procedure in oracle:

CREATE OR REPLACE PROCEDURE “INST_SUB_PRIMARY_DET_SAT” (tmp_int in number) IS   BEGIN   – cursor DECLARE CURSOR PRIMARY_DET IS SELECT t.PRIMARY_ID p, t.SUB_ID s, t.OFFICE_ADDRESS.OFFICE_NO o1, t.OFFICE_ADDRESS.OFFICE_NAME o2, t.OFFICE_ADDRESS.ADDRESS1 o3, t.OFFICE_ADDRESS.ADDRESS2 o4, t.OFFICE_ADDRESS.ADDRESS3 o5, t.OFFICE_ADDRESS.CITY o6, t.OFFICE_ADDRESS.COUNTY o7, t.OFFICE_ADDRESS.POST_CODE o8, t.PRIMACY_NO pri, t.COMPANY_NAME com, t.CONTACT_NAME cont, t.CONTACT_MOBILE mob, t.CONTACT_PHONE phone, t.CONTACT_EMAIL email, t.OFFICE_PHONE opho, t.OFFICE_FAX ofax, t.OFFICE_EMAIL oemail, t.IS_ACTIVE act, t.IS_DELETE del, t.ADDDT adt, t.ADDED_BY aby, t.ADDED_BY_ID aid, t.EDITDT edt, t.UPDATE_BY uby, t.UPDATE_BY_ID ubi   FROM SUBSCRIBER_PRIMARY t;   –cres PRIMARY_DET%ROWTYPE;   BEGIN FOR cres IN PRIMARY_DET LOOP INSERT [...]

21 June 2009 at 13:20 - Comments
debt management at 13:15 on 13 November 2009
Nice site protect up your passable work.

Apache Virtual Host

The term Virtual Host refers to the practice of maintaining more than one server on one machine, as differentiated by their apparent hostname. For example, it is often desirable for companies sharing a web server to have their own domains, [...]

16 June 2009 at 18:58 - Comments
How I Make $300 a Day Online at 12:15 on 18 June 2009
Hey, nice post, very well written. You should post more about this.

wrapper class for curl

/** *cURL class * This is a wrapper class for curl * $c = new curl; * // enable cache * $c = new curl(array(’cache’=>true)); * // enable cookie * $c = new curl(array(’cookie’=>true)); * // enable proxy * $c = new curl(array(’proxy’=>true)); * * // HTTP GET Method * $html = $c->get(’http://example.com’); * // [...]

16 June 2009 at 13:56 - Comments

function to submit data via socket

/** * sendDataOnSocket * function to submit data via socket * @param string $sContent content to send * @param string $sHost Host name * @param string $sFilePath  file to post data * @param string $sMethod method name * @return string aig response * @access public */ public static function sendDataOnSocket($sContent,$sHost,$sFilePath,$sMethod) { if(strlen($sHost)==0) { return array(1, "Empty Host name"); }else if (strlen($sMethod)==0) { return array(1, "Empty Method"); } $fp = fsockopen($sHost, "80", [...]

16 June 2009 at 13:54 - Comments
pidxfgop at 23:49 on 14 July 2009
thanks . i was searching for this code
lmn_nihez at 13:48 on 14 August 2009
Nice site.

validate xml against xsd file provided

/** * validateXmlAgainstXsd * function to validate xml against xsd file provided * @param string $error error * @return string api response * @access public */ public static function validateXmlAgainstXsd($sXmlPath,$sXsdPath) { // Enable user error handling libxml_use_internal_errors(true); $xml = new DOMDocument(); $xml->load($sXmlPath); if (!$xml->schemaValidate($sXsdPath)) { $aError =self::libxml_display_errors(); $iError=1; } else { $iError=0; } return array($iError,$aError); }   Example of XSD file: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:annotation> <xs:documentation xml:lang="en"> Job specification schema for scheduler.vubites.com Copyright 2010 satishgaudo.com. All rights reserved. </xs:documentation> </xs:annotation> <xs:element name="response" type="responseType"/> <xs:complexType name="responseType"> <xs:sequence> <xs:element name="status" [...]

16 June 2009 at 13:53 - Comments
TifyWheef at 17:10 on 8 July 2009
http://extjs.com/forum/member.php?u=79374 guitar lessons
Debt Settlement Program at 14:23 on 18 August 2009
complex post. due one detail where I contest with it. I am emailing you in detail.

Function to get the mime type of the file

/** * getFileMimeType * returns the mime type of the file * @param string $sFilePath File path * @return string mime type of the file * @access public */ public function getFileMimeType($sFilePath) { exec(’/usr/bin/file -i -b ‘ . realpath($sFilePath), $aOutput); $sType = $aOutput[0]; $aMimeTypeDet = explode(’;', $sType); return trim($aMimeTypeDet[0]); }

16 June 2009 at 13:49 - Comments
Sdanektir at 02:15 on 7 August 2009
OMG…totally!
Vivalkakira at 21:37 on 7 August 2009
Amazing news, thank you!