Search Results

Search found 12089 results on 484 pages for 'rule of three'.

Page 11/484 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • Bison: Optional tokens in a single rule.

    - by Simone Margaritelli
    Hi there .. i'm using GNU Bison 2.4.2 to write a grammar for a new language i'm working on and i have a question. When i specify a rule, let's say : statement : T_CLASS T_IDENT '{' T_CLASS_MEMBERS '}' { // create a node for the statement ... } If i have a variation on the rule, for instance statement : T_CLASS T_IDENT T_EXTENDS T_IDENT_LIST '{' T_CLASS_MEMBERS '}' { // create a node for the statement ... } Where (from flex scanner rules) : "class" return T_CLASS; "extends" return T_EXTENDS; [a-zA-Z\_][a-zA-Z0-9\_]* return T_IDENT; (and T_IDENT_LIST is a rule for comma separated identifiers). Is there any way to specify all of this only in one rule, setting somehow the "T_EXTENDS T_IDENT_LIST" as optional? I've already tried with T_CLASS T_IDENT (T_EXTENDS T_IDENT_LIST)? '{' T_CLASS_MEMBERS '}' { // create a node for the statement ... } But Bison gave me an error. Thanks

    Read the article

  • Can I 'unmatch' rule programmatically in treetop?

    - by dimus
    Is it possibe to skip a rule validating it using ruby code in treetop? Say there is something like this: rule short_words [a-z]+ { def method1 text_value end ... } end And I want the words size to be from 2 to 5 letters. Can I exit rule if I find that the length of text_value is not between 2 and 5?

    Read the article

  • prolog - infinite rule

    - by Tom
    I have the next rules % Signature: natural_number(N)/1 % Purpose: N is a natural number. natural_number(0). natural_number(s(X)) :- natural_number(X) ackermann(0, N, s(N)). //rule 1 ackermann(s(M),0,Result):- ackermann(M,s(0),Result). //rule 2 ackermann(s(M),s(N),Result):-ackermann(M,Result1,Result),ackermann(s(M),N,Result1). //rule 3 The query is: ackermann (M,N,s(s(0))). Now, as I understood, In the third calculation, we got an infinite search (failture branch). I check it, and I got a finite search (failture branch). I'll explain: In the first, we got a substitue of M=0, N=s(0) (rule 1 - succsess!). In the second, we got a substitue of M=s(0),N=0 (rule 2 - sucsses!). But what now? I try to match M=s(s(0)) N=0, But it got a finite search - failture branch. Why the comipler doesn't write me "fail". Thank you.

    Read the article

  • Reading three words and sorting them in lexicographic order

    - by Derrick
    I am trying to create a program that asks the User to type three words and sort them in lexicographic order. EXAMPLE; Enter three words separated by spaces: Pear Orange Apple Apple Orange Pear The program is working fine (if I attempt the above example) except for one type of combination example that I will show below. EXAMPLE; Enter three words separated by spaces: Orange Apple Pear Apple Pear Pear The program is skipping the first word (Orange) if it is supposed to appear in the middle of the three words. I believe that this line of code is affecting the program because it says that "this assigned value is never used" but I'm not sure how to fix it since I'm still an entry Java learner. middle = firstWord; Because of that line being unused, it's why Pear appeared twice. import java.util.*; public static void main(String[] args) { Scanner wordInput = new Scanner(System.in); String firstWord; String secondWord; String thirdWord; System.out.println("Enter three words separated by spaces: "); firstWord = wordInput.next(); secondWord = wordInput.next(); thirdWord = wordInput.next(); String top = firstWord; String bottom = firstWord; if( top.compareTo(secondWord) > 0) { top = secondWord; } if( top.compareTo(thirdWord) > 0) { top = thirdWord; } if( bottom.compareTo(secondWord) < 0) { bottom = secondWord; } if( bottom.compareTo(thirdWord) < 0) { bottom = thirdWord; } String middle; if( !firstWord.equals(bottom) && !firstWord.equals(top) ) { middle = firstWord; } if( !secondWord.equals(bottom) && !secondWord.equals(top) ) { middle = secondWord; } else { middle = thirdWord; } System.out.println( top ); System.out.println( middle ); System.out.println( bottom ); } } Does anyone what I am missing or doing wrong? :( Please and thank you for any help!

    Read the article

  • rewrite rule to skip folder [closed]

    - by redcoder
    RewriteEngine on RewriteBase /tradesalvage/demo RewriteRule ^featured-cars/?$ index.php [L] RewriteRule ^current-stock/?$ carlist.php [L] RewriteRule ^about-us/?$ aboutus.php [L] ErrorDocument 500 /tradesalvage/demo/500.php ErrorDocument 404 /tradesalvage/demo/404.php I have the above rule in .htaccess when access url "http://localhost/tradesalvage/demo/about-us" , it does redirect to aboutus.php file .It also works fine with the rest of the rule. But i have a problem when i create a admin folder.WHen access "http://localhost/tradesalvage/demo/admin/add-data" , it goes to the 404 error page.How do I write the rule to skip the admin folder ?

    Read the article

  • Networking setup for three systems

    - by srihari
    Hi, I want to setup a client server environment. I have three systems one with Solaris and the other two with windows. I want to install all the database and other software on the Server and enable the client systems a limited access to the system resources. Can anyone help me how to setup this and also the hardware requirements to setup such an environment. Your replies will be mostly appreciable and helpful to others who has similar thoughts or requirements. As we have more programmatical knowledge and less networking knowledge ,please explain in detail Please provide any vedio tutorials links or documents which will be helpfull in this regard. Thanks in Advance, Srihari.

    Read the article

  • Networking setup for three systems

    - by srihari
    Hi, I want to setup a client server environment. I have three systems one with Solaris and the other two with windows. I want to install all the database and other software on the Server and enable the client systems a limited access to the system resources. Can anyone help me how to setup this and also the hardware requirements to setup such an environment. Your replies will be mostly appreciable and helpful to others who has similar thoughts or requirements. As we have more programmatical knowledge and less networking knowledge ,please explain in detail Please provide any vedio tutorials links or documents which will be helpfull in this regard.

    Read the article

  • Filter rule for SMS / text messages in exchange active sync (SMS sync)

    - by kynan
    Exchange server 2010 introduces SMS Sync (via exchange active sync), which works fine with my android device and the Samsung email app. However, all text messages are synced to my exchange inbox, which is a pain. I'd like to have them filtered to a specific folder. So far, I haven't figured out a useful filter rule for achieving that, since there seems to be no header indicating it's a text message. Has anyone managed to do that? Note that I'm not using Outlook as an email client, so I'm specifically looking for a server-side rule.

    Read the article

  • apache error log for rewrite rule

    - by Imran Naqvi
    Hi, i am getting following error in apache log File does not exist: D:/wamp/www/script/products, referer: http://localhost/script/products/category/product-123.html whenever following url localhost/script/products/category/product-123.html is parsed through this rewrite rule RewriteRule ^products/([~A-Za-z0-9-"]+)/([~A-Za-z0-9-".]+).html$ index.php?page_type=products&prod=$2 [L]. The script and rule is working fine but i am getting that error in apache error log. I have activated RewriteLog, but nothing is showing up in the rewrite.log file. Its empty. Please help and thanks in advance.

    Read the article

  • Three ways to upload/post/convert iMovie to YouTube

    - by user44251
    For Mac users, iMovie is probably a convenient tool for making, editing their own home movies so as to upload to YouTube for sharing with more people. However, uploading iMovie files to YouTube can't be always a smooth run, I did notice many people complaining about it. This article is delivered for guiding those who are haunted by the nightmare by providing three common ways to upload iMovie files to YouTube. YouTube and iMovie YouTube is the most popular video sharing website for users to upload, share and view videos. It empowers anyone with an Internet connection the ability to upload video clips and share them with friends, family and the world. Users are invited to leave comments, pick favourites, send messages to each other and watch videos sorted into subjects and channels. YouTube accepts videos uploaded in most container formats, including WMV (Windows Media Video), 3GP (Cell Phones), AVI (Windows), MOV (Mac), MP4 (iPod/PSP), FLV (Adobe Flash), MKV (H.264). These include video codecs such as MP4, MPEG and WMV. iMovie is a common video editing software application comes with every Mac for users to edit their own home movies. It imports video footage to the Mac using either the Firewire interface on most MiniDV format digital video cameras, the USB port, or by importing the files from a hard drive where users can edit the video clips, add titles, and add music. Since 1999, eight versions of iMovie have been released by Apple, each with its own functions and characteristic, and each of them deal with videos in a way more or less different. But the most common formats handled with iMovie if specialty discarded as far as to my research are MOV, DV, HDV, MPEG-4. Three ways for successful upload iMovie files to YouTube Solution one and solution two suitable for those who are 100 certainty with their iMovie files which are fully compatible with YouTube. For smooth uploading, you are required to get a YouTube account first. Solution 1: Directly upload iMovie to YouTube Step 1: Launch iMovie, select the project you want to upload in YouTube. Step 2: Go to the file menu, click Share, select Export Movie Step 3: Specify the output file name and directory and then type the video type and video size. Solution 2: Post iMovie to YouTube straightly Step 1: Launch iMovie, choose the project you want to post in YouTube Step 2: From the Share menu, choose YouTube Step 3: In the pop-up YouTube windows, specify the name of your YouTube account, the password, choose the Category and fill in the description and tags of the project. Tick Make this movie more private on the bottom of the window, if possible, to limit those who can view the project. Click Next, and then click Publish. iMovie will automatically export and upload the movie to YouTube. Step 4: Click Tell a Friend to email friends and your family about your film. You are also allowed to copy the URL from Tell a Friend window and paste it into an email you created in your favourite email application if you like. Anyone you send to email to will be able to follow the URL directly to your movie. Note: Videos uploaded to YouTube are limited to ten minutes in length and a file size of 2GB. Solution 3: Upload to iMovie after conversion If neither of the above mentioned method works, there is still a third way to turn to. Sometimes, your iMovie files may not be recognized by YouTube due to the versions of iMovie (settings and functions may varies among versions), video itself (video format difference because of file extension, resolution, video size and length), compatibility (videos that are completely incompatible with YouTube). In this circumstance, the best and reliable method is to convert your iMovie files to YouTube accepted files, iMovie to YouTube converter will be inevitably the ideal choice. iMovie to YouTube converter is an elaborately designed tool for convert iMovie files to YouTube workable WMV, 3GP, AVI, MOV, MP4, FLV, MKV for smooth uploading with hard-to-believe conversion speed and second to none output quality. It can also convert between almost all popular popular file formats like AVI, WMV, MPG, MOV, VOB, DV, MP4, FLV, 3GP, RM, ASF, SWF, MP3, AAC, AC3, AIFF, AMR, WAV, WMA etc so as to put on various portable devices, import to video editing software or play on vast amount video players. iMovie to YouTube converter can also served as an excellent video editing tool to meet your specific program requirements. For example, you can cut your video files to a certain length, or split your video files to smaller ones and select the proper resolution suitable for demands of YouTube by Clip or Settings separately. Crop allows you to cut off unwanted black edges from your videos. Besides, you can also have a good command of the whole process or snapshot your favourite pictures from the preview window. More can be expected if you have a try.

    Read the article

  • Cron Tips for not running cron jobs on holidays (the monday of a three day weekend)

    - by Poul
    We have about a one hundred machine set-up with each machine running cron jobs like starting and stopping services and archiving these services' log files at the end of the day to a centralized repository. One headache we have is the three-day weekend (we're closed on holidays). We don't want the services starting up on those days and connecting to our business partner's machines. We currently do this by manually commenting out the most critical jobs and letting a bunch of errors happen all day. Not ideal. Basically if a job has '1-5' set in the day field we want this to mean 'work days' and not Monday to Friday'. We have a database that keeps track of which days are indeed 'work days' So, is it possible to override Cron's day-matching algorithm, or is there some other way to easily set a cron setting to avoid things starting up on a Monday holiday? Thanks!

    Read the article

  • Only three primary partitions?

    - by ctype.h
    As everyone probably knows, Windows allows a drive to have four primary partitions, one of which may be active. However, I have only three primary partitions. I shrunk one and created a fourth partition so I could install Windows 8 on it, but Disk Management only allows it to be a logical partition. Why might this be the case? If I cannot convert it to a primary partition, is it advisable to install Windows on a logical partition? If so, is hibernation supported?

    Read the article

  • Three ways to upload/post/convert iMovie to YouTube [closed]

    - by alexyu2010
    For Mac users, iMovie is probably a convenient tool for making, editing their own home movies so as to upload to YouTube for sharing with more people. However, uploading iMovie files to YouTube can't be always a smooth run, I did notice many people complaining about it. This article is delivered for guiding those who are haunted by the nightmare by providing three common ways to upload iMovie files to YouTube. YouTube and iMovie YouTube is the most popular video sharing website for users to upload, share and view videos. It empowers anyone with an Internet connection the ability to upload video clips and share them with friends, family and the world. Users are invited to leave comments, pick favourites, send messages to each other and watch videos sorted into subjects and channels. YouTube accepts videos uploaded in most container formats, including WMV (Windows Media Video), 3GP (Cell Phones), AVI (Windows), MOV (Mac), MP4 (iPod/PSP), FLV (Adobe Flash), MKV (H.264). These include video codecs such as MP4, MPEG and WMV. iMovie is a common video editing software application comes with every Mac for users to edit their own home movies. It imports video footage to the Mac using either the Firewire interface on most MiniDV format digital video cameras, the USB port, or by importing the files from a hard drive where users can edit the video clips, add titles, and add music. Since 1999, eight versions of iMovie have been released by Apple, each with its own functions and characteristic, and each of them deal with videos in a way more or less different. But the most common formats handled with iMovie if specialty discarded as far as to my research are MOV, DV, HDV, MPEG-4. Three ways for successful upload iMovie files to YouTube Solution one and solution two suitable for those who are 100 certainty with their iMovie files which are fully compatible with YouTube. For smooth uploading, you are required to get a YouTube account first. Solution 1: Directly upload iMovie to YouTube Step 1: Launch iMovie, select the project you want to upload in YouTube. Step 2: Go to the file menu, click Share, select Export Movie Step 3: Specify the output file name and directory and then type the video type and video size. Solution 2: Post iMovie to YouTube straightly Step 1: Launch iMovie, choose the project you want to post in YouTube Step 2: From the Share menu, choose YouTube Step 3: In the pop-up YouTube windows, specify the name of your YouTube account, the password, choose the Category and fill in the description and tags of the project. Tick Make this movie more private on the bottom of the window, if possible, to limit those who can view the project. Click Next, and then click Publish. iMovie will automatically export and upload the movie to YouTube. Step 4: Click Tell a Friend to email friends and your family about your film. You are also allowed to copy the URL from Tell a Friend window and paste it into an email you created in your favourite email application if you like. Anyone you send to email to will be able to follow the URL directly to your movie. Note: Videos uploaded to YouTube are limited to ten minutes in length and a file size of 2GB. Solution 3: Upload to iMovie after conversion If neither of the above mentioned method works, there is still a third way to turn to. Sometimes, your iMovie files may not be recognized by YouTube due to the versions of iMovie (settings and functions may varies among versions), video itself (video format difference because of file extension, resolution, video size and length), compatibility (videos that are completely incompatible with YouTube). In this circumstance, the best and reliable method is to convert your iMovie files to YouTube accepted files, iMovie to YouTube converter will be inevitably the ideal choice. iMovie to YouTube converter is an elaborately designed tool for convert iMovie files to YouTube workable WMV, 3GP, AVI, MOV, MP4, FLV, MKV for smooth uploading with hard-to-believe conversion speed and second to none output quality. It can also convert between almost all popular popular file formats like AVI, WMV, MPG, MOV, VOB, DV, MP4, FLV, 3GP, RM, ASF, SWF, MP3, AAC, AC3, AIFF, AMR, WAV, WMA etc so as to put on various portable devices, import to video editing software or play on vast amount video players. iMovie to YouTube converter can also served as an excellent video editing tool to meet your specific program requirements. For example, you can cut your video files to a certain length, or split your video files to smaller ones and select the proper resolution suitable for demands of YouTube by Clip or Settings separately. Crop allows you to cut off unwanted black edges from your videos. Besides, you can also have a good command of the whole process or snapshot your favourite pictures from the preview window. More can be expected if you have a try.

    Read the article

  • Rewrite rule Mod_Proxy truncate file name [duplicate]

    - by Valerio Cicero
    This question already has an answer here: Redirect, Change URLs or Redirect HTTP to HTTPS in Apache - Everything You Ever Wanted How to Know about Mod_Rewrite Rules but Were Afraid to Ask 5 answers I search online for the solution, but nothing :(. I write this simple rule RewriteRule ^(.*)$ http://www.mysite.com/$1 [P,NE,QSA,L] In mysite.it i have an .htaccess with this rule and it's ok, but if i have a link "http://www.mysite.it/public/file name.html" the server point to "http://www.mysite.it/public/file" I try many solution but i can't solve. I try this and many shades of... RewriteRule ^(.*)(%20)(.*)$ "http://www.mysite.com/$1$3" [P,NE,QSA,L] Thanks!

    Read the article

  • How is this modsec rule getting triggered?

    - by BipedalShark
    I made a GET request to the URL, http://domain.tld/test/docs/index.php?create_table=1&step=2 and got a 403 response code. It turns out this modsec rule is getting triggered: Access denied with code 403 (phase 2). Pattern match "(?:ogg|gopher|zlib|(?:ht|f)tps?)\:/" at ARGS:gltr_redir. [file "/opt/mod_security/10_asl_rules.conf"] [line "827"] [id "340153"] [rev "22"] [msg "Generic PHP code injection protection via ARGS 3"] [severity "CRITICAL"] I would assume ARGS refers to GET/POST data, but there's no gltr_redir in the query string. And, being a GET request, there's obviously no POST data. So how is this rule being triggered?

    Read the article

  • automatic reply rule within Outlook

    - by jherlitz
    My plan is to add a automatic reply to all incoming emails for a exchange mailbox. I created a rule that would check all incoming and created the template reply. Created it so it would match a server rule so outlook would not have to be open. If I send an email from my work account on the same exchange server, it works and sends the reply I created. With outlook open or closed. However, when I send email from outside the company, (my personal email), it does not get a reply. What the heck is going on there? I think the issue is within the selection of who the email is too. I have tried "only to me" "where my name is in TO or CC" as well as "sent to people or distribution list". So any ideas of why this isn't working. I thought this question was a super user question as appose to server fault. Thank you,

    Read the article

  • Transport rule - Exchange 2010

    - by Jeff
    I have two transport rules on my exchange server. One is: > Apply rule to messages: From users that are 'outside the organization' > and when any of the recipients in the To or Cc fields is a member of > '[email protected]' Forward the messageto sender's manager > for moderation The second is: Apply rule to messages from a member of '[email protected]' and sent to users that are 'outside the organization' forward the message to the sender's manager for moderation. nointernetmail is a distribution group, and each user has the managed by set to there local manager. However these transport rules do not work, internet mail is still sent and received without issue. I have read various tutorials / articles of how to do this on sites such as msexchangeblog and even microsoft technet, however even after following the guides I am still unable to have this function properly. Any help is appreciated.

    Read the article

  • pf not execute udp port specific block rule

    - by seaquest
    The traffic I want to block can be sniffed as below with tcpdump: 19:16:22.391164 IP 95.95.95.95.2036 > 10.10.10.10.443: UDP, length 8192 So I wanted to write a rule block any udp destination port 443 traffic. block drop quick on igb3 inet proto udp to any port 443 Traffic does not match and does not blocked. However, It matches and blocks if I write rule as below: block drop quick on igb3 inet proto udp to 10.10.10.10 Do you have any remarks? I am using pf in Freebsd.

    Read the article

  • Privoxy rule to block Facebook spying

    - by bignose
    Recently, my server's Privoxy rules to block Facebook's spying have failed. How can I block current Facebook spying links? Since soon after [the inception of Facebook's so-called “Open Graph” cross-site tracking widgets][1] (those “Like” bugs on numerous websites), I blocked them by using this rule (in user.action) on our site's Privoxy server: { +block-as-image{People-tracking button.} } .facebook.com/(plugins|widgets)/(like|fan).* That worked fine; the spying bugs no longer appeared on any web page. Today I noticed that they're all making it past that filter [edit: no, they're not]. SOLUTION: The proxy was being silently ignored, though this was not obvious in the client. The above rule continues to work fine.

    Read the article

  • IIS7 Rewrite rule being duplicated across 2 different websites (unwanted)

    - by Matt
    We have a IIS7 on Windows Server 2008. It is hosting a handful of sites, on a handful of ip addresses. 2 of those sites are actually wildcards on the domain: *.firstdomain.com *.seconddomain.com However, I am finding that any URL Rewrite rules I add for one of these "websites", is automatically in the URL Rewrite section for the other. Similarly, if I disable the rule in in one, it disables in the other. This doesn't happen with the other sites defined on this server, just these two. I look at the parent (top level, the server as a whole), and the rule is not there. Any idea what's going on here?

    Read the article

  • Xorg and three button mouse: emulate more than scroll alone

    - by drumfire
    I'm happy with my three-button mouse. But it could have more functions. When I press the middle button (button 2) and move the mouse, I can scroll up/down and left/right. xev shows me that when I drag the mouse with button 2 pressed it actually emulates button 4 (scroll up), 5 (down), 6 (left) and 7 (right). But can we take this further? For example, I would like to emulate button 8 if I press button 1 and 2 together, and button 9 if i press button 2 and 3. This would allow me to have the 'back' and 'forward' functionality in my browser. It would also be nice to get more functionality by pressing, for example, shift+mouse1, alt+mouse2. You could have a whole new set of emulated keys. Can this be done and if yes, then how?

    Read the article

  • Custom Rule Sets in JohnTheRipper

    - by user854619
    I'm trying to create a custom rule set to do hash cracking. I have a SHA1 hash and a rule set that was enforced to create the password. The password must be of the form, 6-8 characters Every other letter changes case Password "shifts" characters at least one degree and at most three One odd number and one even number are at the beginning of the password One special character and one punctuation character are appended to the end of the password How can I defined a brute force attack in JohnTheRipper or similar hash cracking program? I've also attempted to write code to generate a wordlist of possible passwords, with no success. Thanks!

    Read the article

  • Packets marked INVALID in FORWARD rule

    - by Raphink
    I have a firewall that has 3 IP aliases on 1 physical interface. Packets get dropped between these 3 interfaces (either ICMP, HTTP, or anything else). We tracked it down to these packets being marked INVALID in the FORWARD rule and dropped due to the this rule: chain FORWARD { policy DROP; # connection tracking mod state state INVALID LOG log-prefix 'INVALID FORWARD DROP: '; mod state state INVALID DROP; mod state state (ESTABLISHED RELATED) ACCEPT; } (That is, we see the INVALID FORWARD DROP logs in dmesg) What could be causing this?

    Read the article

  • Is there a way to expose ports when the three default firewalls were disabled

    - by Nactus
    I think I disabled the three firewalls that come with FreeBSD (just for experimentation purposes). I checked the modules that load with the kernel (using "kldstat"). The only modules that load are: kernel -- ng_socket.ko, netgraph.ko, ng_mppc.ko and rc4.ko). I'd like to know what module is still blocking my ports now. After removing all firewall options from the rc.file and re-compiling the kernel without the pf option (or any firewall for that matter), I can't still open ports freely. How does it work exactly? Thanks.

    Read the article

  • Three disk (possibly RAID) data recovery

    - by Martin
    I have on my desk three 160 GB disks that were once part of an HP Proliant Windows 2003 Server. They may have been part of a RAID configuration of some sort. They may or may not be damaged in some way. When I interface them via USB, one of them shows up as a drive, but unformatted. The others show up as uninitialized disks in manager. An alternative explanation is that the two drives were simply not unused. What's my first step? I've recovered data off damaged drives before but never had anything to do with RAID configs. How can I even tell if any type of RAID was used?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >