Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

arrays - Java - Sort Categories -


ok heres need do. i've got file contains names of categories , called "categories.txt" have files names of categories, e.g "mail.txt","news.txt" etc, , files contain link names such "hotmail" , "bbc news". i'm looking count number of links in each category can putting contents of each category array , finding size of it. after need display categories 1 links 1 least. i'm not sure how go @ all, appreciated.


i have far change position of categories in arraylist depending on size of file. seems throw error @ end of code after first change has taken place. ideas why?

    iterator itty = parts.iterator();     int = -1;     int count = 0;     int tempcount = 0;     string tempname = "";     while (itty.hasnext()){         i++;         catname = parts.get(i).tostring();         parts addmenu = new parts("" + catname);         count = addmenu.links().size();         if (i > 0){             if (tempcount < count){                 int ind = parts.indexof(catname);                 parts.remove(tempname);                 parts.add(ind,tempname);                 system.out.print(parts.tostring());             }         }         tempcount = count;         tempname = catname;         itty.next();     } 

1. read categories.txt file , read 1 category example news try opening news.txt , count no of records inside news.txt update map accordingly.

map<string,long>  

2. hold link each category use

map<string,list<string>>  

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -