Can you validate just a single property with the Fluent Validation Library, and if so how? I thought this discussion thread from January of 2009 showed me how to do it via the following syntax:
validator.Validate(new Person(), x => x.Surname);
Unfortunately it doesn't appear this works in the current version of the library. One other thing…
I am writing some Java code that authenticates to Active Directory using SASL GSSAPI. Mostly this code is working fine but for one user I am getting the response:
javax.naming.AuthenticationException: [LDAP: error code 49 - 8
0090304: LdapErr: DSID-0C0904D1, comment: AcceptSecurityContext error, data 568,
v1772 ]
I know that 49 means this is…
I have made a custom handler called MyIndexHandler and I want it to handle *.index requests, now as I want this handler to be executed by any website, I installed my handler with following two steps in IIS manager.
Add MyIndexHandler.dll in GAC
Add Managed Module for *.index, the drop down in IIS displays my index handler correctly so it means…
I'm able to manage FTP sites via the IIS manager, however, all attempts so far to manage the state of FTP sites using other means have failed, including:
Using the IIS7 API (Microsoft.Web.Administration)
Using WMI (with IIS6 compatibility enabled)
Using the AppCmd tool in System32\inetsrv
Related questions:
Why am I unable to get…
Hi all
I'm reading through Eric Evans' awesome work, Domain-Driven Design. However, I can't help feeling that the 'layers' model is contrived. To expand on that statement, it seems as if it tries to shoe-horn various concepts into a specific, neat model, that of layers talking to each other. It seems to me that the layers model is too…
After installing gVim and running gvim from the run window, if I were to type :cd followed by a tab, I will get \AppData, \Application Data, etc. Which basically means I'm at my $HOME directory (C:\Users\Fabian). The weird thing is I do not have a \Application Data folder there.
But if I were to run gvim.exe from its installation…
Say you have a MySQL 5.0 MyISAM table with 100 million rows, with one index (other than primary key) on two integer columns.
From my admittedly poor understanding of B-tree structure, I believe that a lower cardinality means the storage efficiency of the index is better, because there are less parent nodes. Whereas a higher…
Hi !
I'm currently doing a firewall management application for Django, here's the (simplified) model :
class Port(models.Model):
number = models.PositiveIntegerField(primary_key=True)
application = models.CharField(max_length=16, blank=True)
class Rule(models.Model):
port = models.ForeignKey(Port)
ip_source…
I am getting the following error while sending mail by click of a button in MS access form
I am using sendObject to send mail using vba code.
The host 'smtp' could not be found. Please verify that you have entered the server name correctly. Account: 'pop3', Server: 'smtp', Protocol: SMTP, Port: 25, Secure(SSL): No, Socket…
I have the following code:
<div style="width: 100px;
overflow: hidden;
border: 1px solid red;
background-color: #c0c0c0;
padding-right: 20px;
">
2222222222222222222222111111111111111111111111113333333333333333333</div>
(XHTML 1.0 transitional)
What happens is that the padding-right doesn't appear, it's…
Hi everybody.
I try to read some file with google's GDownloadUrl and it works only from time to time.
failure means fileRows == "blah blah"
success means fileRows == (real file content)
I've noticed, however, that when I cease (with Firebug) the execution on line 3 for a couple of seconds, it succeeds more often.…
i am calling ajax every second in page..
Here the server page returns randomly generated number,using this number(converted into seconds) i am triggering another function in ajax success .it works
My problem
suppose random number = 5 means trigger() function called after 5 seconds using setTimeout,but rember …
As a means of simple security, I was previously checking the digital signature of a downloaded update package for my program against its public key to ensure that it originated from me. However, as I'm using cheap code signing certs (Tucows), I am unable to renew an existing cert and therefore the keys change…
Does anyone know why this code doesn't work. This means, the alert is NOT fired
<iframe/>
<script type="text/javascript">alert('hello');</script>
While this code with the alert BEFORE the Iframe works perfeclty. This means the alert is fired
<script…
I suppose the real question is how to convert base2/binary to base10. The most common application of this would probably be in creating strings for output: turning a chunk of binary numerical data into an array of characters. How exactly is this done?
my guess:
Seeing as…
This article says:
Every prime number can be expressed as
30k±1, 30k±7, 30k±11, or
30k±13 for some k.
That means we can use eight bits per
thirty numbers to store all the
primes; a million primes can be
compressed to 33,334 bytes
"That means we can use…
GUI
i am trying to use JSpinner but as you can see from the attached image that it looks bad.
i am on windows 7. i was wondering if anyone knows how to make it look good?
just for clarity. bad means the edges dont line up and good means the spin control edges line up…
Joe Duffy, gives 6 rules that describe the CLR 2.0+ memory model (it's actual implementation, not any ECMA standard) I'm writing down my attempt at figuring this out, mostly as a way of rubber ducking, but if I make a mistake in my logic, at least someone here will be…
Hey,
I have a Ruby on Rails application setup like so:
User Model
has_and_belongs_to_many :roles
Role Model
has_many :transactions
has_and_belongs_to_many :users
Transaction Model
belongs_to :role
This means that a join table is used called roles_users and…
I have a singleton instance that is referenced throughout the project which works like a charm. It saves me the trouble from having to pass around an instance of the object to every little class in the project. However, now I need to manage multiple instances of the…