Search Results

Search found 1373 results on 55 pages for 'joe strout'.

Page 22/55 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • Tiling rectangles seamlessly in WPF

    - by Joe White
    I want to seamlessly tile a bunch of different-colored Rectangles in WPF. That is, I want to put a bunch of rectangles edge-to-edge, and not have gaps between them. If everything is aligned to pixels, this works fine. But I also want to support arbitrary zoom, and ideally, I don't want to use SnapsToDevicePixels (because it would compromise quality when the image is zoomed way out). But that means my Rectangles sometimes render with gaps. For example: <Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Background="Black"> <Canvas SnapsToDevicePixels="False"> <Canvas.RenderTransform> <ScaleTransform ScaleX="0.5" ScaleY="0.5"/> </Canvas.RenderTransform> <Rectangle Canvas.Left="25" Width="100" Height="100" Fill="#CFC"/> <Rectangle Canvas.Left="125" Width="100" Height="100" Fill="#CCF"/> </Canvas> </Page> If the ScaleTransform's ScaleX is 1, then the Rectangles fit together seamlessly. When it's 0.5, there's a dark gray streak between them. I understand why -- the combined semi-transparent edge pixels don't combine to be 100% opaque. But I would like a way to fix it. I could always just make the Rectangles overlap, but I won't always know in advance what patterns they'll be in (this is for a game that will eventually support a map editor). Besides, this would cause artifacts around the overlap area when things were zoomed way in (unless I did bevel-cut angles on the underlapping portion, which is an awful lot of work, and still causes problems at corners). Is there some way I can combine these Rectangles into a single combined "shape" that does render without internal gaps? I've played around with GeometryDrawing, which does exactly that, but then I don't see a way to paint each RectangleGeometry with a different-colored brush. Are there any other ways to get shapes to tile seamlessly under an arbitrary transform, without resorting to SnapsToDevicePixels?

    Read the article

  • How can I convert HTML to Textile?

    - by Joe Van Dyk
    I'm scraping a static html site and moving the content into a database-backed CMS. I'd like to use Textile in the CMS. Is there a tool out there that converts HTML into Textile, so I can scrape the existing site, convert the HTML to Textile, and insert that data into the database?

    Read the article

  • ActiveMQ broker configuration error when specifying persistenceAdapter: "One of '{WC[##other:"http:/

    - by Joe
    I am setting up a simple ActiveMQ embedded broker. It works fine, until I try to configure a persistence adapter. I am basically just copying the configuration from http://activemq.apache.org/persistence.html#Persistence-ConfiguringKahaPersistence. When I add this configuration to my Spring configuration, like so: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:amq="http://activemq.apache.org/schema/core" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd"> <amq:broker useJmx="true" persistent="true" brokerName="localhost"> <amq:transportConnectors> <amq:transportConnector name="vm" uri="vm://localhost"/> </amq:transportConnectors> <amq:persistenceAdapter> <amq:kahaPersistenceAdapter directory="activemq-data" maxDataFileLength="33554432"/> </amq:persistenceAdapter> </amq:broker> </beans> I get the error: cvc-complex-type.2.4.a: Invalid content was found starting with element 'amq:persistenceAdapter'. One of '{WC[##other:"http://activemq.apache.org/schema/core"]}' is expected. When I take out the amq:persistenceAdapter element, it works fine. The same error happens no matter which persistence adapter I include in the body, e.g. jdbc, journal, etc. Any help would be greatly appreciated. Thanks.

    Read the article

  • Symfony sfDoctrineGuard plugin sfGuardUser module

    - by Joe Mc
    When using sfDoctrineGuard plugin, it automatically generates the backend administration functionality where I can edit users of the system and assign them permissions. So I visit http://.../backend_dev.php/sf_guard_user/:id/edit where I am presented with the user's information including the available permissions to select. By default the permissions are shown as a multiple select box, HTML follows: <select name="sf_guard_user[permissions_list][]" multiple="multiple" id="sf_guard_user_permissions_list"> <option value="1">Permission1</option> <option value="2">Permission2</option> <option value="3">Permission3</option> <option value="4">Permission4</option> </select> What I would prefer is a list of checkboxes. So I searched around and found that if I add the option "expanded" set to true to the following code: 'permissions_list' => new sfWidgetFormDoctrineChoice(array('multiple' => true, 'model' => 'sfGuardPermission', 'expanded' => true,)), The code is part of this file: lib/form/doctrine/sfDoctrineGuardPlugin/base/BasesfGuardUserForm.class.php. I don't think I should've edited this file (potential for changes to be overwritten should sfDoctrineGuard ever be re-installed) but couldn't think of another way to make it work. The generated HTML is as follows: <ul class="checkbox_list"> <li><input name="sf_guard_user[permissions_list][]" type="checkbox" value="1" id="sf_guard_user_permissions_list_1" />&nbsp;<label for="sf_guard_user_permissions_list_1">Permission1</label></li> <li><input name="sf_guard_user[permissions_list][]" type="checkbox" value="2" id="sf_guard_user_permissions_list_2" />&nbsp;<label for="sf_guard_user_permissions_list_2">Permission2</label></li> <li><input name="sf_guard_user[permissions_list][]" type="checkbox" value="3" id="sf_guard_user_permissions_list_3" />&nbsp;<label for="sf_guard_user_permissions_list_3">Permission3</label></li> <li><input name="sf_guard_user[permissions_list][]" type="checkbox" value="4" id="sf_guard_user_permissions_list_4" />&nbsp;<label for="sf_guard_user_permissions_list_4">Permission4</label></li> </ul> What I need to do now is split up the permissions based on their prefix. For example if I had permissions named user_action1, user_action2, file_action1, file_action2, they would display like: User checkbox (custom label) Action One checkbox Action Two File checkbox (custom label) Action One checkbox Action Two but have no idea where to start with this. It would be easy if there was a template to edit but since I'm dealing with the Forms framework it is my understanding that the templates are generated on the fly - I can see them in my symonfy cache folder. How would I go about this? I started writing my own sfWidgetFormDoctrineChoicePermission class that extends the same class as sfWidgetFormDoctrineChoice but am struggling to edit the rendering functions correctly for the desired output. Is this the correct way to go about this work? I also need to integrate my sfGuardUserProfile model into the edit user page (same as above), I read somwhere that editing the generator.yml file for the sfGuardUser plugin module and simply adding the field names from the sfGuardUserProfile table would make it work, but sadly it doesn't. Any help with any of my queries would be appreciated. Thanks

    Read the article

  • PHP - Rotate a HEX color value (eg swap all colors with "next" hex)

    - by Joe
    I have a set of hex values in an array in PHP. On my page, I have a slider which the user can "slide" to return a value between 1-100. I want to then, based on this slider value, swap all the colors in the array based on the colors "next" color based on the position in the array. An example of the same sort of thing would be like in photshop where you can rotate the hue of a layer. I want to do the same thing, in PHP, for a hex value. Any clues?

    Read the article

  • Things one needs to know while writing a game engine

    - by Joe Barr
    I have been dabbling in game development as a hobby for a while now, and I cannot seam to quite get my games to sparkle at least a bit with some graphics. I have decided to write a simple test game engine that only focuses on the representation of graphics - shapes, textures and surfaces. While I have a few very simple game engines designed for my own games under my belt, I want to create a game engine that I can use to display and play with graphics. I'm going to do this in C++. Since this is my first time with a major engine, the engine in not going to focus on 3D graphics, it's going to be a mixture of isometric and 2D graphics. My previous engines have incorporated (been able to draw) or focused on simple flat (almost 2D) non impressive graphic designs and representations of: the player NPCs objects walls and surfaces textures Also, I had some basic AI and sometimes even sound. They also saved and loaded games. They didn't have a map editor or a level editor. Is this going to be a problem in the future? At this time I have to point out that some of my games didn't get finished because I was to lazy to write the few last levels. My question at this point would be: What are some things one should know if one wants write (develope) a better graphical game engine with all it's functions.

    Read the article

  • Algorithm for digit summing?

    - by Joe
    I'm searching for an algorithm for Digit summing. Let me outline the basic principle: Say you have a number: 18268. 1 + 8 + 2 + 6 + 8 = 25 2 + 5 = 7 And 7 is our final number. It's basically adding each number of the whole number until we get down to a single (also known as a 'core') digit. It's often used by numerologists. I'm searching for an algorithm (doesn't have to be language in-specific) for this. I have searched Google for the last hour with terms such as digit sum algorithm and whatnot but got no suitable results. Any help would be great, thanks.

    Read the article

  • ruby Test::Unit Command line options?

    - by Joe Soul-bringer
    Hi all, When running tests in Ruby's unit::test framework, is there a really easy way to specify, from the command-line, that only one test should be run (that is, specify the test class and test member variable)? If not, is there another framework that has this feature?

    Read the article

  • linq Except and custom IEqualityComparer

    - by Joe
    I'm trying to implement a custom comparer on two lists of strings and use the .Except() linq method to get those that aren't one one of the lists. The reason I'm doing a custom comparer is because I need to do a "fuzzy" compare, i.e. one string on one list could be embedded inside a string on the other list. I've made the following comparer ` public class ItemFuzzyMatchComparer : IEqualityComparer { bool IEqualityComparer<string>.Equals(string x, string y) { return (x.Contains(y) || y.Contains(x)); } int IEqualityComparer<string>.GetHashCode(string obj) { if (Object.ReferenceEquals(obj, null)) return 0; return obj.GetHashCode(); } } ` When I debug, the only breakpoint that hits is in the GetHashCode() method. The Equals() never gets touched. Any ideas?

    Read the article

  • What Is The Proper Location For One-Offs In VCS Repos?

    - by Joe Clark
    I have recently started using Mercurial as our VCS. Over the years, I have used RCS, CVS, and - for the last 5 years - SVN. Back 13 years ago, when I primarily used CVS and RCS, large projects went into CVS and one-offs were edited in place on the specific server and stored in RCS. This worked well as the one-offs were usually specific to the server and the servers were backed up nightly. Jump forward a decade and a lot of the one-off scripts became less centralized - they might be needed on any server at some random time. This was also OK, because now I was a begrudging SVN user. Everything (except for docs) got dumped into one repo. Jump to 2010. Now I am using Mercurial and am putting large projects in their own repo again. But what to do with the one-offs? The options as I see them: A repo for each script. It seems a bit cluttered to create a repo for every one page script that might get ran once a year. RCS Not an option. There are many possible servers that might need a specific script. Continuing to use SVN just for one-offs. No. There no advantage I see over the next option. Create a repo in Mercurial named "one-offs". This seems the most workable. The last option seems the best to me - however; is there a best practice regarding this? You also might be wondering if these scripts are truly one-offs if they will be reused. Some of them may be reused 6 months or a year from now - some, never. However, nearly all of them involve several man-hours of work due to either complex logic or extensive error checking. Simply discarding them is not efficient.

    Read the article

  • Text encoding in HTML text fields

    - by joe
    I have a site up that has a form on it. The form POSTs to a php script which then inserts the data into my database. The page has a charset=UTF-8 attribute in the <meta> tag, and the database is setup to use UTF-8. However, when I copy and paste characters from MS Word into the field, the output is messed up. For example, the quotes in I am using "Microsoft Word" '''' become I am using “Microsoft Word†???? in the database. Anyone have any idea why this might occur?

    Read the article

  • Visual Studio 2005 "Add Web Deployment Project..." not showing up for web application projects.

    - by Joe Sands
    I downloaded the Web Deployment Project plug-in for Visual Studio 2005. I installed it. I have a project that I am working on that is a Web Application Project. The Add Web Deployment Project Build menu selection is not in the Build Menu or Solution Explorer. If I create a raw test Web Site Project, the menu item magically appears. Is this by design or am I missing something. Also, I am completely up to date on all the VS 2005 updates.

    Read the article

  • Actionscript 3.0 - drag and throw with easing

    - by Joe Hamilton
    I'm creating a map in flash and I would like to have a smooth movement similar to this: http://www.conceptm.nl/ I have made a start but I'm having trouble taking it to the next stage. My code currently throws the movieclip after the mouse is release but there is no easing while the mouse button is down. Any tips on how I would achieve this? Here is my current code: // Vars var previousPostionX:Number; var previousPostionY:Number; var throwSpeedX:Number; var throwSpeedY:Number; var isItDown:Boolean; // Event Listeners addEventListener(MouseEvent.MOUSE_DOWN, clicked); addEventListener(MouseEvent.MOUSE_UP, released); // Event Handlers function clicked(theEvent:Event) { isItDown =true; addEventListener(Event.ENTER_FRAME, updateView); } function released(theEvent:Event) { isItDown =false; } function updateView(theEvent:Event) { if (isItDown==true){ throwSpeedX = mouseX - previousPostionX; throwSpeedY = mouseY - previousPostionY; mcTestMovieClip.x = mouseX; mcTestMovieClip.y = mouseY; } else{ mcTestMovieClip.x += throwSpeedX; mcTestMovieClip.y += throwSpeedY; throwSpeedX *=0.9; throwSpeedY *=0.9; } previousPostionX= mcTestMovieClip.x; previousPostionY= mcTestMovieClip.y; }

    Read the article

  • Problems with $libdir on PostgreSQL

    - by Joe Germuska
    In short, my question is "why doesn't $libdir work on my PSQL installation." CREATE FUNCTION st_box2d_in(cstring) RETURNS box2d AS '$libdir/liblwgeom', 'BOX2DFLOAT4_in' LANGUAGE c IMMUTABLE STRICT; yields an error could not access file "$libdir/liblwgeom": No such file or directory while CREATE FUNCTION st_box2d_in(cstring) RETURNS box2d AS '/usr/local/pgsql/lib/liblwgeom', 'BOX2DFLOAT4_in' LANGUAGE c IMMUTABLE STRICT; works correctly. The output of % pg_config --pkglibdir /usr/local/pgsql/lib appears to be correct.

    Read the article

  • 'Invalid column name [ColumnName]' on a nested linq query.

    - by Joe
    I've got the following query: ATable .GroupBy(x=> new {FieldA = x.FieldAID, FieldB = x.FieldBID, FieldC = x.FieldCID}) .Select(x=>new {FieldA = x.Key.FieldA, ..., last_seen = x.OrderByDescending(y=>y.Timestamp).FirstOrDefault().Timestamp}) results in: SqlException: Invalid column name 'FieldAID' x 5 SqlException: Invalid column name 'FieldBID' x 5 SqlException: Invalid column name 'FieldCID' x 1 I've worked out it has to do with the last query to Timestamp because this works: ATable .GroupBy(x=> new {FieldA = x.FieldAID, FieldB = x.FieldBID, FieldC = x.FieldCID}) .Select(x=>new {FieldA = x.Key.FieldA, ..., last_seen = x.OrderByDescending(y=>y.Timestamp).FirstOrDefault()}) The query has been simplified. The purpose is to group by a set of variables and then show the last time this grouping occured in the db. I'm using Linqpad 4 to generate these results so the Timestamp gives me a string whereas FirstOrDefault gives me the whole object which isn't ideal. Update On further testing I've noticed that the number and type of SQLException is related to the class created in the groupby clause. So, ATable .GroupBy(x=> new {FieldA = x.FieldAID}) .Select(x=>new {FieldA = x.Key.FieldA, last_seen = x.OrderByDescending(y=>y.Timestamp).FirstOrDefault()}) results in SqlException: Invalid column name 'FieldAID' x 5

    Read the article

  • iPhone sdk Cocoa Touch - Pass touches down from parent UIView to child UIScrollview

    - by Joe
    I have a UIView inside my xib in IB and inside that is a UIScrollview that is a small 80x80 square and dynamically loaded with 8 or so 80 x 80 thumbnail images. The UIScrollview is not clipping the images so that they extend out either side so you can swipe left and right to scroll a chosen image into the the centre, paging is on so they snap ti each image. I have researched and found this is the best and possibly only way to do this. The UIScrollview sits in a 'container' UIView for one reason, it is there to receive the touches/swipes and pass them down to it's child the UIScrollview as otherwise all touches would have to start in the small 80x80 UIScrollview area and I wan them to be anywhere along the row of images. I have seen some sample code somewhere for doing this but just can not implement it. Treat me as a noob, starting from beginning to end, how should the UIView and UIScrollview be set up in IB to allow any touches to be passed, and what code should I put into where? The UIView is set up as scroll_container and the child UIScrollview is char_scroll At the moment I have got it all working except for the touches being passed from the parent to the child, and at the moment the touches have to always start inside the UIScrollview (tiny 80x80 box in centre) when I want to be able to swipe left or right in the long 480X80 horizontal parent UIView and have this still scroll the child UIScrollview. Hope you can help and understand what I mean!

    Read the article

  • Is there a way to get YQL to return HTML?

    - by Joe Shaw
    I am trying to use YQL to extract a portion of HTML from a series of web pages. The pages themselves have slightly different structure (so a Yahoo Pipes "Fetch Page" with its "Cut content" feature does not work well) but the fragment I am interested in always has the same class attribute. If I have an HTML page like this: <html> <body> <div class="foo"> <p>Wolf</p> <ul> <li>Dog</li> <li>Cat</li> </ul> </div> </body> </html> and use a YQL expression like this: SELECT * FROM html WHERE url="http://example.com/containing-the-fragment-above" AND xpath="//div[@class='foo']" what I get back are the (apparently unordered?) DOM elements, where what I want is the HTML content itself. I've tried SELECT content as well, but that only selects textual content. I want HTML. Is this possible?

    Read the article

  • Debugging NSoperation BAD ACCESS within graphics context

    - by Joe
    I tried everything to debug this one but I can't get to the bottom of it. This code lives in a subclass of NSOperation which is processed from a queue: (borders is an ivar NSArray containing 5 UIimage objects) NSMutableArray *images = [[NSMutableArray alloc] init]; for (unsigned i = 0; i < 5; i++) { CGSize size = CGSizeMake(60, 60); UIGraphicsBeginImageContext(size); CGPoint thumbPoint = CGPointMake(6, 6); [controller.image drawAtPoint:thumbPoint]; CGPoint borderPoint = CGPointMake(0, 0); [[borders objectAtIndex:i] drawAtPoint:borderPoint]; [images addObject:UIGraphicsGetImageFromCurrentImageContext()]; UIGraphicsEndImageContext(); } [images release]; The code works fine most of the time but when I push the iphone by access subviews and pressing lots of buttons on the UI I either get this exception which is trapped by the operation: Exception Load view: *** -[NSCFArray insertObject:atIndex:]: attempt to insert nil or I get this: Program received signal: “EXC_BAD_ACCESS”. The exception is caused because UIGraphicsGetImageFromCurrentImageContext() return nil. I don't know how to debug the EXC_BAD_ACCESS but I'm guessing that this error (in fact both of these errors) is caused by low memory. The debugger stops at the line: [controller.image drawAtPoint:thumbPoint]; As I mentioned I've trapped the exception so I can live with that but the EXC_BAD_ACCESS is more serious. IF this is memory related how can I tell and is it possible to increase the memory available to NSOperation?

    Read the article

  • Defining a SPI in Clojure

    - by Joe Holloway
    I'm looking for an idiomatic way(s) to define an interface in Clojure that can be implemented by an external "service provider". My application would locate and instantiate the service provider module at runtime and delegate certain responsibilities to it. Let's say, for example, that I'm implementing a RPC mechanism and I want to allow a custom middleware to be injected at configuration time. This middleware could pre-process the message, discard messages, wrap the message handler with logging, etc. I know several ways to do this if I fall back to Java reflection, but feel that implementing it in Clojure would help my understanding. (Note, I'm using SPI in a general sense here, not specifically referring to the way it's defined in the JAR file specification) Thanks

    Read the article

  • Switching from Java to .NET from a career change point of view

    - by Joe
    Could anyone share with me their experience with switching from Java to .NET from a career point of view? I've been a Java developer for 12 years and am just getting tired of how fragmented the Java world has become. For my liking, there's just too many frameworks, tools, application servers, etc.. And it seems each new tool just adds complexity and time to even the simplest of projects. I'm not trying to start any wars - I'm just giving you the reason I ask the main question. I've read a few books on .NET and have done one WebForms job. I love the integrated environment and would like to hear how others transitioned from Java to .NET. What I mean by that is did you do it somehow as a contractor or did you join a company as a beginner .NET developer with much Java experience? Personally, I'm ready to take the leap if I can figure out how to not lose too much income in the process (Senior Java developer to beginner .NET developer). I would really appreciate hearing your stories.

    Read the article

  • Can MySQL Nested Select return list of results

    - by John
    Hi I want to write a mysql statement which will return a list of results from one table along with a comma separated list of field from another table. I think an example might better explain it Table 1 ======================== id First_Name Surname ---------------------- 1 Joe Bloggs 2 Mike Smith 3 Jane Doe Table 2 ======================== id Person_Id Job_id --------------------- 1 1 1 2 1 2 3 2 2 4 3 3 5 3 4 I want to return a list of people with a comma separated list of job_ids. So my result set would be id First_Name Surname job_id ------------------------------ 1 Joe Bloggs 1,2 2 Mike Smith 2 3 Jane Doe 3,4 I guess the sql would be something like select id, First_Name, Surname, (SELECT job_id FROM Table 2) as job_id from Table 1 but obviously this does not work so need to change the '(SELECT job_id FROM Table 2) as job_id' part. Hope this makes sense Thanks John

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >