Tag: Business Website
MySQL | Find if particular value is selected in multi pick list
In simple pick list we can select only one value but in multi pick list we can select one or more values. Scenario: We had to multi pick list data type field Fields that we wanted to select : 1.
PHP | Use Of strtr() function
In PHP if you want to replace multiple variables of the string at one go you could use strtr() instead of using str_replace(). Example : $vars = array( ‘##session_date##’=>$sessiondate, ‘##session_time##’=>$sessiontime, ‘##conferencelinenumber##’ =>$conferencelinenumber, ‘##pincode##’ =>$pincode, ‘##coachingcommnets##’=>$coachingcomments, ‘##actioncommitmnets##’=>$actioncommitmnets, ‘##reminders##’=> ‘ ‘, ‘##name##’
CakePHP | How to skip CakePHP authentication for some controller methods
Description: By default, CakePHP authentication is applied to all application controllers. So it does not allow users to perform any of the action without login. Solution: Each controller has a beforeFilter method which runs when some action is called from controller.
Java | Delete empty string from list or array
public class deleteEmptyStringQuick { public static void main(String[] args) { String[] emptyStringArray={“test”,”test1″,””,”test3″,””,”test4″}; ArrayList arrayListOfEmptyString=(ArrayList) Arrays.asList(emptyStringArray); //normally we will do this ArrayList filteredList = new ArrayList(); for(String string: arrayListOfEmptyString) { if(!string.isEmpty()) { filteredList.add(string); } } //You can achieve this with single
PHP | Header function not working
Code : Function getredirect($subcontactid) { echo”contactid”.$subcontactid; header(“location:https://subscriptions.zoho.com/app#/customers/$subcontactid”); exit; } The header function in the above code does not work. But when we remove the echo from the code, it works properly. Code after removing echo : Function getredirect($subcontactid) { header(“location:https://subscriptions.zoho.com/app#/customers/$subcontactid”);
Generate getter/setter for PHP Classes in Eclipse
Using PHPGen Eclipse plug-in one can automatically generate getter /setter methods for instance variables. Note: This Plugins is not available in Eclipse Marketplace. Steps For Installation: Start Eclipse and add “Help> Install New Software” from following URL: http://loge5.de/downloads/Eclipse/: Click Add,
Photoshop | Add audio to Gif animation in Photoshop
Step 1. Click “Window” > “Timeline” to show the image sequence of animation. Step 2. Go to timeline and click add audio. Step 3. Select the desired audio you want to add in your .gif file. Step 4. Select audio
jQuery | Click event does not work on dynamically created HTML elements
Solution: Suppose we have the following HTML and jQuery code: HTML: <div id=”container”> <button id=”1″ class=”createNewElement”>Button</button> </div> jQuery: $(‘.createNewElement’).click(function(e) { alert(“Element with id ” + $(this).attr(‘id’) + ” is clicked!”); // tells id of button clicked newElementId = parseInt($(‘div button’).last().attr(‘id’)) +
Maintaining record history in database
When you are building a web-based multi/single tenant system or a desktop system which has a database at its backend to maintain records, keeping the history of records proves to be very useful in the long run from information and