Questions tagged [rule]

Rule might refer to various things: business rules, JUnit rules, a rule of thumb, rules engines, rules in Makefiles ...

Consider using one of the more specific tags:

https://stackoverflow.com/tags/rule-engine/info

https://stackoverflow.com/tags/rules-of-thumb/info

https://stackoverflow.com/tags/junit-rule/info

https://stackoverflow.com/tags/business-rules/info

559 questions
63
votes
23 answers

Laravel check for unique rule without itself in update

I am having my validation rules for unique in the update section. In inserting or adding the unique rule is 'Email' => array('unique:driver_details'), and it will check for the unique coloumn. But this fails for the update section. While updating…
user3388086
55
votes
3 answers

Junit @Rule and @ClassRule

I am writing JUnit4 test in which I am using TemporaryFolder rule. It seems that it works fine with both @Rule and @ClassRule. What is the difference between Junit @Rule and @ClassRule? Why should I use one and not another?
Viktar Kava
  • 761
  • 1
  • 5
  • 10
22
votes
2 answers

Create rule in makefile for just a set of files

I am writing a Makefile, and I want to use a generic rule with wildcards, like %: bkp/% cp $< $@ But I wanted this rule to be valid only for a few specific files. I wanted to define a variable with the list, for example file_list = foo.c bar.c…
dividebyzero
  • 2,190
  • 1
  • 21
  • 33
15
votes
1 answer

Parameterized testing with Mockito by using JUnit @Rule?

This follows on from this question: where I am asked to start a new question. The problem is that I just don't know enough about JUnit Rule, or what's going on here with Runners and the like, to crack the problem in the way alluded to by Jeff…
mike rodent
  • 14,126
  • 11
  • 103
  • 157
15
votes
5 answers

LaTeX \rule filling the line

Why does the following command not produce a horizontal rule filling the space until the end of the line? Hello \rule[0.5em]{\fill}{1pt} It is my understanding that this should print the text “Hello” followed by a horizontal rule that extends until…
Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
15
votes
1 answer

Mark an Outlook message as read with VBA?

Is there a way to mark a message as read if that message has been replied to? Example: this is my E-Mail RE: this is my E-Mail Can I mark both as read?
CK1
  • 472
  • 1
  • 5
  • 16
12
votes
1 answer

Guidelines for implementing a rule engine

What could be the reasons to implement your own rule engine instead of using an existing commercial/open source one? Any specific guidelines for implementing rule engines?
Snake
  • 445
  • 1
  • 4
  • 14
12
votes
5 answers

Magento catalog price rule disappears at night

I have developed the online store on magento platform. Everything works fine except the Catalog price rule for sale. I have created the simple rule that applies 15% discount on all products. When I save and apply the rule, it works fine the whole…
Mehak
  • 143
  • 1
  • 2
  • 6
10
votes
3 answers

How can I ignore a certain WebStorm inspection error?

Following tries do not work: /* tslint:disable:"no-unused-variable" */ /* tslint:disable:'no-unused-variable' */ /* tslint:disable:no-unused-variable */ Maybe Webstorm has other linting mechanisms working in the background? How can I disable…
user2227400
9
votes
2 answers

How to get pattern rules to match file names with spaces in Makefile?

In the GNU make docs, '%' is documented to match "any nonempty substring". However, it seems it actually only matches non-empty substrings that do not contain whitespace. For example, say you do this: mkdir /tmp/foo cd /tmp/foo echo 'int main() {…
derobert
  • 49,731
  • 15
  • 94
  • 124
9
votes
3 answers

What does this Rewrite rule mean?

Im installing phpancake, there is a folder there shema like this application/ install/ library/ public/ sql_schema/ install.html install.php What does this rule mean? RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond…
streetparade
  • 32,000
  • 37
  • 101
  • 123
8
votes
2 answers

Conditional Formatting of maximum value in each row of many

I have a spreadsheet with 250+ rows of data and need to find the largest value in each row. I tried to use Conditional Formatting, however I need the same rule for each row so can't highlight all the data, and trying to copy and paste it would be…
7
votes
1 answer

ANTLR: call a rule from a different grammar

is it possible to invoke a rule from a different grammar? the purpose is to have two languages in the same file, the second language starting by an (begin ...) where ... is in the second language. the grammar should invoke another grammar to parse…
zhujik
  • 6,514
  • 2
  • 36
  • 43
7
votes
1 answer

What does SpringClassRule/SpringMethodRule actually do?

In an integration test class I met these lines of code: @ClassRule public static final SpringClassRule SPRING_CLASS_RULE = new SpringClassRule(); @Rule public final SpringMethodRule springMethodRule = new SpringMethodRule(); When I…
IKo
  • 4,998
  • 8
  • 34
  • 54
7
votes
2 answers

Prolog Or(;) Rule Return Multiple Result

i have define a rule with or operator but it return multiple true or false. isloanaccept(Name,Guarantor,LoanType,LoanAmount,LoanTenure) :- customer(Name,bank(_),customertype(_), citizen(Ci),age(Age),credit(C), …
nicholas
  • 2,581
  • 14
  • 66
  • 104
1
2 3
37 38