Search Results

Search found 21001 results on 841 pages for 'spelling check'.

Page 91/841 | < Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >

  • Mongodb update: how to check if an update succeeds or fails?

    - by zmg
    I think the title pretty much says it all. I'm working with Mongodb in PHP using the pecl driver. My updates are working great, but I'd like to build some error checking into my funciton(s). I've tried using lastError() in a pretty simple function: function system_db_update_object($query, $values, $database, $collection) { $connection = new Mongo(); $collection = $connection->$database->$collection; $connection->$database->resetError(); //Added for debugging $collection->update( $query, array('$set' => $values)); //$errorArray = $connection->$database->lastError(); var_dump($connection->$database->lastError());exit; // Var dump and /Exit/ } But pretty much regardless of what I try to update (whether it exists or not) I get these same basic results: array(4) { ["err"]=> NULL ["updatedExisting"]=> bool(true) ["n"]=> float(1) ["ok"]=> float(1) } Any help or direction would be greatly appreciated.

    Read the article

  • Does Zend Navigation view helper has a uri integrity check?

    - by simple
    I am kind a confused, though I am using the uri's, it doesn't render child menu items when uri has nonexisting element(madule name||controller name) <tours> <label>Tours</label> <uri>/admin/tour/index/list</uri> <class>admin-main-navigation-item ui-corner-right</class> <pages> <add> <label>Add</label> <uri>/admin/tour/index/form/type/add</uri> </add> <edit> <label>Edit</label> <uri>/admin/tour/index/list</uri> </edit> </pages> </tours> the edit and add item are not rendered because of the "admin" - is a dummy word that I use to distinguish if it is a frontend or backend of the module. any help would be appreciated, thanks

    Read the article

  • How do I check if selected value of the ListBox is not selected in C#?

    - by Sahat
    This code will display the selected value from the listbox. E.g. if I sellect Item 1 I will get the following output: You have selected Item 1. Label1.Text = "You have selected " + DropDownList1.SelectedValue + "<br />"; But if I don't select anything and click on Submit button, I will get: You have selected What would I need to make it display "You have not selected anything. Please select at least 1 item." UPDATE: I am using ASP.NET WebForms.

    Read the article

  • Best way to check for nullable bool in a condition expression (if ...)

    - by FireSnake
    I was wondering what was the most clean and understandable syntax for doing condition checks on nullable bools. Is the following good or bad coding style? Is there a way to express the condition better/more cleanly? bool? nullableBool = true; if (nullableBool ?? false) { ... } else { ... } especially the if (nullableBool ?? false) part. I don't like the if (x.HasValue && x.Value) style ... (not sure whether the question has been asked before ... couldn't find something similar with the search)

    Read the article

  • How can I right a regular expression to check if the 2 properties in an asp.net control have the same name?

    - by xaisoft
    I have the following asp.net custom validator: <asp:CustomValidator runat="server" ClientValidationFunction="valUCRRequired" ID="valUCRRequired" ErrorMessage="Field 7-Date/Time Between is Required" ControlToValidate="DTE_FROM" /> Notice that the ID and ClientValidationFunction have the same value. I want to do a regular expression search where they are the same. Right now, I am just searching for all CustomValidators.

    Read the article

  • How do to check to see if the user has a Google account.

    - by skrat
    Is there any safe way to detect, on a web page, client side (JS), whether user has an Google/Yahoo/Live/? account? I know about some suspicious ways to do this by styling visited links and then sneaking on computed style attribute, but it's more of a hack, Mozilla and maybe other are planning to crack down on this, as it might be abused. But I need this to allow users more integration with their identity providers, like: Have a Google account? ~ load contacts for sharing from Google Contacts API Have an Yahoo account? ~ load contacts for sharing from Yahoo Contacts API none of the above? show no link I don't want to provide all these options to all visitors, would be nice if I can detect the account, and provide integration only in that case.

    Read the article

  • Are there any simple, stupid, module based, cross-platform, c++ projects that I can check out of a r

    - by leeand00
    I'm looking for one just to get a general idea of how a standard C++ project should be properly setup. (If that's possible... :-p) Here are my requirements for this project: module-based (has libraries/modules that compile into a main program module) compiles cross-platform I'd like to do this so that I can get a hold on the basics of how a good C++ project is setup, and so that I can test out Premake.

    Read the article

  • How to check the system is Windows 7 or Windows Server 2008 R2 in Wix Installer?

    - by Ray
    Hi there, I am working on a windows installer project. And now I only want the software only can be installed on Windows 7 or Windows Server 2008 R2 system, I tried to use this: <Condition Message='Windows Server 2008 R2 or Windows 7 is required'>(VersionNT = 600 AND ServicePackLevel = 1) OR VersionNT = 601 </Condition> but it can still be installed on Windows Vista. Please help! Thank you!

    Read the article

  • Getting a date value in a postgres table column and check if it's bigger than todays date

    - by Roland
    I have a Postgres table called clients. The name column contains certain values eg. test23233 [987665432,2014-02-18] At the end of the value is a date, I need to compare this date, and return all records where this specific date is younger than today I tried select id,name FROM clients where name ~ '(\d{4}\-\d{1,2}\-\d{1,2})'; but this isn't returning any values. How would I go about to achieve the results I want?

    Read the article

  • Check if a pointer points to allocated memory on the heap.

    - by Ugo
    Ok, I know this question seems to have been asked many times on stackoverflow. but please read Well the answer for any address is "No you can't" but the question here is to know if a pointer points to a piece of memory allocated with malloc/new. Actually I think it could be easily implemented overriding malloc/free and keeping track of allocated memory ranges. Do you know a memory management library providing this specific tool ?

    Read the article

  • Way to check for foreign key references before deleting in MySQL?

    - by Chad Johnson
    I'm working with a content management system, and users are prompted with a confirmation screen before deleting records. Some records are foreign key referenced in other tables, and therefore they cannot be deleted. I would like to display a message beside a given record if it has foreign key references. To know whether I should display the message for a record, I could just query the referencing table and see if there are references. But the problem is, there are about a dozen tables with records potentially referencing this record, and a lookup could take a "long" time. Is there an easy way to tell whether the record is delete-ready (ie. has no foreign key references)?

    Read the article

  • C# wrapper of c++ dll; "Run-Time Check Failure #0 - The value of ESP was not properly saved across a

    - by Deveti Putnik
    Here is the code in C++ dll: extern "C" _declspec(dllexport) int testDelegate(int (*addFunction)(int, int), int a, int b) { int res = addFunction(a, b); return res; } and here is the code in C#: public delegate int AddIntegersDelegate(int number1, int number2); public static int AddIntegers(int a, int b) { return a + b; } [DllImport("tester.dll", SetLastError = true)] public static extern int testDelegate(AddIntegersDelegate callBackProc, int a, int b); public static void Main(string[] args) { int result = testDelegate(AddIntegers, 4, 5); Console.WriteLine("Code returned:" + result.ToString()); } When I start this small app, I get the message from the header of this post. Can someone help, please? Thanks in advance, D

    Read the article

  • How to check if my string is equal to null?

    - by Roman
    I want to perform some action ONLY IF my string has a meaningful value. So, I tried this. if (!myString.eqauls("")) { doSomething } and this if (!myString.eqauls(null)) { doSomething } and this if ( (!myString.eqauls("")) && (!myString.eqauls(null))) { doSomething } and this if ( (!myString.eqauls("")) && (myString!=null)) { doSomething } and this if ( myString.length()>0) { doSomething } And in all cases my program doSomething in spite on the fact that my string IS EMPTY. It equals to null. So, what is wrong with that?

    Read the article

  • Should we or should we not check in the classes folder in WEB-INF directory into SVN?

    - by Vatsala
    I use SVN, and am learning how to use it along with eclipse IDE. The first time I add classes to my package, there is no problem, the generated class files get into SVN smoothly. The moment I edit them, I get this message - "WEB-INF/classes" is obstructed. I try the "clean-up" command and the clean up command says "WEB-INF/classes" folder is locked. I use TortoiseSVN as my SVN client. I know why this is happening. It probably because the Eclipse overwrites all the files while generating classes and then causes this - Is it inappropriate to commit the class files into SVN? If not, what should I do to commit these class files smoothly?

    Read the article

  • How to submit upon a check or uncheck of checkbox in form?

    - by user281180
    I have the following in my form <td><input id="Notifications_0__IssueCreate" name="Notifications[0].IssueCreate" type="checkbox" value="true" /><input name="Notifications[0].IssueCreate" type="hidden" value="false" /></td> <td><input id="Notifications_0__AllChanges" name="Notifications[0].AllChanges" type="checkbox" value="true" /><input name="Notifications[0].AllChanges" type="hidden" value="false" /></td> In the partial view it`s wrriten as : <%int count = 0; %> <%foreach (var item in Model.List) {%> <tr> <td><%=Html.CheckBox("Notifications[" + (count) + "].IssueCreate", item.IssueCreate)%></td> <td><%=Html.CheckBox("Notifications[" + (count++) + "].AllChanges", item.AllChanges)%></td> </tr> <%} %> I want to submit to the controller upon each and every click on any of the checkbox. i.e, if user checks the checkbox, it sends the name of the checkbox and if selected or not to the controller, using ajax post. How can I do that?

    Read the article

< Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >