Search Results

Search found 21097 results on 844 pages for 'check snmp'.

Page 44/844 | < Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >

  • how to check only one item in checkedlistbox

    - by Shashi Jaiswal
    I have check list box control and i want to select only one item at a time and i am currently using this code to do the same. private void CLSTVariable_ItemCheck(object sender, ItemCheckEventArgs e) { // Local variable int ListIndex; CLSTVariable.ItemCheck -= CLSTVariable_ItemCheck; for (ListIndex = 0; ListIndex < CLSTVariable.Items.Count; ListIndex++) { // Unchecked all items that is not currently selected if (CLSTVariable.SelectedIndex != ListIndex) { // set item as unchecked CLSTVariable.SetItemChecked(ListIndex, false); } // if else { // set selected item as checked CLSTVariable.SetItemChecked(ListIndex, true); } } // for CLSTVariable.ItemCheck += CLSTVariable_ItemCheck; } this code is working fine. but problem is that when i click again and again on selected item then that selected item should not be unchecked, means at least one item should be checked always...

    Read the article

  • Best tool to check and ensure PDF/A compatibility under Linux

    - by Sven Lilienthal
    I am working on an online portal, where researchers can upload their research papers. One requirement is, that all PDFs are stored in PDF/A-format. As I can't rely on the users to generate PDF/A conforming documents, I need a tool to check and convert standard PDFs into PDF/A format. What is the best tool you know of? Price Quality Speed Available APIs Open-source tools would be prefered, but a search revealed none. iText can create PDF/a, but converting isn't easy to do, as you have to read every page and copy it to a new document, losing all bookmarks and annotations in this process. (At least as far as I know, if you know of an easy solution, let me know). APIs should be available for either PHP, Java or a command-line-tool should be provided. Please do not list either GUI-only or Online-only solutions.

    Read the article

  • How to check when Shell32.Folder.CopyHere() is finished

    - by Jelle Capenberghs
    I need to unzip en zip some files in my application using Shell32. Right now, I use srcFolder.CopyHere(destFolder.Items()) to achieve this. However, my next line of code requires the newly made ZIP-file. But since the CopyHere method is Async, how can I check when it in finished? Right now I use a Thread.Sleep for around 500 ms which is enough for my computer to finish creating the ZIP file, but it's not good code imo. Any ideas? More info/code can be provided if necessary.

    Read the article

  • Resources check

    - by Chris
    hey I am frequently uploading my XCode iPhone projects to an svn repository to be build on another machine. My problem is that when I add resources to my project sometimes I forget to add the resource as relative to the project. I know one answer is to be more careful (not easy when your tired!) but if there was a way to run a script to check my resource paths are relative when I build and warn me if they are not it would be a great time saver for me. How would I go about doing this? Thanks Chris

    Read the article

  • Does DataType DataAnnotation Check the Expression?

    - by Jason
    I am currently using DataAnnotations within my ASP.NET MVC website to ensure data is properly validated. One question I wanted to verify (I think I know the answer, but I can't find verification online) - does the DataType DataAnnotation perform regular expression checks to ensure that you have received a valid e-mail/phone/currency/etc? [Required(ErrorMessage = "Price required")] [DataType(DataType.Currency, ErrorMessage = "Not a valid price")] [Range(0, double.MaxValue, ErrorMessage = "Price must be greater than 0.")] public decimal Price { get; set; } I believe the answer is no (meaning I have to provide my own, custom, RegularExpressionAttribute), but I wanted to double check before I do that for various field types.

    Read the article

  • How can I check the mysql connection for a user/password using batch/shell script

    - by machaa
    Hi, How can I check the mysql connection for a user/password using batch/shell script? I've user name and password, and I need to authenticate whether they are correct or not, but how? I tried this way: I've created a batch file "run.bat" with "mysql -u User--password=UserPassword < commands.sql" "commands.sql" file contains "\q" When I run the file "run.bat" the output is nothing when User/Password are correct and "ERROR 1045 (28000): Access denied for user ... " when User/Password are incorrect. Now can we capture this output, and decide whether the connection is successful or not, if yes how? Regards

    Read the article

  • gridview check duplicates not using sql

    - by Tomasusa
    I have a code: foreach (GridViewRow dr in gvCategories.Rows)<br/> { <br/> if (dr.Cells[0].Text == txtEnterCategory.Text.Trim())<br/> <br/> isError=true; <br/> <br/> } Debugging: dr.Cells[0].Text is always "", even there are records. How to use a loop to check each row to find if a record exists in the gridview not using sql?

    Read the article

  • How to pre-check checkboxes in formtastic

    - by trustfundbaby
    I have a form I'm trying to set up ... Users can have many posts, and each post can have many people watching it. The Watch model is set up polymorphically as 'watchable' so it can apply to different types of models. It has a user_id, watchable_id, watchable_type and timestamps as attributes/fields. This is soley so that when people comment on a post, users watching the post can get an email about it. What I'm trying to do is show the user a list of users that they can tag on each post, which is not problem. This is what I'm using right now http://pastie.org/940421 The problem with this, is that when you go to edit an update/post ... all the checkboxes are prechecked ... I want it to pre-check only users who are currently watching the post.

    Read the article

  • C#: Check if administrator has write access to a file

    - by Bilal Aslam
    The Problem: I need to check if a user (local user or domain user, either one is possible) has write access to a file (if you're curious, %windir%\system32\inetsrv\applicationHost.config. This file is protected by Windows and you need to be an administrator to write to it.) My Solution: The general construct is: using (Impersonator impersonator = new Impersonator(domain, username, password)) { try { using (FileStream fs = File.OpenWrite(appHostConfigPath)) { return true; } catch { return false; } } As you can imagine, the Impersonator class is an IDisposible which uses native interop to call LogonUser. Nothing too creative, and it works. Where I am stuck: On Windows OSs with UAC enabled, this function always return false even if the user specified by username is an administrator. Even though my program is running elevated as an administrator, I suspect what's happening is that the impersonated code is running as a limited administrator. Hence, the method is returning false. I don't have any creative solutions to this. Can anyone help?

    Read the article

  • Jquery Check if Paragraph is empty

    - by Gidiyo
    Hi, I would like to check if my paragraph tag is empty using Jquery. Meaning without content. $(function() { $("#popupdialog").dialog(); }); HTML <div id="popupdialog"> <p></p> </div> Separate Instants. <div id="popupdialog" title="Basic dialog"> <p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p> If the popupdialog is without content. I would like the dialog box to set as autoOpen: false. How should I do it?

    Read the article

  • DB4o Linq query - How to check for null strings

    - by Dave
    Hey there - simple query: var q = (from SomeObject o in container where o.SomeInt > 8 && o.SomeString != null //Null Ref here select o; I always get a null reference exception. If I use String.IsNullOrEmpty(o.SomeString) the query takes about 100 times as long, as if I use && o.SomeString != "" (which is way faster, but obviously not correct). I'm guessing because DB4o needs to activate the objects, in order to pass them in to the IsNullOrEmpty call, and can't use the indexes. My question is, what's a better way to check for nulls in this situation? Is there something like: mystring != Db4o.DBNull.Value, or something? Cheers, Dave

    Read the article

  • Check for a unique value within a count, but get all results

    - by pedalpete
    I'm trying to create a single query which, similar to stack overflow, will give me the number of votes, but also make sure that the currently viewing user can't upvote again if they've already upvoted. my query currently looks like SELECT cid, text, COUNT(votes.parentid) FROM comments LEFT JOIN votes ON comments.cid=votes.parentid AND votes.type=3 WHERE comments.type=0 AND comments.parentid='$commentParentid' GROUP BY comments.cid But I'm completely stumpted on how to add the check to see if the userid is in the votes table. The other option is to add a seperate query where SELECT COUNT(*) FROM votes WHERE userid='$userid' AND parentid='$commentParentid' AND type=3 I'm just realizing I'm so lost with this that I don't even really know what tags to provide.

    Read the article

  • Check for Existence of a Result in Linq-to-xml

    - by NateD
    I'm using Linq-to-XML to do a simple "is this user registered" check (no security here, just making a list of registered users for a desktop app). How do I handle the result from a query like this: var people = from person in currentDoc.Descendants("Users") where (string)person.Element("User") == searchBox.Text select person; I understand the most common way to use the result would be something like foreach (var line in people){ //do something here } but what do you do if person comes back empty, which is what would happen if the person isn't registered? I've looked around on this site and on MSDN and haven't found a really clear answer yet. Extra credit: Give a good explanation of what people contains.

    Read the article

  • Check if table exists in c#

    - by apoorv020
    I want to read data from a table whose name is supplied by a user. So before actually starting to read data, I want to check if the database exists or not. I have seen several pieces of code on the NET which claim to do this. However, they all seem to be work only for SQL server, or for mysql, or some other implementation. Is there not a generic way to do this? (I am already seperately checking if I can connect to the supplied database, so I'm fairly certain that a connection can be opened to the database.)

    Read the article

  • Bash: Check if file was modified since used in script

    - by Thomas Münz
    I need to check in a script if a file was modified since I read it (another application can modify it in between). According to bash manual there is a "-N" test which should report if a file was modified since last read. I tried it in a small script but it seems like it doesn't work. #!/bin/bash file="test.txt" echo "test" > $file cat $file; if [ -N $file ]; then echo "modified since read"; else echo "not modified since read"; fi I also tried an alternative way by touching another file and using if [ "file1" -nt "file2 ]; but this works only on a seconds accuracy which may under rare conditions not be sufficient. Is there any other bash-inbuilt solution for this problem or I do really need to use diff or md5sum?

    Read the article

  • REGEX HELP: SUBDOMAIN CHECK

    - by NoviceCoding
    Hey I have a form where the person enters the subdomain like value.google.com and the entry would be "valid" I want to run a regex check (I am absolutely horrible at regex) that does the following: First Character: Cannot be symbol Middle Characters: a-z, A-Z, and symbols - and . ONLY Last character: Cannot be a symbol I want it to spit out false if it fails the test. Can anyone help me out with this? Thanks! Also any other limitations do you guys think should be in there?

    Read the article

  • Jquery - check if atleast one checkbox is checked

    - by Vincent
    All, I have the following HTML form and it can have many checkboxes. When the submit button is clicked, I want the user to get a javascript alert to check atleast one checkbox if none are checked. Is there an easy way to do this using Jquery? <form name = "frmTest" id="frmTest"> <input type="checkbox" value="true" checked="true" name="chk[120]"> <input type="checkbox" value="true" checked="true" name="chk[128]"> <input type="checkbox" name="chk[130]"> <input type="checkbox" name="chk[143]"> <input type="submit" name="btnsubmit" value="Submit"> </form> Thanks

    Read the article

  • Check if song is buffering in AS3

    - by SXMC
    I have the following piece of code: var song:Sound; var sndChannel:SoundChannel; var context:SoundLoaderContext = new SoundLoaderContext(2000); function songLoad():void { song.load(new URLRequest(songs[selected]),context); sndChannel = song.play(); } Now I want to be able to check if the song is buffering or not. Is there a way to do this? Or should I approach it differently? Thanks in advance!

    Read the article

  • using php to check if xml is atom or rss

    - by guest86
    i'm writing a php code which has to determine if given xml is in "atom" or "rss" format. After observing atom and rss xml files, i decided classify xml based on a root element. If root element is "<feed" it's an atom xml. If it's "<rss" it's not an atom. How can i perform that check using DOM? So far i have: $dom->loadXML($resp); $feed = $dom->getElementsByTagName("feed"); but it's not working quite right....

    Read the article

  • iPhone check for a constant at runtime in universal app

    - by joshue
    I'm making a universal iPad/iPhone app which can use the iPad's VGA out connector to mirror the content of the app on an external screen. However, the iPhone does not have this functionality. given the following code, [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenInfoNotificationReceieved:) name:UIScreenDidConnectNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenInfoNotificationReceieved:) name:UIScreenDidDisconnectNotification object:nil]; I get this error on the phone at launch (works fine in ipad) "dyld: Symbol not found: _UIScreenDidConnectNotification" presumably because UIScreenDidConnectNotification doesnt' exist yet in 3.13. How do I check for this at runtime?

    Read the article

  • Check if checkbox is checked or not (ASPX)

    - by cthulhu
    I have the following code: (some.aspx.cs) if(Page.IsPostBack) { bool apple2 = false; bool pizza2 = false; bool orange2 = false; if (apple.Checked) apple2 = true; if (pizza.Checked) pizza2 = true; if (orange.Checked) orange2 = true; } (some.aspx) <tr> <td>Food:</td> <td>Apple <input type="checkbox" name="food" id="apple" value="apple" runat="server" />Pizza <input type="checkbox" name="food" id="pizza" value="pizza" runat="server" />Orange <input type="checkbox" name="food" id="orange" value="orange" runat="server" /></td> Now, i send the Boolean variables to SQL database. The problem is only with unchecked boxes. I mean, when you check some checkboxes it sends it as true (and that's right) but when i uncheck them it remains the same (true).

    Read the article

  • jQuery: Check whether val() has a specific value or not upon form submit

    - by Staffan Estberg
    Hi, I'm trying to check whether val() has a specific value or not inside a form, if so deleting the contents / preventing the form being submitted depending on if both fields are filled in (stringOne and stringTwo). There's a default text for each input field, the first being "Namn, telefonnr, sökord" and the second "Område, plats, ort". If a user only fills in the first field the second must be cleared before the form string is passed on and vice versa. Like so - // "This" refers to the form's submit button if (($(this).siblings('input.stringOne').val("Namn, telefonnr, sökord")) && ($(this).siblings('input.stringTwo').val("Område, plats, ort"))) { return false; // If nothing's filled in, then do not submit } else { // If either field is not filled in, clear it if ($(this).siblings('input.stringOne').val("Namn, telefonnr, sökord")) { $(this).siblings('input.stringOne').val() == ''; } if ($(this).siblings('input.stringTwo').val("Område, plats, ort")) { $(this).siblings('input.stringTwo').val() == ''; } } jQuery version 1.2.6.

    Read the article

  • Delphi VirtualStringTree - Check for Duplicates?

    - by Jeff
    Hello S.O! Yeah, I know I post a lot of questions, but thats because I either need assurance that I am doing it right, what I am doing wrong, or if I am totally clueless, and cant find anything in the documentation. Anyways, I am trying to check for duplicate nodes. Here is how I would want to do it: Loop thru my nodes, and compare each single node's text (record), but if I got many nodes, wouldnt that be too time and memory consuming? Would there be a better approach for this? Thanks! - Jeff.

    Read the article

  • datagrid column custom check mark

    - by Berryl
    I want a read only column bound to a boolean that shows a check mark image when true and nothing when false. The problem is the false value; I just want to show whatever the background of the datagrid is, but I don't see how to clear the image source. What should the Value of the image source be to do this? Cheers, Berryl <DataGridTemplateColumn.CellTemplate> <DataTemplate> <Image Name="imgChecked" Source="\Img_Checkmark" /> <DataTemplate.Triggers> <DataTrigger Binding="{Binding IsPrimary}" Value="False"> <Setter TargetName="imgChecked" Property="Source" Value=""/> *** ??? *** </DataTrigger> </DataTemplate.Triggers> </DataTemplate> </DataGridTemplateColumn.CellTemplate>

    Read the article

  • I want to create a common unit test function to check all functions based on parameter

    - by Nilesh Rathod
    I want to create a common unit test function to check all functions based on parameter for e.g commonmethod(string methodname,string paramter1,....) { .... } what logic should i write inside this method so that by passing a actual function in parameter methodname and then the common method should execute that function and should return the output. i am using entity framework for all functions which has been created in my project and now i dont want to create a separate unit test function for each function.just one function should do the job based on different parameters... is that possible.. ?, if so then please provide me an code for same.. Thanks in advance..!!!

    Read the article

< Previous Page | 40 41 42 43 44 45 46 47 48 49 50 51  | Next Page >