Search Results

Search found 195 results on 8 pages for 'kelly mcdonald'.

Page 6/8 | < Previous Page | 2 3 4 5 6 7 8  | Next Page >

  • Can't get KnownType to work with WCF

    - by Kelly Cline
    I have an interface and a class defined in separate assemblies, like this: namespace DataInterfaces { public interface IPerson { string Name { get; set; } } } namespace DataObjects { [DataContract] [KnownType( typeof( IPerson ) ) ] public class Person : IPerson { [DataMember] public string Name { get; set; } } } This is my Service Interface: public interface ICalculator { [OperationContract] IPerson GetPerson ( ); } When I update my Service Reference for my Client, I get this in the Reference.cs: public object GetPerson() { return base.Channel.GetPerson(); I was hoping that KnownType would give me IPerson instead of "object" here. I have also tried [KnownType( typeof( Person ) ) ] with the same result. I have control of both client and server, so I have my DataObjects (where Person is defined) and DataInterfaces (where IPerson is defined) assemblies in both places. Is there something obvious I am missing? I thought KnownType was the answer to being able to use interfaces with WCF. ----- FURTHER INFORMATION ----- I removed the KnownType from the Person class and added [ServiceKnownType( typeof( Person ) ) ] to my service interface, as suggested by Richard. The client-side proxy still looks the same, public object GetPerson() { return base.Channel.GetPerson(); , but now it doesn't blow up. The client just has an "object", though, so it has to cast it to IPerson before it is useful. var person = client.GetPerson ( ); Console.WriteLine ( ( ( IPerson ) person ).Name );

    Read the article

  • dynamically changing the selector text

    - by kelly
    I have a 'next' button which fades out a div, shows another, changes out a graphic and then... I want it to change the actual ID of the 'next' button but neither .html nor replaceWith seem to be working. I have this: $(document).ready(function(){ $('#portfolio').fadeTo(500,0.25); $('#account') .animate({width:"10.1875em",height:"11.1875em",duration:'medium'}); $('#next2_btn').click(function(){ $('#content').fadeTo(300, 0.0, function() { $('#content2').show(300, function() { $('#next2_btn').$('#next2_btn'.value).html('<area shape="rect" coords="826,935,906,971" id="next3_btn" href="#">') $('#account').fadeTo(500,1.0) .animate({marginLeft:"220px", width:"2em",'height' :"2em",duration:'medium'}) .animate({     marginLeft:"400px",     marginTop:"35px",     width:"7em",     height:"7em", duration:"medium"     }, 'medium', 'linear', function() {     $('#statusGraphic').replaceWith('<img src="state2_138x28.gif">');     }) .fadeTo(500,0.5); $('#portfolio') .fadeTo(500,1.5) .animate({marginLeft:"-175px", width:"2em",height:"2.5em",duration:'medium'}) .animate({marginLeft:"-330px", width:"8.5em",height:"9.9375em",duration:'medium'}); }); }) })

    Read the article

  • MVC.net 2 - change the HTML outputed by ValidationMessageFor - can this be down via templates?

    - by Nathan Kelly
    MVC.net 2 by default outputs validation messages like this: <span id="UserName_validationMessage" class="field-validation-valid">A Validation message</span> I would like it to do it like this: <label id="UserName_validationMessage" class="field-validation-valid">A Validation message</label> Is there a way to do it like the display and editor templates? Or is there another way to do it globally?

    Read the article

  • jQuery: Circulate plugin: stopping midway in animation

    - by kelly
    Has anyone had any luck in altering the plug-in code so that one might animate an object in "3d" space for only a 1/4 or 1/2 turn? As it stands, an object must complete a full circle before stopping or looping. And for those who haven't seen it yet: http://css-tricks.com/examples/Circulate/

    Read the article

  • Drupal: Can Book layout menu be added and expanded in the primary menu?

    - by kelly
    I'd like to take a book menu and just add it right to the primary links. Any way to do that? It can appear alreayd in the Navigation links but I'd like it to expand to deeper child levels. Also, I'm using a theme (Newswire) that creates a suckerfish menu from the primary links, so if I can automatically add my book pages to the primary links that would be ideal... Sample Book Layout

    Read the article

  • Mongodb - how to deserialze when a property has an Interface return type

    - by Mark Kelly
    I'm attempting to avoid introducing any dependencies between my Data layer and client code that makes use of this layer, but am running into some problems when attempting to do this with Mongo (using the MongoRepository) MongoRepository shows examples where you create Types that reflect your data structure, and inherit Entity where required. Eg. [CollectionName("track")] public class Track : Entity { public string name { get; set; } public string hash { get; set; } public Artist artist { get; set; } public List<Publish> published {get; set;} public List<Occurence> occurence {get; set;} } In order to make use of these in my client code, I'd like to replace the Mongo-specific types with Interfaces, e.g: [CollectionName("track")] public class Track : Entity, ITrackEntity { public string name { get; set; } public string hash { get; set; } public IArtistEntity artist { get; set; } public List<IPublishEntity> published {get; set;} public List<IOccurenceEntity> occurence {get; set;} } However, the Mongo driver doesn't know how to treat these interfaces, and I understandably get the following error: An error occurred while deserializing the artist property of class sf.data.mongodb.entities.Track: No serializer found for type sf.data.IArtistEntity. --- MongoDB.Bson.BsonSerializationException: No serializer found for type sf.data.IArtistEntity. Does anyone have any suggestions about how I should approach this?

    Read the article

  • Import Data from Excel Spreadsheet or CVS into MySQL

    - by Kelly Roper
    I have a spreadsheet which really has only one complicated table. I basically convert the spreadsheet to a cvs and use a groovy script to generate the INSERT scripts. However, I cannot do this with a table that has 28 fields with data within some of the fields on the spreadsheet that make importing into the CVS even more complicated. So the fields in the new CVS are not differentiated properly or my script has not accounted for it. Does anyone have any suggestions on a better approach to do this? Thanks.

    Read the article

  • Calling back a functions value

    - by Jason Kelly
    I need your help, I cannot, for the life of me, figure this out. I've had my head wrapped around it only to no avail. Ideally, i'd like to setup two functions. 1 function: select_date() to interact with the user to select a date from the jQuery Date picker. If the dialog is closed then return as null. Then a second function: test() to check wether or not a date was picked/selected.' Here's my delema, when the function test() is executed, an alert box pops up and says "undefined" which means, I never get to select a date and it always being "undefined" I dont see what I am doing wrong here and everything seems logical to me. <!DOCTYPE html> <html> <head> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js"></script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/jquery-ui.js"></script> <script type="text/javascript"> function select_date() { var sdate $('#dd').dialog({ autoOpen: true, modal: true, overlay: { opacity: 0.5, background: 'black' }, title: "title", height: 265, width: 235, draggable: false, resizable: false }); $('#d1').datepicker({ onSelect: function () { $("#dd").dialog("close"); } }); return sdate } function test() { var x = select_date() alert(x) } </script> <style type="text/css"> #d1 {font-size:64%;} </style> </head> <body> <div id="dd"> <div id="d1"> </div> </div> <a href="javascript:test()">test</a> </body> </html>

    Read the article

  • Returning the Name of a column header

    - by Jason Kelly
    I need your help, Given the html table below, how can I create a javascript function that will, at the click of a mouse, alert me the name of the column header? Ie. if I click on the COLORS header, a javascript box will popup and alert("COLORS")? <html> <head> </head> <body> <table border="1" cellspacing="1" width="500"> <tr> <td>FRUITS</td> <td>COLORS</td> <td>VEGGIES</td> <td>NUMBERS</td> </tr> <tr> <td>apples</td> <td>red</td> <td>carrots</td> <td>123</td> </tr> <tr> <td>oranges</td> <td>blue</td> <td>celery</td> <td>456</td> </tr> <tr> <td>pears</td> <td>green</td> <td>brocoli</td> <td>789</td> </tr> <tr> <td>mangos</td> <td>yellow</td> <td>lettuce</td> <td>098</td> </tr> </table> </body> </html>

    Read the article

  • header location won't work in php

    - by Jayden Kelly
    I am making a login page for my website but the header location won't work. here is the code of login.php: <?php include ( './includes/header.php' ); if (isset($_POST['submit'])) { $username = $_POST['username']; $password = $_POST['password']; $check_username = mysql_query("SELECT username FROM users WHERE username='$username'"); $numrows = mysql_num_rows($check_username); if ($numrows != 1) { echo 'That User doesn\'t exist.'; } else { $check_password = mysql_query("SELECT password FROM users WHERE password='$password' && username='$username'"); while ($row = mysql_fetch_assoc($check_password)) { $password_db = $row['password']; if ($password_db == $password) { $_SESSION['username'] = $username; header("Location: members.php"); } } } } ?> <h2>Login to Your Account</h2> <form action='login.php' method='POST'> <input type='text' name='username' value='Username ...' onclick='value=""'/><p /> <input type='password' name='password' value='Password ...' onclick='value=""'/><p /> <input type='submit' name='submit' value='Login to my Account' /> </form> I would really appreciate it if someone could help me, thanks. P.S. If you need the php part of the header file it is here: <?php session_start(); include ( './includes/functions.php' ); include ( './includes/connect_to_mysql.php' ); ?>

    Read the article

  • Solving Diophantine Equations Using Python

    - by HARSHITH
    In mathematics, a Diophantine equation (named for Diophantus of Alexandria, a third century Greek mathematician) is a polynomial equation where the variables can only take on integer values. Although you may not realize it, you have seen Diophantine equations before: one of the most famous Diophantine equations is: We are not certain that McDonald's knows about Diophantine equations (actually we doubt that they do), but they use them! McDonald's sells Chicken McNuggets in packages of 6, 9 or 20 McNuggets. Thus, it is possible, for example, to buy exactly 15 McNuggets (with one package of 6 and a second package of 9), but it is not possible to buy exactly 16 nuggets, since no non- negative integer combination of 6's, 9's and 20's adds up to 16. To determine if it is possible to buy exactly n McNuggets, one has to solve a Diophantine equation: find non-negative integer values of a, b, and c, such that 6a + 9b + 20c = n. Write an iterative program that finds the largest number of McNuggets that cannot be bought in exact quantity. Your program should print the answer in the following format (where the correct number is provided in place of n): "Largest number of McNuggets that cannot be bought in exact quantity: n"

    Read the article

  • News you can use, PeopleTools gems at OpenWorld 2012

    - by PeopleTools Strategy
    Here are some of the sessions which may not have caught your eyes during your scheduling of events you would like to attend at this year's Open World! CON9183 PeopleSoft Technology Roadmap Jeff Robbins Mon, Oct 1 4:45 PM Moscone West, Room 3002/4 Jeff's session is always very well attended. Come to hear, and see, what's going to be delivered in the new release and get some thoughts on where PeopleTools and the industry is heading. CON9186 Delivering a Ground-Breaking User Interface with PeopleTools Matt Haavisto Steve Elcock Wed, Oct 3 3:30 PM Moscone West, Room 3009 This session will be wonderfully engaging for participants.  As part of our demonstration, audience members will be able to interact live and real-time with our demo using their smart phones and tablets as if you are users of the system. CON9188 A Great User Experience via PeopleSoft Applications Portal Matt Haavisto Jim Marion Pramod Agrawal Mon, Oct 1 12:15 PM Moscone West, Room 3009 This session covers not only the PeopleSoft Portal, but new features like Workcenters and Dashboards, and how they all work together to form the PeopleSoft ecosystem. CON9192 Implementing a PeopleSoft Maintenance Strategy with My Update Manager Mike Thompson Mike Krajicek Tue, Oct 2 1:15 PM Moscone West, Room 3009 The LCM development team will show Oracle's My Update Manager for PeopleSoft and how it drastically simplifies deciding what updates are required for your specific environment. CON9193 Understanding PeopleSoft Maintenance Tools & How They Fit Together Mike Krajicek Wed, Oct 3 10:15 AM Moscone West, Room 3002/4 Learn about the portfolio of maintenance tools including some of the latest enhancements such as Oracle's My Update Manager for PeopleSoft, Application Data Sets, and the PeopleSoft Test Framework, and see what they can do for you. CON9200 PeopleTools Product Team Panel Discussion Jeff Robbins Willie Suh Virad Gupta Ravi Shankar Mike Krajicek Wed, Oct 3 5:00 PM Moscone West, Room 3009 Attend this session to engage in an open discussion with key members of Oracle's PeopleTools senior management team. You will be able to ask questions, hear their thoughts, and gain their insight into the PeopleTools product direction. CON9205 Securing Your PeopleSoft Integration Infrastructure Greg Kelly Keith Collins Tue, Oct 2 10:15 AM Moscone West, Room 3011 This session, with the senior integration developer, will outline Oracle's best practices for securing your integration infrastructure so that you know your web services and REST services are as secure as the rest of your PeopleSoft environment. CON9210 Performance Tuning for the PeopleSoft Administrator Tim Bower David Kurtz Mon, Oct 1 10:45 AM Moscone West, Room 3009 Meet long time technical consultants with deep knowledge of system tuning, Tim Bower of the Center of Excellence and David Kurtz, author of "PeopleSoft for the Oracle DBA". System administrators new to tuning a PeopleSoft environment as well as seasoned experts will come away with new techniques that will help them improve the performance of their PeopleSoft system. CON9055 Advanced Management of Oracle PeopleSoft with Oracle Enterprise Manager Greg Kelly Milten Garia Greg Bouras Thurs Oct 4 12:45 PM Moscone West, Room 3009 This promises to be a really interesting session as Milten Garia from CSU discusses lessons learned during the implementation of Oracle's Enterprise Manager with the PeopleSoft plug-in across a multi campus environment. There are some surprising things about Solaris 10 and the Bourne shell. Some creative work by the Unix administrators so the well tried scripts and system replication processes were largely unaffected. CON8932 New Functional PeopleTools Capabilities for the Line of Business User Jeff Robbins Tues, Oct 2 5:00 PM Moscone West, Room 3007 Using PeopleTools 8.5x capabilities like: related content, embedded help, pivot grids, hover-over, and more, Jeff will discuss how these can deliver business value and innovation which will positively impact your business without the high costs associated with upgrading your PeopleSoft applications. Check out a more detailed list here. We look forward to meeting you all there!

    Read the article

  • Best way to randomly select rows *per* column in SQL Server

    - by LesterDove
    A search of SO yields many results describing how to select random rows of data from a database table. My requirement is a bit different, though, in that I'd like to select individual columns from across random rows in the most efficient/random/interesting way possible. To better illustrate: I have a large Customers table, and from that I'd like to generate a bunch of fictitious demo Customer records that aren't real people. I'm thinking of just querying randomly from the Customers table, and then randomly pairing FirstNames with LastNames, Address, City, State, etc. So if this is my real Customer data (simplified): FirstName LastName State ========================== Sally Simpson SD Will Warren WI Mike Malone MN Kelly Kline KS Then I'd generate several records that look like this: FirstName LastName State ========================== Sally Warren MN Kelly Malone SD Etc. My initial approach works, but it lacks the elegance that I'm hoping the final answer will provide. (I'm particularly unhappy with the repetitiveness of the subqueries, and the fact that this solution requires a known/fixed number of fields and therefore isn't reusable.) SELECT FirstName = (SELECT TOP 1 FirstName FROM Customer ORDER BY newid()), LastName= (SELECT TOP 1 LastNameFROM Customer ORDER BY newid()), State = (SELECT TOP 1 State FROM Customer ORDER BY newid()) Thanks!

    Read the article

  • Best way to randomly select columns from random rows of SQL results.

    - by LesterDove
    A search of SO yields many results describing how to select random rows of data from a database table. My requirement is a bit different, though, in that I'd like to select individual columns from across random rows in the most efficient/random/interesting way possible. To better illustrate: I have a large Customers table, and from that I'd like to generate a bunch of fictitious demo Customer records that aren't real people. I'm thinking of just querying randomly from the Customers table, and then randomly pairing FirstNames with LastNames, Address, City, State, etc. So if this is my real Customer data (simplified): FirstName LastName State ========================== Sally Simpson SD Will Warren WI Mike Malone MN Kelly Kline KS Then I'd generate several records that look like this: FirstName LastName State ========================== Sally Warren MN Kelly Malone SD Etc. My initial approach works, but it lacks the elegance that I'm hoping the final answer will provide. (I'm particularly unhappy with the repetitiveness of the subqueries, and the fact that this solution requires a known/fixed number of fields and therefore isn't reusable.) SELECT FirstName = (SELECT TOP 1 FirstName FROM Customer ORDER BY newid()), LastName= (SELECT TOP 1 LastNameFROM Customer ORDER BY newid()), State = (SELECT TOP 1 State FROM Customer ORDER BY newid()) Thanks!

    Read the article

  • how to handel failure mails using PHP?

    - by Navruk
    example:- If i sent a mail through gmail to this id "[email protected]" i got error like "Delivery to the following recipient failed permanently:" My question is:- If i sent using PHP mail function, how can i catch failure email id? code:- // To send HTML mail, the Content-type header must be set $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'To: Mary <[email protected]>, Kelly <[email protected]>' . "\r\n"; $headers .= 'From: Birthday Reminder <[email protected]>' . "\r\n"; $headers .= 'Cc: [email protected]' . "\r\n"; $headers .= 'Bcc: [email protected]' . "\r\n"; $to = "[email protected]"; $subject = "Testing"; $message = "Testing body"; mail($to, $subject, $message, $headers);

    Read the article

  • Oracle OpenWorld - 3 Days and Counting!

    - by Theresa Hickman
    If you haven’t set your schedule for OpenWorld yet, here’s your chance to reserve a seat at some of the key Financial Management sessions. There’s over 120 sessions specific to our Financials audience that will not only focus on Oracle’s financial product lines, but will also discuss controls and compliance, as well as analytics, budgeting/planning, and financial reporting and the close process. For a complete list of sessions, view any of the Focus on Documents located on the OpenWorld site. Key Sessions: Day Time Session Location Monday 3:15 Oracle Fusion Financials: Overview, Strategy, Customer Experiences, and Roadmap Moscone West - 2003 Monday 3:15 Oracle Financials: Strategy, Update, and Roadmap Moscone West - 3006 Tuesday 11:45 General Session: What’s Next for Financial Management Solutions at Oracle? Moscone West - 3002/3004 Tuesday 1:15 Exploring Oracle Preventive Controls Governor’s Features Through Real-Life Examples Palace Hotel - Presidio Weds 10:15 Oracle Hyperion Enterprise Performance Management: A Bridge to Oracle Fusion Financials Palace Hotel - Concert Weds 1:15 Oracle Fusion Financials Coexistence with Oracle E-Business Suite Moscone West - 2011 Weds 3:30 McDonald’s Adopts Financial Analytics to Increase Business Performance Moscone West - 2011 Thursday 12:45 User Panel: Reducing Upgrade Errors and Effort While Improving Compliance Palace Hotel Palace Hotel - Presidio

    Read the article

  • How to fix Google 404 not found Crawl Errors?

    - by Freeme
    I was checking on Google webmater tool for my blog site to see if there's any indication on why my blog traffic decreased to half in one day and i saw 43 Not Found crawl errors and 5 in Sitemap Not Found errors. The 5 Not Found errors in Sitemap were the links to categories. I guess I renamed categories that's why google can't find the links. As for the 43 other Not Found errors, I see blog post titles that contains (' .) EX: McDonald's, O.N.E. They weren't found by google crawler. Blog post with /CachedYou at the end and blog posts with /www.example.com attached at the end, they weren't found by Google crawlers either. My question is how do I correct those Not Found Errors? Thanks

    Read the article

  • Webinar: Meeting Customer Expectations in the New Age of Retail

    - by Sanjeev Sharma
    Webcast Date: Thursday, November 8, 2012 Time: 10am PT/ 1pm ET The retail market has expanded into the online, mobile, and social worlds. But the key to success hasn’t changed since the days of traditional, brick-and-mortar business. It’s still about service. A successful retailer today in omni-channel customer engagement must be able to deliver quality service that meets customer expectations. For many retailers, Oracle Web commerce applications help them achieve that success, allowing them to market, interact, and transact across multiple channels in a predictable, consistent, and personalized manner. Join us for this Webcast, and learn what Oracle applications can do for your business. In this session, we will discuss: The significance and dimensions of modern omni-channel customer experience The Oracle Commerce platform Real-world examples of business value derived by running customer-facing applications on Oracle Engineered Systems Register today Speakers: Sanjeev Sharma Principal Product Director, Oracle Exalogic, Oracle Kelly Goetsch Senior Principal Product Manager, Oracle Commerce, Oracle Dan Conway Senior Product Manager, Oracle Retail, Oracle

    Read the article

  • Supercharging the Performance of Your Front-Office Applications @ OOW'12

    - by Sanjeev Sharma
    [Re-posted from here.] You can increase customer satisfaction, brand equity, and ultimately top-line revenue by deploying  Oracle ATG Web Commerce, Oracle WebCenter Sites, Oracle Endeca applications, Oracle’s  Siebel applications, and other front-office applications on Oracle Exalogic, Oracle’s combination  of hardware and software for applications and middleware. Join me (Sanjeev Sharma) and my colleague, Kelly Goetsch, at the following conference session at Oracle Open World to find out how Customer Experience can be transformed with Oracle Exalogic: Session:  CON9421 - Supercharging the Performance of Your Front-Office Applications with Oracle ExalogicDate: Wednesday, 3 Oct, 2012Time: 10:15 am - 11:15 am (PST)Venue: Moscone South (309)

    Read the article

  • OpenJDK 6 B27 Available

    - by user9158633
    On October 26, 2012 the source bundle for OpenJDK 6 b27 was published at http://download.java.net/openjdk/jdk6/. The main changes in b27 are the latest round of security updates and a number of other fixes. For more information see the detailed list of all the changes in OpenJDK 6 B27. Test Results: All the jdk regression tests run with  make test passed on linux_i586 cd jdk6 make make test Note: sun/tools/jinfo/Basic.sh test failed on linux_x64. For the current list of excluded tests see  jdk6/jdk/test/ProblemList.txt file:  ProblemList.html in B27 |  Latest ProblemList.txt (in the tip revision). Special thanks to Kelly O'Hair for his contributions to the project and Dave Katleman for his Release Engineering work.

    Read the article

  • Google I/O 2010 - Measure in milliseconds: Meet Speed Tracer

    Google I/O 2010 - Measure in milliseconds: Meet Speed Tracer Google I/O 2010 - Measure in milliseconds redux: Meet Speed Tracer GWT 201 Kelly Norton It turns out that web apps can be slow for all sorts of opaque and unintuitive reasons. Don't be fooled into thinking that bloated, slow JavaScript is the only culprit. This session introduces you to Speed Tracer, a new GWT tool that can tell you exactly where time is going within the browser. For all I/O 2010 sessions, please go to code.google.com From: GoogleDevelopers Views: 7 0 ratings Time: 01:00:53 More in Science & Technology

    Read the article

  • Quels signes permettent de déceler un candidat talentueux ? Un développeur propose cinq indices permettant une embauche directe

    Quels signes permettent de déceler un candidat talentueux ? Un développeur propose cinq indices permettant une embauche directe Le processus de recrutement passe toujours par une étape d'entretien, permettant un premier contact entre le candidat et l'entreprise. Cette phase de questions/réponses ou de test peut permettre souvent de déceler chez le candidat des caractéristiques impressionnantes, pouvant aboutir directement à une proposition d'emploi. Dans le secteur du développement informatique, quels sont les signes permettant d'identifier une perle rare ? C'est la question à laquelle répond Brian Kelly, un développeur senior, de par son expérience en la matière, qui propo...

    Read the article

  • OpenJDK 6 B26 Available

    - by user9158633
    On September 21, 2012 the source bundle for OpenJDK 6 b26 was published at http://download.java.net/openjdk/jdk6/. The main changes in b26 are the latest round of security updates and a number of other fixes. For more information see the detailed list of all the changes in OpenJDK 6 B26. Test Results: All the jdk regression tests run with  make test passed on linux. cd jdk6 make make test For the current list of excluded tests see  jdk6/jdk/test/ProblemList.txt file:  ProblemList.html in B26 |  Latest ProblemList.txt (in the tip revision). Special thanks to Kelly O'Hair for his contributions to the project and Dave Katleman for his Release Engineering work.

    Read the article

  • Diophantine Equation [closed]

    - by ANIL
    In mathematics, a Diophantine equation (named for Diophantus of Alexandria, a third century Greek mathematician) is a polynomial equation where the variables can only take on integer values. Although you may not realize it, you have seen Diophantine equations before: one of the most famous Diophantine equations is: X^n+Y^n=Z^n We are not certain that McDonald's knows about Diophantine equations (actually we doubt that they do), but they use them! McDonald's sells Chicken McNuggets in packages of 6, 9 or 20 McNuggets. Thus, it is possible, for example, to buy exactly 15 McNuggets (with one package of 6 and a second package of 9), but it is not possible to buy exactly 16 nuggets, since no non- negative integer combination of 6's, 9's and 20's adds up to 16. To determine if it is possible to buy exactly n McNuggets, one has to solve a Diophantine equation: find non-negative integer values of a, b, and c, such that 6a + 9b + 20c = n. Problem 1 Show that it is possible to buy exactly 50, 51, 52, 53, 54, and 55 McNuggets, by finding solutions to the Diophantine equation. You can solve this in your head, using paper and pencil, or writing a program. However you chose to solve this problem, list the combinations of 6, 9 and 20 packs of McNuggets you need to buy in order to get each of the exact amounts. Given that it is possible to buy sets of 50, 51, 52, 53, 54 or 55 McNuggets by combinations of 6, 9 and 20 packs, show that it is possible to buy 56, 57,..., 65 McNuggets. In other words, show how, given solutions for 50-55, one can derive solutions for 56-65. Problem 2 Write an iterative program that finds the largest number of McNuggets that cannot be bought in exact quantity. Your program should print the answer in the following format (where the correct number is provided in place of n): "Largest number of McNuggets that cannot be bought in exact quantity: n" Hints: Hypothesize possible instances of numbers of McNuggets that cannot be purchased exactly, starting with 1 For each possible instance, called n, a. Test if there exists non-negative integers a, b, and c, such that 6a+9b+20c = n. (This can be done by looking at all feasible combinations of a, b, and c) b. If not, n cannot be bought in exact quantity, save n When you have found six consecutive values of n that in fact pass the test of having an exact solution, the last answer that was saved (not the last value of n that had a solution) is the correct answer, since you know by the theorem that any amount larger can also be bought in exact quantity

    Read the article

< Previous Page | 2 3 4 5 6 7 8  | Next Page >