Search Results

Search found 21003 results on 841 pages for 'spell check'.

Page 24/841 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • PHP Code- How to check duplicate entries in Mysql Database

    - by yash bhavnani
    Hi guys, I am working on Google checkout API notification URL. I want to apply a check in my php code which will see if transaction ID present in transaction table of my DB, it will exit not process. I am struggling into applying here. Can somebody help? I want to check if trasaction ID exists in table of DB it will exit, it will not process: *case "new-order-notification": $sql = "update transactions set remote_trans_id=\"".$_REQUEST["google-order-number"]."\", updated=now() where id=".$_REQUEST["shopping-cart_items_item-1_merchant-item-id"]." "; execute($sql, $conn); break;* Regards

    Read the article

  • how use ASP.NET_SessionId cookies to check timeout for 2 different web applications

    - by user553858
    Hi All I am developing 2 web applications based on "ASP.NET_SessionId" cookies to check session timeout and also to logout : protected void Session_Start(object sender, EventArgs e) { if (Context.Session != null) { //check the IsNewSession value, this will tell us if the session has been reset if (Session.IsNewSession) { string cookie = Request.Headers["Cookie"]; // Code that runs when a new session is started if ((null != cookie) && (cookie.IndexOf("ASP.NET_SessionId") >= 0)) { if (Request.QueryString["timeout"] == null || !Request.QueryString["timeout"].ToString().Equals("yes")) Session.Abandon(); Session.Clear(); Response.Redirect("Login.aspx?timeout=yes"); } } } } This works fine for my first application. When implementing the same logic for the 2nd application when I press logout in one application, the second application is redirected to the login page. How can I fix this? Best regards

    Read the article

  • Using javascript to check which CDN jQuery is cached from on the client

    - by Hazro City
    Can I use JavaScript to check whether JQuery is (already) downloaded (cached) on the target web browser (user) or not? For Example: If (JQuery-from-Microsoft-CDN-downloaded) Then use http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.4.js Else if (JQuery-from-Google-APIs- downloaded) Then use http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js Else if (JQuery-from-code.jquery.com- downloaded) Then use http://code.jquery.com/jquery-1.4.4.min.js Else use jQuery from my own website. Means that using the ability of javascript to check whether one of them is downloaded on the target User (Web Browser), if not then use jQuery from my own website otherwise if true then use that version of JQuery that is downloaded on the target User.

    Read the article

  • Check if window has focus

    - by user2536244
    I need to check if the user has windows on focus, I'm currently doing this: var isonfocus=true; window.onblur = function(){ isonfocus=false; } window.onfocus = function(){ isonfocus=true; } And whenever I need to check if the user has the windows on focus I just do if(isonfocus==true). Problem: if the user loses focus before the page loads, even if I do if(isonfocus==true) it will return true, even though the window is not on focus, and defining the var to false var isonfocus=false; will do the reverse. Can someone help me? Thanks.

    Read the article

  • Check if edit is valid for database ms-access

    - by twodayslate
    I want to be able to check if I can edit a cell in a database with a new object Example method declaration: something.isValid(Object newObject, row, column); Example cases: If the editing cell stores an Number and I give it a String, the method will return false... If the editing cell has to be different than every other entry and the new object is the same as something else, the method will also return false.... My main goal... I want to check a whole row, and if everything is valid, I will edit the whole row. Right now, the only way I can find out if I can actually edit something is by actually editing it and seeing if I get an error.

    Read the article

  • Howto check if a object is connected to another in hibernate

    - by codevourer
    Imagine two domain object classes, A and B. A has a bidirectional one-to-many relationship to B. A is related to thousands of B. The relations must be unique, it's not possible to have a duplicate. To check if an instance of B is already connected to a given instance of A, we could perform an easy INNER JOIN but this will only ensure the already persisted relations. What about the current transient relations? class A { @OneToMany private List<B> listOfB; } If we access the listOfB and perform a check of contains() this will fetch all the connected instances of B lazy from the datasource. I only want to validate them by their primary-key. Is there an easy solution where I can do things like "Does this instance of A is connected with this instance of B?" Without loading all these data into memory and perform a based on collections?

    Read the article

  • Check if CSS Class exists in StyleSheet using javascript/jQuery

    - by Akhil Sekharan
    Is there a way to check if there is a class named 'some-class-name' in css? For example, I have: <style type="text/css"> .box { position: absolute; left: 150%; } </style> My intention is to randomly assign a class to a div on certain event: var classList = []; //Need to populate this array $('#updateClass').on('click', function() { $('#resultDiv').attr('class',classList[Math.floor((Math.random()*classList.length)+1)]); }); Is it possible to check by JS/jQuery whether a class named 'box' exists in the stylesheet? Thanks.

    Read the article

  • PHP: How to check for response code?

    - by Tom
    Hi, I'm a relative PHP newbie implementing a PayPal IPN listener and all seems to be working fine, except I dont really know how to check for a response code. I've tried something ugly with cURL but it doesn't work at all (I'm not understanding cURL). I've tried this piece of code that I grabbed from somewhere on the net: $fp = fsockopen('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30); $response_headers = get_headers($fp); $response_code = (int)substr($headers[0], 9, 3); ... but it's not working (returns $response_code = 0). So right now, I'm debugging my IPN code without checking for a Response 200. Can anyone more experienced advise me on what's the proper/simple way to check this? Thanks

    Read the article

  • Using Jquery to check if a URL is valid

    - by user102533
    A long running background process creates a text file to indicate the completion of the process. From the frontend, I'd need to check every few seconds if the text file has been created or not. I am doing this check from However the file is created in http://DomainB.com/Mytext.txt Can someone help me write a jquery script that checks for a file across domain? PS: Currently, I am doing a ajax postback that executes a WebMethod in ASP.NET that creates HttpWebRequest. This works functionally, but I have major performance problems. So, I need a light weight way of finding if a URL is valid or not.

    Read the article

  • PHP Check if <ul> has ended IF it exists

    - by Krewe
    I have my blog generate a preview by taking the first 300 characters and cut off the last whole word. My problem is, when I have a list near the top of the blog it is sometimes included in the preview, however the end list tag usually never is. So how can I check the $preview variable for a starting list tag, and if it is found, check for an ending tag and if it's not there add one. All the code for my preview. $preview = wordwrap($content, 300); $preview = explode("\n", $preview); $preview = $preview[0] . "...";

    Read the article

  • VB.NET Use WebRequest to check if URI is valid

    - by Robbo
    Looking for the best way to determine if a URI exists in VB.NET without downloading the actual content. System.IO.FileExists/My.Computer.FileSystem.FileExists can be used locally to determine if a file exists, is there an equivalent for the Web? Currently I am using a HttpWebRequest to check URI existance using the ResponseStream. This populates the stream if the target does exist and throws an exception if it doesn't. The function is being expanded to also check for PDF files (typically 5MB +), images, etc and it will be a waste of time/bandwidth to actually populate the content into a stream. In the case of "Success" (the target does exist) I do not wish to download the file or page, simply to end up with a Boolean which indicates the whether something exists at the end of this URI.

    Read the article

  • mysql - check if data exists across multiple tables

    - by Dd Daym
    I am currently running this query inside MySQL to check if the specified values exists within the table associated with them. SELECT COUNT(artist.artist_id), COUNT(album.album_id), COUNT(tracks.track_id) FROM artist, album, tracks WHERE artist.artist_id = 320295 OR album.album_id = 1234 OR tracks.track_id = 809 The result I get from running this query is all 1, meaning that all the statements after the WHERE clause is true. To further check the query's reliability, I changed the tracks.track_ = 809 to 802, which I know does not match. However the results displayed are still all 1, meaning that they were all successfully matched even when I purposefully inserted a value which would not have matched. How do I get it to show 1 for a match and 0 for no matches within the same query? EDIT: I have inserted an image of the query running

    Read the article

  • Why does the check for an interface fail?

    - by chobo
    I have a class that implements an interface. In another area of the code I check if that class instance contains that interface, but it doesn't work. The check to see if the class contains the interface always fails (false) when it should be true. Below is a simple representation of what I am trying to accomplish. Example public interface IModel { bool validate(); } public class SomeModel : IModel { public SomeModel { } public bool Validate() { return true; } } // Dummy method public void Run() { SomeModel model = new SomeModel(); if (model is IModel) { string message = "It worked"; } else { string message = "It failed"; } }

    Read the article

  • Python: Check if all dictionaries in list are empty

    - by Brant
    I have a list of dictionaries. I need to check if all the dictionaries in that list are empty. I am looking for a simple statement that will do it in one line. Is there a single line way to do the following (not including the print)? l = [{},{},{}] # this list is generated elsewhere... all_empty = True for i in l: if i: all_empty = False print all_empty Somewhat new to python... I don't know if there is a shorthand built-in way to check this. Thanks in advance.

    Read the article

  • Need to create regular expression in Javascript to check the valid conditional string

    - by user1796078
    I want to create the regular expression in javascript which will check the valid conditional string like -1 OR (1 AND 2) AND 1 -1 OR (1 AND 2) -1 OR 2 -1 OR 1 OR 1 -1 AND 1 AND 1 The string should not contain 'AND' and 'OR'. For example - 1 OR 2 AND 3 is invalid. -It should be (1 OR 2) AND 3 or 1 or (2 AND 3). I tried the following Regex. It works for most of the conditions but it is failing to check the above condition. /^(\s*\(\d+\s(AND|OR)\s\d+\)|\s*\d+)((\s*(AND|OR)\s*)(\(\d+\s(AND|OR)\s\d+\)|\s*\d+))*$/ Can anyone please help me to sort out the above problem.

    Read the article

  • PHP radio button check if null

    - by Dallox
    So in class we get this school task where we need to check if one of the fields in unfilled and display an error. No we did this but for some strange reason it doesnt display a error when a radio button is unchecked. (textfield null check works fine) I've tried with a friend many possabilities but they all doesnt seem to work. We have been stuck at this task for 2 hours. Now we have tried making seperate if's but that doesnt seem to work too. These are the important parts: <p> <input type="hidden" name="taal" value="false"> Choose a language <input type="radio" name="taal" value="N"> Dutch <input type="radio" name="taal" value="E"> English <input type="radio" name="taal" value="S"> Spanish if (@$_POST['taal'] == null){ echo "No Language gotten"; return; }

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >