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.

perl - Reading between certain lines -


i have large file need pull out pieces of information. have found lot of examples on web, cannot work particular instance. have file data.log (below), , need pull out of stats1 counters, including data above. there multiple instances of these stats. cannot seem regular expression match date , stats1, , read until 3 /n/n/n's.... appreciated!!!

# data file  dec 8 20:00:00 stats1   counter1:     123   counter2:     456   counter3:     789    dec 8 21:00:00 stats2   counter4:     123   counter5:     456   counter6:     789    dec 8 21:00:00 stats1   counter1:     123   counter2:     456   counter3:     789    dec 8 21:00:00 stats2   counter4:     123   counter5:     456   counter6:     789 

try reading in paragraph mode:

local $/ = ""; while (<>) {     print "paragraph: $_"; } 

i leave figuring out paragraphs , processing want you.

output sample data:

paragraph: # data file  paragraph: dec 8 20:00:00 stats1   counter1:     123   counter2:     456   counter3:     789  paragraph: dec 8 21:00:00 stats2   counter4:     123   counter5:     456   counter6:     789  paragraph: dec 8 21:00:00 stats1   counter1:     123   counter2:     456   counter3:     789  paragraph: dec 8 21:00:00 stats2   counter4:     123   counter5:     456   counter6:     789 

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 -