Salesforce | How to access php code in salesforce apex class

Author - Webner

We can access the php code in salesforce using @future(callout=true/false). The function we make for accessing the php code in apex class is of static type and does not return any value.

public static void function_Name()
//variable declaration
Http h Read more…

Joomla- Database Error: Unable to connect to the database

Author - Webner

While working with Joomla if you get an error – “Database Error: Unable to connect to the database:Could not connect to database”, check following properties in Joomla’s configuration.php file :

//given values are sample data only.

var $dbtype = ‘mysql’;

var $host = ‘localhost’;

var $user = ‘user_jo151’;

var $password = ‘YourPassword’;

var Read more…

Moodle | Fetch all the categories based on the programs assigned to a user

Author - Neha Mishra

Below are the Moodle database tables that will be used to fetch all the categories based on the programs assigned to a user (complete query is also written after table information):
1. mdl_prog : This table contains each program along with the category to which program belongs, its summary, fullname and Read more…

Photoshop | Content Aware Fill

Author - Webner

We had to use this image in one of the project but there is a problem with the image that it has some text as a watermark on its green arrow.

There is a tool in photoshop called Content Aware Fill, by using this tool we got rid of this Read more…

Upgrade to php 5.6 and apache 2.2 to apache 2.4.17 in ubuntu 12.04

Author - Webner

These are the steps to upgrade to PHP 5.6:
Add the PPA containing version 5.6 of php for Ubuntu 12.04:

sudo apt-add-repository ppa:ondrej/php5-5.6
sudo apt-add-repository ppa:ondrej/php5
Run these command in terminal to upgrade php :
sudo apt-get Read more…

Hibernate | javax.persistence.OptimisticLockException: Row was updated or deleted by another transaction

Author - Webner

You may face following exception while trying to update data in a database table using hibernate:

javax.persistence.OptimisticLockException : Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): []

The reason is optimistic lock is applied Read more…

Salesforce | How to create Single Dynamic Batch Class to update multiple Sobjects in Salesforce

Author - Webner

Suppose you want to update field name ‘Status’ to ‘Active’ in multiple Sobject and there are large number of records for each Sobject. Instead of writing a batch class for each Sobject you can update multiple Sobjects like this.
Declare three variables, one for SOQL, one for field name which Read more…

Introduction to LMS Report v1.0

Author - Webner

While we continue to develop multi-tenant cloud based systems based on leading LMS software like (Moodle, Totara, Blackboard to name a few) for our clients, we have started to launch our own mobile apps related to the same. First such app recently launched by us on Android Playstore and Read more…

Mysql | Forgot root password in Mysql

Author - Navneet Kashyap

If you forget mysql root password these are few easy steps to regain access:
1. shell> mysqld_safe –skip-grant-tables
2.Open another terminal shell> mysql -u root -p (hit enter and use blank password)
3. mysql>UPDATE mysql.user SET Password=PASSWORD(‘NewPassword’)WHERE User=’root’;

4. mysql>FLUSH Read more…

Mobile Apps | Fluctuation in the latitude and longitude values for the current location

Author - Webner

In mobile applications development tracking lat/long of the current location is one of the most commonly used features. To achieve such functionality we mainly use three types of providers which are:

1. GPS providers

2. Network Providers

3. Sim Card or Offline providers

But when we use any of Read more…

Introduction to tarjetasvirtuales

Author - Webner

Internet has totally changed the face of communication and how we do things and sending greeting cards is not an exception to this. There are roughly hundreds of ways to express your feelings to someone who is special to you, however there is nothing like an actual greeting card to Read more…

How to be a good Technical Writer

Author - Webner

In software development world, technical writers are those who write about technology, software manuals, “How to” guides etc. They gain understanding of the complex products and explain them in a precise manner to the target audience. Technical writers put themselves in place of the end user which helps them to Read more…

Couple of approaches to generate test-data in bulk

Author - Rita

Sometimes you need to fill a database table with thousands of test data records. You may also need to generate test data in the form of csv file to feed to a program. How can you generate such a large set of data in short time?
One approach to generate Read more…

Moodle | Call to undefined method mysqli_native_moodle_database :: insert_records()

Author - Manju Kashyap

We were using insert_records() function to insert multiple records in a Moodle database table but it was not working.

We checked for errors by adding following lines in config.php file of moodle:
@error_reporting(E_ALL | E_STRICT);

@ini_set(‘display_errors’, ‘1’);

$CFG->debug = (E_ALL | E_STRICT);

$CFG->debugdisplay = 1 Read more…

Secure Apache Webserver

Author - Navneet Kashyap

By default Apache web server does not come with all the securities enabled. We have to enable enhanced securities before making it live & accessible to the outside world.

Remove Server Version Banner :

Modify httpd.conf and add following directives and save it :
ServerTokens Prod.
ServerSignature Off.

Disable directory browser Read more…

SQL Server not starting at startup and even not starts manually

Author - Webner

In one case we noticed that SQL Server (SQL Server 2014) service was scheduled to start Automatically on system boot but still it was not starting up. It did not even start when we manually tried to start the service. We got following errors:

Error1: A timeout was reached (30000 Read more…

How To get list of all system defined properties in java

Author - Rita

Just write below line in your main java program and it will show you all System defined properties.

Some of the important properties that we can use generally:

1. user.dir will give project root directory location.

2. java.class.path will give the classpath Read more…

Salesforce | How to edit salesforce Created Date and Last Modified Date field values?

Author - Shalini

Created Date and Last Modified Date fields in Salesforce objects are audit fields and we can’t edit or change these field directly or through code. You have to contact salesforce support team for them to grant permissions to you to edit or change these fields if needed.

Just create Read more…

Moodle | Fetch activities in same order in which they are listed on Course Page

Author - Neha Mishra

There is a functionality on Moodle course page that activities can be dragged up and down to change their order after turning on the edit button. If in the code you need to pull the activities in same order for a course then following code can help you :
$mods = $modinfo Read more…

Salesforce | Using Javascript to set value in parent Visualforce page field

Author - Webner

Suppose you have a Visualforce page with a form and you have a link to open a popup. The page loaded in popup needs to set a value back into a textbox in the parent page. Here is how you can achieve this:
This is sample code of the parent 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 39 40 41 42 43 44 45 46 47 Next page ›