Custom Search

Saturday, December 26, 2009

FQL Tables

You can use the following tables as a reference for constructing FQL queries.

Facebook multiquery

Evaluates a series of FQL (Facebook Query Language) queries in one call and returns the data at one time.

This method takes a JSON-encoded dictionary called queries where the individual queries use the exact same syntax as a query made with fql.query. However, this method allows for more complex queries to be made. You can fetch data from one query and use it in another query within the same call. The WHERE clause is optional in the latter query, since it references data that’s already been fetched. To reference the results of one query in another query within the same call, specify its name in the FROM clause, preceded by #.

For example, say you want to get some data about a user attending an event. Normally, you’d have to perform two queries in a row, waiting for the results of the first query before running the second query, since the second query depends on data from the first one. But with fql.multiquery, you can run them at the same time, and get all the results you need, giving you better performance than running a series of fql.query calls. First, you need to get the user ID and RSVP status of each attendee, so you’d formulate the first query – query1 – like this:

"query1":"SELECT uid, rsvp_status FROM event_member WHERE eid=12345678"

Then to get each attendee’s profile data (name, URL, and picture in this instance), you’d make a second query – query2 – which references the results from query1. You formulate query2 like this:

"query2":"SELECT name, url, pic FROM profile WHERE id IN (SELECT uid FROM #query1)"

This method also has better performance than running a series of fql.query calls with batch.run.


For more information about fql.multiquery see this link where these texts are taken from.

Facebook Query Language

Facebook Query Language, or FQL, allows you to use a SQL-style interface to more easily query the same Facebook social data that you can access through other Facebook API methods (assuming your application has access!). For mpr details look Facebook FQL.

Facebook RESTfull API

With the Facebook RESTfull API, you can add social context to your application by utilizing profile, friend, Page, group, photo, and event data. for more details look Facebook RESTfull API.

Friday, December 25, 2009

Multiple action links problem in Facebook

We're focused on creating the best ways to empower users to share with their friends, as well as providing developers with the tools they need to make applications social and add value to the Facebook experience. As a part of a greater effort to simplify the site, Facebook developers made it easier for users to discover the most interesting content by modifying the home page stream to include two views:

§ News Feed focus on popular content, determined by an algorithm based on interest in that story, including the number of times an item is liked or commented on.

§ Live Feed display all recent stories from a large number of a user's friends.

Stories your applications generate can show up in both views. The best way for your stories to appear in the News Feed filter is to create stories that are highly engaging, as high quality, interesting stories are most likely to garner likes and comments by the user's friends.

In addition to making the site cleaner and simpler for users, they are also making our APIs clearer and more straightforward for developers. They built many APIs to enable you to create rich social experiences for your users, and while they create these APIs to match pace with the evolution of the features offered, we often maintain similar, more primitive versions as well. This creates a sea of different methods with overlapping functionality. To make it simpler and easier to develop on Facebook, they are streamlining our APIs, beginning with those that publish older-style, template-based Feed stories.

Going forward, the only way to publish Feed stories into the stream is via the stream publishing methods (stream.publish, FB.Connect.streamPublish, and Facebook.streamPublish). Posts published using the stream publishing methods contain only structured plain text data, which makes them easier to render on a variety of devices, including mobile phones and gaming consoles. For everyone else, these changes took place on December 20th, 2009.

This means that they discontinued support for the following:

· Template bundles. You should start using stream attachments with the stream publishing methods instead.

· feed.publishUserAction

· feed.publishTemplatizedAction

· Facebook.showFeedDialog and FB.Connect.showFeedDialog

· Publisher stories that use templates (please transition them to use stream attachments).

· Feed forms that reference the feedStory form and the multiFeedStory form.

· One-line stream stories.

They still publish stories that call users.setStatus and status.set, but encourage all developers to migrate to the stream publishing methods, as they let you set a user's status easily.

