transformation

Indent text child nodes with javax.xml.transform.Transformer

Hello, I'm transforming a DOM document to XML in java using javax.xml APIs. The result is <tag> <tag2>text</tag2> </tag> but I need it to be <tag> <tag2> text </tag2> </tag> Are there any options to do that with text child nodes? I didn't find any ...

At will scaling and rotation in a 2D space

Hi, I'm trying to write a graphical program in C++ with QT where users can scale and rotate objects with the mouse (just like inkscape or CorelDraw does), however after many months trying to make it happen I still cannot make it work. It currently works for example by just rotating or just scaling, but not when the user want to transfor...

trouble with xml transformation

Hi, I have an xml that looks something like this <para> text text text <b>text</b> text text <i>text</i> </para> the objective is to convert this to mediaWiki formatting with ''' for a bold font and so on. when I write a transformation for this the template match ignores all the text inside the <para> tag and only the the <b>s ...

Scaling and rotating a subview from multi-touch pinch / zoom on superview

I have custom uiimage views that I want the users to be able to scale and rotate. These images are small and multitouch pinch-to-zoom on the imageview itself isn't feasible. So I thought I can perform pinch-to-zoom on the superview and somehow make the imageview respond to rotation and scaling. I gathered multitouch information on the s...

Perspective transformation with GD

How could you distort an image with PHP GD from this... To this... using only the PHP GD library. I don't want to use a function someone else made I want to UNDERSTAND what's going on ...

xor n sets of variables for use in SAT transformation

Hey you guys, I am doing a transformation from a customoized set cover problem to a sat, so i can mayhaps use a sat solver for my problem. My problem is, that i have several sets of variables that interact together in a term of the sat problem. something along the lines of x_i v x_j v x_k; y_i v y_j v y_k . However what i cant seem to ge...

Web.config transformation causing an error when building

I am using the new VS2010 Web.config transformation. When i do a publish under the 'Release' solution configuration, i get a folder created called ..obj\Release\TransformWebConfig, which contains the original Web.Config and the transformed Web.Config, in addition to If i was to then try to re-build my solution using the same 'Release'...

What is a practical process for doing data transformation on a live system when hibernate + code generation is used?

I have an existing database defined via HBM.XML files (code and sql dml generated via Hibernate tools), and am looking for a practical way to perform data transformation on existing data. So supposed the following: The original table is defined with a single FK; there is existing data. The revised table is defined with two FKs; the two...

Image transforamtion and cropping in android 2.1

Hey, i would like to transform and crop a given image in android. Therefore i have 4 source and 4 destination points to specify the transformation matrix. i use float[] src = new float[8]; src[0] = rp[0].getX(); src[1] = rp[0].getY(); src[2] = rp[1].getX(); src[3] = rp[1].getY(); src[4] = rp[2].getX(); sr...

How to get transformations from transformation matrix in Flash?

I have transformation matrix properties (a,b,c,d). How to calculate scaleX, scaleY, scewX, scewY and rotation angle from those values? When only one type of transformation is applied, I can figure out that: scaleX = a scaleY = d scewX = c scewY = b rotation = arccos(a) or -arcsin(c) But when multiple transformations are applied at on...

WPF: Transforming a model's position(s) directly

Hi; I'm new to WPF, and I'm trying to understand the underlying architecture, so please correct me if I'm wrong: As far as I know, there are three possibilities to dynamically transform a GeometryModel3D during runtime: a) Set the model's Transform-property to a Transform3DGroup once, to which you add new / duplicate Transformations. ...

3D perspective text on a webpage

How can I achieve 3D text transformations in perspective using Javascript/CSS. Solutions using external libraries of Javascript/CSS are also possible ...

How to restructurize a List in Haskell?

I have a list like this: (Pseudo notation) (X,...) -> (X,...) -> (X,...) -> ... | | | V V V (Y,...) (Y,...) (Y,...) | | | V V V (Z,...) (Z,...) (Z,...) Type is (Enum a, Bounded a) => [[(a,x)]]. But I need something like this: (X, ... -> .....

Is there algorthm for 2 way 2D plane transformation based on 3 points and angle?

So I have such structure: 3 points (X, Y) BAC and knowledge that in real 3d world BAC angle is 90 degrees.So an image would look like that: And what we want to get at first is : than we wanna add some stuff like 2 parallel lines and what I need next is some formula for somehow shrinking image back to its original view but now w...

What is the fastest method for rotating an image without clipping its edges with GDI+?

The title says it all. There are some looooong and hungry algorithms for doing so, but as of yet I haven't come up with or found anything particularly fast. ...

pass Node to Xerces' setParameter()

Hi all, I try pass a node as xsl stylesheet parameter to Xerces XSL Transformer transformer.setParameter("settings", nodeSettings); in xsl: But i receive the following Exception: javax.xml.transform.TransformerException: java.lang.RuntimeException: Invalid conversion of 'com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl'...

Web.Config transformation does not wok

Hello all, Here is the problem : I have a brand new web application in VS 2010, Framework 3.5 I have a very simple web.config with the connectionStrings node : <connectionStrings> The Web.Release.Config is like this : <?xml version="1.0" encoding="utf-8"?> Then i create a deployment package using V...

Apply an affine transformation to view in Interface Builder

Is it possible to apply an affine transformation to a view directly in Interface Builder? I know I can attach an outlet and assign it to the transform in code, but I'd like the convenience of visually tweaking the transform in Interface Builder. ...

Java XML transformation interface

I need to transform a XML. Usually I would use Saxon and a XSLT 2.0 stylehsheet for this. The transformations I have to do involve side-effects and are stateful and manipulate the contens of nodes, so implementing a XPath function doesn't make that much sense. I decided to implement a transformer class for this purpose. I found javax.xm...

.jar to .cs class/file transform technique or utility?

I am looking for a way to transform some classes from Java to .Net in a code gen way. Not at run time, but re-generate a handful of business objects as needed (not often). the catch is, i want to have full control of how they end up. So while java classes have get and set methods, i will create a property out of them. the only way i...