prevent (2,573)


html - How to word-break on a dash?

html - How to word-break on a dash?

Given a relatively simple CSS: div{width: 150px;}<div> 12333-2333-233-23339392-332332323</div> Expand snippet How do I make it so that the string stays constrained to the width of 150,and simply wraps…


language agnostic - How to know when to send a 304 Not Modified response

I'm writing a resource handling method where I control access to various files, and I'd like to be able to make use of the browser's cache. My question is two-fold: Which are the definitive HTTP he…


c++ - How to prevent an object being created on the heap?

Does anyone know how I can, in platform-independent C++ code prevent an object from being created on the heap? That is, for a class "Foo", I want to prevent users from doing this: Foo*ptr=new Foo;…


Is there a way to prevent a method from being overridden in subclasses?

Is anyone aware of a language feature or technique in C++ to prevent a child class from over riding a particular method in the parent class? class Base{public: bool someGuaranteedResult(){ret…


Preventing a visitor from saving an image from my site

What are some effective strategies for preventing the use of my proprietary images? I'm talking about saving them, direct linking to them etc... Presently I have a watermark on the image, but I'd rat…


security - How do I secure a folder used to let users upload files?

I have a folder in my web server used for the users to upload photos using an ASP page. Is it safe enough to give IUSR write permissions to the folder? Must I secure something else? I am afraid of ha…


security - What is the best way to prevent session hijacking?

Specifically this is regarding when using a client session cookie to identify a session on the server. Is the best answer to use SSL/HTTPS encryption for the entire web site, and you have the best gua…


Best regex to catch XSS(Cross-site Scripting) attack(in Java)?

Jeff actually posted about this in Sanitize HTML. But his example is in C# and I'm actually more interested in a Java version. Does anyone have a better version for Java? Is his example good enough t…


What's the best way of cleaning up after a SQL Injection?

I've been tasked with the the maintenance of a nonprofit website that recently fell victim to a SQL injection attack. Someone exploited a form on the site to add text to every available text-like fie…



.net - FileUpload control inside an UpdatePanel without refreshing the whole page?

According to Microsoft the FileUpload control is not compatible with an AJAX UpdatePanel. I am aware that a PostBackTrigger can be added to the submit button of the form like this:<Triggers><asp…




how from not disable javascript example jquery css html click