They have already made a few changes to how stream stories are rendered. First, they are shrinking the size of images to be rendered at a maximum of 90 pixels high or 90 pixels wide. Also, stream stories only display the first image that has been passed to them. Most Facebook stories use a single image, and many use no images at all. If the stream story contains more than one image or a significant amount of text, the first image and a couple lines of text display initially, and the user have the option to click a "See More" link to display the rest of the story. They find that the best images in stream stories are directly relevant to the action taken with the application. For example, if the story announces a user's high score in a game, the image should show that exact score. If the story shows content the user has created (for example, photos taken or art created), the image should be that user-generated content. Highly repetitive images that show up over and over aren't nearly as interesting or engaging.

They have made changes to action links to create a cleaner user experience. Going forward, a stream story can have a maximum of one action link and 25 characters in the link. Facebook's own action links tend to be even shorter than that ("Comment", "Like", "Share", "Become a Fan" are all ten characters or fewer). They strip out "formatting" characters (for example, leading spaces, pipes, and brackets) to keep in the same simple aesthetic as the rest of Facebook.

They look forward to making our APIs more straightforward and hope you are too. They welcome your comments in their Developer Forum.

These texts are taken from the blog.

Thursday, October 1, 2009

How to dispaly PDF, DOC, DOCX, TXT, RTF or any files in iPhone

There is easy way to view any kind of file in iPhone. I thought it would better to write this blog to answer the question "If there is any way to view Pdf, Doc, Docx etc... files in iphone?" in web.

First you have to load the file you need to view to memory and then you can load the file into UIWebView. The rest is handled by the UIWebView and you don't want to warry about that. If you need any clarification regarding this you can contact me directly by my email (thanuka.sp@gmail.com).

Wednesday, September 30, 2009

How to dispaly PDF files in iPhone

It is easy to display PDF files in iPhone. But you need some knowledge about Quartz 2D frame work.

Only thing you have to do is you need to load the pdf file to memory as needed (like page by page as they want). Then Quartz 2D provide function to draw the page as it is on UIView.

Monday, September 28, 2009

360iDev Conference

The goal of the 360iDev conference is building the iPhone developer community and increasing the networking within it. Yesterday, began the 360iDev Conference. To keep up with what’s going on there in real time click here or click here.

Friday, September 25, 2009

How to get facebook connect permissions

Facebook offers some API functionality that requires the user to specifically opt in before your application or site can use that functionality. These methods are specific to certain use cases that require a greater level of trust from the user. Users express this trust by granting your application or site specific extended permissions. These permissions allow your application to perform certain actions.
The available extended permissions are:

1. publish_stream -- Lets your application or site post content, comments, and likes to a user's profile and in the streams of the user's friends without prompting the user. This permission is a superset of the status_update, photo_upload, video_upload, create_note, and share_item extended permissions, so if you haven't prompted users for those permissions yet, you need only prompt them for publish_stream.

2. read_stream -- Lets your application or site access a user's stream and display it. This includes all of the posts in a user's stream. You need an active session with the user to get this data.

3. email -- This permission allows an application to send email to its user. When the user accepts, you can send him/her an email via notifications.sendEmail.

4. offline_access -- This permission grants an application access to user data when the user is offline or doesn't have an active session.

5. create_event -- This permission allows an app to create and modify events for a user via the events.create, events.edit and events.cancel methods.

6. rsvp_event -- This permission allows an app to RSVP to an event on behalf of a user via the events.rsvp method.

7. sms -- This permission allows a mobile application to send messages to the user and respond to messages from the user via text message.

8. status_update -- This permission grants your application the ability to update a user's or Facebook Page's status with the status.set or users.setStatus method.
Note: You should prompt users for the publish_stream permission instead, since it includes the ability to update a user's status.

9. photo_upload -- This permission relaxes requirements on the photos.upload and photos.addTag methods. If the user grants this permission, photos uploaded by the application will bypass the pending state and the user will not have to manually approve the photos each time.
Note: You should prompt users for the publish_stream permission instead, since it includes the ability to upload a photo.

10. video_upload -- This permission allows an application to provide the mechanism for a user to upload videos to their profile.
Note: You should prompt users for the publish_stream permission instead, since it includes the ability to upload a video.

11. create_note -- This permission allows an application to provide the mechanism for a user to write, edit, and delete notes on their profile.
Note: You should prompt users for the publish_stream permission instead, since it includes the ability to let a user write notes.

12. share_item -- This permission allows an application to provide the mechanism for a user to post links to their profile.
Note: You should prompt users for the publish_stream permission instead, since it includes the ability to let a user share links.



