Search Results

Search found 1032 results on 42 pages for 'jon brickey'.

Page 27/42 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • Making a jQuery plugin work on all objects

    - by Jon Winstanley
    I am using the jQuery physics plugin for a pet project I am working on. The plugin enables the moving of DOM objects in realistic ways using velocity, gravity, wind etc. However I want to use the plugin to calculate where objects are to be placed inside a canvas element, not DOM objects. How do I change the plugin script functions to work on any object with 'top' and 'left' properties rather than only working with DOM objects: Currently the script functions look like this: jQuery.fn.funname = function() { return this; };

    Read the article

  • iPhone Mobile Safari File System Access

    - by Jon Smallberries
    Is it possible to write to a file in a native iPhone application and have a Safari browser read from that file after having the browser opened from the native app? Alternatively (and this would be great!), would it be possible to launch a mobile Safari webapp from a native iPhone app, and have that application access the OS 3.0 External Accessory Framework? My assumption is no... Basically, I have a functioning iPhone app that wraps a simple mobile Safari webapp, but I'd like to utilize the external accessory framework once I have launched the Safari webapp from the iPhone app...

    Read the article

  • Capture KeyUp event on form when child control has focus

    - by Jon B
    I need to capture the KeyUp event in my form (to toggle a "full screen mode"). Here's what I'm doing: protected override void OnKeyUp(KeyEventArgs e) { base.OnKeyUp(e); if (e.KeyCode == Keys.F12) this.ToggleFullScreen(); } private void ToggleFullScreen() { // Snazzy code goes here } This works fine, unless a control on the form has focus. In that case, I don't get the event at all (also tried OnKeyDown - no luck there either). I could handle the KeyUp event from the child control, but the controls on the form are generated dynamically, and there may be many of them - each having many children of their own. Is there any way to do this without generating event handlers for every control on the screen (which I certainly could do with a recursive function)?

    Read the article

  • How do I create an exception-wrapping fubumvc behaviour?

    - by Jon M
    How can I create a fubumvc behaviour that wraps actions with a particular return type, and if an exception occurs while executing the action, then the behaviour logs the exception and populates some fields on the return object? I have tried the following: public class JsonExceptionHandlingBehaviour : IActionBehavior { private static readonly Logger logger = LogManager.GetCurrentClassLogger(); private readonly IActionBehavior _innerBehavior; private readonly IFubuRequest _request; public JsonExceptionHandlingBehaviour(IActionBehavior innerBehavior, IFubuRequest request) { _innerBehavior = innerBehavior; _request = request; } public void Invoke() { try { _innerBehavior.Invoke(); var response = _request.Get<AjaxResponse>(); response.Success = true; } catch(Exception ex) { logger.ErrorException("Error processing JSON request", ex); var response = _request.Get<AjaxResponse>(); response.Success = false; response.Exception = ex.ToString(); } } public void InvokePartial() { _innerBehavior.InvokePartial(); } } But, although I get the AjaxResponse object from the request, any changes I make don't get sent back to the client. Also, any exceptions thrown by the action don't make it as far as this, the request is terminated before execution gets to the catch block. What am I doing wrong? For completeness, the behaviour is wired up with the following in my WebRegistry: Policies .EnrichCallsWith<JsonExceptionHandlingBehaviour>(action => typeof(AjaxResponse).IsAssignableFrom(action.Method.ReturnType)); And AjaxResponse looks like: public class AjaxResponse { public bool Success { get; set; } public object Data { get; set; } public string Exception { get; set; } }

    Read the article

  • Getting WAP embedded video in android AND iphone?

    - by Jon
    Recently a client asked me to make their site "work on smart phones", which normally wouldn't be too much of an issue... However it's a video site, and I have absolutely no idea where to even begin. Right off the bat I'm not even going to consider allowing the site to even function in anything other than Android (Maybe even 2.0+) and iPhone, maybe Blackberry and WinMo. But beyond that... What do I do? I'm looking at using the tag, however I'm unsure what, if any, codecs which phone uses. Is HTML5 even adopted in their browsers yet? Could someone please point me in the right direction? Am I going about this the right way, using the tag? Or is there some magical html element both iPhone and Android (And BB and WMo) that lets them run video in their native video players (Like on youtube).

    Read the article

  • How to have comments from FB app in website appear on the websites fb fanpage?

    - by Nathan Jon Grant
    I m a graphic designer and have created a website in Joomla that uses a "lightbox" (ignite gallery) plugin to view images from the site. I have created a facebook 'website' app that allows for comments to be posted via facebook in the lightbox (also a like button) - all of which are really just options that you allow in the ignite gallery options. Everything seems to work fine, I can comment and it will appear under the photo in the lightbox, as I asked it too, it also sends a copy of the comment to the commenter's facebook page with links. How do I also get the comments from the website (lightbox plugin) to also appear on the clients "fan page" that already exists?? Much appreciate any help..

    Read the article

  • Easiest, free way to start with Flex?

    - by Jon
    I'm interested in getting started with Flex, as I've wanted to work with flash for quite awhile but have never liked the designer-oriented way of programming. I've heard flex can be used for free, and is programmer friendly, but I'm having some issues... I can't find any good sites with flex resources. I'm used to PHP, so maybe I'm spoiled with a full manual, comments and tutorials, but I can't even find a decent tutorial site. So, what are some good flex starts to get started, and what's a good, free IDE to program with?

    Read the article

  • Recursive QuickSort suffering a StackOverflowException -- Need fresh eyes

    - by jon
    I am working on a Recursive QuickSort method implementation in a GenericList Class. I will have a second method that accepts a compareDelegate to compare different types, but for development purposes I'm sorting a GenericList<int I am recieving stackoverflow areas in different places depending on the list size. I've been staring at and tracing through this code for hours and probably just need a fresh pair of (more experienced)eyes. Definitely wanting to learn why it is broken, not just how to fix it. public void QuickSort() { int i, j, lowPos, highPos, pivot; GenericList<T> leftList = new GenericList<T>(); GenericList<T> rightList = new GenericList<T>(); GenericList<T> tempList = new GenericList<T>(); lowPos = 1; highPos = this.Count; if (lowPos < highPos) { pivot = (lowPos + highPos) / 2; for (i = 1; i <= highPos; i++) { if (this[i].CompareTo(this[pivot]) <= 0) leftList.Add(this[i]); else rightList.Add(this[i]); } leftList.QuickSort(); rightList.QuickSort(); for(i=1;i<=leftList.Count;i++) tempList.Add(leftList[i]); for(i=1;i<=rightList.Count;i++) tempList.Add(rightList[i]); this.items = tempList.items; this.count = tempList.count; } }

    Read the article

  • PHP vs JSP Which is should I use/learn for my project?

    - by Jon
    I'm planning on making a fitness planning web application for my senior project at school. However, I don't know anything about either technology and my only experience with web development previously was with python and django. I was wondering what people might recommend to learn, what is most useful to learn for the job market, and what would be best for this project. If it matters, the programming languages I know are, C, C++, Java, and Python. My goal of the project is to learn technologies that will make me a more marketable person. Thanks

    Read the article

  • Odd C++ template behaviour with static member vars

    - by jon hanson
    This piece of code is supposed to calculate an approximation to e (i.e. the mathematical constant ~ 2.71828183) at compile-time, using the following approach; e1 = 2 / 1 e2 = (2 * 2 + 1) / (2 * 1) = 5 / 2 = 2.5 e3 = (3 * 5 + 1) / (3 * 2) = 16 / 6 ~ 2.67 e4 = (4 * 16 + 1) / (4 * 6) = 65 / 24 ~ 2.708 ... e(i) = (e(i-1).numer * i + 1) / (e(i-1).denom * i) The computation is returned via the result static member however, after 2 iterations it yields zero instead of the expected value. I've added a static member function f() to compute the same value and that doesn't exhibit the same problem. #include <iostream> #include <iomanip> // Recursive case. template<int ITERS, int NUMERATOR = 2, int DENOMINATOR = 1, int I = 2> struct CalcE { static const double result; static double f () {return CalcE<ITERS, NUMERATOR * I + 1, DENOMINATOR * I, I + 1>::f ();} }; template<int ITERS, int NUMERATOR, int DENOMINATOR, int I> const double CalcE<ITERS, NUMERATOR, DENOMINATOR, I>::result = CalcE<ITERS, NUMERATOR * I + 1, DENOMINATOR * I, I + 1>::result; // Base case. template<int ITERS, int NUMERATOR, int DENOMINATOR> struct CalcE<ITERS, NUMERATOR, DENOMINATOR, ITERS> { static const double result; static double f () {return result;} }; template<int ITERS, int NUMERATOR, int DENOMINATOR> const double CalcE<ITERS, NUMERATOR, DENOMINATOR, ITERS>::result = static_cast<double>(NUMERATOR) / DENOMINATOR; // Test it. int main (int argc, char* argv[]) { std::cout << std::setprecision (8); std::cout << "e2 ~ " << CalcE<2>::result << std::endl; std::cout << "e3 ~ " << CalcE<3>::result << std::endl; std::cout << "e4 ~ " << CalcE<4>::result << std::endl; std::cout << "e5 ~ " << CalcE<5>::result << std::endl; std::cout << std::endl; std::cout << "e2 ~ " << CalcE<2>::f () << std::endl; std::cout << "e3 ~ " << CalcE<3>::f () << std::endl; std::cout << "e4 ~ " << CalcE<4>::f () << std::endl; std::cout << "e5 ~ " << CalcE<5>::f () << std::endl; return 0; } I've tested this with VS 2008 and VS 2010, and get the same results in each case: e2 ~ 2 e3 ~ 2.5 e4 ~ 0 e5 ~ 0 e2 ~ 2 e3 ~ 2.5 e4 ~ 2.6666667 e5 ~ 2.7083333 Why does result not yield the expected values whereas f() does? According to Rotsor's comment below, this does work with GCC, so I guess the question is, am i relying on some type of undefined behaviour with regards to static initialisation order, or is this a bug with Visual Studio?

    Read the article

  • How can I retrieve monitor information?

    - by Jon Tackabury
    I am trying to retrieve the monitor ID's as shown in the Windows display properties (#1, 2... etc), but I can't seem to find a way. I have tried using EnumDisplayMonitors as well as EnumDisplayDevices. They both return something like "\.\DISPLAY1". However, this number doesn't always match the number shown by Windows, especially when 2 video cards are being used to drive 3 or more monitors. Is there an API call I am missing to retrieve this information, or is there a way to get it from the registry or somewhere else? Thanks! I have tried these methods: Win32: EnumDisplayMonitors, EnumDisplayDevices: Neither of these return monitors that aren't active, and neither one returns the correct IDs. WMI: "select * from Win32_DesktopMonitor" doesn't return all the monitors, and there is no ID. Registry: I have found the monitors in various locations, none of the places I found have the info I am looking for. Any help is much appreciated. :)

    Read the article

  • How do I compile for windows XP under windows 7 / visual studio 2008

    - by Jon Cage
    I'm running Windows 7 and Visual Studio 2008 Pro and trying to get my application to work on Windows XP SP3. It's a really minimal command line program so should have any ridiculous dependencies: // XPBuild.cpp : Defines the entry point for the console application. // #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { printf("Hello world"); getchar(); return 0; } I read somewhere that defining several constants such as WINVER should allow me to compile for other platforms. I've tried the added the following to my /D compiler options: ;WINVER=0x0501;_WIN32_WINNT 0x0501;NTDDI_VERSION=NTDDI_WINXP But that made no difference. When I run it on my Windows XP machine (actually running in a virtualbox) I get the following error: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem. So what have I missed? Is there something else required to run MSVC compiled programs or a different compiler option or something else?

    Read the article

  • Issue building C++ DLL with Visual Studio 2010

    - by Jon Tackabury
    I have a very simple DLL written in unmanaged C++ that I access from my application. I recently switch to Visual Studio 2010, and the DLL went from 55k down to 35k with no code changes, and now it will no longer load in Windows 2000. I didn't change any code or compiler settings. I have my defines setup for 0x0500, which should include Windows 2000 support. Has anyone else run into this, or have any ideas of what I can do?

    Read the article

  • How do I run NUnit in debug mode from Visual Studio?

    - by Jon Cage
    I've recently been building a test framework for a bit of C# I've been working on. I have NUnit set up and a new project within my workspace to test the component. All works well if I load up my unit tests from Nunit (v2.4), but I've got to the point where it would be really useful to run in debug mode and set some break points. I've tried the suggestions from several guides which all suggest changing the 'Debug' properties of the test project: Start external program: C:\Program Files\NUnit 2.4.8\bin\nunit-console.exe Command line arguments: /assembly: <full-path-to-solution>\TestDSP\bin\Debug\TestDSP.dll I'm using the console version there, but have tried the calling the GUI as well. Both give me the same error when I try and start debugging: Cannot start test project 'TestDSP' because the project does not contain any tests. Is this because I normally load \DSP.nunit into the Nunit GUI and that's where the tests are held? I'm beginning to think the problem may be that VS wants to run it's own test framework and that's why it's failing to find the NUnit tests? [Edit] To those asking about test fixtures, one of my .cs files in the TestDSP project looks roughly like this: namespace Some.TestNamespace { // Testing framework includes using NUnit.Framework; [TestFixture] public class FirFilterTest { /// <summary> /// Tests that a FirFilter can be created /// </summary> [Test] public void Test01_ConstructorTest() { ...some tests... } } } ...I'm pretty new to C# and the Nunit test framework so it's entirely possible I've missed some crucial bit of information ;-) [FINAL SOLUTION] The big problem was the project I'd used. If you pick: Other Languages->Visual C#->Test->Test Project ...when you're choosing the project type, Visual Studio will try and use it's own testing framework as far as I can tell. You should pick a normal c# class library project instead and then the instructions in my selected answer will work.

    Read the article

  • How to use Custom Namespace for a Google Merchant Center Item Feed

    - by Jon
    I have declared the namespace that i am using: <?xml version='1.0'?> <entry xmlns='http://www.w3.org/2005/Atom' xmlns:g='http://base.google.com/ns/1.0' xmlns:c='http://base.google.com/cns/1.0'> here is a typical xml node i have: <c:gold_type type="string">White Gold</c:gold_type> Yet, when i submit my feed only the Google Namespace xml nodes work. Any ideas?

    Read the article

  • Trouble with Canvas rendering in Safari/Opera

    - by Jon
    Been banging my head against this one for a while, and figured I'd turn to the experts for some advice. I've made a jQuery snippet that grabs the values from a table and plots them in a line graph on a canvas element (also generated by the JS). All's well in Firefox and Chrome, but Safari and Opera aren't displaying the plotted points. I've reviewed in Firebug, Web Inspector debugger, JSLint, and checked the markup with the w3 validator, but still can't find anything glaringly obvious. Any chance one of you guys could help me out? Here's a page with a simplified example: http://bit.ly/aAshPQ Thanks!

    Read the article

  • Validate an XML File Against Multiple Schema Definitions

    - by Jon
    I'm trying to validate an XML file against a number of different schemas (apologies for the contrived example): a.xsd b.xsd c.xsd c.xsd in particular imports b.xsd and b.xsd imports a.xsd, using: <xs:include schemaLocation="b.xsd"/> I'm trying to do this via Xerces in the following manner: XMLSchemaFactory xmlSchemaFactory = new XMLSchemaFactory(); Schema schema = xmlSchemaFactory.newSchema(new StreamSource[] { new StreamSource(this.getClass().getResourceAsStream("a.xsd"), "a.xsd"), new StreamSource(this.getClass().getResourceAsStream("b.xsd"), "b.xsd"), new StreamSource(this.getClass().getResourceAsStream("c.xsd"), "c.xsd")}); Validator validator = schema.newValidator(); validator.validate(new StreamSource(new StringReader(xmlContent))); but this is failing to import all three of the schemas correctly resulting in cannot resolve the name 'blah' to a(n) 'group' component. I've validated this successfully using Python, but having real problems with Java 6.0 and Xerces 2.8.1. Can anybody suggest what's going wrong here, or an easier approach to validate my XML documents?

    Read the article

  • Authkit - deferring action to HTTP response to client application

    - by jon
    Form, Redirect and Forward all send an unauthenticated user to a Form on a login page specified within an Authkit middleware application. I'd like to allow a client application to request a service via XHR and then present a custom 'client side' form if a HTTP status code of 401 is returned, which would then post to Authkit for authentication until valid authentication/authorization occured. Specifically, 1) a jquery $.get request might request a resource. 2) if an Authkit cookie check confirmed previous authorization the content would be returned. 3) if not I would like Authkit to simply return the '401 response' (and not redirect to another page, or return a form template) where a client side exception handler would notify the user and present an authentication form. Can Authkit work like this?

    Read the article

  • functor returning 0

    - by Jon
    I've recently started teaching myself the standard template library. I was curious as to why the GetTotal() method in this class is returning 0? ... class Count { public: Count() : total(0){} void operator() (int val){ total += val;} int GetTotal() { return total;} private: int total; }; void main() { set<int> s; Count c; for(int i = 0; i < 10; i++) s.inset(i); for_each(s.begin(), s.end(), c); cout << c.GetTotal() << endl; }

    Read the article

  • Should I use a regular server instead of AWS?

    - by Jon Ramvi
    Reading about and using the Amazon Web Services, I'm not really able to grasp how to use it correctly. Sorry about the long question: I have a EC2 instance which mostly does the work of a web server (apache for file sharing and Tomcat with Play Framework for the web app). As it's a web server, the instance is running 24/7. It just came to my attention that the data on the EC2 instance is non persistent. This means I lose my database and files if it's stopped. But I guess it also means my server settings and installed applications are lost as they are just files in the same way as the other data. This means that I will either have to rewrite the whole app to use amazon CloudDB or write some code which stores the db on S3 and make my own AMI with the correct applications installed and configured. Or can this be quick-fixed by using EBS somehow? My question is 1. is my understanding of aws is correct? and 2. is it's worth it? It could be a possibility to just set up a regular dedicated server where everything is persistent, as you would expect. Would love to have the scaleability of aws though..

    Read the article

  • In Python, how to use a C++ function which returns an allocated array of structs via a ** parameter?

    - by Jon-Eric
    I'd like to use some existing C++ code, NvTriStrip, in a Python tool. SWIG easily handles the functions with simple parameters, but the main function, GenerateStrips, is much more complicated. What do I need to put in the SWIG interface file to indicate that primGroups is really an output parameter and that it must be cleaned up with delete[]? /////////////////////////////////////////////////////////////////////////// // GenerateStrips() // // in_indices: input index list, the indices you would use to render // in_numIndices: number of entries in in_indices // primGroups: array of optimized/stripified PrimitiveGroups // numGroups: number of groups returned // // Be sure to call delete[] on the returned primGroups to avoid leaking mem // bool GenerateStrips( const unsigned short* in_indices, const unsigned int in_numIndices, PrimitiveGroup** primGroups, unsigned short* numGroups, bool validateEnabled = false ); FYI, here is the PrimitiveGroup declaration: enum PrimType { PT_LIST, PT_STRIP, PT_FAN }; struct PrimitiveGroup { PrimType type; unsigned int numIndices; unsigned short* indices; PrimitiveGroup() : type(PT_STRIP), numIndices(0), indices(NULL) {} ~PrimitiveGroup() { if(indices) delete[] indices; indices = NULL; } };

    Read the article

  • How do I draw an arrow on a histogram drawn using ggplot2?

    - by jon
    Here is dataset: set.seed(123) myd <- data.frame (class = rep(1:4, each = 100), yvar = rnorm(400, 50,30)) require(ggplot2) m <- ggplot(myd, aes(x = yvar)) p <- m + geom_histogram(colour = "grey40", fill = "grey40", binwidth = 10) + facet_wrap(~class) + theme_bw( ) p + opts(panel.margin=unit(0 ,"lines")) I want to add labels to bars which each subject class fall into and produce something like the post-powerpoint processed graph. Is there way to do this within R ? ...... Edit: we can think of different pointer such as dot or error bar, if arrow is not impossible Let's say the following is subjects to be labelled: class name yvar 2 subject4 104.0 3 subject3 8.5 3 subject1 80.0 4 subject2 40.0 4 subject1 115.0 classd <- data.frame (class = c(2,3,3,4,4), name = c ("subject4", "subject3", "subject1", "subject2", "subject1"), yvar = c(104.0, 8.5,80.0,40.0, 115.0))

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >