Search Results

Search found 1117 results on 45 pages for 'conditional'.

Page 6/45 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • Conditional formatting with date and time

    - by Kiran
    I have a problem on conditional formatting with date and time. I hava a cell A1 that has date and time and I want to conditionally format its adjecent cell if the value of cell A1 is greater than 3 days compared to today, then cell A2 should show as "Follow-up Required" and cell colour should turn red no. if cell value of A1 is less than 3 days compared to today, no action is required. Please help. Regards, Kiran

    Read the article

  • Conditionally format row based on cell value in Excel 2011 Mac

    - by kojiro
    I'm using Excel Mac 2011. I have read some of the other answers, but this question is different because I want to apply conditional formatting to an entire row when its cell in column B contains the value 'Y'. Simple conditional formatting just formats that one cell. Whenever the field at column B for any given row contains the value 'Y', I'd like to format that row. Using Mac Excel's so-called "classic" conditional formatting, I have this: I would really like to apply that to every row, but it just paints the entire sheet red (because $B$3 contains "Y"). I can't seem to figure out how to get the reference to whatever is in field B for this row in the rule.

    Read the article

  • Excel: Make conditional formatting static

    - by Martin
    Is there any way to convert conditional formatting to static formatting in Excel? I'm trying to export a range of a Excel Sheet to a new Workbook, with identical appearance but no formulas, links, etc. The problem here is that I have conditional formatting that relies on calculations outside exported range. I've tried saving the workbook to .html, oddly enough the formatting shows in IE but not when reopening it in Excel.

    Read the article

  • Other ternary operators besides ternary conditional (?:)

    - by Malcolm
    The "ternary operator" expression is now almost equivalent to the ternary conditional operator: condition ? trueExpression : falseExpression; However, "ternary operator" only means that it takes three arguments. I'm just curious, are there any languages with any other built-in ternary operators besides conditional operator and which ones?

    Read the article

  • PHP: parse URL for matching directory /somedirectory/ and execute conditional code

    - by Scott B
    This has to be pretty simple, but I'd like to parse the current URL and execute conditional code depending on whether the user is on the /sitemap/ directory. So for example, if the site is example.com, and if the request is example.com/sitemap/. Then I want to execute conditional code in that case. I'm using wordpress so I'm not sure if there is a built-in function that gets this... A pure PHP solution is fine.

    Read the article

  • Doubt in Conditional inclusion

    - by Philando Gullible
    This is actually extracted from my module (Pre-processor in C) The conditional expression could contain any C operator except for the assignment operators,increment, and decrement operators. I am not sure if I am getting this statement or not since I tried using this and it worked.Also for other manipulation a probable work around would be to simply declare macro or function inside the conditional expression,something like this to be precise. Also I don't understand what is the rationale behind this rule. Could somebody explain? Thanks

    Read the article

  • Returning row values based on conditional formatting variables

    - by Mike Bodes
    I'm not entirely sure how to properly explain this, but here we go... I'm trying to create a single budgeting document that allows me to manage purchasing and reconciliation for multiple projects. I would like to create separate sheets per project and have purchased items populate on a master sheet. Using conditional formatting, I've set one of the columns to display an item's status (waiting for approval, approved, ordered, received). I would like the contents of an entire row to populate in a new sheet table once the status is set to "Received." The sheet should update descendingly. I can't attach an image because I don't have a 10 reputation.. Any help is greatly appreciated.

    Read the article

  • Website visitors are still being redirected after "fixing" the damage from a conditional redirect website attack

    - by Shannon
    BACKGROUND A website of mine was recently the target of a conditional redirect attack. PHP code was added to my pages to redirect visitors. The .htaccess file was edited to redirect visitors. I've re-uploaded my website so the compromised PHP and .htaccess code have both been removed. My site is mostly handwritten php and static HTML content. I don't use page comments or any third party libraries. THE PROBLEM After removing the compromised php and htaccess files, visitors are still being re-directed. What could be the reason that visitors are still being redirected? Are there any tools to check where/how redirects are taking place so I can debug the problem? UPDATE - PROBLEM FIXED As suggested in the comments, I cleared my Firefox cache and that fixed the problem (for me anyway). Visitors with old cache data will obviously still be re-directed.

    Read the article

  • Puppet: Conditional file source based on naming convention

    - by thinice
    I'm getting the ball rolling on puppet for my environment - and I'd like to have a conditional file resource based on whether or not the module itself contains a file based on a naming convention. So visually, assume a module named 'mysql' and it's layout: mysql/ /files /etc/ my.cnf my.hostname1.cnf my.hostname2.cnf /manifests init.pp ... So I'd like the block to verify if the resource for the module exists or not, and take action accordingly, in pseudo-terms: file { '/etc/my.cnf': if -f 'puppet:///mysql/etc/my.$hostname.cnf' { source => 'puppet:///mysql/etc/my.$hostname.cnf' } else { source => 'puppet:///mysql/etc/my.cnf' } } This way one wouldn't have to manage a csv file or the .pp file with a host specific case statement - is this possible?

    Read the article

  • Excel conditional selection?

    - by Andrew
    I think this is a simple question. I have a big table of data points and I want to take a an average of a subset of a single column. For example, if A is "age" and B is "gender," what command could I use to calculate the average age of women in my table? I know I can do this by sorting the table by column B and then only selecting column A values, but I want to build up to much more complicated conditional terms (e.g. if A is 5 and B is 3 and C is 4, then give me the average of D). Thanks!

    Read the article

  • Nginx conditional not evaluating correctly

    - by cjc
    I'm running into a weird problem with nginx and how it evaluates conditionals. Here's the relevant configuration: set $cors FALSE; if ($http_origin ~* (http://example.com|http://dev.example.com:8000|http://dev2.example.com)) { set $cors TRUE; } if ($request_method = 'OPTIONS') { set $cors $cors$request_method; } if ($cors = 'TRUE') { add_header 'Access-Test' "$cors"; add_header 'Access-Control-Allow-Origin' "$http_origin"; add_header 'Access-Control-Allow-Methods' 'POST, OPTIONS'; add_header 'Access-Control-Max-Age' '1728000'; } if ($cors = 'TRUEOPTIONS') { add_header 'Access-Test' "$cors"; add_header 'Access-Control-Allow-Origin' "$http_origin"; add_header 'Access-Control-Allow-Methods' 'POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'X-Requested-With, X-Prototype-Version'; add_header 'Access-Control-Max-Age' '1728000'; add_header 'Content-Type' 'text/plain'; } So, the conditional blocks never trigger. When I remove the conditions, I see that the "Access-Test" header and the "Access-Control-Allow-Origin" set correctly, but, as noted, enabling the conditionals causes the headers not to be sent. I'm testing by running: curl -Iv -i --request "OPTIONS" -H "Origin: http://example.com" http://staging.example.com/ Am I missing something obvious? I've tried the "if" with and without quotes, etc. This is nginx 1.2.9.

    Read the article

  • Conditional type definitions

    - by pythonic metaphor
    I'm sure that boost has some functions for doing this, but I don't know the relevant libraries well enough. I have a template class, which is pretty basic, except for one twist where I need to define a conditional type. Here is the psuedo code for what I want struct PlaceHolder {}; template <typename T> class C{ typedef (T == PlaceHolder ? void : T) usefulType; }; How do I write that type conditional?

    Read the article

  • Question About Eclipse Java Debugger Conditional Breakpoints Inefficiency

    - by Personman
    I just set a conditional breakpoint in Eclipse's debugger with a mildly inefficient condition by breakpoint standards - checking whether a HashMap's value list (8 elements) contains Double.NaN. This resulted in an extremely noticeable slowdown in performance - after about five minutes, I gave up. Then I copy pasted the condition into an if statement at the exact same line, put a noop in the if, and set a normal breakpoint there. That breakpoint was reached in the expected 20-30 seconds. Is there something special that conditional breakpoints do that is different from this, or is Eclipse's implementation just kinda stupid? It seems like they could fairly easily just do exactly the same thing behind the scenes.

    Read the article

  • Conditional Statements - If Then vs. Select Case

    - by cloyd800
    I'm a bit new to programming, and based on the few sources I've read both on the web and the books I'm learning to teach myself they are able to define what IF THEN and SELECT CASE conditional statements are, but have failed to give a comparison as to why I would use one over the other and what best practices decide this. If I'm understanding these conditional statements correctly, then both are based on a set of conditions with an outcome based around meeting these conditions, and if no conditions are met then an alternative outcome can be defined. I'm having trouble in understanding when I would use an IF THEN statement, and when I'd use a SELECT CASE statement, and what best practices are used to define this decision. Any insight on this would be greatly appreciated!

    Read the article

  • Excel: conditionally format a cell using the format of another, content-matching cell

    - by Eric A. Meyer
    I have an Excel spreadsheet where I’d like to be able to create a “key” of formatted cells with unique values, and then in another sheet format cells using the key formatting. So for example, my key is as follows, with one value per cell and the visual formatting indicated in parentheses: A (red background) B (green background) C (blue background) So that’s on one sheet (or in a remote corner of the current sheet—whichever is better). Then, in an area that I mark for conditional formatting, I can type one of those three letters and have the cell where I typed it visually formatted according to the key. So if I type a “B” into one of the conditionally formatted cells, it gets a green background. (Note that I’m using backgrounds here solely for ease of explanation: ideally I want to have all visual formatting copied over, whether it’s foreground color, background color, font weight, borders, or whatever. But I’ll take what I can get, obviously.) And—just to make it extra-tricky—if I change the formatting in the key, that change should be reflected in cells that reference the key. Thus, if I change the “B” formatting in the key from a green background to a purple background, any “B” in the main sheet should switch to the new color. Similarly, it should be possible to add or remove values from the key and have those changes applied to the main data set. I’m okay with the formatting-update-on-key-change being triggered by clicking a button or something. I suspect that if any of this is possible it will require VBA, but I’ve never used it so I’ve no idea where to start if that’s the case. I’m hoping it’s possible without VBA. I know it’s possible to just use multiple conditional formats, but my use case here is that I’m trying to create the above-described capability for someone who isn’t conversant with conditional formatting. I’d like to let them be able to define a key, update it if necessary, and keep on truckin’ without me having to rewrite the spreadsheet’s formatting rules for them. --- UPDATE --- So I think I was a bit unclear about my original request. Let me try again with an image. The image shows the “key” on the left, where values and styles are defined using keyboard and mouse input. On the right, you see the data that should be formatted to match the key. Thus if I type a “C” into a cell in the Data area, it should be blue-backed. Furthermore, if I change the formatting of “C” in the Key to have a purple background, all the “C” cells should switch from blue to purple. For further craziness, if I add more to the Key (say, “D” with a yellow background) then any “D” cells will be styled to match; if I remove a Key entry, then matching values in the Data area should revert to default styling. So. Is that more clear? Is it possible, in whole or in part? I don’t have to use conditional formatting for this; in fact, at this point I suspect I probably shouldn’t. But I’m open to any approach!

    Read the article

  • Regex to remove conditional comments

    - by cnu
    I want a regex which can match conditional comments in a HTML source page so I can remove only those. I want to preserve the regular comments. I would also like to avoid using the .*? notation if possible. The text is foo <!--[if IE]> <style type="text/css"> ul.menu ul li{ font-size: 10px; font-weight:normal; padding-top:0px; } </style> <![endif]--> bar and I want to remove everything in <!--[if IE]> and <![endif]--> EDIT: It is because of BeautifulSoup I want to remove these tags. BeautifulSoup fails to parse and gives an incomplete source EDIT2: [if IE] isn't the only condition. There are lots more and I don't have any list of all possible combinations. EDIT3: Vinko Vrsalovic's solution works, but the actual problem why beautifulsoup failed was because of a rogue comment within the conditional comment. Like <!--[if lt IE 7.]> <script defer type="text/javascript" src="pngfix_253168.js"></script><!--png fix for IE--> <![endif]--> Notice the <!--png fix for IE--> comment? Though my problem was solve, I would love to get a regex solution for this.

    Read the article

  • CSS compilers and converting IE hacks to conditional css

    - by xckpd7
    Skip to bottom for question, but first, a little context. So I have been looking into CSS compilers (like Sass & Less) for a while, and have been really interested in them, not because they help me understand anything easier (I've been doing css for a couple of years now) but rather they cut down on cruft and help me see things easier. I recently have been looking into reliably implementing inline-block (and clearfix), which require lots of extraneous code & hacks. Now according to all the authorities in the field, I shouldn't put IE hacks in the same page I do my CSS in, I should make them conditional. But for me that is a really big hassle to go through and manage all this additional code, which is why I really like things like Less. Instead of applying unsemantic classes, you specify a mixin and apply it once, and you're all set. So I guess I got a little of the track (I wanted to explain my points) but bascially, I'm at the point where these CSS compilers are very useful for me, and allow me to abstract a lot of the cruft away, and reliably apply them once and then just compile it. I would like to have a way to be able to compile IE specific styles into their own conditional files (ala Less / Sass) so I don't have to deal with managing 2 files for no reason. Does anything like a script/applcation that runs and can make underscore / star hacks apart of their own file exist?

    Read the article

  • Conditional fieldgroups/fieldsets in Drupal 7

    - by seane
    Background: In Drupal 7, I have created a form with CCK (aka the Field UI). I used the Field group module to create a fieldgroup, but I need it to be conditional, meaning it will only display depending on a previous answer. Previous research: To create a conditional field, you can use hook_form_alter() to edit the #states attribute like so: function MYMODULE_form_alter(&$form, &$form_state, $form_id) { if ($form_id == 'person_info_node_form') { // Display 'field_maiden_name' only if married $form['field_maiden_name']['#states'] = array( 'visible' => array( ':input[name="field_married[und]"]' => array('value' => 'Yes'), ), ); } } However, there seems to be no way to use the States API for fieldgroups. One thing to note is that, while fields are stored in $form, fieldgroups are stored in $form['#groups'] as well as in $form['#fieldgroups']. I don't know how to distinguish between these, and with this in mind, I have tried to apply a #states attribute to a fieldgroup in the same manner as above. However, it only produces server errors. Question: Is there a way to make a fieldgroup display conditionally using the States API or some alternative approach?

    Read the article

  • Conditional hotkey or include in AutoHotKey

    - by Bowen
    Is there a way to define a Hotkey conditionally in AutoHotKey? I want to do different keyboard mappings for different machines with different physical keyboards. This is what I want to do: RegRead, ComputerName, HKEY_LOCAL_MACHINE, System\CurrentControlSet\Control\ComputerName, ComputerName If ( ComputerName = BDWELLE-DIM8300 ) { #Include %A_ScriptDir%\Mappings-BDWELLE-DIM8300.ahk } OR RegRead, ComputerName, HKEY_LOCAL_MACHINE, System\CurrentControlSet\Control\ComputerName, ComputerName If ( ComputerName = BDWELLE-DIM8300 ) { LWin::LAlt [more hotkey definitions that only apply to this machine] } but since AHK parses Hotkey definitions and #Include statements BEFORE interpreting If statements, the Hotkeys definitions (whether buried in an #Include or not) do not respect the If condition. Thanks for pointing me to AutoHotKey_L! Do you have a specific example of how to conditionally define a hotkey? The syntax is very confusing. Here's what I'm trying (after having installed AutoHotKey_L.exe in place of AutoHotKey.exe): RegRead, ComputerName, HKEY_LOCAL_MACHINE, System\CurrentControlSet\Control\ComputerName, ComputerName #If ( ComputerName = BDWELLE-DIM8300 ) LWin::LAlt but that doesn't seem to work...

    Read the article

  • Windows Server 2003 R2 SP2 GPO Conditional Terminal Services Client Redirection

    - by caleban
    We have a lot of mobile/home users with different client side printers attached. Most of these users don't need to print on the client side and we don't want all of these users Terminal Services sessions trying to map their client side printers and we don't want all of these drivers on the Terminal Server. What is the best way to set up around 90 users to have no client side printer redirection and 10 users to have client side printer redirection (to the printers attached to their home computers)? Do I need to create two separate OU's in AD one for redirection and one for no redirection and create two different policies one for each OU? One GPO with Client Server data redirection Do not allow client printer redirection disabled and one enabled? Is it preferrable instead to change each user's AD User Properties Enviroment Client devices Connect client printers at logon setting? Is there any for me to direct "ALL HP Printers" to a single HP Universal Printer Driver, "ALL Canon Printers" to a single Canon Universal Printer Driver, etc without specifying hundreds of unique printer names in the printsub.inf file? Thanks in advance.

    Read the article

  • Apache conditional configuration

    - by pontus.enmark
    Is it possible to dynamically include/exclude blocks somehow using env variables or the like? Something in the lines of <LocationMatch ...> SetEnvIf X-Requested-With XmlHttpRequest xhr <If xhr> SSLVerifyClient none </If> <If !xhr> SSLVerifyClient optional </If> </LocationMatch>

    Read the article

  • Excel Conditional Summing

    - by Ben
    I want to create a formula so that I can keep track of how many feet get out of a drill bit. The data will be arranged in this way: Bit ID Ft Drilled 15685 200 15685 201 6000 365 15685 169 6000 535 2 205 2 190 2 465 6000 600 15685 523 I want to show results of the total footage drilled by: Bit ID Total Ft Drilled 15685 x 6000 x 2 x Any ideas on formulas? Thanks.

    Read the article

  • zsh conditional statement help

    - by Roy Rico
    Feeling kinda dumb right now: Why is my contional always true? I've tried # this should let me know what's not a directory or # symbolic link. whoa=`find ${MUSICDIR} ! -type l ! -type d | wc -l` # I would expect if it's 0 (meaning nothing was found) that # one of these statements would evaluate to false, but so far # it's always evaluating to true if [[ "${whoa}" != "0" ]] if [[ ${whoa} -gt 0 ]] What am I missing?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >