Hire Offshore Wordpress Developers To Develop Your Websites

Wordpress is a CMS web application, based on PHP and MYSQL. Today many blog sites are built by using Wordpress all over the world. It offers many plugins, templates and layouts by which you can customize your websites very easily. Wordpress is not only used for the development of your blog sites but it can also be used for different kinds of web portals development as well. Websites related to shopping cart, news, online magazine, business and corporate can be developed perfectly using Wordpress solution. Wordpress offers different kinds of technical supports for the developers. It even offers SEO plugins and is very much user friendly, which cannot be seen in other applications. Users can use it with less technical knowledge and can even modify the contents very easily.

Today, many companies are seen to be hiring an offshore Wordpress developer to develop their websites successfully that includes the content creation, customization and web development. By hiring offshore WordPress developers you can develop your projects very easily with less time and in less effort. Those developers are experienced in the fields like customization process, implementation, theme creation, system design, custom modules development, extensions development, design works, integration, module installation, existing modification and maintenance of work etc. They have got years of experience in this particular fields and can help you out very easily. They deliver the best quality of work on time.
By hiring these developers you can enjoy various benefits as it offers the best quality and the best reliable services for you in less time. They provide guaranteed services which can satisfy your clients all round the globe. They complete their work on time within the specified time given to them and help you to expand your business online. They provide 24*7 business services and support.

Thus by hiring these developers you can enjoy these various benefits and can develop your online business in no time. It will help you to save your expensive time and will help to satisfy your clients with best quality of work all round the globe.

What is the future of mobile recharge business?




Mobile recharge business has come to a profitable front. With different service providers, it is easy for the mobile recharge vendors to carry on their work with ease. As the mobile recharge vendors are getting in direct contact with the service providers, it is getting easy for them to make their business work. With the credibility of the recharge vendors increasing in the market, telecom companies prefer to take use of their services so that they can cater to a larger audience. People prefer to take use of recharge vendors to know about the latest deals and offers given by the telecom companies as they are having detailed knowledge about them. 

With augment of technology, mobile recharge business is seeing new trends in the market. Today, new machines are available for the mobile recharge vendors by which they can process the recharge amount quickly for the customers. In addition, some of the mobile recharge vendors are doing the processing of recharge via online sources as it is also a quick and accurate measure to complete the recharge process. The margin, which has been kept for the mobile recharge vendors, has also been increased to new marks so that they can get maximum profit. 

Some of the telecom companies are directly associating vendors for their service and plans so that they can help the companies in increasing their market share. With quick recharge process possible through technological advancement, business of mobile recharge is booming in the industry and is giving brighter and better prospects to the business.

Resolve Error "unable to find valid certification path to requested target"

How to import certificate ?

Sometimes while working on a client that works with an SSL enabled server running in https protocol, you could get error 'unable to find valid certification path to requested target' if the server certificate is not issued by certification authority, but a self signed or issued by a private CMS. To resolve this error, certificate must be import into trust center so application can use it to consume web service. All you need to do is to add the server certificate to your trusted Java key store if your client is written in Java. You might be wondering how as if you cannot access the machine where the server is installed. There is a simple program can help you.

Download Install_cert.java here

This program opens a connection to the specified host and starts SSL handshake.s
Run Install_cert.java file.
C:\>java InstallCert ***.*******.***

Here ***.******.***(after java InstallCert) is domain from where we want to import certificate. Press 1 to import certificate or q to exit. This will generate jssecacerts file. Copy this file and put it in jdk/jre/lib/security folder. Run application, this error will be removed by now.
Note: In the image above, certificate is already imported so key store is not changed.

Use GridView in Android

Gridview is a ViewGroup that displays items in a two-dimensional, scrollable grid. The grid items are automatically inserted to the layout using a ListAdapter. In this tutorial, you’ll create a grid of image thumbnails. When an item is selected, a toast message will display the position of the image.

1. Start a new project named DemoGridView.
2. Find some photos you would like to use, Save the image files into the project's res/drawable/ directory.
3. Open the res/layout/main.xml file and insert the following:



< GridView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/gridview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:columnWidth="90dp"
android:numColumns="auto_fit"
android:verticalSpacing="10dp"
android:horizontalSpacing="10dp"
android:stretchMode="columnWidth"
android:gravity="center"/>

4. Open HelloGridView.java and insert the following code for the onCreate() method:


public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

GridView gridview = (GridView) findViewById(R.id.gridview);
gridview.setAdapter(new ImageAdapter(this));

