Search Results

Search found 21356 results on 855 pages for 'check digit'.

Page 63/855 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • How to check last changes in filesystem or directory with bash?

    - by Robert Vila
    After the system unmounted the root partition I detected that some files are missing in the filesystem. wifi and the gwibber icons disappeared from the indicator applet I want to check if there are other files missing using the ls program and the locate program, which woks on indexes of a previous state of the filesystem. Thus, locate '/usr/share/icons/*' | xargs ls -d 2>&1 >/dev/null serves for that purpose, and I can count the nonexistent files like this: locate '/usr/share/icons/*' | xargs ls -d 2>&1 >/dev/null | wc -l except for the case where filenames have blank spaces in them; and, not very surprisingly, that is the case with Ubuntu (OMG!! It is no longer "forbidden" like in good old times). If I use: locate '/usr/share/icons/*' | xargs -Iñ ls -d 'ñ' 2>&1 >/dev/null it is not working because there is some kind of interference in the syntax between the redirections of the standard outputs and the use of the parameter -I. Can anyone please help me with this syntax or giving another idea?

    Read the article

  • update-apt-xapian-index hogs CPU, even when Update Manager is set to not check for updates

    - by Dave M G
    I have a slightly older laptop running Ubuntu 11.10. It runs fine, but frequently, when I start it up, the CPU monitor in my Gnome Panel shows 100% usage for for what can be up to five minutes or so. It seems that the offending process is update-apt-xapian-index, which, if I understand correctly, is the update manager checking for updates. I have gone into the update manager settings, and selected to never check for updates. I'll do that manually when I feel like I have the time to leave the laptop running for that. However, despite my selection, this still happens. Roughly 50% of the time or more, when I start my laptop, it runs update-apt-xapian-index. How can I get the update manager to respect my settings, or at least to get this process to stop eating my CPU cycles?

    Read the article

  • when i marked all check boxes in settings,update fails.

    - by user67966
    "W:Failed to fetch cdrom://Ubuntu 12.04 LTS Precise Pangolin - Release i386 (20120423)/dists/precise/main/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs , W:Failed to fetch cdrom://Ubuntu 12.04 LTS Precise Pangolin - Release i386 (20120423)/dists/precise/restricted/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs , E:Some index files failed to download. They have been ignored, or old ones used instead." the above information is a crash info.It happens when i manually update ubuntu.I have marked all check-boxes in settings which was by default not marked. What is the main reason for this problem?

    Read the article

  • Is it bad style to redundantly check a condition?

    - by mcwise
    I often get to positions in my code where I find myself checking a specific condition over and over again. I want to give you a small example: suppose there is a text file which contains lines starting with "a", lines starting with "b" and other lines and I actually only want to work with the first two sort of lines. My code would look something like this (using python, but read it as pseudocode): # ... clear_lines() # removes every other line than those starting with "a" or "b" for line in lines: if (line.startsWith("a")): # do stuff if (line.startsWith("b")): # magic else: # this else is redundant, I already made sure there is no else-case # by using clear_lines() # ... You can imagine I won't only check this condition here, but maybe also in other functions and so on. Do you think of it as noise or does it add some value to my code?

    Read the article

  • Problems with the colors on my screen. How can I check if it's a hardware problem?

    - by Ingo Gerth
    On my EEE PC netbook some colors are not displayed properly. Specifically, dark gradients such as in the window title do not look very smooth, but rather look like a sequence of a couple of different colors. This is especially visible when opening a menu, for example the "File" menu in Firefox. As you know this one is black, and it looks terrible on my screen. It is not just black, but the colors look really graded and far from a smooth gradient or anything. Now I am wondering: Is this a hardware or software issue? And how can I check this? If it should be a fixable problem I think it would be worth another question. Note that I am using Natty. If my problem description is not good enough I can try to take a photo.

    Read the article

  • How do I check that my tests were not removed by other developers?

    - by parxier
    I've just came across an interesting collaborative coding issue at work. I've written some unit/functional/integration tests and implemented new functionality into application that's got ~20 developers working on it. All tests passed and I checked in the code. Next day I updated my project and noticed (by chance) that some of my test methods were deleted by other developers (merging problems on their end). New application code was not touched. How can I detect such problem automatically? I mean, I write tests to automatically check that my code still works (or was not deleted), how do I do the same for tests? We're using Java, JUnit, Selenium, SVN and Hudson CI if it matters.

    Read the article

  • Tester/Doer pattern: Assume the caller conforms to the pattern or be defensive and repeat the check?

    - by Daniel Hilgarth
    Assume a simple class that implements the Tester/Doer pattern: public class FooCommandHandler : ICommandHandler { public bool CanHandle(object command) { return command is FooCommand; } public void Handle(object command) { var fooCommand = (FooCommand)command; // Do something with fooCommand } } Now, if someone doesn't conform to the pattern and calls Handle without verifying the command via CanHandle, the code in Handle throws an exception. However, depending on the actual implementation of Handle this can be a whole range of different exceptions. The following implementation would check CanHandle again in Handle and throw a descriptive exception: public void Handle(object command) { if(!CanHandle(command)) throw new TesterDoerPatternUsageViolationException("Please call CanHandle first"); // actual implementation of handling the command. } This has the advantage that the exception is very descriptive. It has the disadvantage that CanHandle is called twice for "good" clients. Is there a consensus on which variation should be used?

    Read the article

  • How can I have a mouseover/in one off check?

    - by Denis Hoctor
    Hi all, How can I test if a mouse is within a given div? I know how to use events to do something when it occurs but is it possible to check it on pageload only? What I want to do is smething like: if(mouse is in specified div) { check = true; } else { check = false; } Thanks, Denis

    Read the article

  • IDisposable: is it necessary to check for null on finally {}?

    - by BlackTigerX
    In most examples that you find on the web when explicitly not using "using", the pattern looks something like: SqlConnection c = new SqlConnection(@"..."); try { c.Open(); ... } finally { if (c != null) //<== check for null c.Dispose(); } If you do use "using" and look at the generated IL code, you can see that it generates the check for null L_0024: ldloc.1 L_0025: ldnull L_0026: ceq L_0028: stloc.s CS$4$0000 L_002a: ldloc.s CS$4$0000 L_002c: brtrue.s L_0035 L_002e: ldloc.1 L_002f: callvirt instance void [mscorlib]System.IDisposable::Dispose() L_0034: nop L_0035: endfinally I understand why the IL gets translated to check for null (doesn't know what you did inside the using block), but if you're using try..finally and you have full control of how the IDisposable object gets used inside the try..finally block, do you really need to check for null? if so, why?

    Read the article

  • How i find the greatest number from six or more digit number?

    - by Rajendra Bhole
    Hi,thanks in advance, I have the code in which i want to find out the greatest number from six numbers, the code as follows, if( (pixels->r == 244 || pixels->g == 242 || pixels->b == 245) || (pixels->r == 236 || pixels->g == 235 || pixels->b == 233) || (pixels->r == 250 || pixels->g == 249 || pixels->b == 247) || (pixels->r == 253 || pixels->g == 251 || pixels->b == 230) || (pixels->r == 253 || pixels->g == 246 || pixels->b == 230) || (pixels->r == 254 || pixels->g == 247 || pixels->b == 229)) { numberOfPixels1++; NSLog( @"Pixel data1 %d", numberOfPixels1); } if( (pixels->r == 250 || pixels->g == 240 || pixels->b == 239) ||(pixels->r == 243 || pixels->g == 234 || pixels->b == 229) || (pixels->r == 244 || pixels->g == 241 || pixels->b == 234) || (pixels->r == 251 || pixels->g == 252 || pixels->b == 244) || (pixels->r == 252 || pixels->g == 248 || pixels->b == 237) || (pixels->r == 254 || pixels->g == 246 || pixels->b == 225)) { numberOfPixels2++; NSLog( @"Pixel data2 %d", numberOfPixels2); } if( (pixels->r == 255 || pixels->g == 249 || pixels->b == 225) ||(pixels->r == 255 || pixels->g == 249 || pixels->b == 225) || (pixels->r == 241 || pixels->g == 231 || pixels->b == 195) || (pixels->r == 239 || pixels->g == 226 || pixels->b == 173) || (pixels->r == 224 || pixels->g == 210 || pixels->b == 147) || (pixels->r == 242 || pixels->g == 226 || pixels->b == 151)) { numberOfPixels3++; NSLog( @"Pixel data3 %d", numberOfPixels3); } if( (pixels->r == 235 || pixels->g == 214 || pixels->b == 159) ||(pixels->r == 235 || pixels->g == 217 || pixels->b == 133) || (pixels->r == 227 || pixels->g == 196 || pixels->b == 103) || (pixels->r == 225 || pixels->g == 193 || pixels->b == 106) || (pixels->r == 223 || pixels->g == 193 || pixels->b == 123) || (pixels->r == 222 || pixels->g == 184 || pixels->b == 119)) { numberOfPixels4++; NSLog( @"Pixel data4 %d", numberOfPixels4); } if( (pixels->r == 199 || pixels->g == 164 || pixels->b == 100) ||(pixels->r == 188 || pixels->g == 151 || pixels->b == 98) || (pixels->r == 156 || pixels->g == 107 || pixels->b == 67) || (pixels->r == 142 || pixels->g == 88 || pixels->b == 62) || (pixels->r == 121 || pixels->g == 77 || pixels->b == 48) || (pixels->r == 100 || pixels->g == 49 || pixels->b == 22)) { numberOfPixels5++; NSLog( @"Pixel data5 %d", numberOfPixels5); } if( (pixels->r == 101 || pixels->g == 48 || pixels->b == 32) ||(pixels->r == 96 || pixels->g == 49 || pixels->b == 33) || (pixels->r == 87 || pixels->g == 50 || pixels->b == 41) || (pixels->r == 64 || pixels->g == 32 || pixels->b == 21) || (pixels->r == 49 || pixels->g == 37 || pixels->b == 41) || (pixels->r == 27 || pixels->g == 28 || pixels->b == 46)) { numberOfPixels6++; NSLog( @"Pixel data6 %d", numberOfPixels6); } I have to find out greatest from numberOfPixels1....numberOfPixels6 from above code. There are any optimum way to find out the greatest number?

    Read the article

  • How can I check a radio button on load, based on it's value?

    - by Noor
    I've got the value of a radio button (r1) and I'm trying to use: $("input:radio[val=r1]").attr('checked', true); to check it. The thing is that I've got three radio buttons in a div, when I check one, the value of the checked button gets stored. When I reload the page I want the page to check the radio button that was chosen last. Thanks!

    Read the article

  • regex: trim all strings directly preceeded by digit except if string belongs to predefined set of st

    - by Geert-Jan
    I've got addresses I need to clean up for matching purposes. Part of the process is trimming unwanted suffices from housenumbers, e.g: mainstreet 4a --> mainstreet 4. However I don't want: 618 5th Ave SW --> 618 5 Ave SW in other words there are some strings (for now: st, nd, rd, th) which I don't want to strip. What would be the best method of doing this (regex or otherwise) ? a wokring regex without the exceptions would be: a = a.replaceAll("(^| )([0-9]+)[a-z]+($| )","$1$2$3"); //replace 1a --> 1 I thought about first searching and substiting the special cases with special characters while keeping the references in a map, then do the above regex, and then doing the reverse substitute using the reference map, but I'm looking for a simpler solution. Thanks

    Read the article

  • How to make validation for a textbox that accept only comma(,) & digit in c# web application?

    - by prateeksaluja20
    Hello Experts, I am working on a website.I am using C# 2008.I want to make a text box that accept only numbers & comma(,). for example-919981424199,78848817711,47171111747 or there may be a single number like 919981424199. I was able to do one thing My text box only containing number by using this Regular Expression validation.in its property-Validation Expression i wrote "[0-9]+". This is working but now my requirement is to send bulk SMS & each number is separated by (,). I tried a lot but not getting the ans.so please help me to sort out this problem. Thanks in advance.

    Read the article

  • Best way to check for string in comma-delimited list with .NET?

    - by Jeremy Stein
    I'm reading a comma-delimited list of strings from a config file. I need to check whether another string is in that list. For example: "apple,banana,cheese" If I check for "apple" I should find it, but if I check for "app" I should not. What's the most straight-forward and concise way to do this? It doesn't have to be fast. (I'll add my solution as an answer, but I'm hoping someone has something better.)

    Read the article

  • Does any body see a reson in DesignForExtension Check in Checkstyle?

    - by Roman Ivanov
    Check: http://checkstyle.sourceforge.net/config_design.html#DesignForExtension False positives: Checkstyle "Method Not Designed For Extension" error being incorrectly issued? checkstyle Method is not designed for extension - needs to be abstract, final or empty https://sourceforge.net/p/checkstyle/bugs/688/ Look like all switch that Check off in their configurations. Does anybody could show real code example where this Check is useful ? and good for developers.

    Read the article

  • check for a span class content and then update the quantity using jquery?

    - by PD24
    I have code code here: //Check current if (parseInt($("#Quantity").val()) < 25) { // If it is less than 25 then set it to 25 $("#Quantity").attr("value", "25"); } It checks if the quantity box has less than 25 and if it is, adds 25 to the box. The problem is on a particular product i need to check IF my pages contains: <span class="ProductNameText">This is product ABC</span> This is a work around because the customer only has 2 products which dont require 25 quantity. Ideally i would want to check if a page contained Kit Option form fields and then add 25 to the box. Any ideas on how to check for a span and then update the quantity. But the quantity shouldnt be forced, so if the user wants 6 items they should be able to add that figure.

    Read the article

  • How I can check gzip decoding time in the web browser?

    - by user293421
    I want to check the performance of the gzip decoding speed in a web browser. In the Java or c#, we can easily check the gzip decoding time. But I can not measure the decoding time in the web browser. plz help me. I want to check some decoding speed of gzipped html files. With JavaScript can I measure the performance.

    Read the article

  • How to make validation for a textbox that accept only comma(,) & digit in asp.net application?

    - by prateeksaluja20
    I am working on a website. I am using C# 2008. I want to make a text box that accept only numbers & comma(,). for example-919981424199,78848817711,47171111747 or there may be a single number like 919981424199. I was able to do one thing My text box only containing number by using this Regular Expression validation.in its property-Validation Expression i wrote "[0-9]+". This is working but now my requirement is to send bulk SMS & each number is separated by (,). I tried a lot but not getting the ans. so please help me to sort out this problem.

    Read the article

  • How do I check if a process is running from c++ code ?

    - by Maciek
    Hey all, I'm writing a C++ app that will communicate with another process via boost::interprocess, however I need to check if the other process is actually running first - as the other process is responsible for creating the inter-process shared memory. How do I check if the other process is running ? folks, I'm specifically required to check other processes

    Read the article

  • Can you change an AWS Elastic Load Balancer health check without causing instances to go out of service?

    - by Anton I. Sipos
    For a number of reasons I need to change the health check URL of a live site behind an ELB. The ELB is configured for health checks every 30 seconds, with a healthy threshold of 2 and unhealthy threshold of 2. I need to ensure I make this change with no outage. If I make the change to the health check URL, and assuming the URL checks successfully, will the instances stay healthy on the load balancer, or will they go out of service until they succeed 2 health checks (in 1 minute)?

    Read the article

  • Is there a way to check if a user has specific rights?

    - by Vadim
    In my application I'm using ntrights.exe, that is part of Windows Resource Kit, to grant and revoke a specific user right. For example to grant a user "Log on as a server" right, I execute using shell object following command: ntrights -u User +r SeServiceLogonRight However ntrights doesn't allow you to check if a user has a specific right. Can you tell me how I can check if a user has a specific right?

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >