Thursday, October 18, 2007
Moved
Friday, April 06, 2007
Cannot modify header information - headers already sent
There are many possible things that can cause this error. However, the most common thing, atleast in my case, that causes this error is having some spaces after the closing PHP tag i.e. "?>". This often occurs when you copy and paste the code. To solve it make sure there are no other characters after you PHP closing tag. Delete any trailing spaces.
Hopefully you will find this helpful.
Bookmark this blog:
Furl
Netvouz
Simpy
Yahoo MyWeb
Google Bookmark
Saturday, March 17, 2007
Top 4 reasons why your javascript is not working in IE7
Top 4 reasons why your javascript is not working in IE7
1. Script tag is on the first line of the page:If you ajax page has javascript in it and the script tag is the first line (or first character of your page), then it is highly likely that IE7 will fail. To overcome this issue, I generally introduce a div tag (I refer it as fake div, because I set its height to 0px)as the first thing on my ajax page.
Solution to problem 1: < style="height: 0px">&nbsq;< /div >
2. Comma after the last element of an array:
Often jquery plugins can take arguements in the form of an array. However, make sure that you do not introduce a comma after last element. Firefox can handle it, but not IE. I believe the reason is that comma indicate that there is another element that will be following it. Thus IE expects that more elements are still coming and wait for them. So
This is wrong | This is right |
{ name: 'Jack', message: 'hello', } | { name: 'Jack', message: 'hello'} |
3. using firebug and console command
Many times developers use Firebug, a Firefox addon. I often use "console" command to debug my scripts in firefox. However, if by chance you left any console command within javascript script, it will break your javascript in IE7. Make sure to comment out or remove all "console" command before you test your javascript in IE7.
4. Trying to access non-exisitng key
if the javascript tries to access non-existing element, it will break your web site in IE7. Firefox will work without raising or reporting any error or warning.
Monday, February 19, 2007
Difference between OWL Lite, DL, and Full
Difference between OWL Sublanguages:
First, I introduce basic terminologies that will be used for the discussion. These definitions are adopted from W3C OWL Reference Guide.
Class: A class defines a group of individual that belong together because they share some properties. Two related concepts defined in OWL are “Thing” and “Nothing”
- Thing: Thing comes as a predefined vocabulary of OWL. It is the superclass of all classes and a default class of all individuals. Thus, every individual in OWL world is a member of class Thing (or owl:Thing)
- Nothing: Nothing (or owl: Nothing) is a class that has no instances and is a subclass of all classes.
Individuals: Individuals are instances of classes, and properties may be used to relate one individual to another
Property: Property is a binary relation that states relationships between individuals or from an individual to data value. Property can be further distinguished as “ObjectTypeProperty” or “DataTypeProperty”.
- ObjectTypeProperty (owl:ObjectTypeProperty): It is defined as the relation between instances of two classes
- DataTypeProperty (owl:DataTypeProperty) : It is defined as the relation between instances of classes and literal values such as string, number, and date.
RDF Resource: RDF resource is described in RDF document as anything that has a valid unique resource identifier (or URI). Hereafter, it is referred as “resource”.
The differences between the three sublanguages are due to differences in the definition of owl:class and owl:ObjectPropertyType in the three sublanguages of OWL
1. Owl:class vs rdfs:class
In OWL full, owl:class is defined as equivalent to rdfs:class. Thus any class that is a subclass of rdfs:class is also a subclass of owl:class. As a result, any valid rdf document can be considered as a valid OWL full document.
In constrast to owl full, owl:class is defined as subclass of rdfs:class in Lite and DL. Thus not all classes of RDF document (that are subclass of rdfs:class) can be an instances or subclasses of owl:class. As a result, a valid rdf document cannot be considered as a valid OWL Lite or DL document.
2. Owl:ObjectTypeProperty and rdf:Property
In OWL full, owl:ObjectTypeProperty is considered equivalent to rdf:Property. As a result, owl:DataTypeProperty, which is a subclass of rdf:property, is also a subclass of owl:ObjectTypeProperty. Thus, any property in OWL that is defined as datatype can also be interpreted as objectype property. This provides much of the expressiveness in OWL full.
Again in constrast to OWL full, owl:DataTypeProperty and owl:ObjectTypeProperty are defined as disjoint subclasses of rdf:property. As a result, built-in relations such as “InverseOf”, “InverseFunctional”, “Symmertric”, and “Transitive” cannot be specified as datatype property. This is because a dataType property defines a relation from one individual to a literal (integer, number, date). Thus, inverse of dataType Property does not hold much meaning.
These differences in the definitons of owl:class, owl:objectypeproperty, owl:datatypeproperty are the main reasons for the differences in OWL Lite, DL, and Full. Table 1 provides a comparison between these three sublanguages. Certain examples are included to show what can/cannot be expressed.
Lite | DL | Full | |
Compatibility with RDF | Theoretically,no rdf document can be assumed to be compatible with OWL Lite | Theoretically,no rdf document can be assumed to be compatible with OWL DL | All valid rdf documents are OWL full |
Restrictions on class definition | Requires separation of classes, instances, properties, and data values | Requires separation of classes, instances, properties, and data values | Classes can be instances or properties at the same time. For example, it is perfectly legal in OWL Full to have a "Fokker-100" identifier which acts both as a class name (denoting the set of Fokker-100 airplanes flying around the world) and as an individual name (e.g., an instance of the class AirplaneType ). |
RDF Mixing | Restricts mixing of rdf and owl constructs | Restricts mixing of RDF and OWL constructs | Freely allows mixing of RDF and OWL constructs |
Classes Descriptions | The only class description available in OWL lite is IntersectionOf | Classes can be described as UnionOf , ComplementOf, IntersectionOf, and enumeration Eg: class can be exhaustively defined by its instances. For example defining a class DaysOfWeek exhaustively by Sun, Mon, Tue, Wed, Thurs, Fri, Sat | Classes can be UnionOf, ComplementOf, IntersectionOf, and enumeration Eg: class can be exhaustively defined by its instances. For example defining a class DaysOfWeek exhaustively by Sun, Mon, Tue, Wed, Thurs, Fri, Sat |
Cardinality Constraints | Cardinality: 0/1 MinCardinality: 0/1 MaxCardinality: 0/1 | Cardinality>= 0 MaxCardinality >= 0 MinCardinality >= 0 | Cardinality>= 0 MaxCardinality >= 0 MinCardinality >= 0 |
Value Constraints | owl:allValuesFrom Owl:someValuesFrom Object type for owl:valueFrom should be a class name or class identifier | Owl:allValuesFrom Owl:someValueFrom Owl:hasValue | Owl:allValuesFrom Owl:someValueFrom Owl:hasValue |
Metamodeling | Does not allow metamodeling | Does not allow metamodeling | Allows metamodeling. Thus RDF and OWL constructs can be augmented or redefined |
Class | OWL:class is subclass of RDFS:class | OWL:class is subclass of RDFS:class. | RDFS:class and OWL:class are equivalent |