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.

sorting - Unix sort of version numbers -


i have list of version numbers, let's instance in file versions.txt

1.2.100.4 1.2.3.4 10.1.2.3 9.1.2.3 

i wish sort them sorted version. i.e:

1.2.3.4 1.2.100.4 9.1.2.3     10.1.2.3 

i have tried using various sort commands using "k" parameters, not understand enough pull off. appreciated.

the -v option nicest, wanted stay away installing new/other software since sort didn’t have option.

this command worked me in end:

sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n test.txt 

from comments:

  • to reverse order: sort -t. -k 1,1nr -k 2,2nr -k 3,3nr -k 4,4nr
  • to skip v prefix: sort -t. -k 1.2,1n -k 2,2n -k 3,3n -k 4,4n

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 -