Search Results

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

Page 59/841 | < Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >

  • Perl check for the existence of a value in a regular array

    - by Mel
    I am trying to figure out a way of checking for the existence of a value in an array without iterating through the array. I am reading a file for a parameter. I have a long list of parameters I do not want to deal with. I placed these unwanted parameters in an array @badparams I want to read a new parameter and if it does not exist in @badparams, process it. If it does exist in @badparams, go to the next read.

    Read the article

  • Check if previous clicked value is inside an array

    - by Lelly
    I have a list with different categories. All the list item are clickable. I want the user to pick between 1 and 3 items. They can toggle their choice, but maximum is alway 3. So far, so good. Where it get tricky for me, is that I have some special categories that can't be combined with any others. When a user click on one of these, all the other categories deselect and they can't add any other, (these item have only 1 category selection possible) Exemple: Let's say "Car" is a special category. If they click on Car, everything else deselect, Car is selected, and they can't select anything else. BUT they can click again on Car to deselect it, and from there the logic start over. What's missing in my code is the part in bold just above this. My code: $j('.chooseCat li').on('click',function(){ var $this = $j(this); //list item clicked var catId = $this.children("a").attr("rel"); // list item id var specialCat = ['6','36','63']; if ($this.hasClass("selected")) { $this.removeClass("selected"); $j("#categorySuggestions p.error").hide("fast") } else { if( $j.inArray(catId, specialCat) !== -1 ) { $j('.chooseCat li').removeClass("selected"); $this.addClass("selected"); } else { if ($j('.chooseCat li.selected').length <= 2){ $this.addClass("selected"); } else { $j("#categorySuggestions p.error").show("fast").html("You cannot select any more categories"); } } } }); A working jsFiddle of where Iam at: http://jsfiddle.net/nfQum/9/

    Read the article

  • Check network connection type

    - by Jufkey
    Hello, How can I programmatically retrieve the current connection type (eg. LAN or Direct connection). InternetGetConnectedState(&ConTypeRet, 0) isn't very reliable. For instance, I'm connected to a wireless network, but ConTypeRet is 18 which is INTERNET_CONNECTION_LAN & INTERNET_RAS_INSTALLED. Isn't there anyway to make sure that ConTypeRet is either INTERNET_CONNECTION_LAN or INTERNET_CONNECTION_MODEM

    Read the article

  • ASP.NET 'Check all checkboxes' control

    - by RUiHAO
    I am using visual studio 2005 c#, and doing server side coding. I have a list of checkboxes in my gridview via checkbox template. I have tried to assign a checkbox in my header template, and assigned a checkbox_checkchange method to make it such that when the checkbox at the header is checked, the list of checkboxes in the template will be checked as well. However, it does not work and I am not able to spot the mistake. Below is my code for my checkbox in header template: protected void CheckAllCB_CheckedChanged(object sender, EventArgs e) { CheckBox chk = (CheckBox)GridView1.HeaderRow.FindControl("CheckAll"); if (chk.Checked) { for (int i = 0; i < GridView1.Rows.Count; i++) { CheckBox chkrow = (CheckBox)GridView1.Rows[i].FindControl("UserSelector"); chkrow.Checked = true; } } else { for (int i = 0; i < GridView1.Rows.Count; i++) { CheckBox chkrow = (CheckBox)GridView1.Rows[i].FindControl("UserSelector"); chkrow.Checked = false; } } } Thus I tried using a button to assign the checkall command instead. However, when I clicked on the button, the page does nothing but just refreshes itself. Below is my code for the checkall and uncheckall button: private void ToggleCheckState(bool checkState) { // Iterate through the Products.Rows property foreach (GridViewRow row in GridView1.Rows) { // Access the CheckBox CheckBox cb = (CheckBox)row.FindControl("UserSelector"); if (cb != null) cb.Checked = checkState; } } protected void CheckAll_Click(object sender, EventArgs e) { ToggleCheckState(true); } protected void UncheckAll_Click(object sender, EventArgs e) { ToggleCheckState(false); } Anyone can help me identify the mistake I did in my method? Thank you UserSelection GridView template:

    Read the article

  • Check string for link

    - by Mike
    I have rather long entries being submitted to a database. How can I create a function to see if this entry has a link within it? Can someone get me started? Pretty much, I want the function to find any I'd prefer not to throw the entry into an array. Are there any other ways to accomplish this?

    Read the article

  • code to check spellings

    - by john
    hi guys, can anyone help me how to write code for checking spellings in android? or can anyone provide me the sites which will be useful to me. thanks in advance any help will be appreciated.

    Read the article

  • Check for changes with jquery and a database

    - by Steve
    I am doing a notification system. When a new post is published, users will be notified immediately by an small notification on the screen. I am currently using this: setInterval(function(){ checkForChanges(); }, 2*1000); function checkForChanges(){ $.post("http://"+ document.domain + "/posts/checkForChanges/", function(dat){ if(dat>0){ .... /*create notification*/ } }); } And i was wondering if this is the correct way to do it or not. Because, this is calling a PHP function every 2 seconds and making a query to the database. In case there are no new changes, it won't do anything... Thanks.

    Read the article

  • Check Directories in C# using Linq

    - by pm_2
    Can someone tell me what I'm doing wrong with the following Linq query? I'm trying to find the directory with the highest aphanumerical value. DirectoryInfo[] diList = currentDirectory.GetDirectories(); var dirs = from eachDir in diList orderby eachDir.FullName descending select eachDir; MessageBox.Show(dirs[0].FullName);

    Read the article

  • Check mysql_query results if DELETE query worked?

    - by Camran
    I have a DELETE query which deletes a record from a mysql db. is there any way to make sure if the delete was performed or not? I mean, for a query to FIND stuff you do $res=mysql_query($var); $nr=mysql_num_rows($res); and you get nr of rows returned. Is there any similiar method for deletion of records? Thanks

    Read the article

  • check if a process is running in python

    - by shash
    I am trying to find if the process is running based on process id. The code is as follows based on one of the post on the forum. I cannot consider process name as there are more than one process running with the same name. def findProcess( processId ): ps= subprocess.Popen("ps -ef | grep "+processId, shell=True, stdout=subprocess.PIPE) output = ps.stdout.read() ps.stdout.close() ps.wait() return output def isProcessRunning( processId): output = findProcess( processId ) if re.search(processId, output) is None: return true else: return False Output : 1111 72312 72311 0 0:00.00 ttys000 0:00.00 /bin/sh -c ps -ef | grep 71676 1111 72314 72312 0 0:00.00 ttys000 0:00.00 grep 71676 It always return true as it can find the process id in the output string. Any suggestions? Thanks for any help.

    Read the article

  • Check value existance while performing a UPDATE query

    - by nimo
    Hi, I need to perform a simple update query where the update should only be done, if there is no value with updating value (item_name). For example, DB table [item_types] item_id(PK) | item_name Assuming there exist item_id with 6, My attempt is UPDATE item_types as k SET k.item_name = 'item_1' WHERE NOT EXISTS (SELECT * FROM item_types as a WHERE a.item_name = 'item_1') AND k.item_id = '6' But this gives me error "You can't specify target table 'k' for update in FROM clause" Could you please explain the error here and how can I achieve this ? Thank you

    Read the article

  • how to check log in mysql

    - by joe
    How would i monitor a MySQL to detect SELECTs which are running slowly? Having identified a poorly performing SELECT, how would i analyse it with a view to improving it?

    Read the article

  • Add Spell Checking to Your Favorite Windows Apps

    - by Asian Angel
    Some but not all Windows apps have built-in spell checking of some sort. If you want to add spell checking to all of your apps (or a select group) then join us as we look at tinySpell. Note: There is a paid version of this software (tinySpell+) available as well for those who want extra functionality. tinySpell in Action The installation process is simple and straightforward…as soon as you have finished installing tinySpell you will see your new “System Tray Icon”. You can see tinySpell’s “Context Menu” here. Before going any further you may want to have a look through the settings to make any desired display modifications. During our tests we found it very helpful to modify the Spelling Tip options…it will make for a much nicer and easier to read display when you have a spelling error. Clicking on the Applications… Command in the Context Menu will bring up the following window. You can really finesse how active tinySpell will be here: Create a special list of apps that tinySpell will not monitor Create a custom list of apps that tinySpell will monitor If you have any particular or unique words that you would like to add to tinySpell’s Dictionary ahead of time you can do that by clicking on the Dictionary… Command in the Context Menu. Want to check the spelling of a word ahead of time or find that you are just curious about how it is spelled? Click on Open spelling window in the Context Menu to access a special spell check window. For our example we misspelled “spelling” on purpose…notice that the word has turned red. Clicking on the Check Mark Button will open a drop-down list with suggested spellings for the word that you are inquiring about. Click on the appropriate listing if you intend to copy and paste the word. Next we moved on to Notepad. As we were typing tinySpell alerted us when we typed the word “app”. You will hear a small default system sound and see a small popup as shown here if tinySpell thinks a word has been misspelled. The System Tray Icon will also change to a yellow color. You can access the list of suggested spellings by either left clicking on the small popup or the System Tray Icon. If the word is a properly spelled “abbreviation” (or special/custom) like our word here you can select Add to dictionary. Going further in our text document we once again purposely misspelled “spelling”… Left clicking on the popup gave us access to the drop-down list of suggested spellings… And clicking on the correct spelling automatically inserted it into our document in place of the misspelled word. As you can see here tinySpell was even monitoring file names when we went to save the document. Very thorough indeed. Conclusion If your favorite app does not have built-in spell checking, then tinySpell will definitely be a welcome (and very helpful) addition to your Windows system. They offer a portable version as well so you can take it with you to any PC. Links Download tinySpell *Note: The download link is located approximately half-way down the page. Similar Articles Productive Geek Tips Quick Tip: Spell Check Firefox Text Input FieldsEdit the Windows Live Writer Custom DictionaryAccess Your Favorite Google Services in Chrome the Easy WayLaunch External Apps from FirefoxNinite Makes Installing Software Incredibly Simple TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips All My Movies 5.9 CloudBerry Online Backup 1.5 for Windows Home Server Snagit 10 VMware Workstation 7 OpenDNS Guide Google TV The iPod Revolution Ultimate Boot CD can help when disaster strikes Windows Firewall with Advanced Security – How To Guides Sculptris 1.0, 3D Drawing app

    Read the article

  • How would you refactor nested IF Statements?

    - by saunderl
    I was cruising around the programming blogosphere when I happened upon this post about GOTO's: http://giuliozambon.blogspot.com/2010/12/programmers-tabu.html Here the writer talks about how "one must come to the conclusion that there are situations where GOTOs make for more readable and more maintainable code" and then goes on to show an example similar to this: if (Check#1) { CodeBlock#1 if (Check#2) { CodeBlock#2 if (Check#3) { CodeBlock#3 if (Check#4) { CodeBlock#4 if (Check#5) { CodeBlock#5 if (Check#6) { CodeBlock#6 if (Check#7) { CodeBlock#7 } else { rest - of - the - program } } } } } } } The writer then proposes that using GOTO's would make this code much easier to read and maintain. I personally can think of at least 3 different ways to flatten it out and make this code more readable without resorting to flow-breaking GOTO's. Here are my two favorites. 1 - Nested Small Functions. Take each if and its code block and turn it into a function. If the boolean check fails, just return. If it passes, then call the next function in the chain. (Boy, that sounds a lot like recursion, could you do it in a single loop with function pointers?) 2 - Sentinal Variable. To me this is the easyest. Just use a blnContinueProcessing variable and check to see if it is still true in your if check. Then if the check fails, set the variable to false. How many different ways can this type of coding problem be refactored to reduce nesting and increase maintainability?

    Read the article

  • When modeling a virtual circuit board, what is the best design pattern to check for cycles?

    - by Wallace Brown
    To make it simple assume you have only AND and OR gates. Each has two inputs and one output. The output of two inputs can be used as an input for the next gate For example: A AND B - E C AND D - F E OR F - G Assuming an arbitrary number of gates, we want to check if the circuit ever connects back into itself at an earlier state? For example: E AND F - A This should be illegal since it creates an endless cycle. What design pattern would best be able to check for these cycles?

    Read the article

  • Is there a way to check if redistributed code has been altered?

    - by onlineapplab.com
    I would like to redistribute my app (PHP) in a way that the user gets the front end (presentation) layer which is using the API on my server through a web service. I want the user to be able to alter his part of the app but at the same time exclude such altered app from the normal support and offer support on pay by the hour basis. Is there a way to check if the source code was altered? Only solution I can think of would be to get check sums of all the files then send it through my API and compare them with the original app. Is there any more secure way to do it so it would be harder for the user to break such protection?

    Read the article

  • How to avoid or minimise use of check/conditional statement in my scenario?

    - by Muneeb Nasir
    I have scenario, where I got stream and I need to check for some value. If I got any new value I have to store it in any of data structure. It seems very easy, I can place conditional statement if-else or can use contain method of set/map to check either received is new or not. But the problem is checking will effect my application performance, in stream I will receive hundreds for value in second, if I start checking each and every value I received then for sure it effect performance. Anybody can suggest me any mechanism or algorithm to solve my issue, either by bypassing checks or at least minimize them?

    Read the article

  • how to avoid or minimise use of check/conditional statement?

    - by Muneeb Nasir
    I have scenario, where i got stream and i need to check for some value. if i got my any new value i have to store it in any of data structure. well it seems very easy, i can place conditional statement if-else or can use contain method of set/map to check either received is new or not. but the problem is checking will effect my application performance, in stream i'll receive hundreds for value in second, if i start checking each and every value i received than for sure it effect performance. Any body can suggest me any mechanism or algorithm that solve my issue. either by bypassing checks or atleast minimize them?

    Read the article

  • Check if the vector is behind another or maybe opposite directions?

    - by Gilson
    I'm doing a network game and on the client side, i interpolate the client position with the server sent extrapolated position. The client has its own physics simulation wich is corrected by the server in steps. The problem is when it laggs and i 'kick' the ball, the server gets a delayed message and sends me the position backwards of the client position wich makes the ball goes back and forth. I want to ignore those and maybe compensate that on the server, not sure though. The problem is the clock difference on those case are 0.07ms or 0.10 ms wich isn't that high to ignore the message i guess. When i get the server position, i extrapolate with the clock interval * serverBallVelocity Can i check if my new ball server position is behind my actual ball vector position? I tried to use the dot product after normalized the two vectors to check if they are opposite but it ain't working properly. Any suggestions on checking that?

    Read the article

  • Is it okay for an application to check for automatic updates in less than 20 hour interval?

    - by FlameStream
    I have a desktop application that has the ability to automatically update itself on the next restart (without the user's consent - but this is another issue altogether). Assuming that the user would never notice anything related to application updating (such as a progress bar, or pop-up requiring restart), and that our server would support the request spam load, is there any reason why it should not check for updates in less than 20 hour interval? The reason I'm asking this is because all applications that I know that have auto-update capability check for update every 20 to 24 hours and at startup. I was just wondering if there was an ethical rule about it, or simply because of the risk of overloading the server.

    Read the article

  • How to check if windows has automatic updates waiting from the command line?

    - by Lee
    If a Windows server (2k3/2k8) is set to "download but not install" updates, is there a way to check from the command line.. perhaps a log file or something I can check with powershell, to see if there are any updates actually waiting to be installed? I'm trying to prevent having to manually log on to each server to check, even though they want the "trigger" pulled manually. We have an automation system in place I can use (CA Autosys) - just not sure what to have it look for.

    Read the article

  • Why does integrity check fail for the 12.04.1 Alternate ISO?

    - by mghg
    I have followed various recommendations from the Ubuntu Documentation to create a bootable Ubuntu USB flash drive using the 12.04.1 Alternate install ISO-file for 64-bit PC. But the integrity test of the USB stick has failed and I do not see why. These are the steps I have made: Download of the 12.04.1 Alternate install ISO-file for 64-bit PC (ubuntu-12.04.1-alternate-amd64.iso) from http://releases.ubuntu.com/12.04.1/, as well as the MD5, SHA-1 and SHA-256 hash files and related PGP signatures Verification of the data integrity of the ISO-file using the MD5, SHA-1 and SHA-256 hash files, after having verified the hash files using the related PGP signature files (see e.g. https://help.ubuntu.com/community/HowToSHA256SUM and https://help.ubuntu.com/community/VerifyIsoHowto) Creation of a bootable USB stick using Ubuntu's Startup Disk Creator program (see http://www.ubuntu.com/download/help/create-a-usb-stick-on-ubuntu) Boot of my computer using the newly made 12.04.1 Alternate install on USB stick Selection of the option "Check disc for defects" (see https://help.ubuntu.com/community/Installation/CDIntegrityCheck) Steps 1, 2, 3 and 4 went without any problem or error messages. However, step 5 ended with an error message entitled "Integrity test failed" and with the following content: The ./install/netboot/ubuntu-installer/amd64/pxelinux.cfg/default file failed the MD5 checksum verification. Your CD-ROM or this file may have been corrupted. I have experienced the same (might only be similar since I have no exact notes) error message in previous attempts using the 12.04 (i.e. not the maintenance release) Alternate install ISO-file. I have in these cases tried to install anyway and have so far not experienced any problems to my knowledge. Is failed integrity check described above a serious error? What is the solution? Or can it be ignored without further problems?

    Read the article

  • PCI-e SEALEVEL dual serial card not recognized on Ubuntu 14.04

    - by kwhunter
    New to Ubuntu, running 14.04. I have trouble with the serial port setup, I have a plug-in PCI-e SEALEVEL dual serial card that is not recognized. user1@WSIWORKSTATION2:~$ dmesg | grep tty [ 0.000000] console [tty0] enabled [ 1.577197] 00:06: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 1.943326] tty ttyprintk: hash matches [ 17.240880] ttyS4: LSR safety check engaged! [ 17.241589] ttyS4: LSR safety check engaged! [ 17.242354] ttyS5: LSR safety check engaged! [ 17.243058] ttyS5: LSR safety check engaged! [ 17.243918] ttyS6: LSR safety check engaged! [ 17.244485] ttyS6: LSR safety check engaged! [ 17.245195] ttyS7: LSR safety check engaged! [ 17.245830] ttyS7: LSR safety check engaged! [ 17.246554] ttyS8: LSR safety check engaged! [ 17.247191] ttyS8: LSR safety check engaged! user1@WSIWORKSTATION2:~/Desktop/seacom$ lspci -d 135e: -vvv 02:04.0 Bridge: Sealevel Systems Inc Device e205 (rev aa) Subsystem: Sealevel Systems Inc Device e205 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx- Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium TAbort- SERR- Capabilities: However, the manufacturer's drivers won't install: 1. user1@WSIWORKSTATION2:~/Desktop/seacom$ make install ---------------------------------------------------------------- Installing seacom suite. ---------------------------------------------------------------- --Installing utilities-- /usr/bin/ld: skipping incompatible ../../lib/libftd2xx.a when searching for -lftd2xx /usr/bin/ld: cannot find -lftd2xx collect2: error: ld returned 1 exit status make[2]: *** [setusb] Error 1 make[1]: *** [install] Error 1 make: *** [install] Error 1 2. user1@WSIWORKSTATION2:~/Desktop/seaio$ make install ---------------------------------------------------------------- Installing SD suite. ---------------------------------------------------------------- *Compiling SeaIO Library source file: digitalIoDevice.cpp gcc: error trying to exec 'cc1plus': execvp: No such file or directory make[1]: *** [digitalIoDevice.o] Error 1 make: *** [install] Error 1 I was not able to find a solution, so if anyone can help it will be much appreciated. PS Have some troubles with formatting my post, apologies...

    Read the article

  • What is the best practice for when to check if something needs to be done?

    - by changokun
    Let's say I have a function that does x. I pass it a variable, and if the variable is not null, it does some action. And I have an array of variables and I'm going to run this function on each one. Inside the function, it seems like a good practice is to check if the argument is null before proceeding. A null argument is not an error, it just causes an early return. I could loop through the array and pass each value to the function, and the function will work great. Is there any value to checking if the var is null and only calling the function if it is not null during the loop? This doubles up on the checking for null, but: Is there any gained value? Is there any gain on not calling a function? Any readability gain on the loop in the parent code? For the sake of my question, let's assume that checking for null will always be the case. I can see how checking for some object property might change over time, which makes the first check a bad idea. Pseudo code example: for(thing in array) { x(thing) } Versus: for(thing in array) { if(thing not null) x(thing) } If there are language-specific concerns, I'm a web developer working in PHP and JavaScript.

    Read the article

< Previous Page | 55 56 57 58 59 60 61 62 63 64 65 66  | Next Page >