rule

Redirect old page url after .htaccess url rewriting

三世轮回 提交于 2019-12-12 04:03:31
问题 I have rewrited my url's with htaccess and now I want to redirect the old url's to the new ones, but I can't figure it out how to do it after all. This is my redirect rule used: RewriteRule ^page/([^/]*)/$ /page.php?name=$1 [L] The old url's look like this: page.php?name=page-name The new url's look like this: /page/page-name/ 回答1: That's a bit complex when you want redirect an url with GET parameters. Here's a trick to do it : RewriteRule ^page\.php$ %{QUERY_STRING} [C] RewriteRule name=(.*)

XPath rule not working in Sonar 4.4

落爺英雄遲暮 提交于 2019-12-12 02:57:37
问题 reproduce steps: click "Rules" link Search "xpath" click the Java XPath rule that is not deprecated click "create" Fill in "name"/"key"/"Description"/"Message" as "should not use Collections.synchronizedMap" , change status as "ready" , set xpathQuery as //IDENTIFIER[@tokenValue='synchronizedMap'] click "create" button click "edit" and notice "xpathQuery" field is empty which is unexpected. fill the field "xpathQuery" with //IDENTIFIER[@tokenValue='synchronizedMap'] again click "save" button

Open an lxterminal window via shell script triggered by udev rule

て烟熏妆下的殇ゞ 提交于 2019-12-12 01:45:25
问题 I'm trying to start a python script that waits for user input via a shell script triggered by a UDEV rule . After the input arrives the python script needs to make some database calls. I'm running into a couple different issues. Here is the udev rule: SUBSYSTEM=="usb" RUN+="/path/to/script.sh" Issue #1 - I can't seem to get it to actually open the window. Here is what I have in script.sh: #!/bin/bash lxterminal -e /path/to/python_script.py Here is the error I'm getting from udev: '/path/to

SOA Decision Service Error

旧城冷巷雨未停 提交于 2019-12-11 16:32:02
问题 I am receiving a weird error when my SOA system is trying to call a decision service. Has anybody seen an error like this before and knows how to get around it? There are multiple decision services within my application and I read online that this can be a bug within SOA, however, this was working before and then suddenly start giving this error. If more specific detail is required then please let me know and I can provide it but for now, I am purposely leaving this question without specific

Postgresql Triggers & Rules not firing for remote inserts

徘徊边缘 提交于 2019-12-11 08:06:47
问题 I've spent all afternoon searching on this problem w/o any luck. I have tried this with both a Rule and a Trigger and get the same behavior. I can create the Rule or Trigger and test it locally by inserting a record manually into the DB using 'psql' yet when I try to insert a record remotely using a JAVA app, the triggers do not fire. A simplified example is this: I have a table "Customer_Address" that has fields: customerid zipcode city state I have tried to create both rules and triggers so

Yii2 whenClient validation issue

冷暖自知 提交于 2019-12-11 02:13:54
问题 For some reason I cannot get conditional rule 'required' to work. Even if I reduce the condition to "always return false", required-validation seems to check this unnecessary field: public function rules() { return [ [['order_id', 'product_id', 'quantity'], 'required'], ['product_date', 'required', 'whenClient' => "function(attribute, value) { return false; }" ], // more rules here [['date_create', 'date_update', 'product_date'], 'safe'], // more rules here ]; } On form submit save() fails

How can I create customized builtins in Jena?

泄露秘密 提交于 2019-12-11 02:12:50
问题 I just wondering how I can create new custom builtins for Jena. I know that for this purpose it should be used both the class "BaseBuiltin" and the class "BuiltinRegistry" (but how ?). I have also found out a plugin for Eclipse which is called "SADL" but I am not sure if I can use if for this purpose. If I can...which method is better and why ? Could anyone of you explain me which way I should take ? Cheers! 回答1: In a follow-up to a later question of yours, I provide code demonstrating the

sonar quality profile rule export with descrption

自作多情 提交于 2019-12-10 20:57:16
问题 How to download a sonar quality profile along with description. /profiles/export?language=java&name=xyz_profile Gives me xml dump with repositoryKey, key, priority elements of each rule. What shud i do to get description/rule descriptiin text? Pls help. 回答1: You should get what you want with the /api/rules web service and with help of the "profile" parameter : http://docs.codehaus.org/pages/viewpage.action?pageId=229743284 来源: https://stackoverflow.com/questions/24324490/sonar-quality-profile

Conditional Formatting of maximum value in each row of many

天大地大妈咪最大 提交于 2019-12-10 13:23:55
问题 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 too cumbersome. Is there a faster way of applying the same rule to each row separately? 回答1: Please select he relevant columns (say A:H) and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and

Snort rules with content

回眸只為那壹抹淺笑 提交于 2019-12-08 13:31:09
问题 This will generate an alert: alert tcp any any <> any any (msg:"Test_A"; sid:3000001; rev:1;) This will not: alert tcp any any <> any any (msg:"Test_B"; content:"badurl.com"; http_header; sid:3000002; rev:1;) I have tried: fast_pattern:only; metadata:service http; nocase; http_header; and others. I cannot get it to work at this generic level. Any ideas why the content attribute does not work? The packet has a URL. Updated from the comments 0000 9c d2 4b 7d 96 60 3c 15 c2 dc 48 fa 08 00 45 00