Search Results

Search found 2474 results on 99 pages for 'patrick scott'.

Page 46/99 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • Call to a member function num_rows() on a non-object

    - by Patrick
    I need to get the number of rows of a query (so I can paginate results). As I'm learning codeigniter (and OO php) I wanted to try and chain a -num_rows() to the query, but it doesn't work: //this works: $data['count'] = count($this->events->findEvents($data['date'], $data['keyword'])); //the following doesn't work and generates // Fatal Error: Call to a member function num_rows() on a non-object $data['count2'] = $this->events->findEvents($data['date'], $data['keyword'])->num_rows(); the model returns an array of objects, and I think this is the reason why I can't use a method on it. function findEvents($date, $keyword, $limit = NULL, $offset = NULL) { $data = array(); $this->db->select('events.*, venues.*, events.venue AS venue_id'); $this->db->join('venues', 'events.venue = venues.id'); if ($date) { $this->db->where('date', $date); } if ($keyword) { $this->db->like('events.description', $keyword); $this->db->or_like('venues.description', $keyword); $this->db->or_like('band', $keyword); $this->db->or_like('venues.venue', $keyword); $this->db->or_like('genre', $keyword); } $this->db->order_by('date', 'DESC'); $this->db->order_by('events.priority', 'DESC'); $this->db->limit($limit, $offset); //for pagination purposes $Q = $this->db->get('events'); if ($Q->num_rows() > 0) { foreach ($Q->result() as $row) { $data[] = $row; } } $Q->free_result(); return $data; } Is there anything that i can do to be able to use it? EG, instead of $data[] = $row; I should use another (OO) syntax?

    Read the article

  • pluto or jetspeed on google app engine?

    - by Patrick Cornelissen
    I am trying to build something "portlet server"-ish on the google app engine. (as open source) I'd like to use the JSR168/286 standards, but I think that the restrictions of the app engine will make it somewhere between tricky and impossible. Has anyone tried to run jetspeed or an application that uses pluto internally on the google app engine? Based on my current knowledge of portlets and the google app engine I'm anticipating these problems: A war file with portlets is from the deployment standpoint more or less a complete webapp (yes, I know that it doesn't really work without a portal server). The war file may contain it's own web.xml etc. This makes deployment on the app engine rather difficult, because the apps are not visible to each other, so all portlet containing archives need to be included in the war file of the deployed "app engine based portal server". The "portlets" are (at least in liferay) started as permanent servlet processes, based on their portlet.xmls and web.xmls which is located in the same spot for every portlet archive that is loaded. I think this may be problematic in the app engine, because everything is in one big "web app", so it may be tricky to access the portlet.xmls from each archive. This prevents a 100% compatibility in my opinion. Is here anyone who has any experience with the combination of portlets and the app engine? Do you think it's feasible to modify jetspeed, pluto or any other portlet container to be able to run it on the app engine?

    Read the article

  • MongoDB RSS Feed Entries, Embed the Entries in the Feed Object?

    - by Patrick Klingemann
    I am saving a reference to an RSS Feed in MongoDB, each Feed has an ever growing list of Entries. As I'm designing my schema, I'm concerned about this statement from the MongoDB Schema Design - Embed vs. Reference Documentation: If the amount of data to embed is huge (many megabytes), you may read the limit on size of a single object. This will surely happen if I understand the statement correctly. So the question is, I am correct to assume that I should not embed the Feed Entries within a Feed because I'll eventually reach the limit on size of a single object?

    Read the article

  • How do I open a web browser from a .NET Program? Process.Start() isn't working?

    - by Scott Whitlock
    I have a URL and I want to launch it in the default browser. I've tried two methods: Process.Start("http://stackoverflow.com"); ... and the one detailed in this other question using ShellExecute. In both cases I get the error: Windows cannot find 'http://stackoverflow.com'. Make sure you typed the name correctly, and then try again. It shouldn't be trying to open it as a file though... from what I understand, it should recognize it as a URL and open it in the default browser. What am I missing? By the way: OS = Vista, and .NET = 3.5 EDIT: According to this MS KB article, since Process.Start sets the UseShellExecute by default, it should launch the default browser.

    Read the article

  • LAMP stack on home computer as a public web server

    - by Scott
    So I'm using this website: http://www.howtoforge.com/ubuntu_debian_lamp_server to setup LAMP on my Ubuntu Virtual Machine. Here is my question though, This will enable me to program and test through localhost. How can I set this up so anyone on the web can access my .php pages from any Internet capable device, and they will still interact with my local database, etc?

    Read the article

  • Using arrays with other arrays in Python.

    - by Scott
    Trying to find an efficient way to extract all instances of items in an array out of another. For example array1 = ["abc", "def", "ghi", "jkl"] array2 = ["abc", "ghi", "456", "789"] Array 1 is an array of items that need to be extracted out of array 2. Thus, array 2 should be modified to ["456", "789"] I know how to do this, but no in an efficient manner.

    Read the article

  • How can I set up an editor to work with Git on Windows?

    - by Patrick McElhaney
    I'm trying out Git on Windows. I got to the point of trying "git commit" and I got this error: Terminal is dumb but no VISUAL nor EDITOR defined. Please supply the message using either -m or -F option. So I figured out I need to have an environment variable called EDITOR. No problem. I set it to point to Notepad. That worked, almost. The default commit message opens in Notepad. But Notepad doesn't support bare line feeds. I went out and got Notepad++. But I can't figure out how to get Notepad++ set up as the %EDITOR% in such a way that it works with Git as expected. I'm not married to Notepad++. At this point I couldn't care less what editor I use. I just want to be able to type my commit messages without using -m. So, for those of you using Git on Windows: What (free) tool do you use to edit your commit message, and what do you get when you type echo %EDITOR% at the command prompt?

    Read the article

  • Back Orders for ERP: data model references ?

    - by Patrick Honorez
    I have built an ERP using Sql Server as a back-end. These are the different types of Client documents (there are also Supplier Docs): Order -- impact: BO Delivery Note (also used for returns, with negative quantity) --impact: BO, Stock Invoice --impact: accounting only Credit Note --impact: accounting, BO I use a complex system of self joins (at detail level) to find out the quantities in each OrderDetail that still have a backorder (BO). It'd like to simplify this using a [group] field that could be used through all detail line related to an original order. There are many difficult things to trace: a Return of a product may be due to a defect and thus increase the BO, or it can be just a return, joined with a Credit Note, and then has no impact on BO. My question is: do you know of any real good reference (book, web) for this matter ?

    Read the article

  • Javascript onclick stops working, multiple dynamically created divs.

    - by Patrick
    I have run into a strange problem, i am creating a lot of dynamically divs. And i recently found out that some of my divs doesn't fire the onclick event? All the divs are created using the same template, so why are some not working? Most of the time, its the 4-5 from the bottom. If you click on one of the others and then try again, you might get one of those to trigger. But only sporadically. Code to create the divs: GameField.prototype.InitField = function(fieldNumber) { var newField = document.createElement("div"); if (fieldNumber == 0 || fieldNumber == 6 || fieldNumber == 8 || fieldNumber == 17) newField.className = 'gameCellSmall borderFull gameText gameTextAlign'; else newField.className = 'gameCellSmall borderWithoutTop gameText gameTextAlign'; var instance = this; if (fieldNumber == 6 || fieldNumber == 7 || fieldNumber == 17) { } else newField.onclick = function() { instance.DivClick(fieldNumber); return false; } this.fields[fieldNumber] = newField; this.score[fieldNumber] = 0; return newField; } I added the return false to the click function, but it still behaves strangely. Why are some not triggering? I create around 18 divs / player. But it happens even if i just create one player. Do i perhaps need to cancel the event once i am done with it? (Like the return false; is trying to do)

    Read the article

  • Closing a Dialog Box, Opening a New One and it is Grayed out (Colorbox)

    - by Scott Faisal
    $.fn.colorbox({width:"40%", inline:true,href:"#somediv", opacity:"0.50",transition:"none", height:"490px"}); On #somediv above I have a button that once clicked executes the following code: line#45 $.fn.colorbox({href:"http://www.facebook.com", width:"65%",height:"80%",iframe:true}); I see facebook.com however the overlay is grayed out. I even tried using the following code instead of line#45 : $(document).one('cbox_closed', function(){ setTimeout(function(){ $.fn.colorbox({href:"http://www.facebook.com", width:"65%",height:"80%", iframe:true});},2); }); Now all I see is a blank overlay. Any suggestion guys?

    Read the article

  • using compareTo in Binary Search Tree program

    - by Scott Rogener
    I've been working on this program for a few days now and I've implemented a few of the primary methods in my BinarySearchTree class such as insert and delete. Insert seemed to be working fine, but once I try to delete I kept getting errors. So after playing around with the code I wanted to test my compareTo methods. I created two new nodes and tried to compare them and I get this error: Exception in thread "main" java.lang.ClassCastException: TreeNode cannot be cast to java.lang.Integer at java.lang.Integer.compareTo(Unknown Source) at TreeNode.compareTo(TreeNode.java:16) at BinarySearchTree.myComparision(BinarySearchTree.java:177) at main.main(main.java:14) Here is my class for creating the nodes: public class TreeNode<T> implements Comparable { protected TreeNode<T> left, right; protected Object element; public TreeNode(Object obj) { element=obj; left=null; right=null; } public int compareTo(Object node) { return ((Comparable) this.element).compareTo(node); } } Am I doing the compareTo method all wrong? I would like to create trees that can handle integers and strings (seperatly of course)

    Read the article

  • how to compare between Doctrine & Propel in symfony

    - by Patrick
    I am in the early stages of rearchitecting my company's application. The app is currently running on symfony 1.2, and I used the default ORM at the time, Propel. Symfony has since updated to 1.4 and switched default ORM to Doctrine. From my understanding, each ORM excels at particular types of database structures. Is this true or is one far and away better than the other? Are there any good methods to test which ORM would be best in my situation in a test environment using my schema (i.e.- set up dual, identical sites and run tests)?

    Read the article

  • Drupal, FUpload images module introduce bugs

    - by Patrick
    hi, I'm using FUpload module to upload multiple images together from my CCK Image field. It perfectly works, however if I use it when I'm creating a new node, the other CCK Image fields stop to work and the images (from these fields) are not stored at all. The error I get is "path doesn't exist"... It sounds like fUpload force the other CCK fields to store the content before the node is saved and the folders are created. (I'm using path auto, to create folders accordingly to node title). Could you give me some tips ? Thanks

    Read the article

  • Forcing a checkbox bound to a DataSource to update when it has not been viewed yet.

    - by Scott Chamberlain
    Here is a test framework to show what I am doing: create a new project add a tabbed control on tab 1 put a button on tab 2 put a check box paste this code for its code (use default names for controls) public partial class Form1 : Form { private List<bool> boolList = new List<bool>(); BindingSource bs = new BindingSource(); public Form1() { InitializeComponent(); boolList.Add(false); bs.DataSource = boolList; checkBox1.DataBindings.Add("Checked", bs, ""); this.button1.Click += new System.EventHandler(this.button1_Click); this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); } bool updating = false; private void button1_Click(object sender, EventArgs e) { updating = true; boolList[0] = true; bs.ResetBindings(false); Application.DoEvents(); updating = false; } private void checkBox1_CheckedChanged(object sender, EventArgs e) { if (!updating) MessageBox.Show("CheckChanged fired outside of updating"); } } The issue is if you run the program and look at tab 2 then press the button on tab 1 the program works as expected, however if you press the button on tab 1 then look at tab 2 the event for the checkbox will not fire untill you look at tab 2. The reason for this is the controll on tab 2 is not in the "created" state, so its binding to change the checkbox from unchecked to checked does not happen until after the control has been "Created". checkbox1.CreateControl() does not do anything because according to MSDN CreateControl does not create a control handle if the control's Visible property is false. You can either call the CreateHandle method or access the Handle property to create the control's handle regardless of the control's visibility, but in this case, no window handles are created for the control's children. I tried getting the value of Handle(there is no public CreateHandle() for CheckBox) but still the same result. Any suggestions other than have the program quickly flash all of my tabs that have data-bound check boxes when it first loads? EDIT-- per Jaxidian's suggestion I created a new class public class newcheckbox : CheckBox { public new void CreateHandle() { base.CreateHandle(); } } I call CreateHandle() right after updating = true same results as before.

    Read the article

  • C program help......

    - by scott
    void main () { int c; signal (SIGINT, Handle); while (( c = getchar()) != '\n' ); return(); } void Handle(signum) { signal {SIGINT, Handle); printf ("beep \n"); } I thought it would print 'beep' until any key has been pressed but the method call is outside the loop? :S

    Read the article

  • Restore Emacs Session/Desktop

    - by Patrick McLaren
    I've been searching for how to restore an emacs session, with no luck. I'm looking to restore all previously open buffers, some of which might contain erc, shells, directory listings, files, etc. Every time I open emacs, I spend a considerable amount of time arranging my buffers; splitting them into rows and columns, opening a shell, arranging irc channels. It takes a while to get onto work. I've tried adding the following to my init.el (desktop-save-mode 1) And then using M-x desktop-save. This only seems to restore files that are open, not shells or anything else running within buffers. I've also checked the following questions (sorry, not able to post links yet): Session management in emacs using Desktop library Emacs session / projects / window management Emacs: reopen buffers from last session on startup? And read through: DeskTop and EmacsSession at emacswiki.org/emacs/SessionManagement Here's a screenshot example of my emacs session. A simple answer would be to just focus on real work :P

    Read the article

  • Ruby open_id_authentication with Google OpenID

    - by Patrick Daryll Glandien
    I am in my first steps of implementing OpenID in my Rails app. open_id_authentication appeared to be a fairly easy-to-use plugin, which is why I decided to use it. Logging in with my Google account seems to work perfectly, however I do not get the sreg/AX fields that I require. My code is currently as follows: class SessionsController < ApplicationController def new; end def create open_id_authentication end protected def open_id_authentication authenticate_with_open_id(params[:openid_identifier], :required => ["http://axschema.org/contact/email"]) do |result, identity_url, registration| if result.successful? p registration.data @current_user = User.find_by_identity_url(identity_url) if @current_user successful_login else failed_login "Sorry, no user by that identity URL exists (#{identity_url})" end else failed_login result.message end end end private def successful_login session[:user_id] = @current_user.id redirect_to(root_url) end def failed_login(message) flash[:error] = message redirect_to(new_session_url) end end I have already read various discussions about Google OpenID and all only say that you need to require the AX schema instead of the sreg field email, but even when I am doing so (as you can see in the code above), registration.data will remain empty ({}). How do I effectively require the email from most OpenID providers with open_id_authentication?

    Read the article

  • Anyone using IronPython in a production application?

    - by Scott P
    I've been toying with the idea of adding IronPython for extending a scientific application I support. Is this a good or horrible idea? Are there any good examples of IronPython being used in a production application. I've seen Resolver, which is kind of cute. Are there any other apps out there? What I don't get is this. Is it any easier to use IronPython than to just use something like code DOM to create script like extensibility in your application? Anyone have some horror stories or tales of glorious success with IronPython / IronRuby?

    Read the article

  • Javascript problem with location.href.

    - by Patrick
    Hello! I have a textbox and whenever the user presses a key it's checked to see if the user pressed enter. If the enter key is pressed, i want to add all the info in the textbox and transfer the user to a different url. <script language="javascript" type="text/javascript"> function checkEnter(e){ //e is event object passed from function invocation var characterCode; if(e && e.which){ //if which property of event object is supported (NN4) e = e; characterCode = e.which; //character code is contained in NN4's which property } else{ e = event; characterCode = e.keyCode; //character code is contained in IE's keyCode property } if (characterCode == 13) { //if generated character code is equal to ascii 13 (if enter key) var searchLink = '/Search/?Keywords=' + document.getElementById('<%= searchBox.ClientID %>').value; transferUser(searchLink); return false; } else{ return true; } } function transferUser(url) { window.location.href = url; window.location.replace(url); } </script> Search: <input name="ctl00$searchBox" type="text" id="ctl00_searchBox" class="header_line_search_box_textbox" onKeyPress="checkEnter(event);" /> I have tried every possible combination, but nothing happens. The site just refreshes itself. I also need somehow to convert the text from the user to html safe, must like the HttpUtility.EncodeUrl in aspx.

    Read the article

  • Django Comments and Users integration

    - by Patrick
    Hi folks, I am new to django. I am trying to use django.contrib.comments, I saw the table in the database like this, but how can I integrate it with user_id, user_photos, user_name, user_email....and those things with the django commenting system? I also tried to use thread-comments, but I can't configure it properly, is the django threadedcomments table similar to following ? Please let me know if any of you have done this before....all I need is a user login, and post comments, and then show list of comments with users' profile photos and username, as well as there comments. I think shouldn't be that hard. Thank you very much again. +-----------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | content_type_id | int(11) | NO | MUL | NULL | | | object_pk | longtext | NO | | NULL | | | site_id | int(11) | NO | MUL | NULL | | | user_id | int(11) | YES | MUL | NULL | | | user_name | varchar(50) | NO | | NULL | | | user_email | varchar(75) | NO | | NULL | | | user_url | varchar(200) | NO | | NULL | | | comment | longtext | NO | | NULL | | | submit_date | datetime | NO | | NULL | | | ip_address | char(15) | YES | | NULL | | | is_public | tinyint(1) | NO | | NULL | | | is_removed | tinyint(1) | NO | | NULL | | +-----------------+--------------+------+-----+---------+----------------+

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >