Search Results

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

Page 48/484 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • Performance impact of rewrite conditions?

    - by makeee
    My web framework (cakephp) uses the following rewrite conditions and rule: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] I serve up a lot of image files (~10 a second). I'm wondering if it would improve performance to have a rewrite rule that exempted requests for files in my images directory from even trying those rewrite conditions (checking whether the file exists). My traffic is constantly fluctuating, so this would be hard to benchmark, which is why I thought I'd ask here. If that would be beneficial, how might I exclude files in "/images" directory from trying those conditions and rewrite rule?

    Read the article

  • python decorator to add function to list in current scope

    - by AlexH
    Goal: Make a decorator which can modify the scope that it is used in. If it worked: class Blah(): # or perhaps class Blah(ParentClassWhichMakesThisPossible) def one(self): pass @decorated def two(self): pass Blah.decorated ["two"] Why? I essentially want to write classes which can maintain specific dictionaries of methods, so that I can retrieve lists of available methods of different types on a per class basis. errr..... I want to do this: class RuleClass(ParentClass): @rule def blah(self): pass @rule def kapow(self): pass def shazam(self): class OtherRuleClass(ParentClass): @rule def foo(self): pass def bar(self): pass RuleClass.rules.keys() ["blah", "kapow"] OtherRuleClass.rules.keys() ["foo"]

    Read the article

  • IIS url rewrite rewriting all .asp to .html

    - by user335711
    I need to create rules for web.config that will rewrite all requests for files with extension .html to .asp and redirect all .asp requests to .html Example: file_xyz.asp rewrites to file_xyz.html directory1/file_xyz.asp rewrites to directory1/file_xyz.html and file_xyz.html redirects to file_xyz.asp directory1/file_xyz.html redirects to directory1/file_xyz.asp What is the syntax for the rule Is this too broad a rule? If I should need for what ever reason to have a physical file such as file_abc.html how do I exclude it from the redirect rule? I am thinking I should just use ISAPI_Rewrite http://www.isapirewrite.com/ there seems to be a ton of resources out there for rewriting with htaccess and very little online help for using IIS 7 URL rewrite. Any thoughts and/or advice Thanks in advance

    Read the article

  • Log information inside a JUnit Suite

    - by Alex Marinescu
    I'm currently trying to write inside a log file the total number of failed tests from a JUnite Suite. My testsuite is defined as follows: @RunWith(Suite.class) @SuiteClasses({Class1.class, Class2.class etc.}) public class SimpleTestSuite {} I tried to define a rule which would increase the total number of errors when a test fails, but apparently my rule is never called. @Rule public MethodRule logWatchRule = new TestWatchman() { public void failed(Throwable e, FrameworkMethod method) { errors += 1; } public void succeeded(FrameworkMethod method) { } }; Any ideas on what I should to do to achieve this behaviour?

    Read the article

  • Create fake subdirectories with htaccess and php AND keep existing directories as is.

    - by Arseni
    I have a website, which has numerous subdirectories already. (All existing in server's filesystem) I want to create new "virtual" sub-dirs with htaccess, but I only want the htaccess rule work for directories, listed in DB, and not existing in filesystem. i.e. File system has: /dir1/ & /dir2/ MySQL database has record for 'dir3' & 'dir4' And I want: A: mysite.com/dir1/ and mysite.com/dir2/ display existing old content B: mysite.com/dir3/ and mysite.com/dir4/ display content from MySQL provided by PHP sctipt via redirect like: mysite.com/myscript.php?dir=dir3 C: mysite.com/dir5/ display 404 error (Dir does not exist in DB nor in Database) Basically I want .htaccess to work like this: IF DIR Exists in DB - apply the rewrite rule and show content from myscript.php?dir=DIR ELSE don't apply any rule. I can create a separate php script, which can return 0/1 when given dir name exist in DB or not, but how do I make mod_rewrite get the data from that script? Is it possible with htaccess/PHP at all?

    Read the article

  • RewriteRule - Doesn't work on live site - subfolder to new domain

    - by eb_Dev
    I have the following rule on my local dev site and it works fine: RewriteCond %{HTTP_HOST} ^localhost$ RewriteRule ^subdomains/example.com(.*) http://www.example.com$1 [R=301,L] However when I change it to: RewriteCond %{HTTP_HOST} ^www.domain.com$ RewriteRule ^subdomains/example.com(.*) http://www.example.com$1 [R=301,L] and upload it to my live site it doesn't work, if i change the rule to: RewriteCond %{HTTP_HOST} ^www.domain.com$ RewriteRule ^subdomains/(.*) http://www.example.com$1 [R=301,L] the rule functions as expected and directs an url beginning with www.domain.com/subdomains/ to www.example.com/. Does anyone know what is going on here? Thanks for you help.

    Read the article

  • Sapi How to get text inside elements?

    - by code_wizard
    My sapi grammar file looks like <RULE NAME="SOUNDLOG" TOPLEVEL="ACTIVE"> <O> Please </O> <O> Enter</O> <P> Name </P> <P> <RULEREF REFID="VID_InputType" /> </P> </RULE> <RULE ID="VID_InputType"> <L PROPID="VID_InputType"> <P >John</P> <P>Jill</P> <P>Gary</P> </L> How do I get the name when it is recognized by sapi recognizer?

    Read the article

  • c++ polymorphism and other function question

    - by aharont
    i have got this code: class father{ public: virtual void f() { cout<<1;} }; class son:public father{ public: void f() {cout<<2;} }; void test (father x){x.f();} int main(){ son s; test(s); } the question says: the output is '1', what is the rule about polymorphism that the programmer forgot and how can i fix it so the output would be '2'? there is another rule that the programmer forgot when he wrote the father class, and he need to add an empty function to avoid problems from other sons of the father class. what is the rule and what is the missing function? another question write the g function so the next code would run with no crashes int x=11; g(x)=22;

    Read the article

  • Validation file upload CakePHP

    - by kicaj
    How validate file upload in CakePHP? When i wrote some like this:var $validate = array( 'file' => array( 'select' => array( 'rule' => array('selectFile', false), 'message' => 'There is no file!'), 'type' => array( 'rule' => array('typeFile'), 'message' => 'Bad type!'), 'size' => array( 'rule' => array('sizeFile'), 'message' => 'Bad with size!'))); Works only with the last validate, here 'size'. Maybe You know solution, for validation for files with many messages?

    Read the article

  • modrewrite to another server if file/image is not found

    - by Traveling_Monk
    Hi I am working on a locally served copy of a remote site and I don't want to have to download all the images rtelated to the site so I thought i could come up with a mod_rewrite rule for to grab images from the remote server if the are not found this is the code that i have <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f [NC] RewriteRule ^/(.*\.(png|gif|jpg|jpeg)) https://www.exmple.com/$1 [NC,P,L] </IfModule> The page is still giving me 404's for images that are on the remote server, so this rule is not working. I do know that the htaccess is being processed because rules later in the IfModule mod_rewrite.c block are being used. (i simplified my code sample but this is the first rule in the IfModule mod_rewrite.c block)

    Read the article

  • Url Rewriting with Querystrings

    - by Alon
    In IIS 7.5, I'm trying to rewrite a Url such as /about to /content.asp?p=about, with support for QueryString-s, so if the orginal Url was /about?x=y, it should rewrite to /content.asp?p=about&x=y. The basic rewriting is now working, but when I'm trying to add a QueryString it doesn't work. Tried both /about?x=y and /about&x=y. My current rule: <rule name="RewriteUserFriendlyURL1" stopProcessing="false"> <match url="^([^/]+)/?$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="content.asp?p={R:1}" /> </rule> How can I fix this? Thank you.

    Read the article

  • Can I delete EFI System Partition without harming other data on drive?

    - by Andy
    I have three external HDD's in a USB enclosure. After a recent upgrade to Win7, during which these three drives were actually installed inside the PC tower, two of the three drives now have a 200MB EFI partition, and the two drives do not show up as usable drives under either Win7 or Snow Leopard. One of the drives is empty; the other one, however, has a bunch of stuff on it that I want to save if possible. My question is, how can I get back to this data? Can I simply delete the EFI partition, and all will be well? Or do I have to do something trickier? Or am I just hosed?

    Read the article

  • Can I config different VIP per service pointing same Real servers with Cisco ACE?

    - by Kamome
    I'm using Cisco ACE Module with Cisco Catalyst 6504. There are 2 real servers connected to Switch, and runs three different services. (TCP 82, 83 and 84) I have to use three different URLs per service. (for example, a.com for TCP 82, b.com for TCP 83 and c.com for TCP 84) Therefore, I need three IPs. The problem is, is it possible that configure 3 different VIPs with same real servers with Cisco ACE Module? I mean, if VIPs are 1.1.1.1, 2.2.2.2, 3.3.3.3 and real servers are 4.4.4.4, 5.5.5.5, can I configure as following : VIP 1.1.1.1:82 Real Server 4.4.4.4:82, 5.5.5.5:82 VIP 2.2.2.2:83 Real Server 4.4.4.4:83, 5.5.5.5:83 VIP 3.3.3.3:84 Real Server 4.4.4.4:84, 5.5.5.5:84 I think, logically, it's possible. But is it REALLy possible?

    Read the article

  • Finding trends in multi-category data in Excel

    - by Miral
    I have an Excel spreadsheet that contains hundreds of rows of data that each represent a single sample in a larger population. Each row is divided into three columns that contain frequency counts of a specific type of thing. Together the three columns summed on a single row represent 100%, though each row will sum to a different value. What I'm most interested in are the proportions of each of these types (ie. percentages of each column relative to the sum of the three columns). I can easily calculate this on a per-row basis, but what I'm really interested in is trying to find an overall trend from the entire population. I don't really spend much time doing data analysis so the only thing I can think of trying is to create those percentage columns and then average them, but I'm sure there must be a better way to visualise this.

    Read the article

  • Sizing a Virtual Server

    - by vdubs
    I would like to replace four aging physical servers with one virtual server. What is the best way to insure the VM server is sized correctly? The requirements of the apps that will be running on the four servers are APPLICATION SERVERS - QTY 3 - These will run the application layer for the web server, Business Objects Business Intelligence app, and various other small client server apps. The three most heavy hitting apps each have the following server requirements. So, if I bought three physical servers, this would be the requirements for each of them Processor - Dual 2.83 GHZ (or faster) Ram - 4 GB Raid 5 - 50-100GB usable space NIC - 1 GB Web Server - this will run one asp.net e-business app that will talk to our dedicated SQL server and the three app servers above. The E-Business software has these requirements for the web server Processor - Quad 2.83 GHZ (or faster) Ram - 8 GB Raid 5 - 50-100GB usable space NIC - 1 GB What is the best tool to determine what I need from a hardware standpoing in a virtual server? I am planning on using VMWare.

    Read the article

  • Maybe I'm infected?

    - by aiacet
    In the last two weeks, when I was using MPC-HC (Media Player Classic Home Cinema) to watch some "justyfied" episodes, my F-Secure Client Security antivirus software alerted me that there was a threat in file A0027132.exe (the number increased each of the three times that the antivirus found a new threat). All these three threats are now quarantined and the files are: 1) C:/System Volume Information/_restore/{72AACB12-6526-40F2-81D7-69DF5809DD8A}\A0027132.exe 2) D:/System Volume Information/_restore/{72AACB12-6526-40F2-81D7-69DF5809DD8A}\A0027133.exe 3) D:/System Volume Information/_restore/{72AACB12-6526-40F2-81D7-69DF5809DD8A}\A0027134.exe The three threats are recognized like: 1. Backdoor.Generic.360086 2. Trojan.Packed.8707 3. Trojan.Packed.8807 F-secure and the OS are both updated at the last release/virus definition.

    Read the article

  • Assigning resources to MS Project 2007

    - by adam
    Hi, I'm planning a redesign of a site in Project 2007. I have three developers to hand, all with the same skills. There are about 80 templates to be rendered as part of the redesign, and each template has been added as a project task. Each of these tasks can be done by any of the 3 devs, and each will take a day (with a few exceptions). There is no order in which the tasks must be completed, so there are no predecessor rules. I'd like to be able to assign tasks to a 'Developer' resource group, and for Project to see that three tasks can be done at once (as the group has three resources members) and queue the tasks as such. Googling leads me to Team Assignment, but that appears to be part of Project Server. Surely I can do this in standalone Project? Thanks, Adam

    Read the article

  • Sun Java keytool importing EV certificates into a single keystore

    - by ss0
    At my current job we are using tomcat, customers have custom web portals setup on their own local machines. EV certs are new to me, they have 2 part intermediary and a primary certificate. For our product to work it appears I need to get all three parts installed under a single keystore entry. How can I roll all three parts into a single x.509 compliant file for import? They syntax I am using is as follows: /blah/system/j2sdk/bin/keytool -import -alias foo -keystore /zix/system/jdk1.5.0_06/jre/lib/security/cacerts -file certname.pem -trustcacerts where foo = the keystore name and certname.pem is the main cert. I have tried importing the intermediate certs under their own names into the keystore and I don't know if it's just the product I have to work with (not vanilla tomcat) or what but it doesn't see those. I have seen a working system and all three certs were under the single keystore alias. Anyone have any ideas?

    Read the article

  • ATI Radeon Triple Monitor Setup

    - by Zak
    I have a Dell XPS 8300, and its got an ATI Radeon HD6450 installed. When running Ubuntu 12.04 the triple monitors work flawlessly. I can change the default, turn them on/off etc ... The problem is Windows 7. It is behaving much like in this thread. I know the card supports three, as it WORKS PERFECTLY in the linux portion of my dual boot. Windows can "see" all three, but will only allow two. Is this a WIndows 7 / ATI compatibility issue, or is Windows 7 just stupid (rhetorical)? Had I not had a dual boot Linux box, I might have read the above thread and thought "damn, it just won't work". But I use three monitors every day on this card, so I know it works.... Just not with Windows.

    Read the article

  • CentOS VM, NTP synchronization problems

    - by Spirit
    We have three CentOS 5.9 VMs on an ESX3.5 host. Because of the nature of the services we provide it is required that the NTP time is synchronized and the time is correct on all three of them. However one of them constantly drifts back each day for about 66 sec. So far none of us seems to understand as why is this happening. We included the possibility that the VM may be somehow pulling the time from the host, however all of the three VMs have identical configuration settings and they did not have VMware tools installed. Although I realize that this is probably a question of an internal matter and not to ask for on a forum, I would appreciate if anyone of you knows some CentOS NTP diagnostic routines that will help me to diagnose the problem and find a reliable solution. I thank you for the assistance.

    Read the article

  • How do I network this Windows Failover Cluster and MongoDB Replica Set? (diagram inside)

    - by arex1337
    As you can see, my two Windows Server Failover Cluster (WSFC) nodes have three network interfaces each, which connects them to three different networks : A public network A private network consisting of the WSFC nodes A private network consisting of the WSFC nodes and a machine with the WSFC Quorum Witness File Share Does this network configuration I've planned, make sense? Do I have the "right" number of NICs and networks? I'm thinking the 2nd NIC/network may be unnecessary. My two MongoDB Replica Set nodes also have three network interfaces each - very similar to the previous situation: A public network A private network consisting of the primary and secondary MongoDB Replica Set nodes A private network consisting of the primary, secondary and arbiter MongoDB Replica Set nodes Does this network configuration, make sense? Do I have the "right" number of NICs and networks? I'm thinking the 2nd NIC/network may be unnecessary. Here is the simpler version I'm considering: UPDATE:

    Read the article

  • Servers at remote sites vs. centralized servers?

    - by Boden
    Looking for some opinions here. We've got three physical locations and site-to-site VPN between all three. Currently we've got Windows domain controllers at each location, with roughly 50 clients at each. The domains are currently separate, and we're looking at integrating the three sites. Email (Exchange) will be located at the primary site, and RPD is already being used at the secondary branches to hit the app servers also located at the primary site. The bulk of the local user load at the other two sites is just file sharing. What would the main benefits and drawbacks be of replacing the local domain controllers with NAS devices, and only keeping the domain controller(s) at the primary site? (assuming upgrades are coming regardless) Under what circumstances would you choose one setup over the other?

    Read the article

  • Start a ZFS RAIDZ zpool with two discs then add a third?

    - by Doug S.
    Let's say I have two 2TB HDDs and I want to start my first ZFS zpool. Is it possible to create a RAIDZ with just those two discs, giving me 2TB of usable storage (if I understand it right) and then later add another 2TB HDD bringing the total to 4TB of usable storage. Am I correct or does there need to be three HDDs to start with? The reason I ask is I already have one 2TB drive I'm using that's full of files. I want to transition to a zpool but I'd rather only buy two more 2TB drives if I can. From what I understand, RAIDZ behaves similarly to RAID5 (with some major differences, I know, but in terms of capacity). However, RAID5 requires 3+ drives. I was wondering if RAIDZ has the same requirement. If I have to, I can buy the three drives and just start there, later adding the fourth, but if I could start with two and move to three that would save me $80.

    Read the article

  • Command to determine whether ZooKeeper Server is Leader or Follower

    - by utrecht
    Introduction A ZooKeeper Quorum consisting of three ZooKeeper servers has been created. The zoo.cfg located on all three ZooKeeper servers looks as follows: maxClientCnxns=50 # The number of milliseconds of each tick tickTime=2000 # The number of ticks that the initial # synchronization phase can take initLimit=10 # The number of ticks that can pass between # sending a request and getting an acknowledgement syncLimit=5 # the directory where the snapshot is stored. dataDir=/var/lib/zookeeper # the port at which the clients will connect clientPort=2181 server.1=ip1:2888:3888 server.2=ip2:2888:3888 server.3=ip3:2888:3888 It is clear that one of the three ZooKeeper servers will become the Leader and the others Followers. If the Leader ZooKeeper server has been shutdown the Leader election will start again. The aim is to check if another ZooKeeper server will become the Leader if the Leader server has been shut down. Question Which command needs to be issued to check whether a ZooKeeper server is a Leader or a Follower?

    Read the article

  • Can Remote Desktop connect only 2 monitors when the client has 3 or 4 monitors connected?

    - by user12931
    I have three monitors (all 1920x1200) connected to my desktop and I would like to RDP into another computer (running Windows Server 2003) and use only two of my three monitors. The main monitor is used for notification from the LAN like email, build status, etc. I've tried modifying the .rdp file to have a higher resolution (i.e. 3840x1200 ) which sort of works but the bits per pixel goes down to 8 and you have to manually resize the window which means that you need to change it to around 3840x1150. If I supply /span to the commandline it gives me a bit more than 3840 spanned across the three monitors (is there perhaps a limitation of say 4096 for the maximum resolution?). WORKAROUND: Connect twice to the same computer. Here's an interesting post from Microsoft: http://blogs.msdn.com/b/rds/archive/2009/08/21/remote-desktop-connection-7-for-windows-7-windows-xp-windows-vista.aspx

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >