Search Results

Search found 2601 results on 105 pages for 'condition'.

Page 45/105 | < Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >

  • Will NKDbgPrintfW be compiled to nop in release build?

    - by Johann Gerell
    I know about and have used the macros DEBUGMSG, RETAILMSG, ERRORMSG, that all take a condition parameter. For general formatted debug output, though, I want to use ::NKDbgPrintfW directly and wonder if someone knows if it compiles to a nop in optimised release builds or if my own macro wrapper around it with #ifdef DEBUG is still needed?

    Read the article

  • Mod Rewrite Rule not matching certain words

    - by Andy Gee
    I'm no expert in mod_rewrite at all and I'm trying to add a condition to the rule below to: match which is not equal to 'share' not match anything with a dot in it RewriteRule ^([^/]*)$ http://domain.com/directory/index.php?key=$1 [L] http://domain.com/directory/share will not be matched (share) http://domain.com/directory/foo.php will not be matched (contains a dot) http://domain.com/directory/abcde will be matched http://domain.com/directory/abcde-4 will be matched All ULRs will not have a trailing slash Any help will be much appreciated

    Read the article

  • Confirm accepting a payment!

    - by user347746
    I want to make a web application were people are paying money (for example through mastercard/visa/paypal etc.). My question is: can it somehow be made that the money transfers are made only after a longer period when a condition is met in my web application.

    Read the article

  • rails, activerecord callbacks not saving

    - by Joseph Silvashy
    I have a model with a callback that runs after_update: after_update :set_state protected def set_state if self.valid? self.state = 'complete' else self.state = 'in_progress' end end But it doesn't actually save those values, why not? Regardless of if the model is valid or not it won't even write anything, even if i remove the if self.valid? condition, I can't seem to save the state. Um, this might sound dumb, do I need to run save on it?

    Read the article

  • Contact form problem - I do receive messages, but no contents (blank page).

    - by nitbuntu
    I have a contact form on site which used to work, but since last few months has stopped working properly. This could have been due to some coding error that I can't figure out. What happens is that I receive the messages sent, but they are completely blank, with no contents at all. What could be the problems? I'm attaching first the front-end page, and then the back-end. Sample of contact.php the front-end code:- <div id="content"> <h2 class="newitemsxl">Contact Us</h2> <div id="contactcontent"> <form method="post" action="contactus.php"> Name:<br /> <input type="text" name="Name" /><br /> Email:<br /> <input type="text" name="replyemail" /><br /> Your message:<br /> <textarea name="comments" cols="40" rows="4"></textarea><br /><br /> <?php require("ClassMathGuard.php"); MathGuard::insertQuestion(); ?><br /> <input type="submit" name="submit" value="Send" /> * Refresh browser for a different question. :-) </form> </div> </div> Sample of contactus.php (backend code):- <?php /* first we need to require our MathGuard class */ require ("ClassMathGuard.php"); /* this condition checks the user input. Don't change the condition, just the body within the curly braces */ if (MathGuard :: checkResult($_REQUEST['mathguard_answer'], $_REQUEST['mathguard_code'])) { $mailto="[email protected]"; $pcount=0; $gcount=0; $subject = "A Stylish Goods Enquiry"; $from="[email protected]"; echo ("Great, you're message has been sent !"); //insert your code that will be executed when user enters the correct answer } else { echo ("Sorry, wrong answer, please go back and try again !"); //insert your code which tells the user he is spamming your website } while (list($key,$val)=each($HTTP_POST_VARS)) { $pstr = $pstr."$key : $val \n "; ++$pcount; } while (list($key,$val)=each($HTTP_GET_VARS)) { $gstr = $gstr."$key : $val \n "; ++$gcount; } if ($pcount > $gcount) { $comments=$pstr; mail($mailto,$subject,$comments,"From:".$from); } else { $comments=$gstr; mail($mailto,$subject,$comments,"From:".$from); } ?>

    Read the article

  • SQL simple selection of rows according to their time

    - by iracema78280
    Hello, I have a table with measures and the time this measures have been taken in the following form: MM/DD/YYYY HH:MI:SS AM. I have measures over many days starting at the same time every day.The datas are minute by minute so basically the seconds are always = 0. I want to select only the measures for the first 5 minutes of each day. I would have used the where statement but the condition would only be on the minutes and note the date is there a way to do this? Thanks

    Read the article

  • What is the proper HTTP response to send for requests that require SSL

    - by dasil003
    I'm designing an RESTful API where some calls are public over HTTP, and some require an API key and encryption over HTTPS. I'm deliberating on what response code should be sent if an HTTP request is sent to one of the private resources. So far the only one that jumps out at me is 412 - Precondition Failed, but the standard indicates that the precondition is imposed by the requester not the server. Is there an appropriate response code for this condition or do I just need to give in and do 400?

    Read the article

  • Conditional operator in if-statement?

    - by Pindatjuh
    I've written the following if-statement in Java: if(methodName.equals("set" + this.name) || isBoolean() ? methodName.equals("is" + this.name) : methodName.equals("get" + this.name)) { ... } Is this a good practice to write such expressions in if, to separate state from condition? And can this expression be simplified?

    Read the article

  • Hibernate custom join clause on association

    - by myso
    I would like to associate 2 entities using hibernate annotations with a custom join clause. The clause is on the usual FK/PK equality, but also where the FK is null. In SQL this would be something like: join b on a.id = b.a_id or b.a_id is null From what I have read I should use the @WhereJoinTable annotation on the owner entity, but I'm puzzled about how I specify this condition...especially the first part of it - referring to the joining entity's id. Does anyone have an example?

    Read the article

  • PHP problem with die()

    - by ThinkingInBits
    So, I have this code: } else { $photograph_moderation = new PhotographModeration($this->photograph_id); $photograph_moderation->purgePhotograph(); //eventually take to an error page die('image is not big enough to upload'); } the purgePhotograph() function gets called properly when this condition is met, but the script never appears to die. Is there a reason why die wouldn't get called here? purgePhotograph() has no script killing commands either.

    Read the article

  • How can I tweak this elisp function to distinguish between C-d & DEL?

    - by Fletcher Moore
    Here's my current function (blindly copy-pasted from a website) (defun tweakemacs-delete-one-line () "Delete current line." (interactive) (beginning-of-line) (kill-line) (kill-line)) (global-set-key (kbd "C-d") 'tweakemacs-delete-one-line) There are two quirks here that I want to get rid of. 1) This actually rebinds DEL to the same function. I want my DEL to remain "delete one character". 2) There needs to be a condition where it will not double-kill if the line is only a newline character.

    Read the article

  • how to store a value returned from a sql query in a variable in batch programming ?

    - by Arunachalam
    how to store a value returned from a sql query in a variable in batch programming ? i can invoke sqlserver queries from my cmd prompt using sqlcmd server name then the qwery this is query statement i m going to use SELECT CASE WHEN DATEDIFF(minute, record_timestamp, GETDATE()) < 10 THEN 1 ELSE 0 END how to store the value returned i tried using set variablename but it save the statement rather than the return value .. and if i save this in a variable what type of variable it will can i compare it with numeric values in if condition

    Read the article

  • Map entries become vectors when piped thru a macro

    - by Gavin Grover
    In Clojure, a map entry created within a macro is preserved... (class (eval `(new clojure.lang.MapEntry :a 7))) ;=> clojure.lang.MapEntry ...but when piped thru from the outside context collapses to a vector... (class (eval `~(new clojure.lang.MapEntry :a 7))) ;=> clojure.lang.PersistentVector This behavior is defined inside LispReader.syntaxQuote(Object form) condition if(form instanceof IPersistentCollection). Does anyone know if this is intended behavior or something that will be fixed?

    Read the article

  • How can I dynamically hide a button from a view?

    - by jpm
    I would like to dynamically hide a button in one of my views, depending on a certain condition. I tried adding some code to the view controller's -viewWillAppear method, to make the button hidden before displaying the actual view, but I still don't know how to do that. I have a reference to the button through an IBOutlet, but I'm not sure how to move forward from here. For reference, this is a UIBarButtonItem instance.

    Read the article

  • Looping over a Cfquery or a Struct ?

    - by Somu
    Hi I have a query which retrieves Some data. I want to display that data considering some conditions in different div tags. Now my question is, I am doing this by looping the query once and getting the data in three different structs and using these structs while displaying. Is this a good approach or looping through the query everytime in each div to check the condition is the rirht approach ? <tr > features: #getAttributes.seat# Disclosures: #getTicketAttributes.seat#

    Read the article

< Previous Page | 41 42 43 44 45 46 47 48 49 50 51 52  | Next Page >