Search Results

Search found 4250 results on 170 pages for 'mark underwood'.

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

  • 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

  • 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

  • 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

  • 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

  • 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

  • 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 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

  • Developing ebooks- software?

    - by Mark Mayo
    I've written a few documents for friends or blogs on software testing, job hunting and android development. I've been toying with the idea of producing some programming-related ebooks. However, developing these in Word or OpenOffice seems too amateurish compared to some of the fantastically produced books out there. I'm proficient in LaTeX but have never seen it used to produce ... 'marketable' works - just technical papers, maths, etc - which is great for code but not for distribution. Has anyone seen any good (preferably free / open source) tool or software for developing/compiling professional-looking marketable ebooks (probably to .pdf or .exe format - but I can take care of that part if need be)? And more importantly, ones that are easy to use to format any code samples or snippets that I may choose to include. Much appreciated.

    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

  • tabs and spaces

    - by Mark
    People have been telling me to use spaces for indents, rather than tabs. But is it just me or is it a pain to hit the space bar 4, 8, times every few lines? Is there something I'm missing? Thanks.

    Read the article

  • rails wiki site - article edit highlighting/strikethrough with htmldiff maxes cpu

    - by mark
    Hi I'm implementing a wiki style site and want to highlight changes made to articles between successive versions. Using htmldiff to highlight changes works great, except it is rather cpu intensive. I'm using the awesome vestal_versions plugin for versioning. So how best to handle this? I considered having an on_create callback on version creation create a delayed job that processes and then stores the htmldiff processed article (in the version table row). If this is a good approach, how can I extend vestal_versions without touching the gem? Or maybe there would be a better approach. Any advice is much appreciated. :)

    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

  • UITextView like iPhone Notes application

    - by Mark
    I am trying to recreate the Notes application. So far I got the following: textView = [[UITextView alloc] initWithFrame:CGRectMake(25.0, 30.0, 295.0, 214.0)]; textView.delegate = self; textView.backgroundColor = [UIColor clearColor]; textView.font = [UIFont fontWithName:@"MarkerFelt-Thin" size:19.0]; [self.view addSubview:textView]; The thing I dont know is how they were able to put the date on top like a header (it is within the UIScrollView that is obvious). Also under every text there is a line where did that came from. Does someone have an idea or a sample project I can take a look at?

    Read the article

  • Java Socket fails to transmit data over the network

    - by Mark Griffin
    I'm experiencing a bizarre problem with sockets between a Java Knopflerfish client bundle and a PHP (CLI, not web) server. The client/server pair work fine when both are located on the localhost, and all data is transmitted successfully. However, when the Java client exists on a different machine, connections to the server are successful, but no data is received by the PHP script. Packet analysis confirms that the data sent by the Java client is received on by the server - PHP just seems to have problems getting its hands on it. As a further note, I've done some tests with telnet as the client. The PHP server script receives all data fine from any host. This leads me to believe that the problem has something to do with the way java is setting up the socket or that there is some networking issue that I'm not familiar with. Any thoughts would be appreciated. Can post code samples if desired.

    Read the article

  • What is a good Javascript RDFa parser implementation?

    - by tremoloqui
    I am looking to implement a client side RDFa based formatting for a web application. This would be similar to Mark Birbeck's ubiquity-rdfa project. Mark's project looks fantastic but it has at least two drawbacks: It is slow. Adding RDFa formatting to a simple page causes a noticeable delay in page loading. It is complex. The ubiquity-rdfa project makes use of the w3c fresnel specification which is complex way to add simple annotations to client markup. I am looking for a lighter weight way of adding annotations through client code and I don't mind doing some work to get it. What I would like is a fast and reliable Javascript RDFa parser. Some implementations that I have found include: W3C RDFa bookmarklet parser Elias Torres RDFa extractor I am interested to know if you would recommend one of these, or another, RDFa Javascript implementation. Thanks!

    Read the article

  • Dependency Injection and Unit of Work pattern

    - by sunwukung
    I have a dilemma. I've used DI (read: factory) to provide core components for a homebrew ORM. The container provides database connections, DAO's,Mappers and their resultant Domain Objects on request. Here's a basic outline of the Mappers and Domain Object classes class Mapper{ public function __constructor($DAO){ $this->DAO = $DAO; } public function load($id){ if(isset(Monitor::members[$id]){ return Monitor::members[$id]; $values = $this->DAO->selectStmt($id); //field mapping process omitted for brevity $Object = new Object($values); return $Object; } } class User(){ public function setName($string){ $this->name = $string; //mark modified by means fair or foul } } The ORM also contains a class (Monitor) based on the Unit of Work pattern i.e. class Monitor(){ private static array modified; private static array dirty; public function markClean($class); public function markModified($class); } The ORM class itself simply co-ordinates resources extracted from the DI container. So, to instantiate a new User object: $Container = new DI_Container; $ORM = new ORM($Container); $User = $ORM->load('user',1); //at this point the container instantiates a mapper class //and passes a database connection to it via the constructor //the mapper then takes the second argument and loads the user with that id $User->setName('Rumpelstiltskin');//at this point, User must mark itself as "modified" My question is this. At the point when a user sets values on a Domain Object class, I need to mark the class as "dirty" in the Monitor class. I have one of three options as I can see it 1: Pass an instance of the Monitor class to the Domain Object. I noticed this gets marked as recursive in FirePHP - i.e. $this-Monitor-markModified($this) 2: Instantiate the Monitor directly in the Domain Object - does this break DI? 3: Make the Monitor methods static, and call them from inside the Domain Object - this breaks DI too doesn't it? What would be your recommended course of action (other than use an existing ORM, I'm doing this for fun...)

    Read the article

  • Serialize Object

    - by Mark Pearl
    Hi.. I am new to serialization and I cannot for the life of me figure out how to fix this exception I am getting... I have an object that has the following structure [XmlRoot("MaxCut2")] public class MaxCut2File : IFile { public MaxCut2File() { MyJob = new Job(); Job.Reference = "MyRef"; } [XmlElement("JobDetails", typeof(Job))] public IJob MyJob { get; set; } } An inteferface... public interface IJob { string Reference { get; set; } } And an class [Serializable()] public class Job : IJob { [XmlElement("Reference")] public string Reference { get; set; } } When I try to serialize an instance of the MaxCut2File object I get an error {"Cannot serialize member 'MaxCut2File.MaxCut2File.MyJob' of type 'MaxCut2BL.Interfaces.IJob', see inner exception for more details."} "There was an error reflecting type 'MaxCut2File.MaxCut2File'." However if I change my property MyJob from the IJob type to the Job type it works fine... Any ideas?

    Read the article

  • Can any genius out there turn this code from generating permutation to generating combination?

    - by mark
    #include <string> int main(int,char**) { std::string default_str = "12345"; int perm=1, digits=default_str.size(); for (int i=1;i<=digits;perm*=i++); for (int a=0;a<perm;a++) { std::string avail=default_str; for (int b=digits,div=perm;b>0; b--) { div/=b; int index = (a/div)%b; printf("%c", avail[index] ); avail.erase(index,1) ; } printf("\n"); } printf("permutations:%d\n",perm); while(1); }

    Read the article

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