Search Results

Search found 4538 results on 182 pages for 'rules'.

Page 20/182 | < Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >

  • How to select "child" entities in subview?

    - by Andy
    I am trying to manage a drill-down list of data. I've got an entity, Contact, that has a to-many relationship with another entity, Rule. In my root view controller, I use a fetched results controller to manage and display the list of Contacts. When a Contact is tapped, I push a new view controller onto the stack with a list of the Contact's Rules. I have not been able to figure out how to use a second fetched results controller to display the Rules, so I'm using the following: // create a set of the contact's rules rules = [NSMutableSet set]; rules = [self.contact mutableSetValueForKey:@"rule"]; // create an array of rules from the set arrayOfRules = [NSMutableArray arrayWithCapacity:[rules count]]; for (id oneObject in rules) [arrayOfRules addObject:oneObject]; // sort the array of rules NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:@"phoneLabel" ascending:YES]; [arrayOfRules sortUsingDescriptors:[NSArray arrayWithObject:descriptor]]; [descriptor release]; I create a set of Rules, then use that to create an array of Rules for sorting. I then use these two collections to populate the grouped table view. All of this appears to be working correctly. Here's my problem: There are several different actions a user can take in this view, and most of them require that I know which Rule was tapped. But I can't figure out how to get that. For instance, say a user wants to delete a Rule. It seems to me the proper approach is something like... [rules removeObject:ruleObjectToBeRemoved] ...but I can't figure out how to specifiy ruleObjectToBeRemoved. I hope all of this makes sense. As usual, thanks in advance for any advice you can offer.

    Read the article

  • How many rewrite rules should I expect to manage?

    - by Scott Ackerson
    I'm dealing with a hosting team that is fairly skiddish of managing many rewrite rules. What are your experiences with the number of rules your sites are currently managing? I can see dozens (if not more) coming up as the site grows and contracts and need to set expectations that this isn't out of the norm. Thanks

    Read the article

  • .htaccess rules to rewrite URLs to front end page?

    - by Dizzley
    I am adding a new application to my site at example.com/app. I want views at that URL to always open myapp.php. E.g. example.com/app -> example.com/app/myapp.php and example.com/app/ -> example.com/app/myapp.php What's the correct form of rewrite rules in the .htaccess file? I've got: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /app/ RewriteRule ^myapp\.php$ - [L] RewriteRule ^myapp.php$ - [L] RewriteRule . - [L] </IfModule> ...based on what the Wordpress front-end does. But all I see at example.com/app is a directory of files. :( (I put those rewrites at the top of my .htaccess file). Any ideas? Update What actually worked: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/app(/.*)?$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . /app/myapp.php [L] This is good because: Explicit or implicit calls to app/myapp.php work. example.com/app redirects to app/myapp.php example.com/app/ redirects to app/myapp.php example.com/app/subfunction redirects to app/myapp.php All other calls to example.com/otherstuff are untouched. Item 4 is Wordpress-like Front Controller pattern behaviour. I think that rule RewriteCond %{REQUEST_URI} ^/app.*$ [NC] needs refining as it allows /app-oh-my-goodness etc. through too. Thanks for the answers.

    Read the article

  • Do i need to restore iptable rules everytime on boot?

    - by capdragon
    Every time i reboot i loose the iptables rules that took me sooo long to enter. I know i can save them and restore them on boot but is there anyway to save them forever? Do i really need to restore them on boot every time? Seriously? The problem is I have a HUGE list of IPs in which i use a while loop to load them in. This can take upwards of 10 minutes. This is my home FTP server. It's a small vm with 1gb ram and very little processing power. There are so many IPs because I've pretty much given up on the Asian continent. I don't need them to be hitting up my ftp server everyday with brute force. I also block gov. monitors, trackers and spammers. This is the while loop i use to load in the list. grep INPUT block.list | while read LISTA; do sudo iptables -A $LISTA; done

    Read the article

  • What is an efficient algorithm for randomly assigning a pool of objects to a parent using specific rules

    - by maple_shaft
    I need some expert answers to help me determine the most efficient algorithm in this scenario. Consider the following data structures: type B { A parent; } type A { set<B> children; integer minimumChildrenAllowed; integer maximumChildrenAllowed; } I have a situation where I need to fetch all the orphan children (there could be hundreds of thousands of these) and assign them RANDOMLY to A type parents based on the following rules. At the end of the job, there should be no orphans left At the end of the job, no object A should have less children than its predesignated minimum. At the end of the job, no object A should have more children than its predesignated maximum. If we run out of A objects then we should create a new A with default values for minimum and maximum and assign remaining orphans to these objects. The distribution of children should be as evenly distributed as possible. There may already be some children assigned to A before the job starts. I was toying with how to do this but I am afraid that I would just end up looping across the parents sorted from smallest to largest, and then grab an orphan for each parent. I was wondering if there is a more efficient way to handle this?

    Read the article

  • Apache2: 400 Bad Reqeust with Rewrite Rules, nothing in error log?

    - by neezer
    This is driving me nuts. Background: I'm using the built-in Apache2 & PHP that comes with Mac OS X 10.6 I have a vhost setup as follows: NameVirtualHost *:81 <Directory "/Users/neezer/Sites/"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> <VirtualHost *:81> ServerName lobster.dev ServerAlias *.lobster.dev DocumentRoot /Users/neezer/Sites/lobster/www RewriteEngine On RewriteCond $1 !^(index\.php|resources|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L,QSA] LogLevel debug ErrorLog /private/var/log/apache2/lobster_error </VirtualHost> This is in /private/etc/apache2/users/neezer.conf. My code in the lobster project is PHP with the CodeIgniter framework. Trying to load http://lobster.dev:81/ gives me: 400 Bad Request Normally, I'd go check my logs to see what caused it, yet my logs are empty! I looked in both /private/var/log/apache2/error_log and /private/var/log/apache2/lobster_error, and neither records ANY message relating to the 400. I have LogLevel set to debug in /private/etc/apache2/http.conf. Removing the rewrite rules gets rid of the error, but these same rules work on my MAMP host. I've double-checked and rewrite_module is loaded in my default Apache installation. My http.conf can be found here: https://gist.github.com/1057091 What gives? Let me know if you need any additional info. NOTE: I do NOT want to add the rewrite rules to .htaccess in the project directory (it's checked into a git repo and I don't want to touch it).

    Read the article

  • Handy Tool for Code Cleanup: Automated Class Element Reordering

    - by Geertjan
    You're working on an application and this thought occurs to you: "Wouldn't it be cool if I could define rules specifying that all static members, initializers, and fields should always be at the top of the class? And then, whenever I wanted to, I'd start off a process that would actually do the reordering for me, moving class elements around, based on the rules I had defined, automatically, across one or more classes or packages or even complete code bases, all at the same time?" Well, here you go: That's where you can set rules for the ordering of your class members. A new hint (i.e., new in NetBeans IDE 7.3), which you need to enable yourself because by default it is disabled, let's the IDE show a hint in the Java Editor whenever there's code that isn't ordered according to the rules you defined: The first element in a file that the Java Editor identifies as not matching your rules gets a lightbulb hint shown in the left sidebar: Then, when you click the lightbulb, automatically the file is reordered according to your defined rules. However, it's not much fun going through each file individually to fix class elements as shown above. For that reason, you can go to "Refactor | Inspect and Transform". There, in the "Inspect and Transform" dialog, you can choose the hint shown above and then specify that you'd like it to be applied to a scope of your choice, which could be a file, a package, a project, combinations of these, or all of the open projects, as shown below: Then, when Inspect is clicked, the Refactoring window shows all the members that are ordered in ways that don't conform to your rules: Click "Do Refactoring" above and, in one fell swoop, all the class elements within the selected scope are ordered according to your rules.

    Read the article

  • Architecture Question

    - by katie77
    I am writing a rules/eligibility Module. I have 2 sets of data, one is the customer data and the other is the customer products data. Customer data to Customer products data is one to many. Now I have to go through a set of Eligibility rules for each of this Customer product data. For each customer products data, I can say the customer is eligible for that product or decline the eligibility and should move on to the next product record. So in all the rules, I need to have access to customer and customer product data(the particular record that the rules are being executed against). Since all the rules can either approve a product or decline a product, I created an interface with those 2 methods and is implementing the this interface for all the rules. I am passing the Customer data and one product data for all the rules (because rules should be executed on each row of customer product data). An Ideal situation would be having the customer and customer product data available for the rule instead of passing them to each rule. What is the best way of doing this in-terms of architecture?

    Read the article

  • Limiting DOPs &ndash; Who rules over whom?

    - by jean-pierre.dijcks
    I've gotten a couple of questions from Dan Morgan and figured I start to answer them in this way. While Dan is running on a big system he is running with Database Resource Manager and he is trying to make sure the system doesn't go crazy (remember end user are never, ever crazy!) on very high DOPs. Q: How do I control statements with very high DOPs driven from user hints in queries? A: The best way to do this is to work with DBRM and impose limits on consumer groups. The Max DOP setting you can set in DBRM allows you to overwrite the hint. Now let's go into some more detail here. Assume my object (and for simplicity we assume there is a single object - and do remember that we always pick the highest DOP when in doubt and when conflicting DOPs are available in a query) has PARALLEL 64 as its setting. Assume that the query that selects something cool from that table lives in a consumer group with a max DOP of 32. Assume no goofy things (like running out of parallel_max_servers) are happening. A query selecting from this table will run at DOP 32 because DBRM caps the DOP. As of 11.2.0.1 we also use the DBRM cap to create the original plan (at compile time) and not just enforce the cap at runtime. Now, my user is smart and writes a query with a parallel hint requesting DOP 128. This query is still capped by DBRM and DBRM overrules the hint in the statement. The statement, despite the hint, runs at DOP 32. Note that in the hinted scenario we do compile the statement with DOP 128 (the optimizer obeys the hint). This is another reason to use table decoration rather than hints. Q: What happens if I set parallel_max_servers higher than processes (e.g. the max number of processes allowed to run on my machine)? A: Processes rules. It is important to understand that processes are fixed at startup time. If you increase parallel_max_servers above the number of processes in the processes parameter you should get a warning in the alert log stating it can not take effect. As a follow up, a hinted query requesting more parallel processes than either parallel_max_servers or processes will not be able to acquire the requested number. Parallel_max_processes will prevent this. And since parallel_max_servers should be lower than max processes you can never go over either...

    Read the article

  • Is it possible to redirect/bounce TCP traffic to external destination, base on rules?

    - by xfx
    I'm not even sure if this is possible... Also, please forgive my ignorance on the subject. What I'm looking for is for "something" that would allow me to redirect all TCP traffic arriving to host A to host B, but based on some rules. Say host A (the intermediary) receives a request (say a simple HTTP request) from a host with domain X. In that case, it lets it pass through and it's handled by host A itself. Now, let's suppose that host A receives another HTTP request from a host with domain Y, but this time, due to some customizable rules, host A redirects all the traffic to host B, and host B is able to handle it as if came directly from domain Y. And, at this point, both host B and the host with domain Y are able to freely communicate (of course, thought host A). NOTE: All these hosts are on the Internet, not inside a LAN. Please, let me know if the explanation is not clear enough.

    Read the article

  • How to exclude one subfolder from my RewriteRule Htaccess rules?

    - by tomaszs
    I have a .htaccess in my root of website that looks like this: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.mydomain\.pl [NC] RewriteCond %{HTTP_HOST} ^(?:www\.)?([a-z0-9_-]+)\.mydomain\.pl [NC] RewriteRule ^/?$ /index.php?run=places/%1 [L,QSA] RewriteCond %{REQUEST_URI} !^/index.php$ RewriteCond %{REQUEST_URI} !^/images/ RewriteCond %{REQUEST_URI} !^/upload/ RewriteCond %{REQUEST_URI} !^/javascript/ RewriteRule ^(.*)$ /index.php?runit=$1 [L,QSA] I've installed custom guest book in folder guests and now I would like to disable rules above for this one specific folder. So that when I type: mydomain.pl/guests I would like to go normally to actual folder guests. I understand that I need to somehow disable rules above for guests subfolder, but how do I do this?

    Read the article

  • Is there a way to disable specific Spybot Immunization rules?

    - by Iszi
    I've been having problems using a desktop sharing application, which I've traced to the Immunization protections applied via Spybot S&D. Specifically, the problem has been narrowed down to the rules in the \SOFTWARE (Plugins) categories under the Internet Explorer groups. Once I disable these Immunization categories, everything in the application works fine. Each of these categories appears to include ~900 protections on the system. I suspect that the root cause of my problems could be narrowed down to just one, or perhaps a handful, of the settings that get applied in these categories. However, I can't find any options in Spybot S&D which would allow me to drill down to the individual protection rules and choose which to enable or disable. Is there something I'm missing, or is this not a feature available via the GUI? If it's not strictly supported in the application, is there a way to work around it by manually editing some of its files or registry settings? Spybot S&D version: 2.2.21.0 Spybot Start Center version: 2.2.21.129 Windows Ultimate x64

    Read the article

  • How to apply Outlook Junk Mail rules using Hotmail Connector?

    - by Bobb
    I use Outlook 2010 with Hotmail connector. MS says that you can sync your Outlook rules with your Hotmail but I cant see how. My actual problem is - I add a guy to my Junk blocked senders list (and I check it visually - it is in the list). But I keep receiving emails from this guy. It doesnt go to the Junk folder in Outlook. I need my Outlook to honor the rules locally at least. Is it possible?

    Read the article

  • How can I set deadline as the I/O scheduler for USB Flash devices by using udev rules?

    - by ????
    I have set CFQ as the default I/O scheduler. I often get bad performance when I write data into a Flash device. This is resolved if I use deadline as the I/O scheduler for USB Flash devices. I can't always change the scheduler manually, right? I think writing udev rules is a good idea. Can someone please write rules for me? I want: When I plug in a USB device, detect the type of the device. If it is a portable USB hard disk, do nothing (I think if a device has more than one partitions, it always a portable hard disk. If it is a USB Flash device, set deadline as it's scheduler.

    Read the article

  • What kind of proxy acl rules should be applied?

    - by user42891
    I try to block sites in squid based on this article. Assuming you would want to block access to Yahoo (e.g http://www.yahoo.co.jp, http://www.yahoo.com, http://www.yahoo.co.in), you would ideally want to block all of the above URLs, if I use a regular expression and try to search something called yahoo it seems to get blocked. We are just interested in applying rules which would be most commonly used across all companies (e.g. social networking sites like facebook, orkut), porn sites (e.g. sex), gaming sites (games), movie & song download sites, and sites where they can upload data (e.g. rapidshare) What would be the common set of effective rules in achieving the above?

    Read the article

  • Why can't email clients create rules for moving dates like "yesterday"?

    - by Morgan
    I've never seen an email client that I could easily create a rule to do something like "Move messages from yesterday to a folder?" Is there some esoteric reason why this would be difficult? I know I can easily create rules around specific dates, but that isn't the same thing by a long shot; am I missing something? In Outlook 2010 I can create search folders that do sort of this type of thing, but you can't create rules around a search folder... seems like either I am missing something major, or this is terribly short-sided.

    Read the article

  • Why are Rules not applied to additional mailboxes when using Outlook 2007 and Exchange?

    - by Clean
    Hi, I've set up a few rules in Microsoft Outlook 2007. Outlook 2007 is configured to use my Microsoft Exchange account. In the Microsoft Exchange settings, I've set up two additional mailboxes, Inbox1 and Inbox2. Thus, using Microsoft Exchange I now have three mailboxes: Inbox, Inbox1 and Inbox2. The rules I've set up all work fine for mails arriving in the Inbox. However, they do not work at all for mails arriving in either Inbox1 or Inbox2. Do anyone perhaps know why this is, and perhaps what I could to to solve this? Thanx in advance!

    Read the article

  • Is it possible to redirect/bounce TCP traffic to an external destination, based on rules?

    - by xfx
    I'm not even sure if this is possible... Also, please forgive my ignorance on the subject. What I'm looking for is for "something" that would allow me to redirect all TCP traffic arriving to host A to host B, but based on some rules. Say host A (the intermediary) receives a request (say a simple HTTP request) from a host with domain X. In that case, it lets it pass through and it's handled by host A itself. Now, let's suppose that host A receives another HTTP request from a host with domain Y, but this time, due to some customizable rules, host A redirects all the traffic to host B, and host B is able to handle it as if came directly from domain Y. And, at this point, both host B and the host with domain Y are able to freely communicate (of course, thought host A). NOTE: All these hosts are on the Internet, not inside a LAN. Please, let me know if the explanation is not clear enough.

    Read the article

  • Improving CSS With .LESS

    Cascading Style Sheets, or CSS, is a syntax used to describe the look and feel of the elements in a web page. CSS allows a web developer to separate the document content - the HTML, text, and images - from the presentation of that content. Such separation makes the markup in a page easier to read, understand, and update; it can result in reduced bandwidth as the style information can be specified in a separate file and cached by the browser; and makes site-wide changes easier to apply. For a great example of the flexibility and power of CSS, check out CSS Zen Garden. This website has a single page with fixed markup, but allows web developers from around the world to submit CSS rules to define alternate presentation information. Unfortunately, certain aspects of CSS's syntax leave a bit to be desired. Many style sheets include repeated styling information because CSS does not allow the use of variables. Such repetition makes the resulting style sheet lengthier and harder to read; it results in more rules that need to be changed when the website is redesigned to use a new primary color. Specifying inherited CSS rules, such as indicating that a elements (i.e., hyperlinks) in h1 elements should not be underlined, requires creating a single selector name, like h1 a. Ideally, CSS would allow for nested rules, enabling you to define the a rules directly within the h1 rules. .LESS is a free, open-source port of Ruby's LESS library. LESS (and .LESS, by extension) is a parser that allows web developers to create style sheets using new and improved language features, including variables, operations, mixins, and nested rules. Behind the scenes, .LESS converts the enhanced CSS rules into standard CSS rules. This conversion can happen automatically and on-demand through the use of an HTTP Handler, or done manually as part of the build process. Moreover, .LESS can be configured to automatically minify the resulting CSS, saving bandwidth and making the end user's experience a snappier one. This article shows how to get started using .LESS in your ASP.NET websites. Read on to learn more! Read More >

    Read the article

  • Improving CSS With .LESS

    Cascading Style Sheets, or CSS, is a syntax used to describe the look and feel of the elements in a web page. CSS allows a web developer to separate the document content - the HTML, text, and images - from the presentation of that content. Such separation makes the markup in a page easier to read, understand, and update; it can result in reduced bandwidth as the style information can be specified in a separate file and cached by the browser; and makes site-wide changes easier to apply. For a great example of the flexibility and power of CSS, check out CSS Zen Garden. This website has a single page with fixed markup, but allows web developers from around the world to submit CSS rules to define alternate presentation information. Unfortunately, certain aspects of CSS's syntax leave a bit to be desired. Many style sheets include repeated styling information because CSS does not allow the use of variables. Such repetition makes the resulting style sheet lengthier and harder to read; it results in more rules that need to be changed when the website is redesigned to use a new primary color. Specifying inherited CSS rules, such as indicating that a elements (i.e., hyperlinks) in h1 elements should not be underlined, requires creating a single selector name, like h1 a. Ideally, CSS would allow for nested rules, enabling you to define the a rules directly within the h1 rules. .LESS is a free, open-source port of Ruby's LESS library. LESS (and .LESS, by extension) is a parser that allows web developers to create style sheets using new and improved language features, including variables, operations, mixins, and nested rules. Behind the scenes, .LESS converts the enhanced CSS rules into standard CSS rules. This conversion can happen automatically and on-demand through the use of an HTTP Handler, or done manually as part of the build process. Moreover, .LESS can be configured to automatically minify the resulting CSS, saving bandwidth and making the end user's experience a snappier one. This article shows how to get started using .LESS in your ASP.NET websites. Read on to learn more! Read More >

    Read the article

  • How many rewrite rules should I expect to manage?

    - by Scott Ackerson
    I'm dealing with a hosting team that is fairly skiddish of managing many rewrite rules. What are your experiences with the number of rules your sites are currently managing? I can see dozens (if not more) coming up as the site grows and contracts and need to set expectations that this isn't out of the norm. Thanks

    Read the article

  • How to handle business rules with a REST API?

    - by Ciprio
    I have a REST API to manage a booking system I'm searching how to manage this situation : A customer can book a time slot : A TimeSlot resource is created and linked to a Person resource. In order to create the link between a time lot and a person, the REST client send a POST request on the TimeSlot resource But if too many people booked the same slot (let's say the limit is 5 links), it must be impossible to create more associations. How can I handle this business restriction ? Can I return a 404 status code with a JSON response detailing the error with a status code ? Is it a RESTFul approach ? EDIT : Like suggested below I used status 409 Conflict in addition to a JSON response detailing the error

    Read the article

< Previous Page | 16 17 18 19 20 21 22 23 24 25 26 27  | Next Page >