Search Results

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

Page 117/841 | < Previous Page | 113 114 115 116 117 118 119 120 121 122 123 124  | Next Page >

  • Grails checkbox

    - by Tomáš
    Hi gurus I have trouble with binding Boolean property in association classes. Property is set to true if I check checkbox (good), but is null if checbox is not checked. I know the problem with HTML checkbox. I know why is send "_fieldName" in params, but this "_fieldName" dont set my boolean property to false. class Person{ String title List<Group> groups = new ArrayList() static hasMany = [groups: Groups] } class Group{ String title Boolean isHidden static belongTo = Person } class PersonController{ def form = { def person = new Person() person.groups.add( new Group() ) return ["person": person] } def handleForm = { def person = new Person( params ) println person.groups[0] } } If I check checkbox: [isHidden:on, title:a, _isHidden:] println person.groups[0] //true If I don check checkbox: [title:a, _isHidden:] println person.groups[0] //null Thank a lot for help Tom I am sorry, I searched this web, but did not get actual info for my trouble.

    Read the article

  • Visual Studio 2008 Unexpected Error on Project Checkout with VSS 2005

    - by Cyberherbalist
    I've encountered an odd misbehavior of VS 2008's integration with Visual Source Safe 2005. Situation occurs when I fire up VS2008 when a project is checked out to someone else, and later they check the project back in, while I still hold the VS2008 open. If I at that time add a new item, VS2008 tells me that my action has caused a check out of the project and a new version has been loaded from source control. Fair enough, but thereafter I get an error dialog stating "Visual Studio has encountered an unexpected error" with OK at every subsequent action, such as save file and search text, making it almost unusable. This is overcome by closing VS (which pops the error dialog once more) and restarting. Is there some kind of fix or workaround to this (besides the obvious ones: "don't try to check out the project when it's checked out to someone else", or "get latest version if you think the other person may have checked the project back in")?

    Read the article

  • is_tarfile() returns True for a blank file

    - by Zachary Young
    Hello all, I am testing some logic to handle a user uploading a TAR file. When I feed a blank file to tarfile.is_tarfile() it returns True, which is not what I am expecting: $ touch tartest $ cat tartest $ python -c "import tarfile; print tarfile.is_tarfile('tartest')" True If I add some text to the file, it returns False, which I am expecting: $ echo "not a tar" > tartest $ python -c "import tarfile; print tarfile.is_tarfile('tartest')" False I could add a check at the beginning to check for a zero-length file, but based on the documentation for tarfile.is_tarfile(name) I think this is unecessary: Return True if name is a tar archive file, that the tarfile module can read. I went so far as to check the source, tarfile.py, and I can see that it is checking header blocks but I do not fully understand how it is evaluating those blocks. Am I misreading the documentation and therefore setting unfair expectations? Thank you, Zachary

    Read the article

  • Creating a future proof .NET 3.5 SP1 installer prerequisite for setup.exe AND the .MSI

    - by Ruben Bartelink
    I've demanded .NET 3.5 SP1 a la http://stackoverflow.com/questions/88136/will-a-vs2008-setup-project-update-net-3-5-sp1. This makes the setup.exe check correctly. I've also added a "SP1" launch condition to my MSI so it doesn't let the user install my .NET 3.5SP1 app via launching the MSI (and replaced the [VSDNETMSG] in the Framework condition message with one that actually mentions SP1). From a future proofing point of view, this feels wrong. I want the condition to be: (NETVer=3.5 AND Net35SPLevel=1) OR (NETVer=>3.5) not (NETVer=3.5 AND Net35SPLevel=1) Is there any way to do that? The framework check doesnt have a condition property to allow me to add a sub-condition... Yes, I could also just not worry my pretty little head about it :P If one of the MS versioning experts out there reads this, if you're going to put stuff that code depends on into SPs, can you please make the installer be able to check for it OOTB. (I really wish they had come up with a better numbering scheme - the world and its dog could see that this was going to get confusing)

    Read the article

  • endsWith in javascript

    - by Bobby Kumar
    How can I check if a string ends with a particular character in javascript? example I have a string say var str = "mystring#"; I want to know if that string str is ending with "#". How can I check it? is there a endsWith() method in javascript? one solution I have is take the length of the string and get the last character and check it. Is this the best way or there is any other way?

    Read the article

  • Emacs: annoying Flymake dialog box.

    - by baol
    Hello I have the following lines in my ~/.emacs.d/init.el (custom-set-variables '(flymake-allowed-file-name-masks (quote ( ("\\.cc\\'" flymake-simple-make-init) ("\\.cpp\\'" flymake-simple-make-init))))) (add-hook 'find-file-hook 'flymake-find-file-hook) When I open a cc/cpp file that has a Makefile with the following content in the same folder I get proper on-the-fly compilation and error reporting (Flymake will check the syntax and report errors and warnings during code editing) .PHONY: check-syntax check-syntax: $(CXX) -Wall -Wextra -pedantic -fsyntax-only $(CHK_SOURCES) The problem is that when I open a .cc file that has no corresponding Makefile i get an annoying dialog box that warns me about flymake being disabled for every file opened. Is there some hook I can use to disable that warning? Can you provide sample elisp code and explanation on how you found the proper hook?

    Read the article

  • Performance Tricks for C# Logging

    - by Charles
    I am looking into C# logging and I do not want my log messages to spend any time processing if the message is below the logging threshold. The best I can see log4net does is a threshold check AFTER evaluating the log parameters. Example: _logger.Debug( "My complicated log message " + thisFunctionTakesALongTime() + " will take a long time" ) Even if the threshold is above Debug, thisFunctionTakesALongTime will still be evaluated. In log4net you are supposed to use _logger.isDebugEnabled so you end up with if( _logger.isDebugEnabled ) _logger.Debug( "Much faster" ) I want to know if there is a better solution for .net logging that does not involve a check each time I want to log. In C++ I am allowed to do LOG_DEBUG( "My complicated log message " + thisFunctionTakesALongTime() + " will take no time" ) since my LOG_DEBUG macro does the log level check itself. This frees me to have a 1 line log message throughout my app which I greatly prefer. Anyone know of a way to replicate this behavior in C#?

    Read the article

  • Verify mail server connection programmatically in ColdFusion

    - by Sergii
    I'm using custom SMTP servers and would like to verify the connection when user enters his own server credentials. Exactly the same type of check as Adobe CF and Railo allow to do when adding mail server. Sure, this does not guarantee that delivery will be working, but at least to check that entered server/username/pass are valid. I can see one tricky way: try to send the email with cfmail and check the mail log. But I believe that it can be done with more elegant. Is there any Java library available with standard ACF/Railo distro to help me? How would I use them? Examples are highly appreciated. Thanks in advance. EDIT: Please don't be confused with Java tag present. Solution needed in CFML. Though it can use some Java libraries, if applicable.

    Read the article

  • No method found compiler warning

    - by Magic Bullet Dave
    I have create a class from a string, check it is valid and then check if it responds to a particular method. If it does then I call the method. It all works fine, except I get an annoying compiler warning: "warning: no '-setCurrentID:' method found". Am I doing something wrong here? Is there anyway to tell the compiler all is ok and stop it reporting a warning? The here is the code: // Create an instance of the class id viewController = [[NSClassFromString(class) alloc] init]; // Check the class supports the methods to set the row and section if ([viewController respondsToSelector:@selector(setCurrentID:)]) { [viewController setCurrentID:itemID]; } // Push the view controller onto the tab bar stack [self.navigationController pushViewController:viewController animated:YES]; [viewController release]; Cheers Dave

    Read the article

  • Procedures before checking in to source control?

    - by Mongus Pong
    I am starting to get a reputation at work as the "guy who breaks the builds". The problem is not that I am writing dodgy code, but when it comes to checking my fixes back into source control, it all goes wrong. I am regularly doing stupid things like : forgetting to add new files accidentally checking in code for a half fixed bug along with another bug fix forgetting to save the files in VS before checking them in I need to develop some habits / tools to stop this. What do you regularly do to ensure the code you check in is correct and is what needs to go in? Edit I forgot to mention that things can get pretty chaotic in this place. I quite often have two or three things that Im working on in the same code base at any one time. When I check in I will only really want to check in one of those things.

    Read the article

  • Are there any programs to aid in the mass-editing of Visual SourceSafe checkin comments?

    - by Schnapple
    I know that in Visual SourceSafe you can go in and drill down to the history of an individual file and then drill down to an individual check-in and apply a comment to the check-in that way but that's tedious and time consuming - if you have a lot of files that were checked in at the same time and you want the same comment to apply to all of them this will take forever. I use the tool VSSReporter to generate reports of checkins and other stuff from VSS, but it cannot edit anything, only report on them. Are there any tools which will let you go back and retroactively apply comments to check-ins in an efficient and easy manner?

    Read the article

  • md5 hash for file without File Attributes

    - by Glennular
    Using the following code to compute MD5 hashs of files: Private _MD5Hash As String Dim md5 As New System.Security.Cryptography.MD5CryptoServiceProvider Dim md5hash() As Byte md5hash = md5.ComputeHash(Me._BinaryData) Me._MD5Hash = ByteArrayToString(md5hash) Private Function ByteArrayToString(ByVal arrInput() As Byte) As String Dim sb As New System.Text.StringBuilder(arrInput.Length * 2) For i As Integer = 0 To arrInput.Length - 1 sb.Append(arrInput(i).ToString("X2")) Next Return sb.ToString().ToLower End Function We are getting different hashes depending on the create-date and modify-date of the file. We are storing the hash and the binary file in a SQL DB. This works fine when we upload the same instance of a file. But when we save a new instance of the file from the DB (with today's date as the create/modify) on the file-system and then check the new hash versus the MD5 stored in the DB they do not match, and therefor fail a duplicate check. How can we check for a file hash excluding the file attributes? or is there a different issue here?

    Read the article

  • QTest::keyPress is not returning nativeScanCode

    - by vels
    Hi, I am simulating F1 key using QTest::keyPress() method to test keypress event, on simulation of F1 key when i check for nativeScanCode, it returns 0 value. can any one help? //Code snippet //To simulate F1 key press QTest::keyPress(&kboard, Qt::Key_F1); //To check keypress Event void keyboard::keyPressEvent(QKeyEvent* ke) { if ( ke->type() == QEvent::KeyPress ) { QKeyEvent* key_event = static_cast<QKeyEvent *>(ke); //To check F1 key simulation if (key_event->key() == Qt::Key_F1) { int nativeCode = key_event->nativeScanCode(); qDebug()<< nativeCode <<endl; } } } Thanks, vels

    Read the article

  • Alert show when extension of FileUpLoads are not allowed

    - by Vy Clarks
    I have a asp FileUpload control in my aspx page. And the code behind to check file's extension and then insert them into database: private string Write(HttpPostedFile file, string table) { string fileNameMain = Path.GetFileName(file.FileName); // check for the valid file extension string fileExtension = Path.GetExtension(fileNameMain).ToLower(); if (fileExtension.Equals(".pdf") || fileExtension.Equals(".doc")) { ...insert fileupload into database } else { LabelError.Text = "Extension of files are not allowed."; return null; } } With the code above, it checks the extension and then show the message "Extension of files are not allowed." in a LabelError if the fileupload is not allowed. Now, I'm required to do the "check-extension" in the other way: at the moment the client click and choose FileUpload, an alert show "Extension of files are not allowed.". I need a way to make an alert show at the momment the FileUpload choosed in browser. Help!!!!

    Read the article

  • advancedDatagrid multipleSelection: Was a row already selected?

    - by Werner
    Hi, after multiple Selection in a advanced datagrid, I want to check if the clicked row, was already selected. Anyway my idea below (in the nested if clause I want to check if the newly clicked item's processing data is already in the added Array Collection) is not working, but I assume there must be a better way to differiante if an click was made on a already selected row. Probably I was not as clear in my description as needed, please ask your questions! Thank you very much, already in advance, Werner model.processingData = out; if (model.selectedIndices.length > 1){ //check if item already added var tempInt:int = model.multipleProcessingData.getItemIndex(model.processingData); if (tempInt == -1){ model.multipleProcessingData.addItem(model.processingData); } } else{ model.multipleProcessingData.removeAll(); model.multipleProcessingData.addItem(model.processingData); }

    Read the article

  • Error : while creating a file.

    - by Harikrishna
    I am storing records of datatable to csv file with the help of the following code : // we'll use these to check for rows with nulls var columns = yourTable.Columns .Cast<DataColumn>(); using (var writer = new StreamWriter(yourPath)) { for (int i = 0; i < yourTable.Rows.Count; i++) { DataRow row = yourTable.Rows[i]; // check for any null cells if (columns.Any(column => row.IsNull(column))) continue; string[] textCells = row.ItemArray .Select(cell => cell.ToString()) // may need to pick a text qualifier here .ToArray(); // check for non-null but EMPTY cells if (textCells.Any(text => string.IsNullOrEmpty(text))) continue; writer.WriteLine(string.Join(",", textCells)); } } But I get the error like System.UnauthorizedAccessException was unhandled Message="Access to the path 'D:\\Harikrishna\\Monthly Reports' is denied." What can be the problem and solution ?

    Read the article

  • Javascript: addClassName if input is checked and removeClassName if it was un-checked

    - by BoDiE2003
    Im trying to select all the li tags of the document and check if it hasClassName('yes') so if it has, it will remove it. But im having a TypeError: Object [object HTMLLIElement], has no method 'hasClassName' error. This is the DOM method: document.observe("dom:loaded", function() { $(document.body).select('input').each(function(element) { element.observe('click', function() { init(); }); init(); }); }); The previous code will take the init fuction and check the if there are checked inputs and add them the 'yes' class name, but if I un-check those inputs, the class remains. This is the funcion that Im trying to do dynamic (add and remove class 'yes'); function init() { $(document.body).select('input').each(function(element) { if (element.checked) { element.up('li').addClassName('yes'); } if ($(document.body).select('li').hasClassName('yes')) { element.removeClassName('yes'); } }) } Can you help me solving the last part of this function, so the removeclassname method will work? Thank you

    Read the article

  • Verify mail server connection programmatically

    - by Sergii
    I'm using custom SMTP servers and would like to verify the connection when user enters his own server credentials. Exactly the same type of check as Adobe CF and Railo allow to do when adding mail server. Sure, this does not guarantee that delivery will be working, but at least to check that entered server/username/pass are valid. I can see one tricky way: try to send the email with cfmail and check the mail log. But I believe that it can be done with more elegant. Is there any Java library available with standard ACF/Railo distro to help me? How would I use them? Examples are highly appreciated. Thanks in advance.

    Read the article

  • C++: set of C-strings

    - by Nicholas
    I want to create one so that I could check whether a certain word is in the set using set::find However, C-strings are pointers, so the set would compare them by the pointer values by default. To function correctly, it would have to dereference them and compare the strings. I could just pass the constructor a pointer to the strcmp() function as a comparator, but this is not exactly how I want it to work. The word I might want to check could be part of a longer string, and I don't want to create a new string due to performance concerns. If there weren't for the set, I would use strncmp(a1, a2, 3) to check the first 3 letters. In fact, 3 is probably the longest it could go, so I'm fine with having the third argument constant. Is there a way to construct a set that would compare its elements by calling strncmp()? Code samples would be greatly appreciated.

    Read the article

  • Is Valid IMAGE_DOS_SIGNATURE

    - by iira
    I want to check a file has a valid IMAGE_DOS_SIGNATURE (MZ) function isMZ(FileName : String) : boolean; var Signature: Word; fexe: TFileStream; begin result:=false; try fexe := TFileStream.Create(FileName, fmOpenRead or fmShareDenyNone); fexe.ReadBuffer(Signature, SizeOf(Signature)); if Signature = $5A4D { 'MZ' } then result:=true; finally fexe.free; end; end; I know I can use some code in Windows unit to check the IMAGE_DOS_SIGNATURE. The problem is I want the fastest way to check IMAGE_DOS_SIGNATURE (for a big file). I need your some suggestion about my code or maybe a new code? Thanks

    Read the article

  • How do I catch generic fault exceptions in Fitnesse?

    - by Dan Ryan
    Previously within my Fitnesse fixture I was specifying an expected WCF exception using: exception[FaultException] Since then I have converted the WCF service to return a strongly typed FaultContract. I am now getting the following failure message: exception[FaultException`1: "A file with the name DMS Documents/testFileWord.doc already exists. It was last modified by SHAREPOINT\system on 09 Mar 2010 15:36:14 -0000."] This is not unexpected but how do I check for strongly typed fault exceptions? Please note I cannot include the fault message as part of the check as it contains a date which changes (I check this separately).

    Read the article

  • GIT: Checkout to a "Really" Specific Folder

    - by Rafid K. Abdullah
    I want to export, checkout, or whatever you call it from the index, HEAD, or any other commit, to a specific folder, how is that possible? Similar questions have already been asked: GIT: Checkout to a specific folder How to do a "git export" (like "svn export") But the problem with the proposed solution is that they preserve the relative path. So for example, if I use the mentioned method to check out the file nbapp/editblog.php to the folder temp, the file would be checked out in temp/nbapp/editblog.php! Is there anyway to checkout to 'temp' directly? Also, another important thing is to be able to check the HEAD or any other commit. The checkout-index (which allows using the --prefix option to checkout to a specific folder, while normal checkout doesn't allow) checks out only the index. What if I want to check out a file from a certain commit to a certain folder? A similar question has alread

    Read the article

  • Is there a DOS command for verifying what version of .NET is installed

    - by Travis
    I have set of scripts for doing scripted installs. You can use the scripts on any server 2008 machine. However, I need to check if .NET 3.5 has been installed (before the scripts run) using a dos batch file. Is that possible? I know I can check if a file in the C:\WINDOWS\Microsoft.NET\Framework\v3.5 exists, but it would be nice to have something a little more reliable. I would like to check if it's actually installed, not just if the dir/file exists. Hope that makes sense. Thanks in advance.

    Read the article

  • Unexpected { expected ( ?

    - by Luke
    Parse error: syntax error, unexpected '{', expecting '(' in /home/a7237281/public_html/include/session.php on line 313 this is the error i get, relating to this code //check the emails $field = "email"; //Use field name for email $field2 = "email2"; if(!$subemail || strlen($subemail = trim($subemail)) == 0) { $form->setError($field, "* Email not entered"); } else if { /* Check if valid email address */ $regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*" ."@[a-z0-9-]+(\.[a-z0-9-]{1,})*" ."\.([a-z]{2,}){1}$"; if(!eregi($regex,$subemail)) { $form->setError($field, "* Email invalid"); } else if ($subemail !== $subemail2) { $form->setError($field2, "* Emails does not match"); } $subemail = stripslashes($subemail); } /* Check if email is already in use */ else($database->emailTaken($subemail)) { $form->setError($field, "* Email address already in use"); } And its referring to the { after the first else if. I have edited with the entire piece of code, what could i do now?

    Read the article

  • How to develop a site for multiple browsers these days ?

    - by Misha Moroshko
    I would like to develop a site that works in all major browsers. I wonder what tools are available these days that may help me to check the functionality across browsers. I mean after I add some functionality to my site, I want to check it in all browsers. Are there any tools/software for this task ? I understand that it's impossible to check everything because it is pretty subjective if something works as expected or not, but maybe there are some tools that may found major errors (like IE is not supporting indexOf).

    Read the article

< Previous Page | 113 114 115 116 117 118 119 120 121 122 123 124  | Next Page >