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.

osx - Best practice for Bash start-up files on a Mac -


as understand it, order start-up files read bash shell on mac are...

  1. ~/.bash_profile
  2. ~/.bash_login
  3. ~/.profile

..and once 1 file in list found, contents of other ignored.

that being said, there best practice of these files should 1 true bash start-up file?

on 1 hand, if .bash_profile take precedence on other potential start-up file, should used, because can sure 100% of time info in start-up file being run.

on other hand, if .profile file exists on mac systems default, , .bash_profile needs manually created, perhaps should used, , there never reason create .bash_profile file.

thoughts?

it depends on whether use shells other bash, , whether use bash-only features in profile. if use other sh-style shells (sh, ksh, zsh, etc not csh or tcsh), don't use bash-only features , want same setup no matter shell you're in, should use .profile. if want use bash-only features, use .bash_profile. if want use multiple shells use bash-only features, put common stuff in .profile , bash-only stuff in .bash_profile, add if [ -f ~/.profile ]; . ~/.profile; fi .bash_profile.

if ever use bash, don't rely on bash-only features in profile, doesn't matter.

there's complication: login bash shells source either .bash_profile, .bash_login, or .profile; non-login interactive bash shells (e.g. subshells) source .bashrc instead. tend want same setup in both login , non-login shells, put interesting stuff in .bashrc, , if [ -f ~/.bashrc ]; . ~/.bashrc; fi in .bash_profile. if used other shells, i'd put of in .profile instead, , have .bashrc source instead.


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 -