transformation

How can I strip comments and doc strings from python source code?

Is there a program which I can run like this: py2py.py < orig.py > smaller.py Where orig.py contains python source code with comments and doc strings, and smaller.py contains identical, runnable source code but without the comments and doc strings? Code which originally looked like this: #/usr/bin/python """Do something blah blah......

xsl:template match for xml with prefixes

I have this xml file <?xml version="1.0" encoding="UTF-8"?> <bo:C837ClaimParent xsi:type="bo:C837ClaimParent" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bo="http://somelongpathHere/process/bo"&gt; <claimAux> ... </claimAux> <enterpriseClaim> ... <patientAccountNumber>data to capture here</patientAccountNumbe...

XSL recursive sort

Hello, I am facing a problem where I need to sort elements, depending on their value, which contains a numbers, separated by periods. I need to sort elements depending on the value of the number before first period, then the number between first and second periods and so on. I don't know, how deep this hierarchy can go and that is the bi...

3D globe rotation issues

Hi all, Im trying to get my 3D sphere to rotate when a user moves their mouse/finger over the sphere. I can get it to rotate no problems, but when I try to add inertia to the sphere using the Affine2DInertiaProcessor in the Surface SDK, I get jumping issues when I quickly flick the sphere, and I dont know why... Here is my initialisat...

Python list filtering and transformation

Hello, I have a list of library filenames that I need to filter against regular expression and then extract version number from those that match. This is the obvious way to do that: libs = ['libIce.so.33', 'libIce.so.3.3.1', 'libIce.so.32', 'libIce.so.3.2.0'] versions = [] regex = re.compile('libIce.so\.([0-9]+\.[0-9]+\.[0-9]+)') for l ...

Easy way to extract documentation from Ecore files

I am trying to extract the packagenames and classnames AND documentation and notes stored in my Ecore-files for including them in external documents (Wiki, Word, etc.) Are there any easy to use tools for doing this or will I have to write my own XSLT-transformation or setup an oAW-project to do this? If there are no end-user friendly t...

XSLT output does not reflect on Firefox

Hi, I have created a Practice.xsl file to transform the source Practice.xml to an html from javascript and add the generated html to n empty DIV element, which is working fine with IE But same html is not rendered correctly on Firefox. here is the Practice.xml <feed> <feedback> <user>Naresh</user> <date>12 Oct, 2009</date> <comm...

Transform rectangular image into trapezoid

In .NET how can I transform an image into a trapezoid. The Matrix class supports rotation, shear, etc, but I can't see a trapezoidal transformation. I'm using the usual System.Drawing.* API, but I'm flexible to other .NET solutions. ...

Any free polygon library for the iPhone?

I need a library that can manage polygon modeling and basic transformation like rotating and translating. I'd rather not redevelop everything from scratch Thanks ...

Silverlight Image Positioning/Transformation

What I would like to do is the following: Change the points of the four corners of an image. What is possible now, is to change the top left corner. But that will only move the image. I want to transform the image by changing the corner coordinates. The effect will be a 3d-kind transformation. A skew transformation will not do, I want ...

return html from a web service in asp.net

Is there anyway to return HTML from a web service in C#? If I have my XSLT transform output tag as XML then I'm geting the XML tag <?xml version="1.0" encoding="UTF-8"?> at the top of the returned page. Under that is my HTML and that's fine but what I'd really like to do is change my XSLT transform output tag to HTML and have the we...

Generating XHTML from Servlet after XSL Transformation

Hi, I've written a servlet that takes some xml and xsl and produces a PDF, using ITextRenderer, and displays it on the screen. However, what I wish to do now is to display the resulting XHTML from the transformation on a webpage. I've created a new servlet which gets the xml and xsl as normal, but I'm unsure how to get the resultant XH...

Where/How should I do validation and transformations on entities in Google App Engine?

In Ruby on Rails, each model entity has a "validate_on_*something*" hook method, that will be called before the entity is actually persisted to the database. I would like similar functionality in Google App Engine. I am aware that you can do validation on individual Properties by passing arguments to them in their declarations. However, ...

Trying to derive a 2D transformation matrix using only the images...

Hi, I dunno if this should go in a Math forum or a Programming forums, but I'll post it in both and see where I get. I have two computer images... one of them is an "original" image (a large TIF file). The other one is a transformed version of the original image... it's been rotated, sheared and translated in a software program. I need ...

pound(#) sign in directory name: in Java How to read it

The ClassLoader doesn't find me the file. It throws a: javax.xml.transform.TransformerConfigurationException: javax.xml.transform.TransformerException: java.io.FileNotFoundException: I was trying to do the follwoing: TransformerFactory.newInstance().newTransformer(new StreamSource("C:\\dev\\workspace\\test1\\a#b\\Browser-Email....

Rotating a .net panel in winforms

We use windows forms and custom user controls and I would like to be able to rotate the panel hosting the userControl in a particular form. I have seen similar functionnalities with WPF but can't use it for the moment. Is it possible to achieve the rotation of a panel and its children using possibly built-in .net methods or GDI+ ? I hav...

Transformation matrix C#

The Christmas is coming and I got idea to send electricity card (little program). Something like dropping snow would be fine. But it is little bit boring something nice extra effects would be nice. Then I find this little flash example. http://wonderfl.net/code/71344f9a655053d9f793a32c68f00921c67f1977 But I don’t have idea how to conve...

Inverse WPF Transformations

I'm working on a WPF image viewer which needs to allow for rubber band selection after an image has been transformed. I've got it working for zoom and transformation, but when the image is rotated, the selection's top left position is wrong. I've tried a couple of ideas to fix this with some basic trig functions, but i just can't seem t...

How to reformat XML with group-adjacent (XSLT)

I'm new in this XSLT-thing and I can't figure out how to this: This is a snippet from the xml i start with: <Article> <Bullettext>10,00 </Bullettext> <Bullettext>8,00 </Bullettext> </Article> <Article> <something>some text</something> </Article> <Article> <Corpsdetexte>Bulgaria</Corpsdetexte> <Bullettext>15,0 </B...

XSLT create nested structure (table of content-style) when there is none

This is what it looks like now <Titre_2>first level 01</Titre_2> <Titre_2>second level 01</Titre_2> <Titre_2>third level 01</Titre_2> <Titre_3_ch1>deepest01</Titre_3_ch1> <Titre_3_ch1>deepest02</Titre_3_ch1> <Titre_3_ch1>deepest03</Titre_3_ch1> <Titre_2>third level 02</Titre_2> <Titre_3_ch1>deepest04</Titre_3_ch1> <Titre_3_ch1>deepest05...