gridview.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView parent, View v, int position, long id) {
Toast.makeText(HelloGridView.this, "" + position, Toast.LENGTH_SHORT).show();
}
});
}

After the main.xml layout is set for the content view,get the id of GridView and call setAdapter() method. The setAdapter() method then sets a custom adapter (ImageAdapter) which set for all items to be displayed in the grid.The ImageAdapter is created in the next step.when an item in the grid is clicked, the setOnItemClickListener() method is called.And then Toast create which displays the index position of the selected item (starting from zero).

5. Create a new class called ImageAdapter that extends BaseAdapter:


public class ImageAdapter extends BaseAdapter {
private Context mContext;

public ImageAdapter(Context c) {
mContext = c;
}

public int getCount() {
return mThumbIds.length;
}

public Object getItem(int position) {
return null;
}

public long getItemId(int position) {
return 0;
}
// create a new ImageView for each item referenced by the Adapter

public View getView(int position, View convertView, ViewGroup parent){
ImageView imageView;

if (convertView == null) {
imageView = new ImageView(mContext);
imageView.setLayoutParams(new GridView.LayoutParams(85, 85));
imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
imageView.setPadding(8, 8, 8, 8);
} else {
imageView = (ImageView) convertView;
}

imageView.setImageResource(mThumbIds[position]);
return imageView;
}
// references to our images
private Integer[] mThumbIds = {
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7,
R.drawable.sample_0, R.drawable.sample_1,
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7,
R.drawable.sample_0, R.drawable.sample_1,
R.drawable.sample_2, R.drawable.sample_3,
R.drawable.sample_4, R.drawable.sample_5,
R.drawable.sample_6, R.drawable.sample_7
};
}

