Monday, October 28, 2013

"WHERE IN" for LINQ

I was trying to convert the following query to LINQ :

select Osid,OsName,CompanyId,Pid,description,type from OrganisationStructure where OSId in (" + location + ") and type='location'
Where location is a string like '123,2345,12356' ...
What I got on some places the where in clause is converted as bellow :

List<string> locList = location.Split(',').ToList();
var orgloc = (from b in context.OrganisationStructures
                                  where locList.Contains(b.OSId.ToString()) select new{b.OSId,b.OSName,b.CompanyId,b.pID,b.description,b.Type});
This was not giving any error on design time. But while debugging I got the following error:
LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated into a store expression
The reason is LINQ to SQL doesn't know how to translate the .ToString() call to a SQL expression.Therefore I had to change it like bellow:
var orgloc = (from b in context.OrganisationStructures select new{b.OSId,b.OSName,b.CompanyId,b.pID,b.description,b.Type}).ToList().Where( s => locList.Contains(s.OSId.ToString()) && s.Type.Equals("location") ) ;

Refrence :

Wednesday, October 9, 2013

Opensource Chatbots/Chatterbots

I have started playing with a Program-O a chatbot that really worked for me. Liked it very much and while googling a little more I have found there is a good community who work for creating chatbots - thought I might list them so that I can check them later; Right now I am just listing and will update this post once I check each of them :

Some other good references I have got from Chatbots.org

Wednesday, September 11, 2013

Opensource applications with CodeIgniter

So far I have a crash for CodeIgnier and whenever I start developing for myself my first preference is always been CI :)
In this post I will be listing some of the Opensource projects built on top of CI :

Blogging tool :
Open blog: http://www.open-blog.info/
Stblog: https://github.com/stblog/Stblog >
Simple blogging App: https://github.com/indranil/scribe
Blog system App: https://github.com/mengu/ciblog
Blogging App: https://github.com/brenden/Ignited-Blog

CMS:
Ionize Cms: http://www.ionizecms.com/
Egypt CMS: http://blazeeboy.github.com/Codeigniter-Egypt/
Max CMS: http://max-3000.com/
Getfuel Cms: http://www.getfuelcms.com/
CodeFight Cms: http://codefight.org/
Pyro Cms: http://pyrocms.com/
Image CMS: https://github.com/firstrow/ImageCMS
Manager CMS: https://github.com/souzadavi/CMS
Photo gall CMS: https://github.com/bensonarts/GalleryCMS
Fotochest gall CMS: http://fotochest.com/

Forum
Forum App: http://sourceforge.net/projects/forumprojesi/
Dove Forum: https://github.com/ChrisBaines/Dove-Forums

Social Networking
Social Network Framework: https://github.com/valfreixo/Social-Network-Framework
Book Sharing social network: https://github.com/viaduk/BookSharing
Maran Cake Melody - Social Portal using Cakephp or CodeIgniter + Doctrine ORM : http://code.google.com/p/marancakemelody/

E-commerce
Social ecommerce platform: https://github.com/lammoth/Cloubiz

Other:
Classroom Bookings App: http://classroombookings.com/
Bamboo Invoice App: http://www.bambooinvoice.org/
MyClientBase Invoice App: http://myclientbase.com/
68 Knowledge Base App: https://github.com/68kb/
Sitemanager App: http://designelemental.net/sitemanagr
QuickSnaps Gall App: https://github.com/eoinmcg/QuickSnaps


Sunday, June 23, 2013

Dev boards to make your own custom computers !

The improvements of computers and the electronics has given (and possibly giving) birth of some evaluated couple of developer (bread !!)boards - They are more like some smart super-micro[bigger than nano :P] computers. Just wanted to go through some of the famous ones and list them as I go.
Somewhere I found that somebody was depicting the story as
Then Massimo Banzi invented a new single board: Arduino.
And everyone was happy. At last, prototyping was easy, cheap, and fast.
Then the unexpected happened: David Braben invented the Raspberry Pi. Everyone became happier. Prototyping became easier, cheaper, and faster.
The story does not end here: now we have CubieBoard, Gooseberry, APC Rock, OLinuXino,Hackberry A10, et caetera.
Here is a list of the boards I was studying to pick one up from :
 
Some fun stuff that you can do with Raspberry Pi
If you are a Windows user and don wanna wait to give it a look; check the follwoing link.
http://sourceforge.net/projects/rpiqemuwindows/. And here's a post how to start you DotNet[actually mono] programming on Raspberian

So far what my understanding is depending on the project you want to do/budget you have you have to carefully choose from the list. But for me I might go with Raspberrypi.
To find out a comprehensive comparison of the feature and price the following link can be checked. 

Wednesday, April 10, 2013

Testing the performance of a web application

Currently, I am working with a web application and one of the main duty is to improve the performance of the application. I am trying to reduce the page refresh time first. Here I m going to note down all the tools and techniques I am utilizing.
To identify exactly what is bottle-necking I used the following tools:
FireBug
IE Developer tools
Yslow
Pagespeed
Fiddler
I needed to compress/minify my css and js files. I got some tools that are of high rank. But finally I wrote my own tool to perform the same :
https://github.com/marifrahman/WebResourceCompressorForm

Some of the clients has very slow internet connection. Therefore I needed to test the site using low speed internet  To accomplish that following tools were very useful.
Sloppy
a fiddler extension [http://fiddlerdelayext.codeplex.com/]