Search Results

Search found 41 results on 2 pages for 'kieran benton'.

Page 2/2 | < Previous Page | 1 2 

  • When to call release on NSURLConnection delegate?

    - by Kieran H
    Hi, When passing a delegate to the a NSUrlConnection object like so: [[NSURLConnection alloc] initWithRequest:request delegate:handler]; when should you call release on the delegate? Should it be in connectionDidFinishLoading? If so, I keep getting exec_bad_access. I'm seeing that my delegates are leaking through instruments. Thanks

    Read the article

  • asp:repeater events - how to postback

    - by Kieran
    Hello I have an ASP:Repeater Which I would like to display a list of check boxes in. These check boxes are related to a list of user preferences and the users resulting answer. See Code Bellow. I would like to add do one of the following if possible Option 1: It would be great if I could use the Event in the Repeater:OnItemCommand(...) to fire if any of the items change. It would seem to me that this event will only fire if there is a Button | LinkButton | ImageButton item in the list. IE it will not fire if I put in a check box with AutopostBack="True" Option 2: Is there a way I could attach a method to an Event of CheckBox:CheckChanged I would need to pass this method a parameter saying which question/answer combo to change. Option 3: Its your answer if you know an easier way that would be awesome. The Code: <asp:Repeater ID="RPTprefs" runat="server" DataSourceID="getAnswers" OnItemCommand="RPTprefs_ItemCommand"> <ItemTemplate> <li><asp:CheckBox ID='questionID' runat="server" Checked='<%# Eval("pr.up_is_selected") %>' Text='<%# Eval("prp.prefs_question") %>' AutoPostBack="true" OnCheckedChanged="CheckChanged" /></li> </ItemTemplate> </asp:Repeater> Thanks in advance

    Read the article

  • fonts mac vs pc

    - by Kieran
    Hi all hope your having a good day/evening. Simple question, but maybe not so simple to answer. I have an unordered list, which i am using as a menu. The list items are floated right and sized due to an anchor tag inside them with a roll over. The last element is given a specific size to suck up any extra space. See the code snippits bellow. css ul.mainNav { width: 970px; display:block; background:black; clear:both; overflow:hidden;} ul.mainNav li { float: left; height:29px;} ul.mainNav li a { display: block; padding:7px 19px; color:#ffffff; background-color:#000; font-weight:bold; text-decoration:none; font-size:13px; } ul.mainNav li a:hover, ul.mainNav li a.selected { background-color:#ffff00; color:#000; } ul.mainNav li a.last{ text-align:center; padding: 7px 19px; width:58px;} html <ul class="mainNav" id="mainNav"> <li><a href="/Default.aspx">home</a></li> <li><a href="/About/">about</a></li> <li><a href="/News/">news</a></li> <li><a href="/Enter/Registration.aspx">enter SOYA 2010</a></li> <li><a href="/Categories/Film.aspx">categories</a></li> <li><a href="/Mentors/janChapman.aspx">mentors</a></li> <li><a href="/PastWinners/">past winners</a></li> <li><a href="/Awards/">awards nights</a></li> <li><a href="/Support/" class="last">contact</a></li> </ul> It is containted in a <div style="margin:0 auto;">...</div> to center on the menu on screen Now my problem is: On PC; firefox/ Safari /IE /Chrome are all displaying correctly. Take the same code to a Mac; Safari/ firefox are displaying the menu to be too short and the only thing i can point to is that the fonts may be smaller in widths. The width is currently set to 970px. My question is: How can i get it to display at the same widths without specifying exact widths for each list item? Any help would be appreciated. If my structure is wrong or it is just a mac thing that i will never solve(hope not). Cheers, KJ

    Read the article

  • Xampp and Zend Library Conflicts

    - by Kieran
    Im trying to use the Zend Frameworks ACL library in my code (in codeigniter) and after including the library in my controller I get this error: Fatal error: Cannot redeclare class Zend_Acl in C:\xampp\php\PEAR\Zend\Acl.php on line 48 If I remove the include to the Zend library I get this error instead Fatal error: Class 'Zend_Acl' not found in C:\xampp\htdocs\ISU-Cart\system\application\libraries\acl.php on line 3 Any help on this?

    Read the article

  • In Delphi, Is there a way to adjust the line spacing of a TMemo?

    - by Kieran
    I'm working with a TMemo component to display some text in a limited space. Currently it's using a truetype font which doesn't ship with windows and is installed by the app when it runs. On my PC (Running Windows XP), the spacing between each line of text seems to be about eight pixels. On a different PC running Windows 7, the line spacing seems to be about 14 pixels, which is pushing the bottom row of text out of visibility on the memo. So, My question is really this: Is this caused by the different versions of Windows? It's all I could think that was different. Is there some way I can adjust this value so it would be consistent across all instances of the application, wherever it was running? Alternatatively, is there a different component I could use which might let me tweak this value?

    Read the article

  • 8bpp Bitmap format on the Compact Framework

    - by Kieran
    Hi friends. I am messing around with Conway's Game of Life - http://en.wikipedia.org/wiki/Conway's_Game_of_Life I started out coding algorithmns for winforms and now want to port my work onto windows mobile 6.1 (compact framework). I came across an article by Jon Skeet where he compared several different algorithmns for calculating next generations in the game. He used an array of bytes to store a cells state (alive or dead) and then he would copy this array to an 8bpp bitmap. For each new generation, he works out the state of each byte, then copies the array to a bitmap, then draws that bitmap to a picturebox. void CreateInitialImage() { bitmap = new Bitmap(Width, Height, PixelFormat.Format8bppIndexed); ColorPalette palette = bitmap.Palette; palette.Entries[0] = Color.Black; palette.Entries[1] = Color.White; bitmap.Palette = palette; } public Image Render() { Rectangle rect = new Rectangle(0, 0, Width, Height); BitmapData bmpData = bitmap.LockBits(rect, ImageLockMode.ReadWrite, bitmap.PixelFormat); Marshal.Copy(Data, 0, bmpData.Scan0, Data.Length); bitmap.UnlockBits(bmpData); return bitmap; } His code above is beautifully simple and very fast to render. Jon is using Windows Forms but now I want to port my own version of this onto Windows Mobile 6.1 (Compact Framework) but . . . .there is no way to format a bitmap to 8bpp in the cf. Can anyone suggest a way of rendering an array of bytes to a drawable image in the CF. This array is created in code on the fly (it is NOT loaded from an image file on disk). I basically need to store an array of cells represented by bytes, they are either alive or dead and I then need to draw that array as an image. The game is particularly slow on the CF so I need to implement clever optimised algoritmns but also need to render as fast as possible and the above solution would be pretty dam perfect if only it was available on the compact framework. Many thanks for any help Any suggestions?

    Read the article

  • .NET without use of DLL's

    - by Kieran
    Hi SO community I have been issued a problem with security. A bank will not allow use of DLL's in the project. What sort of structure would be needed to allow DataAccess and or the use of external services (like an email client mailchimp, icontct). has anyone else encountered this sort of problem before? If they have how should the project be structured (.net 3.5+). Thanks, KJ

    Read the article

  • Java ArrayList remove dupes without sets

    - by Kieran
    I'm having problems removing duplicates from an ArrayList. It's for an assignment for college. Here's the code I have already: public int numberOfDiffWords() { ArrayList<String> list = new ArrayList<>(); for(int i=0; i<words.size()-1; i++) { for(int j=i+1; j<words.size(); j++) { if(words.get(i).equals(words.get(j))) { // do nothing } else { list.add(words.get(i)); } } } return list.size(); } The problem is in the numberOfDiffWords() method. The populate list method is working correctly, as my instructor has given me a sample string (containing 4465 words) to analyse - printing words.size() gives the correct result. I want to return the size of the new ArrayList with all duplicates removed. words is an ArrayList class attribute. UPDATE: I should have mentioned I'm only allowed to use dynamic indexed-based storage for this part of the assignment, which means no hash-based storage.

    Read the article

  • Avoiding Zends Error Messages

    - by Kieran
    I am using the Zend Framework for ACL's in codeigniter but if something is not right in the database or there is an error with the code that interfaces with the framework then the framework displays its own error messages. Is there a way to suppress these?

    Read the article

  • Joining 3 tables - doing joins how to

    - by Kieran
    This is my current query - its not getting the required result. I want it do display all of the "resources" even if they dont have a connection. SELECT * FROM (`user_permissions`) JOIN `user_groups` ON `user_groups`.`id` = `user_permissions`.`role` JOIN `user_resources` ON `user_resources`.`id` = `user_permissions`.`resource` WHERE `role` = '4' When I try left join or right join it still returns the same result. The result I get is: id | role | resource | name 5 | 4 | 2 | Changelog I want id | role | resource | name 5 | 4 | 2 | Changelog null | null | null | Resource2 null | null | null | Resource3 Is this possible?

    Read the article

  • what are the limitations of mobile phones and web development

    - by Kieran
    simple really.. I am have been asked to do a mobile site (straight html + css (+ maybe jquery mobile later on)). The site will need to support the new type smart phone and the old type Nokia/(Symbian OS) with the web browser. Doubts and reservations aside as to anyone without a smart phone would bother visiting this site it still needs to support it. My first question is do older phones support PNG images and transparancey... But this has led me to a much broader question of what are some of the limitations of developing for older phone platforms is there anything that has caught mobile web devs out and had them scratching their head for an afternoon.. what are the limitations of mobile phones?

    Read the article

  • PHP statements, HTML and RSS

    - by poindexter
    Alrighty, I've got another little bit of code that I'm wrestling through. I'm building a conditional sidebar. The goal is to only show blog related stuff when posts in the "blog" category are being viewed. I've got part of it working, but the part where I'm trying to bring in an RSS feed of the category into the sidebar to show as recent posts. It doesn't work, and since I'm a php newb I'm not entirely sure why. Any suggestions or pointers are much appreciated. I'll post the problem section first, and then the entire php file second, so you all can see the context for the section that I'm having issues with. Problem Section: echo '<div class="panel iq-news">'; echo '<h4><span><a href="/category/blog/feed"><img src="/wp-content/themes/iq/images/rss-icon.gif" alt="Subscribe to our feed"/></a></span>IQNavigator Blog</h4>'; <?php query_posts('category_name=Blog&showposts=2'); if (have_posts()) : ?> echo '<ul>'; <?php while (have_posts()) : the_post(); ?> echo '<li><a href="<?php the_permalink();?>"><?php the_title();?> </a></li>'; <?php endwhile;?> echo '</ul>'; <?php endif;?> echo '<div class="twitter">'; echo '<p id="twitter-updates">'; <?php twitter_updates();?> echo '</p>'; echo '<p class="text-center"><a href="http://twitter.com/iqnavigator">Follow us on twitter</a></p>'; echo '</div>'; echo '</div>'; The whole darn long statement, for context reasons: <div class="sidebar"> <?php if (!is_search() && !is_page('Our Clients') && !is_archive()){ if($post->post_parent) { $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0&depth=1&exclude=85,87,89,181,97,184"); } else { $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&depth=1&exclude=85,87,89,181,97,184"); } if ($children) { ?> <div class="panel links subnav"> <h3>In This Section</h3> <ul class="subnav"> <?php echo $children; ?> </ul> <p>&nbsp;</p> </div> <?php } } if(is_page('Our Clients') || in_category('Our Clients') || is_category('Our Clients')) { echo '<div class="panel links subnav">'; echo '<h3>In This Section</h3>'; echo '<ul class="subnav">'; wp_list_categories('child_of=21&title_li='); echo '</ul>'; echo '<p>&nbsp;</p>'; echo '</div>'; } else if (in_category('Blog')) { //PUT YOUR CODE HERE // echo get_page_content(34); echo '<div class="panel featured-resource">'; echo '<h4>Blog Contributors</h4>'; echo '<ul class"subnav">'; echo '<li><a href="/company/executive-team/john-f-martin/">John Martin</a></li>'; echo '<li><a href="/company/executive-team/kieran-brady/">Kieran Brady</a></li>'; echo '<li><a href="/company/executive-team/art-knapp/">Art Knapp</a></li>'; echo '</ul>'; echo '</div>'; echo '<div class="panel iq-news">'; echo '<h4><span><a href="/category/blog/feed"><img src="/wp-content/themes/iq/images/rss-icon.gif" alt="Subscribe to our feed"/></a></span>IQNavigator Blog</h4>'; <?php query_posts('category_name=Blog&showposts=2'); if (have_posts()) : ?> echo '<ul>'; <?php while (have_posts()) : the_post(); ?> echo '<li><a href="<?php the_permalink();?>"><?php the_title();?> </a></li>'; <?php endwhile;?> echo '</ul>'; <?php endif;?> echo '<div class="twitter">'; echo '<p id="twitter-updates">'; <?php twitter_updates();?> echo '</p>'; echo '<p class="text-center"><a href="http://twitter.com/iqnavigator">Follow us on twitter</a></p>'; echo '</div>'; echo '</div>'; //END CODE HERE } if (!is_page('Resources')) { ?> <div class="panel featured-resource"> <h4>Featured Resource</h4> <div class="embed"> <?php $custom_fields = get_post_custom(); $featured_video_code = $custom_fields['Featured Video Code']; if($featured_video_code) { foreach ( $featured_video_code as $key => $value ) { $the_code = $value; } $featured_video_link = $custom_fields['Featured Video Link']; foreach ( $featured_video_link as $key => $value ) { $the_link = $value; } $featured_video_text = $custom_fields['Featured Video Text']; foreach ( $featured_video_text as $key => $value ) { $the_text = $value; } if($the_code) { echo $the_code; } if($the_text) { echo '<ul>'; echo '<li>'; if($the_link) { echo '<a href="' . $the_link . '" class="video" target="_blank">' . $the_text . '</a>'; } else { echo $the_text; } echo '</li>'; echo '</ul>'; } } ?> + Visit Resource Center <div class="clr"></div> <div class="blue-bars"> <a href="<?php bloginfo('template_directory');?>/more-info.php" class="more-info" rel="facebox">Request More Info</a> <a href="<?php bloginfo('template_directory');?>/resource-form.php?id=701000000009E" class="view-demos" rel="facebox">Schedule a Demo</a> </div> </div> <div id="content">

    Read the article

  • : in node causing Keyerror in xmlparsing using ElementTree

    - by kguckian
    Hi I'm using ElementTree to parse out an xml feed from Kuler. I'm only beginning in python but am stuck here. The parsing works fine until I attempt to retrieve any nodes containing ':' e.g kuler:swatchHexColor Below is a cut down version of the full feed but same structure: <rss xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:kuler="http://kuler.adobe.com/kuler/API/rss/" xmlns:rss="http://blogs.law.harvard.edu/tech/rss" version="2.0"> <channel> <title>kuler popular themes</title> <item> <title>Theme Title: Fresh Money</title> <description> &lt;img src="http://kuler-api.adobe.com/kuler/themeImages/theme_808366.png" /&gt;&lt;br /&gt; Artist: thesylph005&lt;br /&gt; ThemeID: 808366&lt;br /&gt; Posted: 03/02/2010&lt;br /&gt; Hex: 2F400D, 8CBF26, A8CA65, E8E5B0, 419184 </description> <kuler:themeItem> <kuler:themeID>808366</kuler:themeID> <kuler:themeTitle>Fresh Money</kuler:themeTitle> <kuler:themeImage>http://kuler-api.adobe.com/kuler/themeImages/theme_808366.png</kuler:themeImage> <kuler:themeAuthor> <kuler:authorID>370750</kuler:authorID> <kuler:authorLabel>thesylph005</kuler:authorLabel> </kuler:themeAuthor> <kuler:themeTags/> <kuler:themeRating>4</kuler:themeRating> <kuler:themeDownloadCount>708</kuler:themeDownloadCount> <kuler:themeCreatedAt>20100302</kuler:themeCreatedAt> <kuler:themeEditedAt>20100302</kuler:themeEditedAt> <kuler:themeSwatches> <kuler:swatch> <kuler:swatchHexColor>2F400D</kuler:swatchHexColor> <kuler:swatchColorMode>rgb</kuler:swatchColorMode> <kuler:swatchChannel1>0.183333</kuler:swatchChannel1> <kuler:swatchChannel2>0.25</kuler:swatchChannel2> <kuler:swatchChannel3>0.05</kuler:swatchChannel3> <kuler:swatchChannel4>0.0</kuler:swatchChannel4> <kuler:swatchIndex>0</kuler:swatchIndex> </kuler:swatch> <kuler:swatch> <kuler:swatchHexColor>8CBF26</kuler:swatchHexColor> <kuler:swatchColorMode>rgb</kuler:swatchColorMode> <kuler:swatchChannel1>0.55</kuler:swatchChannel1> <kuler:swatchChannel2>0.75</kuler:swatchChannel2> <kuler:swatchChannel3>0.15</kuler:swatchChannel3> <kuler:swatchChannel4>0.0</kuler:swatchChannel4> <kuler:swatchIndex>1</kuler:swatchIndex> </kuler:swatch> <kuler:swatch> <kuler:swatchHexColor>A8CA65</kuler:swatchHexColor> <kuler:swatchColorMode>rgb</kuler:swatchColorMode> <kuler:swatchChannel1>0.659722</kuler:swatchChannel1> <kuler:swatchChannel2>0.791667</kuler:swatchChannel2> <kuler:swatchChannel3>0.395833</kuler:swatchChannel3> <kuler:swatchChannel4>0.0</kuler:swatchChannel4> <kuler:swatchIndex>2</kuler:swatchIndex> </kuler:swatch> <kuler:swatch> <kuler:swatchHexColor>E8E5B0</kuler:swatchHexColor> <kuler:swatchColorMode>rgb</kuler:swatchColorMode> <kuler:swatchChannel1>0.91</kuler:swatchChannel1> <kuler:swatchChannel2>0.898047</kuler:swatchChannel2> <kuler:swatchChannel3>0.688705</kuler:swatchChannel3> <kuler:swatchChannel4>0.0</kuler:swatchChannel4> <kuler:swatchIndex>3</kuler:swatchIndex> </kuler:swatch> <kuler:swatch> <kuler:swatchHexColor>419184</kuler:swatchHexColor> <kuler:swatchColorMode>rgb</kuler:swatchColorMode> <kuler:swatchChannel1>0.254901</kuler:swatchChannel1> <kuler:swatchChannel2>0.57</kuler:swatchChannel2> <kuler:swatchChannel3>0.519034</kuler:swatchChannel3> <kuler:swatchChannel4>0.0</kuler:swatchChannel4> <kuler:swatchIndex>4</kuler:swatchIndex> </kuler:swatch> </kuler:themeSwatches> Tue, 30 Mar 2010 11:27:12 PST So if I do a findall on say each item's description, I get that back fine. But the minute I try to retrieve anything with a : in the nodename I get Exception Type: KeyError Exception Value: ':' So this works from elementtree.ElementTree import Element, SubElement, dump, parse def xml(): kulerurl = 'http://kuler-api.adobe.com/rss/get.cfm?listType=popular&startIndex=0&itemsPerPage=5&timeSpan=30&key=mykey' rss = parse(urllib.urlopen(kulerurl)).getroot() for element in rss.findall('channel/item'): print(element.findtext('description')) dump (rss) but this doesn't def xml(): kulerurl = 'http://kuler-api.adobe.com/rss/get.cfm?listType=popular&startIndex=0&itemsPerPage=5&timeSpan=30&key=mykey' rss = parse(urllib.urlopen(kulerurl)).getroot() for element in rss.findall('channel/item/kuler:themeItem'): print(element.findtext('kuler:themeID')) dump (rss) I'm sure it's something simple if anyone could point me to what I'm doing wrong here I'd be most grateful thanks Kieran

    Read the article

< Previous Page | 1 2