First, extends BaseAdapter. The constructor and getCount() are self-explanatory. Normally, getItem(int) should return the actual object at the specified position in the adapter, but it's ignored for this example. Likewise, getItemId(int) should return the row id of the item, but it's not needed here. The first method necessary is getView(). This method creates a new View for each image added to the ImageAdapter. When this is called, a View is passed in, which is normally a recycled object (at least after this has been called once), so there's a check to see if the object is null. If it is null, an ImageView is instantiated and configured with desired properties for the image presentation:

  • setLayoutParams(ViewGroup.LayoutParams) sets the height and width for the View—this ensures that, no matter the size of the drawable,each image is resized and cropped to fit in these dimensions, as appropriate.
  • setScaleType(ImageView.ScaleType) declares that images should be cropped toward the center (if necessary).
  • setPadding(int, int, int, int) defines the padding for all sides. (Note that, if the images have different aspect-ratios, then less padding will cause for more cropping of the image if it does not match the dimensions given to the ImageView.)

  • If the View passed to getView() is not null, then the local ImageView is initialized with the recycled View object. At the end of the getView() method, the position integer passed into the method is used to select an image from the mThumbIds array, which is set as the image resource for the ImageView. All that's left is to define the mThumbIds array of drawable resources.

    6. Run Application:

    Excel in Java using Apache POI

    This tutorial shows how to create an excel file. There are other options to create excel files using a Java program but in this case we are going to speak about Apache POI which is probably one of the most important frameworks to manage office files. For example you can read and write powerpoint, word or excel files. HSSF is the POI Project's pure Java implementation of the Excel '97(-2007) file format. XSSF is the POI Project's pure Java implementation of the Excel 2007 OOXML (.xlsx) file format. HSSF and XSSF provides ways to read spreadsheets create, modify, read and write XLS spreadsheets. They provide:
    • low level structures for those with special needs
    • an event model api for efficient read-only access
    • a full user model api for creating, reading and modifying XLS files.

    Jar files required: Download Here
    1. ooxml-schemas-1.0.jar
    2. poi-ooxml-3.5.jar
    3. poi-3.5.jar
    4. xmlbeans-2.3.0.jar
    5. dom4j-1.6.1.jar

    Java Source code using POI-XSSF


    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.File;
    import org.apache.poi.hssf.util.HSSFColor.GREY_25_PERCENT;
    import org.apache.poi.hssf.util.HSSFColor.GREY_50_PERCENT;
    import org.apache.poi.ss.usermodel.CellStyle;
    import org.apache.poi.xssf.usermodel.XSSFCell;
    import org.apache.poi.xssf.usermodel.XSSFCellStyle;
    import org.apache.poi.xssf.usermodel.XSSFFont;
    import org.apache.poi.xssf.usermodel.XSSFRichTextString;
    import org.apache.poi.xssf.usermodel.XSSFRow;
    import org.apache.poi.xssf.usermodel.XSSFSheet;
    import org.apache.poi.xssf.usermodel.XSSFWorkbook;

    public class XSSFExcelGenerator {
    XSSFSheet sheet;// Sheet Declaration
    XSSFWorkbook xssfWorkbook = new XSSFWorkbook();

    protected void buildExcelDocument(String fileName) {
    FileOutputStream fileOutputStream = null;
    try {
    fileOutputStream = new FileOutputStream(fileName);
    sheet = xssfWorkbook.createSheet("SampleExcelSheet"); // Create Sheet.
    XSSFFont font = xssfWorkbook.createFont();// Font setting for sheet.
    font.setBoldweight((short) 700);
    sheet.setDefaultColumnWidth(30);
    // Create Styles for sheet.

    XSSFRow headerRow = sheet.createRow(0); // Create Header Row(0th Row)

    XSSFCell headerCell01 = headerRow.createCell(0); // 0th Row’s 0th Cell
    headerCell01.setCellStyle(headerStyle());
    headerCell01.setCellValue("STUDENT NAME");

    XSSFCell headerCell02 = headerRow.createCell(1); // 0th Row’s 1st Cell
    headerCell02.setCellStyle(headerStyle());
    headerCell02.setCellValue("CLASS");

    XSSFCell headerCell03 = headerRow.createCell(2); // 0th Row’s 2nd Cell
    headerCell03.setCellStyle(headerStyle());
    headerCell03.setCellValue("DATE OF BIRTH");

    XSSFRow informationRow1 = sheet.createRow(1); // Create First Information Row(1st Row)

    XSSFCell cell11 = informationRow1.createCell(0);
    Cell11.setCellStyle(cellstyle());
    Cell11.setCellValue("Test1");

    XSSFCell cell12 = informationRow1.createCell(1);
    Cell12.setCellStyle(cellstyle());
    Cell12.setCellValue("Fifth");

    XSSFCell cell13 = informationRow1.createCell(2);
    Cell13.setCellStyle(cellstyle());
    Cell13.setCellValue("11/1/2012");
    XSSFRow informationRow2 = sheet.createRow(2); // Create Second Information Row(2nd Row)

    XSSFCell cell21 = informationRow2.createCell(0);
    Cell21.setCellStyle(cellstyle());
    Cell21.setCellValue("Test2");

    XSSFCell cell22 = informationRow2.createCell(1);
    Cell22.setCellStyle(cellstyle());
    Cell22.setCellValue("Seventh");

    XSSFCell cell23 = informationRow2.createCell(2);
    Cell23.setCellStyle(cellstyle());
    Cell23.setCellValue("11/1/2012");

    XSSFRow informationRow3 = sheet.createRow(3); // Create Third Information Row(3rd Row)

    XSSFCell cell31 = informationRow3.createCell(0);
    Cell31.setCellStyle(cellstyle());
    Cell31.setCellValue("Test3");

    XSSFCell cell32 = informationRow3.createCell(1);
    cell2.setCellStyle(cellstyle());
    cell2.setCellValue("Ninth");

    XSSFCell cell33 = informationRow3.createCell(2);
    Cell33.setCellStyle(cellstyle());
    Cell33.setCellValue("11/1/2012");

    xssfWorkbook.write(fileOutputStream); // write in excel

    } catch (Exception e) {
    e.printStackTrace();
    } finally {
    /*
    * Close File Output Stream
    */
    try {
    if (fileOutputStream != null) {
    fileOutputStream.close();
    }
    } catch (IOException ex) {
    ex.printStackTrace();
    }
    }
    }

    protected XSSFCellStyle headerstyle(){

    XSSFFont font = xssfWorkbook.createFont();
    font.setBoldweight((short) 700);
    XSSFCellStyle headerStyle = xssfWorkbook.createCellStyle();
    headerStyle.setFillForegroundColor(GREY_50_PERCENT.index);
    headerStyle.setFillPattern(XSSFCellStyle.SOLID_FOREGROUND);
    headerStyle.setFont(font);
    headerStyle.setBorderBottom((short) 1);
    headerStyle.setBorderLeft((short) 1);
    headerStyle.setBorderRight((short) 1);
    headerStyle.setBorderTop((short) 1);
    headerStyle.setAlignment(CellStyle.ALIGN_CENTER);
    return headerStyle;

    }

    protected XSSFCellStyle cellstyle(){

    XSSFCellStyle cellStyle = xssfWorkbook.createCellStyle();
    cellStyle.setFillForegroundColor(GREY_25_PERCENT.index);
    cellStyle.setFillPattern(XSSFCellStyle.SOLID_FOREGROUND);
    cellStyle.setBorderBottom((short) 1);
    cellStyle.setBorderLeft((short) 1);
    cellStyle.setBorderRight((short) 1);
    cellStyle.setBorderTop((short) 1);
    cellStyle.setAlignment(CellStyle. ALIGN_CENTER);
    return cellStyle;
    }


    public static void main(String[] args) {
    /*
    * call method and pass as an argument path of excel file. Please make
    * sure that path of excel file is correct otherwise it will throw
    * FileNotFound Exception.
    */
    new XSSFExcelGenerator().buildExcelDocument("D:" + File.separator + "excelfiles" + File.separator + "Testexcel.xlsx");
    }
    }

    Created Excel File(Formatted):

    Geofence Creation on Map in iPhone

    MkMapView Geofence CreationThis is basic requirement to have Geofence around a Location point on MKMapView. we may have Circular, square and Polygon type of geofence. By having that geofence any annotation(Marker) on MKMapView can be idenitifed as it is residing in that geofence or not , basis on that we can have our customized action. Before this you must have knowledge of rendering MKMapView and pointing Annotation on it (if no then please visit previous blogs for this Knowledge) here.

    Some Assumption for below code
    1) mapView is MKMapView object
    2) overlay is “id” Object that consisting current geofence object on mapView

    Add Circular Geofence

    -(void)addCircle:(CLLocation *)center radius:(float)radius{

    // Overlay is id object that consisting your geofence object so before assigning new Geofence object to it wa are going to
    remove already assigned geofence to it from our MkMapView object mapView
    // mapView is our MkMapView global object in .h file

    if (overLay != nil) {
    [mapView removeOverlay:overLay];
    overLay = nil;
    [overLay release];
    }
    MKCircle *circleOverLay = [[MKCircle circleWithCenterCoordinate:center.coordinate radius:radius] autorelease];
    overLay = circleOverLay;
    [overLay retain];
    [mapView addOverlay:circleOverLay];
    }

    Circular Geofence

    Add Square Geofence


    (MKMapRect) mapRectForCoordinateRegion:(MKCoordinateRegion)coordinateRegion {
    CLLocationCoordinate2D topLeftCoordinate = CLLocationCoordinate2DMake(coordinateRegion.center.latitude
    + (coordinateRegion.span.latitudeDelta / 2.0), coordinateRegion.center.longitude
    - (coordinateRegion.span.longitudeDelta / 2.0));

    MKMapPoint topLeftMapPoint = MKMapPointForCoordinate(topLeftCoordinate);

    CLLocationCoordinate2D bottomRightCoordinate = CLLocationCoordinate2DMake(coordinateRegion.center.latitude
    - (coordinateRegion.span.latitudeDelta / 2.0), coordinateRegion.center.longitude
    + (coordinateRegion.span.longitudeDelta / 2.0));

    MKMapPoint bottomRightMapPoint = MKMapPointForCoordinate(bottomRightCoordinate);

    MKMapRect mapRect = MKMapRectMake(topLeftMapPoint.x, topLeftMapPoint.y, fabs(bottomRightMapPoint.x - topLeftMapPoint.x),
    fabs(bottomRightMapPoint.y - topLeftMapPoint.y));

    return mapRect;
    }
    -(void)addSquarePolygon:(CLLocation*)center radius:(float)radius{
    if (overLay != nil) {
    [mapView removeOverlay:overLay];
    overLay = nil;
    [overLay release];
    }
    MKCoordinateRegion region = MKCoordinateRegionMakeWithDistance(center.coordinate, radius*2, radius*2);
    MKMapRect squareRect = [self mapRectForCoordinateRegion:region];

    MKMapPoint leftTop = MKMapPointMake(MKMapRectGetMinX(squareRect), MKMapRectGetMinY(squareRect));
    MKMapPoint rightTop = MKMapPointMake(MKMapRectGetMaxX(squareRect), MKMapRectGetMinY(squareRect));
    MKMapPoint leftBottom = MKMapPointMake(MKMapRectGetMinX(squareRect), MKMapRectGetMaxY(squareRect));
    MKMapPoint rightBottom = MKMapPointMake(MKMapRectGetMaxX(squareRect), MKMapRectGetMaxY(squareRect));

    MKMapPoint squarePoints[] = {leftTop,rightTop,rightBottom,leftBottom};

    MKPolygon *squareOverlay = [[MKPolygon polygonWithPoints:squarePoints count:4] autorelease];
    overLay = squareOverlay;
    [overLay retain];
    [mapView addOverlay:squareOverlay];
    }

    Square Geofence

    Add Polygon Geofence


    -(void)addPolygon:(CLLocation*)center radius:(float)radius
    {
    if (overLay != nil)
    {
    [mapView removeOverlay:overLay];
    overLay = nil;
    [overLay release];
    }
    MKPolygon *polygonOverlay = [[MKPolygon polygonWithPoints:self.mapPoints count:mapPointsCount] autorelease];
    //here mapPoints is an array that consisting MKMapView Coordingates , that will be used to generate polygon on MkMapView

    overLay = polygonOverlay;
    [overLay retain];
    [mapView addOverlay:polygonOverlay];
    }
    // [mapView addOverlay:circleOverLay] calls -(MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id)
    overlay Delegate that is defined below


    Polygon Geofence

    How to Use


    -(void)generateOverlay{
    CLLocation *jaipurLocation = [[[CLLocation alloc]initWithLatitude:26.940435 longitude:75.783691]autorelease];
    [self addCircle:jaipurLocation radius:1000];
    [self addSquarePolygon:jaipurLocation radius: 1000];
    // Radius is passed in meter
    }

    Struts1 v/s Struts2

    Struts 1 v/s Struts 2
    In the following article, we are going to compare the various features between the two frameworks. Struts 2 is very simple as compared to struts 1, few of its important features are:

    1. Servlet Dependency

    Actions in Struts1 have dependencies on the servlet API since the HttpServletRequest and HttpServletResponse objects are passed to the execute method when an Action is invoked while in case of Struts 2, Actions are not container dependent because they are made of simple POJOs.In Struts 2, the servlet contexts are represented as simple Maps which allows actions to be tested in isolation. Struts 2 Actions can access the original request and response, if required. However, other architectural elements reduce or eliminate the need to access the HttpServetRequest or HttpServletResponse directly.

    2. Action classes

    Programming the abstract classes instead of interfaces is one of major design issues of struts1 framework that has been resolved in the struts 2 framework.Struts1 Action classes needs to extend framework dependent abstract base class, while in case of Struts 2 Action class may or may not implement interfaces to enable optional and custom services. In case of Struts 2 , Actions are not container dependent because they are made simple POJOs.Struts 2 provides a base ActionSupport class to implement commonly used interfaces. Perhaps, the Action interface is not required. Any POJO object with an execute signature can be used as an Struts 2 Action object.

    3. Validation

    Struts1 and Struts 2 both supports the manual validation via a validate method. Struts1 uses validate method on the ActionForm, or validates through an extension to the Commons Validator. However, Struts 2 supports manual validation via the validate method and the XWork Validation framework. The Xwork Validation Framework supports chaining validation into sub-properties using the validations defined for the properties class type and the validation context.

    4. Threading Model

    In Struts1, Action resources must be thread-safe or synchronized. So Actions are singletons and thread-safe, there should only be one instance of a class to handle all requests for that Action. The singleton strategy places restrictions on what can be done with Struts1 Actions and requires extra care to develop. However in case of Struts 2, Action objects are instantiated for each request, so there are no thread-safety issues.

    5. Testability

    A major hurdle to test Struts1 Actions is that the execute method because it exposes the Servlet API. Where as the Struts 2 Actions can be tested by instantiating the Action, setting properties and invoking methods. Dependency Injection support also makes testing simpler. Actions in struts2 are simple POJOs and are framework independent, hence testability is pretty easy in struts2.

    6. Harvesting Input

    Struts1 uses an ActionForm object to capture input. And all ActionForms needs to extend a framework dependent base class. JavaBeans cannot be used as ActionForms, so the developers have to create redundant classes to capture input.However, Struts 2 uses Action properties (as input properties independent of underlying framework) that eliminates the need for a second input object, hence reduces redundancy. Additionally in struts2, Action properties can be accessed from the web page via the taglibs. Struts 2 also supports the ActionForm pattern, as well as POJO form objects and POJO Actions. Even rich object types, including business or domain objects, can be used as input/output objects.

    7. Expression Language

    Struts1 integrates with JSTL, so it uses the JSTL-EL. The struts1 EL has basic object graph traversal, but relatively weak collection and indexed property support. Struts 2 can also use JSTL, however it supports a more powerful and flexible expression language called "Object Graph Notation Language" (OGNL).