Search Results

Search found 1863 results on 75 pages for 'matt fordham'.

Page 48/75 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • WPF Binding to code behind methods

    - by Matt B
    Hi all, This is annoying - I know how I'd do it in web... I have a wpf image and I want to bind it's source property to a method, and pass in a property from it's bound item. IE. <image source="GetMySource({binding name})" /> Where GetMySource is protected string GetMySource(string name) { return "images/"+name+".png"; }

    Read the article

  • A quick over view of facebook's db?

    - by Matt
    Hey guys I find it hard to believe that Facebook uses simple sql, surely it would use some other method but lets assume for now it does use sql how would the code assimilating the 'wall' work? Lets say that there is three tables (just for the example) Friends: id (entry key) - uid(your id) - fid (your mates' id) Wall:id (entry key) - username - comment - time - commentcount comments: id (entry key) - wid (wall id (original comment)) - reply - time Lets forget about the like part and report etc, as well as mod things (ip, ban etc.) How would this work? Select wall.id, wall.username, wall.comment, wall.time, wall.commentcount, comments.wid, comments.reply, comments.time FROM wall inner join comments ON wall.id=comments.wid ORDER BY wall.time; That's your own wall but how do they get friend's? A heap of unions?

    Read the article

  • R selecting duplicate rows

    - by Matt
    Okay, I'm fairly new to R and I've tried to search the documentation for what I need to do but here is the problem. I have a data.frame called heeds.data in the following form (some columns omitted for simplicity) eval.num, eval.count, ... fitness, fitness.mean, green.h.0, green.v.0, offset.0, green.h.1, green.v.1,...green.h.7, green.v.7, offset.7... And I have selected a row meeting the following criteria: best.fitness <- min(heeds.data$fitness.mean[heeds.data$eval.count = 10]) best.row <- heeds.data[heeds.data$fitness.mean == best.fitness] Now, what I want are all of the other rows with that have columns green.h.0 to offset.7 (a contiguous section of columns) equal to the best.row Basically I'm looking for rows that have some of the conditions the same as the "best" row. I thought I could just do this, heeds.best <- heeds.data$fitness[ heeds.data$green.h.0 == best.row$green.h.0 & ... ] But with 24 columns it seems like a stupid method. Looking for something a bit simpler with less manual typing. Thanks!

    Read the article

  • Unit Testing Model Classes that derive from NSManagedObject

    - by Matt Baker
    So...I'm trying to get unit tests set up in my iPhone App but I'm having some issues. I'm trying to test my model classes but they inherit directly from NSManagedObject. I'm sure this is a problem but I don't know how to get around it. Everything is building and running as expected but I get this error when calling any method on the class I'm testing: Unknown.m:0:0 unrecognized selector sent to instance 0xc2b120 If I follow this structure (http://chanson.livejournal.com/115621.html) to create my object in my tests I end up with another error entirely but it still doesn't help me. Basically my question is this: how can I test a class that inherits from NSManagedObject?

    Read the article

  • Recommended reading for bioinformatics

    - by Matt
    I'm keen on learning about bioinformatics. I am ideally looking for a short course introduction, with some practical tasks I can get my teeth into immediately to see if there is any interest in it for me. I already have a good understanding of molecular biology, so I should be able to skip most of the foundational work. Any suggestions?

    Read the article

  • jQuery rotator not rotating properly - too much recursion

    - by Matt Nathanson
    I've built a custom jQuery rotator using just basic animation to rotate the 3 Divs (images). I've built the function and then reinitiate the function using it as a call back. Here's the code: function ImageRotate() { var CurrentFeature = "#container" + featureNumber; $(CurrentFeature).stop(false, true).delay(4500).animate({'top' : '330px'}, 3000); var featureNumber2 = featureNumber-1; if ( featureNumber == 1) {featureNumber2=3} var CurrentFeature2 = "#container" + featureNumber2; $(CurrentFeature2).stop(false, true).delay(4500).animate({'top' : '0px'}, 3000); $('#container2').stop(false, true).delay(4500).animate({'top' : '-330px'}, 25); var featureNumber3 = featureNumber+1; if ( featureNumber == 3){featureNumber3=1} var CurrentFeature3 = "#container" + featureNumber3; $(CurrentFeature3).stop(false, true).delay(7500).animate({'top' : '0px'}, 3000); $(CurrentFeature2).stop(false, true).delay(4500).animate({'top' : '330px'}, 3000); $(CurrentFeature).stop(false, true).delay(4500).animate({'top' : '-330px'}, 25); if (featureNumber ==1) {featureNumber=3} else{featureNumber--}; $(CurrentFeature).stop(false, true).delay(7500).animate({'top' : '0px'}, 3000); $(CurrentFeature3).stop(false, true).delay(4500).animate({'top' : '330px'}, 3000); $(CurrentFeature2).stop(false, false).delay(4500).animate({'top' : '-330px'}, 25,ImageRotate()); }; It's worth noting that when calling the function again I also tried making another function called ImageRotate2(); and it did the same thing. It loops, but i get all sorts of funkiness. Edit: I've also tried some answers in the replies and they both leave me with recursion errors each second.

    Read the article

  • PostgreSQL - best way to return an array of key-value pairs

    - by Matt W
    I'm trying to select a number of fields, one of which needs to be an array with each element of the array containing two values. Each array item needs to contain a name (character varying) and an ID (numeric). I know how to return an array of single values (using the ARRAY keyword) but I'm unsure of how to return an array of an object which in itself contains two values. The query is something like SELECT t.field1, t.field2, ARRAY(--with each element containing two values i.e. {'TheName', 1 }) FROM MyTable t I read that one way to do this is by selecting the values into a type and then creating an array of that type. Problem is, the rest of the function is already returning a type (which means I would then have nested types - is that OK? If so, how would you read this data back in application code - i.e. with a .Net data provider like NPGSQL?) Any help is much appreciated.

    Read the article

  • Objective-C method not being called

    - by Matt S.
    It's either because of the fact I'm tired or because I'm doing it wrong, but for some reason I can't get it to call a method. Here's what I'm trying to call: -(void)newHighScore:(int)d Which right now just does an NSLog saying "yea I'm working!" I'm calling it like this: [highscore newHighScore:score]; highscore is what I called the HighScore class in the .h, and score is an int with the score.

    Read the article

  • Screen information while Windows system is locked (.NET)

    - by Matt
    We have a nightly process that updates applications on a user's pc, and that requires bringing the application down and back up again (not looking to get into changing that process). The problem is that we are building a Windows AppBar on launch which requires a valid screen, and when the system is locked there isn't one in the Screen class. So none of the visual effects are enabled and it shows up real ugly. The only way we currently have around this is to detect a locked screen and just spin and wait until the user unlocks the desktop, then continue launching. Leaving it down isn't an option, as this is a key part of our user's workflow, and they expect it to be up and running if they left it that way the night before. Any ideas?? I can't seem to find the display information anywhere, but it has to be stored off someplace, since the user is still logged in. The contents of the Screen.AllScreens array: ** When Locked: Device Name : DISPLAY Primary : True Bits Per Pixel : 0 Bounds : {X=-1280,Y=0,Width=2560,Height=1024} Working Area : {X=0,Y=0,Width=1280,Height=1024} ** When Unlocked: Device Name : \\.\DISPLAY1 Primary : True Bits Per Pixel : 32 Bounds : {X=0,Y=0,Width=1280,Height=1024} Working Area : {X=0,Y=0,Width=1280,Height=994} Device Name : \\.\DISPLAY2 Primary : False Bits Per Pixel : 32 Bounds : {X=-1280,Y=0,Width=1280,Height=1024} Working Area : {X=-1280,Y=0,Width=1280,Height=964}

    Read the article

  • How do I ensure a Flex dataProvider processes the data synchronously?

    - by Matt Calthrop
    I am using an component, and currently have a dataProvider working that is an ArrayCollection (have a separate question about how to make this an XML file... but I digress). Variable declaration looks like this: [Bindable] private var _dpImageList : ArrayCollection = new ArrayCollection([ {"location" : "path/to/image1.jpg"}, {"location" : "path/to/image2.jpg"}, {"location" : "path/to/image3.jpg"} ]); I then refer to like this: <s:List id="lstImages" width="100%" dataProvider="{_dpImageList}" itemRenderer="path.to.render.ImageRenderer" skinClass="path.to.skins.ListSkin" > <s:layout> <s:HorizontalLayout gap="2" /> </s:layout> </s:List> Currently, it would appear that each item is processed asynchronously. However, I want them to be processed synchronously. Reason: I am displaying a list of images, and I want the leftmost one rendered first, followed by the one to its right, and so on. Edit: I just found this answer. Do you think that could be the same issue?

    Read the article

  • How to pronounce "std" (C & C++)? [closed]

    - by Matt Blaine
    How do you pronounce "std"? As in: __stdcall stdlib.h stdio.h stdin stdout stderr the namespace std Thank you. Please don't take this as being rude, but if you'd like to close this question, there are many others like it that were allowed to survive. So, if you decide to close any of them, would you kindly close all of them? Thanks.

    Read the article

  • Google Translate translates inline Javascript Code

    - by Matt
    Hi, I have some PHP code that sends a section of html code including some inline Javascript code by curl to google. When i get it back from Google translated into the language that i chose, the Javascript code has been translated too. Any ideas as to how i can stop Google translating my inline JavaScript code? Thanks, M

    Read the article

  • My chance to shape our development process/policy

    - by Matt Luongo
    Hey guys, I'm sorry if this is a duplicate, but the question search terms are pretty generic. I work at a small(ish) development firm. I say small, but the company is actually a fair size; however, I'm only the second full-time developer, as most past work has been organized around contractors. I'm in a position to define internal project process and policy- obvious stuff like SCM and unit-testing. Methodology is outside the scope of the document I'm putting together, but I'd really like to push us in a leaner (and maybe even Agile?) direction. I feel like I have plenty of good practice recommendations, but not enough solid motivation to make my document the spirit guide I'd like it to be. I've separated the document into "principles" and "recommendations". Recommendations have been easy to come up with. Use SCM, strive for 1-step, regularly scheduled builds, unit test first, document as you go... Listing the principles that are supposed to be informing these recommendations, though, has been rough. I've come up with "tools work for us; we should never work for tools" and a hazy clause aimed at our QA (which has been overly manual) that I'd like to read "tedium is the root of all evil". I don't want to miss an opportunity with this document to give us a good in-house start and maybe even push us toward Agile. What principles am I missing?

    Read the article

  • How to get associated URLRequest from Event.COMPLETE fired by URLLoader

    - by matt lohkamp
    So let's say we want to load some XML - var xmlURL:String = 'content.xml'; var xmlURLRequest:URLRequest = new URLRequest(xmlURL); var xmlURLLoader:URLLoader = new URLLoader(xmlURLRequest); xmlURLLoader.addEventListener(Event.COMPLETE, function(e:Event):void{ trace('loaded',xmlURL); trace(XML(e.target.data)); }); If we need to know the source URL for that particular XML doc, we've got that variable to tell us, right? Now let's imagine that the xmlURL variable isn't around to help us - maybe we want to load 3 XML docs, named in sequence, and we want to use throwaway variables inside of a for-loop: for(var i:uint = 3; i > 0; i--){ var xmlURLLoader:URLLoader = new URLLoader(new URLRequest('content'+i+'.xml')); xmlURLLoader.addEventListener(Event.COMPLETE, function(e:Event):void{ trace(e.target.src); // I wish this worked... trace(XML(e.target.data)); }); } Suddenly it's not so easy, right? I hate that you can't just say e.target.src or whatever - is there a good way to associate URLLoaders with the URL they loaded data from? Am I missing something? It feels unintuitive to me.

    Read the article

  • Avoiding string copying in Lua

    - by Matt Sheppard
    Say I have a C program which wants to call a very simple Lua function with two strings (let's say two comma separated lists, returning true if the lists intersect at all, false if not). The obvious way to do this is to push them onto the stack with lua_pushstring, which works fine, however, from the doc it looks like lua_pushstring but makes a copy of the string for Lua to work with. That means that to cross over to the Lua function is going to require two string copies which I could avoid by rewriting the Lua function in C. Is there any way to arrange things so that the existing C strings could be reused on the Lua side for the sake of performance (or would the strcpy cost pale into insignificance anyway)? From my investigation so far (my first couple of hours looking seriously at Lua), lite userdata seems like the sort of thing I want, but in the form of a string.

    Read the article

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