Webner Blogs - eLearning, Salesforce, Web Development & More - Page 61 of 67

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
1 Comment

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…

SFTP to server using FileZilla without password

Author - Webner

We can connect to a remote server via SFTP without password, using PEM file of server. The PEM file is public key certificate file of the server to which we have to connect. We’ll need to have following details in this case:

.pem file

Steps :

1. Open Read more…

Salesforce | Field Visibility Issue

Author - Webner
Comments off

If you want to programmatically read values of certain fields, those field must be visible in the layout. To change field visibility follow these steps:

1. Login and click on setup link.
2. Click Security Controls in Administrator menu.

3. Click on Field Accessibility.

4. Click on the object name Read more…

Mysql | How to drop table having dot (.) in the table name in MySQL

Author - Rita

We had a table in our database having dot in the table name as below:

Table name – kpc.product_categories

On trying to delete kpc.product_categories using below command:

drop table kpc.product_categories

It used to give error that no such table exists.

Dot(.) is the reserved symbol in mysql so Read more…

Eclipse | How to change or recover Secure Storage Password for Eclipse Kepler

Author - Webner

When we add Salesforce project to Eclipse sometimes it asks for ‘Secure Storage Password’. You can try to enter your system password. If it doesn’t works you can change or recover ‘Secure Storage Password’. According to office eclipse documentation.

The secure storage saves data in an encrypted form. On Read more…

Salesforce | Overriding Standard button functionality

Author - Webner

We needed to extend a default functionality of standard salesforce page and buttons on this page. That is we needed to display some custom buttons and fields on the standard page and perform our own logic for these. The Object for which we needed to modify functionality was Event. SInce Read more…

Heroku | How to delete prior database backups

Author - Namisha

Following are the steps to delete the Postgres database backup:

1. Login into heroku.

2. Click on the database>PG Backups. Here you can see all the PG backups list.

3. . For deleting the database, first of all you have to install the toolbelt.

You can download Toolbelt from Read more…

Eclipse – Java decompiler (jd-eclipse)

Author - Rita

If you are working with eclipse IDE, it provides many plugins and one of them is java decompiler. This plugin will decompile all your class files to give you Java source code.
JD-Eclipse is a plug-in for the Eclipse platform. It allows you to display all the Java Read more…

Cakephp | URL routing using prefix before domain name

Author - Webner

Routes in an application are configured in app/Config/routes.php. Defining your own routes allows you to define where your application will take the control to for a given URL.

Default routing is like this:

Ex. www.xyz.com/user/login
Prefix routing will Read more…