last (3,707)


language agnostic - HTTP: Generating ETag Header

language agnostic - HTTP: Generating ETag Header

How do I generate an ETag HTTP header for a resource file?…


How can I remove a child node in HTML using JavaScript?

Is there a function like document.getElementById("FirstDiv").clear() ?…


Java+Tomcat, Dying database connection?

I have a tomcat instance setup but the database connection I have configured in context.xml keeps dying after periods of inactivity. When I check the logs I get the following error: com.mysql.jdbc.ex…


Convince Firefox to send an If-Modified-Since header over HTTPS

How can I convince Firefox(3.0.1, if it matters) to send an If-Modified-Since header in an HTTPS request? It sends the header if the request uses plain HTTP and my server dutifully honors it. But…


php - sleep() silently hogs CPU

I'm running Apache on Linux within VMWare. One of the PHP pages I'm requesting does a sleep(), and I find that if I attempt to request a second page whilst the first page is sleep()'ing, the second…


How do you prevent leading zeros from being stripped when importing an excel doc using c#

I'm able to connect to and read an excel file no problem. But when importing data such as zipcodes that have leading zeros, how do you prevent excel from guessing the datatype and in the process str…



What would be the fastest way to remove Newlines from a String in C#?

I have a string that has some Environment.Newline in it. I'd like to strip those from the string and instead, replace the Newline with something like a comma. What would be, in your opinion, the bes…


Abstraction away from CSS

Let me make something quite clear. I. Hate. CSS. It is a never-ending nightmare. Every minor layout change feels like a hack. Solutions to problems seem to often involve jiggering numbers around like…


Delete all but the most recent X files in bash

Is there a simple way, in a pretty standard UNIX environment with bash, to run a command to delete all but the most recent X files from a directory? To give a bit more of a concrete example, imagine s…


Getting parts of a URL(Regex)

Given the URL(single line): http://test.example.com/dir/subdir/file.html How can I extract the following parts using regular expressions: The Subdomain(test) The Domain(example.com) The path without t…




get from how first remove string and element character find