Search Results

Search found 8942 results on 358 pages for 'print r'.

Page 223/358 | < Previous Page | 219 220 221 222 223 224 225 226 227 228 229 230  | Next Page >

  • Account Listings on APress and O'Reilly

    - by TATWORTH
    Originally posted on: http://geekswithblogs.net/TATWORTH/archive/2013/06/20/e-books-from-apress-and-oreilly.aspxIn recent days both APress and O'Reilly have radically improved the way they display items registered against your account with them.APress now show only one line per e-book and the multitude of formats is handled by a drop-down list. The result is that the list of APress books I have bought now requires less paging through. The only things that the APress lacks are:The ability to show all on the page (currently options for 10,20 and 50 per page)The ability to sort on title or date bought or date updatedO'Reilly have always shown the formats available by a series of hyperlinks along one line. They have improved their list as follows:You can sort on title or date bought or date updatedClicking on a line shows full detail of the item (include image, download details, errata link and catalog page). Clicking again collapses the detail.You can select all your purchased items together or just show E-Books or Print or VideosNow why is the date updated important? Updates are issued for various books  (particularly those made available whilst still being written) - the publishers very kindly email you when an update is available but finding it in the list to download it again is not as easy as you think, however sort on release date and they are easy to find!

    Read the article

  • Error while installing Komparator4

    - by Lucio
    I downloaded Komparator source from this page. The INSTALL file in the source say the following: Unpack komparator4-xxx.tar.bz2, and open a shell inside this directory mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` .. make sudo make install I unpacked the file, make the directory, entered this, but when I have tried to cmake (sentece Nº3) the terminal print the following errors disabling me to make & install: CMake Error at /usr/share/cmake-2.8/Modules/FindKDE4.cmake:98 (MESSAGE): ERROR: cmake/modules/FindKDE4Internal.cmake not found in /home/lucio/.kde/share/apps;/usr/share/kde4/apps Call Stack (most recent call first): CMakeLists.txt:2 (find_package) CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 2.8) should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it. -- Configuring incomplete, errors occurred! What mean this errors and how can I fix it?

    Read the article

  • How can I connect my USB (HP) printer in 10.4, which can't be discovered and worked in 9.x

    - by Brian
    My printer was working under 9.x. It is a an hp photosmart C3100 series. When I open the Admin- printing. no local printers are found. I try to add via other (My local choices are Serial and other). I have tried many uri's - ipp://localhost:631/ipp, http://localhost/ipp, localhost, 127.0.0.1, etc... None have worked. Under the networked I have tried JetDirect, using localhost and 127.0.0.1 and port 631. I have tried many options under IPP with different variants in the host trying to verify a printer. No luck. I tried LPD/LPR with localhost and tried the probe. no luck. I tried the cups admin via localhost:631 and that didn't work. On the old version its simply found the local printer, I might have picked the driver, I can't remember but it was the photosmart c3100 series that was working. I just can't get 10.4 to print.

    Read the article

  • Preferred lambda syntax?

    - by Roger Alsing
    I'm playing around a bit with my own C like DSL grammar and would like some oppinions. I've reserved the use of "(...)" for invocations. eg: foo(1,2); My grammar supports "trailing closures" , pretty much like Ruby's blocks that can be passed as the last argument of an invocation. Currently my grammar support trailing closures like this: foo(1,2) { //parameterless closure passed as the last argument to foo } or foo(1,2) [x] { //closure with one argument (x) passed as the last argument to foo print (x); } The reason why I use [args] instead of (args) is that (args) is ambigious: foo(1,2) (x) { } There is no way in this case to tell if foo expects 3 arguments (int,int,closure(x)) or if foo expects 2 arguments and returns a closure with one argument(int,int) - closure(x) So thats pretty much the reason why I use [] as for now. I could change this to something like: foo(1,2) : (x) { } or foo(1,2) (x) -> { } So the actual question is, what do you think looks best? [...] is somewhat wrist unfriendly. let x = [a,b] { } Ideas?

    Read the article

  • Install a i386 printer driver into an amd64 distribution or how can I find a good printer based on features?

    - by Yanick Rochon
    Hi, I just bought a Lexmark Interpret S408 all-in-one printer. The box said that it supported Ubuntu 8.04, but I told myself it should work with Lucid... well no. The only driver I have found is for i386 while I have a amd64 image installed; the architecture is incompatible. So, the quesiton is : Is it possible to install that driver anyway, somehow? Or do I need to take that printer back to the store and buy another one? If the latter is the only alternative, I need a printer that has wireless connection capability can do color printing is of good price (less than $200 CAD) Thank you for your answers, help, and tips. ** UPDATE ** The driver was given in the form of deb package (for Debian distributions) and I managed to extract the actual deb package driver out of the install program. I ran sudo dpkg -i --force-all lexmark-inkjet-09-driver-1.5-1.i386.deb and the driver installed, and I was able to print something out. But that pretty much ends there; I cannot access anymore of the printer settings, etc. (i.g. scanner, fax, wifi settings, etc.) I should suffice for now as I'm satisfied with the printer's features (and size, and prince), but if I could have a full-linux-supported printer like that one, I would return this one in exchange for the other.

    Read the article

  • Mercurial says "nothing changed", but it did. Sometimes my software is too clever.

    - by user12608033
    It seems I have found a "bug" in Mercurial. It takes a shortcut when checking for differences in tracked files. If the file's size and modification time are unchanged, it assumes its contents are unchanged: $ hg init . $ cp -p .sccs2hg/2005-06-05_00\:00\:00\,nicstat.c nicstat.c $ ls -ogE nicstat.c -rw-r--r-- 1 14722 2012-08-24 11:22:48.819451726 -0700 nicstat.c $ hg add nicstat.c $ hg commit -m "added nicstat.c" $ cp -p .sccs2hg/2005-07-02_00\:00\:00\,nicstat.c nicstat.c $ ls -ogE nicstat.c -rw-r--r-- 1 14722 2012-08-24 11:22:48.819451726 -0700 nicstat.c $ hg diff $ hg commit nothing changed $ touch nicstat.c $ hg diff diff -r b49cf59d431d nicstat.c --- a/nicstat.c Fri Aug 24 11:21:27 2012 -0700 +++ b/nicstat.c Fri Aug 24 11:22:50 2012 -0700 @@ -2,7 +2,7 @@ * nicstat - print network traffic, Kb/s read and written. Solaris 8+. * "netstat -i" only gives a packet count, this program gives Kbytes. * - * 05-Jun-2005, ver 0.81 (check for new versions, http://www.brendangregg.com) + * 02-Jul-2005, ver 0.90 (check for new versions, http://www.brendangregg.com) * [...] Now, before you agree or disagree with me on whether this is a bug, I will also say that I believe it is a feature. Yes, I feel it is an acceptable shortcut because in "real" situations an edit to a file will change the modification time by at least one second (the resolution that hg diff or hg commit is looking for). The benefit of the shortcut is greatly improved performance of operations like "hg diff" and "hg status", particularly where your repository contains a lot of files. Why did I have no change in modification time? Well, my source file was generated by a script that I have written to convert SCCS change history to Mercurial commits. If my script can generate two revisions of a file within a second, and the files are the same size, then I run afoul of this shortcut. Solution - I will just change my script to apply the modification time from the SCCS history to the file prior to commit. A "touch -t " will do that easily.

    Read the article

  • Help with dual booting Windows 8.1 Professional and Ubuntu 13.10

    - by user1292548
    I recently installed a clean version of Windows 8.1 Professional on my Lenovo Y500 (with Samsung 256GB 840 Pro SSD). I have Windows all set up and running normally. I am trying to dual boot Windows 8.1 and Ubuntu 13.10, but the installation procedure don't allow me to either "Install alongside..." or shows my SSD partitions correctly when I chose the "Something Else" option. I have created a 25GB partition of free space in the Windows disk manager, but on the installation screen on Ubuntu, it shows the whole drive as a free space. I have tried installing with a burned .ISO disk and a bootable USB, the results are the same for both. Windows Disk Management screen: http://imageshack.us/a/img855/9504/59zu.jpg The Ubuntu installation screen: http://imageshack.us/a/img62/2712/9g6i.jpg I've ran into this problem before when trying to dual boot Ubuntu and Windows 7 Professional a month ago. But I gave up and never resolved the issue. --EDIT-- I tried what Eero Aaltonen suggested, and this is my result: ubuntu@ubuntu:~$ sudo parted /dev/sda print Warning: /dev/sda contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos partition table, as it should. Perhaps it was corrupted -- possibly by a program that doesn't understand GPT partition tables. Or perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT partition table? Yes/No? yes Model: ATA Samsung SSD 840 (scsi) Disk /dev/sda: 256GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags ubuntu@ubuntu:~$

    Read the article

  • Now Available:Oracle Utilities Customer Care & Billing Version 2.4.0 SP1

    - by Roxana Babiciu
    We are pleased to announce the general availability of Oracle Utilities Customer Care & Billing 2.4.0 SP1. Key Features & Benefits: Oracle Utilities Customer Care & Billing 2.4.0 SP1 includes several base enhancements and a new licensable module called Customer Program Management. Key base enhancements in this release are: Configuration Migration Assistant (Additional Migration Plans) – Configuration Migration Assistant (CMA) was introduced in Oracle Utilities Application Framework V4.2.0 to supersede the ConfigLab facility. Oracle Utilities Customer Care and Billing now has a large number of migration plans to support migrating administration objects between environments. Encryption – Ability to configure encryption for fields that store sensitive data such as credit card numbers, bank account numbers, social security numbers, and MICR ID. Single Euro Payments Area (SEPA) Direct Debit – Functionality for configuring recurring direct debit payments in accordance with the Single Euro Payments Area (SEPA) initiative. Usage Enhancement for Bill Print – Allows additional information to be captured on a usage request to support billing when meter reads are not obtained from Oracle Utilities Customer Care & Billing but from a meter data management system (e.g. Oracle Utilities Meter Data Management). Preferences Portal – Communication preference zones allowing utilities to track customers’ preferred communication channels for various types of notifications or communications (e.g. phone, SMS, email). More information can be found on OPN!

    Read the article

  • Index Check and Correct Character Display in a Console Hangman Game for Java

    - by Jen
    I have this problem wherein, I can not display the correct characters given by the character. Here's what I meant: String words, in; String replaced_words; Scanner s = new Scanner (System.in); System.out.println("Enter a line of words basing on an event, verse, place or a name of a person."); words = s.nextLine(); System.out.println("The words you just placed are now accepted."); //using char array method, we tried to place the words into a characters array. char [] c = words.toCharArray(); // we need to replace the replaced_words = words.replace(' ', '_').replaceAll("[^\\-]", "-"); for (int i = 0; i < replaced_words.length(); i++) { System.out.print(replaced_words.charAt(i) + " "); } System.out.println("Now, please input a character, guessing the words you just placed."); in = s.nextLine(); in that code, want that the user, when types a word (or should it be character?), any of the correct character the user inputs will be displayed, and changes the hyphen to it...(more like the hangman series of games). How can I achieve this?

    Read the article

  • How can I get the best performance for playing games?

    - by Oli
    I've been playing a couple of Wine-games today and decided to switch to metacity to see what the performance difference was like. If you've never done it before, you just run metacity --replace but don't do that if you use Unity! Anyway, surprise surprise it was like playing on a dedicated Windows gaming machine. Playing under metacity today was bliss. Much higher framerates and just a fluidity that you'd expect from a native game. I'm not sure I can go back. Switching to metacity is no hardship but I wonder if there's anything else in the WM landscape that I should try out. I'm essentially looking for suggestions for the best way to play games. Mix up WMs, dedicated X sessions, whatever... As long as it makes Wine games run faster. Small print One process per answer (eg: New X session + OpenBox) We should probably land on a benchmark so we can show percentage improvement over a stock Compiz desktop. I'm open to suggestions in the comments. If people could test it and submit their how much it improves things for them in the comments, that would give others a good idea of if it's worth the pain.

    Read the article

  • Homepage not showing on Google

    - by MIke Mayberry
    About six weeks ago my homepage (mayberrykayakingdotcodotuk) disappeared from the google organic search for "kayaking pembrokeshire" despite it having been number 2 within a few weeks of it's launch last summer. My previous site (www.mikemayberrykayakingdotcodotuk) had been 2nd for about six years and has 301 redirects for all pages to the new site. Google toolbar still rates the homepage as 3/10 and the domain is still showing in search results, just not the homepage. A little research suggests that this is most likely to be due to an issue with google treating two pages as identical content (one with www. and one with not) since the changes in their algorithms around that time and that the way to fix this is to add some code somewhere. This makes sense to me as my print advertising doesn't have the www part of the address. I have cpanel access but a limited knowledge on web coding, having picked things up as I've gone along and paid for designers etc., when needed. Would someone be able to let me know where I have to go to add the code and what code I need to add to redirect the crawlers to one page? Or is there another issue that is causing this? Thanks in advance.

    Read the article

  • Moving away from PHP and running towards server-side JavaScript [on hold]

    - by Sosukodo
    I've decided to start moving away from PHP and server-side JavaScript looks like an attractive replacement. However, I'm having a hard time wrapping my head around how others are using Node.js for web applications. I'm currently using Lighttpd with FastCGI PHP. The one thing I like about PHP is that I can "inline" my scripts in the document like so: <?php echo 'Hello, World!'; ?> My question is: Is there any server-side JavaScript solution that I can use in this manor? For instance, I'd love to be able to do this: <?js print('Hello, World!'); ?> Is there such a thing? I'm not looking for opinions about "which is better". I just want to know what's out there and I'll explore each of them on my own. The important thing is that I'd like to use it like I demonstrated above. Links to the software along with implementation examples will be considered above other answers.

    Read the article

  • Troubleshooting PO Output in Oracle Purchasing

    - by user793553
    Do your approved Purchase Orders occasionally not make it to the supplier, or the attached document is incorrect?  Or perhaps your users are reporting that the PO Output for Communication fails to fax, print or email.  Try the new Search Helper in Doc ID 1377764.1  First choose the radial button that pertains to your issue. Below we see a case where there is a problem with the  Purchase Order being sent to the supplier.  Then choose the symptom (or symptoms) that occur in the second section.  In this case we have chosen that the PDF attachment is malformed. Drill down to review the notes returned based on your symptom, for possible issue resolution.  Try this before logging a Service Request.   For a list of all the Procurement Search Helpers visit the Product Information Center via Doc ID 1391332.2.      

    Read the article

  • Cryptswap not mounted?

    - by woody
    I believe i have my swap set up but am not sure because on start up it says that it is something along the lines of "could not mount /dev/mapper/cryptswap1 M for manual S for skip". But it appears to be mounted. When i run free -m the output is: total used free shared buffers cached Mem: 3887 769 3117 0 54 348 -/+ buffers/cache: 366 3520 Swap: 4026 0 4026 and sudo bklid is: /dev/sda1: UUID="9fb3ccd6-3732-4989-bfa4-e943a09f1153" TYPE="ext4" /dev/mapper/cryptswap1: UUID="bd9fe154-8621-48b3-95d2-ae5c91f373fd" TYPE="swap" and cat /etc/crypttab is: cryptswap1 /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256 my /etc/fstab is: # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # proc /proc proc nodev,noexec,nosuid 0 0 # / was on /dev/sda1 during installation UUID=9fb3ccd6-3732-4989-bfa4-e943a09f1153 / ext4 errors=remount-ro 0 1 # swap was on /dev/sda5 during installation #UUID=bb0e378e-8742-435a-beda-ae7788a7c1b0 none swap sw 0 0 /dev/mapper/cryptswap1 none swap sw 0 0 The file /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla already exists and its contents are: [Re-enable hibernate by default] Identity=unix-user:* Action=org.freedesktop.upower.hibernate ResultActive=yes Is my swap not setup correctly or is it not mounting?

    Read the article

  • C++ program...overshoots? [migrated]

    - by Zdrok
    I'm decent at C++, but I may have missed some nuance that applies here. Or maybe I completely missed a giant concept, I have no idea. My program was instantly crashing ("blah.exe is not responding") about 1/5 times it was run (other times it ran completely fine) and I tracked the problem down to a constructor for a world class that was called once in the beginning of the main function. Here is the code (in the constructor) that causes the problem: int ii; for(ii=0;ii<=255;ii++) { cout<<"ent "<<ii<<endl; entity_list[ii]=NULL; } for(ii=0;ii<=255;ii++) { cout<<"sec "<<ii<<endl; sector_list[ii]=NULL; } entity_list[0] = new Entity(0,0); entity_list[0]->_world = this; Specifically the second for loop. The cout references are new for the sake of telling where it is having trouble. It would print the entire "ent 1" to "ent 255" and then "sec 1" to "sec 255" and then crash right after, as if it was going for a 257th run through of the second for loop. I set the second for loop to go until "ii<=254" which stopped all crashes. Does C++ code tend to "overshoot" for loops or something? What is causing it to crash at this specific loop seemingly at random? By the way, entity_list and sector_list point to classes called Entity and Sector, respectively, but they are not constructing anything so I didn't think it would be relevant. I also have a forward declaration for the Entity class in a header for this, but since none were being constructed I didn't think it was relevant either. EDIT: It was due to the new Entity line, I assumed wrongly that the fact that altering the for statement to 254 fixed the crashes meant that it had to be there. I still don't understand why the for loop is related, though.

    Read the article

  • Samba issue with sharing directories on NTFS/FAT32 (Mounted Drives) ???

    - by Microkernel
    Hi guys, I have some strange problems with Samba server. I am using samba Version 3.5.4 on Ubuntu 10.10. I have two windows-xp machines, one on VirtualBox on Ubuntu and another office laptop. Windows machine on VBox has no issues in accessing the shared folders, but the laptop is not able to access all the shared content. The issue faced on laptop is = Shared folders on Ext3 drives have no issues in accessing, but the contents shared on NTFS and FAT32 drives (mounted ones) are not accessible. When I try to open the shared folder, it asks for user name and password, but doesn't accept when I provide it. (even if I provide admin login details!!!). I changed workgroup value to the domain_name in office laptop, but still the problem persists... Here is the smdb.conf I am using... [global] workgroup = XXX.XXX.ORG server string = %h server (Samba, Ubuntu) map to guest = Bad User obey pam restrictions = Yes pam password change = Yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . unix password sync = Yes syslog = 0 log file = /var/log/samba/log.%m max log size = 1000 dns proxy = No usershare allow guests = Yes panic action = /usr/share/samba/panic-action %d guest ok = Yes [homes] comment = Home Directories [printers] comment = All Printers path = /var/spool/samba read only = No create mask = 0700 printable = Yes browseable = No [print$] comment = Samba server's CD-ROM path = /cdrom force user = nobody force group = nobody locking = No Workgroup Was defined as "HOMENET" before, changed it to domain name on the office laptop thinking it was the problem, but for no avail Thanks in advance Regards, Microkernel

    Read the article

  • Today's Well Connected Companies

    - by Michael Snow
    Statoil Fuel & Retail and their partner, L&T Infotech, our recent winner of the Oracle Excellence Award for Fusion Middleware Innovation in the WebCenter category is featured this month in Profit Magazine's November Issues of both print and online versions. The online version has significantly more detail about their "Connect" project Statoil Fuel & Retail is a leading Scandinavian road transport fuel retailer that operates in 8 different countries and delivers aviation fuel at 85 airports. The company produces and sells 750 different lubricant products for B2B and B2C customers. Statoil won the 2013 Oracle Excellence Award for Oracle Fusion Middleware Innovation: Oracle WebCenter based on a stellar Oracle implementation, created with implementation partner L&T Infotech, which used Oracle’s JD Edwards and Oracle Fusion Middleware to replace and consolidate 10 SAP portals into a single, integrated, personalized enterprise portal for partners, station managers, and support staff. Utilizing Oracle WebCenter Portal, Oracle WebCenter Content, Oracle Identity Management, Oracle SOA Suite, JD Edwards applications, and Oracle CRM On Demand, Statoil is now able to offer a completely redesigned portal for an easy and user-friendly web experience, delivering a fast, secure, robust, and scalable solution that will help the company remain competitive in its industry. The solution has increased Statoil Fuel & Retail’s web footprint and expanded its online business. Read the complete article for the full story of Statoil Fuel & Retail's implementation of Oracle Fusion Middleware technology.

    Read the article

  • How to automount NTFS usb sticks on Xubuntu 12.10?

    - by netimen
    I'm running the Xubuntu 12.10 on a Lenovo T520 laptop. If I plug a FAT formatted usb stick, it's mounted automatically, but if I plug in a NTFS formatted one, I have to mount it manually. How to make NTFS usb sticks to mount automatically when plugged? My /etc/fstab in case it helps: # /etc/fstab: static file system information. # # Use 'blkid -o value -s UUID' to print the universally unique identifier # for a device; this may be used with UUID= as a more robust way to name # devices that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 /dev/sda1 / ext4 errors=remount-ro,user_xattr 0 1 # swap was on /dev/sda5 during installation UUID=cd221c3e-44a8-459e-9dfb-04787f1cd0b6 none swap sw

    Read the article

  • Help me with this logic (newbie) [migrated]

    - by Surendra
    I need to generate a half pyramid number series with the entered starting number and the number of lines in a html page using Javascript and show the result in html page . I have done the Java scripting and stuff . What I don't get is the logic to it. Take a look at this you may get an idea what I'm talking about: Here is my function in Javascript that will be triggered on a button click function doFunction(){ var enteredNumber=document.getElementById("start"); var lines=document.getElementById("lines"); var result; for(i=0;i<=lines.value;i++) { for(j=enteredNumber.value;j<=i;j++) { document.write(j + "&nbsp;" + "&nbsp;"); } document.write("<br />"); } } Help me with the logic to print following order: 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 There is a condition. I will specify $start and $lines. If $start = 5 and $lines = 3 then output should be like: 5 5 6 5 6 7 I have had used the for loop , but that doesn't work if I give my own start number that is higher than the number of lines. I actually need it done with Javascript, I have had done the necessary but I'm confused with the logic to generate such series (with the user given values) I had actually used two for loops to generate the regular number series like below 1 1 2 1 2 3 and so on.

    Read the article

  • Eliminating zero-length files

    - by RhZ
    I have been having multiple crashes recently. 4-5 last night within a few hours. I posted about it before, and got an answer but not sure how to proceed. The messages in my logs right before the crash are multiple complaints about valid eCryptfs headers. But the chron might not be related, I don't think I saw that in previous crashes: xxx-desktop kernel: [ 1112.274474] Valid eCryptfs headers not found in file header region or xattr region, inode 32376924 xxx-desktop CRON[4212]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) So I was sent to an answer providing this script: for i in find $(mount | grep " on $HOME type ecryptfs" | awk '{print $1}') -size 0c; do if ! fuser -v $i; then rm -f $i fi done I did find some zero byte files, not in the exactly right place (a folder called .private as I remember), but I need to fix this, its too bad right now. So I need to delete any of them that are not in use. I am a little too clueless, can someone walk me through executing this script? I don't know how.

    Read the article

  • Throwing and catching exceptions in the same function/method

    - by usr
    I've written a function that asks a user for input until user enters a positive integer (a natural number). Somebody said I shouldn't throw and catch exceptions in my function and should let the caller of my function handle them. I wonder what other developers think about this. I'm also probably misusing exceptions in the function. Here's the code in Java: private static int sideInput() { int side = 0; String input; Scanner scanner = new Scanner(System.in); do { System.out.print("Side length: "); input = scanner.nextLine(); try { side = Integer.parseInt(input); if (side <= 0) { // probably a misuse of exceptions throw new NumberFormatException(); } } catch (NumberFormatException numFormExc) { System.out.println("Invalid input. Enter a natural number."); } } while (side <= 0); return side; } I'm interested in two things: Should I let the caller worry about exceptions? The point of the function is that it nags the user until the user enters a natural number. Is the point of the function bad? I'm not talking about UI (user not being able to get out of the loop without proper input), but about looped input with exceptions handled. Would you say the throw statement (in this case) is a misuse of exceptions? I could easily create a flag for checking validity of the number and output the warning message based on that flag. But that would add more lines to the code and I think it's perfectly readable as it is. The thing is I often write a separate input function. If user has to input a number multiple times, I create a separate function for input that handles all formatting exceptions and limitations.

    Read the article

  • Do you sign contracts digitally or still on paper? And what do clients think?

    - by user1162541
    We are all getting used to checking a box and putting our name in a text field to create a contract with an airline, a hosting company, or a software download. However, for some reason I am still asking clients to sign our contracts for website development on paper, and send me a scan. Few complain about this procedure, but I am personally thinking: what am I doing, doing this the old fashion way?! Signing contracts digitally would be faster, more convenient for clients and for me, and easier to store. So to me it appears to be time to start creating some contract agreement online that clients can read, then print their name, and mark a box "I AGREE WITH THIS CONTRACT AND BY PRINTING MY NAME I AGREE TO SIGNING THIS", or something like that. I would record their IP, browser data, and time of signing. If I really want to ensure their identity, I could link this to OpenID and require them to log in with their e-mail so that I can ensure that they are logged in on an existing e-mail account. Sounds OK to me. My question is: is this practice becoming a standard practice in professional IT services? Are you (as a professional) doing this? If you are, how do clients react? Any drawbacks doing this? EDIT: This question is not about the legal aspects. It is about common practices among programmers and web-development companies, and what clients think of this.

    Read the article

  • Trying to make a game with C++, using lists to store bullets and enemies, but they are not erased

    - by XD_dued
    I've been trying to make a pretty simple space shooter game with C++, and I have been having a lot of trouble trying to use lists to store enemies and bullets. Basically I followed the post here almost exactly to store my bullets: SDL Bullet Movement I've done something similar to store my enemies. However, when I call bullets.erase(it++), for some reason the bullet is not erased. When the bullet movement is run for the next frame, it tries to re delete the bullet and segfaults the program. When I comment out the erase line, it runs fine, but the bullets are then never erased from the list... Is there any reason why the elements of the list aren't being deleted? I also set it up to print the number of elements in the list for every iteration, and it does not go down after deleting. Thanks! EDIT: Here's the specific code I'm using to store my enemies and having them act: std::list<Grunt*> doGrunts(std::list<Grunt*> grunts) { for(std::list<Grunt*>::iterator it = grunts.begin(); it != grunts.end();) { if((*it)->getHull() == 0) { delete * it; grunts.erase(it++); } else { (**it).doUnit(grunts, it); ++it; } } } Grunt is my enemy class, and the list grunts is a global variable. Is that my problem? When I pass the global into the function it becomes local? I assumed lists would be a reference type so thought this wouldn't be a problem. Sorry if this was a dumb question, I'm very new to C++, this is the first major thing I'm working on.

    Read the article

  • How to revert to Eclipse's old behavior when double-clicking on frames or windows, in Juno?

    - by mattquiros
    I find Eclipse Juno very counter-intuitive. In my workspace, I used to just have the package view at the left, my code on the right, and whenever I'm printing something in the console, that's only when the console frame shows up from the bottom right. When you double click on a particular window, it either only goes fullscreen within Eclipse, or back to its original size together with the size of the other frames. In Juno, however, it seems that frames are put on layers on top of each other. When I print something to the console, the output frame only shows up as a small, useless square to my right. When I double-click, it goes full screen. When I double-click again, it occupies the full right frame, hiding my code. I double-click again and it goes full screen, then it double-clicks before it shares the right frame with my code on top of it. Then when I minimize it, it goes to the side. Any way to go back to the good old days of Eclipse? Thanks.

    Read the article

  • In MVC, why can't a model create a view?

    - by MUY Belgium
    I have a web application written in Perl with a controller, some "views" and some "Models". Each "Model" is corresponding to one "View". The controller (one file) creates an Model object corresponding to each view (view is a CGI argument) then retrieve the view from the module it has just created. Indeed, this should be bad thing but can you argue a bit more about it. My first idea was that since the object "Model" depends upon the "view", then the "model" is actually a view. But also the fact that ALL the cgi parameters are passed to the Model causes the "Model" to become not truelly a view but to loose all interest, since it is only related to the current implementation of the web apps. On other words, that the "Model" keep model but loose its "comprehensiveness" ("Model" is not easily understandable). I'm am quite new in project analysis, so please do not be too harsh. Why is this bad? I have made a prototype with the main structures I have understood of this web application, made as short as possible. #Model.pm package Model; import { # this requires an attribute called "view" # and this require an argument which is the cgi params } ... #View1.pm package View1; ... #Model1.pm package ModelView1 ; base Model; use View1; sub new { my $class = shift; my $arg = shift; Model::DoSomething($arg); $self->view = new View1($arg); ... } #controller.cgi my $model = 0; ... $model = new Model1( cgi_param => params() ); #there is severall models here ... print $model->get_view()->get_html();

    Read the article

< Previous Page | 219 220 221 222 223 224 225 226 227 228 229 230  | Next Page >