sanity-check

C# check that a file destination is valid

Is there a standard function to check that a specified directory is valid? The reason I ask is that I am receiving an absolute directory string and filename from a user and I want to sanity check the location to check that it is valid. ...

Looking for advancement and sanity advice for a Manufacturing Test Developer.

I recently got a job for a company that develops and manufactures high grade electronics (company will not be named for reasons that will become obvious). I was hired from being a floor tester to being a test development technician about 2 years ago with the clear intent of being a software developer. (I have next to no electronics back...

Can a browser correct a "mangled url" automatically?

Hello, I faced a problem some time back on a particular website. It has given many hyperlinks on it to other sites. e.g. of one such URL is: http://http//example.com/a9noaa.asp It is clearly incorrect (http comes twice) URL so when one clicks on it there is a page error like "Address not found". But when one copies the link location...

java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-01438: value larger than specified precision allows for this column

I'm getting this error message in production. Unfortunately this comes from a purchased application and the support process is not precisely fast. This happens when data is being copied from one table to another. Both tables are supposed to have the same columns types and length. So far I have reviewed a some of them by doing the fol...

Is this set of time constants correct or is there a better built-in source in Cocoa

For working with time interval calculations on iPhone and looking at some component values. #define kSecondsInYear 31556926 #define kSecondsInMonth 2629744 #define kSecondsInDay 86400 #define kSecondsInHour 3600 #define kSecondsInMinute 60 I got these from Google's conversion function. I rounded Seconds in Month to nearest int. ...

PHP Sanity Check

I am looking for applications or methods for performing sanity checks of php code. I hope to to avoid finding out about the coding mistakes the hard way, but instead find them before publishing the website. display_errors = on and similar run-time methods find the problems too late. So far I have found the following ways, which I think...

hibernate column uniqueness question

I'm still in the process of learning hibernate/hql and I have a question that's half best practices question/half sanity check. Let's say I have a class A: @Entity public class A { @Id @GeneratedValue(strategy=GenerationType.AUTO) private Long id; @Column(unique=true) private String name = ""; //getters, setters, ...

Manipulating the address of a variable to store a smaller type?

This is what I get for pampering myself with high-level programming languages. I have a function which writes a 32-bit value to a buffer, and a uint64_t on the stack. Is the following code a sane way to store it? uint64_t size = 0; // ... getBytes((uint32_t*)&size+0x1); I'm assuming that this would be the canonical, safe style: ui...

C: Throw error on parameter check or let it hit the fan ?

Hi everyone, I have a simple design(?) question. I'm writing a simple program, that has a couple of functions that look like these. float foo (float* m,size_t n){ float result; //do some calculations, for example a sum return result / n; } I have a couple of questions on this, with no intention of re opening some holy ...

Firewall policy sanity check tool

Hi All, Im looking for a tool to analyzer firewall policy to check if there are duplicate rules/overwritten rules. Could you please suggest any to do the job? Thanks. ...

MySQL and PHP synchronicity sanity check

I'm troubleshooting a bug and trying to rule out all possible explanations for why I'm witnessing the behavior that I am. I'm executing a number of MySQL queries in PHP (via CodeIgniter's Active Record class) and one explanation for the behavior that I'm seeing is that the queries aren't being executed synchronously, i.e. that PHP isn't...