validity

Validity of the code

Consider the following code : void populate(int *arr) { for(int j=0;j<4;++j) arr[j]=0; } int main() { int array[2][2]; populate(&array[0][0]); } There was a discussion regarding this on a local community whether the code is valid or not(Am I supposed to mention its name?). One guy was saying that it invokes UB because...

Is it necessary to put INPUT elements in a DIV element?

Why this give error in W3c html validation ? I'm using HTML 4.01 Strict doctype. <form method="get" action="/search" id="search"> <input type="text" value="search" maxlength="80" class="textbox" > </form> and this does not? <form method="get" action="/search" id="search"> <div> <input type="text" value="search" maxl...

log4j configuration file error detection

I'm currently writing a logger utilizing log4j. Once I load in a log4j.properties or a log4j.xml file, I was wondering if there was a way to detect if the logger configuration file is valid. If it isn't valid, I was hoping to load a default setting (that's located in another file) instead. Thanks ...

Verifying remote program integrity/validity as part of WCF service security

Hello, I have an application running on remote systems. The remote systems are an embedded computer built into a kiosk. As a result, they are somewhat "untrusted," in that the physical security for them is rather lax. However, these kiosks can be credit card processing, etc. via a WCF service to my server. Using machine certificates, e...

Maintaining a session over multiple pages.

I am having trouble designing a way to maintain a session with a cookie across multiple pages. I am doing something very similar to this tutorial. I check the password and username from a splash page, and if it is correct then I set a cookie and fill it with a hash. After that I transfer the user to a different page. If the username/...