28 Mayıs 2013 Salı

upgrading telerik 2012 to 2013

In this post, i summarized my steps during upgrading from telerik 2012 to 2013. My assumption is the system all works fine with the previous Telerik version and the aim is just to upgrade Telerik..

In my case, there are two projects: the former is for developing telerik reports, and the latter is a web application which views the reports from the former project. By the way, i am using Visual Studio 2010.

1) install Telerik 2013 in your development machine.
2) in both projects, renew the references and make CopyLocal property true for each one of them.
3) in web.xml of the web application, replace all Version statements. In my case, i replaced Version=6.0.12.215 with Version=7.0.13.426.
4) and deploy the project to production as always. Remember to renew all Telerik dlls..


19 Mayıs 2013 Pazar

debug maven project in eclipse

This post (http://www.homik.de/think/index.php/2008/07/31/debugging-maven-projects-with-eclipse/) explains how to debug a maven project with eclipse ide. i just copy the steps from that post:

  • Create a new Java Project and call it “Maven Debug”. This Project willnever have any source code in it, it is just a shell for attaching the debugger.
  • Create a debug configuration: Run -> Debug Configurations and then right click on Remote Java Application and select New launch configuration. Call it “Maven Surefire”.
  • On the Connect tab click the Browse button and select the “Maven Debug” project.
  • Set connection properties to localhost and port 5005. This is the port on which Surefire waits for the debugger.
  • The connection type is Standard (Socket Attach)
  • On the Source tab add all projects that have any Maven source that you want to debug.

During debugging process:
  • Select break points in the code you’re are going to run. Note, you cn select only code in your test classes. It won’t work on classes outside the test phase.
  • In your command line, append the following switch to your maven command: -Dmaven.surefire.debug. For example, to debug the tests run by the maven lifecycle install do mvn install -Dmaven.surefire.debug
  • Wait for maven to pause its execution and display the message: Listeningfor transport dt_socket at address: 5005
  • Attach the debugger to the running maven by selecting the “Maven Surefire” debug configuration created above. Your debugger should stop at your breakpoint.


install maven plugin

I have discovered an API that can be useful to my thesis project. Unfortunately, the API address is broken at the moment. However, i could be able to find source code which is maven project. Therefore, i installed maven in my Eclipse Juno. http://stackoverflow.com/questions/11242107/maven-with-eclipse-juno is helpful for this purpose.
In summary,
  • Install maven 
  • In Eclipse IDE, do Help -> Install New Software as follows: (installing maven for eclipse plugin)


After a successful installation, I imported the maven project by doing File -> Import as follows:



However, I got the following error during import process:



However changing maven installation path in Eclipse via Preferences interface did not help to resolve the problem :( So I continued the import process with errors..



EDIT 13:49
The problem was due to my import project style.. I included all the pom files at first, however importing only the pom in the parent directory was enough! That solved the situation in my condition..




3 Mayıs 2013 Cuma

dbpedia vs freebase

For my thesis project, i need a programmatically easy-to-use, powerful dictionary.. Therefore, i made (collected actually) a list of items that compares Freebase (http://www.freebase.com/) and Dbpedia (http://dbpedia.org/About).

  • Dbpedia in general is more accurate as it directly rips off stuff from Wikipedia.  Freebase has a longer tail, since it collects info not just from Wikipedia, but also various other data sources.
  • Both extract structured data from Wikipedia and make it available as RDF.
    • Different schemas, identifiers, goals 
      • Dbpedia -> stores its data as RDF tuples
      • Freebase -> n-tuples
      • Dbpedia -> data is automatically generated from Wikipedia several times a year
      • Freebase -> data is automatically imported into Freebase after two weeks
      • Dbpedia -> query via a SPARQL endpoint
      • Freebase -> query via an MQL (Metaweb Query Language) API 
    • Differences in
      • Range of data sources
        • Dbpedia -> focuses on just Wikipedia data
        • Freebase -> import data from a wide variety of sources
      • Ability to edit content
        • Dbpedia -> requires that you edit Wikipedia for the change to appear in Dbpedia
        • Freebase -> user-editable, contributions can be made via a public interface
      • Structure of organizations
        • Dbpedia -> funded by various organizations
        • Freebase -> funded by Google
Through the common link of Wikipedia, it is possible to link some Freebase topics to Dbpedia resources.
(in Freebase RDF output OWL:SameAs points to Dbpedia) Example: http://dbpedia.org/page/Tetris

Freebase -> open, Creative Commons licenced, graph database

An entity is a single person, place or thing. Freebase connects entities together as a graph. 

Freebase API:
  • a collection of HTTP API's providing read & write access to data stored in Freebase.
  • different API's support different use cases.
  • SEARCH API -> returns Freebase data given a free text user query.
  • MQL Services (mqlread & mqlwrite) allow performing structured queries on Freebase using MQL. (This is the most common way to access graph data and to ask questions)
  • TEXT Service -> takes an ID of a topic, returns its description
  • IMAGE Service -> takes an ID, returns an image
  • need to obtain an API Key - unique key generated using the console (on Google account, API console, create project)
    • The project passes key (key=(API_KEY))
  • Limit -> read quota of 100k per day, write 10k.
    • for higer quota, do request more on google
    • quotas on sandbox are more, but sandbox is erased every sunday!
    • data dumps may be used locally for more limit (the size is 14 GB as i remember)
  • depends on Google API client libraries
API Services:
  • Search -> find entities by keyword search
  • MQL Read -> retrieve detailed structured data about entities or collections of entities
  • Topic API -> get a summary of all the info for an entity
  • RDF API ->  get a summary of all the info for an entity in RDF
  • Text Service -> get short textual descriptions for entities
  • Image Service -> get repr. thumbnails for entities
  • Freebase Suggest -> UI Widget picking entities
URI pattern for an API call:
GET https://www.googleapis.com/freebase/<version>/<apiname>[<path>]? [<urlparams>]

if request query is too long, params should be passed via POST.

but X-HTTP-Method-Override: GET header must be added to request.
version is v1 for production, v1sandbox for sandbox environment (experimental)

callback -> url param will return a json structure enclosed in a javascript function call as an argument to the function (supports JSONP pattern)

Freebase API Sample Code Generator (http://codify.freebaseapps.com/) -> strongly recommend to try this!

2 Mayıs 2013 Perşembe

multiple reports in one viewer - telerik reports

My requirement is to view several reports in one report viewer as follows:


In order to view multiple (4 in this case) reports in one report viewer:


            ReportBook rb = new ReportBook();
            rb.Reports.Add(new SauOgrisReport());
            rb.Reports.Add(new SauOgrisReport());
            rb.Reports.Add(new SauOgrisReport());
            rb.Reports.Add(new SauOgrisReport());

            ReportViewer viewer =          (ReportViewer)this.ReportContent.Controls[0];

            viewer.Report = rb;
            viewer.RefreshReport();