Search Results

Search found 4288 results on 172 pages for 'mark griffin'.

Page 58/172 | < Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >

  • Comparison of web template engines

    - by Mark
    Post a snippet of code from your favorite templating engine, with the name of the engine and a link to its homepage; show off its basic syntax and maybe some neat features about it that makes it unique. Hopefully this will give people an idea of what's out there and make it easier for them to decide on an engine.

    Read the article

  • C++: Is there any good way to read/write without specifically stating character type in function nam

    - by Mark L.
    I'm having a problem getting a program to read from a file based on a template, for example: bool parse(basic_ifstream<T> &file) { T ch; locale loc = file.getloc(); basic_string<T> buf; file.unsetf(ios_base::skipws); if (file.is_open()) { while (file >> ch) { if(isalnum(ch, loc)) { buf += ch; } else if(!buf.empty()) { addWord(buf); buf.clear(); } } if(!buf.empty()) { addWord(buf); } return true; } return false; } This will work when I instantiate this class with <char>, but has problems when I use <wchar_t> (clearly). Outside of the class, I'm using: for (iter = mp.begin(); iter != mp.end(); ++iter ) { cout << iter->first << setw(textwidth - iter->first.length() + 1); cout << " " << iter->second << endl; } To write all of the information from this data struct (it's a map<basic_string<T>, int>), and as predicted, cout explodes if iter->first isn't a char array. I've looked online and the consensus is to use wcout, but unfortunately, since this program requires that the template can be changed at compile time (<char> - <wchar_t>) I'm not sure how I could get away with simply choosing cout or wcout. That is, unless there way a way to read/write wide characters without changing lots of code. If this explanation sounds awkwardly complicated, let me know and I'll address it as best I can.

    Read the article

  • HTML Slideshow plugin

    - by Mark Szymanski
    I am making a website with some screenshots of an iPhone app I made and was wondering if there was some kind of slideshow thing for HTML. I want it to have the iPhone frame and the slideshow with the screenshots in the middle of it. I would prefer it to be written in something other than flash. Thanks in advance!

    Read the article

  • MFMailComposerViewController doesn't always display attachments

    - by davbryn
    I'm attaching a few files to an email to export from the application I've written, namely a .pdf and a .png. I create these by rendering some view to a context and creating an image and a pdf. I can validate that the files are created properly (I can confirm this by looking in my apps sandbox from Finder, and also by sending the email. I receive the files correctly.) The problem I'm getting is that larger files don't have a preview generated for them within the MFMailComposerViewController view (I simply get a blue icon with a question mark). Is there a limitation on file sizes that can be attached in order for preview to function correctly? With small files it works as expected, but if I try and attach a pdf with the following properties: Pages: 1 Dimensions: 2414 x 1452 Size: 307 KB the file is generated correctly, but displays the question mark icon. If there is no way around that, can I remove the attachment preview altogether? Many thanks, Bryn

    Read the article

  • Roles / Permissions framework for c#?

    - by mark smith
    Hi there, Does anyone know of a good framework to allow me design permission and roles against users. Basically allowing me to automatically check a user can do a certain thing, and then disabling or enabling menu items etc I am not really looking for asp.net security ... as i need to use it in my own service layer and clients both WEB and WPF will use it. I was hoping for something that allows me to create new roles and groups against users and then check what type of permissions a user has or a group has Any help really appreciated.. I am sure some kind of open source framework is available, well i was hoping not having to create my own Thanks

    Read the article

  • .NET /asp.net 4: Changes with automatic NAMES of controls?

    - by mark smith
    Hi there, I just updated an app from .net 2.0 to .net 4.0 and i have noticed the following... For example i have the following control.. <input type="hidden" name="ctl00$cphMain$hfdFueraHorarioOficinaConfirmado" id="cphMain_hfdFueraHorarioOficinaConfirmado" value="False" /> and then in javascript i did this before.. var hfdFueraHorarioOficinaConfirmado=document.getElementById('ctl00_cphMain_hfdFueraHorarioOficinaConfirmado'); but after checking the Id within the html source once it renders and also doing some debugging with firebug etc.... it has changed from ctl00_cphMain_hfdFueraHorarioOficinaConfirmado to cphMain_hfdFueraHorarioOficinaConfirmado can anyone explain why? .... so should i basically do a search and replace and remove the ctl00?????? A little confused Obviosuly the javascript line with the the ctl00_ infront return NULL because it doesn't exist, but removing this returns the object.. Any help or ideas really appreciated Thanks

    Read the article

  • Python: Best way to check for Python version in program that uses new language features?

    - by Mark Harrison
    If I have a python script that requires at least a particular version of python, what is the correct way to fail gracefully when an earlier version of python is used to launch the script? How do I get control early enough to issue an error message and exit? For example, I have a program that uses the ternery operator (new in 2.5) and "with" blocks (new in 2.6). I wrote a simple little interpreter-version checker routine which is the first thing the script would call ... except it doesn't get that far. Instead, the script fails during python compilation, before my routines are even called. Thus the user of the script sees some very obscure synax error tracebacks - which pretty much require an expert to deduce that it is simply the case of running the wrong version of python. update I know how to check the version of python. The issue is that some syntax is illegal in older versions of python. Consider this program: import sys if sys.version_info < (2, 4): raise "must use python 2.5 or greater" else: # syntax error in 2.4, ok in 2.5 x = 1 if True else 2 print x When run under 2.4, I want this result $ ~/bin/python2.4 tern.py must use python2.5 or greater and not this result: $ ~/bin/python2.4 tern.py File "tern.py", line 5 x = 1 if True else 2 ^ SyntaxError: invalid syntax (channeling for a coworker)

    Read the article

  • Background video flash api that can also do html5

    - by Mark
    I'm looking for a way to play flash videos in the background, without controls (yes legitimate reason), and a js api to start/stop the videos easily, like: video1.stop(); or $("div.all-videos").start(); Basically, I'm looking for http://www.happyworm.com/jquery/jplayer/ for video. Soundmanager is basically what I need on the flash side, but it has no html5 support. Is there a flash player that video player that does have html5 video support. Thanks.

    Read the article

  • MooTools Classes and JsDoc

    - by Joel Alejandro
    I have the following Moo class: Nem.Ui.Window = new Class({ Implements: [Options, Events], options: { caption: "Ventana", icon: $empty, centered: true, id: $empty, width: $empty, height: $empty, modal: false, desktop: $empty, x: $empty, y: $empty, layout: $empty }, initialize: function(options) { this.setOptions(options); /* ... */ }, setHtmlContents: function(content) { /* ... */ }, setText: function(text) { /* ... */ }, close: function(win) { /* ... */ }, /* ... */ }); I want to document it with JsDoc. I read you can use @lends [class].prototype inside new Class and mark initialize with the @constructs tag. How can I mark methods and events such? I.E.: setHtmlContents should be a method, close should be an event. Also, can the elements under options be documented, somehow?

    Read the article

  • Django: Group by?

    - by Mark
    I'm looking for something like the following: previous_invoices = Invoice.objects.filter(is_open=False).order_by('-created').group_by('user') (group_by() doesn't exist) This would find the most recently closed invoice for each user. This aggregation API seems to let you do stuff like this for counts and sums, but I don't need a count or sum or anything, I actually want the invoice objects!

    Read the article

  • Mac OS date command - getting higher temporal resolution

    - by Mark
    Hey all, I am trying to use the date command in Terminal on multiple Mac OS X machines that are synced via NTP to synchronize some code in a program. Essentially I am running a program... MyProgram with arguments[date] I can get date to give me the seconds since the Unix epoch with the %M specifier. When I try to use %N to get nanosecond resolution, date just returns N. Is there anyway to get date to give me finer then second resolution? I wouldn't even mind passing two arguments such as (date +%M):arg2 And then converting units in the program. Many thanks in advance! %N specifier listed here: http://en.wikipedia.org/wiki/Date_(Unix)

    Read the article

  • Django: How to iterate over formsets and access cleaned data?

    - by Mark
    What if I want to do something with my formset other than immediately saving it? How can I do this? for form in vehicles_formset.forms: listing.id = None listing.vehicle_year = form.cleaned_data['year'] listing.vehicle_make = form.cleaned_data['make'] listing.vehicle_model = form.cleaned_data['model'] listing.vin = form.cleaned_data['vin'] listing.vehicle_runs = form.cleaned_data['runs'] listing.vehicle_convertible = form.cleaned_data['convertible'] listing.vehicle_modified = form.cleaned_data['modified'] listing.save() (Thus creating multiple listings) Apparently cleaned_data does not exist. There's a bunch of stuff in the data dict like form-0-year but it's pretty useless to me like that.

    Read the article

  • Using StructureMap, how do you explicitly trigger the reinstantiation of a object with InstanceScope

    - by Mark Rogers
    I have an integration test harness where I want to teardown and then re-instantiate some of the singleton-scoped objects I've registered with StructureMap, after and before each test. This way I can simulate the actual run time environment, but not have the singleton's state being passed from one test to another. Maybe this isn't a great way to do an integration test, but I'm running out of alternative solutions (read open to any advice). So can an object with InstanceScope.Singleton, be re-instantiated? What's the best way to do re-instantiate a singleton-scoped object with StructureMap?

    Read the article

  • Using Perfmon with MySQL Connector/NET

    - by Mark Richman
    I am trying to diagnose repeated lock wait timeouts from my ASP.NET app to MySQL 5.1. I'm using MySQL Connector/NET 6.2.3. I don't see anything MySQL-related in Perfmon's Performance Object dropdown list. What else can I do to try to diagnose these issues?

    Read the article

  • How do I pass a lot of parameters to views in Dango?

    - by Mark
    I'm very new to Django and I'm trying to build an application to present my data in tables and charts. Till now my learning process went very smooth, but now I'm a bit stuck. My pageview retrieves large amounts of data from a database and puts it in the context. The template then generates different html-tables. So far so good. Now I want to add different charts to the template. I manage to do this by defining <img src=".../> tags. The Matplotlib chart is generate in my chartview an returned via: response=HttpResponse(content_type='image/png') canvas.print_png(response) return response Now I have different questions: the data is retrieved twice from the database. Once in the pageview to render the tables, and again in the chartview for making the charts. What is the best way to pass the data, already in the context of the page to the chartview? I need a lot of charts, each with different datasets. I could make a chartview for each chart, but probably there is a better way. How do I pass the different dataset names to the chartview? Some charts have 20 datasets, so I don't think that passing these dataset parameters via the url (like: <imgm src="chart/dataset1/dataset2/.../dataset20/chart.png />) is the right way. Any advice?

    Read the article

  • How can a large number of developers write software together without either a cumbersome process or

    - by Mark Robinson
    I work at a company with hundreds of people writing software for essentially the same product. The quality of the software has to be high because so many people depend on it (not least the developers themselves). Because of this every major issue has resulted in a new check - either automated or manual. As a result the process of delivering software is becoming ever more burdensome. So that requires more developers which... well you can see it is a vicious circle. We now have a problem with releasing software quickly - the lead time even to change one line of code for a very serious issue is at least one day. What techniques do you use to speed up the delivery of software in a large organization, while still maintaining software quality?

    Read the article

  • Copy **kwargs to self?

    - by Mark
    Given class ValidationRule: def __init__(self, **kwargs): # code here Is there a way that I can define __init__ such that if I were to initialize the class with something like ValidationRule(other='email') then self.other would be "added" to class without having to explicitly name every possible kwarg?

    Read the article

  • How should I do custom sort in Python 3?

    - by S.Mark
    In Python 2.x, I could pass custom function to sorted and .sort functions >>> x=['kar','htar','har','ar'] >>> >>> sorted(x) ['ar', 'har', 'htar', 'kar'] >>> >>> sorted(x,cmp=customsort) ['kar', 'htar', 'har', 'ar'] Because, in My language, consonents are comes with this order "k","kh",....,"ht",..."h",...,"a" But In Python 3.x, looks like I could not pass cmp keyword >>> sorted(x,cmp=customsort) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'cmp' is an invalid keyword argument for this function Is there any alternatives or should I write my own sorted function too?

    Read the article

< Previous Page | 54 55 56 57 58 59 60 61 62 63 64 65  | Next Page >