rules

I need a simple rules engine, I think? [closed]

江枫思渺然 提交于 2019-12-02 14:43:30
I need some advice on the best approach to solving this problem. I've researched DROOLS, Java Rule Engine and a few others. All of these are powerful, and have good things about them. I don't know which (if any) will be the best choice for me. I have one business object. (simplified for demo) Person firstName:String lastName:String departMent:String hireDate:Date I need to write an editor in a web application that will allow for complex rules to be built around these fields. I need to support complex nested AND/OR logic. I just need basic operators, and the rule should simply evaluate to true

I need my Debian rules file to simply copy files to it's target

落花浮王杯 提交于 2019-12-02 14:30:33
I have a large project where we have the following files: A few 3rd party pre-compiled binaries Our own in-house binaries A collection of Ruby scripts A sizable Ruby on Rails project This product will be installed on appliance hardware that my employer has already selected, using Ubuntu Linux (Lucid) as the target O.S., with our goal of distributing the archive as a Debian package to ease installation and upgrades. Additionally, we have a number of ERB templates that we need to "fill-in" with appropriate values on a per-customer basis, so the use of the postinst script will be particularly

Pros and cons of Java rules engines [closed]

一笑奈何 提交于 2019-12-02 13:49:49
What are the pros and cons to adopting the Java rules engines JESS and Drools ? Are there any other players? I understand that Drools is Open Source and JESS is not, but how do they compare in other areas like ease of use, performance, level of integration with your code? Pascal Thivent What are the pros and cons to adopting the Java rules engines JESS and Drools? Use a rule engine if you need to separate the business rules from the application logic. The Does Your Project Need a Rule Engine article has a good example: For example, a typical storefront system might involve code to calculate a

I am compiling a rules of programming mindset for my team: What are yours? [closed]

删除回忆录丶 提交于 2019-12-02 13:48:59
I have been working on a list for a while that helps me share the why of programming approach and thought as much as how to do something. For this, I wanted to build a list of things that are: best practice, best thought, best approach... that help a programmer's ability to analyze, think, approach, solve and implement in the most effective way. I have seen dozens of incredibly valuable comments in questions throughout Stack Overflow, but I couldn't find a place where we keep them together. There is the most controversial opinion on Stack Overflow. However, I'm just looking for sagely insights

Trouble formatting and displaying <hr>

最后都变了- 提交于 2019-12-02 03:59:07
I'm still pretty new to coding so bear with me...I have read that different browsers display horizontal rules differently. I can't seem to get it right in Firefox or Chrome (only two I've checked so far). Here is what my hr's look like in Firefox: http://postimg.org/image/g2vn1cm3b/ The highest rule is where it needs to be. The last two columns have the wonky rules. And here it is in Chrome: http://postimg.org/image/wl98cvi5p/ Second and third columns are fine, first one is messed up. Since my site is not live anywhere, I'm going to include my HTML and CSS here. @charset "UTF-8"; /* http:/

Enforcing “no 2 same contiguous elements” in random list generation

[亡魂溺海] 提交于 2019-12-02 00:11:46
I have a set of 4 strings and want to generate a list of 16 elements, but with enforcing the rule (or obtaining the same result as enforcing such rule) to never have the same element repeated in two contiguous positions in the resulting list. Being almost a total newbie in Python I went to check the different methods in the random library and found many different and useful ways to do something similar (random.shuffle would almost do the trick), but no one of those addressed this my particular need. What data format and what methods should I use? Pseudocode algorithm: For i in n (n being the

Can Boost Spirit Rules be parameterized

让人想犯罪 __ 提交于 2019-12-01 22:02:13
问题 In my Boost Spirit grammar I would like to have a rule that does this: rule<...> noCaseLit = no_case[ lit( "KEYWORD" ) ]; but for a custom keyword so that I can do this: ... >> noCaseLit( "SomeSpecialKeyword" ) >> ... >> noCaseLit( "OtherSpecialKeyword1" ) Is this possible with Boost Spirit rules and if so how? P.S. I use the case insensitive thing as an example, what I'm after is rule parameterization in general. Edits: Through the link provided by 'sehe' in the comments I was able to come

Am I missing anything here in my statement about c++?

徘徊边缘 提交于 2019-12-01 21:14:48
You can't have code outside of functions except for declarations, definitions and preprocessor directives. Is that statement accurate, or is there something I'm missing? I'm teaching my nephew to program, and he was trying to put a while loop before main. He's pretty young, I want to give him a hard simple rule that he can understand. Not quite -- you can also put expressions in global variable declarations: int myGlobalVar = 3 + SomeFunction(4) - anotherGlobalVar; But you can only put expressions here, which have to evaluate to the value you're initializing the global with. You cannot put

How can we ignore some SonarQube rules in Java?

落爺英雄遲暮 提交于 2019-12-01 17:47:53
We recently started using SonarQube . We have found some rules that are suggested by SonarQube but we want to ignore them or give them a low priority and even configure the time suggested by SonarQube. For e.g We want to avoid the rule (and/or configure the priority and time suggested by SonarQube) for Document this public class. and Complete the task associated to this TODO comment. I couldn’t find a way to configure this rules to be ignored. We want this kind of rules to be ignored for the whole project not specific classes. Configuring this values would help us to have a better time

How can we ignore some SonarQube rules in Java?

白昼怎懂夜的黑 提交于 2019-12-01 17:38:36
问题 We recently started using SonarQube . We have found some rules that are suggested by SonarQube but we want to ignore them or give them a low priority and even configure the time suggested by SonarQube. For e.g We want to avoid the rule (and/or configure the priority and time suggested by SonarQube) for Document this public class. and Complete the task associated to this TODO comment. I couldn’t find a way to configure this rules to be ignored. We want this kind of rules to be ignored for the