Search Results

Search found 21001 results on 841 pages for 'spelling check'.

Page 69/841 | < Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >

  • python-pam & pam_time module -- possible to check a user without password?

    - by medigeek
    I've looked at the example script of python-pam and linux pam pages, but it's a bit confusing, at least for a beginner in PAM (that I am): http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/Linux-PAM_ADG.html http://packages.ubuntu.com/python-pam Is it possible to check if a user has or does not have access to login, without entering password? I would like to create a script that root can use to check if a user is allowed or not to login to the system. If so, can someone post an example that checks if the user is allowed against pam_time? Thanks in advance!

    Read the article

  • From a Perl test file, how do I check the contents of a file?

    - by justintime
    I want to test a script I have written in Perl and specifically check what output it writes to file. I wrote it some time ago and don't want to modify it to the extent of turning it into a module but would like to regression test it before adding some small functional changes. So far I have use Test::Command tests => 10; exit_is_num($cmd, 0); .... But the command produces some files and I want to check those files are the same as I expect (either equal or match some regexp). Any suggestions

    Read the article

  • How to check if two System.Drawing.Color structures represent the same color in 16 bit color depth?

    - by David
    How can I check if two System.Drawing.Color structures represent the same color in 16 bit color depth (or generally based on the value of Screen.PrimaryScreen.BitsPerPixel)? Let's say I set Form.TransparencyKey to Value1 (of Color type), I want to check that when the user selects a new background color for the form (Value2), I don't set the entire form transparent. On 32bit color depth screens I simply compare the two values: if (Value1 == Value2) However, this does not work on 16bit color depth screens, as more Color values for the Value2 would represent the same actual 16bit color as Value1, as I found out the hard way.

    Read the article

  • How to check if a SWF is running as an AIR app?

    - by Sandro
    Hi, I'm wondering if there is a way for a SWF to check at runtime whether it is running as an online SWF or an AIR app? I need to use the same SWF to run both online and locally, however when running as an AIR app, external assets are located in a different directory. I'd like to check whether a SWF is local or online so I can change the source path for external assets accordingly. Thanks, Sandro Edit: I just realized this might be a dumb question. :) I may just use flashvars to tell the SWF that it is running within an AIR app.

    Read the article

  • iphone SDK: How to check user set up a valid IP , Netmask , Router ???

    - by WebberLai
    It is simple to understand after this pic. I add fewtextfields in tableview I already set the keyboard style is number pad. Now the problems is 1.Do I need to create 12 textfields ???ex. UITextField *ip1,ip2,ip3,ip4....or just set different tag for textfield ? 2.How to check user enter wrong char not 3 valid numbers (even the keyboard is set number pad,but it might can paste words...) 3.How to check user did follow this setting rules ??? <1If IP1 is 0~223 , IP2 need to be set 0~255,IP3,IP4 both are 0~255 <2If IP1 is 172 ,IP2 is set 16~31.IP3,IP4 both are 0~255; If IP1 is 192 ,IP2 must be 168.IP3 IP4 are 0~255 <3Netmask set default 255.255.255.0 <4Router 0~223 ,0~255 ,0~255 ,0~255 This IP setting rules is my friends tech me this ...I not sure the rules is right or not?

    Read the article

  • Interview question: Check if one string is a rotation of other string.

    - by Webdev
    A friend of mine was asked the following question today at interview for the position of software developer. Given two string s1 and s2 how will you check if s1 is a rotated version of s2 ? Example: if s1 = "stackoverflow"; then the following are some of its rotated versions: "tackoverflows" "ackoverflowst" "overflowstack" where as "stackoverflwo" is not a rotated version. The answer he gave was: Take s2 and find the logest prefix that is a substring of s1, that will give you the point of rotation. Once you find that point, break s2 at that point to get s2a and s2b, then just check if concatenate(s2a,s2b) == s1 It looks like a good solution to me and my friend. But the interviewr though otherwise. He asked for a simpler solution. Please help me by telling how would you do this in Java/C/C++ ? Thanks in advance.

    Read the article

  • Best way to check for null values in Java?

    - by Arty-fishL
    I need to check whether the function of an object returns true or false in Java, but that object may be null, so obviously then the function would throw a NullPointerException. This means I need to check if the object is null before checking the value of the function. What is the best way to go about this? I've listed some methods I considered, I just want to know the most sensible one, the one that is best programming practice for Java (opinion?). // method 1 if (foo != null) { if (foo.bar()) { etc... } } // method 2 if (foo != null ? foo.bar() : false) { etc... } // method 3 try { if (foo.bar()) { etc... } } catch (NullPointerException e) { } // method 4 // would this work all the time, would it still call foo.bar()? if (foo != null && foo.bar()) { etc... }

    Read the article

  • How to Check for record existence and do Insert in MYSQL ?

    - by karthik
    How to Check for record existence and do Insert or Update in MYSQL ? I have a script, which has set of Insert statements for multiple tables. Now when i try to execute the Insert statement, i want to do the following.. Check for the record existence and then do Insert or Update. If the Record is not exist do Insert. If the Record is already do not do anything. How to accomplish this ? Note : The script with Insert Statements are generated programmaticaly using SP

    Read the article

  • What's the best way to check if the view is visible on the window?

    - by bhups
    What's the best way to check if the view is visible on the window? I have a CustomView which is part of my SDK and anybody can add CustomView to their layouts. My CustomView is taking some actions when it is visible to the user periodically. So if view becomes invisible to the user then it needs to stop the timer and when it becomes visible again it should restart its course. But unfortunately there is no certain way of checking if my CustomView becomes visible or invisible to the user. There are few things that I can check and listen to: onVisibilityChange //it is for view's visibility change, and is introduced in new API 8 version so has backward compatibility issue onWindowVisibilityChange //but my CustomView can be part of a ViewFlipper's Views so it can pose issues onDetachedFromWindows //this not as useful onWindowFocusChanged //Again my CustomView can be part of ViewFlipper's views. So if anybody has faced this kind of issues please throw some light.

    Read the article

  • How do I implement a Google Latitude check-in feature on Windows Mobile?

    - by Carnotaurus
    I hope this is the correct forum. I wish to write a mobile application (MVC 4 mobile app) that extends Google Latitude for Windows Mobile 7 (or version 8 when launched in November). However, according to Google's own website (see http://www.google.com/mobile/latitude/), the check-in feature is not supported on Windows Mobile. So, how would I implement such a feature (not so interested in the UI here) using the technologies that I have mentioned? EDIT The implementation needs to store check-in data against a Google Latitude account.

    Read the article

  • How to check wether a path represented by a QString with german umlauts exists?

    - by MB
    Hey, i get a QString which represents a directory from a QLineEdit. Now i want to check wether a certain file exists in this directory. But if i try this with os.path.exists and os.path.join and get in trouble when german umlauts occur in the directory path: #the direcory coming from the user input in the QLineEdit #i take this QString to the local 8-Bit encoding and then make #a string from it target_dir = str(lineEdit.text().toLocal8Bit()) #the file name that should be checked for file_name = 'some-name.txt' #this fails with a UnicodeDecodeError when a umlaut occurs in target_dir os.path.exists(os.path.join(target_dir, file_name)) How would you check if the file exists, when you might encounter german umlauts?

    Read the article

  • Java, JavaCC: How to check if a char (or char pair) is inside a given UTF32 range?

    - by java.is.for.desktop
    Hello, everyone! I am referring to the XML 1.1 spec. Look at the definition of NameStartChar: NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] If I interpret this correctly, the last range (#x10000-#xEFFFF) goes beyond the UTF16 range of Java's char type. So it must be UTF32, right? So, I need to check pairs of char against this range, instead of single chars, right? My questions are: How do I check for such character ranges using standard Java methods? How is it possible to define such ranges in JavaCC? JavaCC complains about \u10000 and \uEFFFF Thank you! NOTE: Don't worry, I am not trying to write an own XML-parser. I need those character ranges for other reasons.

    Read the article

  • How to check for an active Internet Connection on iPhone SDK?

    - by Brock Woolf
    I would like to check to see if I have an Internet connection on the iPhone using the Cocoa Touch libraries. I came up with a way to do this using an NSUrl. The way I did it seems a bit unreliable (because even Google could one day be down and relying on a 3rd party seems bad) and while I could check to see for a response from some other websites if Google didn't respond, it does seem wasteful and an unnecessary overhead on my application. - (BOOL) connectedToInternet { NSString *URLString = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://www.google.com"]]; return ( URLString != NULL ) ? YES : NO; } Is what I have done bad? (Not to mention 'stringWithContentsOfURL' is deprecated in 3.0) And if so what is a better way to accomplish this?

    Read the article

  • How do I check the input data type of a variable in C++?

    - by atinesh singh
    i'm atinesh currently started learning c++ but i've one doubt about how to check the data type of input variable in c++. #include<iostream.h> void main() { double a,b; cout<<"Enter two double values"; cin>>a>>b; if() //if condition false then cout<<"data entered is not of double type"; //i'm having trouble for identifying whether data //is double or not how to check please help me }

    Read the article

  • regular expression to check file content type is .doc or not?

    - by Pandiya Chendur
    When i use a file upload i use to check file contenttype with regular expressions... For ex private bool IsImage(HttpPostedFile file) { if (file != null && Regex.IsMatch(file.ContentType, "image/\\S+") && file.ContentLength > 0) { return true; } return false; } This returns my file is an image or not... How to check it is a word(.doc/.docx) document or not using c#...

    Read the article

  • Do you allow check-ins associated with work items from another Team Project?

    - by muerte
    Team Foundation Server 2008 allows that every check-in is associated with a work item, but what do you do if you are developing some features which span several Team Projects? For example, you're developing a specific product for a client and that product has its own Team Project, but is also using some of your other components or tools which are maintained independently in another Team Project. Where do you create work items for requirements which involve a change in both projects? Separated, every work item in its own Team Projects All work items in clients Team Project, regardless of associated source code The latter seems easier to maintain and control, but it involves associating check-ins from one Team Project to work items in another.

    Read the article

  • Check if web form values has changed. Best practice

    - by Andrew Florko
    Hello everybody, I have multi-step form and user can navigate to any page to modify or add information. There is a menu that shows progress and steps user completed. This menu allows to navigate to any step user completed or going to complete. Inspite of big button "Save and Continue" some users click this menu to navigate further. I have to check - if values have changed in a form and ask: "Save changes? Yes/No". What is the best way (with minimum code) you suggest me to check if form values have changed. Thank you in advance!

    Read the article

< Previous Page | 65 66 67 68 69 70 71 72 73 74 75 76  | Next Page >