transformation

RESTFUL GlassFish XML XSLT stylesheet Java transformation produces EMPTY output

有些话、适合烂在心里 提交于 2020-01-06 05:58:24
问题 I am writing a RESTFUL web service in Java. The idea is to "cut down" an XML document and strip away all the un-needed content (~98%) and leave only the tags we're interested in, while maintaining the document's structure, which is as follows (I cannot provide the actual XML content for confidentiality reasons): <sear:SEGMENTS xmlns="http://www.exlibrisgroup.com/xsd/primo/primo_nm_bib" xmlns:sear="http://www.exlibrisgroup.com/xsd/jaguar/search"> <sear:JAGROOT> <sear:RESULT> <sear:DOCSET IS

Rotating a 3d polygon into xy-plane while maintaining orientation

我的未来我决定 提交于 2020-01-06 04:00:08
问题 I have a polygon oriented any way and positioned anywhere in 3d space. I need to transform the polygon into the xy-plane so that I can perform various operations on it (in particular generating a grid of points across the bounding box of the polygon) in 2d rather than 3d, then transform it back. The problem comes with the orientation of the transformed polygon. If I just wanted to rotate into the plane, I could take the angle between the polygon's normal and the xy-plane and rotate around an

Rotate a matplotlib Path object

那年仲夏 提交于 2020-01-05 05:53:50
问题 I'm using a matplotlib Path object to create a custom plotting marker as described here. I'd like to rotate the resulting path about its center by an arbitrary angle. Any suggestions on how to do this would be greatly appreciated. Here's the code I'm using to create and plot the custom marker import matplotlib.path import matplotlib.pylab as plt def getCustomMarker(): verts = [( -5 , -15 ), ( -5 , -5 ), ( -15 , -5 ), ( -15 , 5 ), ( -5 , 5 ), ( -5 , 15 ), ( 5 , 15 ), ( 5 , 5 ), ( 15 , 5 ), (

Apply displacement map via Imagick after version update

☆樱花仙子☆ 提交于 2020-01-05 05:37:10
问题 I had the code running to create a "cylinder" effect via ImageMagick v6.7.9 and PHP (Imagick extension v3.2.0), it's like described in the accepted answer of my previous question: https://stackoverflow.com/a/54807019/1800172 It's inspired by Fred's cylinderize script: http://www.fmwconcepts.com/imagemagick/cylinderize/ After creating the X/Y-displacements ( $a3 / $a4 ) it's combined like this: // merge x-displacement and y-displacement into one displacement-map $displaceMask = new Imagick();

How do I run app.config transformation task first before the PostBuildEvents?

只愿长相守 提交于 2020-01-04 06:45:50
问题 I have a console application that uses a database connection string which is defined in app.config. I have a few transformations to change the string depending on the build configuration. I also have a few post-build events that copy app.config to other projects output. The problem is post-build event fires first and I copy the untransformed app.config. Later the transformation task kicks in and apply the transformation (so I know it works). I use with Visual Studio 2010 and .NET 4. Right now

How to calculate the shift parameters of glTranslatef function in opengl

 ̄綄美尐妖づ 提交于 2020-01-03 05:31:35
问题 I am a newbie to opengl and confused about how to caculate the parameters of glTranslatef. Here is my display code void display() { glPushMatrix(); glClearColor(1.0f, 1.0f, 1.0f, 1.0f); // background glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); glScalef(1.f,1.f,1.f); glTranslatef(2.f,0.f,0); glBegin(GL_QUADS); glVertex2f(-1.0f,-1.0f); glTexCoord2f(0.0f,1.0f); glVertex2f(1.0f,-1.0f); glTexCoord2f(0.0f,0.0f); glVertex2f(1.0f,1.0f); glTexCoord2f(1.0f,0.0f); glVertex2f(-1.0f,1.0f);

How to convert matrix into array?

倖福魔咒の 提交于 2020-01-03 02:52:07
问题 I have a large data set and i want to convert it into array. But for instance lets have a simple example. I have following matrix `\begin{table}[ht] \begin{center} \begin{tabular}{rrrrrrr} \hline & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline 1 & 1 & 11 & 21 & 31 & 41 & 51 \\ 2 & 2 & 12 & 22 & 32 & 42 & 52 \\ 3 & 3 & 13 & 23 & 33 & 43 & 53 \\ 4 & 4 & 14 & 24 & 34 & 44 & 54 \\ 5 & 5 & 15 & 25 & 35 & 45 & 55 \\ 6 & 6 & 16 & 26 & 36 & 46 & 56 \\ 7 & 7 & 17 & 27 & 37 & 47 & 57 \\ 8 & 8 & 18 & 28 & 38 & 48 &

T4 Template containing XML results in parse errors

旧巷老猫 提交于 2020-01-02 05:37:06
问题 I have created T4 Templates for the config files of my web and windows projects. I can successfully generate master web.config, and all configs for other environments, i.e. web.ci.config, etc..However, I could not get rid of the errors on my master tt files, such as : Character '#', hexadecimal value 0x23 is illegal in an XML name. Character '<', hexadecimal value 0x3c is illegal in XML attribute values. Unexpected XML declaration. The XML declaration must be the first node in the document

Transforming coordinates of one rectangle to another rectangle

荒凉一梦 提交于 2020-01-02 04:06:11
问题 in the above image I have shown two rectangles rectangle 1 whose x can vary from -900 to 13700 and Y can vary from -600 to 6458 rectangle 2 whose coordinate X can vary from 0 to 3000 and y can vary from 0 to 2000 Also: rectangle 2 has its starting point at left top position(0,0) whereas rectangle 1 has starting point( width/2, height/2). What I need to do : to convert a point of rectangle 1 to point of rectangle 2 using scaling or translation. So, what should be scaling factor for x and y

Is it possible to directly apply an affine transformation matrix to a Mayavi ImageActor object?

不羁岁月 提交于 2020-01-02 00:58:10
问题 I'm using Mayavi to render some imaging data that consists of multiple 2D planes within a 3D volume, the position, orientation and scale of which are defined by 4x4 rigid body affine transformation matrices. Each plane consists of: An array of 2D image data, which I display using mayavi.mlab.imshow A set of ROIs consisting of lines and points that I draw using mayavi.mlab.points3d and mayavi.mlab.plot3d respectively. I transform my points and line vertices from a 2D reference plane into the