Showing posts from February, 2011

How to Hide/Show rows dynamically in Excel


Simple Java HttpServer / HttpHandler

import; import; import; import; import; import; publicclass TestServer { privatestaticfinalint PORT = 8000; privatestaticfinal String HOST = ""; publicstaticvoid main(String[] args){ System.out.println("Starting HttpServer on port "+PORT); try{ InetSocketAddress address = new InetSocketAddress(HOST, 8000); HttpServer httpServer = HttpServer.create(address, 0); System.out.println("Running.."); HttpHandler handler = new HttpHandler() { publicvoid handle(HttpExchange exchange) throws IOException { String response = "Hello World!"; byte[] bytes = response.getBytes(); exchange.sendResponseHeaders(HttpURLConnection.HTTP_OK,bytes.length); exchange.getRes…

SQL Server How to find if any stored procedure is referencing database object

select StoredProcedureName = from sys.sql_modules sm innerjoinsys.procedures p on sm.[object_id] = p.[object_id] where [definition] like '%Database_Object_Name%'