generator

How to generate EDIFACT messages (IFIMIN) from .net (C#)?

Hi I am about to start a project where I need to generate an EDIFACT message (message type: IFTMIN). Since my project is .net based (C# + asp.net) I am looking for advise on generating EDIFACT messages in .net. Is there a free (possibly open source) library that will help generate an EDIFACT message? Are there any pitfalls in regards t...

how to centralize "loading" screen for GWT RPC?

How can I centralize management of a "loading" icon for GWT async RPC calls? I'm looking for a way to have every async call automatically kick off a timer. When the timer fires, if the RPC has not yet completed, a "loading" icon should be displayed. When the RPC completes (either onSuccess() or onFailure()) the loading icon should be ...

python: is there an XML parser implemented as a generator?

I'd like to parse a big XML file "on the fly". I'd like to use a python generator to perform this. I've tried "iterparse" of "xml.etree.cElementTree" (which is really nice) but still not a generator. Other suggestions? ...

Using lookahead with generators

Hi all, I have implemented a generator-based scanner in Python that tokenizes a string into tuples of the form (token type, token value): for token in scan("a(b)"): print token would print ("literal", "a") ("l_paren", "(") ... The next task implies parsing the token stream and for that, I need be able to look one item ahead fr...

guid generator in ruby

How do I generate a globally unique ID in ruby (without rails/merb)? ...

python html generator

I am looking for an easily implemented html generator for python. I found this one http://www.decalage.info/python/html but there is no way to add css elements (id, class) for table. thx ...

Python Reverse Generator

Hi, I'm looking for a way to reverse a generator object. I know how to reverse sequences: foo = imap(seq.__getitem__, xrange(len(seq)-1, -1, -1)) But is something similar possible with a generator as the input and a reversed generator as the output (len(seq) stays the same, so the value from the original sequence can be used)? ...

Automatic PHP Documentation Generator

I am looking at any document generator for PHP that can actually read the source code and generate the documentation - instead of writing comments according to what the generator needs the format to be like. I've looked at phpDocumentor and several other documentation generators: all require the need of writing comments into the source ...

Generators in C++ -- invalid use of nonstatic data member

I sort of understand this, at least the function of generators (I've used them in Python). I understand how the switch statement and its content is formed. However, I get these errors. test.cpp: In constructor 'Foo::descent::descent(int)': test.cpp:46: error: invalid use of nonstatic data member 'Foo::index_' test.cpp: In member functi...

Nesting generator expressions in the argument list for a python function call

I like to use the following idiom for combining lists together, sometimes: >>> list(itertools.chain(*[[(e, n) for e in l] for n, l in (('a', [1,2]),('b',[3,4]))])) [(1, 'a'), (2, 'a'), (3, 'b'), (4, 'b')] (I know there are easier ways to get this particular result, but it comes comes in handy when you want to iterate over the elements...

SQL query generator for Perl with stored procedures support

Current code base I'm working on is full of ad-hoc conditional string concatenations producing less than clear SQL queries. I want to make them maintainable, but since using DBIx::Class is too complex to move to for now (giant legacy base), I'm looking to at least make them more robust by using some sort of SQL generator, which would onl...

Restricting an entire symfony admin generator page according to credentials

I have a website with a large number of admin generators to take care of an assortment of tables. Within the realm of authenticated users, I want to be able to deny access, not just to individual actions or fields, but an entire admin module. There doesn't appear to be a global credentials parameter for generator.yml, and putting stuff ...

Tools to document SSIS workflows

I'm looking for a good tool to document SSIS workflows. Best would be if its not only text based documentation, some visual overview of what happens in the SSIS package would be nice. ...

How can I traverse a file system with a generator?

I'm trying to create a utility class for traversing all the files in a directory, including those within subdirectories and sub-subdirectories. I tried to use a generator because generators are cool; however, I hit a snag. def grab_files(directory): for name in os.listdir(directory): full_path = os.path.join(directory, name...

BarCode Image Generator in Java

How can I create a barcode image in Java? I need something that will allow me to enter a number and produce the corresponding barcode image. Is there a free library available for this type of task? ...

SQL to LINQ generator

Hi; I am new to LINQ and just wanna know; is there any application in which I type standard SQL and it gives me its representing statement in linq? ...

Is there a Ruby on Rails site thumbnail generator available?

I'm hoping to avoid building this if it already exists. Does anyone know of a plugin for Ruby on Rails that will generate a screenshot of a web site? Thanks in advance to anyone who can help me find one. ...

Eclipse setting for generating getters and setters insertion point last member

It really annoys me already now... I can not find the setting to have by default insertion point at last member. Why? Generating getters and setters would then be: ALT+SHIFT+S -> space, space, space... -> ENTER :) And not like now: ALT+SHIFT+S -> space, space, space... -> tab, tab, tab, tab, tab, -> up, up, up... -> ENTER ...

Structured programming and Python generators?

Note: This question mutated a bit as people answered and forced me to "raise the stakes", as my trivial examples had trivial simplifications; rather than continue to mutate it here, I will repose the question when I have it clearer in my head, as per Alex's suggestion. Python generators are a thing of beauty, but how can I easily brea...

Understanding Generators in Python?

Reading the Python cookbook at the minute and currently looking at generators. I'm finding it hard to get my head round. As I come from a Java background, is there a Java equivelant? The book was speaking about 'Producer / Consumer', however when I hear that I think of threading. Can anyone explain what a generator is and why you would...