How to do some more important functions using FBConnect API

As you all know Facebook is heavily used social network system. So it has more important functions which should be in social network system. The following functions I have implemented to help those who are interesting on FBConnect API.

1. Get current user's Facebook friend lists
2. Get all visible groups according to the filters specified
3. Get membership list data associated with a group
4. Get all visible photos according to the filters specified
6. Get metadata about all of the photo albums uploaded by the specified user
7. Uploads a photo owned by the current session user
8. Updates a user's Facebook status through your application
9. Publishes a post into the stream on the user's Wall and News Feed (Text + Images)
10. Get user-specific information for each user identifier passed, limited by the view of the current user

To get the iPhone project to learn above functions download application from here. You can see the code and test with other functions as well. How to call their database is more important thing when we use FBConnect API. You can learn it also from this application.

Twitter for iPhone

Those who wish to learn about "Twitter API" and link with it your iPhone App it's realy easy and cool.
Here is the set of link you to follow;
1. Twitter-API-documentation
2. Things every developer should know
3. Twitter account

If you have any problems put a comment then I would able to help you if I have a time. If not, at least, I would be able to sent you a link you to follow.

Complete set of XCode shortcut commands

Here is the link where you can download complete set of XCode shortcut commands.

Saturday, April 11, 2009

Input and Output files of pretty-print

You can download input and output files of the pretty print form here. It contains four files named:

1. input.in
2. tokernizer.out
3. syntaxer.out
4. printer.out


Click here to download above files as zip folder.

Friday, April 3, 2009

Role-based home page

Abstract

OpenMRS is used by a wide range of users having different roles. Each of these types of users requires different functionalities and interfaces which are specific to their workflow. At present, OpenMRS provides a single, unspecified user interface for all users, independent of their role, which users often find cumbersome. This project proposes to create a mechanism for role-based adaptation of the "home page" and user interface to more specifically meet work flow needs for a given role.

1.       Who are you? What are you studying?

Contact details

Name: Thotage Thanuka Srimal Piyasena (Normally I used Thanuka Piyasena)

E-mail: Thanuka.sp@gmail.com

Tel: +94716903313

About me

I am a final year undergraduate of University of Moratuwa, Sri Lanka, specializing in the field of Computer Science and Engineering. I am very much interested to get involved with development of any types of projects, specially R&D related development and Web related projects.

2.       Why are you the right person for this task?

Target: Successful completion of this project would include designing, documenting and developing a mechanism through which implementation administrators could control the starting page by user role.

·         Appropriate unit tests for newly developed functionality

·         Implementer-specific documentation so that environments can begin using the new feature

·         Evidence of one implementation using the feature.

Extra credit: An administrative page that facilitates easy and intuitive manipulation of the role-based home page settings.

I have knowledge to complete both task specified in target and extra credit sections. I have the necessary theoretical and practical background to complete those tasks well. I have sound knowledge of web based application development, web interface development as well as the knowledge of web services.

3.       Do you have any other commitments that we should know about?

Research I have done

I have downloaded the source code of OpenMRS project and deploy it in my machine. I configured it and did some experiments with it using provided dummy data and dummy data inserted by me.

Deliverables

1.    Source code for Role base home page application

2.    Documentation

3.    Tutorial can be supplied if needed

Development plan

Step 1: Gathering other necessary information in order to getting familiar with the project and the technologies/libraries related to project [Estimated completion: 30th of April]

Step 2: Coming up with the finalized list of features and a design and defining a list of test scenarios. [Estimated completion: 20th of May]

Step 3: First phase of development [Estimated completion: 3th of July]

Step 4: Mid-Term evaluation [Estimated completion: 13th of July]

Step 5: Second phase of development [Estimated completion: 3th of August]

Step 6: Documentation, code reviews and testing the different scenarios defined in the designing phase and expecting to provide tutorial if needed [Estimated completion: 15th of August]

Step7: Final evaluation [Estimated completion: 24th of August]

Future plans regarding this project

I have already planned to contribute to improvements of the developed module after completion of Google Summer of Code because I intend to keep touch with OpenMRS and the open source community.

4.       List your Java experience.

