Search Results

Search found 512 results on 21 pages for 'toby allen'.

Page 5/21 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Where Is TShellListView in Delphi 2009?

    - by Toby Allen
    We have recently moved to Delphi 2009. I can't find the TShellListView and TShellTreeView controls. Do I need to install something extra? From searching the web it seems they are shipped with Delphi 2009 but for some reason they havent been installed. Has anyone had a similar problem? Update: This is so unbelivably idiotic. It appears codegear have installed the demos to the allusers section of documents and settings C:\Documents and Settings\All Users\Documents\RAD Studio\6.0\Demos\DelphiWin32\VCLWin32\ShellControls Answer here

    Read the article

  • SVG animation along path with Raphael

    - by Toby Hede
    I have a rather interesting issue with SVG animation. I am animating along a circular path using Raphael obj = canvas.circle(x, y, size); path = canvas.circlePath(x, y, radius); path = canvas.path(path); //generate path from path value string obj.animateAlong(path, rate, false); The circlePath method is one I have created myself to generate the circle path in SVG path notation: Raphael.fn.circlePath = function(x , y, r) { var s = "M" + x + "," + (y-r) + "A"+r+","+r+",0,1,1,"+(x-0.1)+","+(y-r)+" z"; return s; } So far, so good. This all works. I have my object (obj) animating along the circular path. BUT: The animation only works if I create the object at the same X, Y coords as the path itself. If I start the animation from any other coordinates (say, half-way along the path) the object animates in a circle of the correct radius, however it starts the animation from the object X,Y coordinates, rather than along the path as it is displayed visually. Ideally I would like to be able to stop/start the animation - the same problem occurs on restart. When I stop then restart the animation, it animates in a circle starting from the stopped X,Y.

    Read the article

  • T-SQL selecting values that match ISNUMERIC and also are within a specified range. (plus Linq-to-sql

    - by Toby
    I am trying to select rows from a table where one of the (NVARCHAR) columns is within a numeric range. SELECT ID, Value FROM Data WHERE ISNUMERIC(Value) = 1 AND CONVERT(FLOAT, Value) < 66.6 Unfortunately as part of the SQL spec the AND clauses don't have to short circuit (and don't on MSSQL Server EE 2008). More info: http://stackoverflow.com/questions/789231/is-the-sql-where-clause-short-circuit-evaluated My next attempt was to try this to see if I could achieve delayed evaluation of the CONVERT SELECT ID, Value FROM Data WHERE (CASE WHEN ISNUMERIC(Value) = 1 THEN CONVERT(FLOAT, Value) < 66.6 ELSE 0 END) but I cannot seem to use a < (or any comparison) with the result of a CONVERT. It fails with the error Incorrect syntax near '<'. I can get away with SELECT ID, CONVERT(FLOAT, Value) AS Value FROM Data WHERE ISNUMERIC(Value) = 1 So the obvious solution is to wrap the whole select statement in another SELECT and WHERE and return the converted values from the inner select and filter in there where of the outer select. Unfortunately this is where my Linq-to-sql problem comes in. I am filtering not only by one range but potentialy by many, or just by the existance of the record (there are some date range selects and comparisons I've left out.) Essentially I would like to be able to generate something like this: SELECT ID, TypeID, Value FROM Data WHERE (TypeID = 4 AND ISNUMERIC(Value) AND CONVERT(Float, Value) < 66.6) OR (TypeID = 8 AND ISNUMERIC(Value) AND CONVERT(Float, Value) > 99) OR (TypeID = 9) (With some other clauses in each of those where options.) This clearly doesn't work if I filter out the non-ISNUMERIC values in an inner select. As I mentioned I am using Linq-to-sql (and PredicateBulider) to build up these queries but unfortunately Datas.Where(x => ISNUMERIC(x.Value) ? Convert.ToDouble(x.Value) < 66.6 : false) Gets converted to this which fails the initial problem. WHERE (ISNUMERIC([t0].[Value]) = 1) AND ((CONVERT(Float,[t0].[Value])) < @p0) My last resort will have to be to outer join against a double select on the same table for each of the comparisons but this isn't really an idea solution. I was wondering if anyone has run into similar issues before?

    Read the article

  • Objective-C classes, pointers to primitive types, etc.

    - by Toby Wilson
    I'll cut a really long story short and give an example of my problem. Given a class that has a pointer to a primitive type as a property: @interface ClassOne : NSObject { int* aNumber } @property int* aNumber; The class is instantiated, and aNumber is allocated and assigned a value, accordingly: ClassOne* bob = [[ClassOne alloc] init]; bob.aNumber = malloc(sizeof(int)); *bob.aNumber = 5; It is then passed, by reference, to assign the aNumber value of a seperate instance of this type of class, accordingly: ClassOne* fred = [[ClassOne alloc] init]; fred.aNumber = bob.aNumber; Fred's aNumber pointer is then freed, reallocated, and assigned a new value, for example 7. Now, the problem I'm having; Since Fred has been assigned the same pointer that Bob had, I would expect that Bob's aNumber will now have a value of 7. It doesn't, because for some reason it's pointer was freed, but not reassigned (it is still pointing to the same address it was first allocated which is now freed). Fred's pointer, however, has the allocated value 7 in a different memory location. Why is it behaving like this? What am I minsunderstanding? How can I make it work like C++ does?

    Read the article

  • UIView drawRect; class variables out of scope

    - by Toby Wilson
    Short & sweet version of my last question in light of new information. I have a UIVIew with an init and a drawrect method (and another thread and a bunch of other stuff, but I'll keep it short & sweet). All of the class variables that I alloc and init in the -(id)init method are out of scope/nil/0x0 in the drawRect method, and I am unable to access them. For example; In the interface: NSObject* fred; In the implementation: -(id)init { if(self == [super init]) { fred = [[NSObject alloc] init]; } return self; } -(void)drawRect:(CGRect)rect { NSLog(@"Fred is retained %i times",[fred retainCount]); //FAIL NSLog(@"But his variable is actually just pointing at uninitialised 0x0, so you're not reading this in the debugger because the application has crashed before it got here." } Should add that init IS being called before drawRect also. Anyone have any ideas?

    Read the article

  • rspec, autotest and Rails 3 beta 2 can't find executable issue

    - by Toby Hede
    I am running Rails 3 Beta2 and attempting to get Autotest working with rspec. When I run autospec, I receive the following message: /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb:334:in `bin_path': can't find executable autospec for rspec-2.0.0.beta.5 (Gem::Exception) from /usr/local/bin/autospec:19 I am using Ruby 1.9.1 with the following Gems: rails (3.0.0.beta2) railties (3.0.0.beta2) rspec (2.0.0.beta.5) rspec-core (2.0.0.beta.5) rspec-expectations (2.0.0.beta.5) rspec-mocks (2.0.0.beta.5) rspec-rails (2.0.0.beta.5) ZenTest (4.3.1) Any help would be greatly appreciated.

    Read the article

  • [[UIDevice currentDevice] orientation] always null

    - by Toby Wilson
    As per the title. Calling [[UIDevice currentDevice] BeginGeneratingDeviceOrientationNotifications] has no effect. DidRotateToInterfaceOrientation etc events are working fine, but I need to be able to poll the device orientation arbitrarily. How can I fix/do this? The long story: I have a tab application with a navigation controller on each tab. The root view of tab number one is a graph that goes full screen when the orientation changes to landscape; however this needs to be checked whenever the view appears as the orientation change could have occurred elsewhere, so I was hoping to poll the orientation state whenever this view appears.

    Read the article

  • H.264 over RTP - Identify SPS and PPS Frames

    - by Toby
    I have a raw H.264 Stream from an IP Camera packed in RTP frames. I want to get raw H.264 data into a file so I can convert it with ffmpeg. So when I want to write the data into my raw H.264 file I found out it has to look like this: 00 00 01 [SPS] 00 00 01 [PPS] 00 00 01 [NALByte] [PAYLOAD RTP Frame 1] // Payload always without the first 2 Bytes -> NAL [PAYLOAD RTP Frame 2] [... until PAYLOAD Frame with Mark Bit received] // From here its a new Video Frame 00 00 01 [NAL BYTE] [PAYLOAD RTP Frame 1] .... So I get the SPS and the PPS from the Session Description Protocol out of my preceding RTSP communication. Additionally the camera sends the SPS and the PPSin two single messages before starting with the video stream itself. So I capture the messages in this order: 1. Preceding RTSP Communication here ( including SDP with SPS and PPS ) 2. RTP Frame with Payload: 67 42 80 28 DA 01 40 16 C4 // This is the SPS 3. RTP Frame with Payload: 68 CE 3C 80 // This is the PPS 4. RTP Frame with Payload: ... // Video Data Then there come some Frames with Payload and at some point a RTP Frame with the Marker Bit = 1. This means ( if I got it right) that I have a complete video frame. Afer this I write the Prefix Sequence ( 00 00 01 ) and the NALfrom the payload again and go on with the same procedure. Now my camera sends me after every 8 complete Video Frames the SPS and the PPS again. ( Again in two RTP Frames, as seen in the example above ). I know that especially the PPS can change in between streaming but that's not the problem. My questions are now: 1. Do I need to write the SPS/PPS every 8th Video Frame? If my SPS and my PPS don't change it should be enough to have them written at the very beginning of my file and nothing more? 2. How to distinguish between SPS/PPS and normal RTP Frames? In my C++ Code which parses the transmitted data I need make a difference between the RTP Frames with normal Payload an the ones carrying the SPS/PPS. How can I distinguish them? Okay the SPS/PPS frames are usually way smaller, but that's not a save call to rely on. Because if I ignore them I need to know which data I can throw away, or if I need to write them I need to put the 00 00 01 Prefix in front of them. ? Or is it a fixed rule that they occur every 8th Video Frame?

    Read the article

  • vb.net system beep sound on XP

    - by Toby
    Is it possible to have a vb.net program sound the PC's internal speaker? you know the one that produces C's \a BELL I have tried beep(), but this only produces the error sound on the sound card. I have also tried <Runtime.InteropServices.DllImport("KERNEL32.DLL", EntryPoint:="Beep", SetLastError:=True, _ CharSet:=Runtime.InteropServices.CharSet.Unicode, ExactSpelling:=True, _ CallingConvention:=Runtime.InteropServices.CallingConvention.StdCall)> _ Public Shared Function _ aBeep(ByVal dwFreq As Integer, ByVal dwDuration As Integer) _ As Boolean End Function With no joy apparently its only good on vista and above Any suggestions? thanks

    Read the article

  • Progressive Enhancement with box-shadow

    - by toby
    I would like to use WebKit's box-shadow css property for a little drop-down. The code would look like: .drop_down{ -webkit-box-shadow: 1px 1px 4px #888; box-shadow: 1px 1px 4px #888; } However, for browsers that do not have this capability, I would like to use borders to approximate this drop shadow, like so: .drop_down{ border-top: 1px solid #bbb; border-left: 1px solid #bbb; border-right: 2px solid #bbb; border-bottom: 2px solid #bbb; } The problem is, I don't want the border-based shadow to show up for the browsers that DO support box-shadow. I would like to avoid browser sniffing because I assume it's hard to cover all the cases. What is the simplest way to do this? I prefer a javascript-less solution, but I will consider simple javascript-based ones too.

    Read the article

  • Erlang OTP application design

    - by Toby Hede
    I am struggling a little coming to grips with the OTP development model as I convert some code into an OTP app. I am essentially making a web crawler and I just don't quite know where to put the code that does the actual work. I have a supervisor which starts my worker: -behaviour(supervisor). -define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}). init(_Args) -> Children = [ ?CHILD(crawler, worker) ], RestartStrategy = {one_for_one, 0, 1}, {ok, {RestartStrategy, Children}}. In this design, the Crawler Worker is then responsible for doing the actual work: -behaviour(gen_server). start_link() -> gen_server:start_link(?MODULE, [], []). init([]) -> inets:start(), httpc:set_options([{verbose_mode,true}]), % gen_server:cast(?MODULE, crawl), % ok = do_crawl(), {ok, #state{}}. do_crawl() -> % crawl! ok. handle_cast(crawl}, State) -> ok = do_crawl(), {noreply, State}; do_crawl spawns a fairly large number of processes and requests that handle the work of crawling via http. Question, ultimately is: where should the actual crawl happen? As can be seen above I have been experimenting with different ways of triggering the actual work, but still missing some concept essential for grokering the way things fit together. Note: some of the OTP plumbing is left out for brevity - the plumbing is all there and the system all hangs together

    Read the article

  • Git access on Heroku deployment and others: connection refused

    - by Toby Hede
    I have suddenly run into an issue using git. I created a new app, went to push to Heroku and now see: ssh: connect to host heroku.com port 22: Connection refused My other previously working Heroku apps no longer work, receiving the same error. Other Heroku commands work (create, info, db:push). I also see the error when accessing Git on my unfuddle accounts. I can SSH to other services, so it doesn't look like it's my machine. Any ideas?

    Read the article

  • Heroku deployment: connection refused

    - by Toby Hede
    I have suddenly run into an issue deploying to Heroku. I created a new app, went to push and now see: ssh: connect to host heroku.com port 22: Connection refused My other previously working Heroku apps no longer work, receiving the same error. Other Heroku commands work (create, info, db:push). I can SSH to other services, so it doesn't look like it's my machine. Any ideas?

    Read the article

  • Change the height of a list item when it's in edit mode

    - by toby
    I have custom list item renderers and editors for a List control. I need for the editor to have a greater height then the renderer, i.e., the row should expand(in height) when it goes into edit mode. However, even when the list's variableRowHeight is set to true, it doesn't do what I want: the height seems to be based on the height of the renderer only, not the editor. Is there any way to do what I want?

    Read the article

  • setting target for disclosure button on subclassed UITableViewCell

    - by Toby Wilson
    I've created a subclass of UITableViewCell to create some custom appearance and UI functionality ('swipe to reveal delete button'). Some of the cells are disclosure/detail disclosure type, and have a UIButtonTypeDetailDisclosure etc added manually. I cannot use the table view controllers' UITableViewCellAccessory for row at index path method. The question is, how do I set the target of these manually added buttons so that they correctly send the didSelectRowAtIndexPath to their table view controller?

    Read the article

  • Connection error with heroku db:push with postgresql

    - by Toby Hede
    I have suddenly started seeing this strange error when trying to push my database to heroku. > heroku db:push Auto-detected local database: postgres://infinity:infinity@localhost/infinity_development?encoding=utf8 Failed to connect to database: Sequel::DatabaseConnectionError -> TypeError wrong argument type String (expected Array) My app works fine - the credentials are all set locally.

    Read the article

  • Objective-C NSDate memory issue (again)

    - by Toby Wilson
    I'm developing a graphing application and am attempting to change the renderer from OpenGL to Quartz2D to make text rendering easier. A retained NSDate object that was working fine before suddenly seems to be deallocating itself, causing a crash when an NSMutableString attempts to append it's decription (now 'nil'). Build & analyse doesn't report any potential problems. Simplified, the code looks like this: NSDate* aDate -(id)init { aDate = [[NSDate date] retain] return self; } -(void)drawRect(CGRect)rect { NSMutableString* stringy = [[NSMutableString alloc] init]; //aDate is now deallocated and pointing at 0x0? [stringy appendString:[aDate description]]; //Crash } I should stress that the actual code is a lot more complicated than that, with a seperate thread also accessing the date object, however suitable locks are in place and when stepping through the code [aDate release] is not being called anywhere. Using [[NSDate alloc] init] bears the same effect. I should also add that init IS the first function to be called. Can anyone suggest something I may have overlooked, or why the NSDate object is (or appears to be) releasing itself?

    Read the article

  • iPhone NSTimer OpenGL problem

    - by Toby Wilson
    I've got a problem that only seems to occur on the device, not in the simulator. My app's animation is started and stopped using these methods: NSTimer* animationTimer; -(void)startAnimation { if(animationTimer = nil) animationTimer = [NSTimer scheduledTimerWithTimeInterval:1.0f/60.0f target:self selector:@selector(drawView) userInfo:nil repeats:YES]; } -(void)stopAnimation { [animationTimer invalidate]; animationTimer = nil; } In the simulator this works fine and drawView starts being called at 60fps. On the device (testing on iPod Touch), the scheduleTimerWithTimeInterval method doesn't seem to work. Furthermore, [animationTimer invalidate] causes EXC_BAD_ACCESS. I've spotted an obvious but minor flaw; adding if(animationTimer != nil) to the stopAnimation method will prevent the crash, but doesn't solve the problem of the animation timer not being properly initialised. Edit: The above doesn't prevent a crash. animationTimer != nil yet calling invalidate causes EXC_BAD_ACCESS. Should also add, this problem doesn't occur all the time on the device. Maybe 40% of the time.

    Read the article

  • GORM column names for simple one to many mapping

    - by Toby Hobson
    I have this setup class User { Date lastLogin // logins is a history of logins static hasMany = [logins : Date] def setLastLogin(Date date) { if (date) { lastLogin = date addToLogins(date) } } } GORM is generating a table MEMBER_LOGINS which currently looks like this: USER_ID, LOGINS Instead I would like USER_ID, DATE I tried adding a mapping in User static mapping = { logins column: 'date'; } But that just changed the foreign key so i now have DATE, LOGINS How can I change the LOGINS column? Thanks!

    Read the article

  • CSS overflow character not pushing down <div>

    - by Uncle Toby
    I have a <div> called bigbox which contain a <div>called wrapper . The wrapper contain 2 <div> called textbox and checkbox. If the characters inside textbox overflow , it doesn't push the other wrapper below . How can I make the below wrapper go down ? here is the jsfiddle : http://jsfiddle.net/WA63P/ <html> <head> <title>Page</title> <script type="text/javascript" src="jquery-1.9.1.min.js"></script> <style type="text/css"> .bigbox { background-color: #F5E49C; color: #000; padding: 0 5px; width:280px; height:500px; position: absolute; text-align: center;content: "";display: block;clear: both; } .box { background-color: #272822; color: #9C5A3C; height:100px; width:260px; margin-bottom: 10px; position: relative; top:10px; } .textbox { background-color: #FFFFFF; color: #272822; height:100px; width:160px;float:left;text-align: left } .checkbox { background-color: #FFFFFF; height:50px; width:50px; float:right; d } </style> <div class="bigbox"> <div class="box"> <div class="textbox">background background background background background background background background background background background background background background background background background background background background background background </div> <div class="checkbox"> </div> </div> <div class="box"> <div class="textbox"> </div> <div class="checkbox"> </div> </div> </body> </html>

    Read the article

  • Randomly Losing Session Variables Only In Google Chrome & URL Rewriting

    - by Toby
    Using Google Chrome, I'm seemingly losing/corrupting session data when navigating between pages (PHP 5.0.4, Apache 2.0.54). The website works perfectly fine in IE7/8, Firefox, Safari & Opera. The issue is only with Google Chrome. I narrowed down the problem. I'm using search friendly URL's, and hiding my front controller (index.php) via a .htaccess file. So the URL looks like: www.domain.com/blah/blah/ Here's the .htaccess file contents: Options +FollowSymlinks RewriteEngine on #allow cool urls RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) index.php [L] #allow to have Url without index.php If I remove the .htaccess file, and expose the front controller in the URL: www.domain.com/index.php/blah/blah/, Chrome works perfectly fine. Any thoughts ideas? I'm thinking it's some kind of problem with how Chrome identifies what cookie to use and send to the server? This happens in Chrome 4 & 5. Thanks!

    Read the article

  • Getting Excel add ins to modify array formula parameters; or perform 'ctrl-shift-enter'

    - by Toby Wilson
    I am trying to make a C# Excel add in change the parameters of an array formula in-place; i.e. do the same as a user modifying an array formula and hitting ctrl-shift-enter. Setting the activeCell.FormulaArray property does not achieve this; it throws a 'You cannot change part of an array' error. Does anyone know how I can achieve this? A solution that also works in VBA would be brilliant. I've tried creating some logic that 'walks' to the perimeter of the array formula and deletes it first, but it doesn't account for adjacent array formulas and I believe this is unnecessarily drastic.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >