Search Results

Search found 638 results on 26 pages for 'joel cunningham'.

Page 15/26 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • How do I call the methods in a model via controller? Zend Framework

    - by Joel
    Hi guys, I've been searching for tutorials to better understand this, but I'm having no luck. Please forgive the lengthy explination, but I want make sure I explain myself well. First, I'm quite new to the MVC structure, though I have been doing tutorials and learning as best I can. I have been moving over a live site into the Zend Framework model. So far, I have all the views within views/scripts/index/example.phtml. So therefore I'm using one IndexController and I have the code in each Action method for each page: IE public function exampleAction() Because I didn't know how to interact with a model, I put all the methods at the bottom of the controller (a fat controller). So basically, I had a working site by using a View and Controller and no model. ... Now I'm trying to learn how to incorporate the Model. So I created a View at: view/scripts/calendar/index.phtml I created a new Controller at: controller/CalendarControllers.php and a new model at: model/Calendar.php The problem is I think I'm not correctly communication with the model (I'm still new to OOP). Can you look over my controller and model and tell me if you see a problem. I'm needing to return an array from runCalendarScript(), but I'm not sure if I can return an array into the object like I'm trying to? I don't really understand how to "run" the runCalendarScript() from the controller? Thanks for any help! I'm stripping out most of the guts of the methods for the sake of brevity: controller: <?php class CalendarController extends Zend_Controller_Action { public function indexAction() { $finishedFeedArray = new Application_Model_Calendar(); $this->view->googleArray = $finishedFeedArray; } } model: <?php class Application_Model_Calendar { public function _runCalendarScript(){ $gcal = $this->_validateCalendarConnection(); $uncleanedFeedArray = $this->_getCalendarFeed($gcal); $finishedFeedArray = $this->_cleanFeed($uncleanedFeedArray); return $finishedFeedArray; } //Validate Google Calendar connection public function _validateCalendarConnection() { ... return $gcal; } //extracts googles calendar object into the $feed object public function _getCalendarFeed($gcal) { ... return $feed; } //cleans the feed to just text, etc protected function _cleanFeed($uncleanedFeedArray) { $contentText = $this->_cleanupText($event); $eventData = $this->_filterEventDetails($contentText); return $cleanedArray; } //Cleans up all formatting of text from Calendar feed public function _cleanupText($event) { ... return $contentText; } //filterEventDetails protected function _filterEventDetails($contentText) { ... return $data; } }

    Read the article

  • How can I lookup data about a book from its barcode number?

    - by Joel Spolsky
    I'm building the world's simplest library application. All I want to be able to do is scan in a book's UPC (barcode) using a typical scanner (which just types the numbers of the barcode into a field) and then use it to look up data about the book... at a minimum, title, author, year published, and either the Dewey Decimal or Library of Congress catalog number. The goal is to print out a tiny sticker ("spine label") with the card catalog number that I can stick on the spine of the book, and then I can sort the books by card catalog number on the shelves in our company library. That way books on similar subjects will tend to be near each other, for example, if you know you're looking for a book about accounting, all you have to do is find SOME book about accounting and you'll see the other half dozen that we have right next to it which makes it convenient to browse the library. There seem to be lots of web APIs to do this, including Amazon and the Library of Congress. But those are all extremely confusing to me. What I really just want is a single higher level function that takes a UPC barcode number and returns some basic data about the book.

    Read the article

  • need help understanding moving up using relative path...

    - by Joel
    I'm not sure why this isn't working, so I must not be understanding things correctly. I'm putting a working live site onto my localhost for dev work. so my site can be seen at the url: example.com or at: localhost/example.com OK. I Have a page at example.com/video/pageone.php On that page, I'm linking to a header by navigating to: <?php include '/home/myserver/public_html/includes/website/website-header.php'; ?> For some reason, This will not work (on the live site): <?php include 'http://www.example.com/includes/website/website-header.php'; ?> Can anyone tell me why 1) The above http address will not work, and 2) how can I make this work in localhost? Thanks!

    Read the article

  • how to integrate Zend Framework MVC with existing site

    - by Joel
    Hi guys, So I'm slowly tackling OO and Zend Framework and their MVC process in particular. I have an existing website and web-based calendar application that was designed by me, but coded by a different person and done procedurally. I understand that it will be very difficult for my application to ever be completely OO without a full re-write, and I'm fine with that. I have a lot of updates and modifications I want to do in the future, so I'm wanting to start replacing some of the basic components (login, authentication. etc) now, and continue to learn as I go. Again, I'm really a newbie at programming and OO. What I'm wondering is if I'm wanting to incorporate the Framework, then would I just first drop my whole site into the /public folder of the Framework and then start pulling functionality out from there?

    Read the article

  • What constitutes a development environment, and how do you document it?

    - by Joel Coehoorn
    What items go into a software shop's development environment, how do you document it, and what processes do you follow to make changes? I thinking about this from the standpoint where I want to make it easier to bring new hires up to speed quickly by having all this on a checklist we follow when setting them up, and then while I'm at it making it easier for the new hires or existing team members to bring new powerful toolkits and ideas into the environment without disrupting things. I want to keep this platform agnostic, so even though I'm currently at a microsoft shop where Visual Studio would be assumed I'll go ahead and list compiler/IDE as one of the items: Here are some ideas for part 1: [edit]: I'm keeping this updated based on the better suggestions. Source Control access Issue/Bug/Project tracker System Documention, or references to find the system documentation in source control or in a wiki, including: build document/environment covered by this question design documents / technical notes Coding Style guidelines Deploy for review/testing/QA/staging/production procedures Licensing details for your tools and your product Team Calendar, including the project schedule(s), deadlines, vacation time, and support/on-call schedule (if required) compiler/IDE compiler/IDE extensions (things like source control plugins or visual studio add-ins) 3rd party SDKs/toolkits Database connection and tools Testing Frameworks Internal libraries communication tools (chat, wiki, etc) Static analysis tools (FxCop, FlawFinder, etc) Virtual machines (holding dev environment or for testing) Specialized editors (modeling, xml, etc) Other tools What else goes in this list, and how do you document it and vet changes?

    Read the article

  • What do you read?

    - by sixtyfootersdude
    I have almost finished reading all the articles on Joel on software. I am a new developer and hoping to get something interesting to read. Here is what is currently on my list: Java Concurrency in Practice by Brian Goetz sed & awk by Dougherty & Robbins (O'Reilly) The Pragmatic Programmer by Andrew Hunt and David Thomas Head First Design Patterns Can anyone suggest anything else? Would especially like something similar to Joel. Something that is a bit edgy but informative. Pragmatic programmer has some key concepts but is a bit dry.

    Read the article

  • swap jquery backgroundColor for background image?

    - by Joel
    A friend gave me a solution that uses this jquery code: .css({ backgroundColor: '#ddd' }) Instead, i'd like to use a background image. How do I change the jquery code to do that? I'm wanting to do something like .css({ backgroundImg: 'images/newsletter-dropdown.jpg' }) Thanks!

    Read the article

  • Is it common practice to put keywords in html markup for SEO?

    - by Joel
    Though it's on the edge of programming questions, I think this is still relevant here, as only those of us actually doing the coding for a site would be considering this. I've been reading more about keyword placement, and it seems to me like a good place to do keyword placement would be in the class and id names chosen for the elements they are representing. I'm not talking about any kind of black-hat keyword stuffing thing but real legitimate use of descriptive keywords for elements. Is this something that is actively done for SEO?

    Read the article

  • Tapestry5 : No service implements the interface org.springframework.context.ApplicationContext

    - by Joel
    I'm using the Tapestry5 tapx template library to send an html email, as per this example. When I run the example I get the following error: Caused by: java.lang.RuntimeException: No service implements the interface org.springframework.context.ApplicationContext. at org.apache.tapestry5.ioc.internal.RegistryImpl.getService(RegistryImpl.java:560) at org.apache.tapestry5.ioc.internal.ObjectLocatorImpl.getService(ObjectLocatorImpl.java:44) All the tapestry-* jars, including tapestry-spring-5.1.05.jar are in my classpath. Any clues as to what I'm missing?

    Read the article

  • Drupal view filter to show only one of a certain item

    - by Joel
    I'm fairly new to Drupal, and am using Node Import to take a TSV file and turn it into nodes. I'm hitting a problem, though, with automating updates to the nodes. Again, I'd like to take a Tab Separated Values text file, and load it into my site via Node Import (or whatever else anyone might suggest) and then only show updated Nodes. Here's a specific example: I have a Node with the following info: StoreId Name Address Phone Contact 01 Name1 Address1 Phone1 Contact1 02 Name2 Address2 Phone2 Contact2 etc. The info pulls into the nodes just fine (Thank you Node Import!), but we also want to process updates to the nodes. So far I have two ideas... figure out how to delete duplicate (previous) instances of the same StoreID, or just save the node with the duplicate StoreID (and new other info) and just display the most current version. In Views, I can get it to show the nodes and everything, but I can't figure out how to only display the most recent version of each StoreID. A view of views would work, but I can't seem to get that to work, either. Any ideas or other approaches I could take? Thanks in advance for the help!

    Read the article

  • .net, C# Interface between Business Logic and DAL

    - by Joel
    I'm working on a small application from scratch and using it to try to teach myself architecture and design concepts. It's a .NET 3.5, WPF application, and I'm using Sql Compact Edition as my data store. I'm working on the business logic layer, and have just now begun to write the DAL. I'm just using SqlCeComamnds to send over simple queries and SqlCeResultSet to get at the results. I'm starting to design my Insert and Update methods, and here's the issue - I don't know the best way to get the necessary data from the BLL into the DAL. Do I pass in a generic collection? Do I have a massive parameter list with all the data for the database? Do I simply pass in the actual business object (thus tying my DAL to the conrete stuff in the BLL?). I thought about using interfaces - simply passing IBusinessObjectA into the DAL, which provides the simplicity I'm looking for without tying me TOO tightly to current implementations. What do you guys think?

    Read the article

  • How do I write escape characters verbatim (without escaping) using StreamWriter?

    - by Joel
    I'm writing a utility that takes in a .resx file and creates a javascript object containing properties for all the name/value pairs in the .resx file. This is all well and good, until one of the values in the .resx is This dealer accepts electronic orders. /r/nClick to order {0} from this dealer. I'm adding the name/value pairs to the js object like this: streamWriter.Write(string.Format("\n{0} : \"{1}\"", kvp.Key, kvp.Value)); When kvp.Value = "This dealer accepts electronic orders./r/nClick to order {0} from this dealer." This causes StreamWriter.Write() to actually place a newline in between 'orders.' and 'Click', which naturally screws up my javascript output. I've tried different things with @ and without using string.Format, but I've had no luck. Any suggestions? Edit: This application is run during build to get some javascript files deployed later, so at no point is it accessible to / run by anyone but the app developers. So while I obviously need a way to escape characters here, XSS as such is not really a concern.

    Read the article

  • Zend Framework-where should this root.php file go for MVC?

    - by Joel
    Hi guys, I'm converting over a web-app to use the MVC structure of Zend Framework. I have a root.php include file that contains most of the database info, and some static variables that are used in the program. I'm not sure if some of this should be in the application.ini of in a model that is called by the init() function in a controller, or in the bootstrap or what? Any help would be much appreciated! root.php (include file at the top of every php page): <?php /*** //Configuration file */ ## Site Configuration starts ## define("SITE_ROOT" , dirname(__FILE__)); define("SITE_URL" , "http://localhost/monkeycalendarapp/monkeycalendarapp/public"); define('DB_HOST', "localhost"); define('DB_USER', "root"); define('DB_PASS', "xxx"); define('DB_NAME', "xxxxx"); define("PROJECT_NAME" , "Monkey Mind Manager (beta 2.2)"); //site title define("CALENDAR_WIDTH" , "300"); //left mini calendar width define("CALENDAR_HEIGHT" , "150"); //left mini calendar height $page_title = 'Event List'; $stylesheet_name = 'style.css'; //default stylesheet define("SITE_URL_AJAX" , SITE_URL . "/ajax-tooltip"); define("JQUERY" , SITE_URL . "/jquery-ui-1.7.2"); $a_times = array("12:00","12:30","01:00","01:30","02:00","02:30","03:00","03:30","04:00","04:30","05:00","05:30","06:00","06:30","07:00","07:30","08:00","08:30","09:00","09:30","10:00","10:30","11:00","11:30"); //PTLType Promotional timeline type $a_ptlType= array(1=>"Gigs","To-Do","Completed"); $a_days = array("Su","Mo","Tu","We","Th","Fr","Sa"); $a_timesMerd = array("12:00am","12:30am","01:00am","01:30am","02:00am","02:30am","03:00am","03:30am","04:00am","04:30am","05:00am","05:30am","06:00am","06:30am","07:00am","07:30am","08:00am","08:30am","09:00am","09:30am","10:00am","10:30am","11:00am","11:30am","12:00pm","12:30pm","01:00pm","01:30pm","02:00pm","02:30pm","03:00pm","03:30pm","04:00pm","04:30pm","05:00pm","05:30pm","06:00pm","06:30pm","07:00pm","07:30pm","08:00pm","08:30pm","09:00pm","09:30pm","10:00pm","10:30pm","11:00pm","11:30pm"); //Setting stylesheet for this user. $AMPM=array("am"=>"am","pm"=>"pm"); include(SITE_ROOT . "/includes/functions/general.php"); include(SITE_ROOT . "/includes/db.php"); session_start(); if(isset($_SESSION['userData']['UserID'])) { $s_userID = $_SESSION['userData']['UserID']; } $stylesheet_name = stylesheet(); ini_set('date.timezone', 'GMT'); date_default_timezone_set('GMT'); if($s_userID) { ini_set('date.timezone', $_SESSION['userData']['timezone']); date_default_timezone_set($_SESSION['userData']['timezone']); } ?>

    Read the article

  • Finding patterns in Puzzle games.

    - by José Joel.
    I was wondering, which are the most commonly used algorithms applied to finding patterns in puzzle games conformed by grids of cells. I know that depends of many factors, like the kind of patterns You want to detect, or the rules of the game...but I wanted to know which are the most commonly used algorithms in that kind of problems... For example, games like columns, bejeweled, even tetris. I also want to know if detecting patterns by "brute force" ( like , scanning all the grid trying to find three adyacent cells of the same color ) is significantly worst that using particular algorithms in very small grids, like 4 X 4 for example ( and again, I know that depends of the kind of game and rules ...) Which structures are commonly used in this kind of games ?

    Read the article

  • What are the performance characteristics of SignalR at scale?

    - by Joel Martinez
    I'm interested in the performance characteristics of SignalR at scale ... particularly, how it behaves at the fringes of capability. When a server is at capacity, what happens? Does it drop messages? Do some clients not get notified? Are messages queued until all are delivered? And if so, will the queue eventually overflow and crash the server? I ask because conducting such a test myself would be impractical, and I'm hoping someone could point me to documentation speaking to this ... or perhaps someone could comment that has seen how SignalR behaves at scale. Thanks! note: I'm familiar with this other stackoverflow question on the stability and scalability of SignalR. But I believe my question is asking a slightly different question in that I'm not concerned with the theoretical scaling limits, I want to know how it behaves when it reaches the limits ... so I know what to be on the lookout for.

    Read the article

  • Is it possible to reference a file stored in Isolated Storage by its URI?

    - by Joel
    Using this previous question as motivation, I would like to temporarily store images and videos in Isolated Storage. My application (written in WPF/C#) will allow a user to review these temporarily stored items by viewing their contents in a MediaElement. I was hoping to set the MediaElement's Source Property to a video or image's URI stored in IsolatedStorage but I cannot figure out how to dynamically create a URI since it doesn't appear to be naively supported by IsolatedStorage. Any help would be greatly appreciated - thank you in advance! Update - 1/21/09 After battling the issue for a day, I concluded that the Isolated Storage approach is not practical for storing large video files that need to be referenced by a Uri.

    Read the article

  • Tracking/Counting Word Frequency

    - by Joel Martinez
    I'd like to get some community consensus on a good design to be able to store and query word frequency counts. I'm building an application in which I have to parse text inputs and store how many times a word has appeared (over time). So given the following inputs: "To Kill a Mocking Bird" "Mocking a piano player" Would store the following values: Word Count ------------- To 1 Kill 1 A 2 Mocking 2 Bird 1 Piano 1 Player 1 And later be able to quickly query for the count value of a given arbitrary word. My current plan is to simply store the words and counts in a database, and rely on caching word count values ... But I suspect that I won't get enough cache hits to make this a viable solution long term. Can anyone suggest algorithms, or data structures, or any other idea that might make this a well-performing solution?

    Read the article

  • Can I set a style for the content of an iframe from the main page?

    - by Joel Coehoorn
    We have a page the embeds a Google Calendar in an iframe. Recently, a warning box div began appearing on the calendar that looks like this: <div id="warningBox" style="color:#aa0000;">Events from one or more calendars could not be shown here because you do not have the permission to view them.</div> Obviously the best solution here is to find the private events and remove them, but so far the search for those events has proved fruitless. This calendar is an aggregate of several calendars, including a few we don't control (ie weather). We're still looking, but in the meantime, I would like to try to hide that div. I know that iframes enforce the separation between the pages, such that the child page is pretty much a law unto itself. But surely there must be some way to set a style on an element inside the frame?

    Read the article

  • Processing XML comments in order using SAX & Cyberneko

    - by Joel
    I'm using cyberneko to clean and process html documents. I need to be able to process all the comments that occur in the original html documents. I've configured the cyberneko sax parser to process comments like so: parser.setProperty("http://xml.org/sax/properties/lexical-handler", consumer); ...using the same consumer as I am for DOM events. I get a callback for each of the comments: @Override public void comment(char[] arg0, int arg1, int arg2) throws SAXException { System.out.println("COMMENT::: "+new String(arg0, arg1, arg2)); } The problem I have is that all the comments are processed first, out of context of the DOM. i.e. I get a callback for all the comments before the document head, body etc.... What I'd like is for the comment callbacks to occur in the order they occur in the DOM. Edit: what I'm actually trying to do is parse the instructions for IE in the original html, such as: <!--[if lte IE 6]><body class="news ie"><![endif]--> At the moment they are all dropped, I need to include them in the cleaned HTML document.

    Read the article

  • how to make sub-muens line up below their parents in horizontal navbars?

    - by Joel
    Hi folks. I'm just putting together a simple nav bar using something similar to this tutorial: http://www.cssnewbie.com/horizontal-dropdown-menus/ The thing is, that I'd like to have the children lists first item to line up directly below the parent. Right now, they just go wherever I float them. Is there a way to do this without absolute positioning? I'd like to achieve something similar to what these guys have in their top nav bar: http://michaelfranti.com/

    Read the article

  • How do you handle options that can't be used together with OptionParser?

    - by Joel
    My Python script (for todo lists) is started from the command line like this: todo [options] <command> [command-options] Some options can not be used together, for example todo add --pos=3 --end "Ask Stackoverflow" would specify both the third position and the end of the list. Likewise todo list --brief --informative would confuse my program about being brief or informative. Since I want to have quite a powerful option control, cases like these will be a bunch, and new ones will surely arise in the future. If a users passes a bad combination of options, I want to give an informative message, preferably along with the usage help provided by optparse. Currently I handle this with an if-else statement that I find really ugly and poor. My dream is to have something like this in my code: parser.set_not_allowed(combination=["--pos", "--end"], message="--pos and --end can not be used together") and the OptionParser would use this when parsing the options. Since this doesn't exist as far as I know, I ask the SO community: How do you handle this?

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >