Search Results

Search found 349 results on 14 pages for 'jake resier'.

Page 9/14 | < Previous Page | 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • to_xml with :only and :methods

    - by Jake
    I'm calling to_xml on an ActiveRecord object with both :only and :methods parameters. The method that I'm including returns a collection for AR objects. This works fine without the :only param, but when that is added I just get the default to_s representation of my objects. i.e <author><books>#&lt;Book:0x107753228&gt;</books>\n</author> Any ideas? Update, here is the code: class Author < ActiveRecord::Base def books #this is a named scope products.by_type(:book) end end Author.to_xml(:methods => :books, :only => :id)

    Read the article

  • Mac OS X linker error in Qt; CoreGraphics & CGWindowListCreate

    - by Jake Petroules
    Here is my .mm file #include "windowmanagerutils.h" #ifdef Q_OS_MAC #import </System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/Headers/CGWindow.h> QRect WindowManagerUtils::getWindowRect(WId windowId) { CFArrayRef windows = CGWindowListCreate(kCGWindowListOptionOnScreenOnly, kCGNullWindowID); return QRect(); } QRect WindowManagerUtils::getClientRect(WId windowId) { return QRect(); } QString WindowManagerUtils::getWindowText(WId windowId) { return QString(); } WId WindowManagerUtils::rootWindow() { QApplication::desktop()->winId(); } WId WindowManagerUtils::windowFromPoint(const QPoint &p, WId parent, bool(*filterFunction)(WId)) { return NULL; } void WindowManagerUtils::setTopMostCarbon(const QWidget *const window, bool topMost) { if (!window) { return; } // Find a Cocoa equivalent for this Carbon function // [DllImport("/System/Library/Frameworks/Carbon.framework/Versions/Current/Carbon")] // OSStatus ret = HIViewSetZOrder(this->winId(), kHIViewZOrderAbove, NULL); } #endif The linker is telling me "_CGWindowListCreate" is undefined. What libraries must I link to? Apple's documentation is not very helpful on telling what to include or link to, like MSDN is. Also I couldn't just do #import <CGWindow.h>, I had to specify the absolute path to it... any way around that?

    Read the article

  • Remove Registry Keys for Windows Phone 7 Emulator

    - by Jake Pearson
    I am trying to get the updated Windows Phone 7 tools installed, but can't get rid of the old ones. The uninstaller wouldn't run, so I had to try more extreme means. I got everything removed except for "Microsoft Windows Phone Emulator x64". Does anyone know what vm_web.exe (the tool installer) is checking for (registry, file, etc.) that prevents the installer from running. I tried Aaron Stebner's clean up tool, and it helped a lot, but couldn't get rid of the emulator.

    Read the article

  • Java service wrapper and additional application command line parameters

    - by Jake
    I'm currently using java service wrapper to wrap a java application that I've developed. I'm needing to ability to pass in additional command line parameters to my application through the java service wrapper. Pretend my app is called myapp and I've setup java service wrapper so that the script I run to start is called myapp. I'd like to be able to do something like this: ./myapp start Parameter1 parameter2 and have those additional parameters get passed into my application. Any ideas how to do this? I'm finding that googling and looking at the documentation is only pulling up how to use command line arguments to setup java service wrapper. I've had difficulty finding anything about passing command line arguments to your application except for having them hard coded in your wrapper.conf file. Right now I feel like my option is to take the additional command line parameters, set them to environment variables and have those hard coded in the wrapper.conf. I'd prefer not to go down that road though and am hoping I've overlooked something.

    Read the article

  • Working with ieee format numbers in ARM

    - by Jake Sellers
    I'm trying to write an ARM program that will convert an ieee number to a TNS format number. TNS is a format used by some super computers, and is similar to ieee but different. I'm trying to use several masks to place the three different "part" of the ieee number in separate registers so I can move them around accordingly. Here is my unpack subroutine: UnpackIEEE LDR r1, SMASK ;load the sign bit mask into r1 LDR r2, EMASK ;load the exponent mask into r2 LDR r3, GMASK ;load the significand mask into r3 AND r4, r0, r1 ;apply sign mask to IEEE and save into r4 AND r5, r0, r2 ;apply exponent mask to IEEE and save into r5 AND r6, r0, r3 ;apply significand mask to IEEE and save into r6 MOV pc, r14 ;return And here are the masks and number declarations so you can understand: IEEE DCD 0x40300000 ;2.75 decimal or 01000000001100000000000000000000 binary SMASK DCD 0x80000000 ;Sign bit mask EMASK DCD 0x7F800000 ;Exponent mask GMASK DCD 0x007FFFFF ;Significand mask When I step through with the debugger, the results I get are not what I expect after working through it on paper. EDIT: What I mean, is that after the subroutine runs, registers 4, 5, and 6 all remain 0. I can't figure out why the masks are not working. I think I do not fully understand how the number is being stored in the register or using the masks wrong. Any help appreciated. If you need more info just ask. EDIT: entry point: Very simple, just trying to get these subroutines working. ENTRY LDR r1, IEEE ;load IEEE num into r1 BL UnpackIEEE ;call unpack sub SWI SWI_Exit ;finish

    Read the article

  • What files should be added to SVN in an eclipse Java project?

    - by Jake Petroules
    I have a Java project I'd like to commit to my SVN repository, created with eclipse. Now, what files (aside from the source code, obviously) are necessary? In the workspace root, there is a .settings folder with many files and subfolders, and inside the project folder there are two files - .classpath and .project, and another .settings folder with a single file - org.eclipse.jdt.core.prefs. Which of these files should be committed to SVN and which can be safely excluded?

    Read the article

  • Sending mail with a Php with a pdf attachment

    - by Jake
    Hi, I'm trying to send an email from the php mail command. I've been able to what I've tried so far, but can't seem to get it to work with an attachment. I've looked around the web and the best code I've found led me to this: $fileatt_name = 'JuneFlyer.pdf'; $fileatt_type = 'application/pdf'; $fileatt = 'JuneFlyer.pdf'; $file = fopen($fileatt,'rb'); $data = fread($file,filesize($fileatt)); $data = chunk_split(base64_encode($data)); $MAEmail = "[email protected]"; mail("$email_address", "$subject", "$message", "From: ".$MAEmail."\n". "MIME-Version: 1.0\n". "Content-type: text/html; charset=iso-8859-1". "--{$mime_boundary}\n" . "Content-Type: {$fileatt_type};\n" . " name=\"{$fileatt_name}\"\n" . "Content-Disposition: attachment;\n" . " filename=\"{$fileatt_name}\"\n" . "Content-Transfer-Encoding: base64\n\n" .$data. "\n\n" ); There are two problems when I do this. First, the contents of the email dissappear. Second, there is an error on the attachment. "Adobe Reader could not open June_flyer.pdf because it is either not a supported file type or because the file has been damaged (for example it was sent as an email attachment and wasn't correctly decoded)" Any ideas of how to deal with this? Thanks, JB

    Read the article

  • Log4cxx sample program and steps to compile

    - by Jake
    Hi guys Hoping someone can help out.. I've been scouring the net for a simple how-to to get a good log4cxx program working, with steps on setting up the libraries, dependants, directives, library paths etc etc.. as of yet i've found a lot of valuable but disjointed information.. trying to pull it all together has been a bit of a nightmare, so i'm reaching out and wondering if any kind soul knows of, or could put together a simple how-to, to get a standard win32 console app running with either static or dynamically linked release mode log4cxx.. I have win32 binary releases of the libraries, and thanks to a very cool dude from "Must a blog have a name" I have a win32 project which can build log4cxx.. i just cant bloody use it :) It would be really helpful to me, and probably to others, to be able to refer to something like this and not 20 different pages, with different lists of libraries needed to download and install.. :) Here's hoping Thanks guys J

    Read the article

  • sIFR Doesn't Work in FF3 Mac.

    - by Jake
    I thought it might be something I was doing wrong, but I am not seeing it working on any site, including Novemberborn.net. Any Ideas? The CSS is loaded, so the headlines are hidden, and then it is like the JS isn't loaded at all. Could this be a browser detection issue? I am using firefox 3 with latest flash player version 10. I have heard the complaint from other Mac users as well. Works on every other browser... EDIT: I removed the CSS to hide, it still doesn't work. After a pause, it loads the JS and removes the headlines, but doesn't replace them.

    Read the article

  • Trouble creating a button matrix in Interface Builder

    - by Jake
    Hi, I am trying to create a matrix of buttons in Interface Builder 3.2.1 but can not find anyway to do it. I read the question and answer posted here: http://stackoverflow.com/questions/1771835/how-to-create-a-nsmatrix-of-nsimagecell-in-interface-builder-in-10-6 But following Layout Embed Objects In, as suggested, I see only View and Scroll View as options, not Matrix. Have I missed something? Thanks.

    Read the article

  • Simple ASP.NET MVC views without writing a controller

    - by Jake Stevenson
    We're building a site that will have very minimal code, it's mostly just going to be a bunch of static pages served up. I know over time that will change and we'll want to swap in more dynamic information, so I've decided to go ahead and build a web application using ASP.NET MVC2 and the Spark view engine. There will be a couple of controllers that will have to do actual work (like in the /products area), but most of it will be static. I want my designer to be able to build and modify the site without having to ask me to write a new controller or route every time they decide to add or move a page. So if he wants to add a "http://mysite.com/News" page he can just create a "News" folder under Views and put an index.spark page within it. Then later if he decides he wants a /News/Community page, he can drop a community.spark file within that folder and have it work. I'm able to have a view without a specific action by making my controllers override HandleUnknownAction, but I still have to create a controller for each of these folders. It seems silly to have to add an empty controller and recompile every time they decide to add an area to the site. Is there any way to make this easier, so I only have to write a controller and recompile if there's actual logic to be done? Some sort of "master" controller that will handle any requests where there was no specific controller defined?

    Read the article

  • SQL GUI Programs

    - by jake
    Are there any programs with a gui which let you create a SQL database, create tables, define the primary and foreign keys and insert data? I am tired of having to use the mysql command line client, very tedious.

    Read the article

  • Is there a way to export reports from Microsoft CRM4?

    - by Jake
    I'm setting up a proper dev environment for my client (dev/qa/stage/prod). I'd like to find a way to export reports so we can cleanly move from one environment to the next. Custom RDL type reports are easy (just import the RDL in the next environment), but the reports that are built inside CRM don't appear to export anywhere. Am I missing something? Is this another feature that was missed? Apperciate the help.

    Read the article

  • Ruby gem to obscure data

    - by Jake
    Anyone know of a gem that will allow you to obscure/sanitize data? Usecase: Download a production database, run some sanitation so that real customers won't get emails, cards charged etc.

    Read the article

  • Quartz Window Services equivalent for Windows and X11?

    - by Jake Petroules
    What is the equivalent of Quartz Window Services for Windows and X11? I want to be able to capture individual windows with their decorations, shadows, etc., completely independent from each other. Basically what the Son of Grab example is able to do. http://developer.apple.com/mac/library/samplecode/SonOfGrab/Introduction/Intro.html Also it seems like it's not possible to capture non-top-level windows with QWS in Mac. For example I want to be able to capture a Java or Flash applet running inside Firefox. What other library would I need to use instead?

    Read the article

  • C# How to commit a TextBox?

    - by Jake
    Hi, In a form, I have a TextBox Binding an Object on its member property "Title". Along with it is a "Save" button to test the binding. Seems like the underlying object property does not get updated unless the textbox loses focus. But there no form.ActiveControl.Blur() for use. Besides, this does not seem like a sound hack. Anyway to do this better? Thanks. EDIT: Sorry for not being clear. My question is in the title: "How to commit a TextBox". I use the term "commit" from the DataGridView commit and BindingSource commit. And it's in WinForms. (Have never worked with WPF, so it didn't occur to me. Sorry). The actual scenario I have is I have a bunch of TextBox binded to property of a single Object. The user enters values in all the TextBox and when the user clicks save (toolbar button), the last TextBox is still in focus (or in editing mode) hence the save will not capture the last value in the last textbox. I want to find the correct way to "commit" the textbox value just before saving. Thanks.

    Read the article

  • Django admin interface upload failing on request data read error

    - by Jake
    Hi All, This is an updated version of an old question I asked. I've now done a lot more testing, plus the old question got hijacked. I'm getting a request data read error when trying to upload files to the Django admin interface. Files under about 150k work, but bigger files always fail and almost always at around 192k (that's 3 chunks) completed, sometimes at around 160k. The Exception I get is below. File "/usr/lib/python2.4/site-packages/django/http/multipartparser.py", line 405, in read return self._file.read(num_bytes) IOError: request data read error I've tried Chrome and Firefox on Windows and Firefox on Mac - Same results. I can upload to other sites so I don't think it's my connection. I'm running python 2.4, django 1.1, mod_wsgi, on CentOS (a media temple DV server) Locally it's fine (Django development server) Everything I've found on this issue says it's a mod_python issue and that changing to mod_wsgi will fix it, but I am running mod_wsgi. Can anyone help?

    Read the article

  • Find a dynamic added tag with javascript

    - by Jake
    I am trying to see how to find a tag that was added dynamically within a table as so: ParentTag= document.getElementById('parentdiv'); var newTag = document.createElement('div'); newTag.innerHTML="<span class="ImNew"></span>" ParentTag.appendChild(newTag); How will I be able to find that tag in javascript, not leaning towards using jquery so no live recommendations please.. Trying to find that new tag in strictly javascript.

    Read the article

  • C# System.Xml.Serialization Self-nested elements

    - by Jake
    Hi, I am trying to deserialize <graph> <node> <node> <node></node> </node> </node> <node> <node> <node></node> </node> </node> </graph> with [XmlRoot("graph")] class graph { List<node> _children = new List<node>(); [XmlElement("node")] public Node[] node { get { return _children.ToArray(); } set { foreach(node n in value) children.add(n) } }; } class node { List<node> _children = new List<node>(); [XmlElement("node")] public Node[] node { get { return _children.ToArray(); } set { foreach(node n in value) children.add(n) } }; } but it keeps saying object not created, null reference encountered when trying to set children nodes. What is wrong above? Thanks in advance~

    Read the article

  • jQuery test if element1 is child of element2

    - by Jake
    Does anyone know a good way to test if one element, stored in a var, is the child of another, also stored in a var? I don't need element1.isChildOf('selector'), that's easy. I need element1.isChildOf(element2) element2.find(element1).size() > 0 Does not seem to work. I don't want to have to write a plugin the uses .each to test each child if I can avoid it.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14  | Next Page >