Search Results

Search found 5435 results on 218 pages for 'ones and zeroes'.

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

  • mod_rewrite rule for all urls except ones with some words

    - by zlog
    How do I write a mod_rewrite regulare expression rule that is the opposite of this: ^(.+)/path/(page1|page2)+$ ie, I want all pages except blah/path/page1 and blah/path/page2 to redirect to another path, where the x in blah/path/x is used in the new path. For example, I'd like write a rewrite rule like: RewriteRule some_regex /index.php?path/show/$1 [L] where some_regex would pull out the last component of a url in the format: /something/path/some_param to redirect to /index.php/path/show/some_param I'm trying to use ! and [^] syntax, but I don't quite understand how these work, especially when they involve words not single characters.

    Read the article

  • jquery - turning "autocomplete" to off for all forms (even ones not loaded yet)

    - by matthewsteiner
    So, I've got this code: $(document).ready(function(){ $('form').attr('autocomplete', 'off'); }); It works great for all forms already existing. The problem is, some forms of mine are in pop ups loaded throught ajax. This won't apply to them since they're "loaded" later. I know there's a live() function - but that's only for attaching events. What's a good way to apply this to all forms? Thanks.

    Read the article

  • PHP arrays & keys - fetching particular ones

    - by Rohan
    Hi Lets say I have an array with a structure like this: $arr= Array( array( "id"=>"a" "type">"apple"), array( "id"=>"b"), array( "id"=>"c"), array( "id"=>"c" "type"=>"banana") ); now I want to have a foreach loop which fetches all the array elements which have a key in them named "type". Something like foreach(all arrays which have type in them as $item) How would I do that? many thanks.

    Read the article

  • Java Int Array - Number being stored are different from ones specified

    - by Danadir
    Hey there, I have encountered the most weird problem ever in Java. When I am doing this: int []s = new int [5]; s[0] = 026; s[1] = 0011; s[2] = 1001; s[3] = 0026; s[4] = 1101; the numbers being stored in the array, seen from debug mode are different i.e. the numbers stored are 22,9,1001,22,1101. Can you give me some hints what might be wrong with this? Thanks in advance

    Read the article

  • What should I learn to create web-services like ones listed? [closed]

    - by Gerald Blizz
    I am very inspired by websites like imgur, dropbox, screencloud, maybe w3schools...you get my point. Fresh web-services with some new idea, not big portals but something simple yet useful and used by many people, something simple and new. What aspects of my developer career should I focus to be able to build such things on my own if I have enough ideas? (Sure if it ends up being popular I can get more developers to help me and so on, but at first I can do it alone, right?) I am currently a PHP web-developer, I know HTML+CSS+JS+AJAX+JQuery. But even like that there still is web-design, there are a lot of paths: websites for enterprise, startups, webservices, entertainment websites and serious bank/document flow systems, frameworks used for big systems, different approaches for little ones, etcetcetc. Which path should I take to be able to start my own projects like the ones that I listed on top which inspire me?

    Read the article

  • Why does dstat show zeroes for disk activity on my virtual private server running Ubuntu?

    - by Jonathan Berger
    I'm trying to monitor the number of disk reads and writes on my VPS (Rackspace in this case) running Ubuntu 9.04. I realize there are many tools to do this, but when using dstat 0.7 I tried the following command: dstat -d The output is just two columns of zeroes even when I upload a large file via scp that should be causing a large number of disk writes. Why is this, and how do I get dstat to correctly display the number of disk reads and writes?

    Read the article

  • GoF Design Patterns - which ones do you actually use?

    - by CraigS
    I'm trying to educate my colleagues in the area of design patterns. Some of the original Gang of Four patterns are a little esoteric, so I'm wondering if there is a sub-group of "essential" patterns that all programmers should know. As I look through the list, I think I've probably used - Abstract Factory Factory Method Singleton Bridge Facade Command Which ones do you actually use in practice, and what do you use them for? Link for those wanting a list of patterns

    Read the article

  • Installer script removed a buch of 64-bit files and replaced them with 32-bit ones, how do I get them back?

    - by ILikePizza555
    I ran this installer script to get some drivers for my printer, however I noticed that it started removing some of my programs, as well as 64-bit system files, and started replacing them with 32-bit ones! Luckily, I managed to cancel the operation before it did any serious damage. I also noticed that offical PPA's for 32-bit files were added. Should I remove them? So how do I get these files back?

    Read the article

  • Which stages of the requirements analysis process in mobile requirements engineering are the most challenging ones?

    - by user363295
    I'm doing a research on formulating a requirements analysis model as a stage of requirements engineering for mobile-application development by considering the limitations and the needs of it ( agility and etc.. .), what I'm trying to figure out is that which parts of this process (requirements analysis for mobile development) are the most challenging ones ( so i can focus more on) , and if there is any stage that u think I need to include or exclude (exp. some may think a quality plan may or may not be necessary and etc.) to make it more clear below is the list of few of the areas in which I can focus on ( by the way your suggestions can be anything out of the below list.) -Requirements specification -Prototyping -Requirements Prioritization -Focusing on quality functions

    Read the article

  • Why are slower programming languages considered worse than faster ones?

    - by Emanuil
    Here's how I see it. There's machine code and it's all that the computers needs in order to run something. The computers don't care about programming languages. It doesn't matter to them if the machine code comes from Perl, Python or PHP. Programming languages exist to serve programmers. Some programming languages run slower then others but that's not because there is something wrong with them. It's often because they do more things that otherwise programmers would do and by doing these things, they do better what they are supposed to do - serve programmers. So why are slower programming languages considered worse than faster ones?

    Read the article

  • How can I make Excel's MIN function ignore zeroes in a set?

    - by mfg
    In Excel, I have the following formula =(MIN(H69,H52,H35,H18)*(1/H18))*10 that is supposed to return the MIN of a range, and divide it by the current cell (*(1/H18) ), then multiply by 10. I am having difficulty with adding a type of NULLIF statement. I want to be able to have (the possibility for) blank rows, and have the MIN function ignore zero/blank fields while selecting the next lowest value (all are between 1.0-0.1). Is there a modifier i can apply to the MIN function to make it not compare zeroes in the MIN set? Is there a better funtion than MIN to use? This is to prevent the following situation: users will need to eliminate fields that are zeros from the form, theres 2 formula edits per entry, averaging 4 entries per use, so 8 possible errors per form use...

    Read the article

  • I think I have multiple postgresql servers installed, how do I identify and delete the 'extra' ones?

    - by Guided33
    I seem to have a few installations of postgresql on my machine somehow. I'm not sure if this is a mistake or, if Ubuntu for some odd reason duplicates direcotories and keeps them elsewhere. I have a postgresql directory in /etc one in /usr/lib and one in /opt I'm properly confused at this point. How do I go about deleting the extra ones.which ones are he extra one? I also need to make sure that my 'pg' gem in my rails env is pointing towards the correct posgresql db server. Any thoughts on my issue would be huge.

    Read the article

  • How can I place zeroes to the left of a given number to a maximum of 6 digits including the given nu

    - by Sergio Tapia
    I have this method that receives an ID number and downloads an HTML website according to that ID. Typically, an IMDB link is like this: http://www.imdb.com/title/tt0892791/ http://www.imdb.com/title/tt1226229/ http://www.imdb.com/title/tt0000429/ They all follow the 'tt' then 7 digits, with lack of digits turning into zeroes to fill out the left spaces. How can I accomplish this using C#? I'm kind of stumped. Here's my method: /// <summary> /// Find a movie page using its precise IMDB id. /// </summary> /// <param name="id">IMDB Movie ID</param> /// <returns>Returns an HtmlDocument with the source code included.</returns> public HtmlDocument ByID(string id) { string url = String.Format("http://www.imdb.com/title/tt{0}/", id); HtmlDocument page = downloader.Load(url); return page; } Thank you very much for your time, and if you are interested in helping out, you can check out the complete source code of TheFreeIMDB here: http://thefreeimdb.codeplex.com/

    Read the article

  • Could I improve lyrics display in OSD Lyrics by adding other lyrics sources beside its default ones (ttPlayer and Xiami)?

    - by cipricus
    OSD Lyrics has a very good way of displaying lyrics but its sources seem poor - compared to what I experience in Windows with Foobar and in Ubuntu with CoverGloobus. The latter uses a small non-adjustable font, so I would rather prefer to use OSD Lyrics, were it not for this problem. Many people recommend OSD Lyrics as the best way to display lyrics, but in fact it couldn't even find lyrics for some songs of The Beatles, for example, not to mention other less popular artists.

    Read the article

  • How can I remove old kernels/install new ones when /boot is full?

    - by Marcel
    I know this question is asked many times before, however with me it is just a bit different I guess. # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 224G 5.2G 208G 3% / udev 1.9G 4.0K 1.9G 1% /dev tmpfs 777M 260K 777M 1% /run none 5.0M 0 5.0M 0% /run/lock none 1.9G 0 1.9G 0% /run/shm /dev/sda2 90M 88M 0 100% /boot /dev/sda6 1.9G 514M 1.3G 29% /tmp My boot partition is full. Current Kernel: # uname -r 3.2.0-35-generic All Kernels: # dpkg --list | grep linux-image ii linux-image-3.2.0-32-generic 3.2.0-32.51 Linux kernel image for version 3.2.0 on 64 bit x86 SMP ii linux-image-3.2.0-34-generic 3.2.0-34.53 Linux kernel image for version 3.2.0 on 64 bit x86 SMP ii linux-image-3.2.0-35-generic 3.2.0-35.55 Linux kernel image for version 3.2.0 on 64 bit x86 SMP iF linux-image-3.2.0-37-generic 3.2.0-37.58 Linux kernel image for version 3.2.0 on 64 bit x86 SMP iF linux-image-3.2.0-38-generic 3.2.0-38.60 Linux kernel image for version 3.2.0 on 64 bit x86 SMP iU linux-image-generic 3.2.0.37.45 Generic Linux kernel image So I thought of removing the 3.2.0.32-generic kernel with: # sudo apt-get purge linux-image-3.2.0-32-generic Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: linux-generic : Depends: linux-headers-generic (= 3.2.0.37.45) but 3.2.0.38.46 is to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). No success. When I try apt-get -f install it also fails: # apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: linux-headers-3.2.0-34 linux-headers-3.2.0-35 linux-headers-3.2.0-34-generic linux-headers-3.2.0-35-generic Use 'apt-get autoremove' to remove them. The following extra packages will be installed: linux-generic linux-image-generic The following packages will be upgraded: linux-generic linux-image-generic 2 upgraded, 0 newly installed, 0 to remove and 9 not upgraded. 5 not fully installed or removed. Need to get 0 B/4,334 B of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y Setting up initramfs-tools (0.99ubuntu13.1) ... update-initramfs: deferring update (trigger activated) Setting up linux-image-3.2.0-37-generic (3.2.0-37.58) ... Running depmod. update-initramfs: deferring update (hook will be called later) The link /initrd.img is a dangling linkto /boot/initrd.img-3.2.0-38-generic Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-37-generic /boot/vmlinuz-3.2.0-37-generic update-initramfs: Generating /boot/initrd.img-3.2.0-37-generic gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.2.0-37-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-37-generic.postinst line 1010. dpkg: error processing linux-image-3.2.0-37-generic (--configure): subprocess installed post-installation script returned error exit status 2 Setting up linux-image-3.2.0-38-generic (3.2.0-38.60) ... Running depmod. update-initramfs: deferring update (hook will be called later) The link /initrd.img is a dangling linkto /boot/initrd.img-3.2.0-37-generic Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.2.0-38-generic /boot/vmlinuz-3.2.0-38-generic update-initramfs: Generating /boot/initrd.img-3.2.0-38-generic gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.2.0-38-generic with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-3.2.0-38-generic.postinst line 1010. dpkg: error processing linux-image-3.2.0-38-generic (--configure): subprocess installed post-installation script returned error exit status 2 dpkg: dependency problems prevent configuration of linux-image-generic: linux-image-generic depends on linux-image-3.2.0-37-generic; however: Package linux-image-3.2.0-37-generic is not configured yet. dpkg: error processing linux-image-generic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-generic: linux-generic depends on linux-image-generic (= 3.2.0.37.45); however: Package linux-image-generic is not configured yet. linux-generic depends on linux-headers-generic (= 3.2.0.37.45); however: Version of linux-headers-generic on system is 3.2.0.38.46. dpkg: error processing linux-generic (--configure): dependency problems - leaving unconfigured Processing triggers for initramfs-tools ... No apport report written because the error message indicates its a followup error from a previous failure. No apport report written because MaxReports is reached already update-initramfs: Generating /boot/initrd.img-3.2.0-35-generic gzip: stdout: No space left on device E: mkinitramfs failure cpio 141 gzip 1 update-initramfs: failed for /boot/initrd.img-3.2.0-35-generic with 1. dpkg: error processing initramfs-tools (--configure): subprocess installed post-installation script returned error exit status 1 No apport report written because MaxReports is reached already Errors were encountered while processing: linux-image-3.2.0-37-generic linux-image-3.2.0-38-generic linux-image-generic linux-generic initramfs-tools E: Sub-process /usr/bin/dpkg returned an error code (1) Any help would really be appreciated. Update: I did: sudo rm /boot/*-3.2.0-32-generic /boot/*-3.2.0-34-generic After that the following problem with apt-get -f install: root@localhost:/# apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: linux-generic The following packages will be upgraded: linux-generic 1 upgraded, 0 newly installed, 0 to remove and 9 not upgraded. 1 not fully installed or removed. Need to get 0 B/1,722 B of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y dpkg: dependency problems prevent configuration of linux-generic: linux-generic depends on linux-image-generic (= 3.2.0.37.45); however: Version of linux-image-generic on system is 3.2.0.38.46. linux-generic depends on linux-headers-generic (= 3.2.0.37.45); however: Version of linux-headers-generic on system is 3.2.0.38.46. dpkg: error processing linux-generic (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: linux-generic E: Sub-process /usr/bin/dpkg returned an error code (1)

    Read the article

  • Are Intel compilers really better than the Microsoft ones?

    - by Rocket Surgeon
    Years ago, I was surprised when I discovered that Intel sells Visual Studio compatible compilers. I tried it in particular for C/C++ as well as fantastic diagnostic tools. But the code was simply not that computationally intensive to notice the difference. The only impression was: did Intel really do it for me just now, wow, amazing tools with nanoseconds resolution, unbelievable. But the trial ended and the team never seriously considered a purchase. From your experience, if license cost does not matter, which vendor is the winner? It is not a broad or vague question or attemt to spark a holy war. This sort of question is about two very visible tools. Nobody likes when tools have any mysteries or surprises. And choices between best and best are always the pain. I also understand the grass is always greener argument. I want to hear all "what ifs" stories. What if Intel just locally optimizes it for the chip stepping of the month, and not every hardware target will actually work as well as Microsoft compiled? What if AMD hardware is the target and everything will slow down for no reason? Or on the other hand, what if Intel's hardware has so many unnoticable opportunities, that Microsoft compiler writers are too slow to adopt and never implement it in the compiler? What if both are the same exactly, actually a single codebase just wrapped into two different boxes and licensed to both vendors by some third-party shop? And so on. But someone knows some answers.

    Read the article

  • Should developers be responsible for tests other than unit tests, if so which ones are the most common?

    - by Jackie
    I am currently working on a rather large project, and I have used JUnit and EasyMock to fairly extensively unit test functionality. I am now interested in what other types of testing I should worry about. As a developer is it my responsibility to worry about things like functional, or regression testing? Is there a good way to integrate these in a useable way in tools such as Maven/Ant/Gradle? Are these better suited for a Tester or BA? Are there other useful types of testing that I am missing?

    Read the article

  • How do you avoid name similarities between your classes and the native ones?

    - by Oscar
    I just ran into an "interesting problem", which I would like your opinion about: I am developing a system and for many reasons (meaning: abstraction, technology independence, etc) we create our own types for exchanging information. For instance: if there is a method which is called SendEmail and is invoked by the business logic, it way have a parameter of type OurCompany.EMailMessage, which is an object which is completely technology independent and contains only "business relevant data" (for instance, no information abut head encoding). Inside the SendEmail function, we get this information from our EMailMEssage object and create a MailMessage (this one is technolgy specific) object so it can be sent over the network. As you can already notice, our class has a very similar name to the "native" language class. The problem is: this is exactly what they are, email messages, so it is hard to find another meaningful name for them. Do you have this problem often? How do you manage it? Edit: @mgkrebbs just commented about using fully qualified names. This is our current approach, but a little bit too verbose, IMHO. I would like something cleaner, if possible.

    Read the article

  • Should I continue teaching old Java input methods alongside the new ones?

    - by user1598390
    I've been imparting a Java introduction course for several years. Some slides explain how to read from files and keyboard using BufferedReaders, InputStreams, FileInputStreamReaders etc. I'm adding slides explaining how to achieve this using more up to date approaches like Scanner. Should I leave out the old BufferedReaders, InputStreams and FileInputStreamReaders slides altogether, and teach only the new methods, or should I continue to teach these methods for the sake of completeness ? Will my students benefit from learning how to read from files and keyboard the old way ?

    Read the article

  • Include in service layer all the application's functions or only the reusable ones?

    - by BornToCode
    Background: I need to build a main application with some operations (CRUD and more) (-in winforms), I need to make another application which will re-use some of the functions of the main application (-in webforms). I understood that using service layer is the best approach here. If I understood correctly the service should be calling the function on the BL layer (correct me if I'm wrong) The dilemma: In my main winform UI - should I call the functions from the BL, or from the service? (please explain why) Should I create a service for every single function on the BL even if I need some of the functions only in one UI? for example - should I create services for all the CRUD operations, even though I need to re-use only update operation in the webform? YOUR HELP IS MUCH APPRECIATED

    Read the article

  • Why do the Nouveau drivers work better than the Nvidia ones?

    - by user50774
    I have a bit of a weirdie here. My rig uses an Nvidia GeForce 8600 GTS in a PCIE x16 slot. Up to about a year ago, no problems with the card. I then started getting random crashes. They got more frequent. Now, first thought: It's an old card. But I don't have the bucks to buy a new one, and my mobo doesn't have the DVI input that my monitor needs. So, I decided to take a shot with the Nouveau drives. Amazingly, they have worked flawlessly. Does anyone have a guess as to why?

    Read the article

  • How can I remove the default indicators and add custom ones?

    - by gcc
    I am trying to use the old Ubuntu feature of adding/removing indicators from the top panel in 11.10/12.04, but cannot do so. I have these questions: How can I remove or add indicator applet at top panel? How can I erase or add a panel ? How can I erase switch user account from top panel since I am the only user in my computer ? How can I erase Startup applications and printers from top panel ? How can I erase the Messages indicator from the top panel?

    Read the article

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