Search Results

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

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

  • Check something before django server starts

    - by Vijay Shankar Kalyanaraman
    I am running my api behind a django server and say I have a one time token that is needed by the django application and used through out its existence until the process quits. To check if I can proceed and serve requests (using the django server) I need to validate this token against a database entry. Now, I can have a script that hits the db, then issues the run server command if the token is valid. But if the db used by the django applications change, I will have to change the script also to point to the same db. Is there a way I can pass this token into the runserver command as an additional parameter (along with hostname:port) and validate this before django serves any requests? How can I access this parameter that is sent into ./manage.py runserver. Thanks.

    Read the article

  • How to check if file exists in Apache

    - by Rick
    I've set this up successfully in IIS in the past, but i'm not sure how to do it in Apache. I want to check to see if a file exists, whether it be: /path/to/file.php /path/to/file.cfm /path/to/file.html /path/to/ If the file does not exist, I want to redirect to /404/, where I have a file that does all 404 related handling. Lastly, when doing this in IIS, it gave me a CGI.QUERY_STRING of something like: 404;http://example.com/prettyurl Can apache do the same? This is what i've tried to so far, to no success. (I'm probably way off here...) RewriteEngine on RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} -f RewriteRule (.*)$ /404/ [R,L,NC] Thanks..

    Read the article

  • Check result of ASP.Net validator clientside

    - by Steffen
    I know the built-in ASP.Net validators come with a client-side framework, however I've been unable to find anything that lets me check a single validator for it's Valid state. I expect it to be possible though, so I hope someone in here knows how to do it :-) The validator in question is a RegularExpressionValidator, which I use to determine whether an e-mail address is valid or not. Here's some brief code: <script> function CheckForExistingEmail() { Page_ClientValidate(); // Ensure client validation if (revEmail.IsValid) // pseudo code! { // Perform server side lookup in DB for whether the e-mail exists. } } </script> <asp:TextBox runat="server" id="tbEmail" onblur="CheckForExistingEmail();" /> <asp:RegularExpressionValidator id="revEmail" runat="server" ControlToValidate="tbEmail" ErrorMessage="Not a valid e-mail address" ValidationExpression="([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})" />

    Read the article

  • Check constraint on table lookup

    - by bzamfir
    Hi, I have a table, department , with several bit fields to indicate department types One is Warehouse (when true, indicate the department is warehouse) And I have another table, ManagersForWarehouses with following structure: ID autoinc WarehouseID int (foreign key reference DepartmentID from departments) ManagerID int (foreign key reference EmployeeID from employees) StartDate EndDate To set new manager for warehouse, I insert in this table with EndDate null, and I have a trigger that sets EndDate for previous record for that warehouse = StartDate for new manager, so a single manager appears for a warehouse at a certain time. I want to add two check constraints as follows, but not sure how to do this do not allow to insert into ManagersForWarehouses if WarehouseID is not marked as warehouse Do not allow to uncheck Warehouse if there are records in ManagersForWarehouses Thanks

    Read the article

  • How to access the next element and check if it has a particular class

    - by NaN
    I need to call a function based on whether the second following td element has a certain class. Here is the HTML <tr id="939"> <td data-id="939">Test2</td> <td class="hold" data-id="939"></td> </tr> <tr id="938"> <td data-id="938">Test1</td> <td class="someotherclass" data-id="938"></td> </tr> Here is the JQuery function $('body').on('click', '#article td:first-child', function(e){ // I need to check the next td for the hold class if($(this).next().hasClass(".hold")){ // Call my function } }); How do I do this? I've tried using next and closest but that yields nothing.

    Read the article

  • check compiler with break point

    - by KareemSaad
    When I tried to focus on compiler in code i made break point on code if (!IsPostBack) { using (SqlConnection Con = Connection.GetConnection()) { if (Request.QueryString["Category_Id"] != null && DDlProductFamily.SelectedIndex < 0) { SqlCommand Com = new SqlCommand("SelectAllCtageories_Front", Con); Com.CommandType = CommandType.StoredProcedure; Com.Parameters.Add(Parameter.NewInt("@Category_Id", Request.QueryString["Category_Id"])); SqlDataAdapter DA = new SqlDataAdapter(Com); DA.Fill(dt); DataList1.DataSource = dt; DataList1.DataBind(); } but I cannot check condition although I had the value of query string List item

    Read the article

  • Scheduled cron job to check for pending activity

    - by luckytaxi
    Using PHP ... This is for my personal use so I'm thinking maybe 3-4 emails a day. I'm at a point where I can send an email to a dedicated email address where my script parses the message and stores it into a DB. Now, I need to figure out the best way to check the records in the DB for any upcoming task. I feel like I'm missing something, maybe like a trigger field as to when a reminder should go out. However, that's not a concern to me at the moment since I'll just send an alert 15 mins prior to the due date. Question is, shoudl I run a cron job that queries the DB every minute? I take it the query will have to say something like "select all tasks that is due within 15 minutes."

    Read the article

  • Javascript check all checkboxes in a table / asp.net

    - by SLC
    I have a table with rows in, and each row has a few <td> elements. The last element has a checkbox in. They are in a <div> which is set to runat="server". I have another checkbox on the page called "chkAll" that when clicked, I want to javascript check or uncheck all of the checkboxes in my table. I'm not very good at Javascript, so I am not sure what to do. I added a javascript onclick method, and put document.getelementbyid and put in the div.clientID, but I wasnt sure what to do from there. Any ideas?

    Read the article

  • bash check if value in list

    - by tkoomzaaskz
    I've got a script with a variable taken from command line parameters. I want to check if it's value is one of dev, beta or prod. I've got following code snippet: #!/usr/bin/env bash ENV_NAME=$1 echo "env name = $ENV_NAME" ENVIRONMENTS=('dev','beta','prod') if [[ $ENVIRONMENTS =~ $ENV_NAME ]]; then echo 'correct' exit else echo 'incorrect' exit fi When I run my script, it doesn't matter which parameters I pass: ./script.sh beta or ./script.sh or ./script.sh whatever, I always get correct echoed. What is wrong in my script?

    Read the article

  • check if lookup yields any valid rows for insertion before clearing table using ssis

    - by Chris
    SSIS ignoramus needing help! the situation: a temp table is populated from an excel file, which has been known to change formats at random times, that is owned by a different group. a lookup need to be performed on the temp table, tableA, to populate tableB with valid data. if the lookup results in 0 rows being returned, an email should be sent and the existing data in tableB should remain untouched. If the lookup results in a number of valid rows 0, tableB should have all rows deleted and the new records from the lookup on tableA inserted. question: what would be the best way to check if there are any valid rows and perform the appropriate action(s), depending on my results? Thanks!

    Read the article

  • How to check if people liked my Facebook FanPage

    - by user2372419
    There are many questions and answers about this. But nowadays Facebook changes their Privacy. Any Application that request for user_likes permission must be review by Facebook before using. I've tried many times to explain to Facebook review team about my app, but they did not accept, because my application (a web game using HTML5 and JavaScript) require people like my fan page before play. So my question is: Is there any to bypass Facebook privacy? I have a Like Box on the same page as the game screen (where i need to check Like), so any solution (like: analyze DOM elements, capture screen can pass through image recognition) will fine.

    Read the article

  • C# - Check which event changed / accessed a Property

    - by binil
    I have a class with property say private string fieldSelectedItem; public string FieldSelectedItem { get { return fieldSelectedItem; } set { fieldSelectedItem = value; } } it is accessed from many place. I came across a situation that the a property in class is accessed by some event. and also some event is changing the value. i tried debugging. is it possible to check which event/function has changed/accessed the property. is there any method to do so.

    Read the article

  • How check user online status in web site?

    - by Milan Sanda Sri
    how can i get know when user online and offline. when one user log in to my site. i set a script to change database table field of that user, as a boolean to indicates users online states. but my problem is if he/she leaved my site without clicking the log-out button, then my script does not work and database show he/she as a online user. please give me any sugestion to fix this. i have no idea what to do! i check some answers on this topic, but most of says asnwer lie this -- if last activity time is less than now+15 minutes then user is online, offline otherwise. but i have seen some social networking sites shows that we have gone offline, just we close the browser. how they do that ?

    Read the article

  • Fastest way to check for value existance.

    - by Itay Moav
    I have a list of values I have to check my input against it for existence. What is the faster way? This is really out of curiosity on how the internals work, not any stuff about premature optimization etc... 1. $x=array('v'=>'','c'=>'','w'=>); .. .. array_key_exists($input,$x); 2. $x=array('v','c','w'); .. .. in_array($input,$x);

    Read the article

  • RewriteCond simply doesn't work, doesn't check properly if file exists

    - by ultranol
    Hey everybody. I've been trying to solve this for hours now but came up with nothing. Inside .htaccess, whenever somebody requests an image from a folder of my website, I'm trying to check if a file with the same name exists in another folder; if it does, return that file; if it doesn't, return the file originally requested. It seems so easy but it simply doesn't work. The .htaccess code is as follows: RewriteEngine On RewriteCond /images/blog/watermark/$1 -f RewriteRule ^(.*) /images/blog/watermark/$1 The "RewriteCond" always returns negative, so the image requested is always loaded as is. If I change it to, like, RewriteCond %{REQUEST_FILENAME} -f it always returns positive, so it gets the image from the folder I want - except when the image's not there, generating an error, which is exactly what I'm trying to prevent. What am I doing wrong? Thanks.

    Read the article

  • Check for new mails in Hotmail using OpenPop.NET

    - by deadlock
    I was advised to use OpenPop lib to fetch my mail from hotmail. But I could'nt find any better way to check for new mail except disconnecting and reconnecting again. And there, I found a problem, Hotmail doesn't allow more than 1 pop3 login each 15 minutes. I want to know if it's possible to get the new mail without disconnecting and reconnecting to their pop3 server. Here is my code: Timer checker = new Timer(); checker.Interval = 1000; checker.Tick += new EventHandler(delegate { Pop3Client client = new Pop3Client(); client.Connect("pop3.live.com", 995, true); client.Authenticate("[email protected]", "myPassword"); label1.Text = client.GetMessageCount().ToString(); client.Disconnect(); }); checker.Start();

    Read the article

  • Check if NSString "000001XX"is a number with intValue

    - by Kenny
    Now I am trying to add a front end check on my app to detect if user input only number in the textfield. I use: - (IBAction)checkID:(UITextField *)sender { if ([sender.text isEqualToString:@""]) { sender.text = @"This information is required"; sender.backgroundColor =[UIColor redColor]; }else if (![sender.text intValue]) { sender.text = [sender.text stringByAppendingString:@" is not valid number"]; sender.backgroundColor =[UIColor redColor]; } NSLog(@"send.text is %@, intValue is %d",sender.text,[sender.text intValue]); } But I found it text begins with number and ends with string, its intValue is still the number. In my text, text is "00001aa", but the intValue is 1. Is there any other way to filter out this "00001aa" text? Thanks in advance.

    Read the article

  • Check and avoid if a char is being entered in a int

    - by John
    Hi.... This is a exremely stupid question but i need help with this.... I'm trying to make a small program that i made robust and needed some help with tht.... int num1; int num2 = 0; System.out.print("Enter number 1: "); num1 = kb.nextInt(); while(num2<num1) { System.out.print("Enter number 2: "); num2 = kb.nextInt(); } Number 2 has to be greater than number 1 Also i want the program to automatically check and ignore if the user enters a char instead of an int... Cause right now when a user enters lets say "r" instead of a number the program just exists....

    Read the article

  • Check for duplicate rows in 2 columns before update

    - by user3891378
    I have a table with 4 columns, and I need to check to see if a Column Pair exists before inserting a row into the database: INSERT INTO dbo.tblCallReport_Detail (fkCallReport, fkProductCategory, Discussion, Action) VALUES (?, ?, ?, ?) The pair in question is fkCallReport and fkProductCategory. For example if the row trying to be inserted has fkCallReport = 3 and fkProductCategory = 5, and the database already has both of those values together, it should display an error and ask if they would like to combine the Disuccsion and Action with the current record. Keep in mind I'm doing this in VBA Access 2010 and am still very new.

    Read the article

  • MySql php: check if Row exists

    - by Jeff
    This is probably an easy thing to do but I'm an amateur and things just aren't working for me. I just want to check and see if a row exists where the $lectureName shows. If a row does exist with the $lectureName somewhere in it, I want the function to return "assigned" if not then it should return "available". Here's what I have. I'm fairly sure its a mess. Please help. function checkLectureStatus($lectureName) { $con = connectvar(); mysql_select_db("mydatabase", $con); $result = mysql_query("SELECT * FROM preditors_assigned WHERE lecture_name='$lectureName'"); while($row = mysql_fetch_array($result)); { if (!$row[$lectureName] == $lectureName) { mysql_close($con); return "Available"; } else { mysql_close($con); return "Assigned"; } } When I do this everything return available, even when it should return assigned.

    Read the article

  • (Win Api) Check if an external application window is on the taskbar

    - by Jorge Branco
    Hello. I'd like to know if it's possible to know if an external application has an window that is showing up on the taskbar. I have a program that sometimes shows up an error message and it appears on the taskbar. If I "close" the message, it will go invisible, but from what I've seen it still exists. So the only way for me to know if that window is visible and thus "clickable" is to check if it is being shown on the taskbar or not. How can I do this? Thanks

    Read the article

  • Check if IsCallback on Application_BeginRequest

    - by user136405
    I have a web application (.NET 3.5) that has this code in Global.asax: Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs) LinkLoader() PathRewriter() PathAppender() End Sub I want all those functions inside to get called except for when it's an AJAX call back. So, ideally I would have it changed to: Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs) If not Page.IsCallback then LinkLoader() PathRewriter() PathAppender() End If End Sub But there is not access to the page object here. So, basically my question is: How do I check if the request is an AJAX call back inside Application_BeginRequest? Thank you very much for any feedback.

    Read the article

  • Using traversal by pointer to check whether a string is repeated

    - by Bob John
    bool repeat_char(char *s, int n); //R: s is a C-string of at least n non-NUL characters and n > 0 //E: returns true if the first n characters are fully repeated throughout the string s, false // otherwise. I'm having trouble implementing this function using traversal by pointer. I was thinking that I could extract the first n characters from s, then use that in a comparison with s, but I'm not sure how I could do that. If I'm traversing through s one character at a time, how can I check that it matches a block of text, such as the first n characters of s? Thanks!

    Read the article

  • How to diagnose and fix Kernel Panic Fatal Machine Check error?

    - by 0x4a6f4672
    I have got a new Samsung Series 7 laptop with dual boot setup for Windows 8 and Ubuntu 12.10. A fine machine comparable to a Macbook Pro. The Ubuntu installation was quite a hassle, but with the help of Boot Repair finally it seemed to work. Or so I thought. Windows 8 starts fine, but if I want to start Ubuntu regularly the following Machine Check Exception error occurs, quite similar to this one [Hardware Error] CPU 1: Machine Check Exception: 5 Bank 6 [Hardware Error] RIP !inexact! 33 <00007fab2074598a> [Hardware Error] TSC 95b623464c ADDR fe400 MISC 3880000086 .. [similar messages for CPU 2,3 and 0] .. [Hardware Error] Machine Check: Processor context corrupt Kernel panic - not syncing: Fatal Machine Check Rebooting in 30 seconds Kernel panic does not sound good. Then it starts to reboot, and the second boot trial often works. Is it a Kernel or driver problem? The laptop has an Intel Core i7 processor. I already deactivated Hyperthreading in the BIOS, but it does not seem to help :-( I also disabled the Execute Disable Bit (EDB) flag in the BIOS. EDB is an Intel hardware-based security feature that can help reduce system exposure to viruses and malicious code. Since I disabled it, the error did occur less frequently, but it still appears occasionally :-( It seems to be the same error as described here and here. Maybe a Samsung specific Kernel problem? A similar error also happens on a Samsung Ultrabook Series 9 (which seems to be kernel bugs 49161 and 47121). At my Samsung Series 7, it still occurs for instance during booting on battery after "Checking battery state". Perhaps anyone else has an idea? These Kernel Panic errors are reallly annoying..

    Read the article

  • How can I check Internet connectivity in a console?

    - by Ashfame
    Is there an easy way to check Internet connectivity from console? I am trying to play around in a shell script. One idea I seem is to wget --spider http://www.google.co.in/ and check the HTTP response code to interpret if the Internet connection is working fine. But I think there must be easy way without the need of checking a site that never crash ;) Edit: Seems like there can be a lot of factors which can be individually examined, good thing. My intention at the moment is to check if my blog is down. I have setup cron to check it every minute. For this, I am checking the HTTP response code of wget --spider to my blog. If its not 200, it notifies me (I believe this will be better than just pinging it, as the site may under be heavy load and may be timing out or respond very late). Now yesterday, there was some problem with my Internet. LAN was connected fine but just I couldn't access any site. So I keep on getting notifications as the script couldn't find 200 in the wget response. Now I want to make sure that it displays me notification when I do have internet connectivity. So, checking for DNS and LAN connectivity is a bit overkill for me as I don't have that much specific need to figure out what problem it is. So what do you suggest how I do it?

    Read the article

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