transformation

QGraphicsView and QGraphicsItem: don´t scale item when scaling the view rect

Hi, I am using Qt´s QGraphicsView- and QGraphicsItem-subclasses. is there a way to not scale the graphical representation of the item in the view when the view rectangle is changed, e.g. when zooming in. The default behaviour is that my items scale in relation to my view rectangle. I would like to visualize 2d points which should be rep...

XML Schema Migration

I am working on a project where we need to save data in an XML format. The problem is, over time we expect the format / schema for our data to change. What we want to be able to do is to produce scripts to migrate our data across different schema versions. We distribute our product to thousands of customers so we need to be able to ru...

CGAffineTransform on NSObjects?

Does CGAffineTransform only work on UIViews? This is troublesome for my design. The objects that im drawing are essentially images, which i draw using drawAtPoint. These objects are NSObjects, and thus do not have transformation matrices. What would be the best way to give my rendered images the ability to be scaled and translated (and...

Design a data model to flat file transformation... delegates or inheritance?

I have a maintenance application that has to turn enterprise data (from various databases/tables) into flat files, each in a specific format, for consumption by a legacy application. I've got data models like public class StatusCode { public String Id { get; set; } public Char Level { get; set; } public String Description { ...

Transforming XML strcutures using Ruby

I've been wracking my brain trying to solve this problem. This is my first time using any scripting language for this kind of work, and I guess I might've picked a hard job to start with. Essentially, what I need to do is transform some basic XML into a heavier XML structure. Example : Translate the following : <xml> <test this="stuff...

Can you insert blank lines in an already transformed PDF?

I have a situation where I need to increase the space between a table and the header on a PDF that has already been transformed from an XSL template. I need to insert an address in the newly created space. This part is easy enough and I can do that using a stamper and a new table. However, I am struggling to find a solution to move the...

wpf rotate and translate transform issue on textblock

Hi, I've got a list of strings I'm binding to an items control. The strings are displayed in textblocks I've declared in the itemscontrol template. I've rotated the textblocks 270 so that the text is on its side - I've also translated the textblocks down by their width so that they are at the top of the page. My issue is they are now...

Is it possible to include/exclude the XML Processing Instruction based on its presence in the source document?

I have to pass back information from a different source and can have a transformation in between, But depending on if the source document has the xml processing instruction, I have to pass it on and if it doesnt, I shouldnt pass it on. Input <?xml version="1.0" encoding="UTF-8"?> <Source/> Output <?xml version="1.0" encoding="UTF-8...

cp2tform for 3D point sets?

Hi everybody the matlab function cp2tform infers the transformation needed to match two point sets in a 2D space. Refering to my former question (Two sets of 3d points) does anyone know a similar function to infer the transformation for two points sets in 3(n) dimensional space????? Manually it would be an aproach like that http://www....

Given an input and desired output, figure out the needed transformation.

I want a program that does what I said in the title. I realize that this is a pretty vague problem. I also realize that figuring out how to transform any input into any output is nearly impossible, but it seems like handling some simple cases should be feasible. To provide a concrete example (in Python): >>> def find_transform(star...

Tool for transforming Excel files? (swapping columns, basic string manipulation etc)

I need to import tabular data into my database. The data is supplied via spreadsheets (mostly Excel files) from multiple parties. The format of each of these files is similar but not the same and various transformations will be necessary to massage the data into the final format suitable for import. Furthermore the input formats are like...

Biztalk explode in XSLT transformations

I'm receiving XML into BizTalk. One part is element and the value is ids separated by comma <Stores>15,34</Stores> I need to transform this into <Stores> <Store>Store 1</Store> <Store>Store 4</Store> </Stores> What I need to do is to explode the value by comma, take each value and get value from database (15 -> Store 1, 34 ...

User defined xml transformation

I have some sample xml data, for ex: <?xml version="1.0" encoding="utf-8"?> <Account> <User> <FirstName>John</FirstName> <LastName>Doe</LastName> </User> <LoginDetails Sequence="1"> <LoginDate>01/01/09</LoginDate> <Status>Successful</Status> </LoginDetails> <LoginDetails Sequence="2"> <LoginDate>01/02/09</LoginDate> <Status>...

J2ME like Sprite on Android

For my useless project of the month I'm working on a 'emulator' to run J2ME programs on Android. But now I'm stuck with the J2ME Sprite implementation. Specifically the transformations used in it. In my Sprite I have a bitmap with three character images. I would like to paint the second frame mirrored or rotated 90 degrees. What would b...

Simple XSLT Question: setting inner HTML node attribute values such as <div id="something">

Hello all, I'm having a hard time find an answer to the following question, which would seem pretty common, so I must be missing something fundamental. Could you please help me out? Given the contrived XML schema, sample XML input, and sample XSLT below used to transform XML to HTML. How do I set attributes within tags? For example...

Xpath in XSLT: select elements that are between 2 other elements, part II

As similar to this question (there are more related entries, however as a new user I can only post one URL): http://stackoverflow.com/questions/1489326/xpath-get-elements-that-are-between-2-elements I have a question regarding the selection of set of elements that occur between 'other / delimiting' elements. This situation occurs when t...

Is there a standard format for describing a flat file?

Is there a standard or open format which can be used to describe the formating of a flat file. My company integrates many different customer file formats. With an XML file it's easy to get or create an XSD to describe the XML file format. I'm looking for something similar to describe a flat file format (fixed width, delimited etc). S...

Transform a java object tree into a 2 dimension table

Hi, I'm faced to the following problem. I have a tree of java objects for which I have to export each field value into a CSV file. The result of the exportation must be similar to what we have in SQL left outer join (called cartesian product). Class author @DataField(pos = 1) String firstName; @DataField(pos = 2) String lastName; @O...

Comparing images using SIFT

I'm trying to compare 2 images that are taken from a digital camera. Since there may be movement on the camera, I want to first make the pictures "match" and then compare (using some distant function). To match them, I'm thinking about cropping the second picture and using SIFT to find it inside the first picture... it will probably hav...

How to get OpenGL to display NV12 texture in Cocoa

I have a YUV:420 (aka NV12) frame data, how can I get OpenGL to recognize its format for glTexImage2D() rendering. I realize that I might have to perform colorspace transformation, but is there a way that I can tell openGl to command the graphic hardware to perform the colorspace transformation? ...