I have been working with Java technologies for almost three years. I have developed a fair amount of applications using those technologies. I have done several individual projects as well as participated for several group projects according to the requirements of some modules in our department. Some of projects I have done are as follows;

Multi Agent System for Energy Management (J2SE, JADE, jfreechart)

Online Student Registration System (MySQL, PHP, Html, CSS, Apache)

Online Railway Information System (MSSQL, ASP.Net, Html, CSS, JavaScript)

Pharmacy & Grocery Management System (J2SE, Swing, MySQL)

I have also done some other mini projects. (C/C++)

Actually I had six months of training experience at IronOneTechnologies in Sri Lanka. I worked with Java related technologies for almost six months at IronOne. I gave my contribution to three main projects while I was there. Those are:

360MassNotifier (J2EE, JSP/Servlet, Html, CSS, JavaScript, Ajax, Oracle)

S360 Mobile Advertising (J2EE, JSP/Servlet, Html, CSS, JavaScript, Ajax, Oracle)

ATrad (J2SE, Swing, Socket Programming)

(URL: http://www.irononetech.com/consulting/)

5.       List your web interface experience.

Involving with the projects mentioned in above, I have gain considerable amount of experience in web interface design for almost one and half years.

6.       List your history with open source projects.

As a habit, I normally download source codes of the open source projects and review those codes to learn how they have done their coding and observe coding standard followed by them. I have been doing this for the past two years.

7.       Please provide links to websites created by you and/or source code examples.

You can find out more link in my blog.

8.       Do you have experience with Spring/ Hibernate/ DWR/HL7/ Tomcat/ MySQL/ AOP? (Experience with any/all is not a requirement)

Yes of course, I have experience with Tomcat/ MySQL/ AOP.

9.       What is your preferred method of contact? (Phone, email, Skype, IRC, IM, etc.)

I prefer to contact through email.

 

10.   If you have visited our IRC channel, please include your IRC nickname in your application.

Nickname: ttsp_uom

 

OpenMRS Projects in GSOC

Following links provide the necessary source code. I don't have right to give whole source code of company projects but I provided link to download some source code for you to observe.

Pretty print and export in Scilab

Abstract

The objective of this project is to find and use a java library in order to provide a pretty print with the console or into a file as well as a way to export the value in different formats. The end goal of my proposal is to accomplish the idea of the project as well as contributing to the open source community.

Detailed description

Scilab has been developed for system control and signal processing applications. It has similar features as Matlab but is available free for download including the source code. Scilab is composed of three distinct components. They can be classified as follows.

1.    An interpreter

2.    Libraries of functions (Scilab procedures)

3.    Libraries of Fortran and C routines

These routines are strictly speaking and are interactively called by the interpreter even though those do not belong to Scilab. A key feature of the Scilab syntax is its ability to handle matrices and support basic matrix manipulations such as concatenation, extraction or transpose. Such tasks are immediately performed as well as basic operations like addition or multiplication. Scilab also aims at handling more complex objects than numerical matrices. Scilab provides a variety of powerful primitives for the analysis of non-linear systems. Integration of explicit and implicit dynamic systems can be accomplished numerically. The scicos toolbox allows the graphic definition and simulation of complex interconnected hybrid systems. Scilab has an open programming environment where the creation of functions and libraries of functions is completely in the hands of the user. Functions are recognized as data objects in Scilab and, thus, can be manipulated or created as other data objects. For example, functions can be defined inside Scilab and passed as input or output arguments of other functions.

We use functions for writing equations. However, people are more familiar with mathematical expressions than functions. Thus, one of the objectives of the project is to build a pretty print to identify such functions and transform it to mathematical symbols and hence print a mathematical expression to the console or to a file. Suppose we need to pretty print a function entered in to the console. Then, it would read the function and would display it in a pretty print form(images or ASCII) to the console or to a file. Another important objective of the project is to enable the portability of results to external formats. At present, Scilab does not support exporting of the results to other formats. So, it becomes difficult to use the functions of Scilab for other applications. It is to be noted that results can be either vectors, numbers or matrices. I intend to add the above mentioned features to support the some basic formats like MathML, Latex or C/Fortran and XML. I believe adding the capability to export in XML is a very flexible functionality. Then the results of the Scilab calculation need not be limited to a small set of applications. It becomes virtually possible to use in any other platform.

In order to implement the functionality, I would use the following procedure. First, I would get the abstract syntax tree which is used in Scilab for parsing. Then, I would read the abstract syntax tree and do the necessary printing. If it is to be exported to a different format, I would iterate through the abstract syntax tree and print the output accordingly to the required output form. If the output is to be exported, I would read the output of a function back into the abstract syntax tree and then iterate through the tree and print according to the export format.

Advantages for Scilab users

Users can view the pretty printed version of the equation after typing the equation in command form. Then users can verify what he had entered in the command window is actually what he meant (As an example display the integral instead of the name of the function). End users will be provided with possibility of exporting values to external formats. Thanks to these features, the system becomes more user friendly, user convenience and would save the time of user if he makes a mistake when writing equations. Due to the exporting ability, results from Scilab will be possible to be used in other calculation platforms easily.

Development plan

Step 1: Gathering other necessary information in order to getting familiar with the project and the technologies/libraries related to project [Estimated completion: 30th of April]

Step 2: Coming up with the finalized list of features and a design and defining a list of test scenarios. [Estimated completion: 20th of May]

Step 3: First phase of development [Estimated completion: 3th of July]

Step 4: Mid-Term evaluation [Estimated completion: 13th of July]

Step 5: Second phase of development [Estimated completion: 3th of August]

Step 6: Documentation, code reviews and testing the different scenarios defined in the designing phase and expecting to provide tutorial if needed [Estimated completion: 15th of August]

Step7: Final evaluation [Estimated completion: 24th of August]

Deliverables

Plug-in in Jar format containing the project objectives

Source Code of the work I was involved with

Documentation

Tutorial can be supplied if needed

Why am I interested in this subject?

I have already learned Programming Languages, Compiler Theory and Theory of Computing modules. So I am really interesting to apply those theories into practice. I developed a pretty printer for Relax NG as well. I think this is a great opportunity to achieve my goal while giving my highest contribution to the open source community.

Future plans regarding this project

Yes of course, I have already planned to contribute to improvements of the developed module after completion of Google Summer of Code because I intend to keep touch with Scilab and the open source community.

About me

I am a final year undergraduate of University of Moratuwa, Sri Lanka, specializing in the field of Computer Science and Engineering. I am very much interested to get involved with development of any types of projects, specially R&D related development and Web related projects.

As a habit, I normally download source codes of the open source projects and review those codes to learn how they have done their coding and observe coding standard followed by them. I have been doing this for the past two years.

I have been working with C/C++ and Java technologies for almost three years. I have developed a fair amount of applications using those technologies.

I have done several individual projects as well as participated for several group projects according to the requirements of some modules in our department. Some of projects I have done are as follows;

Multi Agent System for Energy Management

Online Student Registration System

Online Railway Information System

Pharmacy & Grocery Management System

I have also done some other mini projects.

I need to emphasize that I have built a Pretty Printer for RelaxNG as an assignment of Programming Languages module. So, I believe I am aware of almost all the theoretical and practical concepts needed for this project because I have followed Programming Languages, Compiler Theory, Theory of Computing modules as well. 

If you need to observe my pretty printer source code and observe how to run it, you can simply find it out at my blog page. (URL: http://thanukasp.blogspot.com/2009/03/pretty-printer.html)

(Note: within the Pretty Printer.zip file contains info.txt file describing how to run this application.)

Actually I had six months of training experience at IronOneTechnologies in Sri Lanka. I worked with Java related technologies for almost six months at IronOne. I gave my contribution to three main projects while I was there. Those are 360MassNotifier, S360 Mobile Advertising, ATrad. (URL: http://www.irononetech.com/consulting/)

As I am following Computer Science and Engineering I have to study advanced computer related subjects as well as advanced maths.

Even though I have some basic understanding of Scilab's language, I am still learning Scilab language, because it is necessary to meet the end goal of this project.

Contact details

Name: Thotage Thanuka Srimal Piyasena (Normally I used Thanuka Piyasena)

E-mail: Thanuka.sp@gmail.com

Tel: +94716903313