Search Results

Search found 8279 results on 332 pages for 'template toolkit'.

Page 43/332 | < Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >

  • C# searching for new Tool for the tool box, how to template this code

    - by Nix
    All i have something i have been trying to do for a while and have yet to find a good strategy to do it, i am not sure C# can even support what i am trying to do. Example imagine a template like this, repeated in manager code overarching cocept function Returns a result consisting of a success flag and error list. public Result<Boolean> RemoveLocation(LocationKey key) { List<Error> errorList = new List<Error>(); Boolean result = null; try{ result = locationDAO.RemoveLocation(key); }catch(UpdateException ue){ //Error happened less pass this back to the user! errorList = ue.ErrorList; } return new Result<Boolean>(result, errorList); } Looking to turn it into a template like the below where Do Something is some call (preferably not static) that returns a Boolean. I know i could do this in a stack sense, but i am really looking for a way to do it via object reference. public Result<Boolean> RemoveLocation(LocationKey key) { var magic = locationDAO.RemoveLocation(key); return ProtectedDAOCall(magic); } public Result<Boolean> CreateLocation(LocationKey key) { var magic = locationDAO.CreateLocation(key); return ProtectedDAOCall(magic); } public Result<Boolean> ProtectedDAOCall(Func<..., bool> doSomething) { List<Error> errorList = new List<Error>(); Boolean result = null; try{ result = doSomething(); }catch(UpdateException ue){ //Error happened less pass this back to the user! errorList = ue.ErrorList; } return new Result<Boolean>(result, errorList); } If there is any more information you may need let me know. I am interested to see what someone else can come up with. Marc solution applied to the code above public Result<Boolean> CreateLocation(LocationKey key) { LocationDAO locationDAO = new LocationDAO(); return WrapMethod(() => locationDAO.CreateLocation(key)); } public Result<Boolean> RemoveLocation(LocationKey key) { LocationDAO locationDAO = new LocationDAO(); return WrapMethod(() => locationDAO.RemoveLocation(key)); } static Result<T> WrapMethod<T>(Func<Result<T>> func) { try { return func(); } catch (UpdateException ue) { return new Result<T>(default(T), ue.Errors); } }

    Read the article

  • Child Window Template SilverLight 3

    - by Asim Sajjad
    How to change the GUI of the child window in silverlight , how to apply template or style any good example reference will help. thanks in advance For addition information: I would like to change the title bar shape, the close button shape and the body area shape as well, you can say I want to change the View of the childWidow control.

    Read the article

  • displaying a Drupal view without a page template around it

    - by ceejayoz
    I would like to display a Drupal view without the page template that normally surrounds it - I want just the plain HTML content of the view's nodes. This view would be included in another, non-Drupal site. I expect to have to do this with a number of views, so a solution that lets me set these up rapidly and easily would be the best - I'd prefer not to have to create a .tpl.php file every time I need to include a view somewhere.

    Read the article

  • Using C# to create a Word document from an existing template

    - by Gazeth
    I have several Word templates and I wish to use these to dynamically create Word documents in my app. I wish to avoid using automation at all costs as this is no good. I know that I can use both HTML and XML to create word documents but I just don't know where to start with regards to using a template that may well have images in the footer or the header of a document.

    Read the article

  • VS2008 Smart Device Class Library Project Template

    - by Nelson Reis
    I was trying to create a new Class Library project targeted for the .NET Compact Framework. However, when I select "New project - Smart Device" I only have the Smart Device Project template. I've checked the folder: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ProjectTemplates\CSharp\SmartDevice\1033 It contains several project templates: SmartDeviceClassLibrary SmartDeviceConsoleApplication SmartDeviceEmptyProject SmartDeviceWindowsApplication SmartDeviceWindowsControlLibrary None of those are shown on my IDE. How can I use one of those project templates?

    Read the article

  • Spell check in django template pages

    - by Hulk
    All, Is there any tool to do a UI spell check .I use a linux box here and also use django frame work. SO in the html pages if any spell check is to be made ignoring html tags and template tags.How should this be done. Thanks..

    Read the article

  • AreaDataPoint in SL3 Chart is Fixed Size

    - by Wonko the Sane
    In Silverlight 3, it appears that the AreaDataPoint template ignores any size set in its ControlTemplate. <ControlTemplate TargetType="chartingTK:AreaDataPoint"> <Grid x:Name="Root" Opacity="1"> <!-- Width and Height are ignored --> <Ellipse Width="75" Height="25" StrokeThickness="{TemplateBinding BorderThickness}" Stroke="OrangeRed" Fill="{TemplateBinding Background}"/> </Grid> </ControlTemplate> Does anybody know of a workaround?

    Read the article

  • Django - markup parser in template or view?

    - by Amit Ron
    I am building a website where my pages are written in MediaWiki Markup, for which I have a working parser function in Python. Where exactly do I parse my markup: in the view's code, or in the template? My first guess would be something like: return render_to_response( 'blog/post.html', {'post': post, 'content': parseMyMarkup(post.content) }) Is this the usual convention, or should I do something different?

    Read the article

  • Importing a SQL Server 2005 Profile Trace Template into SQL 2008

    - by David Stein
    I'm using SQL Server 2008, but my ERP Vendor only offers a SQL 2005 trace template that they'd like me to run on my system. When I attempt to import it, I receive confirmation that it was successfully imported. However, it does not show up in the list of available templates. I've done this on two separate servers to the same effect. Is this a known problem with SQL Server 2008? I Googled unsuccessfully.

    Read the article

  • GCC problem: in template

    - by Abdul jalil
    i have redhat with gcc 4.1.1 i have compile as "gcc test.c" and give the following error Error : expected '=' ,',' , ';' , ásm' or '__ attribute__' before '<' token the code in "test.c" is as follow template class A { public: T foo; };

    Read the article

  • Debugging T4 Template in VS 2010 Crashes IDE

    - by Eric J.
    I'm trying to debug a slightly-modified version of the ADO.NET POCO Entity Generator template using the directions Oleg Sych published a few years back. I modified the DbgJITDebugLaunchSetting key as recommended. I get a dialog indicating that a user-defined breakpoint has been hit. However, rather than being presented with the option to start a new instance of VS 2010 to debug, the original instance of VS 2010 just crashes and auto-restarts. Is it possible to debug T4 templates with VS 2010?

    Read the article

  • Minimalist, Tiny Javascript Template System?

    - by Parand
    I'm looking for a minimalist template system for javascript, ala John Resig's Javascript Micro Templating. The smaller the better, and if it's jquery based even better. Recommendations? I tried John's micro-templating but ran into a few issues, wanted to see if there are more baked / better packaged solutions out there. [Update] I tried Resig's Micro Templating again and it's working well for me. Would still like to hear about other alternatives if there are any.

    Read the article

  • Python directory list returned to Django template

    - by Shu
    Total Python newb here. I have a images directory and I need to return the names and urls of those files to a django template that I can loop through for links. I know it will be the server path, but I can modify it via JS. I've tried os.walk, but I keep getting empty results.

    Read the article

  • Sticky footer with CSS Layout Template Module?

    - by boris callens
    I'm currently looking into the JQuery library for CSS Layout Template module Is it possible to define the height of a placeholder with *? Meaning it will push content down if it has to, or fill up any remaining space if the complete content is less then the view port. This would be really nice to make the whole sticky footer thing much easier and robust.

    Read the article

  • .net Email Template engine...

    - by alex
    I'm looking to create emails, mainly HTML, based on templates - I'd really like to do something like: Set up my template, as an HTML (or similar) file Include tags, that are then replaced with specific data (kind of like mail-merge....) I've seen this: http://www.bitethebullet.co.uk/EmailTemplateFramework/tabid/58/Default.aspx From searching on stack overflow, i understand nVelocity might be another option? But i can't find any examples to do what i want to do... Any other suggestions?

    Read the article

  • Facebooker2 template issue

    - by Srini
    Hi, When i include fb_connect_async_js javascript helper it is throwing an error , Facebooker 2 don't have action view template. Could you please tell me how handle this situation . undefined local variable or method `fb_connect_async_js' for ActionView::Base Thanks, Srini

    Read the article

  • Best Project Template to use for Classic Web Service

    - by coffeeaddict
    I'm going to create a new PayPal project. Should I just create a regular Class Library project then add the reference to the WSDL? We are not using WCF. I just want to know what the best project type / template I should use if I'm going to share this project with lets say another WAP web project. I simply want to create wrappers for some of the WSDL that we'll be using in part of the PayPal API.

    Read the article

  • Parse and display MIME multipart email on website

    - by aidan
    I have a raw email, (MIME multipart), and I want to display this on a website (e.g. in an iframe, with tabs for the HTML part and the plain text part, etc.). Are there any CPAN modules or Template::Toolkit plugins that I can use to help me achieve this? At the moment, it's looking like I'll have to parse the message with Email::MIME, then iterate over all the parts, and write a handler for all the different mime types. It's a long shot, but I'm wondering if anyone has done all this already? It's going to be a long and error prone process writing handlers if I attempt it myself. Thanks for any help.

    Read the article

  • Edit comment template in Visual Studio

    - by Patrick
    I have poked around and getting the feeling that it isn't possible, however I was wondering if anyone knew how to edit the code comment templates for C# in VS 2010. I was able to change the class file template so it would seem like the ability it there to do it manually, but I have no idea where MS would stick the file. Any insight would be great, patrick

    Read the article

< Previous Page | 39 40 41 42 43 44 45 46 47 48 49 50  | Next Page >