Search Results

Search found 18596 results on 744 pages for 'c how to detect all ip addresses from a lan'.

Page 116/744 | < Previous Page | 112 113 114 115 116 117 118 119 120 121 122 123  | Next Page >

  • How to Detect IE Version on Vista and Above

    - by Charles Gargent
    I would like to detect what version IE is running on Vista and above (I am developing on 7). I currently use WMI on XP, but it appears that this is no more. I have searched for an answer and so far I have found the following solutions: Using System.Windows.Forms WebBrowser wb = new WebBrowser; wb.Version; SELECT path,filename,extension,version FROM CIM_DataFile WHERE path="\\Program Files\\Internet Explorer\\" AND filename="iexplore" AND extension="exe" AND version>"8.0" And there is probably a way of looking up in the registry. Is there must a more elegant solution to this?

    Read the article

  • [Python] Detect destination of shortened, or "tiny" url

    - by conradlee
    I have just scraped a bunch of Google Buzz data, and I want to know which Buzz posts reference the same news articles. The problem is that many of the links in these posts have been modified by URL shorteners, so it could be the case that many distinct shortened URLs actually all point to the same news article. Given that I have millions of posts, what is the most efficient way (preferably in python) for me to detect whether a url is a shortened URL (from any of the many URL shortening services, or at least the largest) Find the "destination" of the shortened url, i.e., the long, original version of the shortened URL. Does anyone know if the URL shorteners impose strict request rate limits? If I keep this down to 100/second (all coming form the same IP address), do you think I'll run into trouble?

    Read the article

  • Detect car acceleration in Android app?

    - by Stud33
    I want to incorporate some Accelerometer code into a Android application im working and want to see if this is possible. Basically what I need is for the code to detect car acceleration motion. I am not wanting to determine speed with the code but just distinguish if the phone is in a car and has accelerated motion (Hence the car is moving for the first time). I have gone through many different accelerometer applications to see if this motion produces a viable profile to go off of and it appears it does. Just looking for something that popups a "Hello World" dialog when it detects your in the car and its moving for the first time down the street. Any help would be appreciated and a simple yes or no its possible would work. I would also be interested in compensating anyone that is capable of doing this as well. I need this done like yesterday so please let me know. Thank You, JTW

    Read the article

  • How to detect code duplication during development ?

    - by David Dibben
    We have a fairly large code base, 400K LOC of C++, and code duplication is something of a problem. Are there any tools which can effectively detect duplicated blocks of code? Ideally this would be something that developers could use during development rather than just run occasionally to see where the problems are. It would also be nice if we could integrate such a tool with CruiseControl to give a report after each check in. I had a look at Duploc some time ago, it showed a nice graph but requires a smalltalk environment to use it, which makes running it automatically rather difficult. Free tools would be nice, but if there are some good commercial tools I would also be interested.

    Read the article

  • Detect WebKit Version 525 and Below With RegEx

    - by Jay
    I'm no good at Regular Expressions, really! I would like to specifically detect WebKit browsers below version 525. I have a regular expression [/WebKit\/[\d.]+/.exec(navigator.appVersion)] that correctly returns WebKit/5….…, really, I'd like it to return only the version number, but if the browser isn't WebKit, return null, or better still 0. For example, if the browser was Trident, Presto or Gecko, return null, whereas if the browser is WebKit, return it's version number. To clarify, I would like the regular expression to check if navigator.appVersion contains WebKit and if it does not, return null, if it does, return the version number. I appreciate all your help! Please let's keep this focused, let's not flirt with jQuery or the sort, it's overkill in this scenario.

    Read the article

  • How to Detect Right Click on the Taskbar

    - by Zay
    I've got a Windows Forms application in C# that starts off with a loading dialog. As expected, a button for the app shows up in the Windows taskbar. I would like to detect right-clicks that might be done to that button. Ultimately, I hope to disable the right-click or simply have the loading dialog regain focus. I've seen that some people use custom libraries and packages (interop, for example) to achieve some Win32 functionality, but I'd personally like to avoid this. Is it impossible to do without such libraries/packages?

    Read the article

  • Using accelerometer to detect iPad lock switch trigger?

    - by DevDevDev
    So for complicated reasons I am managing view rotations myself, and am only implementing UIDeviceOrientationPortrait as the autorotating orientation. Anyway, when one clicks the screen lock on the iPad, the device will rotate to UIDeviceOrientationPortrait, which will cause my code to rotate, which I do not want to happen. For instance of the user is holding the device in "landscape mode", i.e. I have already manually rotated the UI to landscape mode, and he/she clicks the screen lock, it will rotate the UI to portrait mode, even though the user did not move the device at all. So somehow I need a way to differentiate between rotations to portrait mode occuring from the screen lock, and those occuring from device rotation. As such, I would like somehow to use the accelerometer to detect whether or not the device was actually 'rotated' or whether the button was clicked. Thanks!

    Read the article

  • Getting websites to detect our mobile browser

    - by Chromatix
    I've been asked to find out a sensible way to make the majority of popular websites detect our browser - which is functionally complete, but is running on rather constrained hardware - as a "mobile" browser. The idea is that the heaviest popular websites seem to have mobile versions, which render much faster and fit better on the screen. I've looked at the inverse question, which tells me that there isn't an obvious standard way of doing it - http://www.brainhandles.com/techno-thoughts/detecting-mobile-browsers is a case in point. This is borne out by looking at a variety of User-Agent strings from popular mobile and desktop browsers. So far the best idea we can come up with is to add "Mobile" to the string somewhere, since this is the main visible difference between Safari for iPad/iPhone and for Windows/Mac. Does anyone have a better idea?

    Read the article

  • Firefox fails to detect content type set by PHP

    - by Ying
    Hi all, I want a php page to 'display' a pdf. Here is the code: <?php header("Content-type: application/pdf"); readfile('Reportage - Berlin.pdf'); //tried echo(readfile(...)) as well ?> Not very complicated I think, but somehow firefox cant detect that this is a pdf. This works in Safari but in firefox, i get a prompt to download the file, so i get like a pdftest.php file. I know im getting my file because if I rename the extension to pdf, i can open it. This seems too simple! am i missing something?

    Read the article

  • Detect a file is closed

    - by User1
    Is there a simple way to detect when a file for writing is closed? I have a process that kicks out a new file every 5 seconds. I can not change the code for that process. I am writing another process to analyze the contents of each file immediately when it is created. Is there a simple way to watch a certain directory to see when a file is no longer opened for writing? I'm hoping for some sort of Linux command.

    Read the article

  • how to detect grid view empty cell

    - by nCdy
    how to detect grid view empty cell ? I need it for highlighting. So I made a css .RedColored { background: FF0000; } and trying to appear it to empty GV cells this way : protected virtual GridView1_RowDataBound (_sender : object, e : System.Web.UI.WebControls.GridViewRowEventArgs) : void { e.Row.Cells[0].CssClass = "wide"; foreach(i : int in [0..e.Row.Cells.Count-1]) { when(e.Row.Cells[i].Text==null) { e.Row.Cells[i].CssClass="RedColored"; } } } but my it doesn't appears to empty cells , even I've tried Text=="" , Cell[i]==null, Cell[i].ToString()=="" and nothing helped.

    Read the article

  • How to detect internet connectivity using java program

    - by Sunil Kumar Sahoo
    How to write a java program which will tell me whether I have internet access or not. I donot want to ping or create connection with some external url because if that server will be down then my program will not work. I want reliable way to detect which will tell me 100% guarantee that whether I have internet connection or not irrespective of my Operating System. I want the program for the computers who are directly connected to internet. I have tried with the below program URL url = new URL("http://www.xyz.com/"); URLConnection conn = url.openConnection(); conn.connect(); I want something more appropriate than this program Thanks Sunil Kumar Sahoo

    Read the article

  • Detect if touch device

    - by Kilnr
    Hello, I'm writing a MIDlet using the Kuix UI toolkit, and I want to make changes to the toolkit depending on whether the current device is a touch screen device. (These changes include making buttons bigger, for easier tapping.) Is there a way to detect whether the device has a touch screen using J2ME (MIDP 2)? [edit] as a (crappy) workaround I check for the screen height instead. A screen width a height of higher than 240 is likely a touch screen... Please let me know if there are any more effective ways.

    Read the article

  • How to detect an overflow in C++ ?

    - by Tim
    Hi, I just wonder if there is some convenient way to detect if overflow happens to any variable of any default data type used in a C++ program during runtime? By convenient, I mean no need to write code to follow each variable if it is in the range of its data type every time its value changes. Or if it is impossible to achieve this, how would you do? For example, float f1=FLT_MAX+1; cout << f1 << endl; doesn't give any error or warning in either compilation with "gcc -W -Wall" or running. Thanks and regards!

    Read the article

  • detect sender of signal (linux, ptrace)

    - by osgx
    Hello Can I distinguish signal, between delivered directly to a process and delivered via debugger. Case 1: $ ./process1 process1 (not ptraced) set up handler alarm(5); .... signal is handled and I can parse handler parameters Case 2: $ debugger1 ./process1 process1 (is ptraced by debugger1) set up handler alarm(5); ... signal is catched by debugger1. It resumes process1 with PTRACE_CONT, signal_number is 4th parameter of PTRACE_CONT. signal is redelivered to process1 it is handled. So, how can I detect in signal handler, was it redelivered by debugger or send by system? OS is Linux, kernel is 2.6.30. Programs are written in plain C.

    Read the article

  • how to detect an escape sequence in a string

    - by mix
    Given a string named line whose raw version has this value: \rRAWSTRING how can I detect if it has the escape character \r? What I've tried is: if repr(line).startswith('\r'): blah... but it doesn't catch it. I also tried find, such as: if repr(line).find('\r') != -1: blah doesn't work either. What am I missing? thx! EDIT: thanks for all the replies and the corrections re terminolgy and sorry for the confusion. OK, if i do this print repr(line) then what it prints is: '\rSET ENABLE ACK\n' (including the single quotes). i have tried all the suggestions, including: line.startswith(r'\r') line.startswith('\\r') each of which returns False. also tried: line.find(r'\r') line.find('\\r') each of which returns -1

    Read the article

  • Detect Rotation of a scanned image in C#

    - by ahmed fouad
    We want a c# solution to correct the scanned image because it is rotated. To solve this problem we must detect the rotation angle first and then rotate the image. This was our first thought for our problem. But then we thought image warping would be more accurate as I think it would make the scanned image like our template. Then we can process it as we know all the coordinates of our template... I searched for a free SDK or a free solution in c#. Helping me in this will be great as it is the last task in our work. Really, thanks for all.

    Read the article

  • How to detect the language of MS Excel from C#

    - by Babba
    If i try to use Excel from C# (interop) i receive error (HRESULT: 0x80028018) when current thread language is different from Excel language: so i need to set thread language, they must be the same. Which is the best method to understand the language of Excel/Office? 1) registry (HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Common\LanguageResources\UILanguage ? How understand wich version (12.0/14.0/...?) 2) with Application like suggested here (http://stackoverflow.com/questions/2804556/how-to-detect-the-language-of-ms-excel) ? It's ok but i need a strong reference to a specific version Microsoft.Office.Core and so i can't do it for different versione of Office: Excel.Application application = new Excel.Application(); int iUi = application.LanguageSettings.get_LanguageID(Microsoft.Office.Core.MsoAppLanguageID.msoLanguageIDUI); MessageBox.Show(iUi.ToString()); 3) other?

    Read the article

  • Detect second tap on tableview cell iphone sdk

    - by neha
    Hi all, In my application, I'm expanding a tableview row when it's tapped. I'm using - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; if( selected == YES ) { [self expandRow]; } else { [self contractRow]; } height = [lblFeed frame].size.height + 75; } to achieve that. So when a row is tapped, this function automatically gets the signal of row tap and it sets the selected=YES. Now when I tap the same expanded row, it still sets selected=YES. I want to detect the second tap and contract the row. How shall I do that while using the same function?

    Read the article

  • Detect LaTeX class name

    - by Matthew Leingang
    I'm working on a LaTeX package which might need to do some things differently depending on the class that's being used. I'm wondering if there's a way to auto-detect or test the document class. One could certainly look up the class files and test for the existence of a specific macro defined by that class, but is there a smarter way? I looked at the definition of the \ProvidesClass macro and can't see if it saves the class name anywhere except \@currname. I believe \@currname is just the name of the current package or class being read. Basically I want to execute \author{\longauthorname} in the article class but \author[\shortauthorname]{\longauthorname} in the beamer class.

    Read the article

  • How to detect pending system shutdown on Linux?

    - by Rajorshi
    Hi, I am working on an app where I need to detect system shutdown. However, I have not found any reliable way get a notification on this event. I know that on shutdown, my app will receive a SIGTERM signal followed by a SIGKILL. What I want to know is if there is someway to query if a SIGTERM is part of a shutdown sequence? Does any one know if there is a way to query that programmatically (C API)? As far as I know, the system does not provide any other method to query for an impending shutdowm. If it does, that would solve my problem as well. I have been trying out runlevels as well, but change in runlevels seem to be instantaneous and without any prior warnings.

    Read the article

  • Event handling to detect if user clicks a 'Like' button in XFBML page

    - by Simon_Weaver
    I have a Facebook connect app / canvas IFrame app which has a Like control for a fanpage. I'd like to detect when the user clicks the Like button to be able to display additional info (a discount coupon code). I'm using the latest Javascript API but the events that can be handled doesn't seem to include detection of social widget controls. The documentation for the Like Plugin doesn't show any events. However I know its definitely possible because if I have two Like buttons on a page they both instantly update each other if I like or unlike whatever it is.

    Read the article

  • How to detect when UITextField become empty

    - by Jakub
    Hello, I would like to perform a certain action when UITextField becomes empty (user deletes everything one sign after another or uses the clear option). I thought about using two methods - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string; and - (BOOL)textFieldShouldClear:(UITextField *)textField; from UITextFieldDelegate I'm not sure how to detect the situation when the text field becomes empty? I tried with: if ([textField.text length] == 0) but it does't work as the fisrt of the above methods is called before the sign is deleted from the text field. Any ideas?

    Read the article

  • Detect insertion of media into a drive using windows messages

    - by rschnorenberg
    I am currently using WM_DEVICECHANGE to be notified when new USB drives are connected to the computer. This works great for devices like thumb-drives where as soon as the device arrives it is ready to have files read from it. For devices like SD card readers it does not because the message is sent out once when the device is connected but no message is sent when a user actually inserts a card into the device. Is it possible to detect the insertion of new media into an existing USB device without having to use polling?

    Read the article

  • How to detect default printer properties from browser?

    - by Annan
    Regardless of if this is a good idea or not, is it possible to detect printer attributes from the browser? The idea is that you want to print out a brochure that's selling something. Depending on different things such as if the printer is black&white/colour, high/low resolution, laser/inkjet, printing to a file, etc, you want to print out the page differently. For example you might choose different text colours or fonts, different image sizes, etc. My initial thoughts are: ActiveX, Flash, Java, Silverlight, browser plugins. Kudos if it's possible in javascript. I'm interested in all ways to do this, cross browser or not. Please no reasons about why this shouldn't be done ^_^

    Read the article

< Previous Page | 112 113 114 115 116 117 118 119 120 121 122 123  | Next Page >