|
Where should I write codes for checking validity of class' properties? (For examples: "amount" should be a positive integer, "email" should be a string with correct e-mail formatting) At the setter methods, At somewhere I use that (using try/catch), or...
Started by champjss on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Don't insist on anything in your validity checking except properties that you are actually going.
|
|
I've written a VB.Net page to browse my site. It stores the HttpWebResponse in a string. How can I validate the markup validity of the page in .Net? - something similar to W3's validate by direct input option. I'm looking for something that can identify...
Started by rvarcher on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The only drawback is that the string has to be saved into a physical... .
There's also a validator module available for download.
Here's some information on how to that: Validate XHTML in C# (you should be to translate this into VB.NET if needed).
|
|
I'm trying to check the validity of a particular 'stand-alone' code file from within my C#.Net app. Is there any way that I can check the file and get a visual studio's style errors list out?
I'm only interested in running a basic check to ensure that...
Started by GenericTypeTea on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
It is written in .NET so you should be able to reference and use it through... .
The one that cones to mind immediately is StyleCop.
There are a few libraries that enable this.
Call the C# command line compiler (csc.exe) ?
You can use static code analysis .
|
Ask your Facebook Friends
|
We use a private certificate authority powered by OpenSSL to authenticate our customers. We provide a simple web-based utility which allows them to upload a CSR file for the certificate authority to sign.
At the moment, we can only issue certificates ...
Started by Gavin Brown on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The attributes and extensions that can be put in the CSR are listed in PKCS#9, and there... .
To request a specific validity period in a CSR, and as far as I can tell, the CSR simply doesn't a field specifically for a requested validity period.
|
|
When coding up, say, a registration form from scratch, does it make sense to get it functioning with the expected inputs first, and then go back and catch/handle the unexpected inputs and deal with errors?
The alternative would be to process the input...
Started by cdeszaq on
, 12 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
If you're not feeling creative and just....
In a production environment, you really have nothing to show if you are not covering both validity.
Is that, if you're disorganized, you may forget to add a validity or sanitation check somewhere.
|
|
I'm struggling with checking the validity of version numbers in Perl. Correct version number is like this:
Starts with either v or ver, After that a number, if it is 0, then no other numbers are allowed in this part (e.g. 10, 3993 and 0 are ok, 01 is ...
Started by Makis on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You need to put some extra brackets two show which part of the... .
A | will scope to brackets or the end of an expression rather than just on the two neighbouring items .
Your problem is that the or - | - you are using is splitting the whole pattern in two .
|
|
I am implementing an interface which defines a method that can throw an exception if the parameters are not valid. What constitutes valid parameters depends on the implementing class. The interface also defines an isValid() method which can be used to...
Started by Grundlefleck on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
P.S.: You should.
The logic for testing validity once, but either return false or throw an exception as per the throwIfInvalid with valid arguments, I wouldn't expect that your second solution to be problematic.
|
|
I have one self signed rootcacert.pem which is going to expire next month. Due to specific reason I have extended the validity of this rootcacert using the command :
openssl x509 -in rootcacert.pem -days 365 -out extendedrootcacert.pem - signkey rootcakey...
Started by anil on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You can do a fresh dump of both informations with:
openssl x509 -in... .
The important part for the certificate is between the lines:
BEGIN CERTIFICATE … END CERTIFICATE
All human comprehensible outside are only for human consumption .
Your link is erronous.
|
|
Double ABC = - UTIL_COMMON.fnChkDouble(lStr);
Above statement, is it valid or not?
Thanks
Started by elson on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
As you want to assign a double, this method most probably returns a double, so this is valid.
Yes, it's valid as long as the operator - can be applied to the return type of UTIL_COMMON.fnChkDouble() .
|
|
In our application we generate hashcode from a java object and store it in the database at some level. Now my questions is if somebody generates a number by hand, is there a way i can find out whether it is a valid hashcode created by the JVM from an ...
Started by Rajat on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Any int is a valid hashcode.
No, there isn't - at least if it falls in the range of int .
|