CakePhp | beforeSave and afterSave Callback Methods

Author - Kailash
|
0 Comments
|

beforeSave(): This function is called automatically before every save or update operation. This function must return true if you want to continue save process. The data for save, if needed in this function, will be in $this->data.

Syntax:
class MyModel extends AppModel {
public
function beforeSave() {
if (isset($this – > data Read more…

PHP | What is the purpose of data filtering in PHP?

Author - Ishpreet Kaur
|
0 Comments
|

Data Filtering is required in PHP to validate input and sanitize input received. Generally, we need to validate data before inputs need to be saved or used in our webpage. Wrong data inputs may cause exceptions or erroneous state in a webpage.

Data Filtering involves:
Validation:Read more…

Apache Solr | Indexing all files in a folder recursively

Author - Harleen Kaur
|
0 Comments
|

Indexing of all files inside a folder and all its subfolders can be done using java language in the following ways:

1. Using data import handler.
2. Without data import handler i.e by creating a recursive function in java code.

These methods are discussed below:

1.  Using Read more…

Java | Wrapper classes, autoboxing and unboxing

Author - Komal
|
0 Comments
|

Wrapper classes are the classes to convert the primitive types to objects of their respective class. We have many primitive types in Java like int, float, char etc. These primitive types can not be used in Collections as Collections only allow objects. Therefore in such situations wrapper classes are used Read more…

Salesforce | Why to use @TestVisible annotation

Author - Webner
|
0 Comments
|

Problem: Why we use @TestVisible annotation for a private method and private variable of a Class in Salesforce?

Description: I have a situation where I want to call a private method of a class in the test class, whenever I tried to call the private Read more…

PHP | Short introduction to traits in PHP

Author - Parminder Kaur
|
0 Comments
|

In PHP, the trait is a method of code re-usability. Php is single inheritance programming language. So there is a limitation of code reusability due to single inheritance. Traits in PHP is basically a method of code reusability. Traits have a similar declaration like the class but it includes Read more…

Salesforce | How to track email sent by workflows or process builder in email history section of record?

Author - Kiran Preet
|
0 Comments
|

1.Create an email template.
For example, we created a template called “Leads: Welcome email”
Somewhere in the template, add “ref:{Object Id of the record}” which you want to track the activity
For example, in our template, we added ref: {!Lead.Id}. If you want to hide this line Read more…

Moodle | Uploading Scorm Package and some internal function calls

Author - Kailash
|
0 Comments
|

1.Uploading a scorm package (.zip) in moodle:

a. Log-in to moodle, navigate to your course and “turn editing on”:

b. Click “Add an activity or resource” link:

c. Select Scorm package from list and click Add button:

d.Add basic information about the SCORM package that you are Read more…

Java Servlets | Converting relative path to absolute for file upload

Author - Harleen Kaur

In the program of uploading files to a server location, instead of using absolute location for saving file to that path, relative path needs to be used. Program was working correctly for absolute path.

In the maven project with the following directory structure , I created a resources folder in the Read more…

Apache Tomcat | No change reflected on re-deploying war file into tomcat’s webapps folder

Author - Neha Mishra

Issue: I had deployed latest war file of my Java project into tomcat’s webapps folder but I could not see any changes reflected while running my project.

What I tried?
It looked like war file must not have been uploaded properly. So, I stopped the tomcat server Read more…

PHP | Password hashing

Author - Deepika
|
0 Comments
|

Password hashing is the new recommended way to store the password using hashing method (PHP 5 >= PHP 5.5, PHP7). Password hashing is used to encrypt the password similar to the way md5, sha1, sha256 etc do. But this method follows stronger hashing algorithm comparatively. There are two methods Read more…

Spring Framework | How to define interceptor for a spring web project

Author - Rita
|
0 Comments
|

Interceptors are components that intercept requests before passing to controller and responses before rendering the view. Interceptors can intercept request and response in our web application. With the help of interceptor we can check whether a user has the authority to execute a transaction on a particular object in the Read more…

Salesforce | Call Apex class from Process Builder

Author - Kiran Preet
|
0 Comments
|

Salesforce process builder is a tool to automate the processes using user interface itself. Here we can select source object, criteria/event to initiate the process as well and the action to be taken on the occurrence of the event. In actions section of process builder, we can execute apex Read more…

Moodle / Totara | Null response on calling Plugin api from outside

Author - Manju Kashyap
|
0 Comments
|

Description: In one project we were invoking methods of a Moodle plugin from outside in the web app with the help of curl post requests. At the Moodle’s end, we have created a custom plugin and defined our methods in that. We are returning back json_encoded string Read more…

Apache Solr | Finding term frequency of a specific term in Solr for indexed Documents

Author - Harleen Kaur
|
0 Comments
|

Document frequency and Term frequency are the terms that are generally used for finding relevance of the documents to the search query. When user types some word, then the number of documents containing the word returned in the result set is known as document frequency. Similarly, the number of times Read more…

How to create a new Template in your Mandrill Account

Author - Rita
|
0 Comments
|

1.  Log in to your mandrill account with your credentials, you will see below screen after successful login:

Fig 1: Logged In user Screen

2.  Click on the outbound tab in the left pane of the above screenshot:

Fig 2: Outbound tab view

3.  In the top of Menu bar Read more…

Get Cron Job execution notification via Mail

Author - Parminder Kaur
|
0 Comments
|

Whenever a cron job is executed, one can get email notification of cron job execution if the cron job doesn’t run successfully or there is a bug in cronjob file.

These are the steps in Terminal

1.crontab -e
2.MAILTO = xyz@gmail.com
3.Write cronjob.

Below is Read more…

Blackboard | Changing Course Entry Point

Author - Neha Mishra
|
0 Comments
|

Blackboard LMS allows us to change the “course entry point” for Blackboard.
We can set up Blackboard so that user always go to the specific section of Course page when they enter the course. The default course entry page is termed as Home Page for the course.

STEPS :

1. Go Read more…

Hadoop | ServerNotRunningYetException and PleaseHoldException

Author - Webner
|
0 Comments
|

Problem 1: ERROR: org.apache.hadoop.hbase.ipc.ServerNotRunningYetException: Server is not running yet

While running the hbase shell sometimes we receive Server is Not Running Yet error while our hbase master server is running properly.

Solution: This problem occurs when we fetch the data from the hdfs for hbase Read more…

Java | Understanding signature of main() method

Author - Komal
|
0 Comments
|

The syntax of main method in java is:
public static void main(String[] args) {
}
There are three keywords used in main: public, static, void

public: public keyword is the access modifier in Java which gives its access to the outside world. As class execution begins from main method Read more…

‹ Prev page1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 Next page ›
Send your message