Search Results

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

Page 87/841 | < Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >

  • How to not check in Eclipse specific project files?

    - by futlib
    I don't want to force people into using a specific IDE for development, so our projects look basically like this: SomeProject src lib build.xml No IDE specific files whatsoever. However, many people prefer Eclipse and it is their valid complain that it is annoyingly difficult to set up an Eclipse project from an Ant build file if that project is checked into a VCS. That's a very old bug, so I don't really expect it to be fixed soon. I don't want all those weird Eclipse project files in the project root, but if it was the only way, I would accept having the eclipse project files in a subdirectory "eclipse". I thought Eclipse's linked resources were capable of just that, but I was wrong, it doesn't really work. How do you solve this problem? Are you checking in the .settings directory. etc. into your project's root?

    Read the article

  • Grabbing rows from MySql where current date is in between start date and end date (Check if current date lies between start date and end date)

    - by Jordan Parker
    I'm trying to select from the database to get the "campaigns" that dates fall into the month. So far i've been successful in grabbing rows that starts or ends inside the current month. What I need to do now is select rows that start in one month and ends a few months down the line ( EG: It's the 3rd month in the year, and there's a "campaign" that runs from the 1st month until the 5th. other example There is a "campaign" that runs from 2012 until 2013 ) I'm hoping there is some way to select via MySql all rows in which a capaign may run. If not should I grab all data in the database and only show the ones that run via the current month. I have already made a function that displays all the days inbetween each date inside an array, which is called "dateRange". I've also created another which shows how many days the campaign runs for called "runTime". Select all (Obviously) $result = mysql_query("SELECT * FROM campaign"); Select Starting This Month $result = mysql_query("SELECT * FROM campaign WHERE YEAR( START ) = YEAR( CURDATE( ) ) AND MONTH( START ) = MONTH( CURDATE( ) )"); Select Ending This Month $result = mysql_query("SELECT * FROM campaign WHERE YEAR( END ) = YEAR( CURDATE( ) ) AND MONTH( END ) = MONTH( CURDATE( ) ) LIMIT 0 , 30"); Code sample while($row = mysql_fetch_array($result)) { $dateArray = dateRange($row['start'], $row['end']); echo "<h3>" . $row['campname'] . "</h3> Start " . $row['start'] . "<br /> End " . $row['end']; echo runTime($row['start'], $row['end']); print_r($dateArray); } In regards to the dates, MySql database only holds start date and end date of the campaign.

    Read the article

  • Would you use a UITableViewController to implement a check list on the iPhone?

    - by Tony
    I am creating an application that will have a list of items that can be checked. I just implemented it as a Table View by subclassing UITableViewController. Now I am realizing that since individual items don't have a child view (i.e. clicking on an item "Dinner" does not need to pull up a child list of "Dinner Items") then maybe I should have just created a custom view for the list. In your experience, would it be better to use the Table View or create something custom? thanks! p.s. I am a bit new to iPhone dev, but NOT new to C

    Read the article

  • how to check whether some entered InnerText is present in an XML or not and to give an exception?

    - by Damodar
    Hey all, I have written a code in C# - XML which checks whether a value is there or not in a given XML document and prints the value and the particular tag associated with the value. When we enter the Value of the Inner Text it will look for the value in the document and find it. I dont understand what exception to catch when the entered value is not there in the document. I tried doing like this but it is not working. 1. if (inpXMLString != AppChildNode.InnerText) throw new InvalidDataException("The entered value" + " " + inpXMLString + " " + "doesnot exist"); Here : inpXMLstring = entered value; AppChildNode.InnerText = value of the tags searched. 2. catch (System.Xml.XmlException e1) { Console.WriteLine(e1.Message); } this does not give any exception when the entered value is not there in the XML document. Please help me in this regard.

    Read the article

  • What's the fastest way to check the availability of a SQL Server server?

    - by mwolfe02
    I have an MS Access program in use in multiple locations. It connects to MS SQL Server tables, but the server name is different in each location. I am looking for the fastest way to test for the existence of a server. The code I am currently using looks like this: ShellWait "sc \\" & ServerName & " qdescription MSSQLSERVER > " & Qt(fn) FNum = FreeFile() Open fn For Input As #FNum Line Input #FNum, Result Close #FNum Kill fn If InStr(Result, "SUCCESS") Then ... ShellWait: executes a shell command and waits for it to finish Qt: wraps a string in double quotes fn: temporary filename variable I run the above code against a list of server names (of which only one is normally available). The code takes about one second if the server is available and takes about 8 seconds for each server that is unavailable. I'd like to get both of these lower, if possible, but especially the fail case as this one happens most often.

    Read the article

  • Javascript: Check if checkboxes are selected on page load and add a class to parent html li

    - by BoDiE2003
    Im looking a way to do it with prototype, this js, needs to loads with the page and interate over all the elements (inputs - checkboxes, in this case) with the given id and assign a class to its parent <li></li> The JS is: function changeSelectionStyle(id) { var inputId = id.substr(0,id.length-2); if(document.getElementById(inputId).checked){document.getElementById(id).className = 'yes';} alert(document.getElementById(inputId).checked); /* * if(document.getElementById(id).className != 'yes'){ * document.getElementById(id).className = 'yes'; * } else{document.getElementById(id).className = '';} */ } And the HTML (piece of it) that interacts with this JS is: <li id="selectedAuthorities-4_1li"> <input type="checkbox" id="selectedAuthorities-4_1" name="selectedAuthorities" value="ROLE_ADD_COMMENT_TO_CV" checked="checked" onclick="changeSelectionStyle(this.id + 'li'); checkFatherSelection(this.id);"> <a href="#" onclick="document.getElementById('selectedAuthorities-4_1').click(); return false;"> Agregar comentario <samp><b></b>Permite agregar comentario en el detalle</samp> </a> </li> After iteration, checking is the checkbox is checked, it has to add the class="yes" to the <li id="selectedAuthorities-4_1li">

    Read the article

  • What regular expression do I need to check for some non-latin characters?

    - by zeckdude
    I am checking a field if it is Latin Characters or not. var foreignCharacters = $("#foreign_characters").val(); var rlatins = /[\u0000-\u007f]/; if (rlatins.test(foreignCharacters)) { alert("This is Latin Characters"); } else { alert("This is non-latin Characters"); } This works well, but I would like to change it so when I enter any non-latin characters, such as chinese characters, along with a space(which is within that range I am using currently) it will still say it is non-latin characters. How can I change the regular expression I have to do that?

    Read the article

  • Can I improve this regex check for valid domain names?

    - by Josh
    So, I have been working on this domain name regular expression. So far, it seems to pick up domain names with SLDs and TLDs (with the optional ccTLD), but there is duplication of the TLD listing. Can this be refactored any further? params[:domain_name].downcase.strip.match(/^[a-z0-9\-]{2,63} \.((a[cdefgilmnoqrstuwxz]|aero|arpa)|(b[abdefghijmnorstvwyz]|biz)| (c[acdfghiklmnorsuvxyz]|cat|com|coop)|d[ejkmoz]|(e[ceghrstu]|edu)|f[ijkmor]| (g[abdefghilmnpqrstuwy]|gov)|h[kmnrtu]|(i[delmnoqrst]|info|int)| (j[emop]|jobs)|k[eghimnprwyz]|l[abcikrstuvy]| (m[acdghklmnopqrstuvwxyz]|me|mil|mobi|museum)|(n[acefgilopruz]|name|net)|(om|org)| (p[aefghklmnrstwy]|pro)|qa|r[eouw]|s[abcdeghijklmnortvyz]| (t[cdfghjklmnoprtvwz]|travel)|u[agkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw]) (\.((a[cdefgilmnoqrstuwxz]|aero|arpa)|(b[abdefghijmnorstvwyz]|biz)| (c[acdfghiklmnorsuvxyz]|cat|com|coop)|d[ejkmoz]|(e[ceghrstu]|edu)|f[ijkmor]| (g[abdefghilmnpqrstuwy]|gov)|h[kmnrtu]|(i[delmnoqrst]|info|int)| (j[emop]|jobs)|k[eghimnprwyz]|l[abcikrstuvy]| m[acdghklmnopqrstuvwxyz]|mil|mobi|museum)| (n[acefgilopruz]|name|net)|(om|org)| (p[aefghklmnrstwy]|pro)|qa|r[eouw]|s[abcdeghijklmnortvyz]| (t[cdfghjklmnoprtvwz]|travel)|u[agkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw]))?$/)

    Read the article

  • Condition check inside a function or before its call?

    - by Ashwin
    Which of these 2 programming styles do you prefer? Why? Are there particular advantages to one over the other? // Style 1 if (doBorder) doTheBorder(); if (doFrame) doTheFrame(); if (doDraw) doTheDraw(); void doTheBorder() { // ... } void doTheFrame() { // ... } void doTheDraw() { // ... } // Style 2 doTheBorder(); doTheFrame(); doTheDraw(); void doTheBorder() { if (!doBorder) return; // ... } void doTheFrame() { if (!doFrame) return; // ... } void doTheDraw() { if (!doDraw) return; // ... }

    Read the article

  • Php 5 and mysql connecting gives error ...code and error in there check out and plz..plz help....

    - by user309381
    **mysql_query() [function.mysql-query]: Access denied for user 'SYSTEM'@'localhost' (using password: NO) in C:\wamp\www\photo_gallery\includes\database.php on line 56 Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\wamp\www\photo_gallery\includes\database.php on line 56 The Query has problemAccess denied for user 'SYSTEM'@'localhost' (using password: NO) i have set the password for root and grant privilege all for root.Why it soes show like SYSTEM@localhost i dont have SYSTEM .** class MySQLDatabase { public $connection; function _construct() { $this-open_connection(); } public function open_connection() { /* $DB_SERVER = "localhost"; $DB_USER = "root"; $DB_PASS = ""; $DB_NAME = "photo_gallery";*/ $this-connection = mysql_connect($DBSERVER,$DBUSER,$DBPASS); if(!$this-connection) { die("Database Connection Failed" . mysql_error()); } else { $db_select = mysql_select_db($DBNAME,$this-connection); if(!$db_select) { die("Database Selection Failed" . mysql_error()); } } } function mysql_prep($value) { if (get_magic_quotes_gpc()) { $value = stripslashes($value); } // Quote if not a number if (!is_numeric($value)) { $value = "'" . mysql_real_escape_string($value) . "'"; } return $value; } public function close_connection() { if(isset($this->connection)) { mysql_close($this->connection); unset($this->connection); } } public function query($sql) { //$sql = "SELECT*FROM users where id = 1"; $result = mysql_query($sql); $this->confirm_query($result); //$found_user = mysql_fetch_assoc($result); //echo $found_user; return $found_user; } private function confirm_query($result) { if(!$result) { die("The Query has problem" . mysql_error()); } } } $database = new MySQLDatabase(); ?

    Read the article

  • C#: how to check and display the content of a folder?

    - by user147685
    I'm not sure whether this topics has been disscussed before or not, but I'm not sure the exact word to search for it. What method/class should I use? The program has 3 buttons: 1) for folder browsing, 2) scan for the selected folder content, and 3) open the file. When user browse the selected folder*(1), user click scan button to scan from the first file until the last available files and listed it text box(2)* and from that user can decide whether to open the files or not*(3)*. Here are what have I done so far (no 1 and 3): //For browse. private void browse2() { if (folderBrowserDialog1.ShowDialog() == DialogResult.OK) { this.txtDest.Text = folderBrowserDialog1.SelectedPath; } } //For opening folder. private void btnOpen_Click(object sender, EventArgs e) { try { Process.Start(txtDest.Text); } catch { MessageBox.Show("Please select one file/folder"); } }

    Read the article

  • How can I check if I successfully cleared IE's cache?

    - by Motti
    I'm clearing IE's cache programmatically using DeleteUrlCacheEntry() and I would like to verify that I did it correctly. Should I expect the Temporary Internet Files folder to be empty after clearing the cache? (it isn't) If not then what is the simplest way to determine whether the browser is using its cache when accessing a site?

    Read the article

  • How can I check if a user has written his username and password correctly?

    - by Sergio Tapia
    I'm using a Linq-to-SQL class called Scans.dbml. In that class I've dragged a table called Users (username, password, role) onto the graphic area and now I can access User object via a UserRepository class: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Scanner.Classes { public class UserRepository { private ScansDataContext db = new ScansDataContext(); public User getUser(string username) { return db.Users.SingleOrDefault(x => x.username == username); } public bool exists(string username) { } } } Now in my Login form, I want to use this Linq-to-SQL goodness to do all the data related activities. UserRepository users = new UserRepository(); private void btnLogin_Click(object sender, EventArgs e) { loginToSystem(); } private void loginToSystem() { if (users.getUser(txtUsername.Text)) { } //If txtUsername exists && User.password == Salt(txtPassword) //then Show.MainForm() with User.accountType in constructor to set permissions. } I need help with verifying that a user exists && that that users.password is equal to SALT(txtpassword.text). Any guidance please?

    Read the article

  • how to check the mail functionality in local host server?

    - by udaya
    Hi I am sending email from my localhost There occurs a server error Failed to connect to mailserver at "smtp.bizmail.yahoo.com" port 465, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() when i host my project to the server my function works Now i need a solution such that the mail functionality must work in my localhost too

    Read the article

  • Foolishness Check: PHP Class finds Class file but not Class in the file.

    - by Daniel Bingham
    I'm at a loss here. I've defined an abstract superclass in one file and a subclass in another. I have required the super-classes file and the stack trace reports to find an include it. However, it then returns an error when it hits the 'extends' line: Fatal error: Class 'HTMLBuilder' not found in View/Markup/HTML/HTML4.01/HTML4_01Builder.php on line 7. I had this working with another class tree that uses factories a moment ago. I just added the builder layer in between the factories and the consumer. The factory layer looked almost exactly the same in terms of includes and dependencies. So that makes me think I must have done something silly that's causes the HTMLBuilder.php file to not be included correctly or interpreted correctly or some such. Here's the full stack trace (paths slightly altered): # Time Memory Function Location 1 0.0001 53904 {main}( ) ../index.php:0 2 0.0002 67600 require_once( 'View/Page.php' ) ../index.php:3 3 0.0003 75444 require_once( 'View/Sections/SectionFactory.php' ) ../Page.php:4 4 0.0003 81152 require_once( 'View/Sections/HTML/HTMLSectionFactory.php' ) ../SectionFactory.php:3 5 0.0004 92108 require_once( 'View/Sections/HTML/HTMLTitlebarSection.php' ) ../HTMLSectionFactory.php:5 6 0.0005 99716 require_once( 'View/Markup/HTML/HTMLBuilder.php' ) ../HTMLTitlebarSection.php:3 7 0.0005 103580 require_once( 'View/Markup/MarkupBuilder.php' ) ../HTMLBuilder.php:3 8 0.0006 124120 require_once( 'View/Markup/HTML/HTML4.01/HTML4_01Builder.php' ) ../MarkupBuilder.php:3 Here's the code in question: Parent class (View/Markup/HTML/HTMLBuilder.php): <?php require_once('View/Markup/MarkupBuilder.php'); abstract class HTMLBuilder extends MarkupBuilder { public abstract function getLink($text, $href); public abstract function getImage($src, $alt); public abstract function getDivision($id, array $classes=NULL, array $children=NULL); public abstract function getParagraph($text, array $classes=NULL, $id=NULL); } ?> Child Class, (View/Markup/HTML/HTML4.01/HTML4_01Builder.php): <?php require_once('HTML4_01Factory.php'); require_once('View/Markup/HTML/HTMLBuilder.php'); class HTML4_01Builder extends HTMLBuilder { private $factory; public function __construct() { $this->factory = new HTML4_01Factory(); } public function getLink($href, $text) { $link = $this->factory->getA(); $link->addAttribute('href', $href); $link->addChild($this->factory->getText($text)); return $link; } public function getImage($src, $alt) { $image = $this->factory->getImg(); $image->addAttribute('src', $src); $image->addAttribute('alt', $alt); return $image; } public function getDivision($id, array $classes=NULL, array $children=NULL) { $div = $this->factory->getDiv(); $div->setID($id); if(!empty($classes)) { $div->addClasses($classes); } if(!empty($children)) { $div->addChildren($children); } return $div; } public function getParagraph($text, array $classes=NULL, $id=NULL) { $p = $this->factory->getP(); $p->addChild($this->factory->getText($text)); if(!empty($classes)) { $p->addClasses($classes); } if(!empty($id)) { $p->setID($id); } return $p; } } ?> I would appreciate any and all ideas. I'm at a complete loss here as to what is going wrong. I'm sure it's something stupid I just can't see...

    Read the article

  • Custom permalinks switching function. Please check this logic...

    - by Scott B
    I've got a setting in my theme options panel to allow the user to switch the permalinks setting to support friendly URLs. I'm only allowing /%postname%/ and /%postname%.html as options. I don't want to be triggering an htaccess rewrite everytime someone accesses a page on the site or views theme options, so I'm trying to code this to avoid that. I've got an input field in theme options that's called $myTheme_permalinks. The default value for this is "/%postname%/" but the user can also change it to "/%postname%.html" Here's the code at the top of theme options to handle this setting. Does this look sound? if(get_option('myTheme_permalinks') =="/%postname%/" && get_option('permalink_structure') !== "/%postname%/" || !get_option('myTheme_permalinks')) { require_once(ABSPATH . '/wp-admin/includes/misc.php'); require_once(ABSPATH . '/wp-admin/includes/file.php'); global $wp_rewrite; $wp_rewrite->set_permalink_structure('/%postname%/'); $wp_rewrite->flush_rules(); update_option('permalink_structure','/%postname%/'); update_option('myTheme_permalinks','/%postname%/'); } else if (get_option('myTheme_permalinks') =="/%postname%.html" && get_option('permalink_structure') !== "/%postname%.html" && ) { require_once(ABSPATH . '/wp-admin/includes/misc.php'); require_once(ABSPATH . '/wp-admin/includes/file.php'); global $wp_rewrite; $wp_rewrite->set_permalink_structure('/%postname%.html'); $wp_rewrite->flush_rules(); update_option('permalink_structure','/%postname%.html'); }

    Read the article

  • Re-order list in Python to ensure it starts with check values.

    - by S_Swede
    Dear all, I'm reading in serial data using Pyserial, to populate a list of 17 values (1byte each) at a sampling rate of 256Hz. The bytes I ultimately want to use are the 5th to 8th in the list. Providing no bytes are dropped, the first two values of the stream are always the same ('165','90'). I'm getting quite a few dropped values though, and my list values are shifting, so when I read the 5th-8th bytes, they aren't the correct values. I've partially combatted this by ensuring that before the wanted segement is captured, the first few values are checked against what they should be (i.e. if mylist[0]==165 &....). This is crude but ok since the chances of these two values appearing adjacent to each other in the list elsewhere is small. The problem is that this means as soon as the bytes shift, I'm losing a load of values, until it eventually realigns. My question is: what code can I use to either: a) Force the list to realign once it has been detected that it no longer starts with 165,90. (elif....). b) Detect where '165' & '90' are (next to each other) in the list and extract the values I want in relation to their position (next but one, onwards). Thanks in advance S_S Just noticed from the related Qs that I could use mylist.append(mylist.pop(0)) multiple times until they are in the right place. Is there a better way that anyone can suggest?

    Read the article

< Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >