Monday, July 7, 2008

How to change the size of a legend in Crystal Report

Well as easy as it may seem, this sometimes prooves to be a tidious task to look for. Simply because the legends functionality are not provided on the legend display area. Well enough talk and lets learn how to do that in a few steps

Obviously you are creating a graph (chart of some kind),

  • Right click on the Chart Area,
  • Chart Expert
  • Text Tab
  • On the Format Area choose Legend,
  • Click the Font button
  • Change the font to the your desired display.

For MS ACCESS changing the legend size does not seem to be a problem but the legend caption is. I found a solution posted on http://www.tek-tips.com/faqs.cfm?fid=5491

Simple way to change/remove the "Sum of..." text, or any text, in a PivotChart LEGEND.

To change the text in a PivotChart LEGEND, switch from PivotChart View to PivotTable View. Then click once to highlight the field name that reads "Sum of...", then go to properties, when the properties dialog box displays select the "caption" tab, now go to the item titled "caption" and simply type in the new text you would like reflected in your Legend. Switch back to PivotChart View and you will see the Legend has changed.

Monday, May 26, 2008

How-to get a job (for graduates)?


In this (my first post) non-IT (sorry Ali) post I note what I think is the main things I used to get my IT job. I was actually surprise with the number of job opportunities I come across here in Oman. So, here it is…

Since I have graduated I have been doing interviews all over the place (9 until today): ministries, government agencies, government companies, to-be companies, dream-to-be companies, actual companies ..ext..ext .. For me it was interesting journey. Each interview (or test) was unique experience: a mix of meeting new people, testing my skills and Learning about myself! It is great opportunity to find what you are really after (if u haven’t decided yet). So what is it really employers are looking for? Well, first let us list the facts about them:

  • They are humans with basic needs just like us. They need to feel love, security, excitement and joy! They want to be acknowledged and appreciated.

Dose any of this have anything to do with get them to hire me? Aren’t they looking for skills?

Explanation: This crab has nothing to do with neither you nor your skills. It is about them and their needs. They need to like you and be able to work with you.

  • They need assurances that you will do the job.

! I have the bachelor degree aint that enough?

Explanation: We all have the degree, so what? What information they can get from it other than you spent X # of years in the Y collage. What really determine your capabilities is the projects you did, activities you involved in and the way you represent those!

  • The presentation(interview) is important.

! I have skills; I have experience they should take me. But i was sick that day.

Explanation: they wouldn’t care if you ware sick that day! May be you are a nice guy but they actually don’t know that! It is very important to be in your optimal condition and do a flawless interview. That’s because employer have limited time and many candidates to choose from.

Hmmm,, ok that all I can remember right now. So, how to be ready for all this? How to drive them to give you interview anyway?!

  • The Perfect CV.

Having very well written CV is a key element in job hunting process. CV is direct marketing tool for your skills and character. It contains everything that maters to employers: basic info about you, skills, experience and glimpse of your character. Make sure your CV contain skills match job requirements and contain the keywords employer is looking for. Writing a universally ‘perfect’ CV is impossible so, you have to adapt it for each job opportunity. (Change the structure and the words used for example.)

  • Calling everyone!

Make sure that you: call employers for more information about jobs, do follow-up calls. Make sure that almost everyone you know (colleagues, friends, family, employers) knows that you in “job-hunt”. Sometimes opportunities come from unexpected people/organizations. For this, you have to keep in touch with everyone!

  • Keep your eyes open!

Make sure that you watch for newspapers, job-search sites and major companies sites for new opportunities. For obvious reasons!

  • Know what is going on!
Knowing what is going on around you is important. Make sure you know about major market events (even non IT) and new IT projects. Of course, you need to know what is going on in the IT field: new products, technologies and upcoming events. This can assist you to anticipate opportunities and be ready for them (by acquiring skills for example). Also, it improves your standing in interviews.

That’s all I can think of for now. So what do you think? :)

Monday, May 19, 2008

Java Beans

As software or application developers, we are constantly being asked to build applications in less time and with less money. And, of course, these applications are expected to be better and faster than ever before.

Object-oriented techniques and component software environments are in wide use now, in the hope that they can help us build applications more quickly. Development tools like Microsoft's Visual Basic have made it easier to build applications faster by taking a building-block approach to software development (developing the software as pieces of blocks and mending them up to deliver complete software for the proposed requirement). Such tools provide a visual programming model that allows you to include software components rapidly in your applications.

The Java Beans architecture brings the component development model to Java.

Component Model

Components are self-contained elements of software that can be controlled dynamically and assembled to form applications. There are set of rules and guidelines where all components must bind to them. The set of rules are set to provide a standards form for all components which encourages usability and a clear understanding. Components are expected to exhibit certain behaviors and characteristics in order to participate in the component structure and to interact with the environment, as well as with other components. Most articles would define components like a society of software citizens; the citizens (components) bring functionality, while the society (environment) brings structure and order.

Java Beans component Model

Java Beans is a component model architect brought to Java. It allows users to construct applications by piecing components together either programmatically or visually (or both). Support of visual programming is paramount to the component model; it's what makes component-based software development truly useful and powerful.

The model is made up of architecture and an API (Application Programming Interface). Together, these elements provide a structure whereby components can be combined to develop an application. This environment provides services and rules, which allows a standard structure. This means that components are provided with the tools necessary to work in the environment, and they exhibit certain behaviors that identify them. One very important aspect of this structure is containment. A container provides a context in which components can interact. A common example would be a panel that provides layout management or mediation of interactions for visual components. Of course, containers themselves can be components.

