Search Results

Search found 2819 results on 113 pages for 'conditional expressions'.

Page 57/113 | < Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >

  • How to define a preprocessor symbol in Xcode

    - by Steph Thirion
    Is it possible to set a symbol for conditional compilation by setting up properties in an Xcode project? My aim is to to create a symbol that is available to all files, without having to use import/include, so that a set of common classes can have a special behavior in some projects. Like the following, but with my own symbols. #if TARGET_IPHONE_SIMULATOR ... #endif

    Read the article

  • Built-in precedence in Expression Trees?

    - by jdk
    I'm unable to find the .NET FCL built-in concept of precedence to leverage while constructing Expression Trees. Ref System.Linq.Expressions Namespace. Is this something that must be handled manually in code, or is it somehow implicit and I'm not recognizing it? Maybe through helper methods or classes? I want to apply it to math operations to ensure 3 + 5 * 10 results in 53 instead of 80.

    Read the article

  • How can I delay one feed in wordpress but not the others?

    - by mattloak
    Is there anyway to create a special feed in Wordpress that is on a delay that I can distribute to some of our content partners? I have found some tutorials on how to delay your feed (http://wpengineer.com/publish-the-feed-later/) but it uses the conditional statement is_feed and I don't want to apply this to all feeds, just one particular feed. Any advice?

    Read the article

  • wildcards to use in codeigniter routing?

    - by ajsie
    in codeigniter you can use wildcard to reroute. i never heard the word wildcards before. is this a set of rules you can use like regexp? cause in codeigniter documentation they just gave some examples eg. $route['product/(:num)'] = "catalog/product_lookup_by_id/$1"; is there a list/reference with all the available wildcard expressions you can use?

    Read the article

  • Form value not passed to Seam bean after a4j reRender

    - by Casper
    I'm making a webapp in Seam but ran into a problem I can't seem to fix. I have a JSF form where the customer can select a reservation type through a combobox. Based on the selected value, other form components gets rendered. For example: the customer selects Hours as reservation type, a panelGroup gets rendered where the customer can select a start- and an end hour. But if the customer would select 'part of the day' as reservation type, a selectOneMenu gets rendered where the customer can select a part of the day (morning, afternoon, evening) The rerendering well but the values of the components with a rendered conditional won't get passed to the bean. They stay null values. This is the code i'm talking about: <h:panelGrid columns="2"> <h:outputText value="Reservation Type" /> <h:selectOneMenu value="#{selectedPeriodPart}"> <s:selectItems value="#{productManager.getAvailableDayPartsSpot()}" var="daypart" label="#{daypart.label}"></s:selectItems> <s:convertEnum /> <a4j:support ajaxSingle="true" event="onchange" action="#" reRender="spot"></a4j:support> </h:selectOneMenu> <h:outputText id="date_spot" value="Date" /> <a4j:outputPanel id="calendar_spot" layout="block"> <rich:calendar value="#{reservation.reservationPeriod.startDate}" locale="en" cellWidth="24px" cellHeight="22px" style="width:200px" /> </a4j:outputPanel> <h:outputText rendered="#{selectedPeriodPart eq 'DAY_PART'}" value="Daypart" /> <h:selectOneMenu value="#{selectedDaypart}" rendered="#{selectedPeriodPart eq 'DAY_PART'}"> <f:selectItem id="si_morning" itemLabel="Morning (6:00 - 12:00)" itemValue="morning" /> <f:selectItem id="si_afternoon" itemLabel="Afternoon (12:00 - 18:00)" itemValue="afternoon" /> <f:selectItem id="si_evening" itemLabel="Evening (18:00 - 00:00)" itemValue="evening" /> </h:selectOneMenu> <h:outputText rendered="#{selectedPeriodPart eq 'HOURS'}" value="Hours" /> <h:panelGroup id="hours_spot" rendered="#{selectedPeriodPart eq 'HOURS'}"> <ui:include src="/includes/reservation/select_hours.xhtml" /> </h:panelGroup> </h:panelGrid> </s:div></code> Note: The calendar value do get passed back to the bean but the value of this piece of code doesn't (it does if you remove the rendered conditional):

    Read the article

  • regular expression help

    - by JPro
    I always get confused using regular expressions. Can anyone please suggest me a tutorial? I need help with checking for a string which, cannot contain any wild characters except colon, comma, full stop. It will be better to replace these if found. Any help? Thanks.

    Read the article

  • Using Squeak from a shell

    - by Vijay Mathew
    Can I launch Squeak as a REPL (no GUI), where I can enter and evaluate Smalltalk expressions? I know the default image don't allow this. Is there any documentation on how to build a minimum image that can be accessed from a command-line shell?

    Read the article

  • How to test if a gawk string contain a number?

    - by Tim Menzies
    In gawk I know two ways to test if a string contains a number. Which is best? Method one: using regular expressions: function method1(x) { return x ~ /^[+-]?([0-9]+[.]?[0-9]*|[.][0-9]+)([eE][+-]?[0-9]+)?$/ } Method two: the coercion trick (simpler): function method2(x) { return (x != "") && (x+0 == x) } Is there any reason to favor the more complex method1 over the simpler method2?

    Read the article

  • MS SQL Server BEGIN/END vs BEGIN TRANS/COMMIT/ROLLBACK

    - by Rich
    I have been trying to find info on the web about the differences between these statements, and it seems to me they are identical but I can't find confirmation of that or any kind of comparison between the two. What is the difference between doing this: BEGIN -- Some update, insert, set statements END and doing this BEGIN TRANS -- Some update, insert, set statements COMMIT TRANS ? Note that there is only the need to rollback in the case of some exception or timeout or other general failure, there would not be a conditional reason to rollback.

    Read the article

  • Scheme define/lambda shorthand

    - by incrediman
    In Scheme, how can I make use of the define/lambda shorthand for nested lambda expressions within my define? For example given the following procedure... (define add (lambda (num1 num2) (+ num1 num2))) One can shorten it to this: (define (add num1 num2) (+ num1 num2)) However, how can I shorten the following function similarly ? (define makeOperator (lambda (operator) (lambda (num1 num2) (operator num1 num2)))) ;example useage - equivalent to (* 3 4): ((makeOperator *) 3 4)

    Read the article

  • SED: Matching on 2 patterns on the same line

    - by Brian Knott
    Hi I want to delete a line using sed if it matches 2 regular expressions in the same line. EG the line starts with /* and end with */ (comment). The following script will do most of that. sed -e '/^\/*/ d' -e '/*\/$/ d' filename This script will remove all lines that start with * and end with */. I want it to remove the line only if is meets both criteria not one.

    Read the article

  • Parse HTML with CSS or XPath selectors?

    - by ovolko
    My goal is to parse HTML with lxml, which supports both XPath and CSS selectors. I can tie my model properties either to CSS or XPath, but I'm not sure which one would be the best, e.g. less fuss when HTML layout is changed, simpler expressions, greater extraction speed. What would you choose in such a situation?

    Read the article

  • C# Math calculator

    - by user329814
    Is there a way to calculate math expressions like (2-3/4*12) in a different way than presented here? http://www.c-sharpcorner.com/uploadfile/mgold/codedomcalculator08082005003253am/codedomcalculator.aspx

    Read the article

  • Lighttpd check request headers in configuration

    - by Mike Hayes
    Hi I was wondering if it was possible in the configuration of Lighttpd to read request headers, I've searched and searched.. apparently it's not possible. For example, conditional configuration based upon IP address: $HTTP["remoteip"] == "0.0.0.0" { // Do something } Is there something similar to check headers, for example: $HTTP["X-Some-Header"] == "Value" { // Do something } I'm thinking there isn't but thought I would post here as a last resort. Google didn't help much, and Lighttpd documentation would suggest this is not possible. Thanks Mike

    Read the article

  • PHP Application check name is unique if not append

    - by user270797
    My application requires the user to enter their business name, which the application will automatically create into a unique identifier to be used in URLs, ie "Bob's Cafe" will become "bobs-cafe" But if there are duplicate names I would like the application to add a number so if there is already a "bobs-cafe" we will use "bobs-cafe-1" and likewise if there is already a "bobs-cafe-1" we will use "bobs-cafe-2" Ive used explode and also looked at a regular expressions but I dont know the best way to approach this. Im stuck in being able to grab the number and incrementing it and returning the string

    Read the article

  • Choosing the MVC view engine

    - by leonard
    I want to allow the end-users of my web application to modify views (via web based back office), stored in the database. The desired view engine is expected to be code-injection safe, meaning that the end-user will be limited to the absolute minimum number of expressions available, no server code inserts are allowed. Is any suitable view engine available to download?

    Read the article

  • Can you reverse order a string in one line with LINQ or a LAMBDA expression

    - by Student for Life
    Not that I would want to use this practically (for many reasons) but out of strict curiousity I would like to know if there is a way to reverse order a string using LINQ and/or LAMBDA expressions in one line of code, without utilising any framework "Reverse" methods. e.g. string value = "reverse me"; string reversedValue = (....); and reversedValue will result in "em esrever" EDIT Clearly an impractical problem/solution I know this, so don't worry it's strictly a curiosity question around the LINQ/LAMBDA construct.

    Read the article

  • Using JavaScript in WordPress: throw all jQuery plugins in, or is there a way to conditionally load?

    - by ineedtosleep
    I'm relatively new with WordPress theming and JavaScript, though not incompetent with either. I'm looking to have a maximum of 10 jQuery plugins to go on the blog, but I'm wondering if there's a way to have them load only when needed, as I don't want any unnecessary loading for the users. Something similar in something I know a little bit more of would be the conditional comments in IE <!--[IF IE]> @import ie.css <![endif]-->.

    Read the article

< Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >