rules

How to set ReSharper variable naming rules so that it allows underscores?

Hi, Whenever I use a variable name that stands for a primary key as int pk_MyObject = GetPrimaryKey(myObject) ReSharper complains about the pk_MyObject and offers me to rename it pkMyObject. How can I add a new rule to ReSharper so that it does not complain about variable names such as xx_YYYYY ? ...

Rule Based Design

I will regularly read some discrete states, and applying some rules to differences in states I will report some errors. Rules can be changed in time. What are best-practices to solve such a problem? Thanks. ...

How to create a rule based feature (like in Outlook) with C#

I want to develop a feature for an application, that make it possible to create dynamic rules like you can do it in Outlook. I want that every user can create rules to automatize precesses. Those rules must do something before an action, after an action and to a certain time/day. Possible rules can be like: - If process >= 99% -> Set ...

nginx rewrite for clean urls

What I'm trying to accomplish, is to have people who go to: http://www.mydomain.com/$SEARCH-QUERY/$PAGE-NUMBER to redirect to search.php?query=SEARCH-QUERY&page=PAGE-NUMBER I just figured out how to install nginx and configure php-fpm, mysql and everything, but now I'm a bit confused over the rewrites. Here's what I have, that doesn't a...

Drupal Rules: Problem with "modify taxonomy"

Hi! I'm working with Drupal 6 to create a feed collecting site. I import the original feeds via the feeds module and copy their tags. But I also want to assign a category (terms from second taxonomy) according to the author name to be able to divide the content in a unified way. I want to use the rules module (rules-6.x-1.2) to assign t...

How to use only certain validation set for validating data in Cake PHP?

I was trying to validate my User model data and I came upon this problem. Say i have the following validation rules, stored in $validate variable: var $validate=array( "username" => array( "usernameCheckForRegister" => array( "rule" => ..., "message" => ... ), ...

Reusing CHECK CONSTRAINTS

Hello, In SQL Server assuming one has columns that need to have the same data type is it possible to define a check constraint at the table (or database level) and apply that to a column when you define it? As in this (contrived) example: ALTER TABLE dbo.tblAuditTrail ADD CONSTRAINT CK_DecimalNumber CHECK (DecimalColumn LIKE '^\-?\d+\...

Business Rule convention

Is it better to have one class per business rule and a rules engine to apply all business rules to an instance of that class, or to encapsulate all business rules into one class? If the former, how to you organize the source code so that you don't end up with billions and billions of little code files contaming short classes without viol...

udev rules - How to start a Net Mobil Modem

I'm running Sidux, Linux 2.6.25-2.slh.1-sidux-686 i686 [ sidux 2008-01 Νυξ - kde-lite - (200804112323)]. My net connection is through Digi Net Mobil, modem ZTE MF110. I couldn't make it run through it's own application Join Air (I tried all kind of settings, but at its best it answers with: "Fail to connect! Link ppp0 wasn't built !")...

multiple css rules or jquery

here is some "normal" code for sprite menu #menu li a { background:url('../layout/menu.jpg') no-repeat; display:block; text-decoration: none; width:100%; height:100%; } #menu li.m1 a{ background-position:0px 0px; } #menu li.m1 a:hover{ background-position:0px -55px; } #menu li.m1 a.selected{ background-position:0px -55...

Do not allow a user to delete a node but allow to delete through Views Bulk Operations

Hi, I have the following scenario: Editor Role should not be allowed to delete nodes. Therefore the corresponding permission is de-selected in the permissions page. However Editor should be able to to delete nodes from Views Bulk operations. Using Rules an action is created called "safe delete" that checks things like if the node is ...

makefile pattern rules without recipes

I'm observing an interesting behavior of make and I wonder if there is a reasonable explanation to it besides a bug in gmake. Let's say we have the following in makefile: %-animal: echo "$* is an animal" %-fox: %-fox-animal %-wolf: %-wolf-animal The difference between the last two targets is that "%-wolf" does not have any ...

Problem with mod_rewrite

I need a mod_rewrite rule to redirect url depending on the hostname they are comming from. The situation: We have multiple domains pointing to a same webspace and we need to restrict what the specific host can see/download. domainname.com/images/logo.jpg and /www.domainname.com/images/logo.jpg should transform into domainname.com/doma...

Postgres Rule to invalidate user passwords every 60 days

Hi all, I am having some trouble invalidating user passwords every 60 days on my postgres database: CREATE RULE user_expiration AS ON UPDATE TO users DO INSTEAD UPDATE user SET user_expires = user_expires + '60' This will work every time the user changes their password, however it also works every time any...

jquery validate with multiple rules

How to validate a email address field with three rules with three customized messages in the div container. ie. rules: { email: { validationRule: true, email: true, remote: '/ajax/emailDuplicationCheck.php' } } if first one false message should be "validation rule failed" if second one false(...

Adding headers to proxied requests in IIS7

Hi everyone, We are using IIS7 UrlRewrite and wish to proxy a URL to another URL, but also adding a header en-route, so that SSO will work properly in the target. We want to add a header called Jespa-Connection-Id to a proxied request. The value for this would be: {REMOTE_ADDR}e:{REMOTE_PORT}e This value is not being passed through, ...

How to manage complex data entry validation

I feel like I am fighting against the current when I develop ASP.NET Webform apps. I frequently run into the same problems, and while I eventually find some kind of workaround i'm never fully satisfied with the results. Here is an example of a typical problem: The design requires a grid or grid-like result set. This result set is pul...

Css - Expanded shorthand properties - What is border-left-color-ltr-source:physical

Introduction When clicking on the css tab on Firebug, there is an option available called "Expand Shorthand Properties"! A typical css rule like the following: border-left:2px solid #7FA100; ..is converted into the "Expanded" version like so: border-left-color-ltr-source:physical; border-left-color-rtl-source:physical; border-left-...

Rules module not picking up the (external) "User Login" event?

In my installation the users login with Shibboleth [1], but the rule [2] I've set up to be executed on "User has logged in" event, isn't executed. On the other hand, when I login as administrator through the normal Drupal way, the rule is executed. Does this mean that the external login event isn't handled at all? Is there a way to ov...

infopath 2007- how to set cannot be blank from code behind

Hi, I have two drop down list box, on certain value of first drop down list box, i want to set the other drop down list property to cannot be blank, any idea, need some urgent solution, got stuck :( ...