Search Results

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

Page 41/844 | < Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >

  • How to check total cache size using a program

    - by user1888541
    so I'm having some trouble creating a program to measure cache size in C. I understand the basic concept of going about this but I'm still having trouble figuring out exactly what I am doing wrong. Basically, I create an array of varying length (going by power of 2s) and access each element in the array and put it in a dummy variable. I go through the array and do this around 1000 times to negate the "noise" that would otherwise occur if I only did it once to get an accurate measurement for time. Then, I look for the size that causes a big jump in access time. Unfortunately, this is where I am having my problem, I don't see this jump using my code and clearly I am doing something wrong. Another thing is that I used /proc/cpuinfo to check the cache and it said the size was 6114 but that was not a power of 2. I was told to go by powers of 2 to figure out the cache can anyone explain why this is? Here is the just of my code...I will post the rest if need be { struct timeval start; struct timeval end; // int n = 1; // change this to test different sizes int array_size = 1048576*n; // I'm trying to check the time "manually" first before creating a loop for the program to do it by itself this is why I have a separate "n" variable to increase the size char x = 0; int i =0, j=0; char *a; a =malloc(sizeof(char) * (array_size)); gettimeofday(&start,NULL); for(i=0; i<1000; i++) { for(j=0; j < array_size; j += 1) { x = a[j]; } } gettimeofday(&end,NULL); int timeTaken = (end.tv_sec * 1000000 + end.tv_usec) - (start.tv_sec *1000000 + start.tv_usec); printf("Time Taken: %d \n", timeTaken); printf("Average: %f \n", (double)timeTaken/((double)array_size); }

    Read the article

  • Simple check authentication decorator in Python + Pylons

    - by ensnare
    I'd like to write a simple decorator that I can put above functions in my controller to check authentication and re-direct to the login page if the current user is not authenticated. What is the best way to do this? Where should the decorator go? How should I pass cookie info to the decorator? Sample code is greatly appreciated. Thank you!

    Read the article

  • Simple check for SELECT query empty result

    - by den-javamaniac
    Hi. Can anyone point out how to check if a select query returns non empty result set? For example I have next query: SELECT * FROM service s WHERE s.service_id = ?; Should I do something like next: ISNULL(SELECT * FROM service s WHERE s.service_id = ?) to test if result set is not empty?

    Read the article

  • [Qt] Check octal number

    - by sterh
    Hello, I write simple application in C++/Qt. And i have a text and some octal number in it. My app splits this text by spaces. And i need to check octal numbers from text. How can i select octal numbers from this text with regular expressions? Thank you.

    Read the article

  • Check the value from DBand pass it to next page

    - by user554176
    I have a field ,if user enters data it should go and check db if it is present it should redirect to next page. But here i m not sure whether it is checking the db but mysql query is correct. $ThirdPartyCategoryName =$_POST['ThirdPartyCategoryName']; $activate = mysql_query("SELECT * FROM `thirdpartycategorymaster` WHERE `delete` = 'y' "); if($activate=='y') { header("location:catact.php"); } else { //$activate=='NULL'; header("location:tp_home.php"); }

    Read the article

  • Pass pre-requisite check information from Config file in InstallShield

    - by sameer
    Hi, I'm trying to achieve a requirement in Pre-requisites part of my package: The package should be able to check for the presence of a specific Operating System or Microsoft Patch on the target machine and block installation if the specified OS&patch is not found. I want to pass this information from Configuration xml or ini file, so that installer need not to be edited and build again for changes in requirements. Any ideas on how to achieve this!!

    Read the article

  • Query to check the consistency of records

    - by orunner
    I have four tables TableA: id1 id2 id3 value TableB: id1 desc TableC: id2 desc TableD: id3 desc What I need to do is to check if all combinations of id1 id2 id3 from table B C and D exist in the TableA. In other words, table A should contain all possible combinations of id1 id2 and id3 which are stored in the other three tables.

    Read the article

  • Spell check in c#

    - by j-t-s
    Hi all In my win forms c# app, I want to be able to add spell check functionality. But, I want to do it my own way, and NOT use any other components. All I need is just an online service where i can send a request or something and it tells me whether or not the word i sent was spelled correctly. Preferred but not required: The ability for that online sevrice to also send back suggestions. Thank you :)

    Read the article

  • xslt param conditional check

    - by LB
    I have a: <xsl:param name="SomeFlag" /> In my XSLT template, I want to do a conditional check on SomeFlag. Currently I'm doing it as: <xsl:if test="$SomeFlag = true"> SomeFlag is true! </xsl:if> Is this how we evaluate the the flag? I'm setting the param in C# as: xslarg.AddParam("SomeFlag", String.Empty, true); Any ideas?

    Read the article

  • Check checkbox checked property using jQuery

    - by Prasad
    I need to check the checked property of a checkbox and perform an action based on the checked property using jQuery. For example, if the age checkbox is checked, then I need to show a textbox to enter age, else hide the textbox. But the following code returns false by default: if($('#isAgeSelected').attr('checked')) { $("#txtAge").show(); } else { $("#txtAge").hide(); } How do I successfully query the checked property?

    Read the article

  • C#: check if a string start with any character in a list

    - by JoesyXHN
    Hi, I want to check whether a string starts with any character in a list. My current implementation in C# is as follows: char[] columnChars = new char[] { 'A', 'B', 'C', 'D', 'E' }; private bool startWithColumn(string toCheck) { for(int i=0; i<columnChars.Length; i++) if (toCheck.StartsWith(columnChars[i]+"")) { return true; } return false; } I would like to know if any solution is better?

    Read the article

  • Check Form for child Forms - C#

    - by dimanyuk
    I have main form and some other forms, that can be shown by controls, using ShowDialog(control). Also I have event handler on the main form, that can be handled anytime. How can I check inside it, is there any other dialog forms?

    Read the article

  • how to check computer's state using QT ?

    - by kaycee
    i'm trying to get computer's state in my LAN... thought about using QTcpSocket but it's not realy effective since port also should be inserted as: socket->connectToHost("hostName", portNumber); if (socket->waitForConnected(1000)) qDebug("Connected!"); can anyone demonstare me a better way to check if computer is responding ?

    Read the article

  • Access to iTunes Sound Check Results on iPhone

    - by Baldoph
    I would like to propose to the user some songs whose volume doesn't exceed a certain level. Is there any way to access to the results of the 'Sound Check' option, from the iPhone ? If not, do you know if I can calculate that with the audio tools in the iPhone SDK ? Thanks a lot.

    Read the article

  • How to track CVS Check-Ins

    - by Geek
    We recently created a branch out of the main branch of our code for the beta. Now I want to check what all files have changed in the branch in the last one week. How to get that information out of CVS. What is the command for this ?

    Read the article

  • Check if a connection is in a transaction

    - by acidzombie24
    I am getting a SqlConnection does not support parallel transactions. exception and this answer mentions its when a connection tries to open two transactions. This is exactly what i am doing. I thought nested transactions were ok (i was using sqlite for the prototype). How do i check if the connection is already in a transaction? I am using Microsoft SQL Server Database File.

    Read the article

  • How to check for redirects on ajax calls?

    - by acidzombie24
    I was looking at this answer and some other answers http://stackoverflow.com/questions/199099/how-to-manage-a-redirect-request-after-a-jquery-ajax-call/199156#199156 I can not get this to work. i check the XMLHttpRequest object in both success and complete. In both cases when there is a redirect instead of getting a 302 i get a 200 and the html for that page. How do i make it actually report the 3xx redirect instead of skipping ahead and giving me a 200?

    Read the article

  • SElinux integrety check

    - by Alex
    How can i check (with SELinux) access to the file by process name? For examle: we have 2 process: * /usr/bin/foo1 * /usr/bin/foo2 They are run under account with username userA and try to open for modify file: /home/userA/test.txt I want that if foo1 try to open file - it's ok. But if foo2 try to open this file - i have message about this in /var/log Problem is that both processes have the same user ID. And i cant use RBAC by username.

    Read the article

< Previous Page | 37 38 39 40 41 42 43 44 45 46 47 48  | Next Page >