ArchiveMay 2013

Custom Send Email button on custom Objects

C

Hi, If you want to add a custom button to send email on custom object then follow below mentioned steps: 1. Create Custom button on custom object; 2. in the content source, select URL; 3. in the value section, add following url {!Estimate__c.Bill_To_NameId__c}&rtype=003&doc_id=00Pi0000000OluX&retURL=/{!Estimate__c.Id}?srPos=0&srKp=00T where Estimate__c.BillToNameId__c is the...

java.lang.OutOfMemoryError: Java heap space

j

add line to catalina.sh or catalina.bat: export CATALINA_OPTS=”-Xms512M -Xmx1024M” a) The -Xmx argument defines the max memory size that the heap can reach for the JVM. A low value can cause OutOfMemoryExceptions or a very poor performance if your program’s heap memory is reaching the maximum heap size. b) The -Xms argument sets the initial heap memory size for the JVM. This...

java.security.AccessControlException: access denied (java.net.SocketPermission host connect,resolve)

j

The Simple solution is :search catalina.policy file and edit green line as // Precompiled JSPs need access to this system property. permission java.util.PropertyPermission”org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER”,”read”; permission java.net.SocketPermission “*”, “connect”; permission java.net.SocketPermission “*”...

Learning The Many Advantages of PHP

L

PHP, which is short for Hypertext Preprocessor, is an open source server side programming language available at free of cost that can be easily obtained from the market. It has a coding style that is quiet and easy to understand and is usually very proficient on multi-platforms like Windows, Linux, and UNIX and other more. Today, PHP is one of the most popular server side scripting languages...

Display Facebook likes / Shares PHP function

D

The Code Below is a super simple function that retrieves a JSON feed of comments, likes and shares for any URL you provide. function facebook_shares($url){ $fql = “SELECT url, normalized_url, share_count, like_count, comment_count, “; $fql .= “total_count, commentsbox_count, comments_fbid, click_count FROM “; $fql .= “link_stat WHERE url = ‘”.$url...

Show Google Plus’s – PHP function

S

It’s worth pointing out you must have CURL enabled on your web server, I believe it’s enabled by default on PHP5 setups. Also the Key below Isn’t a unique API key you must leave the key as is to ensure the code works properly. function gplus_shares($url){ // G+ DATA $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, “;); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch...

Voice Recording in Android

V

Put below code into your main Activity. private static final String AUDIO_RECORDER_FILE_EXT_3GP = ".3gp"; private static final String AUDIO_RECORDER_FILE_EXT_MP4 = ".mp4"; private static final String AUDIO_RECORDER_FOLDER = "AudioRecorder"; private MediaRecorder recorder = null; private int currentFormat = 0; private int output_formats[] = { MediaRecorder.OutputFormat.MPEG_4, MediaRecorder...

How to Add Smiley/Emojis in Edittext?

H

  Emoji.java :- package com.android.emoji; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.text.Html; import android.text.Html.ImageGetter; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android...

Category