Search Results

Search found 1927 results on 78 pages for 'steve ward'.

Page 10/78 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • AdMob and UINavigationControllers

    - by Ward
    I'm playing around with AdMob and I"m trying to get something going with an auto-rotating view inside a uinavigationcontroller. I have the ad at the top of the screen. Not sure if this is the right approach, but in my LoadView method I have: self.navigationController.view.frame = CGRectMake(0,48,320,432); The navbar appears below the ad. When I rotate the phone to landscape is there a way to get the navbar (which is now across the top) to be 432px wide so it doesn't get cut off under the ad? I tried writing a method that is called when the device orientation changes, but it seems like manipulating the view on the navigationcontroller screws things up for every orientation except portrait. The view keeps getting shorter until it disappears. Thanks, Howie

    Read the article

  • Creating a (ClickOnce) setup for VSTO Outlook Add-in

    - by Ward Werbrouck
    So I created an Outlook Add-in and used the click-once setup to deploy it. The setup runs fine when the user is administrator, but otherwise: no go. Running the setup with "run as..." and logging in as admin works, but than the add-in is installed under the admin, not the current user. The addin doesn't show up in outlook. I tried following this guide: http://blogs.msdn.com/mshneer/archive/2008/04/24/deploying-your-vsto-add-in-to-all-users-part-iii.aspx But I get stuck at part I: http://blogs.msdn.com/mshneer/archive/2007/09/04/deploying-your-vsto-add-in-to-all-users-part-i.aspx I follow the examples and start excel as described: Now start Excel application. Examine the registry keys in HKCU hive e.g. you will find two interesting registry keys that appear under your HKCU hive: HKCU\Software\Microsoft\Office\TestKey registry key containing registry value TestValue You now also have HKCU\Software\Microsoft\Office\12.0\User Settings\TestPropagation registry key with Count value set to 1 But on my machine, the keys are not created... What can I try next?

    Read the article

  • WPF Style - value based on another control's property

    - by David Ward
    Is it possible to set the BorderBrush property in a style, to the value of the BorderBrush property of an instance of another control? Something like: <Style x:Key="{x:Type Controls:TimePicker}" TargetType="Controls:TimePicker"> <Setter Property="BorderBrush" Value="[ElementName=txtText Property=BorderBrush]"/> </Style> The reason for this is that I'm using Infragistics controls that have a "Theme" that can be changed and I want my custom control to change border style at the same time.

    Read the article

  • Rewriting URL's in codeigniter with url_title()?

    - by Craig Ward
    I am rewriting my website with codeigniter and have something I want to do but not sure it is possible. I have a gallery on my site powered by the Flickr API. Here is an example of the code I use to display the Landscape pictures: <?php foreach ($landscapes->photoset->photo as $l->photoset->photo) : ?> <a >photoset->photo->farm ?>/<?php echo $l->photoset->photo->server ?>/<?php echo $l->photoset->photo->id ?>/<?php echo $l->photoset->photo->secret ?>/<?php echo $l->photoset->photo->title ?>'> <img class='f_thumb'>photoset->photo->farm ?>.static.flickr.com/<?php echo $l->photoset->photo->server ?>/<?php echo $l->photoset->photo->id ?>_<?php echo $l->photoset->photo->secret ?>_s.jpg' title='<?php echo $l->photoset->photo->title ?>' alt='<?php echo $l->photoset->photo->title ?>' /></a> <?php endforeach; ?> As you can see when a user clicks on a picture I pass over the Farm, Server, ID, Secret and Title elements using URI segments and build the page in the controller using $data['farm'] = $this->uri->segment(3); $data['server'] = $this->uri->segment(4); $data['id'] = $this->uri->segment(5); $data['secret'] = $this->uri->segment(6); $data['title'] = $this->uri->segment(7); Everything works and is fine but the URL’s are a tad long, example “http://localhost:8888/wip/index.php/gallery/focus/3/2682/4368875046/e8f97f61d9/Old Mill House in Donegal” Is there a way to rewrite the URL so its more like “http://localhost:8888/wip/index.php/gallery/focus/Old_Mill_House_in_Donegal” I was looking at using: $url_title = $this->uri->segment(7); $url_title = url_title($url_title, 'underscore', TRUE); But I don’t seem to be able to get it to work. Any ideas?

    Read the article

  • Generate a random alphanumeric string in cocoa

    - by Ward
    Hey there, I know this can't be that hard. I've searched, but I can't seem to find a simple solution. I want to call a method, pass it the length and have it generate a random alphanumeric string. Any ideas? Are there any utility libraries out there that may have a bunch of these types of functions? Thanks, Howie

    Read the article

  • Cocoa - Enumerate mutable array, removing objects

    - by Ward
    Hey there, I have a mutable array that contains mutable dictionaries with strings for the keys latitude, longitude and id. Some of the latitude and longitude values are the same and I want to remove the duplicates from the array so I only have one object per location. I can enumerate my array and using a second enumeration review each object to find objects that have different ids, but the same latitude and longitude, but if I try to remove the object, I'm muting the array during enumeration. Is there any way to remove objects from an array while enumerating so I only enumerate the current set of objects as the array is updated? Hope this question makes sense. Thanks, Howie

    Read the article

  • What is all this stuff in the CKEditor folder?

    - by Ashley Ward
    A while ago I downloaded the latest version (3.1) of the CKEditor text editor. The directory name was ckeditor and I deleted the ckeditor/_source and ckeditor/_samples sub-directories, then I referenced the ckeditor.js file in my html pages, like so : <script type="text/javascript" src="ckeditor/ckeditor.js"></script> this works well. To make config changes, I have been modifying the ckeditor/config.js file. However, as of late, I have been reading various web resources that say 'do not delete the _source' folder and other such ominous messages. What is this _source folder? What is all the stuff at the root of the ckeditor folder? and, What is safe to remove from the folder?

    Read the article

  • WCF - Passing CurrentPrincipal in the Header

    - by David Ward
    I have a WCF service that needs to know the Principal of the calling user. In the constructor of the service I have: Principal = OperationContext.Current.IncomingMessageHeaders.GetHeader<MyPrincipal>("myPrincipal", "ns"); and in the calling code I have something like: using (var factory = new ChannelFactory<IMyService>(localBinding, endpoint)) { var proxy = factory.CreateChannel(); using (var scope = new OperationContextScope((IContextChannel)proxy)) { var customHeader = MessageHeader.CreateHeader("myPrincipal", "ns", Thread.CurrentPrincipal); OperationContext.Current.OutgoingMessageHeaders.Add(customHeader); newList = proxy.CreateList(); } } This all works fine. My question is, how can I avoid having to wrap all proxy method calls in the using (var scope...{ [create header and add to OperationContext]? Could I create a custom ChannelFactory that will handle adding the myPrincipal header to the operation context? Something like that would save a whole load of copy/paste which I'd rather not do but I'm not sure how to achieve it:) Thanks

    Read the article

  • Proper way to return an array

    - by Ward
    Hey there, I never seem to get this right. I've got a method that returns a mutable array. What is the proper way to return the array and avoid potential memory leaks? If I plan to store the results locally inside another view controller, does that affect the way the array should be returned? Lastly, what if it's just an non-mutable array? Does that require a different technique? thanks, Howie

    Read the article

  • UIButton Origin and Device Orientation

    - by Ward
    Hey there, I might be crazy, but for some reason this problem is stumping me. I have a view controller that is set to auto rotate to orientation. Inside I've got two subviews. One is a uibutton. All I want is for my button's origin to stay locked to the bottom-left in portrait and bottom-right in landscape (so it basically stays in the same place). It should also stay in place for portrait upside down and landscape right. Any ideas? Thanks, Howie

    Read the article

  • iphone Three20 TTNavigator UITabbarController

    - by Ward
    Not sure if what I want to do makes sense, but I want to take advantage of the UITabBarController and the TTNavigator from Three20. Any tutorials around that demonstrate how this can be done? I understand how to add view controllers to the navigator using the TTURLMap, but do I need to add a navigator for each tabbar item? I'm lost.

    Read the article

  • WPF Listbox - Empty List Display Message

    - by David Ward
    Can anyone suggest the best way to display a Textblock (with a text such as "List Empty") so that it's visibility is bound to the Items.Count. I have tried the following code and can't get it to work, so think that I must be doing it wrong. <ListBox x:Name="lstItems" ItemsSource="{Binding ListItems}"> </ListBox> <TextBlock Margin="4" FontStyle="Italic" FontSize="12" Text="List is empty" Visibility="Collapsed"> <TextBlock.Style> <Style TargetType="{x:Type TextBlock}"> <Style.Triggers> <DataTrigger Binding="{Binding ElementName=lstItems, Path=Items.Count}" Value="0"> <Setter Property="Visibility" Value="Visible" /> </DataTrigger> </Style.Triggers> </Style> </TextBlock.Style> </TextBlock>

    Read the article

  • NSNumberFormatter crashing iPhone SDK 4.0b2

    - by Ward
    Hey there, I've got an app that's been in the app store for a while and functions perfectly on OS 3.1 - 3.13. However, when tested on 4.0b2 I noticed that it crashes in the same place every time, but only on the device, never on the simulator. I'm using a 3GS to test. On loadView I initialize an NSNumberFormatter object which is declared and retained in the interface so I have access to it everywhere. In my method I call it several times to convert string values into nsnumbers to be stored in a mutable dictionary. Here's an example: [myDictionary setObject:[myStyleFormatter numberFromString:@"1"] forKey:@"hours"]; [myDictionary setObject:[myStyleFormatter numberFromString:@"30"] forKey:@"minutes"]; [myDictionary setObject:[myStyleFormatter numberFromString:@"10"] forKey:@"seconds"]; For some reason it crashes as soon as it tries to set hours. The error is "attempt to insert nil value (key: hours)" Have I been doing something wrong all along? Has the api changed for 4.0b2? Thanks, Howie

    Read the article

  • Advanced Django query with subselects and custom JOINS

    - by Bryan Ward
    I have been investigating this number theoretic function (found in the Height model) and I need to query for things based on the prime factorization of the primary key, or id. I have created a model for Factors of the id which maintains all of the prime factors. class Height(models.Model): b = models.IntegerField(null=True, blank=True) c = models.IntegerField(null=True, blank=True) d = models.FloatField(null=True, blank=True) class Factors(models.Model): height = models.ForeignKey(Height, null=True, blank=True) factor = models.IntegerField(null=True, blank=True) degree = models.IntegerField(null=True, blank=True) prime_id = models.IntegerField(null=True, blank=True) For example, if id=24, then the associated entries in the factors table would be height_id=24,factor=2,degree=3,prime_id=0 height_id=24,factor=3,degree=1,prime_id=1 the prime_id keep track of the relative order of the primes. Now let p < q < r < s all be prime numbers and a,b,c,d be positive integers. Then I want to be able to query for all Heights of the form id=(p**a)*(q**b)*(r**c)*(s**d). Now this is simple in the case that all of p,q,r,s,a,b,c,d are known in that I can just run Height.objects.get(id=(p**a)*(q**b)*(r**c)*(s**d)) But I need to be able to query for something like (2**a)*(3**2)*(r**c)*(s**d) where r,s,a,d are unknown and all Heights of such form will be returned. Furthermore, not all of the rows in Height will have exactly four prime factors, so I need to make sure that I am not matching rows of the form id=(p**a)*(q**b)*(r**c)*(s**d)*(t**e)... From what I can tell, the following MySQL query accomplishes this, but I would like to do it through the Django ORM. I also don't know if this MySQL query is the proper way to go about doing things. SELECT h.*,count(f.height_id) AS factorsCount FROM height AS h LEFT JOIN factors AS f ON ( f.height_id = h.id AND f.height_id IN (SELECT height_id FROM factors where prime_id=1 AND factor=2 AND degree=1) AND f.height_id IN (SELECT height_id FROM factors where prime_id=2 AND factor=3 AND degree=2) AND f.height_id IN (SELECT height_id FROM factors where prime_id=3 AND factor=5 AND degree=1) AND f.height_id IN (SELECT height_id FROM factors where prime_id=4 AND factor=7 ANd degree=1) ) GROUP BY h.id HAVING factorsCount=4 ORDER BY h.id; Any ideas or suggestions for things to try?

    Read the article

  • iphone Three20 TTMessageController Address Book

    - by Ward
    Hey there, I'm trying to use the TTMessageController from Three20 to send messages through a custom web service. I'm not clear on how I can incorporate contacts from the user's address book. I see the model mock address book in the sample app, but the sample only contains names. Is there a way to set the datasource of TTMessageController to be the address book? Thanks, Howie

    Read the article

  • I need git-svn to act as a Subversion v1.5+ client

    - by Ben Ward
    I'm running git 1.7 on Mac OSX, installed via Homebrew. I'm trying to use git svn to work with a Subversion server that requires Subversion 1.5 clients (a restriction enforced via a pre-commit hook.) Running git svn --version reveals that as far as git is concerned, git svn is equivalent to svn v1.4.4. I can't establish whether git svn is a total clone of subversion, and thus needs to be updated to meet subversion v1.5 functionality, or if git is compiled against or just points to some version of subversion under the hood. I've struggled finding anyone else trying to upgrade the version of git-svn, and I'm guessing this client version restriction is unusual, but I'm stuck with it (corporate environment.) Is it possible to have git operate as svn 1.5?

    Read the article

  • Problem parsing an atom feed using simplexml_load_file(), can't get an attribute.

    - by Craig Ward
    Hi, I am trying to create a social timeline. I pull in feeds form certain places so I have a timeline of thing I have done. The problem I am having is with Google reader Shared Items. I want to get the time at which I shared the item which is contained in <entry gr:crawl-timestamp-msec="1269088723811"> Trying to get the element using $date = $xml->entry[$i]->link->attributes()->gr:crawl-timestamp-msec; fails because of the : after gr which causes a PHP error. I could figure out how to get the element, so thought I would change the name using the code below but it throws the following error Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "<?xml version="1.0"?><feed xmlns:idx="urn:atom-extension:indexing" xmlns:media="http://search.yahoo.com/mrss/" xmlns <?php $get_feed = file_get_contents('http://www.google.com/reader/public/atom/user/03120403612393553979/state/com.google/broadcast'); $old = "gr:crawl-timestamp-msec"; $new = "timestamp"; $xml_file = str_replace($old, $new, $get_feed); $xml = simplexml_load_file($xml_file); $i = 0; foreach ($xml->entry as $value) { $id = $xml->entry[$i]->id; $date = date('Y-m-d H:i:s', strtotime($xml->entry[$i]->attributes()->timestamp )); $text = $xml->entry[$i]->title; $link = $xml->entry[$i]->link->attributes()->href; $source = "googleshared"; echo "date = $date<br />"; $sql="INSERT IGNORE INTO timeline (id,date,text,link, source) VALUES ('$id', '$date', '$text', '$link', '$source')"; mysql_query($sql); $i++; }` Could someone point me in the right direction please. Cheers Craig

    Read the article

  • WPF DataTemplate - Overlay

    - by David Ward
    I have a class that I need to provide the datatemplate for. Currently I have two datatemplates, one for when Enabled == true and one for when Enabled == false. The datatemplate for the class is actually the one below which changes the template used based on a trigger: <DataTemplate x:Key="ActionNodeTemplateSelector"> <ContentPresenter Content="{Binding}" Name="cp" /> <DataTemplate.Triggers> <DataTrigger Binding="{Binding Enabled}" Value="True"> <Setter TargetName="cp" Property="ContentTemplate" Value="{StaticResource ActionNodeTemplate}" /> </DataTrigger> <DataTrigger Binding="{Binding Enabled}" Value="False"> <Setter TargetName="cp" Property="ContentTemplate" Value="{StaticResource ActionNodeDisabledTemplate}" /> </DataTrigger> </DataTemplate.Triggers> </DataTemplate> This all works well. However, now I want to also display an image overlay if the "Completed" property is true and a different image if it is incomplete. I could easily carry on using my approach to trigger on the Completed property as well but this would double the number of templates and feels wrong. Is there a way that I could have a trigger on my DataTemplate that will allow me to overlay the correct image over the existing template which is based on the Enabled property?

    Read the article

  • WPF Statusbar Updates - help, I seem to be going round in circles

    - by David Ward
    I seem to be going round in circles. I have a WPF application that has a main ribbon window with a status bar. When you navigate to a "view" a user control is displayed as the content of the main window. The view has a ViewModel which handles retrieving data from the database and the View's datacontext is set to the ViewModel. What I want is to have the lengthy operation (data retrieval) run on a background thread and whilst it is running the status in the main window to report appropriately. When the background task is complete, the status should revert back to "Ready" (much the same as Visual Studio). How should I wire this together so that I can have the data access code separated out in the ViewModel whilst keeping a responsive UI? I have tried using the BackgroundWorker is various places in the code and I still end up with an unresponsive UI.

    Read the article

  • VS2010 Developer Image

    - by David Ward
    I am about to create a new developer PC image for developing WPF applications using VS2010, WCF, SQL2008 and SharePoint2010. What OS should I opt for? Windows 7? Windows Server 2008 R2? I'd have thought Windows 7 to make sure that I have a similar experience during development as an end user, however I can't install SharePoint on a client OS and so thought about Windows Server 2008 R2 to help with the SharePoint development process. Thoughts?

    Read the article

  • Codeigniter: Retrieving a variable from Model to use in a Controller

    - by Craig Ward
    Hi, I bet this is easy but been trying for a while and can't seem to get it to work. Basically I am setting up pagination and in the model below I want to pass $total_rows to my controller so I can add it to the config like so '$config['total_rows'] = $total_rows;'. function get_timeline_filter($per_page, $offset, $source) { $this->db->where('source', $source); $this->db->order_by("date", "desc"); $q = $this->db->get('timeline', $per_page, $offset); $total_rows = $this->db->count_all_results(); if($q->num_rows() >0) { foreach ($q->result() as $row) { $data[] = $row; } return $data; } } I understand how to pass things form the Controller to the model using $this->example_model->example($something); but not sure how to get a variable from the model?

    Read the article

  • Bibtex with no references title

    - by Bryan Ward
    I am working on writing a scientific poster in LaTeX, and I want to include a few references for my work. Because this is a poster, I have my own customized headers for different sections, and don't want my related works to have a separate title. Essentially I have something like this: \begin{textblock}{5.5}(19.5,11) \CHead{Related Work} %a newcommand header I wrote \bibliographystyle{acm} \bibliography{mybib} \end{textblock} And it comes out with a header called "Related Work" like I want, but it also under that says "References", which I don't want. I found a few websites that said that I could override this with something like \renewcommand\refname{} But all this does is take the word "References" out, but the space allotted for the title is still there. Is there a way to completely eliminate the title and any space it may take up?

    Read the article

  • iPhone - Reset UINavigation Controller

    - by Ward
    Hey there, I have a UINavigationController inside a UITabBarController. When a user presses the first tab, I want to reset the navigation controller back to the first screen instead of displaying whichever view they last selected in the navigation controller. Is there an easy way to reset the stack? Thanks, Howie

    Read the article

  • how to use json_encode without PHP 5.2

    - by Ashley Ward
    I've written a CMS which uses the PHP function json_encode to send some data back via an Ajax Request. Unfortunately, I'm trying to load it onto a server which is running PHP version 5.1, the json_encode PHP function is not available on versions of PHP before 5.2.0. Does anyone know of a way to encode a PH array as JSON without using the inbuilt json_encode function?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >