Ruby를 이용한 Directory 보는 구문
# directory access # list all files but .*/*~/*.o dirp = Dir.open(".") for f in dirp case f when /^\./, /~$/, /\.o/ # do not print else print f, "\n" end end dirp.close PHP 할때같은 기분이 든다. 상당히 짧은 코드 정규표현식도 바로 사용하는 것이 참 마음에 든다. .*과 *~, *.o는 보안상 제외시킨다.
- Programming/Etc.
- · 2007. 5. 19.
ASP.NET 페이지 캐쉬를 사용하지 않도록...
Response.Cache.SetExpires(DateTime.Now.AddSeconds(0)); Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.Cache.SetValidUntilExpires(true); Response.Cache.SetNoServerCaching(); 브라우져의 페이지가 자주 바뀌는 페이지는 브라우져 캐쉬를 무효화 해야할 경우가 생긴다. 이런 때에는 Page_Load 부분에 위와 같은 구문을 넣어보자..
- Programming/ASP.NET
- · 2007. 5. 18.