Search Results

Search found 146 results on 6 pages for 'arthur upfield'.

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

  • Round Table - Minimum Cost Algorithm

    - by 7Aces
    Problem Link - http://www.iarcs.org.in/zco2013/index.php/problems/ROUNDTABLE It's dinner time in Castle Camelot, and the fearsome Knights of the Round Table are clamouring for dessert. You, the chef, are in a soup. There are N knights, including King Arthur, each with a different preference for dessert, but you cannot afford to make desserts for all of them. You are given the cost of manufacturing each Knight's preferred dessert-since it is a round table, the list starts with the cost of King Arthur's dessert, and goes counter-clockwise. You decide to pick the cheapest desserts to make, such that for every pair of adjacent Knights, at least one gets his dessert. This will ensure that the Knights do not protest. What is the minimum cost of tonight's dinner, given this condition? I used the Dynamic Programming approach, considering the smallest of i-1 & i-2, & came up with the following code - #include<cstdio> #include<algorithm> using namespace std; int main() { int n,i,j,c,f; scanf("%d",&n); int k[n],m[n][2]; for(i=0;i<n;++i) scanf("%d",&k[i]); m[0][0]=k[0]; m[0][1]=0; m[1][0]=k[1]; m[1][1]=1; for(i=2;i<n;++i) { c=1000; for(j=i-2;j<i;++j) { if(m[j][0]<c) { c=m[j][0]; f=m[j][1];} } m[i][0]=c+k[i]; m[i][1]=f; } if(m[n-2][0]<m[n-1][0] && m[n-2][1]==0) printf("%d\n",m[n-2][0]); else printf("%d\n",m[n-1][0]); } I used the second dimension of the m array to store from which knight the given sequence started (1st or 2nd). I had to do this because of the case when m[n-2]<m[n-1] but the sequence started from knight 2, since that would create two adjacent knights without dessert. The problem arises because of the table's round shape. Now an anomaly arises when I consider the case - 2 1 1 2 1 2. The program gives an answer 5 when the answer should be 4, by picking the 1st, 3rd & 5th knight. At this point, I started to doubt my initial algorithm (approach) itself! Where did I go wrong?

    Read the article

  • links for 2011-02-08

    - by Bob Rhubart
    When It Comes to Data Integration, Oracle Is the Right Choice (tags: ping.fm) When It Comes to Data Integration, Oracle Is the Right Choice (tags: ping.fm) Webcast: Webcast: Deploy Oracle VM Templates for Oracle E-Business Suite and Oracle PeopleSoft Enterprise Applications. Feb 15. Event Date: 02/15/2011 9:00am PT / Noon ET. Featured Speakers: Adam Hawley (Oracle Senior Director, Product Management, Virtualization), Ivo Dujmovic (Oracle Director, Technology Integration), Greg Kelly (Oracle Product Strategy Manager - PeopleTools). (tags: oracle virtualization peoplesoft) Webcast: Managing Oracle Exadata with Oracle Enterprise Manager 11g Thursday, February 10, 2011 - 10 a.m. PT/1 p.m. ET. Ask Oracle experts questions and learn firsthand how to efficiently manage all stages of Oracle Exadata’s lifecycle, from testing to deployment. (tags: oracle exalogic enterprisemanager) Arthur Cole: Winning the Consolidated Data Center Future | ITBusinessEdge.com "According to InformationWeek, the amount of data under management is increasing by about 20 percent per year, with some organizations having to deal with 50 percent or more. That means capacity needs to double every two or three years." - Arthur Cole (tags: dataconsolidation enterprisearchitecture) Transformation of Product Management in Telecommunications for Rapid Launch of Next Generation Products (Telecommunications Architecture Corner) Raul Goycoolea's post examines "how enterprise product management enabled by PLM-based product catalogue solutions helps to launch next generation products rapidly in the context of the Telecommunication Industry." (tags: oracle otn enterprisearchitecture) Richard Veryard on Architecture: What is an EA vendor? "Even some people who insist that enterprise architecture shouldn't be thought of as merely software architecture seem to think that 'tools' only means 'software tools.'" - Richard Veryard (tags: enterprisearchitecture) MDM for Tax Authorities (Oracle Master Data Management) "Tax Authorities face a multitude of IT challenges," says David Butler. "Compounding these issues is the fact that the IT architectures in operation at most revenue and collections agencies are very complex." (tags: oracle otn MDM ITarchitecture) Bernard Golden: How Cloud Computing Changes IT Staffs | CIO.com | CIO.com "Enterprise architects become more important" tops Bernard's list of changes. (tags: cloudcomputing staffing cio enterprisearchitecture) Martijn Linssen: Social Enterprise Magic Quadrant "Revolutions usually go wrong, where evolutions usually go right." - Martijn Linssen (tags: socialcomputing enterprise2.0) Why Do IT Roles Fail? | CIO "The roles that come up most often are the ones that are not directly building or maintaining systems. These include architecture, planning, vendor management, relationship management, PMO, and security." - Marc Cecere (tags: softwarearchitecture technologyroles) We're Hiring! - Server and Desktop Virtualization Product Management (Oracle's Virtualization Blog) Adam Hawley with information on an opportunity for qualified job seekers. (tags: oracle otn employment virtualization)

    Read the article

  • Linuxcare Returns

    <b>Cyber Cynic:</b> "Poor top management decisions led Linuxcare to lose first its way, and, then, years later, to quietly vanish. Now, one of its founders, Arthur F. Tyde III, has brought Linuxcare back from the grave and made it ready for the 21st century."

    Read the article

  • Mock versus Implementation. How to share both approaches in a single Test class ?

    - by Arthur Ronald F D Garcia
    Hi, See the following Mock Test by using Spring/Spring-MVC public class OrderTest { // SimpleFormController private OrderController controller; private OrderService service; private MockHttpServletRequest request; @BeforeMethod public void setUp() { request = new MockHttpServletRequest(); request.setMethod("POST"); Integer orderNumber = 421; Order order = new Order(orderNumber); // Set up a Mock service service = createMock(OrderService.class); service.save(order); replay(service); controller = new OrderController(); controller.setService(service); controller.setValidator(new OrderValidator()); request.addParameter("orderNumber", String.valueOf(orderNumber)); } @Test public void successSave() { controller.handleRequest(request, new MockHttpServletResponse()); // Our OrderService has been called by our controller verify(service); } @Test public void failureSave() { // Ops... our orderNumber is required request.removeAllParameters(); ModelAndView mav = controller.handleRequest(request, new MockHttpServletResponse()); BindingResult bindException = (BindingResult) mav.getModel().get(BindingResult.MODEL_KEY_PREFIX + "command"); assertEquals("Our Validator has thrown one FieldError", bindException.getAllErrors(), 1); } } As you can see, i do as proposed by Triple A pattern Arrange (setUp method) Act (controller.handleRequest) Assert (verify and assertEquals) But i would like to test both Mock and Implementation class (OrderService) by using this single Test class. So in order to retrieve my Implementation, i re-write my class as follows @ContextConfiguration(locations="/app.xml") public class OrderTest extends AbstractTestNGSpringContextTests { } So how should i write my single test to Arrange both Mock and Implementation OrderService without change my Test method (sucessSave and failureSave) I am using TestNG, but you can show in JUnit if you want regards,

    Read the article

  • What should i do to test EasyMock objects when using Generics ? EasyMock

    - by Arthur Ronald F D Garcia
    See code just bellow Our generic interface public interface Repository<INSTANCE_CLASS, INSTANCE_ID_CLASS> { void add(INSTANCE_CLASS instance); INSTANCE_CLASS getById(INSTANCE_ID_CLASS id); } And a single class public class Order { private Integer id; private Integer orderNumber; // getter's and setter's public void equals(Object o) { if(o == null) return false; if(!(o instanceof Order)) return false; // business key if(getOrderNumber() == null) return false; final Order other = (Order) o; if(!(getOrderNumber().equals(other.getOrderNumber()))) return false; return true; } // hashcode } And when i do the following test private Repository<Order, Integer> repository; @Before public void setUp { repository = EasyMock.createMock(Repository.class); Order order = new Order(); order.setOrderNumber(new Integer(1)); repository.add(order); EasyMock.expectLasCall().once(); EasyMock.replay(repository); } @Test public void addOrder() { Order order = new Order(); order.setOrderNumber(new Integer(1)); repository.add(order); EasyMock.verify(repository) } I get Unexpected method call add(br.com.smac.model.domain.Order@ac66b62): add(br.com.smac.model.domain.Order@ac66b62): expected: 1, actual: 0 Why does it not work as expected ??? What should i do to pass the test ???

    Read the article

  • Oversized Qt Fonts on OSX

    - by Mike Arthur
    Why does Qt on OSX appear to default to overly large fonts? Even when you select the same font size manually the fonts appear slightly bigger. Does Qt on OSX use a different font rendering to OSX? Does this improve if you use Qt for Cocoa? In addition, is there a qtconfig tool or equivalent to globally set the font settings for all Qt applications? Thanks!

    Read the article

  • Applying policy based design question

    - by Arthur
    I've not read the Modern C++ Design book but have found the idea of behavior injection through templates interesting. I am now trying to apply it myself. I have a class that has a logger that I thought could be injected as a policy. The logger has a log() method which takes an std::string or std::wstring depending on its policy: // basic_logger.hpp template<class String> class basic_logger { public: typedef String string_type; void log(const string_type & s) { ... } }; typedef basic_logger<std::string> logger; typedef basic_logger<std::wstring> wlogger; // reader.hpp template<class Logger = logger> class reader { public: typedef Logger logger_type; void read() { _logger.log("Reading..."); } private: logger_type _logger; }; Now the questing is, should the reader take a Logger as an argument, like above, or should it take a String and then instantiate a basic_logger as an instance variable? Like so: template<class String> class reader { public: typedef String string_type; typedef basic_logger<string_type> logger_type; // ... private: logger_type _logger; }; What is the right way to go?

    Read the article

  • leiningen: missing super-pom

    - by Arthur Ulfeldt
    if I enable eith the clojure-couchdb or swank-clojure then lein deps fails because org.apache.maven:super-pom:jar:2.0 is missing :dependencies [[org.clojure/clojure "1.1.0-master-SNAPSHOT"] [org.clojure/clojure-contrib "1.0-SNAPSHOT"] [clojure-http-client "1.0.0-SNAPSHOT"] [org.apache.activemq/activemq-core "5.3.0"] ; [org.clojars.the-kenny/clojure-couchdb "0.1.3"] ; [org.clojure/swank-clojure "1.1.0"] ]) this error: Path to dependency: 1) org.apache.maven:super-pom:jar:2.0 2) org.clojure:swank-clojure:jar:1.1.0 ---------- 1 required artifact is missing. for artifact: org.apache.maven:super-pom:jar:2.0 from the specified remote repositories: clojars (http://clojars.org/repo/), clojure-snapshots (http://build.clojure.org/snapshots), central (http://repo1.maven.org/maven2) what is super-pom. why do these packages need it and where can I get it.

    Read the article

  • How to rebuild openssh 5.2p1 after changing configure.ac

    - by Arthur Ulfeldt
    I needed to add AM_PATH_CHECK to configure.am I then try to run the usual sequence of autotools commands to rebuild all the makefiles and whatnot: aclocal automake -ac autoheader autoreconf ./configure make and here my lack of understanding of autotools showes up because this release of openssh has no Makefile.am??? now what do I do? if i try to ignore this and build anyway configure dies with this lovely error: checking whether OpenSSL's PRNG is internally seeded... yes ./configure: line 18275: syntax error near unexpected token `PROG_LS,' ./configure: line 18275: `OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)' caused by this line in configure.ac: OSSH_PATH_ENTROPY_PROG(PROG_LS, ls) Is this actually caused by my changes to configure.ac? what can I do to regenerate the required files to allow configure to work? if i take my changes out and dont run aclocal then it works???

    Read the article

  • ADF vs. EJB/Spring: Where should I invest my time?

    - by Arthur Huxley
    I am a junior Java SE developer, planning to become a Java Standard Edition professional. Which technologies/frameworks will be the smartest thing for me to learn? I will invest a lot of time and energy on the technologies that I eventually choose and it will be the basis for my carreer. I need to choose carefully. I have one question in particular regarding Oracle ADF: How can it be better than Spring or EJB 3.x? No offense to the ADF developers - and please excuse my ignorance - but is there a reason for using ADF other than locking customers to Oracle products? If ADF is an inferior technology I fear I will be making a mistake choosing to specialize in ADF.

    Read the article

  • setting mailx default smtp relay

    - by Arthur
    I heave searched Google for this and cannot seem to find a soloution I have bsd-mailx on my server and it sends mail just fine However I wished to have a development environment at home. I need mailx such that php can use its mail function. However the mail is failing to resolve the domain name @gmail.com I am aware that my ISP talk talk may be blocking this is they have a mail server smtp.talktalk.net I assume I would have to add somthing to /etc/mail.rc and use heirloom maEdit turned out I had a instance of send mail running that was doing weird things.. after killing ilx not bsd-mailx,,but would still need to set default smtp relay Im on ubuntu 12.4 thankyou Edit turned out I had a instance of send mail running that was doing weird things.. after killing that, I was able to add the smtp relay, but its now saying that the sender domain does not work. I assume this domain has to route back the the same machine the mail originated from. as i dont have a domain for my home address.

    Read the article

  • Compare rows between 2 tables

    - by arthur
    I am new to SQL and I need to build a database for a grocery store(not real, just a course assignment) i have two fields from two different tables - supplied price - the price that the store buys from the supplier and price that is given to the customers How can I make a constraint that insures that supplied price is lower then the price that is given to the customers? The relevant tables that I have are: CREATE TABLE Supplied_Products( [Supplier ID] Int NOT NULL Foreign Key References Suppliers, [Product ID] Int NOT NULL Foreign Key References Products, Price Float NOT NULL, CHECK (Price0), Constraint PK_Supplied_Products PRIMARY KEY([Supplier ID] ,[Product ID]) ) CREATE TABLE Products( [Product-ID] Int NOT NULL PRIMARY KEY, [Product Name] Varchar(20) NOT NULL, Price Float NOT NULL, [Category-Name] Varchar(20) NOT NULL Foreign Key References Categories, [Weight] Float NOT NULL, [Is Refrigirated] Varchar(1) DEFAULT 'N' CHECK ([Is Refrigirated] in('Y','N')),/* Is Refrigirated can be only Y-yes or N-no*/ CHECK (Price 0) )

    Read the article

  • Receive and Process Email with ASP.NET / C# [closed]

    - by Arthur Chaparyan
    Possible Duplicates: Recommendations for a .NET component to access an email inbox coding for how to receive a mail in windows apllication What methods are there for having .NET code run and handle e-mails as they arrive? I'm developing a social networking site that will allow users to send an email to an email address that is for posting. This is the same thing Blogger does. This allows me to take a picture with my phone and send it to [email protected] and have it posted to my profile. The site is running IIS6 and I have full access to the server. Emails are currently being processed using the SMTP service that comes with Windows 2003 Server, but I can switch to another system without any issues. I am assuming I would have to somehow have the incoming emails either go into a folder that my application is watching or cause incoming emails to trigger a script. can anyone point me in the right direction?

    Read the article

  • Multiple delimiters using Regex.Split in C#

    - by Arthur Frankel
    Let's say you need to split a string by various delimiters including newline (/r, /n) and a few other 'special' character strings. For example: This is a sample %%% text &&& that I would like to split %%% into an array. I would like the following in the resulting string array (contents via index) [0]This is a sample [1]text [2]that I would [3]like to split [4]into an array. I would like to use C# Regex.Split() function. What is the regex expression to match on all of my delimiters? Thanks in advance

    Read the article

  • iPhone: Setting Navigation Bar Title

    - by Arthur Skirvin
    Hey all. I'm still pretty new to iPhone development, and I'm having a bit of trouble figuring out how to change the title of my Navigation Bar. On another question on this site somebody recommended using : viewController.title = @"title text"; but that isn't working for me...Do I need to add a UINavigationController to accomplish this? Or maybe just an outlet from my UIViewController subclass? If it helps, I defined the navigation bar in IB and I'm trying to set its title in my UIViewController subclass. This is another one of those simple things that gives me a headache. Putting self.title = @"title text"; in viewDidLoad and initWithNibName didn't work either. Anybody know what's happening and how to get it happening right? Thanks!

    Read the article

  • PHP File Upload using url parameters

    - by Arthur
    Is there a way to upload a file to server using php and the filename in a parameter (instead using a submit form), something like this: myserver/upload.php?file=c:\example.txt Im using a local server, so i dont have problems with filesize limit or upload function, and i have a code to upload file using a form <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html> <body> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="fileForm" enctype="multipart/form-data"> File to upload: <table> <tr><td><input name="upfile" type="file"></td></tr> <tr><td><input type="submit" name="submitBtn" value="Upload"></td></tr> </table> </form> <?php if (isset($_POST['submitBtn'])){ // Define the upload location $target_path = "c:\\"; // Create the file name with path $target_path = $target_path . basename( $_FILES['upfile']['name']); // Try to move the file from the temporay directory to the defined. if(move_uploaded_file($_FILES['upfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['upfile']['name']). " has been uploaded"; } else{ echo "There was an error uploading the file, please try again!"; } } ?> </body> Thanks for the help

    Read the article

  • iPhone CSS and Display Testing

    - by Philip Arthur Moore
    Hi All. I recently coded and launched a website that displays consistently across Chrome, Firefox, Opera, IE8, IE7, and Safari. According to site visitors, though, the signup forms at the top and bottom of the site are mangled on the iPhone. I do not own an iPhone and I rarely test sites on the iPhone, and I would really hate to purchase it or an iPod Touch for the sake of occasional CSS/display testing. Question: is there a site online or a program I can use (I'm on Windows 7) for iPhone testing? An alternative question might be why the signup forms aren't displaying properly on the iPhone, when they look fine in all other browsers and a few other mobile devices that I've used? Many thanks.

    Read the article

  • How to set up precision attribute used by @Collumn annotation ???

    - by Arthur Ronald F D Garcia
    I often use java.lang.Integer as primary key. Here you can see some piece of code @Entity private class Person { private Integer id; @Id @Column(precision=8, nullable=false) public Integer getId() { } } I need to set up its precision attribute value equal to 8. But, when exporting The schema (Oracle), it does not work as expected. AnnotationConfiguration configuration = new AnnotationConfiguration(); configuration .addAnnotatedClass(Person.class) .setProperty(Environment.DIALECT, "org.hibernate.dialect.OracleDialect") .setProperty(Environment.DRIVER, "oracle.jdbc.driver.OracleDriver"); SchemaExport schema = new SchemaExport(configuration); schema.setOutputFile("schema.sql"); schema.create(true, false); schema.sql outputs create table Person (id number(10,0) not null) Always i get 10. Is There some workaround to get 8 instead of 10 ?

    Read the article

< Previous Page | 1 2 3 4 5 6  | Next Page >