Search Results

Search found 317 results on 13 pages for 'monkey boys'.

Page 3/13 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How can I implement NotOfType<T> in LINQ that has a nice calling syntax?

    - by Lette
    I'm trying to come up with an implementation for NotOfType, which has a readable call syntax. NotOfType should be the complement to OfType<T> and would consequently yield all elements that are not of type T My goal was to implement a method which would be called just like OfType<T>, like in the last line of this snippet: public abstract class Animal {} public class Monkey : Animal {} public class Giraffe : Animal {} public class Lion : Animal {} var monkey = new Monkey(); var giraffe = new Giraffe(); var lion = new Lion(); IEnumerable<Animal> animals = new Animal[] { monkey, giraffe, lion }; IEnumerable<Animal> fewerAnimals = animals.NotOfType<Giraffe>(); However, I can not come up with an implementation that supports that specific calling syntax. This is what I've tried so far: public static class EnumerableExtensions { public static IEnumerable<T> NotOfType<T>(this IEnumerable<T> sequence, Type type) { return sequence.Where(x => x.GetType() != type); } public static IEnumerable<T> NotOfType<T, TExclude>(this IEnumerable<T> sequence) { return sequence.Where(x => !(x is TExclude)); } } Calling these methods would look like this: // Animal is inferred IEnumerable<Animal> fewerAnimals = animals.NotOfType(typeof(Giraffe)); and // Not all types could be inferred, so I have to state all types explicitly IEnumerable<Animal> fewerAnimals = animals.NotOfType<Animal, Giraffe>(); I think that there are major drawbacks with the style of both of these calls. The first one suffers from a redundant "of type/type of" construct, and the second one just doesn't make sense (do I want a list of animals that are neither Animals nor Giraffes?). So, is there a way to accomplish what I want? If not, could it be possible in future versions of the language? (I'm thinking that maybe one day we will have named type arguments, or that we only need to explicitly supply type arguments that can't be inferred?) Or am I just being silly?

    Read the article

  • Finding substring of a word found in joining a string from another string

    - by 2er0
    Given a list of words, L, that are all the same length, and a string, S, find the starting position of the substring of S that is a concatenation of each word in L exactly once and without any intervening characters. This substring will occur exactly once in S. Example: L: "fooo", "barr", "wing", "ding", "wing" S: "lingmindraboofooowingdingbarrwingmonkeypoundcake" Word found in joining L and also found in S: "fooowingdingbarrwing" Answer: 13 L: "mon", "key" S: "monkey Word found in joining L and also found in S: "monkey Answer: 0 L: "a", "b", "c", "d", "e" S: "abcdfecdba" Word found in joining L and also found in S: "ecdba Answer: 5

    Read the article

  • Update one list from another

    - by lacqui
    I have two multi-select lists in HTML - one of categories, and another of items. What I want is that, when an item selected in the "category" list, everything in the "items" list from that category is also selected. For example, if "Categories" contains "Animal", "Mineral", and "Vegetable", and "Items" contains "Dog", "Cat", "Monkey", "Diamond", "Granite", "Carrot", "Tomato": If "Animal" is selected in one list, "Dog", "Cat", and "Monkey" should be selected; any other selections should remain as they are. I'm using a Symfony PHP backend on the server, if that makes any difference

    Read the article

  • yum issue - error msg

    - by Monkey
    i am using oracle linux server 6.2. yum does not work. a manual wget was already used according to https://blogs.oracle.com/OTNGarage/entry/how_to_subscribe_to_the . there is always something about dropbox. yum update firefox Loaded plugins: refresh-packagekit, security http://linux.dropbox.com/fedora/6Server/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404" Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: Dropbox. Please verify its path and try again does anybody know a workaround?

    Read the article

  • Odd IIS FTP Failure

    - by Monkey Boson
    We're running a script on our production box that zips up our database and FTPs it to a backup box every night. Our production box is running Redhat Enterprise 5. Our backup box is running Windows XP Pro / IIS 5.1. Both machines are on the same VLAN (not sure if this is imporatant). The backup file usually clocks in at around 3GB. Every now and again (~5% of the time), the backup script fails. The shell script on the "client side" - which looks at return codes - never identifies any problem since ftp always returns 0. On the "server side", IIS writes out a log that looks like this: #Software: Microsoft Internet Information Services 5.1 #Version: 1.0 #Date: 2009-08-08 07:04:25 #Fields: time c-ip cs-method cs-uri-stem sc-status sc-win32-status 07:04:25 192.168.111.235 [15]USER backup 331 0 07:04:25 192.168.111.235 [15]PASS - 230 0 07:05:54 192.168.111.235 [15]created backup_20090808.zip 426 10035 07:06:16 192.168.111.235 [15]QUIT - 426 0 Now, I know that 426 means "Connection closed, transfer aborted", which is sort-of a catch-all for "IIS was not happy". The real puzzler is the wincode: 10035 (WSAEWOULDBLOCK -- Resource temporarily unavailable). My understanding is that this code is normal when using non-blocking socket calls - which would almost certainly be used by any FTP Server implementation. My first guess that it might be a timeout issue doesn't make sense, since we're only talking about a few minutes here and the timeout was left at the default 900 s. Does anybody have any ideas about what is causing this problem, and how it may be fixed? Thanks!

    Read the article

  • Does AMD Cool n Quiet Slow Down Your System?

    - by Software Monkey
    I discovered today that having AMD Cool n Quiet enabled in my BIOS appears to be slowing down my Windows XP SP2 system by about 29% on memory & CPU intensive workloads. I was wondering if (a) anyone else had encountered this, (b) anyone can offer an explanation, (c) there are any negatives I need to be aware of if I keep AMD CnQ disabled. With some superficial testing so far, I don't immediately notice any difference with CnQ off (other than the performance being what I expected from this new hardware). It seems to ramp up the CPU fan a little bit as my program maxes out 1 core, but that's the same as with CnQ on. And when I let the system idle the CPU fan slows down and the systems as quiet as a mouse (after years of 6 small fans churning like they want to go into orbit it's nice to again have a system where I can hear the HDDs seeking). Bonus question: Does CnQ cause issues with system stability? I ask because the reason I disabled it was because I have had a few freezes and 1 spontaneous reboot with my new hardware.

    Read the article

  • Why does Windows spooler require an administrator account?

    - by Software Monkey
    Does anyone know what changes I might need to make to allow restricted users to print using a printer configured for spooling? My Windows XP SP3 system currently requires me to use an Admin account for printing if the printer is configured to spool documents before printing. If the printer is configured for direct printing it works for all accounts. This used to work and some months back it just stopped, and I can't pin down why. The printer, which is an HP PSC 1200 (an old printer) itself is configured for Everyone to have Print authority and my specific (restricted) account to have Full authority, that is Print, Manage Printers and Manager Documents. My HDD is locked down for restricted users given them only read authority to the entire file system except their data directories, which is how I have run my systems for years. I assume there may be a directory somewhere that I need to allow users to write to.

    Read the article

  • Why is my new Phenom II 965 BE not significantly faster than my old Athlon 64 X2 4600+?

    - by Software Monkey
    I recently rebuilt my 5 year old computer. I upgraded all core components, in particular from an Athlon 64 X2 4600+ at 2.4 GHz with DDR2 800 to a Phenom II 965 BE (quad core) at 3.6 GHz with DDR3 1333 (actually 1600, but testing consistently detected memory errors at 1600). The motherboard is also much newer and better. The HDD's (x3), DVD writer and card reader are the same. The BIOS memory config is auto-everything except the base timing which I overrode to 1T instead of 2T. The BIOS CPU multiplier is slightly over-clocked to 3.6 GHz from the stock 3.4 GHz. I noticed compiling Java is slower than I expected. As it happens I have some (single-threaded) Java pattern-matching code which is CPU and memory bound and for which I have performance numbers recorded on a number of hardware platforms, including my old system. So I did a test run on the new equipment and was stunned to find that the numbers are only slightly better than my old system, about 25%. The data set it is operating on is a 148,975 character array, which should easily fit in caches, but in any event the new CPU has larger caches all around. The system was, of course, otherwise idle for the test and the test run is a timed 10 seconds to eliminate scheduling anomalies. A long while ago, when I upgraded only memory from DD2 667 to DDR2 800 there was no change in performance of this test, which subjectively supports that the test cycle does not need to (significantly) access main memory, but yes it is creating and garbage collecting a large number of objects in the process of this test (low millions of matches are found for the pattern set). I am about 99.999% certain the code hasn't changed since I last ran it on 2009-03-17 - but I can't easily retest the old hardware, because it is currently in pieces on my work-bench waiting to be built into a new computer for my kids. Note that Windows (XP) reports a CPU speed of 795 MHz unless I have some thing running. With stuff running it seems to jump all over the place each time I use ALT-Pause to display the system properties, everywhere from 795 MHz to 3.4 Ghz. So why might my shiny new hardware under-performing so badly? EDIT: The old memory was Mushkin DDR2 800 with timings set for auto which should have been 5-5-5-12. The new memory is Corsair DDR3 1600, running at 1333 with timings also auto which are 9-9-9-21. In both cases they are a paired set of dual channel DIMMs. I was waiting to ensure my system was stable before tweaking with memory timings.

    Read the article

  • Windows Despooler Requires Administrator to Print

    - by Software Monkey
    Does anyone know what changes I might need to make to allow restricted users to print using a printer configured for spooling? My Windows XP SP3 system currently requires me to use an Admin account for printing if the print is configured to spool documents before printing. If the printer is configured for direct printing it works for all accounts. This used to work and some months back it just stopped, and I can't pin down why. The printer itself is configured for all uses to have complete authority. My system is locked down for restricted users given them only read authority to the entire file system except their data directories, which is how I have run my systems for years. I assume there may be a directory somewhere that I need to allow users to write to.

    Read the article

  • Windows Photo Viewer can't open this picture because you don't have the correct permissions to access the file location

    - by Software Monkey
    My system in Windows 7 and fully up to date with all patches and options (except for Microsoft Silverlight, which I refuse to install). I get this error whenever I try to open an image using Windows Photo Viewer, such as when previewing from Explorer or when opening an image attachment to an email. I have already verified correct permissions to the file and all folders in the path. The strange thing is that every other program I have seems to open the images fine, including "Slideshow" from Windows Explorer. Even more strange, in WPV there is an "Open" menu that lists the other programs for images including GIMP and MS Paint and they open the very file that WPV is complaining about just fine. That should eliminate permissions as being the problem, especially since (logically at least) they are read/write while WPV is read-only. I have even edited and saved the images that WPV does not open. I am out of ideas, and searching for answer on the Web has resulted only in the same tired repitition of some flavor of "take ownership and reset permissions for the entire drive", which I have already done. And which is counter-indicated by the fact that only Windows Photo Viewer seems to have a problem. The one thing which is slightly unusual is that for normal files they are all on a second HDD mounted into C:, however for email attachments the temporary folder is C:\Temp\, which is directly on that drive.

    Read the article

  • How do I diagnose the cause of a freeze after resuming in Windows XP (SP3)?

    - by Software Monkey
    I have just built a new computer from parts. Whenever I resume from any sleep mode (S1, S3 or S4) the computer freezes within about 60 seconds of the welcome screen appearing. I have updated the BIOS and all drivers to current from the motherboard manufacturer's site. I have reset BIOS settings to default, including disabling AMD Cool n Quiet. The windows event logs are not helpful at all. Other than immediately after resuming the system is stable as long as AMD CnQ is disabled. The system is: Mobo : MSI 790GX-G65 CPU : AMD Phenom II 965 BE at 3.6 GHz Memory : Corsair DDR3 1600, at 1333 MHz and 9-9-9-21 HDDs : 1 EIDE, 2 SATA in RAID-0 DVD : 1 Card Reader: 1 multi-card reader Keyboard is attached via PS2 and mouse is USB. Any thoughts or pointers would be most welcome. EDIT: It appears that the computer may not freeze if a program is left running which puts it under significant load. I left a stress test running which keeps all cores under 85% load, and my son put the computer to sleep - while this program is running it I have been able to resume from S3 successfully 4 times, compared against about 20 tests with the computer idle which have all frozen. So this may be related to being in an idle state when it resumes.

    Read the article

  • How do I diagnose Windows XP failure to automatically suspend on idle?

    - by Software Monkey
    Since upgrading my hardware (mobo, CPU and memory) a couple months ago my computer no longer automatically suspends and hibernates after the configured idle periods. Both functions work just fine manually, but if I leave the computer on overnight it's still active the next morning even though it's configured to sleep after 3 hours and hibernate after 6 hours. How do I diagnose the cause of this?

    Read the article

  • External SATA drive does not work without the optional USB cable *also* connected

    - by Software Monkey
    I have Vantec NST-260SU external eSATA/USB drive enclosure (which came with an optional separate power supply) connected to a relatively new Windows 7 computer. The drive should work as a SATA drive with either the separate power supply or using a USB cable solely for power. I would prefer to use the external power supply because I have used all my rear USB ports. Now, if I connect both the eSATA and USB cable, then: The drive shows in the BIOS list of AHCI drives (and not in the list of attached USB devices). Everything I can see about it in Computer Management seems to show it as a SATA driver (for example, it shows as "Location 0 (Channel 5, Target 0, Lun 0)" like my other SATA drives (and not "on USB Mass Storage Device" like my USB flash-drives). It seems very fast, very much faster than my USB flash drives. However, if I disconnect the USB cable and attach the power adapter instead, the drive does not show in the BIOS list and cannot be seen by Windows. The power LED on the enclosure is lit, and the drive enclosure becomes warm after running for a bit, so I am sure it is receiving power. Does anyone know if this device requires both the USB and eSATA cable, and if so, why? Or is there possibly something I need to do to reset the enclosure to not need the USB - the install instructions are pretty clear that you must connect the SATA cable before connecting the USB cable in order for the drive to function as SATA, which I am sure I did. PS: I have reviewed the small manual which came with it, which has not been of help.

    Read the article

  • WiFi signal is lost every 3 minutes

    - by Software Monkey
    For several weeks now my Android phone has been losing it's WiFi signal momentarily, typically at about 3 minute intervals (about 3 minutes, 1.5 seconds) and occasionally at some longer interval that always seems to be just over 3 minutes. This causes an interruption of several seconds while the WiFi connection is re-established and typically fails any kind of download/streaming that is happening, makes web sites "unreachable" and generally makes the phone unusable as a data device due to the frequency. The signal remains down for about a second, but the phone takes a few more seconds to reconnect to the router. This happens regardless of proximity to the router, which otherwise show a very strong signal - usually -40 to -30 dBm or better in the same room, nowhere less than 060 dBm anywhere in the house. Changing channels does not help (I've tried 1, 4, 8 and 9). Nor does turning off the router's guest access. Nor does turning off the 5.0 GHz band. Monitoring the signal on my phone with WiFi analyzer, shows all WiFi signals on all channels drop to nothing when the WiFi connection is lost (there are two other networks on different channels which are strong enough to be relevant, with about 6 others constantly fading in and out). WiFi analyzer shows 3 separate signals for my router, the main 2.4 GHz, the guest 2.4 GHz and the 5.0 GHz. Using WiFi Analyzer on my wife's phone side-by-side shows no change in signal when my phone drops, nor does her phone drop. Monitoring the signal using our laptop, side-by-side likewise shows no signal loss and likewise the laptop does not lose it's WiFi connection. But, at work, the phone seems to not exhibit the same behavior, or, if it does, it's very occasional. Monitoring it all day at work I only saw the signal drop 3 or 4 times. The signal strength of the various networks there is comparatively weak. AT&T were super helpful: "Sorry, we can't help you with WiFi problems. You could try doing a factory reset on your phone". </sarcasm The router is relatively new, but has been working fine with this phone since last Dec. Phone : Motorola Atrix (about 8 months old). Router : Belkin N750 DB (F9K1103 v1 (01C)). Router Firmware: 1.00.46 (2011/10/28 6:37:11). Security : WPA/WPA2-Personal (PSK)

    Read the article

  • What the best way to recover from when your RAID H/W incorrectly thinks a disk is missing

    - by Software Monkey
    I have a Windows 7 system with an MSI motherboard (running the latest AMD BIOS) and two of my four disks (not the system boot disk) configured via the Mobo as RAID-1. After a normal system restart today, the RAID BIOS reports that one of the two drives has been disconnected or has failed. It's not really failed; via recovery tools I can verify that if I take the BIOS out of RAID mode. But I can find no way to re-add the second hard disk to the array and rebuild via the BIOS - the only option seems be to delete the array and recreate it, but I've done that once before and it blows away the disk. It's done this once before, however on a subsequent reboot after double-checking the drive cabling (but not changing anything) and it boot up fine. So I think the mobo RAID is a little bit flaky. At this point I would like to remove the RAID drivers, change to AHCI mode and switch over to using a Windows 7 dynamic mirror disk. But the RAID drivers seem somehow deeply bound into the Windows startup - I can't find anything like the good ol' safe-mode in Windows 7. If I boot from the Win 7 install disk in ACHI mode I can use recovery tools to log in to the Windows 7 installation, so the boot drive it seems fine with ACHI mode. Additionally, I can see all my other disks, run chkdsk on them and they seem to be fine. If I try to boot from the HDD in AHCI mode, it just reboots part way through, presumably because the RAID drivers load and conflict with the BIOS being set to AHCI. So: How do I strip the RAID drivers from my Win 7 installation? If I delete the RAID logical disk, will it really delete partitioning information, or is that just a poorly worded message when it says the data on the disk will be deleted? If I disconnect the 2 disks in a RAID array, then delete the logical disk array, and then reconnect and reboot still in RAID mode, will the disks simply revert to RAID single-disks like my other 2 and then maybe I can leave windows with RAID drivers by operate the disks as singles with 2 of them in a Windows dynamic disk mirrored setup? Does Windows 7 have anything like the Windows XP Repair Install, where it will reinstall the O/S binaries from CD, but leave apps and setup alone. I am really hoping I don't have to do a complete reinstall of Windows 7 - the last one, when I upgraded from XP, took me two days to get everything set up and installed.

    Read the article

  • How do I record sound from my CD/DVD player without other system sounds in the mix?

    - by Software Monkey
    Using GoldWave I can record via the "Stereo Mix" channel, but I get no sound on the "CD" channel. Of course, using the stereo mix also mixes in all system sounds, including beeps, etc. I have the analog out on the DVD player connected to the CD-IN connector on the MoBo. I can hear CDs and DVDs playing just fine through my speakers - is this because the CD is also IDE data connection in to deliver the sound to the sound card, then? I specifically want to record a DVD; I can easily rip a CD using GoldWave's built-in ripper. Is there anything I have forgotten or have to enable? Or is it likely I have a damaged cable? My system is an MSI mobo and is running Windows XP SP3.

    Read the article

  • Moving Away from Exchange public folders - Export to file system folder?

    - by Mr. Monkey
    I have a public folder that was used for the wrong reason. Due to some regulations we had to store lots of photos, we're talking at least 7000 photos that are stored based on a location of stores. So for example, each store would send in an email with at least 2 photos of their location, that email would contain their location name or number, and those photos, so there was some sort of organization for it. I would love to move the contents of that public folder to a normal windows folder we could share on a server. Is anything like that possible? Anybody have other ideas?

    Read the article

  • Postfix configuration w.r.t. port 25

    - by Monkey Boson
    After a considerable amount of research, I have configured my postfix server to use dovecot to accept SMTPS connections over port 465 and everything works swimmingly. Unfortunately, I forgot that, unless I listen to port 25, I'm not going to receive any e-mail from the net. I'm hoping somebody knows off the top of their head how to open up port 25 on Postfix for anonymous users, but disallow relaying and any other bad things on that port. And to leave the port 465 the way it is. As to my current configuration, I changed the master.cf file: smtps inet n - n - - smtpd and the main.cf file: # Use our SSL certificates smtpd_tls_cert_file = .....cer smtpd_tls_key_file = .....key smtpd_tls_security_level = may # Use Dovecot for SASL authentication smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth broken_sasl_auth_clients = yes smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination Any help is appreciated!

    Read the article

  • Can I change from BIOS IDE mode to AHCI mode at any time?

    - by Software Monkey
    Currently my Windows 7 computer is crashing during startup, after loading the AMD achix64s.sys driver, if I enable BIOS AHCI mode for the disks. It boots fine with IDE mode. Since I need my computer working, I am wondering if I can just use IDE mode for now, and later change to AHCI mode, when I figure out what is wrong. Background: I was running RAID mode, which needed additional drivers to install/boot Windows. But the MoBo RAID is flaky so I'm trying to switch to using a Windows mirrored volume instead - for that I expected to use AHCI mode.

    Read the article

  • How do I set up two existing disks with identical contents as a single mirrored volume in Windows 7 without losing data?

    - by Software Monkey
    I have two data disks that were, heretofore, in a mobo RAID configuration in Windows 7. They are now separate AHCI disks, visible in Computer Management. How to I go about making them a single mirrored volume in Windows? Note: The data is backed up up on two other separate disks, but it's a fair amount of work to do a restore (over 120'000 files, and I have to reset permissions). Note2: Currently the two disks are identical, and I can use the content of either one for this.

    Read the article

  • Flashing cursor with new laptop battery

    - by Fuzzy Purple Monkey
    I recently purchased a new, non-Toshiba battery for my Toshiba M700 tablet/laptop. The battery fits fine and the tablet detects and charges it, but when I try to boot up all I get is the Toshiba logo then a flashing cursor in the top-left. I can get to the bios, but no further. If I put the old battery back in, everything boots up fine. Has anyone else seen this problem? What am I missing? Thanks in advance!

    Read the article

  • Office 2007 Mail Merge: How do I view field names instead of data?

    - by One Monkey
    I've just received a document which forms the basis of a mail merge as an attachment and I need to view the field names like they display in 2003 with the double chevrons e.g. <<titles>><<initials>><<surname>> However even though I get a dialogue as I open the docx file saying that it is going to attempt to merge from a file (which I don't have) and I cancel that operation the document still displays merge data e.g. Mr A Test Instead of the field names. I have clicked on the fields which turn grey to demonstrate that they are fields but I can't find a way to make it display the field names not the data. I don't even know where it's getting the data from as I don't have the data source file for the document to use.

    Read the article

  • Javascript object properties access functions in parent constructor?

    - by Bob Spryn
    So I'm using this pretty standard jquery plugin pattern whereby you can grab an api after applying the jquery function to a specific instance. This API is essentially a javascript object with a bunch of methods and data. So I wanted to essentially create some private internal methods for the object only to manipulate data etc, which just doesn't need to be available as part of the API. So I tried this: // API returned with new $.TranslationUI(options, container) $.TranslationUI = function (options, container) { // private function? function monkey(){ console.log("blah blah blah"); } // extend the default settings with the options object passed this.settings = $.extend({},$.TranslationUI.defaultSettings,options); // set a reference for the container dom element this.container = container; // call the init function this.init(); }; The problem I'm running into is that init can't call that function "monkey". I'm not understanding the explanation behind why it can't. Is it because init is a prototype method?($.TranslationUI's prototype is extended with a bunch of methods including init elsewhere in the code) $.extend($.TranslationUI, { prototype: { init : function(){ // doesn't work monkey(); // editing flag this.editing = false; // init event delegates here for // languagepicker $(this.settings.languageSelector, this.container).bind("click", {self: this}, this.selectLanguage); } } }); Any explanations would be helpful. Would love other thoughts on creating private methods with this model too. These particular functions don't HAVE to be in prototype, and I don't NEED private methods protected from being used externally, but I want to know how should I have that requirement in the future.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >