ASP .NET | InvalidOperationException: An asynchronous module or handler completed while an asynchronous operation was still pending

written by : Neha Mishra (Senior Software Engineer)
February 23, 2017
|
0 Comments
|

[InvalidOperationException: An asynchronous module or handler completed while an asynchronous operation was still pending]

Error : Asp.net Web API – parent method executes itself before the child asynchronous method is completed.

Description : I have a public method that calls an asynchronous method. This asynchronous method returns void. See below :

Code :

public Read more…

CakePHP 3.x | How to change URL of your website to hide controller/action name

written by : Richa Sharma (Senior Software Engineer)
|
0 Comments
|

Requirement:

While running the website in browser, the url path shows controller name followed by the action name and parameters list. In that case the url looks like:

www.xyz.com/User/showDetails/

We may come across two types of requirements.

Displaying only the action name without showing the controller Read more…

Javascript | How to call ajax in DevExtreme component using angularjs

written by : Neelam Thakur (Senior Web Designer)
|
0 Comments
|

var folderApp = angular.module(“folder”, [“dx”]);
folderApp.controller(“folderController”, [“$scope”, “$http”, function($scope, $http) {

$scope.gridSettings = {

columns: [{
dataField: “myObjectName”,
caption: “Name”,
} {
dataField: “myObjectEmail”,
caption: “Email”,
}],

dataSource: new DevExpress.data.CustomStore({
load: function(loadOptions) {
return $http({
method: “GET”,
url: ” ”;
headers: {},
}).then(function(data) {
return {
data: data.data,
totalCount: data.data.length Read more…

Salesforce: Execute flow from Process Builder

written by : Kunal Kumar (Software Engineer)
February 21, 2017
|
0 Comments
|

How to execute flow from Process Builder in salesforce?
Sometime it is very useful to execute flow from the Process Builder. We can execute as many flows as we want. Flow can be used to create record, update record or send any alert or email to the user. In this Read more…

Selenium | Find a particular window and close it via code

written by : Sumit Sangha (Software Test Engineer)
|
0 Comments
|

If multiple browser windows are opened, then find a particular window and close it by using web driver.

We can do so by using the following function:

public static void switchControlToSpecifiedWindow(WebDriver driver) {
Iterator < String > windows = driver.getWindowHandles().iterator();
while (windows.next()) {
driver.switchTo().window(windows.next());
String title = driver Read more…

Ubuntu | Remove sendmail completely

written by : Ishpreet Kaur ( Senior Software Engineer)
|
0 Comments
|

Problem: I installed sendmail in my ubuntu system with the help of link http://lukepeters.me/blog/getting-the-php-mail-function-to-work-on-ubuntu. I installed it to test php mail functionality on localhost for my project. It was working slow, therefore, after testing, I wanted to uninstall Read more…

Microsoft Azure | Deploy ASP.NET Web Project on Microsoft Azure

written by : Neha Mishra (Senior Software Engineer)
February 20, 2017
|
0 Comments
|

1.Go to Server Explorer. Right- click on Azure and click on Connect to Microsoft Azure subscription.

A login screen will appear. Enter valid credentials with at least one subscription and sign-in.

2. Now expand Azure. Right click on App Service and create a new web App. See below Read more…

PDFtk | View PDF field information from command line

written by : Kiranpreet Kaur (Software Engineer)
|
0 Comments
|

Solution:- If you have a pdf and you do not know the names of the fields used in the pdf just follow these steps:-

Step 1:- Install pdftk (search online)
Step 2 – Open the command prompt, run the command

pdftk YourPdf.pdf dump_data_fields
Using Above command you will get information Read more…

Java | Hibernate best practices

written by : Rita Sharma (Software Consultant)
|
0 Comments
|

1) Always define hashCode() and equals() methods in your Persistent classes.
2) Persistent class method’s equals() and hashCode() must access its fields through getter methods. It is a good practice to use accessor methods instead of direct instance variable access.
3) Always Implement Serialization with your entity classes. It Read more…

A Brief Introduction to SOAP

written by : Parminder Kaur (Software Engineer)
February 17, 2017
|
0 Comments
|

SOAP stands for Simple Object Access Protocol. This protocol allows to communicate over the web between the programs (or Web service-enabled applications) running on two different systems using Http and language used by this protocol to communicate is XML (Extensible Markup Language).

The SOAP message is sent in an Read more…

How to configure DevExtreme with visual studio MVC application

written by : Neelam Thakur (Senior Web Designer)
|
0 Comments
|

These are the steps:-

1.Install Microsoft visual studio on your machine.
2.Then we need Xpress Developer Studio. Which is available on https://js.devexpress.com/
3.Install Xpress Developer Studio in your machine.
4.Then we need to install DevExtreme tool in the Microsoft visual studio.
5.Create Read more…

Importing gmail contacts in your website using javascript

written by : Richa Sharma (Senior Software Engineer)
|
0 Comments
|

Importing gmail contacts in external website is common these day where you can login to gmail from within external website and then access your contacts directly inside external website. For example, the requirement could be to allow user to refer their friends to use your website and for that they Read more…

Moodle | Calling custom function on an event

written by : Kritika Sood (Software Engineer)
February 16, 2017
|
0 Comments
|

Event driven architecture is inbuilt into Moodle. There are various kinds of events present in moodle like

1.Course completion
2.Course creation
3.Course deletion
4.Course Module creation
5.Category Creation
etc.

On trigger of an event we can call our custom function of custom block or any Read more…

Can static variables be local?

written by : Komal Dhiman (Software Engineer)
|
0 Comments
|

Static variables are the variables that belongs to class. Static variables are shared among all the objects i.e there is only single copy of that variable.These do not get memory in each object. They automatically get initialised to 0.
Example:

class Example {
static int count;
int instance_var;
Example Read more…

WordPress | Add html form on a slide using Slider revolution Plugin

written by : Manpreet Kaur (Software Engineer)
February 15, 2017
|
0 Comments
|

How can we add html form in a slide in slider revolution plugin in WordPress?

Solution:

Slider Revolution plugin gives us options to add image, shapes, layers to enter text for example.

For placing a form inside a slide follow these Steps:

1.Click on Slider Revolution in the side Read more…

Salesforce | Best Practices

written by : Webner
|
0 Comments
|

Best Practices for Salesforce

For Apex Classes:-

1.Use Asynchronous Apex methods like @future methods, batch processing, scheduler that does not need to be executed synchronously.
2.Asynchronous Apex should be “bulkified”. It means able to handle collections of records.
3.Apex code must have appropriate exception handling.
4.When Read more…

CakePhp 3.x | Declaration of user defined constants

written by : Parminder Kaur (Software Engineer)
|
0 Comments
|

In cakephp 3 we declare constants in bootstrap.php file under /app/config folder.

A constant can be declared as:

Configure::write(‘CONSTANT_NAME’, Value, true);

Example: Configure::write(‘USERNAME’, ‘Webners’, true);

To use this constant in another file, use this:

use Cake\Core\Configure;

Now the constant can be accessed Read more…

PHP and AWS | Copy AWS S3 file to local folder

written by : Ashish Gautam (Software Technical Lead)
February 14, 2017
|
0 Comments
|

How to copy a file from Amazon s3 to some local folder using PHP code

$t=file_put_contents(‘[Destination file address]’, file_get_contents(“[S3 url]”));

Here $t will get the size of file in bytes if successful otherwise 0. Before executing this make sure that the S3 file has access permission and Read more…

Java | Instance and Static variables with final keyword

written by : Kunal Kumar (Software Engineer)
|
0 Comments
|

When to use instance variables, static variables and when to use final with them?

Instance variables belong to the object and each object has its own value for each instance variable.

For example:

Company has many employees and each employee has different properties like name, emp_id, address etc so these Read more…

Cron jobs in Totara

written by : Nitin Pant (System Administrator)
|
0 Comments
|

When I made any new changes to the audience or add a new user(s) to existing audience in totara, it didn’t reflect in the member area of that audience. Sometimes it doesn’t even show changes made for many days because of scheduled Cron not running properly and Read more…

1 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 Next page ›
Send your message