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.

batch file - echo -e equivalent in Windows? -


is there linux "echo -e" equivalent in windows can use "echo -e \xnnn" print out character ascii code hexadecimal value nnn ?

there no equivalent, can write own function.

i split problem 2 parts.

  • convert hex number decimal.
  • convert decimal number ascii.

converting hex decimal simple by

set "myhex=4a" set /a decimal=0x%myhex% 

converting number ascii more tricky, depends of required ascii-range
if need range 32 (space) 126'~', use =exitcodeascii variable

set "decimal=%1" cmd /c exit /b %decimal% echo "%=exitcodeascii%" 

if need special characters cr, lf, esc, del, possible create them pure batch.

if need more use vbscript.

forfiles method

a more general way use command forfiles (dostips: generate character...)

echo-e.bat

@echo off set "arg1=%~1" set "arg1=%arg1:\x=0x%" forfiles /p "%~dp0." /m "%~nx0" /c "cmd /c echo(%arg1%" 

you can call via echo-e.bat "hello\x01\x02\x03" , hello☺☻♥.


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 -