Tuesday, July 30, 2013

Adding AChartEngine Library To Android Application

So here is a self sufficient place to find all about AChartEngine. Which includes link to download,

1. achartengine-1.1.0-demo-source.zip The AChartEngine 1.1.0 demo project source code. May 15 May 15 168 KB 8149
   2. achartengine-1.1.0-javadocs.zip The AChartEngine 1.1.0 javadoc documentation. May 15 May 15 374 KB 3610
   3. achartengine-1.1.0.jar The AChartEngine 1.1.0 binary build library. May 15 May 15 117 KB 5264

Which are latest for now(while posting this answer). Now follow these easy steps in order to add new chart file:

 - Download and add achartengine-1.1.0.jar to your project's lib section
 - Now right click on file and add it to build path, like in image



 - Now as define in previous answers, add following code to your class:

private GraphicalView mChartView;
private XYMultipleSeriesDataset dataset;
private XYMultipleSeriesRenderer renderer;
private BarChart.Type type;


protected void onResume() {
     super.onResume();
     if (mChartView == null) {
       LinearLayout layout = (LinearLayout) findViewById(R.id.chart);
       /*getBarChartView(android.content.Context context, XYMultipleSeriesDataset dataset, XYMultipleSeriesRenderer renderer, BarChart.Type type)
         Creates a bar chart view.*/
       mChartView = ChartFactory.getBarChartView(this, dataset, renderer, type);//tView(this,getBarDemoDataset(values),renderer,Type.DEFAULT);
       layout.addView(mChartView);
     } else {
       mChartView.repaint();
     }
   }

- To get detail about any class of AChartEngineAPI, download achartengine-1.1.0-javadocs.zip and open by clicking in index.html

- achartengine-1.1.0-demo-source.zip will be helpful during further deepar development where you can take reference for all charts


Friday, July 26, 2013

HOW TO INSTALL TOMCAT ON YOUR MAC OSX 10.7 AND UP

Well, I spend last 3 hours doing many things like leaning spring, and mailing and writing my diary about my day ad yeah cooking as well. But most important thing I did  was "Installing Apache Tomcat7.0.42" on my Mac OS X, yeah not Lion.. not till yet, as I am looking forward for upcoming
OS X 10.9 Mavericks. So may be then I'll upgrade my OS. 

Enough of chitchat, lets go to the point. I have been checking for various post while my search to install the TOMCAT. The one that help me a lot is Installing Tomcat on Mac OS X. As this link is for Tomcat 5.5 so don't be worried as I am here to provide you updated version for installing Tomcat 7.0.42 and may be it's later version as well. As with the zits that i got it's super easy to install tom cat on mac "Thank to Shell Script" for taking all load on it's head. Follow these easy X steps in order to install tomcat on your Mac OS X:
  1. Download latest version tomcat tar.gz file from here http://tomcat.apache.org/download-70.cgi this is in core section (and second option at my time) check out this Image, 
  2. Now you have that in your downloads, so unzip that and copy the folder. Now paste it in any convenient place for you in "your system", for me it was my "java" inside my work folder, so here is path for my folder "/Users/arpitawasthi/Work/Java/Data" where I pasted "apache-tomcat-7.0.42".
  3. As this the name "apache-tomcat-7.0.42" is heck so change it to "Tomcat7042"
  4. Now open "terminal" navigate to "Tomcat7042" folder by using cd in this way Arpits-MacBook-Pro:bin arpitawasthi$ cd /Users/arpitawasthi/Work/Java/Data/Tomcat7042/
  5. Now simply go one more step ahead to "bin" directory as Arpits-MacBook-Pro:Tomcat7042 arpitawasthi$ cd bin
  6. Inside bin there's a shell script file named "startup.sh" so what you need to do now is execute this file as Arpits-MacBook-Pro:bin arpitawasthi$ sh startup.sh
That's it, that's all now you have tomcat installed in your system. To check this, type this URL http://localhost:8080/ on your browser. You should see something like:


Happy coding!