The Java Beans Architecture

JavaBeans is architecture for both using and building components in Java. This architecture supports the features of software reuse, component models, and object orientation. One of the most important features of JavaBeans is that it does not alter the existing Java language (i.e. if you know how to write software in Java, you know how to use and create Beans). The strengths of Java are built upon and extended to create the JavaBeans component architecture.

Although Beans are intended to work in a visual application development tool, they don't necessarily have a visual representation at run-time (although many will). What this does mean is that Beans must allow their property values to be changed through some type of visual interface, and their methods and events should be exposed so that the development tool can write code capable of manipulating the component when the application is executed.

Java Bean set of rules

Creating a Bean doesn't require any advanced concepts. All you need is follow the following coding conventions

  • Implements java.io.Serializable interface
  • Provides no argument constructor
  • Provides getter and setter methods for accessing it's properties

Serializable interface allows objects to be stored/retrieved using ObjectOutputStream/ObjectInputStream
  • class must be declared as public
  • class must implement Serializable interface
  • class must have a default constructor
  • all data members must be primitive, serializable objects or declared transient 

Sunday, May 18, 2008

Image Retrieval

An image retrieval system is a computer system for browsing, searching and retrieving images from a large database of digital images.

A common saying goes “A picture is better than a thousand words”. Images represented using tags, labels or captioned tend to lose what the actual information the image represents. Images have a large amount of information through human vision and computer vision. Using multiple tags to represent the content of an image simply does not describe an image for efficient retrieval. Content-based image retrieval (CBIR) uses the actual content of the image proving to be more efficient but yet challenging. The most important factor of image retrieval is its accuracy. One problem with using image search results as a training set for a classifier is the high percentage of unrelated images within the results. Estimation has shown a high number of inaccuracies of the result of image in Google image search. Problems with traditional methods of image indexing have led to the rise of interest in techniques for retrieving images on the basis of automatically-derived features such as color, texture and shape.

Most traditional and common methods of image retrieval use methods of adding meta data such as captions, keywords, tags, or descriptions to the images so that retrieval can be performed over the annotation words. Manual image annotation is time-consuming, laborious and expensive; to address this, there has been a large amount of research done on automatic image annotation.

Content-based image retrieval (CBIR), also known as query by image content (QBIC) and content-based visual information retrieval (CBVIR) is the application of computer vision to the image retrieval problem. In other words, an image produces image data in a form of rows and columns. This image data derived from computations can be used to produce vector or quantifiers which would then be a primary key (index) for an image to be retrieved in a large database.

"Content-based" means that the search will analyze the actual contents which in this context; it will be the contents of the image. The term 'content' in this context might refer to colors, shapes, textures, or any other visual information that can be derived from the image itself. Without the ability to examine image content, searching for images must rely on meta data or the traditional methods.

Meta data are very hard to generate which proves to be more expensive. A security camera capturing picture could be caption by the time, date, location rather than by the actual contents of the image it represents. Here, CBIR comes into play by deriving image data for analysis and use of different image problem based areas.

Sunday, February 10, 2008

UPL

UPL : "Universal Programming Language", or you can say UPL : "UPL is Programming Language" :).

It is an idea that we were thinking of for more than a year, and thanks to Yamani it is slowly coming to the reality.

The Idea
As was discussed in many blogs few weeks ago, we need to find good and intelligent ways to teach our children and "programming children" (those who are not Childs in real but newbie in programming world) about programming.

Thinking about that we can see (as we think) the two biggest obstacles faced by these two groups are:
(1) The complex syntax:
come on how many people you know were able to understand the pointer of pointer of a function that takes a reference and a pointer in C++ from the first time :).
(2) The Language:
by language we do not mean the programming language but the "English" language (even though it is becoming the universal language now, still lots of kids have problems in English learning it. (and come on who said programming must be in "English").

What UPL can do about that!
Well so what do UPL do exactly?
It is not the direct solution to the problem, but it is one of the keys to the solution. It is a simple engine where you can create your own programming language with your own syntax, and with the human language that you desire.

The current version of UPL support a very simple syntax that is some how look like old quick basic. There is a language file where you can replace any keyword in the (English UPL) to any other keyword in any other language or any other word in English itself , for example the keyword “Declare” could be changed to “dim” to look like visual basic more, or it can be changed to “Aref” the Arabic word the means declare, or even you can write in Arabic writing, French , Japanese, and like that it gives endless choices of creating your own language.

What happens inside the upl Editor is what ever syntax you are using it will be translated to the English up and then again the English upl is translated into JAVA (in the current version the algorithim is updated to change any syntax to Java directly) and finally java file is produced compiled and executed.

the syntax of current English UPL is very simple:



































download

UPL in action(Future)

Well yes it is not in action yet (well it is still alpha, still it don’t have loops,still … , ….,….) but lets talk about future , what UPL can do when it gets into action. So lets see some possible futures for upl:
1- Engine for creating lots of educational programming language syntax in different human language scripts (English , French, japanease, ….).

2- The same engine mentioned before could be use to make programming look more like story writing for kids
(I mean after a lot of modifications) a kid will be able to write some kind of story and clicking on run will show him the story happening infront of him ( well we will need to use graphical libraries for doing so).

3- Visual animated programming ( ummm imagine this )
: a kid opens a software he drags an icon of a hummer with declare written on it then he writes “x=12” , next he will drag an icon of wondering rabbit that have if written between it ears and write “x>10”, and continue programming in this way. We can see this drag and drop will create may be html document, and there will be a translation file from that kind of html into the English upl which will be automatically translated to java and run.