Search Results

Search found 657 results on 27 pages for 'kyle sevenoaks'.

Page 18/27 | < Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >

  • How to loop through a boost::mpl::list?

    - by Kyle
    This is as far as I've gotten, #include <boost/mpl/list.hpp> #include <algorithm> namespace mpl = boost::mpl; class RunAround {}; class HopUpAndDown {}; class Sleep {}; template<typename Instructions> int doThis(); template<> int doThis<RunAround>() { /* run run run.. */ return 3; } template<> int doThis<HopUpAndDown>() { /* hop hop hop.. */ return 2; } template<> int doThis<Sleep>() { /* zzz.. */ return -2; } int main() { typedef mpl::list<RunAround, HopUpAndDown, Sleep> acts; // std::for_each(mpl::begin<acts>::type, mpl::end<acts>::type, doThis<????>); return 0; }; How do I complete this? (I don't know if I should be using std::for_each, just a guess based on another answer here)

    Read the article

  • Qt Linker Errors

    - by Kyle Rozendo
    Hi All, I've been trying to get Qt working (QCreator, QIde and now VS2008). I have sorted out a ton of issues already, but I am now faced with the following build errors, and frankly I'm out of ideas. Error 1 error LNK2019: unresolved external symbol "public: void __thiscall FileVisitor::processFileList(class QStringList)" (?processFileList@FileVisitor@@QAEXVQStringList@@@Z) referenced in function _main codevisitor-test.obj Question1 Error 2 error LNK2019: unresolved external symbol "public: void __thiscall FileVisitor::processEntry(class QString)" (?processEntry@FileVisitor@@QAEXVQString@@@Z) referenced in function _main codevisitor-test.obj Question1 Error 3 error LNK2019: unresolved external symbol "public: class QString __thiscall ArgumentList::getSwitchArg(class QString,class QString)" (?getSwitchArg@ArgumentList@@QAE?AVQString@@V2@0@Z) referenced in function _main codevisitor-test.obj Question1 Error 4 error LNK2019: unresolved external symbol "public: bool __thiscall ArgumentList::getSwitch(class QString)" (?getSwitch@ArgumentList@@QAE_NVQString@@@Z) referenced in function _main codevisitor-test.obj Question1 Error 5 error LNK2019: unresolved external symbol "public: void __thiscall ArgumentList::argsToStringlist(int,char * * const)" (?argsToStringlist@ArgumentList@@QAEXHQAPAD@Z) referenced in function "public: __thiscall ArgumentList::ArgumentList(int,char * * const)" (??0ArgumentList@@QAE@HQAPAD@Z) codevisitor-test.obj Question1 Error 6 error LNK2019: unresolved external symbol "public: __thiscall FileVisitor::FileVisitor(class QString,bool,bool)" (??0FileVisitor@@QAE@VQString@@_N1@Z) referenced in function "public: __thiscall CodeVisitor::CodeVisitor(class QString,bool)" (??0CodeVisitor@@QAE@VQString@@_N@Z) codevisitor-test.obj Question1 Error 7 error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall FileVisitor::metaObject(void)const " (?metaObject@FileVisitor@@UBEPBUQMetaObject@@XZ) codevisitor-test.obj Question1 Error 8 error LNK2001: unresolved external symbol "public: virtual void * __thiscall FileVisitor::qt_metacast(char const *)" (?qt_metacast@FileVisitor@@UAEPAXPBD@Z) codevisitor-test.obj Question1 Error 9 error LNK2001: unresolved external symbol "public: virtual int __thiscall FileVisitor::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall@FileVisitor@@UAEHW4Call@QMetaObject@@HPAPAX@Z) codevisitor-test.obj Question1 Error 10 error LNK2001: unresolved external symbol "protected: virtual bool __thiscall FileVisitor::skipDir(class QDir const &)" (?skipDir@FileVisitor@@MAE_NABVQDir@@@Z) codevisitor-test.obj Question1 Error 11 fatal error LNK1120: 10 unresolved externals ... \Visual Studio 2008\Projects\Assignment1\Question1\Question1\Debug\Question1.exe Question1 The code is as follows: #include "argumentlist.h" #include <codevisitor.h> #include <QDebug> void usage(QString appname) { qDebug() << appname << " Usage: \n" << "codevisitor [-r] [-d startdir] [-f filter] [file-list]\n" << "\t-r \tvisitor will recurse into subdirs\n" << "\t-d startdir\tspecifies starting directory\n" << "\t-f filter\tfilename filter to restrict visits\n" << "\toptional list of files to be visited"; } int main(int argc, char** argv) { ArgumentList al(argc, argv); QString appname = al.takeFirst(); /* app name is always first in the list. */ if (al.count() == 0) { usage(appname); exit(1); } bool recursive(al.getSwitch("-r")); QString startdir(al.getSwitchArg("-d")); QString filter(al.getSwitchArg("-f")); CodeVisitor cvis(filter, recursive); if (startdir != QString()) { cvis.processEntry(startdir); } else if (al.size()) { cvis.processFileList(al); } else return 1; qDebug() << "Files Processed: %d" << cvis.getNumFiles(); qDebug() << cvis.getResultString(); return 0; } Thanks in advance, I'm simply stumped.

    Read the article

  • MDB2, Pear, Mysql error

    - by Kyle Hudson
    Hi Guys, I have PEAR, MDB2 and Mysql Driver installed however I keep getting: Fatal error: Call to undefined function: MDB2_Driver_mysql::_isNewLinkSet(). in /home/**/PEAR/MDB2.php on line 1937. The Server is CentOS I am stuck, any help would be appriciated. Thanks :)

    Read the article

  • NSMutableURLRequest wont turn on 3G

    - by Kyle
    I won't bother posting any code because my code works fine when I launch Safari or something that turns on the 3G connection first. When I put it Airport mode, then put back OFF, I will get the behavior of a connection error saying No internet connection with NSMutableURLRequest. I've personally mailed apple about how the Ant gets turned on and off, and they said anything that uses their base CFSocketStream object will turn on the Ant, and I quote: "such as NSURLRequest".. BSD Sockets do not, just so everyone knows.. However, I assumed NSMutableURLRequest would fall into the category of 'Does', but it seems like it doesnt. It never succeeds for me when I cycle Airport or have the phone idle for a long time. It will ALWAYS succeed when I open any other network app first to turn the Ant on. Shall I be forced to do a dummy NSURLRequest call to turn this on; or has anyone been able to get this class working just fine? Remember this is just an implementation of NSMutableURLRequest to upload a file Async, and no other Network operations are performed anywhere; no ads, no version checks, no nothing.

    Read the article

  • An important question on iPhone file writing

    - by Kyle
    I use the NSHomeDirectory() function to get the app's home folder, and write to the Documents directory within that. I'm curious, though, what happens when the user downloads an update for the app in the appstore? Will it all be deleted? When I delete the app on the device, then reinstall it, its wiped out. So, I'm curious to know what will happen with an update. I can't find this in the documentation at all. Thanks alot for reading. I really tried to find this asked somewhere else first, but couldn't. Hopefully this page will be informative to guys like me who are confused on the subject.

    Read the article

  • Java Sound API: Capturing sound output from a Target Port

    - by Kyle Kampy
    I'm writing a simple piece of software that streams audio over LAN. I have all of the network parts implemented, but what I'm stumbling on is using the Java Sound API. I have successfully captured audio from the microphone, and line-in, but I can't seem to capture from any target ports, like the speakers. My question is, is it possible to capture from the Master target port? Here is the piece of code that works on initializing the line. private boolean startCapture(){ try{ DataLine.Info info = new DataLine.Info( TargetDataLine.class, format); line = (TargetDataLine)AudioSystem.getLine(info); audioBuffer = new byte[bufferSize]; line.open(format); line.start(); return true; }catch(Exception e){ System.out.println("Exception thrown when capturing audio:\n" + e); return false; } } Running the code like this will just use the microphone as my line. Here is info about my sound system. Most important is probably the fact that I'm running Linux. Thanks in advance for any and all help you can give me.

    Read the article

  • jScrollPane jEditable DOM problems

    - by Kyle Lafkoff
    Hello world, I am having a funky problem. See (this link won't disappear): www.skitzo.org/~el/bugjeditable.png for the firebug output screenshot. Here's my code. I run getJSON() to fetch the info from the PHP which pulls from DB and I fill a div with the result. I have jScrollPane and jEditable so a user can scroll down and click to edit any of the content. It works sometimes and then it doesn't work which makes me wonder if the browser is not interpreting the code properly or if I am misunderstanding fundamental DOM concepts here.... Here is a live current version of the code: http://www.musedates.com/testing.php $().ready(function() { $('#pane1').jScrollPane(); $('#tab_journal').tabs(); $('#tab2').load("/journal_new.php"); var i=0; var row = ''; var k, v, dt; $.getJSON("/ajax.php?j=22", function(data) { row = '<p>'; while(i<data.length) { $.each(data[i], function(k, v) { if (k == 'subject') { row += '<div style="font-size:1.5em; color:#000000;"><div class="editable" style="width:705px;" id="title-'+data[i].id+'">'+v+'</div></div>posted: '+dt+'<br />'; } else if (k == 'dt') { dt = v; } else if (k == 'msg') { row += '<div class="editableMsg" style="width:705px; height:40px;" id="msg-'+data[i].id+'">'+v+'</div></p>'; } }); i++; } $('#pane1').append(row).jScrollPane({scrollbarWidth:10, scrollbarMargin:10, showArrows:true}); }); $('.editable').livequery(function () { $('.editable').editable("/savejournal.php", { submitdata : function() { }, tooltip : 'Click to edit', indicator : '<img src="/UI/images/indicator.gif">', cancel : 'Cancel', submit : 'OK' }); $('.editableMsg').editable("/savejournal.php", { submitdata : function() { }, tooltip: 'Click to edit', indicator : '<img src="/UI/images/indicator.gif">', cancel : 'Cancel', submit : 'OK', type : 'textarea' }); $(".editable,.editableMsg").mouseover(function() { $(this).css('background-color', '#FDD017'); }); $(".editable,.editableMsg").mouseout(function() { $(this).css('background-color', '#fff'); }); }); }); And then the HTML: <div id="tab_container" style="margin:0px 0px 2px 8px;"> <ul id="tab_journal"> <li><a href="#tab1"><span>View / Edit</span></a></li> <li><a href="#tab2"><span>New Entry</span></a></li> </ul> </div> <div id="tab1" style="margin:0px 0px 0px 8px;"> <div id="pane1" class="scroll-pane super-wide"></div> </div> <div id="tab2" style="margin:0px 0px 0px 8px; width:700px;"></div> Thanks world.

    Read the article

  • PDO lastInsertId issues, php

    - by Kyle Hudson
    Hi Guys, I have tried lots of ways to get the last inserted ID with the code below (snipplet from larger class) and now I have given up. Does anyone know howto get PDO lastInsertId to work? Thanks in advance. $sql = "INSERT INTO auth (surname, forename, email, mobile, mobilepin, actlink, regdate) VALUES (:surname, :forename, :email, :mobile, :mobpin, :actlink, NOW())"; $stmt = $this->dbh->prepare($sql); if(!$stmt) { return "st"; } $stmt->bindParam(':surname', $this->surname); $stmt->bindParam(':forename', $this->forename); $stmt->bindParam(':email', $this->email); $stmt->bindParam(':mobile', $this->mobile); $stmt->bindParam(':mobpin', $this->mobilePin); $stmt->bindParam(':actlink', $this->actlink); $result = $stmt->execute(); //return var_dump($result); $arr = array(); $arr = $stmt->errorInfo(); $_SESSION['record'] = 'OK' . $dbh->lastInsertId(); $arr .= $_SESSION['record']; return $arr;

    Read the article

  • Firebug is throwing a ' $( ' error?

    - by Kyle
    I am getting a strange error in Firebug, that I am not getting in Webkit. The error comes up as ' $( ' in firebug. Here's the code that is supposedly causing it to flip: $.getScript("http://kylehotchkiss.com/min/?g=packageHome", function() { $(".countdown").countdown({ until: new Date(2010, 6 - 1, 5), layout:'{dn} {dl}' }); }); The error isn't specific to the countdown script, it's just giving me an error trying to call any plugin I just loaded in firefox. Any ideas?

    Read the article

  • How to use references, avoid header bloat, and delay initialization?

    - by Kyle
    I was browsing for an alternative to using so many shared_ptrs, and found an excellent reply in a comment section: Do you really need shared ownership? If you stop and think for a few minutes, I'm sure you can pinpoint one owner of the object, and a number of users of it, that will only ever use it during the owner's lifetime. So simply make it a local/member object of the owners, and pass references to those who need to use it. I would love to do this, but the problem becomes that the definition of the owning object now needs the owned object to be fully defined first. For example, say I have the following in FooManager.h: class Foo; class FooManager { shared_ptr<Foo> foo; shared_ptr<Foo> getFoo() { return foo; } }; Now, taking the advice above, FooManager.h becomes: #include "Foo.h" class FooManager { Foo foo; Foo& getFoo() { return foo; } }; I have two issues with this. First, FooManager.h is no longer lightweight. Every cpp file that includes it now needs to compile Foo.h as well. Second, I no longer get to choose when foo is initialized. It must be initialized simultaneously with FooManager. How do I get around these issues?

    Read the article

  • Broadcast-style Bluetooth using Sockets on the iPhone?

    - by Kyle
    Is there any way to open a broadcast bluetooth socket, take a listen and send replies? I want a proper peer to peer system where I broadcast and listen for broadcasts in an area. That way, variable clients can mingle. Is this possible? My theory is this: If GameKit can sit around wasting 25 seconds of the users time whilst having access to a broadcast socket, can't I? Or, must I be in kernel mode for such access? I'm not really sure where the proper bluetooth headers are as well. Thanks for reading!

    Read the article

  • Python Mindstorms RCX

    - by Kyle Schmidt
    I've got 30 unopened Lego Mindstorms kits that I'd love to use in my intro programming class to do some simple robotics stuff at the end of the year. We're using Python in the class, so I'd prefer there to be a way for the kids to write the programs in Python. Unfortunately, these are old kits with RCX bricks - not the newer NXT ones, so most of the projects like NXT_Python can't help me. Is there any way to make that happen?

    Read the article

  • Create new etherpad using PHP and CURL

    - by Kyle Mathews
    I'm trying to write a simple PHP script which automatically sets up new etherpads (see http://etherpad.com/). They don't have an API (yet) for creating new pads so I'm trying to figure if I can do things another way. After playing around some, I found that if you append a random string to etherpad.com to a not-yet-created pad, it'll come back with a form asking if you want to create a new etherpad at that address. If you submit that form, a new pad will be created at that URL. My thought then was I could just create a PHP script using CURL that would duplicate that form and trick etherpad into creating a new pad at whatever URL I give it. I wrote the script but so far I can't get it working. Can someone tell me what I'm doing wrong? First, here's the HTML form on the etherpad creation page: ` <p><tt id="padurl">http://etherpad.com/lsdjfsljfa-fdj-lsdf</tt></p> <br/> <p>There is no EtherPad document here. Would you like to create one?</p> <input type="hidden" value="lsdjfsljfa-fdj-lsdf" name="padId"/> <input type="submit" value="Create Pad" id="createPad"/> ` Then here's my code which tries to submit the form using CURL $ch = curl_init(); //set POST variables $url = "http://etherpad.com/ep/pad/create?padId=ldjfal-djfa-ldkfjal"; $fields = array( 'padId'=>urlencode("ldjfal-djfa-ldkfjal"), ); $useragent="Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)"; // set user agent curl_setopt($ch, CURLOPT_USERAGENT, $useragent); //url-ify the data for the POST foreach($fields as $key=>$value) { $fields_string .= $key.'='.$value; } print_r($fields_string); //open connection $ch = curl_init(); //set the url, number of POST vars, POST data curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_POST,count($fields)); curl_setopt($ch,CURLOPT_POSTFIELDS,$fields_string); //execute post $result = curl_exec($ch); print_r($result); //close connection curl_close($ch); When I run the script, PHP reports back that everything executed correctly but etherpad doesn't create my pad. Any clues what's going on?

    Read the article

  • Circular Shifts on Strings in Bash

    - by Kyle Van Koevering
    I have a homework assignment where I need to take input from a file and continuously remove the first word in a line and append it to the end of the line until all combinations have been done. I really don't know where to begin and would be thankful for any sort of direction. The part that has me confused is that this is suppose to be performed without the use of arrays. I'm not just fishing for someone to solve the problem for me, I'm just looking for some direction. Thank you very much for your time and help. SAMPlE INPUT: Pipes and Filters Java Swing Software Requirements Analysis SAMPLE OUTPUT: Analysis Software Requirements Filters Pipes and Java Swing Pipes and Filters Requirements Analysis Software Software Requirements Analysis Swing Java

    Read the article

  • Channel Audio from .mp4?

    - by Kyle
    Hi there. I am at a loss here after searching around with no results. I am attempting to channel the audio specifically from an .mp4 for use in a driver. I am aware that there are programs which extract the audio from .mp4's, but I am looking for another approach without using external applications such as those.. is there any direction that someone can point me towards to solve this problem? Thanks, -K

    Read the article

  • iPhone OpenGL and NSTimer issues

    - by Kyle
    I have an NSTimer that runs at 60hz. With an OpenGL scene loaded and rendering, my game can get 60fps, solid, all day long.. Then if I go and recompile the app, or reload it, it will get 40fps. Same resources loaded. I've been running into this problem for years, and I just want to know why. It's crazy, and I want to know if I should just abandon this stupid Timer. Conditions are not different on my 3GS between loads. It will just get 40fps sometimes. Obviously the clockrate is not different between loads, so the performance figures should be constant given a constant scene. Here is a log of my framerates: A good load: :-) FrameRate: 61 FrameRate: 61 FrameRate: 61 FrameRate: 60 FrameRate: 60 FrameRate: 61 FrameRate: 60 FrameRate: 60 FrameRate: 61 FrameRate: 60 FrameRate: 61 Now, I'll go ahead and do nothing, recompile, and run: FrameRate: 43 FrameRate: 50 FrameRate: 45 FrameRate: 48 FrameRate: 40 FrameRate: 45 FrameRate: 42 FrameRate: 41 FrameRate: 42 FrameRate: 44 FrameRate: 41 FrameRate: 46 ^- Massive difference visually. What the flying heck could cause this? SAME area of the scene, SAME camera setup. No variables are different.

    Read the article

  • Reading Resource Files from my own APK in Android Native Environment

    - by Kyle
    I'm porting to Android. My existing project has a ton of resource files that I'm porting into my Android project. I have them all in /res/raw/, and I would like to access those resources in my native library with functions such as fopen() and such. Can this be done, or do I have to go through JNI for this as well? I would really prefer not to, for ease of porting and possible speed and memory reasons.

    Read the article

  • Dynamically setting a log4net property using common.logging

    - by Kyle LeNeau
    Does anyone know if there is an equivalent in Common.Logging (for .Net) to set properties for the log4net factory adapter? I have had great success when just using log4net by doing: <appender name="FileAppender" type="log4net.Appender.RollingFileAppender"> <file type="log4net.Util.PatternString" value="logs\Log_%property{BrokerID}.txt"/> <appendToFile value="false"/> <rollingStyle value="Size"/> <maxSizeRollBackups value="-1"/> <maximumFileSize value="50GB"/> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date %-5level %logger - %message%newline"/> </layout> </appender> and setting the property like:log4net.GlobalContext.Properties["BrokerID"] = 10 The file I end up with the looks like this: Log_(null).txt when using the common.logging to wire up log4net on the fly.

    Read the article

  • Dealing with PHP server and MySQL server in different time zones

    - by Kyle Noland
    For those of us who use standard shared hosting packages, such as GoDaddy or Network Solutions, how do you handle datetime conversions when your hosting server (PHP) and MySQL server are in different time zones? Also, does anybody have some best practice advice for determining what time zone a visitor to your site is in and manipulating a datetime variable appropriately?

    Read the article

  • Entry lvl. COBOL Control Breaks

    - by Kyle Benzle
    I'm working in COBOL with a double control break to print a hospital record. The input is one record per line, with, hospital info first, then patient info. There are multiple records per hospital, and multiple services per patient. The idea is, using a double control break, to print one hospital name, then all the patients from that hospital. Then print the patient name just once for all services, like the below. I'm having trouble with my output, and am hoping someone can help me get it in order. I am using AccuCobol to compile experts-exchange does not allow .cob and .dat so the extentions were changed to .txt The files are: the .cob lab5b.cob the input / output: lab5bin.dat, lab5bout.dat The assignment: http://www.cse.ohio-state.edu/~sgomori/314/lab5.html Hospital Number: 001 Hospital Name: Mount Carmel 00001 Griese, Brian Ear Infection 08/24/1999 300.00 Diaper Rash 09/05/1999 25.00 Frontal Labotomy 09/25/1999 25,000.00 Rear Labotomy 09/26/1999 25,000.00 Central Labotomy 09/28/1999 24,999.99 The total amount owed for this patient is: $.......... (End of Hospital) The total amount owed for this hospital is: $......... enter code here IDENTIFICATION DIVISION. PROGRAM-ID. LAB5B. ENVIRONMENT DIVISION. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT FILE-IN ASSIGN TO 'lab5bin.dat' ORGANIZATION IS LINE SEQUENTIAL. SELECT FILE-OUT ASSIGN TO 'lab5bout.dat' ORGANIZATION IS LINE SEQUENTIAL. DATA DIVISION. FILE SECTION. FD FILE-IN. 01 HOSPITAL-RECORD-IN. 05 HOSPITAL-NUMBER-IN PIC 999. 05 HOSPITAL-NAME-IN PIC X(20). 05 PATIENT-NUMBER-IN PIC 99999. 05 PATIENT-NAME-IN PIC X(20). 05 SERVICE-IN PIC X(30). 05 DATE-IN PIC 9(8). 05 OWED-IN PIC 9(7)V99. FD FILE-OUT. 01 REPORT-REC-OUT PIC X(100). WORKING-STORAGE SECTION. 01 WS-WORK-AREAS. 05 WS-HOLD-HOSPITAL-NUM PIC 999 VALUE ZEROS. 05 WS-HOLD-PATIENT-NUM PIC 99999 VALUE ZEROS. 05 ARE-THERE-MORE-RECORDS PIC XXX VALUE 'YES'. 88 MORE-RECORDS VALUE 'YES'. 88 NO-MORE-RECORDS VALUE 'NO '. 05 FIRST-RECORD PIC XXX VALUE 'YES'. 05 WS-PATIENT-TOTAL PIC 9(9)V99 VALUE ZEROS. 05 WS-HOSPITAL-TOTAL PIC 9(9)V99 VALUE ZEROS. 05 WS-PAGE-CTR PIC 99 VALUE ZEROS. 01 WS-DATE. 05 WS-YR PIC 9999. 05 WS-MO PIC 99. 05 WS-DAY PIC 99. 01 HL-HEADING1. 05 PIC X(49) VALUE SPACES. 05 PIC X(14) VALUE 'OHIO INSURANCE'. 05 PIC X(7) VALUE SPACES. 05 HL-PAGE PIC Z9. 05 PIC X(14) VALUE SPACES. 05 HL-DATE. 10 HL-MO PIC 99. 10 PIC X VALUE '/'. 10 HL-DAY PIC 99. 10 PIC X VALUE '/'. 10 HL-YR PIC X VALUE '/'. 01 HL-HEADING2. 05 PIC XXXXXXXXXX VALUE 'HOSPITAL: '. 05 HL-HOSPITAL PIC 999. 01 HL-HEADING3. 05 PIC X(7) VALUE "Patient". 05 PIC X(3) VALUE SPACES. 05 PIC X(7) VALUE "Patient". 05 PIC X(39) VALUE SPACES. 05 PIC X(7) VALUE "Date of". 05 PIC X(3) VALUE SPACES. 05 PIC X(6) VALUE "Amount". 01 HL-HEADING4. 05 PIC X(6) VALUE "Number". 05 PIC X(4) VALUE SPACES. 05 PIC X(4) VALUE "Name". 05 PIC X(18) VALUE SPACES. 05 PIC X(10) VALUE "Service". 05 PIC X(14) VALUE SPACES. 05 PIC X(8) VALUE "Service". 05 PIC X(2) VALUE SPACES. 05 PIC X(5) VALUE "Owed". 01 DL-PATIENT-LINE. 05 PIC X(28) VALUE SPACES. 05 DL-PATIENT-NUMBER PIC XXXXX. 05 PIC X(21) VALUE SPACES. 05 DL-PATIENT-TOTAL PIC $$$,$$$,$$9.99. 01 DL-HOSPITAL-LINE. 05 PIC X(47) VALUE SPACES. 05 PIC X(16) VALUE 'HOSPITAL TOTAL: '. 05 DL-HOSPITAL-TOTAL PIC $$$,$$$,$$9.99. PROCEDURE DIVISION. 100-MAIN-MODULE. PERFORM 600-INITIALIZATION-RTN PERFORM UNTIL NO-MORE-RECORDS READ FILE-IN AT END MOVE 'NO ' TO ARE-THERE-MORE-RECORDS NOT AT END PERFORM 200-DETAIL-RTN END-READ END-PERFORM PERFORM 400-HOSPITAL-BREAK PERFORM 700-END-OF-JOB-RTN STOP RUN. 200-DETAIL-RTN. EVALUATE TRUE WHEN FIRST-RECORD = 'YES' MOVE PATIENT-NUMBER-IN TO WS-HOLD-PATIENT-NUM MOVE HOSPITAL-NUMBER-IN TO WS-HOLD-HOSPITAL-NUM PERFORM 500-HEADING-RTN MOVE 'NO ' TO FIRST-RECORD WHEN HOSPITAL-NUMBER-IN NOT = WS-HOLD-HOSPITAL-NUM PERFORM 400-HOSPITAL-BREAK WHEN PATIENT-NUMBER-IN NOT = WS-HOLD-PATIENT-NUM PERFORM 300-PATIENT-BREAK END-EVALUATE ADD OWED-IN TO WS-PATIENT-TOTAL. 300-PATIENT-BREAK. MOVE WS-PATIENT-TOTAL TO DL-PATIENT-TOTAL MOVE WS-HOLD-PATIENT-NUM TO DL-PATIENT-NUMBER WRITE REPORT-REC-OUT FROM DL-PATIENT-LINE AFTER ADVANCING 2 LINES ADD WS-PATIENT-TOTAL TO WS-HOSPITAL-TOTAL IF MORE-RECORDS MOVE ZEROS TO WS-PATIENT-TOTAL MOVE PATIENT-NUMBER-IN TO WS-HOLD-PATIENT-NUM END-IF. 400-HOSPITAL-BREAK. PERFORM 300-PATIENT-BREAK MOVE WS-HOSPITAL-TOTAL TO DL-HOSPITAL-TOTAL WRITE REPORT-REC-OUT FROM DL-HOSPITAL-LINE AFTER ADVANCING 2 LINES IF MORE-RECORDS MOVE ZEROS TO WS-HOSPITAL-TOTAL MOVE HOSPITAL-NUMBER-IN TO WS-HOLD-HOSPITAL-NUM PERFORM 500-HEADING-RTN END-IF. 500-HEADING-RTN. ADD 1 TO WS-PAGE-CTR MOVE WS-PAGE-CTR TO HL-PAGE MOVE WS-HOLD-HOSPITAL-NUM TO HL-HOSPITAL WRITE REPORT-REC-OUT FROM HL-HEADING1 AFTER ADVANCING PAGE WRITE REPORT-REC-OUT FROM HL-HEADING2 AFTER ADVANCING 2 LINES. WRITE REPORT-REC-OUT FROM HL-HEADING3 AFTER ADVANCING 2 LINES. 600-INITIALIZATION-RTN. OPEN INPUT FILE-IN OUTPUT FILE-OUT *159 ACCEPT WS-DATE FROM DATE YYYYMMDD MOVE WS-YR TO HL-YR MOVE WS-MO TO HL-MO MOVE WS-DAY TO HL-DAY. 700-END-OF-JOB-RTN. CLOSE FILE-IN FILE-OUT.

    Read the article

  • Practical non-Turing-complete languages?

    - by Kyle Cronin
    Nearly all programming languages used are Turing Complete, and while this affords the language to represent any computable algorithm, it also comes with its own set of problems. Seeing as all the algorithms I write are intended to halt, I would like to be able to represent them in a language that guarantees they will halt. Regular expressions used for matching strings and finite state machines are used when lexing, but I'm wondering if there's a more general, broadly language that's not Turing complete? edit: I should clarify, by 'general purpose' I don't necessarily want to be able to write all halting algorithms in the language (I don't think that such a language would exist) but I suspect that there are common threads in halting proofs that can be generalized to produce a language in which all algorithms are guaranteed to halt. There's also another way to tackle this problem - eliminate the need for theoretically infinite memory. Once you limit the amount of memory the machine is allowed, the number of states the machine is in is finite and countable, and therefore you can determine if the algorithm will halt (by not allowing the machine to move into a state it's been in before).

    Read the article

  • Talking to an Authentication Server

    - by Kyle Terry
    I'm building my startup and I'm thinking ahead for shared use of services. So far I want to allow people who have a user account on one app to be able to use the same user account on another app. This means I will have to build an authentication server. I would like some opinions on how to allow an app to talk to the authentication server. Should I use curl? Should I use Python's http libs? All the code will be in Python. All it's going to do is ask the authentication server if the person is allowed to use that app and the auth server will return a JSON user object. All authorization (roles and resources) will be app independent, so this app will not have to handle that. Sorry if this seems a bit newbish; this is the first time I have separated authentication from the actual application.

    Read the article

  • boost::bind breaks strict-aliasing rules?

    - by Kyle
    Using Boost 1.43 and GCC 4.4.3, the following code boost::bind(&SomeObject::memberFunc, this, _1)); Generates the following warning boost/function/function_base.hpp:321: warning: dereferencing type-punned pointer will break strict-aliasing rules What's the correct way to eliminate these warnings without setting -fno-strict-aliasing?

    Read the article

< Previous Page | 14 15 16 17 18 19 20 21 22 23 24 25  | Next Page >