Thursday, May 19, 2011

Javascript Graph Libraries

Following are nice Javascript Libraries which can be used for web applications

JQPlot http://www.jqplot.com/
Sparklines http://omnipotent.net/jquery.sparkline/
Protovis
JQuery Flot

Wednesday, December 9, 2009

Good Links

http://www.cs.utexas.edu/users/EWD/welcome.html
http://c2.com
http://www.infoq.com/presentations/metaprogramming-ruby

http://www.rubyrailways.com/the-top-10-rubyrails-blogs/
http://rubyinside.com
http://javascript.crockford.com/

SEO good links

http://www.seowhitehats.com/2009/12/04/10-seo-facebook-tips.html
http://research.microsoft.com/pubs/81492/fp083-fetterly.pdf
http://www.cond.org/resonance-final-submit.pdf
http://research.microsoft.com/pubs/80233/sigir022-konig.pdf

Restful services good links

the source of truth
http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm -

less intense

http://www.infoq.com/articles/rest-introduction
http://www.infoq.com/news/2009/06/rest-ts
http://www.infoq.com/articles/webber-rest-workflow


http://iansrobinson.com/2009/07/16/how-do-you-link/

PDF
Rest in Practice by Jim webber and Ian Robinson


http://tools.ietf.org/html/rfc5023#section-10
http://code.google.com/apis/gdata/docs/2.0/reference.html#Queries a

Tuesday, December 8, 2009

Started working on rails project on nov 2, 2009. it is been fun. it is jruby + java.

uses lucene as search engine, planning to use apache solr and acts as solar plugin ruby

Wednesday, October 7, 2009

seeing compilation errors for procedures in oracle

c:>sqlplus -S -L user/password@sid @x.sql
then type show error

Friday, September 11, 2009

NHibernate.AssertionFailure was unhandled possible nonthreadsafe access to session

One of our project we faced this issue, my teammates and i worked to reproduce this.

How to Reproduce -

namespace NHibernatePossibleThreadIssue
{
public class Program
{
private static ISession Session;

public static void Main(string[] args)
{
Configuration conf = new Configuration();
IDictionary properties = new Dictionary
{
{"hibernate.connection.driver_class", "NHibernate.Driver.OracleClientDriver"},
{"hibernate.connection.connection_string", "Data Source=XE; user ID=sso; Password=sso"},
{"hibernate.dialect", "NHibernate.Dialect.Oracle9Dialect"},
{"hibernate.show_sql", "true"}
};


conf.SetProperties(properties);
conf.AddClass(typeof (SomeDomain));
conf.AddClass(typeof (SomeChild));
ISessionFactory factory = conf.BuildSessionFactory();

Session = factory.OpenSession();
LoadInSessionTwice();


//ConfigureCastle();

//TryThreading();
Console.ReadKey();


}

private static void LoadInSessionTwice()
{

SomeDomain domain = Session.Load(91286L);
IQuery query = Session.CreateQuery(" from SomeDomain d where d.desc= :desc ");
query.SetParameter("desc", "helloworld");
SomeDomain evicted = query.List()[0];

Session.Evict(evicted);
Session.Flush();

}

Mapping and domain classes

public class SomeDomain
{
public long id { get; set; }
public string desc { get; set; }

private SomeChild child;

public SomeChild Child
{
get
{
if (child == null)
child = new SomeChild {Domain = this};

return child;
}
set { child = value; }
}

}

public class SomeChild {

public long Id { get; set; }

public SomeDomain Domain { get; set;}

public string description { get; set; }

}

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernatePossibleThreadIssue">
<class name="NHibernatePossibleThreadIssue.SomeDomain" lazy="false" table="SOMEDOMAIN">
<id name="id" type="long" column="ID" unsaved-value = "0" >
<generator class="native">
<param name="sequence">COR_SEQ</param>
</generator>
</id>
<property name="desc" column="text"/>
<one-to-one name="Child"
class="NHibernatePossibleThreadIssue.SomeChild" cascade="all-delete-orphan"/>

</class>
</hibernate-mapping>

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="NHibernatePossibleThreadIssue">
<class name="NHibernatePossibleThreadIssue.SomeChild" lazy="false" table="SOMECHILD">
<id name="Id" column="SD_ID">
<generator class="foreign">
<param name="property">Domain</param>
</generator>
</id>
<one-to-one name="Domain" class="NHibernatePossibleThreadIssue.SomeDomain" constrained="true"/>
<property name="description"/>
</class>
</hibernate-mapping>