Search Results

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

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

  • Check if a class is subclass of another class in Java

    - by craesh
    Hi! I'm playing around with Java's reflection API and trying to handle some fields. Now I'm stuck with identifying the type of my fields. Strings are easy, just do myField.getType().equals(String.class). The same applies for other non-derived classes. But how do I check derived classes? E.g. LinkedList as subclass of List. I can't find any isSubclassOf(...) or extends(...) method. Do I need to walk through all getSuperClass() and find my supeclass by my own? Thanks! craesh

    Read the article

  • check sequence in matlab

    - by gabboshow
    I have a vector that should contain n sequences from 00 to 11 A = [00;01;02;03;04;05;06;07;08;09;10;11;00;01;02;03;04;05;06;07;08;09;10;11] and I would like to check that the sequence "00 - 11 " is always respected (no missing values). for example if A =[00;01;02; 04;05;06;07;08;09;10;11;00;01;02;03;04;05;06;07;08;09;10;11] (missing 03 in the 3rd position) For each missing value I would like to have back this information in another vector missing= [value_1,position_1; value_2, position_2; etc, etc] Can you help me?

    Read the article

  • Check if a MediaWiki page exists (Python)

    - by compie
    I'm working on a Python script that transforms this: foo bar Into this: [[Component foo]] [[bar]] The script checks (per input line) if the page "Component foo" exists. If it exists then a link to that page is created, if it doesn't exist then a direct link is created. The problem is that I need a quick & cheap way to check if a lot of wiki pages exist.I don't want to (try to) download all the 'Component' pages. I already figured out a fast way to do this by hand: Edit a new wiki page. paste all the 'component' links into the page, press preview, and then save the resulting preview HTML page. The resulting HTML file contains a different link for existing pages than for non-existing pages. So to rephrase my question: How can I save a mediawiki preview page in Python?

    Read the article

  • PHP/JS/JQUERY: Smart method to Auto check/updating a points status

    - by Azzyh
    Hello. Hi everyone. So right now I am using me of this: function checkpoints() { var postThis = 'checker.php?userid='+ $('#user_id_points').val(); $.post(postThis, function(data){ $(".vispoints").html(data).find(".vispoints1").fadeIn("slow") }); setTimeout(checkpoints, 5000); } This function repeats each 5 seconds (sending request each 5 seconds) and running the checker.php each 5 seconds, to show how many points you got. (checker.php echo out how many points you've got in a span class vispoints1). Now isnt there a smarter method doing this, instead of sending requests like this all the time.. I mean sites like facebook and that, they dont do like this to check if you e.g got a new friend request? Hope you can help me find a better method examples would be good too.

    Read the article

  • How to check with PHP does a SQL database already have

    - by Dan Horvat
    I've tried to find the answer to this question but none of the answers fit. I have two databases, one has 15.000.000 entries and I want to extract the necessary data and store it in a much smaller database with around 33.000 entries. Both databases are open at the same time. Or at least they should be. While having the big database open and extracting the entries from it, is it possible to check whether the value already exists in the smaller database? I just need some generic way which checks that.

    Read the article

  • ASP.NET/IIS: Tell IIS do not check for file existence

    - by AgileMeansDoAsLittleAsPossible
    In my Global.asax.cs, I have: routes.MapRoute("AssetCss", "css/{*path}", new { controller = "Asset", action = "Index" }); I also have this in a view: <link href="/css/Root/index.css" rel="stylesheet" type="text/css" /> The problem is that the AssetController does not invoke Index when /css/Root/index.css is requested. This is because a file actually exists at the path /css/Root/index.css. If I recall correctly, there's a checkbox setting in IIS that basically says "Do not check that a file actually exists at the request path [instead, let the RouteTable handle it]." (At least there is in IIS 6.) Is there something I can put in my Web.config that sets this IIS setting to true? How do I tell IIS to let my MVC routes handle the path even if a file exists at the path?

    Read the article

  • Check through Javascript that page is loading something

    - by Lilitu88
    When the browser is loading something on a page you can see it in the status bar that it says "Waiting for..." or "Transfering..." etc. In firebug you can check in the net tab when something is being loaded and see when it stops. That is what I want. Is there a way for me to trigger an event when that happens ? Or to get the status of the page or something ? Any way for me to know when that changes ? I know I can do this easier if I use Ajax, but I can't since the page it's expecting an Excel report. Thanks

    Read the article

  • Check user authentication at page load

    - by Shrewd Demon
    ok i have another question ! (god! i have so many questions) i have an application and a user must log-in before he/she can access pages. now once the user logs in i keep the user details in a session variable (say Session["CurrentUser"]). now if a user tries to jump to a page directly i will check if the Session["CurrentUser"] has a value or not...if not then the user will be directed to the login page... my problem is that i have done this or rather say written this "Checking Code" on almost all the pages. what i want is this code to stay on a particular location and i will just access that method all the time on all the pages...now where should i write this method ?? thank you.

    Read the article

  • Check if XML node is empty

    - by Vinit
    I have a simple XML structure like <main> <node1><!-- comments --><!-- comments --></node1> </main> and this can have any number of sub-nodes or values like: <main> <node1><!-- comments --><!-- comments --><p>texttext text</p> more text <br/></node1> </main> I want to check if the node is empty or not: I'm doing something like: <xsl:if test="string-length(main/node1//text())&gt;0"> But it does not work as if there are multiple tags, then string-length function will break coz of multiple arguments. Any help to solve this issue is really appreciated.

    Read the article

  • How to check if aspect ratio auto adjustment is enabled in monitor

    - by kFk
    Game application is written in C++ and uses DirectX 8. I am getting a maximum monitor resolution to calculate it's aspect ratio. Then I use this value to fix game rendering (scale and set clipping to receive normal 4:3 image with black borders on wide screen monitors). How can I check if monitor is using aspect ratio auto adjustment now? Because my scaling plus monitor scaling makes resulting image overscaled. Thanks EDIT: I saw correct different monitor resolution handling with or without aspect ratio auto adjustment in "Royal Envoy" casual game. But don't know how do they do this.

    Read the article

  • check existense between two IEnumerable

    - by sunglim
    IEnumerable<String> existedThings = from mdinfo in mdInfoTotal select mdinfo.ItemNo; IEnumerable<String> thingsToSave = from item in lbXReadSuccess.Items.Cast<ListItem>() select item.Value; Here are two IEnumerable. I want to check whether a value in existedThings exist in thingsToSave. O.K. I can do that with 3 line code. bool hasItemNo; foreach(string itemNo in existedThings) hasItemNo= thingsToSave.Contains(itemNo); But, It looks dirty. I just want to know if there better solution.

    Read the article

  • Check if iOS app is live in app store

    - by MSK
    Is it possible somehow to code like below in iOS app ? if(app is live in app store) { //Do something } else { //Do other thing } I wanted to avoid cases where our QE/Dev team is using app for testing. Is there a way I can detect how app code is signed (Developer/Adhoc/Distribution) to check ? Even if it is possible, it will not eliminate cases when Apple is using our app for testing as part of review. We recorded many downloads of our content by Apple before our app goes live in App store.

    Read the article

  • where should this check logic go?

    - by Benny
    I have a function that draw a string on graphics: private void DrawSmallImage(Graphics g) { if (this.SmallImage == null) return; var smallPicHeight = this.Height / 5; var x = this.ClientSize.Width - smallPicHeight; var y = this.ClientSize.Height - smallPicHeight; g.DrawImage(this.SmallImage, x, y, smallPicHeight, smallPicHeight); } the check if (this.SmallImage == null) return; should be in the function DrawSmallImage or should be in the caller? which is better?

    Read the article

  • Check the cumulative status of onLoadInit in a for statement

    - by jonobr1
    In a setup like this is it possible to check the cumulative status of all onLoadInit? for(var i:Number = 0; i < limit; i++) { var mcLoader:MovieClipLoader = new MovieClipLoader(); var mclListener:Object = new Object(); mclListener.onLoadInit = function(mc:MovieClip) { trace(i + " is finished loading!"); } mcLoader.addListener(mclListener); mcLoader.loadClip(some_image_path, someMovieClip); } Initially I was thinking that I could pass an array of Boolean's, but I'm not really sure where to add that checkpoint, because a flash frame doesn't keep looping. Would I have to add it to an onEnterFrame()?

    Read the article

  • Check if NFS share is mounted in python script

    - by Fabian
    I wrote a python script that depends on a certain NFS share to be available. If the NFS share is not mounted it will happily copy the files to the local path where it should be mounted, but fail later when it tries to copy some files back that were created on the NFS server. I'd like to catch this error specifically so I can print a useful error message that will tell the users of this script what they have to do. My first idea would be to execute mount using subprocess and then check the output for this nfs share. But I'm wondering if there isn't a nicer and more robust method of doing it.

    Read the article

  • Oracle - Trigger to check constraint before insert

    - by user1816507
    i would like to create a simple trigger to check a stored variable from a table. if the value of the variable is '1', then approve the insertion else if the value of the variable is '2', then prompt error message. CREATE OR REPLACE TRIGGER approval BEFORE INSERT ON VIP REFERENCING OLD AS MEMBER FOR EACH ROW DECLARE CONDITION_CHECK NUMBER; BEGIN SELECT CONDITION INTO CONDITION_CHECK FROM MEMBER; IF CONDITION_CHECK = '2' THEN RAISE_APPLICATION_ERROR (-20000, ' UPGRADE DENIED!'); END IF; END; But this trigger disable all the entries even when the condition value is '1'.

    Read the article

  • Check if NSMutableArray contains text from textfield

    - by Polo Swelsen
    I want to check if the text inserted in a textfield is also in my NSMutableArray. So let's say my NSMutableArray has these objects: "Hey, Hello, No, Yes". Then when a user enters the text: "Hello" i want there to appear a UIAlertView. I now have the following: for (int slt = 0; slt < [zouten count]; slt++) { if (zout.text = [zouten objectAtIndex:slt]) { alert = [[UIAlertView alloc]initWithTitle:@"Goedzo!" message:[NSString stringWithFormat:@"Je hebt een zout gevonden"] delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; } } [alert show]; But somehow the message appears with every word. what am i doing wrong?

    Read the article

  • How to check if a pointer is null in C++ Visual 2010

    - by mariomario
    I am having problems here if I want to check if eerste points to nothing i get Blockquote Unhandled exception at 0x003921c6 in Bank.exe: 0xC0000005: Access violation reading location 0xccccccd0. and i am kinda wondering why he justs skips the if statement or doens't stop when the object eerste points to nothing Bank::Bank() { LijstElement *eerste = NULL; LijstElement *laatste = NULL; } Rekening * Bank::getRekening(int rekNr) { if(NULL != eerste) { LijstElement *nummer = eerste; while(nummer->volgende!= NULL) { Rekening *een = nummer->getRekening(); if(een->getRekNr()==rekNr) { return een; } else { nummer = nummer->volgende; } } } return NULL; }

    Read the article

  • How to check for C++ copy ellision

    - by Steve
    I ran across this article on copy ellision in C++ and I've seen comments about it in the boost library. This is appealing, as I prefer my functions to look like verylargereturntype DoSomething(...) rather than void DoSomething(..., verylargereturntype& retval) So, I have two questions about this Google has virtually no documentation on this at all, how real is this? How can I check that this optimization is actually occuring? I assume it involves looking at the assembly, but lets just say that isn't my strong suit. If anyone can give a very basic example as to what successful ellision looks like, that would be very useful I won't be using copy ellision just to prettify things, but if I can be guaranteed that it works, it sounds pretty useful.

    Read the article

  • How to check if string contains a string in string array

    - by Abu Hamzah
    edit: the order might change as you can see in the below example, both string have same name but different order.... How would you go after checking to see if the both string array match? the below code returns true but in a reality its should return false since I have extra string array in the _check what i am trying to achieve is to check to see if both string array have same number of strings. string _exists = "Adults,Men,Women,Boys"; string _check = "Men,Women,Boys,Adults,fail"; if (_exists.All(s => _check.Contains(s))) //tried Equal { return true; } else { return false; }

    Read the article

  • Check boxes for a has_many and belongs_to association.

    - by Thomas
    I have a has_many and belongs_to association. class Link < ActiveRecord::Base has_and_belongs_to_many :categories belongs_to :property end class Property < ActiveRecord::Base has_many :links end In the index and show I have <%= link.property.name %> and it will show the Property that I assigned to the link with the console just fine. I have a problem with figuring out how to show check boxes in the _form that assign a property to the link (a drop down would work as well). It seems everyone who has had this question before has ether a has_many :through or a HABTM relationship and I can't seem to adapt their answers.

    Read the article

  • Can Apache configuration check cookies?

    - by nickf
    My situation: We have a mobile version of our website, and want to start redirecting mobile users to it. The plan is to do this in Apache httpd.conf or .htaccess, using something like this: RewriteEngine On RewriteCond %{HTTP_USER_AGENT} (iPhone|Blackberry|...) RewriteRule (.*) mobile/$1 However we want there to be a way for users to override our default action of redirecting them. One way we thought to do it was to show a link on the mobile site directing back to the regular site, and store a cookie when they use that link. Could the Apache configuration file check a cookie before redirecting? Is there a better way?

    Read the article

  • Stop then restart submit() after ajax check

    - by jeerose
    I asked a question [here] recently and it's just not providing me with an answer. Here's what I want to do and you can see my first attempt at the link above: User submits form Stop default submit action check to see if a similar entry exists in database If it does, display a notice asking them if they want to submit anyway and give an option to let them submit anyway (enable default action and submit it). If it does not, enable the default action on the form and let it submit I'm at a loss. Any help is appreciated. Thanks gang.

    Read the article

  • How do I check for Existence of a Record in GAE

    - by VDev
    I am trying to create a simple view in Django & GAE, which will check if the user has a profile entity and prints a different message for each case. I have the program below, but somehow GAE always seem to return a object. My program is below import datetime from django.http import HttpResponse, HttpResponseRedirect from google.appengine.api import users from google.appengine.ext import db from models import Profile import logging #from accounts.views import profile # Create your views here. def login_view(request): user = users.get_current_user() profile = db.GqlQuery("SELECT * FROM Profile WHERE account = :1", users.get_current_user()) logging.info(profile) logging.info(user) if profile: return HttpResponse("Congratulations Your profile is already created.") else: return HttpResponse("Sorry Your profile is NOT created.") My model object is Profile defined as follows: class Profile(db.Model): first_name = db.StringProperty() last_name = db.StringProperty() gender = db.StringProperty(choices=set(["Male", "Female"])) account = db.UserProperty(required = True) friends = db.ListProperty(item_type=users.User) last_login = db.DateTimeProperty(required=True) Thanks for the help.

    Read the article

  • Check if key exists in $_SESSION by building index string

    - by Kim
    I need to check if a key exists and return its value if it does. Key can be an array with subkeys or endkey with a value. $_SESSION['mainKey']['testkey'] = 'value'; var_dump(doesKeyExist('testkey')); function doesKeyExist($where) { $parts = explode('/',$where); $str = ''; for($i = 0,$len = count($parts);$i<$len;$i++) { $str .= '[\''. $parts[$i] .'\']'; } $keycheck = '$_SESSION[\'mainKey\']' . $str; if (isset(${$keycheck})) { return ${$keycheck}; } // isset($keycheck) = true, as its non-empty. actual content is not checked // isset(${$keycheck}) = false, but should be true. ${$var} forces a evaluate content // isset($_SESSION['mainKey']['testkey']) = true } What am I doing wrong ? Using PHP 5.3.3.

    Read the article

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