Monday, December 14, 2015

How to setup or create new application in PythonAnyWhere Hosting

http://ampersandacademy.com/tutorials/pythonanywhere-hosting/

Use the above link for how to setup flask framework on live for free in pythonanywhere hosting provider

Tuesday, October 13, 2015

Monday, October 12, 2015

mailjet using php

Mailjet used for Transactional Email service.

Benefits:
  1. No credit card required
  2. 6000 emails/month free
  3. Dashboard opened ,blocked and queued etc
 You can get tutorial on mailjet using php at
http://ampersandacademy.com/tutorials/send-mail-using-mailjet-api-php/

Saturday, October 10, 2015

Tuesday, September 29, 2015

Monday, September 28, 2015

Generate JSON format using php

Json is popular format for data-interchage between server and client. By using PHP , we can generate json. You can check out the tutorial at
http://ampersandacademy.com/tutorials/php-json-example/

Wednesday, September 2, 2015

Generate JSON file in Java Using org.json.JSONWriter

Many library files are available to generate json file in java. This tutorial explains how to generate json file using org.json library file
http://ampersandacademy.com/tutorials/java-jsonwriter-generete-json-file/

Tuesday, September 1, 2015

JSON Tutorial

JSON stands for Javascript Object Notation, which is most used data-interchange format between client and server.
You can find json tutorial at http://ampersandacademy.com/tutorials/category/json/

Monday, August 24, 2015

Drag and drop image in java using dropzone js

Image uploading is always hectic for developer . And drag and drop is too hectic. Dropzone is best for drag and drop. Get dropzone tutorial at

http://ampersandacademy.com/tutorials/java-drag-drop-image-file-upload-using-dropzone-js/

Saturday, April 4, 2015

SQLite Tutorial

SQLite is an RDBMS, which is most widely used database( in memory database,single file db)for mobile applications for android and ios,windows etc.

you can get my tutorial for SQLite using the below link

http://ampersandacademy.com/tutorials/sqlite-introduction/

Thursday, March 12, 2015

Autocomplete - Jquery ajax json example using java servlet



Autocomplete- Jquery Ajax Json Example in Java(using Servlet)


Here am using devbridge jquery api to achieve the autocomplete functionality.
Requirements:
   Eclipse
  Mysql (or you can use any other database ,but in lib folder you must add appropriate driver
   for  that database)
To get country list
For Mysql

For Oracle

HTML Code
<input type="text" name="country" id="autocomplete"
                                                            class="form-control" placeholder="Enter Country name" />


Jquery Plugin to achieve Autocomplete from DevBridge

<script type="text/javascript" src="src/jquery.autocomplete.js"></script>


Jquery Code
$("#autocomplete").autocomplete({
                              //lookup: countries,
                              serviceUrl:'Auto', //tell the script where to send requests
                               width: 450, //set width
//callback just to show it's working
                              onSelect: function (suggestion) {
                              $('#selection').html('You selected: ' + suggestion.value + ', ' + suggestion.data);
                              },
                              showNoSuggestionNotice: true,
                              noSuggestionNotice: 'Sorry, no matching results',
               });


Servlet Code
                                             String q=request.getParameter("query");
                                             ArrayList<Country> o=CountryDao.getCountryName(q);
                                             Gson gson = new Gson();
                                             // convert java object to JSON format,
                                             // and returned as JSON formatted string
                                             String json = gson.toJson(o);
                                             //System.out.println(json);
                                             response.getWriter().write("{\"suggestions\":"+json+"}");
Here the method is not mentioned so all the data will be passed as GET method. If you want to pass the data through post mention in Jquery like type:’POST’.

OUTPUT SCREEN

Thursday, January 1, 2015

java 8 support for eclipse kepler


Eclipse Kepler don’t have built-in support for java8 sdk.So if you run a java8 specific code(lambda expression,default method etc…) in kepler, it will show errors. To solve this problem , you must install java8 support for eclipse kepler plugin. To install java8 support plugin


Go to help and click eclipse market place ,it will open a  new window. In that window type java 8 for kepler

Click the install button belongs to  java8 support for eclipse kepler SR2

Check the checkbox and click confirm

Accept the license and click finish.


That’s all. It takes some time to download the plugin. It depends on the internet speed. After installing eclipse will be restarted. Now you can run your java8 code without any error