transformation

SQLAlchemy Column to Row Transformation and vice versa -- is it possible?

I'm looking for a SQLAlchemy only solution for converting a dict received from a form submission into a series of rows in the database, one for each field submitted. This is to handle preferences and settings that vary widely across applications. But, it's very likely applicable to creating pivot table like functionality. I've seen th...

How to detect element transformation type (scale, move, rotate) for rotated elements depending on cursor position?

The situation I've written the following method (in actionscript 3, it's a flash application) which returns what transformation type is required for the current mouse position in relation to a given element position. An element can be moved, scaled and rotated. This method returns if any of these transformations are applicable with the...

Good examples of architecturing a transformation application

Hi everyone, I'm looking for suggestions, best practices, and if possible open-source examples of a transformation architecture that is flexible and decoupled. I need to change an already existent codebase that based on some analysis is able to convert some old existent apps into something newer. The ins and outs aren't that interesti...

Performing a Flip animation completely through code WPF

I am try to add a flip animation to a user control I built. The user control is simple it has a 87x87 image front and back and some properties. It is suppose to represent a tile in a game I am working on for fun. I am trying to animate a flipping affect of the user picking the tile from the deck. I feel I need to do this through code...

Howto convert transformed coordinates to world coordinates in OpenGL?

Hello, everybody, I have a transformation set up in Opengl like this: glPushMatrix(); glTranslated(pntPos.X(), pntPos.Y(), pntPos.Z()); glRotated(dx, 1, 0, 0); glRotated(dy, 0, 1, 0); glRotated(dz, 0, 0, 1); //I use this to Render a freely placeable textbox in 3d //space which is based on the FTGL-Toolkit [1] (for TTF support). m_F...

Convert string "dd month_full_name year" to string "yyyy/mm/dd" with .NET

Is there anything standard in C# to transform in to out. I don't mind ad hoc routine either. string in = "1 February 2001" string out = "2001/02/01" ...

visibility (overlapping) problems with CABasicAnimation CALayer transformations

I have two UIImageViews on my object, and I'm trying to animate them to page like a book. I used some of the built in animations for a while (UIViewAnimationTransitionFlipFromLeft/Right), and decided I could do better. I found a nice example for half of the animation I wanted here: http://fiftysixtysoftware.com/blog/2009/uiview-pageopen-...

How to find transformation matrix aligning two lines?

Given two points in 3D space, A and B, I get a line segment LS. Given two new points A' and B' yielding the line segment LS', I need to find the transformation matrix that transforms LS into LS'. The length of the line segments is assumed to be equal. I have a theory on how to calculate the matrix, but I would really like some feedback ...

C: Convert A ? B : C into if (A) B else C

I was looking for a tool that can convert C code expressions for the form: a = (A) ? B : C; into the 'default' syntax with if/else statements: if (A) a = B else a = C Does someone know a tool that's capable to do such a transformation? I work with GCC 4.4.2 and create a preprocessed file with -E but do not want such structures...

Getting the transformation matrix of an animation in Android

I would like to obtain the transformation matrix of an animation to calculate the position of the view that was animated. It seems the Animation class has a method called getTransformation that can be used to obtain the transformation applied to the view. However, if I use getTransformation before starting the animation I obtain the id...

Transform GPS Co-Ordinates to Container Co-Ordinates.

Hi, I am looking for some service that can transform GPS coordinates into XY coordinates so that I can plot a point on an Image. Something like fromLatLngToContainerPixel would be great. Thanks in advance. P.S. I am developing a desktop application in java. ...

Certain transformations in Open Inventor(Coin3D)

Hi, I am quite new to Open Inventor(Coin3D) and have the following problem: I have a SoSelection holding a root node(also SoSeparator). And the root node holds a number of SoSeparator nodes. Each of these SoSeparator nodes holds a SoTransform node and a SoCube node. When I select one cube node I want all other cubes within a certain di...

Derivative of a program

Let us assume you can represent a program as mathematical function, that's possible. How does the program representation of the first derivative of that function look like? Is there a way to transform a program to its "derivative" form, and does this make sense at all? ...

Calculating Growth-Rates by applying log-differences

I am trying to transform my data.frame by calculating the log-differences of each column and controlling for the rows id. So basically I like to calculate the growth rates for each id's variable. So here is a random df with an id column, a time period colum p and three variable columns: df <- data.frame (id = c("a","a","a","c","c","d","...

Access external xml using xslt document function return 401

On MOSS2007, I have a webpart that display the content of a xml feed. I use a xslt with parameters for transforamtions. There is a situation when I receive a 401 Authorisation exception. I realize that this happen when a document() function from my xslt try to open an external xml. If I try to open this xml in browser all work ok. I prov...

How to make UIViewAnimationTransitionCurlUp in reversed direction?

Hi, I'm working on the app which allows flipping of the interface under some circumstances. Both landscape orientation should be supported (landscape left and right). Device flipping and orientation changes works fine, however, when in landscape mode, application allows to go to another screen using UIViewAnimationTransitionCurlUp effec...

Can anyone recommend some Transformation Matrix tutorials for dummies?

Can anyone recommend some good starting points for understanding Transformation Matrices for dummies like me with poor math skills. I'm willing to learn the math, and I'm not a complete idiot (I hope) but the examples I'm finding seem to require a huge leap from what I know, to what I need to know. ...

transformation of UML Diagrams to specification Z using xsl transformation

hi. I'm trying to transform some uml diagrams (of singleton , AbstractFactory ...) to Z specification , first i transformed my uml diagram to an xml file using starUML then i used an xsl program and saxon to transform my xml file to .tex( for Z ) , but it didnt work . if someone has an idea about how the xsl program should be written ...

How do I ADD an Attribute to the Root Element in XML using XSLT?

I want to match a root Element “FOO” and perform the transformation (add a version attribute) to it leaving the rest as it is. The Transformation I have so far looks like this: <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://schemas.foo.com/fooNameSpace"&gt; <xsl:template match="//FOO"> ...

iphone: repeating a transformation

Hi I'm trying to represent a view that rotates on the iphone screen. I have a button and when you press it, the view rotates 180 degrees. My problem is that this only works the first time. Here is the code: -(IBAction) flip:(id)sender{ CGAffineTransform transform; //the transform matrix to be used below //BEGIN ANIMATIONS ...